
On 01/27/2018 08:56 PM, Tom Rini wrote:
On Sat, Jan 27, 2018 at 08:52:43PM +0100, Marek Vasut wrote:
On 01/27/2018 08:48 PM, Tom Rini wrote:
When we have a driver that is used on both 32bit and 64bit targets and we are talking about address space we cannot use u64 nor u32 and instead need to use phys_addr_t.
Can someoneone pass in a pointer above 32bit address range ? That might cause some mess ...
On rockchip, where this gets used as well, it comes down to writel and a warning about "cast from pointer to integer of different size".
My concern is with passing addresses which the core cannot handle to the core, addresses above 32bit address space. But that's probably not an issue here.
btw it seems that the common practice in that driver is to cast it to unsigned long, so I think you should be consistent and do that. Or even better, adjust drivers/usb/gadget/dwc2_udc_otg_priv.h and change dma_buf in struct dwc2_ep to phys_addr_t there, then you can probably drop all the casts all over the dwc2 gadget and host drivers.