Skip to content

Commit 9d9659b

Browse files
hormspmundt
authored andcommitted
mmc: Add MMC_PROGRESS_*
This is my second attempt to make this enum generally available. The first attempt added MMCIF_PROGRESS_* to include/linux/mmc/sh_mmcif.h. However this is not sufficiently generic as the enum will be used by SDHI boot code. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent a6558c2 commit 9d9659b

4 files changed

Lines changed: 17 additions & 11 deletions

File tree

‎arch/arm/boot/compressed/mmcif-sh7372.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
#include <linux/mmc/sh_mmcif.h>
13+
#include <linux/mmc/boot.h>
1314
#include <mach/mmc.h>
1415

1516
#define MMCIF_BASE (void __iomem *)0xe6bd0000
@@ -42,7 +43,7 @@
4243
asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len)
4344
{
4445
mmc_init_progress();
45-
mmc_update_progress(MMCIF_PROGRESS_ENTER);
46+
mmc_update_progress(MMC_PROGRESS_ENTER);
4647

4748
/* Initialise MMC
4849
* registers: PORT84CR-PORT92CR
@@ -68,12 +69,12 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len)
6869
/* Enable clock to MMC hardware block */
6970
__raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 12), SMSTPCR3);
7071

71-
mmc_update_progress(MMCIF_PROGRESS_INIT);
72+
mmc_update_progress(MMC_PROGRESS_INIT);
7273

7374
/* setup MMCIF hardware */
7475
sh_mmcif_boot_init(MMCIF_BASE);
7576

76-
mmc_update_progress(MMCIF_PROGRESS_LOAD);
77+
mmc_update_progress(MMC_PROGRESS_LOAD);
7778

7879
/* load kernel via MMCIF interface */
7980
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)
8384
/* Disable clock to MMC hardware block */
8485
__raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3);
8586

86-
mmc_update_progress(MMCIF_PROGRESS_DONE);
87+
mmc_update_progress(MMC_PROGRESS_DONE);
8788
}

‎arch/sh/boot/romimage/mmcif-sh7724.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include <linux/mmc/sh_mmcif.h>
12+
#include <linux/mmc/boot.h>
1213
#include <mach/romimage.h>
1314

1415
#define MMCIF_BASE (void __iomem *)0xa4ca0000
@@ -29,7 +30,7 @@
2930
*/
3031
asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes)
3132
{
32-
mmcif_update_progress(MMCIF_PROGRESS_ENTER);
33+
mmcif_update_progress(MMC_PROGRESS_ENTER);
3334

3435
/* enable clock to the MMCIF hardware block */
3536
__raw_writel(__raw_readl(MSTPCR2) & ~0x20000000, MSTPCR2);
@@ -52,12 +53,12 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes)
5253
/* high drive capability for MMC pins */
5354
__raw_writew(__raw_readw(DRVCRA) | 0x3000, DRVCRA);
5455

55-
mmcif_update_progress(MMCIF_PROGRESS_INIT);
56+
mmcif_update_progress(MMC_PROGRESS_INIT);
5657

5758
/* setup MMCIF hardware */
5859
sh_mmcif_boot_init(MMCIF_BASE);
5960

60-
mmcif_update_progress(MMCIF_PROGRESS_LOAD);
61+
mmcif_update_progress(MMC_PROGRESS_LOAD);
6162

6263
/* load kernel via MMCIF interface */
6364
sh_mmcif_boot_do_read(MMCIF_BASE, 512,
@@ -67,5 +68,5 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes)
6768
/* disable clock to the MMCIF hardware block */
6869
__raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2);
6970

70-
mmcif_update_progress(MMCIF_PROGRESS_DONE);
71+
mmcif_update_progress(MMC_PROGRESS_DONE);
7172
}

‎include/linux/mmc/boot.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

‎include/linux/mmc/sh_mmcif.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val)
104104

105105
#define SH_MMCIF_BBS 512 /* boot block size */
106106

107-
enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT,
108-
MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE };
109-
110107
static inline void sh_mmcif_boot_cmd_send(void __iomem *base,
111108
unsigned long cmd, unsigned long arg)
112109
{

0 commit comments

Comments
 (0)