Skip to content

Commit 7843b6b

Browse files
author
AngeloGioacchino Del Regno
committed
soc: mediatek: socinfo: Advertise about unknown MediaTek SoC
In case we're running on a MediaTek SoC that is not declared in the socinfo_data_table, print a message stating that and, with it, also print out the read eFuse data: this allows to easily add a new SoC in the table, granted that its actual soc/segment/marketing names are already previously known. This is especially useful when booting an already known SoC that already has socinfo support, but has a different silicon version and/or revision, hence different model information in the eFuses. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
1 parent 27e6953 commit 7843b6b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/soc/mediatek/mtk-socinfo.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,14 @@ static int mtk_socinfo_get_socinfo_data(struct mtk_socinfo *mtk_socinfop)
144144
}
145145
}
146146

147-
return match_socinfo_index >= 0 ? match_socinfo_index : -ENOENT;
147+
if (match_socinfo_index < 0) {
148+
dev_warn(mtk_socinfop->dev,
149+
"Unknown MediaTek SoC with ID 0x%08x 0x%08x\n",
150+
cell_data[0], cell_data[1]);
151+
return -ENOENT;
152+
}
153+
154+
return match_socinfo_index;
148155
}
149156

150157
static int mtk_socinfo_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)