]> git.sur5r.net Git - u-boot/blobdiff - drivers/block/ata_piix.h
Merge branch 'master' of git://git.denx.de/u-boot-mips
[u-boot] / drivers / block / ata_piix.h
index bb1acb3878e16a5eb098c907dbc3bf8cca37776a..9157cf82c0b827e01045a14a7a1ef1f90c3df6b2 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef __ATA_PIIX_H__
+#define __ATA_PIIX_H__
 
 #if (DEBUG_SATA)
 #define PRINTF(fmt,args...)    printf (fmt ,##args)
@@ -35,33 +37,20 @@ struct sata_port {
 
 /***********SATA LIBRARY SPECIFIC DEFINITIONS AND DECLARATIONS**************/
 #ifdef SATA_DECL               /*SATA library specific declarations */
-#define ata_id_has_lba48(id)    ((id)[83] & (1 << 10))
-#define ata_id_has_lba(id)      ((id)[49] & (1 << 9))
-#define ata_id_has_dma(id)      ((id)[49] & (1 << 8))
-#define ata_id_u32(id,n)        \
-       (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
-#define ata_id_u64(id,n)        \
-       (((u64) (id)[(n) + 3] << 48) | \
-       ((u64) (id)[(n) + 2] << 32) | \
-       ((u64) (id)[(n) + 1] << 16) | \
-       ((u64) (id)[(n) + 0]) )
-#endif
-
-#ifdef SATA_DECL               /*SATA library specific declarations */
-static inline void
+inline void
 ata_dump_id (u16 * id)
 {
-       PRINTF ("49==0x%04x  "
-               "53==0x%04x  "
-               "63==0x%04x  "
-               "64==0x%04x  "
-               "75==0x%04x  \n", id[49], id[53], id[63], id[64], id[75]);
-       PRINTF ("80==0x%04x  "
-               "81==0x%04x  "
-               "82==0x%04x  "
-               "83==0x%04x  "
-               "84==0x%04x  \n", id[80], id[81], id[82], id[83], id[84]);
-       PRINTF ("88==0x%04x  " "93==0x%04x\n", id[88], id[93]);
+       PRINTF ("49 = 0x%04x  "
+               "53 = 0x%04x  "
+               "63 = 0x%04x  "
+               "64 = 0x%04x  "
+               "75 = 0x%04x  \n", id[49], id[53], id[63], id[64], id[75]);
+       PRINTF ("80 = 0x%04x  "
+               "81 = 0x%04x  "
+               "82 = 0x%04x  "
+               "83 = 0x%04x  "
+               "84 = 0x%04x  \n", id[80], id[81], id[82], id[83], id[84]);
+       PRINTF ("88 = 0x%04x  " "93 = 0x%04x\n", id[88], id[93]);
 }
 #endif
 
@@ -82,11 +71,11 @@ void msleep (int count);
 /************DRIVER SPECIFIC DEFINITIONS AND DECLARATIONS**************/
 
 #ifdef DRV_DECL                        /*Driver specific declaration */
-int init_sata (void);
+int init_sata (int dev);
 #endif
 
 #ifdef DRV_DECL                        /*Defines Driver Specific variables */
-struct sata_port port[CFG_SATA_MAXBUS];
-block_dev_desc_t sata_dev_desc[CFG_SATA_MAXDEVICES];
-int curr_dev = -1;
+struct sata_port port[CONFIG_SYS_SATA_MAXBUS];
 #endif
+
+#endif /* __ATA_PIIX_H__ */