summaryrefslogtreecommitdiff
path: root/board/bf537-stamp/bf537-stamp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-22 16:30:38 -0500
committerMike Frysinger <vapier@gentoo.org>2009-04-02 06:42:00 -0400
commitd248cfb2d940b742f6bfdba9b832a3df96da3101 (patch)
tree87b21625755f07aa3ef0c84ed721db89cf7f95ad /board/bf537-stamp/bf537-stamp.c
parentad9073211ca9e62162a39851e082b8d07a662fb6 (diff)
downloadu-boot-imx-d248cfb2d940b742f6bfdba9b832a3df96da3101.zip
u-boot-imx-d248cfb2d940b742f6bfdba9b832a3df96da3101.tar.gz
u-boot-imx-d248cfb2d940b742f6bfdba9b832a3df96da3101.tar.bz2
Blackfin: bf537-stamp: split CF/IDE code out into dedicated cf-ide.c
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'board/bf537-stamp/bf537-stamp.c')
-rw-r--r--board/bf537-stamp/bf537-stamp.c57
1 files changed, 3 insertions, 54 deletions
diff --git a/board/bf537-stamp/bf537-stamp.c b/board/bf537-stamp/bf537-stamp.c
index 16ffe2f..28597c9 100644
--- a/board/bf537-stamp/bf537-stamp.c
+++ b/board/bf537-stamp/bf537-stamp.c
@@ -43,43 +43,6 @@ int checkboard(void)
return 0;
}
-#if defined(CONFIG_BFIN_IDE)
-
-void cf_outb(unsigned char val, volatile unsigned char *addr)
-{
- *(addr) = val;
- SSYNC();
-}
-
-unsigned char cf_inb(volatile unsigned char *addr)
-{
- volatile unsigned char c;
-
- c = *(addr);
- SSYNC();
-
- return c;
-}
-
-void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words)
-{
- int i;
-
- for (i = 0; i < words; i++)
- *(sect_buf + i) = *(addr);
- SSYNC();
-}
-
-void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
-{
- int i;
-
- for (i = 0; i < words; i++)
- *(addr) = *(sect_buf + i);
- SSYNC();
-}
-#endif /* CONFIG_BFIN_IDE */
-
phys_size_t initdram(int board_type)
{
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
@@ -130,7 +93,6 @@ int board_eth_init(bd_t *bis)
}
#endif
-#if defined(CONFIG_MISC_INIT_R)
/* miscellaneous platform dependent initialisations */
int misc_init_r(void)
{
@@ -146,22 +108,9 @@ int misc_init_r(void)
flash_protect(FLAG_PROTECT_SET, 0x203F0000, 0x203FFFFF, &flash_info[0]);
#endif
-#if defined(CONFIG_BFIN_IDE)
-#if defined(CONFIG_BFIN_TRUE_IDE)
- /* Enable ATASEL when in True IDE mode */
- printf("Using CF True IDE Mode\n");
- cf_outb(0, (unsigned char *)CONFIG_CF_ATASEL_ENA);
- udelay(1000);
-#elif defined(CONFIG_BFIN_CF_IDE)
- /* Disable ATASEL when we're in Common Memory Mode */
- printf("Using CF Common Memory Mode\n");
- cf_outb(0, (unsigned char *)CONFIG_CF_ATASEL_DIS);
- udelay(1000);
-#elif defined(CONFIG_BFIN_HDD_IDE)
- printf("Using HDD IDE Mode\n");
+#ifdef CONFIG_BFIN_IDE
+ cf_ide_init();
#endif
- ide_init();
-#endif /* CONFIG_BFIN_IDE */
+
return 0;
}
-#endif /* CONFIG_MISC_INIT_R */