RE: [PATCH] usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Arnd again,

> From: Yoshihiro Shimoda
> Sent: Wednesday, December 16, 2015 10:43 AM
< snip >
> > > +static void usb3_write(struct renesas_usb3 *usb3, u32 data, u32 offs)
> > > +{
> > > +	iowrite32(data, usb3->reg + offs);
> > > +}
> > > +
> > > +static u32 usb3_read(struct renesas_usb3 *usb3, u32 offs)
> > > +{
> > > +	return ioread32(usb3->reg + offs);
> > > +}
> >
> > I think using readl() is more common than ioread32() if the driver cannot
> > use IORESOURCE_IO but only IORESOURCE_MEM.
> >
> > On ARM, the two are the same, but on some architectures ioread32 is more
> > expensive, so using the former is preferred.
> 
> I will use {read,write}l() instead of io{read,write}32().
> Also I will change io{read,write}32_rep() functions too.

Oops. If I used {read,write}sl() instead of io{read,write}32_rep(),
build error happened in x86 environment.

  CC [M]  drivers/usb/gadget/udc/renesas_usb3.o
./drivers/usb/gadget/udc/renesas_usb3.c: In function 'usb3_write_pipe':
./drivers/usb/gadget/udc/renesas_usb3.c:879:3: error: implicit declaration of function 'writesl' [-Werror=implicit-function-declaration]
   writesl(usb3->reg + fifo_reg, buf, len / 4);
   ^
./drivers/usb/gadget/udc/renesas_usb3.c: In function 'usb3_read_pipe':
./drivers/usb/gadget/udc/renesas_usb3.c:923:3: error: implicit declaration of function 'readsl' [-Werror=implicit-function-declaration]
   readsl(usb3->reg + fifo_reg, buf, len / 4);

So, I will keep to use io{read,write}32(_rep) functions.

Best regards,
Yoshihiro Shimoda

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux