lkml.org 
[lkml]   [2019]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 10/11] soc: realtek: chip: Detect RTD1294
Date
Detection logic from downstream include/soc/realtek/rtd129x_cpu.h.

Signed-off-by: Andreas Färber <afaerber@suse.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
\
 
 \ /
  Last update: 2019-11-03 02:37    [W:3.339 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site