[U-Boot-Users] [PATCH] Merge code duplication in ata.h and libata.h

Dave Liu r63238 at freescale.com
Mon Mar 31 10:40:49 CEST 2008


> >When I grep 'ATA_SECT_SIZE', I can *not* find any files including the
> >ATA_SECT_SIZE before the fsl_sata.c.
> 
> Well, the ata_piix driver for one uses it, but only includes ata.h. But
> that is the only one in the tree right now.
> 
> >> But the problem still remains, it is currently impossible to use both
> >> libata.h and ata.h.
> >
> >Why need use both them?
> >I believe the libata.h is enough.
> 
> Since my driver for the sil3114 uses "legacy mode" it uses a lot of the
> ata commands directly in PIO mode. These are defined in ata.h (Both in
> u-boot and Linux)

I believe the linux kernel happen at legacy mode same as you, but kernel
can handle the legacy mode, why you can not hanlde the legacy mode in u-
boot with same header file.

If you're using the I/O register descriptions and status register bits
in ata.h of u-boot. the kernel header have the same register/bit
definition. just like

ATA_REG_DATA
ATA_REG_ERR
...

ATA_BUSY
ATA_DRDY
...
ATA_ERR
ATA_SRST






More information about the U-Boot mailing list