Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
[sfrench/cifs-2.6.git] / arch / arm / mach-at91 / include / mach / uncompress.h
index 4bb644f8e87c08a9119688968893b8cda217f927..acb2d890ad7e1ec58d79caaa1db576a8681a947f 100644 (file)
@@ -94,7 +94,7 @@ static const u32 uarts_sam9x5[] = {
        0,
 };
 
-static const u32 uarts_sama5[] = {
+static const u32 uarts_sama5d3[] = {
        AT91_BASE_DBGU1,
        SAMA5D3_BASE_USART0,
        SAMA5D3_BASE_USART1,
@@ -103,6 +103,12 @@ static const u32 uarts_sama5[] = {
        0,
 };
 
+static const u32 uarts_sama5d4[] = {
+       AT91_BASE_DBGU2,
+       SAMA5D4_BASE_USART3,
+       0,
+};
+
 static inline const u32* decomp_soc_detect(void __iomem *dbgu_base)
 {
        u32 cidr, socid;
@@ -134,8 +140,14 @@ static inline const u32* decomp_soc_detect(void __iomem *dbgu_base)
        case ARCH_ID_AT91SAM9X5:
                return uarts_sam9x5;
 
-       case ARCH_ID_SAMA5D3:
-               return uarts_sama5;
+       case ARCH_ID_SAMA5:
+               cidr = __raw_readl(dbgu_base + AT91_DBGU_EXID);
+               if (cidr & ARCH_EXID_SAMA5D3)
+                       return uarts_sama5d3;
+               else if (cidr & ARCH_EXID_SAMA5D4)
+                       return uarts_sama5d4;
+
+               break;
        }
 
        /* at91sam9g10 */
@@ -156,9 +168,10 @@ static inline void arch_decomp_setup(void)
        const u32* usarts;
 
        usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU0);
-
        if (!usarts)
                usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU1);
+       if (!usarts)
+               usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU2);
        if (!usarts) {
                at91_uart = NULL;
                return;