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

Tor Krill tor at excito.com
Mon Mar 31 10:20:52 CEST 2008




On 3/31/2008, "Dave Liu" <r63238 at freescale.com> wrote:

>
>> -       fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, buffer,
>> ATA_SECT_SIZE * blkcnt);
>> +       fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, buffer,
>> ATA_SECT_BYTESIZE * blkcnt);
>>         return blkcnt;
>>  }
>>
>> @@ -658,7 +659,7 @@ static u32 fsl_sata_rw_cmd_ext(int dev, u32 start,
>> u32 blkcnt, u8 *buffer, int i
>>         cfis->sector_count_exp = (blkcnt >> 8) & 0xff;
>>         cfis->sector_count = blkcnt & 0xff;
>>
>> -       fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, buffer,
>> ATA_SECT_SIZE * blkcnt);
>> +       fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, buffer,
>> ATA_SECT_BYTESIZE * blkcnt);
>>         return blkcnt;
>
>
>Nack.
>
>Don't do this.
>
>I don't think the ATA_SECT_BYTESIZE is better than
>the ATA_SECT_SIZE.

The big problem here is that ata.h defines ATA_SECT_SIZE as 256 Words
where libata defines it as 512 Bytes.

I did not want to change the old define since it would possibly break
more than the fsl driver.

If its ok to change the definition to 512 Bytes and only change the
ata_piix driver ignoring other possible uses of it i could resubmit the
patch.

But the problem still remains, it is currently impossible to use both
libata.h and ata.h.

/Tor





More information about the U-Boot mailing list