diff options
-rw-r--r-- | arch/arm/boot/compressed/mmcif-sh7372.c | 9 | ||||
-rw-r--r-- | arch/sh/boot/romimage/mmcif-sh7724.c | 9 | ||||
-rw-r--r-- | include/linux/mmc/boot.h | 7 | ||||
-rw-r--r-- | include/linux/mmc/sh_mmcif.h | 3 |
4 files changed, 17 insertions, 11 deletions
diff --git a/arch/arm/boot/compressed/mmcif-sh7372.c b/arch/arm/boot/compressed/mmcif-sh7372.c index 28bcf3cf1a5b..7453c8337b83 100644 --- a/arch/arm/boot/compressed/mmcif-sh7372.c +++ b/arch/arm/boot/compressed/mmcif-sh7372.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/mmc/sh_mmcif.h> | 12 | #include <linux/mmc/sh_mmcif.h> |
13 | #include <linux/mmc/boot.h> | ||
13 | #include <mach/mmc.h> | 14 | #include <mach/mmc.h> |
14 | 15 | ||
15 | #define MMCIF_BASE (void __iomem *)0xe6bd0000 | 16 | #define MMCIF_BASE (void __iomem *)0xe6bd0000 |
@@ -42,7 +43,7 @@ | |||
42 | asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len) | 43 | asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len) |
43 | { | 44 | { |
44 | mmc_init_progress(); | 45 | mmc_init_progress(); |
45 | mmc_update_progress(MMCIF_PROGRESS_ENTER); | 46 | mmc_update_progress(MMC_PROGRESS_ENTER); |
46 | 47 | ||
47 | /* Initialise MMC | 48 | /* Initialise MMC |
48 | * registers: PORT84CR-PORT92CR | 49 | * registers: PORT84CR-PORT92CR |
@@ -68,12 +69,12 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len) | |||
68 | /* Enable clock to MMC hardware block */ | 69 | /* Enable clock to MMC hardware block */ |
69 | __raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 12), SMSTPCR3); | 70 | __raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 12), SMSTPCR3); |
70 | 71 | ||
71 | mmc_update_progress(MMCIF_PROGRESS_INIT); | 72 | mmc_update_progress(MMC_PROGRESS_INIT); |
72 | 73 | ||
73 | /* setup MMCIF hardware */ | 74 | /* setup MMCIF hardware */ |
74 | sh_mmcif_boot_init(MMCIF_BASE); | 75 | sh_mmcif_boot_init(MMCIF_BASE); |
75 | 76 | ||
76 | mmc_update_progress(MMCIF_PROGRESS_LOAD); | 77 | mmc_update_progress(MMC_PROGRESS_LOAD); |
77 | 78 | ||
78 | /* load kernel via MMCIF interface */ | 79 | /* load kernel via MMCIF interface */ |
79 | sh_mmcif_boot_do_read(MMCIF_BASE, 2, /* Kernel is at block 2 */ | 80 | sh_mmcif_boot_do_read(MMCIF_BASE, 2, /* Kernel is at block 2 */ |
@@ -83,5 +84,5 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len) | |||
83 | /* Disable clock to MMC hardware block */ | 84 | /* Disable clock to MMC hardware block */ |
84 | __raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3); | 85 | __raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3); |
85 | 86 | ||
86 | mmc_update_progress(MMCIF_PROGRESS_DONE); | 87 | mmc_update_progress(MMC_PROGRESS_DONE); |
87 | } | 88 | } |
diff --git a/arch/sh/boot/romimage/mmcif-sh7724.c b/arch/sh/boot/romimage/mmcif-sh7724.c index c84e7831018d..16b122510c84 100644 --- a/arch/sh/boot/romimage/mmcif-sh7724.c +++ b/arch/sh/boot/romimage/mmcif-sh7724.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/mmc/sh_mmcif.h> | 11 | #include <linux/mmc/sh_mmcif.h> |
12 | #include <linux/mmc/boot.h> | ||
12 | #include <mach/romimage.h> | 13 | #include <mach/romimage.h> |
13 | 14 | ||
14 | #define MMCIF_BASE (void __iomem *)0xa4ca0000 | 15 | #define MMCIF_BASE (void __iomem *)0xa4ca0000 |
@@ -29,7 +30,7 @@ | |||
29 | */ | 30 | */ |
30 | asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) | 31 | asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) |
31 | { | 32 | { |
32 | mmcif_update_progress(MMCIF_PROGRESS_ENTER); | 33 | mmcif_update_progress(MMC_PROGRESS_ENTER); |
33 | 34 | ||
34 | /* enable clock to the MMCIF hardware block */ | 35 | /* enable clock to the MMCIF hardware block */ |
35 | __raw_writel(__raw_readl(MSTPCR2) & ~0x20000000, MSTPCR2); | 36 | __raw_writel(__raw_readl(MSTPCR2) & ~0x20000000, MSTPCR2); |
@@ -52,12 +53,12 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) | |||
52 | /* high drive capability for MMC pins */ | 53 | /* high drive capability for MMC pins */ |
53 | __raw_writew(__raw_readw(DRVCRA) | 0x3000, DRVCRA); | 54 | __raw_writew(__raw_readw(DRVCRA) | 0x3000, DRVCRA); |
54 | 55 | ||
55 | mmcif_update_progress(MMCIF_PROGRESS_INIT); | 56 | mmcif_update_progress(MMC_PROGRESS_INIT); |
56 | 57 | ||
57 | /* setup MMCIF hardware */ | 58 | /* setup MMCIF hardware */ |
58 | sh_mmcif_boot_init(MMCIF_BASE); | 59 | sh_mmcif_boot_init(MMCIF_BASE); |
59 | 60 | ||
60 | mmcif_update_progress(MMCIF_PROGRESS_LOAD); | 61 | mmcif_update_progress(MMC_PROGRESS_LOAD); |
61 | 62 | ||
62 | /* load kernel via MMCIF interface */ | 63 | /* load kernel via MMCIF interface */ |
63 | sh_mmcif_boot_do_read(MMCIF_BASE, 512, | 64 | sh_mmcif_boot_do_read(MMCIF_BASE, 512, |
@@ -67,5 +68,5 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) | |||
67 | /* disable clock to the MMCIF hardware block */ | 68 | /* disable clock to the MMCIF hardware block */ |
68 | __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); | 69 | __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); |
69 | 70 | ||
70 | mmcif_update_progress(MMCIF_PROGRESS_DONE); | 71 | mmcif_update_progress(MMC_PROGRESS_DONE); |
71 | } | 72 | } |
diff --git a/include/linux/mmc/boot.h b/include/linux/mmc/boot.h new file mode 100644 index 000000000000..39d787c229cb --- /dev/null +++ b/include/linux/mmc/boot.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef MMC_BOOT_H | ||
2 | #define MMC_BOOT_H | ||
3 | |||
4 | enum { MMC_PROGRESS_ENTER, MMC_PROGRESS_INIT, | ||
5 | MMC_PROGRESS_LOAD, MMC_PROGRESS_DONE }; | ||
6 | |||
7 | #endif | ||
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index 38d393092812..9eb9b4b96f55 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
@@ -104,9 +104,6 @@ static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) | |||
104 | 104 | ||
105 | #define SH_MMCIF_BBS 512 /* boot block size */ | 105 | #define SH_MMCIF_BBS 512 /* boot block size */ |
106 | 106 | ||
107 | enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT, | ||
108 | MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE }; | ||
109 | |||
110 | static inline void sh_mmcif_boot_cmd_send(void __iomem *base, | 107 | static inline void sh_mmcif_boot_cmd_send(void __iomem *base, |
111 | unsigned long cmd, unsigned long arg) | 108 | unsigned long cmd, unsigned long arg) |
112 | { | 109 | { |