board: karo: make vbus-supply property name depend on board type
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 30 Jun 2014 13:22:41 +0000 (15:22 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 30 Jun 2014 13:22:41 +0000 (15:22 +0200)
board/karo/common/fdt.c
board/karo/common/karo.h
board/karo/tx28/tx28.c
board/karo/tx48/tx48.c
board/karo/tx51/tx51.c
board/karo/tx53/tx53.c
board/karo/tx6/tx6-1020.c
board/karo/tx6/tx6qdl.c

index 3e2477b..0e90398 100644 (file)
@@ -223,7 +223,8 @@ static int karo_fdt_disable_node_phandle(void *blob, const char *parent,
        return fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
 }
 
-void karo_fdt_fixup_usb_otg(void *blob, const char *node, const char *phy)
+void karo_fdt_fixup_usb_otg(void *blob, const char *node, const char *phy,
+                       const char *phy_supply)
 {
        const char *otg_mode = getenv("otg_mode");
        int off;
@@ -262,7 +263,7 @@ void karo_fdt_fixup_usb_otg(void *blob, const char *node, const char *phy)
        if ((!disable_phy_pins && !disable_otg) || ret)
                goto out;
 
-       ret = karo_fdt_disable_node_phandle(blob, node, "vbus-supply");
+       ret = karo_fdt_disable_node_phandle(blob, node, phy_supply);
        if (ret)
                goto out;
 
@@ -275,7 +276,7 @@ void karo_fdt_fixup_usb_otg(void *blob, const char *node, const char *phy)
                ret = karo_fdt_disable_node_phandle(blob, node, phy);
        } else if (disable_phy_pins) {
                debug("Removing 'vbus-supply' from usbotg node\n");
-               fdt_delprop(blob, off, "vbus-supply");
+               fdt_delprop(blob, off, phy_supply);
        }
 
 out:
index 4aee302..fac2ecb 100644 (file)
@@ -27,7 +27,8 @@ void karo_fdt_remove_node(void *blob, const char *node);
 void karo_fdt_move_fdt(void);
 void karo_fdt_fixup_touchpanel(void *blob, const char *panels[],
                        size_t num_panels);
-void karo_fdt_fixup_usb_otg(void *blob, const char *node, const char *phy);
+void karo_fdt_fixup_usb_otg(void *blob, const char *node, const char *phy,
+                       const char *phy_supply);
 void karo_fdt_fixup_flexcan(void *blob, int xcvr_present);
 void karo_fdt_del_prop(void *blob, const char *compat, phys_addr_t offs,
                const char *prop);
@@ -50,7 +51,8 @@ static inline void karo_fdt_fixup_touchpanel(void *blob, const char *panels[],
 {
 }
 static inline void karo_fdt_fixup_usb_otg(void *blob, const char *node,
-                                       const char *phy)
+                                       const char *phy,
+                                       const char *phy_supply)
 {
 }
 static inline void karo_fdt_fixup_flexcan(void *blob, int xcvr_present)
index 8e681eb..5b68dc2 100644 (file)
@@ -993,7 +993,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
        karo_fdt_fixup_touchpanel(blob, tx28_touchpanels,
                                ARRAY_SIZE(tx28_touchpanels));
-       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy");
+       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy", "vbus-supply");
        karo_fdt_fixup_flexcan(blob, stk5_v5);
        karo_fdt_update_fb_mode(blob, video_mode);
 }
index 48cb0c8..d1853b7 100644 (file)
@@ -1101,7 +1101,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
        karo_fdt_fixup_touchpanel(blob, tx48_touchpanels,
                                ARRAY_SIZE(tx48_touchpanels));
-       karo_fdt_fixup_usb_otg(blob, "usb0", "phys");
+       karo_fdt_fixup_usb_otg(blob, "usb0", "phys", "vcc-supply");
        karo_fdt_fixup_flexcan(blob, stk5_v5);
 
        karo_fdt_update_fb_mode(blob, video_mode);
index 7de1406..3117bf9 100644 (file)
@@ -1119,7 +1119,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
        karo_fdt_fixup_touchpanel(blob, tx51_touchpanels,
                                ARRAY_SIZE(tx51_touchpanels));
-       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy");
+       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy", "vbus-supply");
        karo_fdt_update_fb_mode(blob, video_mode);
 }
 #endif /* CONFIG_OF_BOARD_SETUP */
index 8254b08..9ba77eb 100644 (file)
@@ -1369,7 +1369,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
        karo_fdt_fixup_touchpanel(blob, tx53_touchpanels,
                                ARRAY_SIZE(tx53_touchpanels));
-       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy");
+       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy", "vbus-supply");
        karo_fdt_fixup_flexcan(blob, stk5_v5);
        tx53_fixup_rtc(blob);
        karo_fdt_update_fb_mode(blob, video_mode);
index 88712ba..befe226 100644 (file)
@@ -1311,7 +1311,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
        karo_fdt_fixup_touchpanel(blob, tx6_touchpanels,
                                ARRAY_SIZE(tx6_touchpanels));
-       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy");
+       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy", "vbus-supply");
        karo_fdt_fixup_flexcan(blob, stk5_v5);
 
        karo_fdt_update_fb_mode(blob, video_mode);
index af052fa..b3a655c 100644 (file)
@@ -1343,7 +1343,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
        karo_fdt_fixup_touchpanel(blob, tx6_touchpanels,
                                ARRAY_SIZE(tx6_touchpanels));
-       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy");
+       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy", "vbus-supply");
        karo_fdt_fixup_flexcan(blob, stk5_v5);
 
        karo_fdt_update_fb_mode(blob, video_mode);