
On Fri, Jan 29, 2016 at 03:06:33PM +0100, Marek Vasut wrote:
On Friday, January 29, 2016 at 02:54:47 PM, Paul Burton wrote:
We only use struct resource in a single place (drivers/usb/dwc3/core.h) for a field (xhci_resources) which is never used. Only ARM currently defines resource_size_t which means linux/ioport.h only compiles there. In preparation for making use of the IORESOURCE_ flags, remove struct resource & the various declarations of functions which we don't implement.
Signed-off-by: Paul Burton paul.burton@imgtec.com
drivers/usb/dwc3/core.h | 1 - include/linux/ioport.h | 104 ------------------------------------------------ 2 files changed, 105 deletions(-)
I believe the driver is imported from Linux kernel, so it'd be much better to sync the driver with mainline Linux instead of starting to diverge.
Best regards, Marek Vasut
Hi Marek,
The problem is that the driver can't use struct resource because U-Boot has none of the infrastructure around it. The driver model doesn't use struct resource, there's basically nothing in U-Boot to fill out the struct. So unless that changes this dwc3 driver will always have to handle resources differently to on Linux.
I therefore don't see any good reason to keep around an unused struct which will only currently compile for one architecture, for a driver which can't use it in U-Boot anyway.
The alternative to this patch would be to define resource_size_t for other architectures, but then we're just left with dead code.
Thanks, Paul