From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Burton Date: Fri, 29 Jan 2016 15:58:40 +0000 Subject: [U-Boot] [PATCH 1/9] ioport.h: Remove struct resource & co In-Reply-To: <201601291506.33737.marex@denx.de> References: <1454075695-31981-1-git-send-email-paul.burton@imgtec.com> <1454075695-31981-2-git-send-email-paul.burton@imgtec.com> <201601291506.33737.marex@denx.de> Message-ID: <20160129155840.GA3017@NP-P-BURTON> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > --- > > > > 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