5 unsigned long cmd_addr;
6 unsigned long data_addr;
7 unsigned long error_addr;
8 unsigned long feature_addr;
9 unsigned long nsect_addr;
10 unsigned long lbal_addr;
11 unsigned long lbam_addr;
12 unsigned long lbah_addr;
13 unsigned long device_addr;
14 unsigned long status_addr;
15 unsigned long command_addr;
16 unsigned long altstatus_addr;
17 unsigned long ctl_addr;
18 unsigned long bmdma_addr;
19 unsigned long scr_addr;
23 unsigned char port_no; /* primary=0, secondary=1 */
24 struct sata_ioports ioaddr; /* ATA cmd/ctl/dma reg blks */
25 unsigned char ctl_reg;
26 unsigned char last_ctl;
27 unsigned char port_state; /* 1-port is available and */
28 /* 0-port is not available */
29 unsigned char dev_mask;
32 /***********SATA LIBRARY SPECIFIC DEFINITIONS AND DECLARATIONS**************/
33 #ifdef SATA_DECL /* SATA library specific declarations */
34 inline void ata_dump_id(u16 *id)
40 "75 = 0x%04x\n", id[49], id[53], id[63], id[64], id[75]);
45 "84 = 0x%04x\n", id[80], id[81], id[82], id[83], id[84]);
46 debug("88 = 0x%04x " "93 = 0x%04x\n", id[88], id[93]);
50 #ifdef SATA_DECL /*SATA library specific declarations */
51 int sata_bus_softreset(int num);
52 void sata_identify(int num, int dev);
53 void sata_port(struct sata_ioports *ioport);
54 void set_Feature_cmd(int num, int dev);
55 int sata_devchk(struct sata_ioports *ioaddr, int dev);
56 void dev_select(struct sata_ioports *ioaddr, int dev);
57 u8 sata_busy_wait(struct sata_ioports *ioaddr, int bits, unsigned int max);
58 u8 sata_chk_status(struct sata_ioports *ioaddr);
61 /************DRIVER SPECIFIC DEFINITIONS AND DECLARATIONS**************/
63 #ifdef DRV_DECL /* Driver specific declaration */
64 int init_sata(int dev);
67 #ifdef DRV_DECL /* Defines Driver Specific variables */
68 struct sata_port port[CONFIG_SYS_SATA_MAXBUS];
71 #endif /* __ATA_PIIX_H__ */