X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fata.h;h=b51475da814e99b0e40f9ecc6d01c4a6ec0fe2c2;hb=868da5936e40b8685c813c1eb31eed629eaae295;hp=968b3c47b4b0f1bb8b051c1c2a18ee6850bc79eb;hpb=fe8c2806cdba70479e351299881a395dc2be7785;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/ata.h b/include/ata.h index 968b3c4..b51475d 100644 --- a/include/ata.h +++ b/include/ata.h @@ -33,14 +33,19 @@ #ifndef _ATA_H #define _ATA_H +#include + /* Register addressing depends on the hardware design; for instance, * 8-bit (register) and 16-bit (data) accesses might use different * address spaces. This is implemented by the following definitions. */ +#ifndef CONFIG_SYS_ATA_STRIDE +#define CONFIG_SYS_ATA_STRIDE 1 +#endif -#define ATA_IO_DATA(x) (CFG_ATA_DATA_OFFSET+(x)) -#define ATA_IO_REG(x) (CFG_ATA_REG_OFFSET +(x)) -#define ATA_IO_ALT(x) (CFG_ATA_ALT_OFFSET +(x)) +#define ATA_IO_DATA(x) (CONFIG_SYS_ATA_DATA_OFFSET+((x) * CONFIG_SYS_ATA_STRIDE)) +#define ATA_IO_REG(x) (CONFIG_SYS_ATA_REG_OFFSET +((x) * CONFIG_SYS_ATA_STRIDE)) +#define ATA_IO_ALT(x) (CONFIG_SYS_ATA_ALT_OFFSET +((x) * CONFIG_SYS_ATA_STRIDE)) /* * I/O Register Descriptions @@ -53,6 +58,8 @@ #define ATA_CYL_HIGH ATA_IO_REG(5) #define ATA_DEV_HD ATA_IO_REG(6) #define ATA_COMMAND ATA_IO_REG(7) +#define ATA_DATA_EVEN ATA_IO_REG(8) +#define ATA_DATA_ODD ATA_IO_REG(9) #define ATA_STATUS ATA_COMMAND #define ATA_DEV_CTL ATA_IO_ALT(6) #define ATA_LBA_LOW ATA_SECT_NUM @@ -101,6 +108,10 @@ #define ATA_CMD_SETF 0xEF /* Set Features */ #define ATA_CMD_CHK_PWR 0xE5 /* Check Power Mode */ +#define ATA_CMD_READ_EXT 0x24 /* Read Sectors (with retries) with 48bit addressing */ +#define ATA_CMD_WRITE_EXT 0x34 /* Write Sectores (with retries) with 48bit addressing */ +#define ATA_CMD_VRFY_EXT 0x42 /* Read Verify (with retries) with 48bit addressing */ + /* * ATAPI Commands */ @@ -187,7 +198,7 @@ typedef struct hd_driveid { unsigned short major_rev_num; /* */ unsigned short minor_rev_num; /* */ unsigned short command_set_1; /* bits 0:Smart 1:Security 2:Removable 3:PM */ - unsigned short command_set_2; /* bits 14:Smart Enabled 13:0 zero */ + unsigned short command_set_2; /* bits 14:Smart Enabled 13:0 zero 10:lba48 support*/ unsigned short cfsse; /* command set-feature supported extensions */ unsigned short cfs_enable_1; /* command set-feature enabled */ unsigned short cfs_enable_2; /* command set-feature enabled */ @@ -198,7 +209,10 @@ typedef struct hd_driveid { unsigned short CurAPMvalues; /* current APM values */ unsigned short word92; /* reserved (word 92) */ unsigned short hw_config; /* hardware config */ - unsigned short words94_125[32];/* reserved words 94-125 */ + unsigned short words94_99[6];/* reserved words 94-99 */ + /*unsigned long long lba48_capacity; /--* 4 16bit values containing lba 48 total number of sectors */ + unsigned short lba48_capacity[4]; /* 4 16bit values containing lba 48 total number of sectors */ + unsigned short words104_125[22];/* reserved words 104-125 */ unsigned short last_lun; /* reserved (word 126) */ unsigned short word127; /* reserved (word 127) */ unsigned short dlf; /* device lock function @@ -222,7 +236,9 @@ typedef struct hd_driveid { unsigned short words130_155[26];/* reserved vendor words 130-155 */ unsigned short word156; unsigned short words157_159[3];/* reserved vendor words 157-159 */ - unsigned short words160_255[95];/* reserved words 160-255 */ + unsigned short words160_162[3];/* reserved words 160-162 */ + unsigned short cf_advanced_caps; + unsigned short words164_255[92];/* reserved words 164-255 */ } hd_driveid_t;