[RFC 08/11] soc: realtek: chip: Detect RTD1293

Andreas Färber
2019-11-03T01:37:18Z

Logic self-determined by comparing DS418j and DS418 registers.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
drivers/soc/realtek/chip.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c
index ba653c097644..f4b26fb048c7 100644
--- a/drivers/soc/realtek/chip.c
+++ b/drivers/soc/realtek/chip.c
@@ -59,6 +59,8 @@ static const char *rtd1295_name(struct device *dev, const struct rtd_soc *s)
u32 chipinfo1 = readl_relaxed(base);
iounmap(base);
if (chipinfo1 & BIT(11)) {
+ if (chipinfo1 & BIT(4))
+ return "RTD1293";
return "RTD1296";
}
}
--
2.16.4