forked from luck/tmp_suning_uos_patched
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 <horms@verge.net.au> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
05a5f01c68
commit
a6558c2d07
@ -10,7 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/mmc/sh_mmcif.h>
|
#include <linux/mmc/sh_mmcif.h>
|
||||||
#include <mach/mmcif.h>
|
#include <mach/mmc.h>
|
||||||
|
|
||||||
#define MMCIF_BASE (void __iomem *)0xe6bd0000
|
#define MMCIF_BASE (void __iomem *)0xe6bd0000
|
||||||
|
|
||||||
@ -41,8 +41,8 @@
|
|||||||
*/
|
*/
|
||||||
asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len)
|
asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len)
|
||||||
{
|
{
|
||||||
mmcif_init_progress();
|
mmc_init_progress();
|
||||||
mmcif_update_progress(MMCIF_PROGRESS_ENTER);
|
mmc_update_progress(MMCIF_PROGRESS_ENTER);
|
||||||
|
|
||||||
/* Initialise MMC
|
/* Initialise MMC
|
||||||
* registers: PORT84CR-PORT92CR
|
* registers: PORT84CR-PORT92CR
|
||||||
@ -68,12 +68,12 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len)
|
|||||||
/* Enable clock to MMC hardware block */
|
/* Enable clock to MMC hardware block */
|
||||||
__raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 12), SMSTPCR3);
|
__raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 12), SMSTPCR3);
|
||||||
|
|
||||||
mmcif_update_progress(MMCIF_PROGRESS_INIT);
|
mmc_update_progress(MMCIF_PROGRESS_INIT);
|
||||||
|
|
||||||
/* setup MMCIF hardware */
|
/* setup MMCIF hardware */
|
||||||
sh_mmcif_boot_init(MMCIF_BASE);
|
sh_mmcif_boot_init(MMCIF_BASE);
|
||||||
|
|
||||||
mmcif_update_progress(MMCIF_PROGRESS_LOAD);
|
mmc_update_progress(MMCIF_PROGRESS_LOAD);
|
||||||
|
|
||||||
/* load kernel via MMCIF interface */
|
/* load kernel via MMCIF interface */
|
||||||
sh_mmcif_boot_do_read(MMCIF_BASE, 2, /* Kernel is at block 2 */
|
sh_mmcif_boot_do_read(MMCIF_BASE, 2, /* Kernel is at block 2 */
|
||||||
@ -83,5 +83,5 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len)
|
|||||||
/* Disable clock to MMC hardware block */
|
/* Disable clock to MMC hardware block */
|
||||||
__raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3);
|
__raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3);
|
||||||
|
|
||||||
mmcif_update_progress(MMCIF_PROGRESS_DONE);
|
mmc_update_progress(MMCIF_PROGRESS_DONE);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef MMCIF_AP4EB_H
|
#ifndef MMC_AP4EB_H
|
||||||
#define MMCIF_AP4EB_H
|
#define MMC_AP4EB_H
|
||||||
|
|
||||||
#define PORT185CR (void __iomem *)0xe60520b9
|
#define PORT185CR (void __iomem *)0xe60520b9
|
||||||
#define PORT186CR (void __iomem *)0xe60520ba
|
#define PORT186CR (void __iomem *)0xe60520ba
|
||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#define PORTR191_160DR (void __iomem *)0xe6056014
|
#define PORTR191_160DR (void __iomem *)0xe6056014
|
||||||
|
|
||||||
static inline void mmcif_init_progress(void)
|
static inline void mmc_init_progress(void)
|
||||||
{
|
{
|
||||||
/* Initialise LEDS1-4
|
/* Initialise LEDS1-4
|
||||||
* registers: PORT185CR-PORT188CR (LED1-LED4 Control)
|
* registers: PORT185CR-PORT188CR (LED1-LED4 Control)
|
||||||
@ -20,10 +20,10 @@ static inline void mmcif_init_progress(void)
|
|||||||
__raw_writeb(0x10, PORT188CR);
|
__raw_writeb(0x10, PORT188CR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void mmcif_update_progress(int n)
|
static inline void mmc_update_progress(int n)
|
||||||
{
|
{
|
||||||
__raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) |
|
__raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) |
|
||||||
(1 << (25 + n)), PORTR191_160DR);
|
(1 << (25 + n)), PORTR191_160DR);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MMCIF_AP4EB_H */
|
#endif /* MMC_AP4EB_H */
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef MMCIF_MACKEREL_H
|
#ifndef MMC_MACKEREL_H
|
||||||
#define MMCIF_MACKEREL_H
|
#define MMC_MACKEREL_H
|
||||||
|
|
||||||
#define PORT0CR (void __iomem *)0xe6051000
|
#define PORT0CR (void __iomem *)0xe6051000
|
||||||
#define PORT1CR (void __iomem *)0xe6051001
|
#define PORT1CR (void __iomem *)0xe6051001
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#define PORTR031_000DR (void __iomem *)0xe6055000
|
#define PORTR031_000DR (void __iomem *)0xe6055000
|
||||||
#define PORTL159_128DR (void __iomem *)0xe6054010
|
#define PORTL159_128DR (void __iomem *)0xe6054010
|
||||||
|
|
||||||
static inline void mmcif_init_progress(void)
|
static inline void mmc_init_progress(void)
|
||||||
{
|
{
|
||||||
/* Initialise LEDS0-3
|
/* Initialise LEDS0-3
|
||||||
* registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control)
|
* registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control)
|
||||||
@ -21,7 +21,7 @@ static inline void mmcif_init_progress(void)
|
|||||||
__raw_writeb(0x10, PORT159CR);
|
__raw_writeb(0x10, PORT159CR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void mmcif_update_progress(int n)
|
static inline void mmc_update_progress(int n)
|
||||||
{
|
{
|
||||||
unsigned a = 0, b = 0;
|
unsigned a = 0, b = 0;
|
||||||
|
|
||||||
@ -35,5 +35,4 @@ static inline void mmcif_update_progress(int n)
|
|||||||
__raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b,
|
__raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b,
|
||||||
PORTL159_128DR);
|
PORTL159_128DR);
|
||||||
}
|
}
|
||||||
|
#endif /* MMC_MACKEREL_H */
|
||||||
#endif /* MMCIF_MACKEREL_H */
|
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef MMCIF_H
|
#ifndef MMC_H
|
||||||
#define MMCIF_H
|
#define MMC_H
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
*
|
*
|
||||||
@ -8,11 +8,11 @@
|
|||||||
**************************************************/
|
**************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_MACH_AP4EVB
|
#ifdef CONFIG_MACH_AP4EVB
|
||||||
#include "mach/mmcif-ap4eb.h"
|
#include "mach/mmc-ap4eb.h"
|
||||||
#elif CONFIG_MACH_MACKEREL
|
#elif CONFIG_MACH_MACKEREL
|
||||||
#include "mach/mmcif-mackerel.h"
|
#include "mach/mmc-mackerel.h"
|
||||||
#else
|
#else
|
||||||
#error "unsupported board."
|
#error "unsupported board."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* MMCIF_H */
|
#endif /* MMC_H */
|
Loading…
Reference in New Issue
Block a user