From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Quadros Date: Tue, 28 Feb 2017 15:13:25 +0200 Subject: [U-Boot] [PATCH v4 3/7] usb: host: xhci-omap: fix double weak board_usb_init functions In-Reply-To: <5e033114-02af-2e4b-5ff4-480aaf932d2a@compulab.co.il> References: <1487857181-8938-1-git-send-email-uri.mashiach@compulab.co.il> <1487857181-8938-4-git-send-email-uri.mashiach@compulab.co.il> <4f505077-e0e6-8ab8-cd88-9200284d2a74@ti.com> <5e033114-02af-2e4b-5ff4-480aaf932d2a@compulab.co.il> Message-ID: <40984a1d-bd4e-75a8-d3f4-908ef43aa1eb@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 28/02/17 10:00, Uri Mashiach wrote: > Hi, > > On 02/27/2017 06:22 PM, Roger Quadros wrote: >> Hi, >> >> On 23/02/17 15:39, Uri Mashiach wrote: >>> A weak version of the function board_usb_init is implemented in: >>> common/usb.c >>> drivers/usb/host/xhci-omap.c >>> >>> To fix the double implementations: >>> * Convert the board_usb_init function in drivers/usb/host/xhci-omap.c >>> normal (not weak). >>> * The function board_usb_init in drivers/usb/host/xhci-omap.c calls to >>> the weak function omap_xhci_board_usb_init. >>> * Rename board version of the function board_usb_init to >>> omap_xhci_board_usb_init. >>> Done only for boards that defines CONFIG_USB_XHCI_OMAP. >>> >>> To achieve the same flexibility with the function board_usb_cleanup: >>> * Add a normal (not weak) implementation of the function >>> board_usb_cleanup in drivers/usb/host/xhci-omap.c >>> * The function board_usb_cleanup in drivers/usb/host/xhci-omap.c calls >>> to the weak function omap_xhci_board_usb_cleanup. >>> * Rename board version of the function board_usb_cleanup to >>> omap_xhci_board_usb_cleanup. >>> Done only for boards that defines CONFIG_USB_XHCI_OMAP. >>> >>> Cc: Lokesh Vutla >>> Signed-off-by: Uri Mashiach >>> Acked-by: Marek Vasut >>> Reviewed-by: Tom Rini >>> --- >>> V1 -> V2: Use __weak instead of attribute block >>> V2 -> V4: none >>> >>> board/compulab/cl-som-am57x/cl-som-am57x.c | 2 +- >>> board/ti/am43xx/board.c | 4 ++-- >>> board/ti/am57xx/board.c | 4 ++-- >>> board/ti/dra7xx/evm.c | 4 ++-- >>> drivers/usb/host/xhci-omap.c | 17 +++++++++++++++-- >> >> What about board/ti/omap5_uevm/evm.c ? > > The symbol CONFIG_USB_XHCI_OMAP is not included in the file include/configs/omap5_uevm.h, therefore: > The file drivers/usb/host/xhci-omap.c is not included in the compilation - no double implementations to fix. > But if someone wants to use the XHCI host he will enable the CONFIG_USB_XHCI_OMAP for omap5_uevm right? We need to ensure it doesn't break then. -- cheers, -roger