File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 22
22
#define OCOTP_UID_LOW 0x410
23
23
#define OCOTP_UID_HIGH 0x420
24
24
25
+ #define IMX8MP_OCOTP_UID_OFFSET 0x10
26
+
25
27
/* Same as ANADIG_DIGPROG_IMX7D */
26
28
#define ANADIG_DIGPROG_IMX8MM 0x800
27
29
@@ -87,6 +89,8 @@ static void __init imx8mm_soc_uid(void)
87
89
{
88
90
void __iomem * ocotp_base ;
89
91
struct device_node * np ;
92
+ u32 offset = of_machine_is_compatible ("fsl,imx8mp" ) ?
93
+ IMX8MP_OCOTP_UID_OFFSET : 0 ;
90
94
91
95
np = of_find_compatible_node (NULL , NULL , "fsl,imx8mm-ocotp" );
92
96
if (!np )
@@ -95,9 +99,9 @@ static void __init imx8mm_soc_uid(void)
95
99
ocotp_base = of_iomap (np , 0 );
96
100
WARN_ON (!ocotp_base );
97
101
98
- soc_uid = readl_relaxed (ocotp_base + OCOTP_UID_HIGH );
102
+ soc_uid = readl_relaxed (ocotp_base + OCOTP_UID_HIGH + offset );
99
103
soc_uid <<= 32 ;
100
- soc_uid |= readl_relaxed (ocotp_base + OCOTP_UID_LOW );
104
+ soc_uid |= readl_relaxed (ocotp_base + OCOTP_UID_LOW + offset );
101
105
102
106
iounmap (ocotp_base );
103
107
of_node_put (np );
You can’t perform that action at this time.
0 commit comments