summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-11-21 22:02:35 +0100
committerWolfgang Denk <wd@denx.de>2011-11-21 22:02:35 +0100
commit3bf03add545f8988f2fef64b7975beb4ec8bf99f (patch)
tree0cf90bde2382fb6480c71a1279887f91b283eea3
parentc829ff2e3d1bec9b2019480d82638149327db99e (diff)
parenta2308547d15c0c678a3ce06ac81850f809147142 (diff)
downloadu-boot-imx-3bf03add545f8988f2fef64b7975beb4ec8bf99f.zip
u-boot-imx-3bf03add545f8988f2fef64b7975beb4ec8bf99f.tar.gz
u-boot-imx-3bf03add545f8988f2fef64b7975beb4ec8bf99f.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-nds32
* 'master' of git://git.denx.de/u-boot-nds32: nds32/lib: add ide generic support nds32: enhance io.h for compatibility with periphals ftide020: fix incorrect information display format
-rw-r--r--arch/nds32/include/asm/io.h18
-rw-r--r--arch/nds32/lib/board.c5
-rw-r--r--drivers/block/ftide020.c5
3 files changed, 25 insertions, 3 deletions
diff --git a/arch/nds32/include/asm/io.h b/arch/nds32/include/asm/io.h
index 2c105f7..39c3dc8 100644
--- a/arch/nds32/include/asm/io.h
+++ b/arch/nds32/include/asm/io.h
@@ -165,6 +165,24 @@ static inline unsigned int readl(unsigned int *addr)
#define __raw_base_readw(base, off) __arch_base_getw(base, off)
#define __raw_base_readl(base, off) __arch_base_getl(base, off)
+#define out_arch(type, endian, a, v) __raw_write##type(cpu_to_##endian(v), a)
+#define in_arch(type, endian, a) endian##_to_cpu(__raw_read##type(a))
+
+#define out_le32(a, v) out_arch(l, le32, a, v)
+#define out_le16(a, v) out_arch(w, le16, a, v)
+
+#define in_le32(a) in_arch(l, le32, a)
+#define in_le16(a) in_arch(w, le16, a)
+
+#define out_be32(a, v) out_arch(l, be32, a, v)
+#define out_be16(a, v) out_arch(w, be16, a, v)
+
+#define in_be32(a) in_arch(l, be32, a)
+#define in_be16(a) in_arch(w, be16, a)
+
+#define out_8(a, v) __raw_writeb(v, a)
+#define in_8(a) __raw_readb(a)
+
/*
* Now, pick up the machine-defined IO definitions
* #include <asm/arch/io.h>
diff --git a/arch/nds32/lib/board.c b/arch/nds32/lib/board.c
index 2fd0e93..66e4537 100644
--- a/arch/nds32/lib/board.c
+++ b/arch/nds32/lib/board.c
@@ -351,6 +351,11 @@ void board_init_r(gd_t *id, ulong dest_addr)
nand_init(); /* go init the NAND */
#endif
+#if defined(CONFIG_CMD_IDE)
+ puts("IDE: ");
+ ide_init();
+#endif
+
#ifdef CONFIG_GENERIC_MMC
puts("MMC: ");
mmc_initialize(gd->bd);
diff --git a/drivers/block/ftide020.c b/drivers/block/ftide020.c
index 4a7a07f..ad8fdad 100644
--- a/drivers/block/ftide020.c
+++ b/drivers/block/ftide020.c
@@ -316,10 +316,9 @@ int ide_preinit(void)
/* auto-detect IDE controller */
if (ftide_controller_probe()) {
- printf("Faraday %s driver version %s\n", FTIDE_IP_NAME,
- FTIDE_DRIVER_VERSION);
+ printf("FTIDE020_S\n");
} else {
- printf("Faraday ATA controller not found.\n");
+ printf("FTIDE020_S ATA controller not found.\n");
return API_ENODEV;
}