]> git.sur5r.net Git - u-boot/blobdiff - include/ide.h
tegra: i2c: Add function to know about current bus
[u-boot] / include / ide.h
index 3a08425eeb5e82c8b2d866d8c30d1bf6a4891bd0..59ea9758a7d90e0d43033a81ab3a74a0eee77cf6 100644 (file)
@@ -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
 
 
 #ifdef CONFIG_SYS_64BIT_LBA
 typedef uint64_t lbaint_t;
+#define LBAF "%llx"
+#define LBAFU "%llu"
 #else
 typedef ulong lbaint_t;
+#define LBAF "%lx"
+#define LBAFU "%lu"
 #endif
 
 /*
@@ -51,8 +56,9 @@ typedef ulong lbaint_t;
  */
 
 void ide_init(void);
-ulong ide_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer);
-ulong ide_write(int device, ulong blknr, lbaint_t blkcnt, const void *buffer);
+ulong ide_read(int device, lbaint_t blknr, lbaint_t blkcnt, void *buffer);
+ulong ide_write(int device, lbaint_t blknr, lbaint_t blkcnt,
+               const void *buffer);
 
 #ifdef CONFIG_IDE_PREINIT
 int ide_preinit(void);
@@ -72,4 +78,21 @@ 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);
+
+/**
+ * board_start_ide() - Start up the board IDE interfac
+ *
+ * @return 0 if ok
+ */
+int board_start_ide(void);
+
 #endif /* _IDE_H */