]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb: ehci-vf: Add weak function for board specific initialisation
authorSanchayan Maity <maitysanchayan@gmail.com>
Mon, 1 Jun 2015 13:07:24 +0000 (18:37 +0530)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 22:42:23 +0000 (00:42 +0200)
Add a weak function board_ehci_hcd_init which can be used by the board
file for board specific initialisation.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
drivers/usb/host/ehci-vf.c

index 54548554df37fd75da0443aae3b8221987252077..98e0fc6ca66ce62cc48335a0d9e9107794c486ff 100644 (file)
@@ -121,6 +121,11 @@ static void usb_oc_config(int index)
        setbits_le32(ctrl, UCTRL_OVER_CUR_DIS);
 }
 
+int __weak board_ehci_hcd_init(int port)
+{
+       return 0;
+}
+
 int ehci_hcd_init(int index, enum usb_init_type init,
                struct ehci_hccr **hccr, struct ehci_hcor **hcor)
 {
@@ -136,6 +141,9 @@ int ehci_hcd_init(int index, enum usb_init_type init,
 
        ehci = (struct usb_ehci *)nc_reg_bases[index];
 
+       /* Do board specific initialisation */
+       board_ehci_hcd_init(index);
+
        usb_power_config(index);
        usb_oc_config(index);
        usb_internal_phy_clock_gate(index);