aboutsummaryrefslogtreecommitdiff
path: root/include/ide.h
diff options
context:
space:
mode:
authorPavel Herrmann2012-10-09 07:04:39 +0000
committerTom Rini2012-10-17 07:59:08 -0700
commitf5b82c0f9c34ded68e346a0fe7ad13c3ff63f573 (patch)
tree1c2c65a60dea8b4f69279e9acbd37262445ccdad /include/ide.h
parente4148c1165d11807e51a9587716e6a513ce1c021 (diff)
change all versions of input_data() and output_data() to global weak aliases
This changes input_data() and friends from static function to global symbols under weak alias, to enable board specific overrides (and therefore get rid of board-specific code in cmd_ide.c) Also declare ide_bus_offset in the header file, so other files can use ATA_CURR_BASE as well. Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Diffstat (limited to 'include/ide.h')
-rw-r--r--include/ide.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/ide.h b/include/ide.h
index 3a08425eeb5..695d08eeccf 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -27,6 +27,7 @@
#define IDE_BUS(dev) (dev / (CONFIG_SYS_IDE_MAXDEVICE / CONFIG_SYS_IDE_MAXBUS))
#define ATA_CURR_BASE(dev) (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
+extern ulong ide_bus_offset[];
#ifdef CONFIG_IDE_LED
@@ -72,4 +73,14 @@ void ide_write_register(int dev, unsigned int port, unsigned char val);
void ide_read_data(int dev, ulong *sect_buf, int words);
void ide_write_data(int dev, ulong *sect_buf, int words);
#endif
+
+/*
+ * I/O function overrides
+ */
+void ide_input_swap_data(int dev, ulong *sect_buf, int words);
+void ide_input_data(int dev, ulong *sect_buf, int words);
+void ide_output_data(int dev, const ulong *sect_buf, int words);
+void ide_input_data_shorts(int dev, ushort *sect_buf, int shorts);
+void ide_output_data_shorts(int dev, ushort *sect_buf, int shorts);
+
#endif /* _IDE_H */