On 8/16/07, Jeff Garzik <jeff@xxxxxxxxxx> wrote:Mike Frysinger wrote:On 8/16/07, Jeff Garzik <jeff@xxxxxxxxxx> wrote:Look up (into the message you quoted).Sonic Zhang wrote:there are no address pointers anymore, so there is nothing to cast ...+static void bfin_set_piomode(struct ata_port *ap, struct ata_device *adev)(added Bryan Wu to CC)
+{
+ int mode = adev->pio_mode - XFER_PIO_0;
+ unsigned long base = (unsigned long)ap->ioaddr.ctl_addr;
Someone needs to need fix the bfin architecture: the addresses on the
bfin_read/bfin_write functions should be 'void __iomem *' not unsigned long.
the bfin_read/bfin_write macros are done in sexy asm:
#define bfin_write8(addr,val) __asm__ __volatile__("b[%0] = %1;" ::
"a"(addr), "d"(val))
or i'm misunderstanding what you mean ...
where do you see (unsigned long) ?
yes, you quoted the driver, not the Blackfin core parts
Regardless of the implementation, the C type system should be employed
to ensure that 'addr' is known to the compiler as 'void __iomem *'
rather than unsigned long.
i agree the specific pata driver should be declared the way you
described, however i dont see how that has bearing on the
bfin_read/bfin_write macros as you seemed to indicate