From: Uri Mashiach Date: Wed, 14 Feb 2018 17:26:49 +0200 Subject: [U-Boot] [RFC] usb: host: xhci-omap: Remove redundant board_usb_init and board_usb_cleanup functions In-Reply-To: <68974ce3-9a52-b505-8bbc-1d35ba572ab4@denx.de> References: <1518603031-416-1-git-send-email-faiz_abbas@ti.com> <08c709f1-e10b-56c7-c427-55a5a89c5ea1@denx.de> <1efa7468-90c0-fe41-3bc6-85175c85a43f@ti.com> <79cdcd8e-628b-ce76-6c3d-dc23c8f17a03@ti.com> <68974ce3-9a52-b505-8bbc-1d35ba572ab4@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, Sorry for the late response. On 02/14/2018 04:19 PM, Marek Vasut wrote: > On 02/14/2018 03:14 PM, Faiz Abbas wrote: >> Hi, >> >> On Wednesday 14 February 2018 06:53 PM, Marek Vasut wrote: >>> On 02/14/2018 12:20 PM, Faiz Abbas wrote: >>>> Hi, >>>> >>>> On Wednesday 14 February 2018 03:46 PM, Marek Vasut wrote: >>>>> On 02/14/2018 11:10 AM, Faiz Abbas wrote: >>>>>> board_usb_init()/_cleanup() should be in board files and don't have >>>>>> a place in the xhci-omap driver. Weak versions for >>>>>> board_usb_init()/_cleanup() already exist in common/usb.c >>>>>> (for host mode) and drivers/usb/gadget/g_dnl.c (for gadget mode). >>>>>> >>>>>> Signed-off-by: Faiz Abbas >>>>> >>>>> Reviewed-by: Marek Vasut >>>>> >>>>> I'd like some TBs from the people using those boards. >>>> >>>> I have tested this for dra7xx, am43xx and am57xx. >>> >>> So why is it marked RFC ? >>> >> >> Because I was unclear why Uri Mashiach did not do this in 1a9a5f7 ("fix >> double weak board_usb_init functions"). > > OK, submit it as a normal patch with my RB. > As mentioned in 1a9a5f7, the functions omap_xhci_board_usb_init() and omap_xhci_board_usb_cleanup() are called for the boards with the CONFIG_USB_XHCI_OMAP definition. The weak implementation of the functions omap_xhci_board_usb_init() executed enable_usb_clocks(). The weak implementation of the function omap_xhci_board_usb_cleanup() executed the function disable_usb_clocks(). For the boards compulab/cl-som-am57x and compulab/cm_t43: * CONFIG_USB_XHCI_OMAP is defined * omap_xhci_board_usb_init is not implemented, relying on the weak implementation. * omap_xhci_board_usb_cleanup is not defined, relying on the weak implementation. The fix is missing the implementation of board_usb_init and board_usb_cleanup in the compulab/cl-som-am57x and compulab/cm_t43. The implementation should include the content of the deleted weak functions omap_xhci_board_usb_init() and omap_xhci_board_usb_cleanup(). -- Thanks, Uri