summaryrefslogtreecommitdiff
path: root/board/pcs440ep/pcs440ep.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2007-09-02 14:02:19 +0200
committerStefan Roese <sr@denx.de>2007-09-02 14:02:19 +0200
commit1d1ab638f8b5961e4972d29394e573afb39667be (patch)
tree36fa9e8b01e05323e93a55a2cdc592fe69b5396c /board/pcs440ep/pcs440ep.c
parent81b73dec16fd1227369a191e725e10044a9d56b8 (diff)
parent60174746c668b309378a91488dded898e9553eae (diff)
downloadu-boot-imx-1d1ab638f8b5961e4972d29394e573afb39667be.zip
u-boot-imx-1d1ab638f8b5961e4972d29394e573afb39667be.tar.gz
u-boot-imx-1d1ab638f8b5961e4972d29394e573afb39667be.tar.bz2
Merge with git://www.denx.de/git/u-boot.git
Diffstat (limited to 'board/pcs440ep/pcs440ep.c')
-rw-r--r--board/pcs440ep/pcs440ep.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/board/pcs440ep/pcs440ep.c b/board/pcs440ep/pcs440ep.c
index e247fee..90e99d3 100644
--- a/board/pcs440ep/pcs440ep.c
+++ b/board/pcs440ep/pcs440ep.c
@@ -30,6 +30,7 @@
#include <spd_sdram.h>
#include <status_led.h>
#include <sha1.h>
+#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -867,6 +868,29 @@ U_BOOT_CMD(
);
#endif
+#if defined (CONFIG_CMD_IDE)
+/* These addresses need to be shifted one place to the left
+ * ( bus per_addr 20 -30 is connectsd on CF bus A10-A0)
+ * These values are shifted
+ */
+extern ulong *ide_bus_offset;
+void inline ide_outb(int dev, int port, unsigned char val)
+{
+ debug ("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
+ dev, port, val, (ATA_CURR_BASE(dev)+port));
+
+ out_be16((u16 *)(ATA_CURR_BASE(dev)+(port << 1)), val);
+}
+unsigned char inline ide_inb(int dev, int port)
+{
+ uchar val;
+ val = in_be16((u16 *)(ATA_CURR_BASE(dev)+(port << 1)));
+ debug ("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
+ dev, port, (ATA_CURR_BASE(dev)+port), val);
+ return (val);
+}
+#endif
+
#ifdef CONFIG_IDE_PREINIT
int ide_preinit (void)
{