[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191103013645.9856-11-afaerber@suse.de>
Date: Sun, 3 Nov 2019 02:36:44 +0100
From: Andreas Färber <afaerber@...e.de>
To: linux-realtek-soc@...ts.infradead.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Andreas Färber <afaerber@...e.de>
Subject: [RFC 10/11] soc: realtek: chip: Detect RTD1294
Detection logic from downstream include/soc/realtek/rtd129x_cpu.h.
Signed-off-by: Andreas Färber <afaerber@...e.de>
---
drivers/soc/realtek/chip.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c
index f4b26fb048c7..e13339a4ca2e 100644
--- a/drivers/soc/realtek/chip.c
+++ b/drivers/soc/realtek/chip.c
@@ -54,6 +54,14 @@ static const char *rtd1295_name(struct device *dev, const struct rtd_soc *s)
{
void __iomem *base;
+ base = of_iomap(dev->of_node, 2);
+ if (base) {
+ u32 efuse = readl_relaxed(base);
+ iounmap(base);
+ if ((efuse & 0x3) == 0x1)
+ return "RTD1294";
+ }
+
base = of_iomap(dev->of_node, 1);
if (base) {
u32 chipinfo1 = readl_relaxed(base);
--
2.16.4
Powered by blists - more mailing lists