From a6558c2d07d5c955fbb0290f68c27164a5567b9a Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 24 Mar 2011 07:04:37 +0000 Subject: mmc, ARM: Rename SuperH Mobile ARM zboot helpers These headers and helpers will also be used for SDHI boot so the mmcif name will start to make a lot less sense. Signed-off-by: Simon Horman Signed-off-by: Paul Mundt --- arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h | 29 ++++++++++++++++ arch/arm/mach-shmobile/include/mach/mmc-mackerel.h | 38 +++++++++++++++++++++ arch/arm/mach-shmobile/include/mach/mmc.h | 18 ++++++++++ arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h | 29 ---------------- .../mach-shmobile/include/mach/mmcif-mackerel.h | 39 ---------------------- arch/arm/mach-shmobile/include/mach/mmcif.h | 18 ---------- 6 files changed, 85 insertions(+), 86 deletions(-) create mode 100644 arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h create mode 100644 arch/arm/mach-shmobile/include/mach/mmc-mackerel.h create mode 100644 arch/arm/mach-shmobile/include/mach/mmc.h delete mode 100644 arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h delete mode 100644 arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h delete mode 100644 arch/arm/mach-shmobile/include/mach/mmcif.h (limited to 'arch/arm/mach-shmobile/include') diff --git a/arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h b/arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h new file mode 100644 index 00000000000..db59fdbda86 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h @@ -0,0 +1,29 @@ +#ifndef MMC_AP4EB_H +#define MMC_AP4EB_H + +#define PORT185CR (void __iomem *)0xe60520b9 +#define PORT186CR (void __iomem *)0xe60520ba +#define PORT187CR (void __iomem *)0xe60520bb +#define PORT188CR (void __iomem *)0xe60520bc + +#define PORTR191_160DR (void __iomem *)0xe6056014 + +static inline void mmc_init_progress(void) +{ + /* Initialise LEDS1-4 + * registers: PORT185CR-PORT188CR (LED1-LED4 Control) + * value: 0x10 - enable output + */ + __raw_writeb(0x10, PORT185CR); + __raw_writeb(0x10, PORT186CR); + __raw_writeb(0x10, PORT187CR); + __raw_writeb(0x10, PORT188CR); +} + +static inline void mmc_update_progress(int n) +{ + __raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) | + (1 << (25 + n)), PORTR191_160DR); +} + +#endif /* MMC_AP4EB_H */ diff --git a/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h new file mode 100644 index 00000000000..15d3a9efdec --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h @@ -0,0 +1,38 @@ +#ifndef MMC_MACKEREL_H +#define MMC_MACKEREL_H + +#define PORT0CR (void __iomem *)0xe6051000 +#define PORT1CR (void __iomem *)0xe6051001 +#define PORT2CR (void __iomem *)0xe6051002 +#define PORT159CR (void __iomem *)0xe605009f + +#define PORTR031_000DR (void __iomem *)0xe6055000 +#define PORTL159_128DR (void __iomem *)0xe6054010 + +static inline void mmc_init_progress(void) +{ + /* Initialise LEDS0-3 + * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control) + * value: 0x10 - enable output + */ + __raw_writeb(0x10, PORT0CR); + __raw_writeb(0x10, PORT1CR); + __raw_writeb(0x10, PORT2CR); + __raw_writeb(0x10, PORT159CR); +} + +static inline void mmc_update_progress(int n) +{ + unsigned a = 0, b = 0; + + if (n < 3) + a = 1 << n; + else + b = 1 << 31; + + __raw_writel((__raw_readl(PORTR031_000DR) & ~0x7) | a, + PORTR031_000DR); + __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b, + PORTL159_128DR); +} +#endif /* MMC_MACKEREL_H */ diff --git a/arch/arm/mach-shmobile/include/mach/mmc.h b/arch/arm/mach-shmobile/include/mach/mmc.h new file mode 100644 index 00000000000..e11560a525a --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/mmc.h @@ -0,0 +1,18 @@ +#ifndef MMC_H +#define MMC_H + +/************************************************** + * + * board specific settings + * + **************************************************/ + +#ifdef CONFIG_MACH_AP4EVB +#include "mach/mmc-ap4eb.h" +#elif CONFIG_MACH_MACKEREL +#include "mach/mmc-mackerel.h" +#else +#error "unsupported board." +#endif + +#endif /* MMC_H */ diff --git a/arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h b/arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h deleted file mode 100644 index a8d02be8d2b..00000000000 --- a/arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef MMCIF_AP4EB_H -#define MMCIF_AP4EB_H - -#define PORT185CR (void __iomem *)0xe60520b9 -#define PORT186CR (void __iomem *)0xe60520ba -#define PORT187CR (void __iomem *)0xe60520bb -#define PORT188CR (void __iomem *)0xe60520bc - -#define PORTR191_160DR (void __iomem *)0xe6056014 - -static inline void mmcif_init_progress(void) -{ - /* Initialise LEDS1-4 - * registers: PORT185CR-PORT188CR (LED1-LED4 Control) - * value: 0x10 - enable output - */ - __raw_writeb(0x10, PORT185CR); - __raw_writeb(0x10, PORT186CR); - __raw_writeb(0x10, PORT187CR); - __raw_writeb(0x10, PORT188CR); -} - -static inline void mmcif_update_progress(int n) -{ - __raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) | - (1 << (25 + n)), PORTR191_160DR); -} - -#endif /* MMCIF_AP4EB_H */ diff --git a/arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h b/arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h deleted file mode 100644 index 4b4f6949a86..00000000000 --- a/arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef MMCIF_MACKEREL_H -#define MMCIF_MACKEREL_H - -#define PORT0CR (void __iomem *)0xe6051000 -#define PORT1CR (void __iomem *)0xe6051001 -#define PORT2CR (void __iomem *)0xe6051002 -#define PORT159CR (void __iomem *)0xe605009f - -#define PORTR031_000DR (void __iomem *)0xe6055000 -#define PORTL159_128DR (void __iomem *)0xe6054010 - -static inline void mmcif_init_progress(void) -{ - /* Initialise LEDS0-3 - * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control) - * value: 0x10 - enable output - */ - __raw_writeb(0x10, PORT0CR); - __raw_writeb(0x10, PORT1CR); - __raw_writeb(0x10, PORT2CR); - __raw_writeb(0x10, PORT159CR); -} - -static inline void mmcif_update_progress(int n) -{ - unsigned a = 0, b = 0; - - if (n < 3) - a = 1 << n; - else - b = 1 << 31; - - __raw_writel((__raw_readl(PORTR031_000DR) & ~0x7) | a, - PORTR031_000DR); - __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b, - PORTL159_128DR); -} - -#endif /* MMCIF_MACKEREL_H */ diff --git a/arch/arm/mach-shmobile/include/mach/mmcif.h b/arch/arm/mach-shmobile/include/mach/mmcif.h deleted file mode 100644 index f4dc3279cf0..00000000000 --- a/arch/arm/mach-shmobile/include/mach/mmcif.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MMCIF_H -#define MMCIF_H - -/************************************************** - * - * board specific settings - * - **************************************************/ - -#ifdef CONFIG_MACH_AP4EVB -#include "mach/mmcif-ap4eb.h" -#elif CONFIG_MACH_MACKEREL -#include "mach/mmcif-mackerel.h" -#else -#error "unsupported board." -#endif - -#endif /* MMCIF_H */ -- cgit v1.2.3-70-g09d2 From 4a0f081d1b41cfe68df153d0bac7ad6baf226791 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 4 Apr 2011 06:45:21 +0000 Subject: ARM: mach-shmobile: Correctly check for CONFIG_MACH_MACKEREL I made a bit of a thinko when adding Mackerel to the boards that support zboot using MMCIF. Reported-by: Magnus Damm Signed-off-by: Simon Horman Signed-off-by: Paul Mundt --- arch/arm/mach-shmobile/include/mach/mmc.h | 2 +- arch/arm/mach-shmobile/include/mach/zboot.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-shmobile/include') diff --git a/arch/arm/mach-shmobile/include/mach/mmc.h b/arch/arm/mach-shmobile/include/mach/mmc.h index e11560a525a..21a59db638b 100644 --- a/arch/arm/mach-shmobile/include/mach/mmc.h +++ b/arch/arm/mach-shmobile/include/mach/mmc.h @@ -9,7 +9,7 @@ #ifdef CONFIG_MACH_AP4EVB #include "mach/mmc-ap4eb.h" -#elif CONFIG_MACH_MACKEREL +#elif defined(CONFIG_MACH_MACKEREL) #include "mach/mmc-mackerel.h" #else #error "unsupported board." diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h index 6d6a205bcf9..9320aff0a20 100644 --- a/arch/arm/mach-shmobile/include/mach/zboot.h +++ b/arch/arm/mach-shmobile/include/mach/zboot.h @@ -13,7 +13,7 @@ #ifdef CONFIG_MACH_AP4EVB #define MACH_TYPE MACH_TYPE_AP4EVB #include "mach/head-ap4evb.txt" -#elif CONFIG_MACH_MACKEREL +#elif defined(CONFIG_MACH_MACKEREL) #define MACH_TYPE MACH_TYPE_MACKEREL #include "mach/head-mackerel.txt" #else -- cgit v1.2.3-70-g09d2