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

2008-03-31 Thread Wolfgang Denk
In message <[EMAIL PROTECTED]> you wrote: > > >I don't think the ATA_SECT_BYTESIZE is better than > >the ATA_SECT_SIZE. Actually it's worse. > The big problem here is that ata.h defines ATA_SECT_SIZE as 256 Words > where libata defines it as 512 Bytes. But "BYTESIZE" reads to me as "size of byt

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

2008-03-31 Thread Dave Liu
> >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 impossib

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

2008-03-31 Thread Tor Krill
On 3/31/2008, "Dave Liu" <[EMAIL PROTECTED]> wrote: >> >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

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

2008-03-31 Thread Dave Liu
> >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

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

2008-03-31 Thread Tor Krill
On 3/31/2008, "Dave Liu" <[EMAIL PROTECTED]> 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 @@ s

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

2008-03-30 Thread Dave Liu
> - 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,

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

2008-03-30 Thread Tor Krill
ata.h and libata.h contains duplicate and conflicting definitions. This patch tries to resolve this and make them both includeable in a sourcefile. Also updated is the fsl_sata driver which uses libata.h Signed-off-by: Tor Krill <[EMAIL PROTECTED]> --- drivers/block/fsl_sata.c | 15 ---