sunxi: Use axp221 sid on a33
authorHans de Goede <hdegoede@redhat.com>
Tue, 19 May 2015 21:34:00 +0000 (23:34 +0200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 29 May 2015 11:46:36 +0000 (13:46 +0200)
Unlike the A31 and the A23 the A33 actually has a SID inside the SoC again,
but sid[3] is 0 (at least on some SoCs), so it is better to use the axp221
sid.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
arch/arm/cpu/armv7/sunxi/cpu_info.c

index 30ec4ac4f01733bea7608d199dcbc80477a436e0..8e8c84f2ad0ae82d759f3416f5083247bf230950 100644 (file)
@@ -78,18 +78,16 @@ int print_cpuinfo(void)
 
 int sunxi_get_sid(unsigned int *sid)
 {
-#if defined CONFIG_MACH_SUN6I || defined CONFIG_MACH_SUN8I_A23
 #ifdef CONFIG_AXP221_POWER
        return axp221_get_sid(sid);
-#else
-       return -ENODEV;
-#endif
-#else
+#elif defined SUNXI_SID_BASE
        int i;
 
        for (i = 0; i< 4; i++)
                sid[i] = readl(SUNXI_SID_BASE + 4 * i);
 
        return 0;
+#else
+       return -ENODEV;
 #endif
 }