From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Liu Date: Mon, 31 Mar 2008 16:40:49 +0800 Subject: [U-Boot-Users] [PATCH] Merge code duplication in ata.h and libata.h In-Reply-To: <0JEB3vTG.1206954643.2020790.tor@localhost> References: <0JEB3vTG.1206954643.2020790.tor@localhost> Message-ID: <1206952849.3662.20.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > >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