summaryrefslogtreecommitdiff
path: root/drivers/block/ata_piix.h
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2009-08-23 12:59:51 +1000
committerWolfgang Denk <wd@denx.de>2009-09-04 21:53:37 +0200
commit31b9ab33d93d88ff89f3046aa45c68667a378a56 (patch)
tree8e3305181ce74e078ab3e155c31c4f8ad1bd5842 /drivers/block/ata_piix.h
parentd7549024098af093785151261266a02be19af633 (diff)
downloadu-boot-imx-31b9ab33d93d88ff89f3046aa45c68667a378a56.zip
u-boot-imx-31b9ab33d93d88ff89f3046aa45c68667a378a56.tar.gz
u-boot-imx-31b9ab33d93d88ff89f3046aa45c68667a378a56.tar.bz2
Misc SATA fixups
Cast first parameter to sata_cpy() In /drivers/block/ata_piix.h, ata_id_has_lba48(), ata_id_has_lba(), ata_id_has_dma(), ata_id_u32(), ata_id_u64() are all defined in include/libata.h which is included in ata.h which is included by all files which include ata_piix.h (only ata_piix.c) so these definitions are supurflous to (and conlict with) this in libata.h. Interestingly, my compiler complains about ata_id_u64 already being defined, but not ata_id_u32 ata_dump_id() is defined in include/libata.h and should not be static (maybe should even use ata_dump_id() in libata.c Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'drivers/block/ata_piix.h')
-rw-r--r--drivers/block/ata_piix.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/block/ata_piix.h b/drivers/block/ata_piix.h
index 11885af..9157cf8 100644
--- a/drivers/block/ata_piix.h
+++ b/drivers/block/ata_piix.h
@@ -37,20 +37,7 @@ 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 "