Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1409803

RE: [PATCH v4] Axi-usb: Add support for 64-bit addressing.

From Nava kishore Manne <nava.manne@xilinx.com>
Newsgroups linux.kernel
Subject RE: [PATCH v4] Axi-usb: Add support for 64-bit addressing.
Date 2016-05-31 07:40 +0200
Message-ID <rEKzf-6GC-1@gated-at.bofh.it> (permalink)
References <rEyy6-6IE-21@gated-at.bofh.it> <rEHBn-4Ct-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Shubhrajyoti,

	
	Thanks for the review...

> >  /**
> > + * xudc_write64 - write 64bit value to device registers
> > + * @ep: pointer to the usb device endpoint structure.
> > + * @offset: register offset
> > + * @val: data to be written
> > + **/
> > +static void xudc_write64(struct xusb_ep *ep, u32 offset, u64 val) {
> > +       struct xusb_udc *udc = ep->udc;
> > +
> > +       udc->write_fn(udc->addr, offset, lower_32_bits(val));
> > +       udc->write_fn(udc->addr, offset+0x04, upper_32_bits(val));
> 
> can we move this to a single 64 bit write?

Initially I sent the patches with writeq() ,lo_hi_writeq()  later we decided to replace with write_fun().
The reason for this is lo_hi_writeq() always assumes a little-endian register, so it's broken if anyone builds this device with big-endian registers.
So replaced the 64bit calls with write_fun() as suggested by Arnd Bergmann. Hope it clears your query.
Please refer to the below thread

	http://lkml.iu.edu/hypermail/linux/kernel/1604.2/02046.html 


Regards,
Navakishore.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4] Axi-usb: Add support for 64-bit addressing. Nava kishore Manne <nava.manne@xilinx.com> - 2016-05-30 18:50 +0200
  Re: [PATCH v4] Axi-usb: Add support for 64-bit addressing. Shubhrajyoti Datta <shubhrajyoti.datta@gmail.com> - 2016-05-31 04:30 +0200
    RE: [PATCH v4] Axi-usb: Add support for 64-bit addressing. Nava kishore Manne <nava.manne@xilinx.com> - 2016-05-31 07:40 +0200
      Re: [PATCH v4] Axi-usb: Add support for 64-bit addressing. Shubhrajyoti Datta <shubhrajyoti.datta@gmail.com> - 2016-06-03 17:20 +0200
  Re: [PATCH v4] Axi-usb: Add support for 64-bit addressing. Rob Herring <robh@kernel.org> - 2016-06-03 01:00 +0200

csiph-web