summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2017-05-09 00:43:05 -0500
committerYe Li <ye.li@nxp.com>2017-05-09 03:22:11 -0500
commit32d4060f845d189308d3431a7df4931ab4bd8f01 (patch)
treec908a415b9fe96796a74f3900ffdd5bf8bd1a8e0 /board
parent6b0d709df65a3aa1438cd6081569012030f81b88 (diff)
downloadu-boot-imx-32d4060f845d189308d3431a7df4931ab4bd8f01.zip
u-boot-imx-32d4060f845d189308d3431a7df4931ab4bd8f01.tar.gz
u-boot-imx-32d4060f845d189308d3431a7df4931ab4bd8f01.tar.bz2
MLK-14845 mx6/mx7: Not call usb setup functions used by non-DM driver
Use CONFIG_DM_USB to comment out USB setup functions used by non-DM driver. So they won't be executed when using DM driver. These USB setup functions may setup power control pins to USB_PWR function not GPIO, which is different as the GPIO function used by USB vbus-supply. And cause the power control not work. Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/mx6dqscm/mx6dqscm.c14
-rw-r--r--board/freescale/mx6qarm2/mx6qarm2.c10
-rw-r--r--board/freescale/mx6qsabreauto/mx6qsabreauto.c11
-rw-r--r--board/freescale/mx6sabresd/mx6sabresd.c11
-rw-r--r--board/freescale/mx6slevk/mx6slevk.c5
-rw-r--r--board/freescale/mx6sll_arm2/mx6sll_arm2.c3
-rw-r--r--board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c5
-rw-r--r--board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c5
-rw-r--r--board/freescale/mx6sxsabreauto/mx6sxsabreauto.c5
-rw-r--r--board/freescale/mx6sxsabresd/mx6sxsabresd.c5
-rw-r--r--board/freescale/mx6sxscm/mx6sxscm.c5
-rw-r--r--board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c3
-rw-r--r--board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c5
-rw-r--r--board/freescale/mx6ul_14x14_lpddr2_arm2/mx6ul_14x14_lpddr2_arm2.c3
-rw-r--r--board/freescale/mx6ull_ddr3_arm2/mx6ull_ddr3_arm2.c3
-rw-r--r--board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c4
-rw-r--r--board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c5
17 files changed, 101 insertions, 1 deletions
diff --git a/board/freescale/mx6dqscm/mx6dqscm.c b/board/freescale/mx6dqscm/mx6dqscm.c
index ffae922..55b8203 100644
--- a/board/freescale/mx6dqscm/mx6dqscm.c
+++ b/board/freescale/mx6dqscm/mx6dqscm.c
@@ -627,6 +627,7 @@ int board_eth_init(bd_t *bis)
}
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -708,6 +709,7 @@ int board_ehci_power(int port, int on)
return 0;
}
#endif
+#endif
int board_early_init_f(void)
{
@@ -733,7 +735,19 @@ int board_init(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
+#else
+ /*
+ * set daisy chain for otg_pin_id on 6q.
+ * for 6dl, this bit is reserved
+ */
+ #ifdef CONFIG_SCMEVB
+ imx_iomux_set_gpr_register(1, 13, 1, 0);
+ #else
+ imx_iomux_set_gpr_register(1, 13, 1, 1);
+ #endif
+#endif
#endif
#ifdef CONFIG_PCIE_IMX
diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
index 618501a..fe5afae 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -239,6 +239,7 @@ int board_eth_init(bd_t *bis)
}
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -274,6 +275,7 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
int board_early_init_f(void)
{
@@ -288,7 +290,15 @@ int board_init(void)
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
+#else
+ /*
+ * set daisy chain for otg_pin_id on 6q.
+ * for 6dl, this bit is reserved
+ */
+ imx_iomux_set_gpr_register(1, 13, 1, 1);
+#endif
#endif
return 0;
diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index 83d86b0..3565780 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -718,7 +718,7 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
#endif
#ifdef CONFIG_USB_EHCI_MX6
-
+#ifndef CONFIG_DM_USB
iomux_v3_cfg_t const usb_otg_pads[] = {
MX6_PAD_ENET_RX_ER__USB_OTG_ID | MUX_PAD_CTRL(OTG_ID_PAD_CTRL),
};
@@ -798,6 +798,7 @@ int board_ehci_power(int port, int on)
return 0;
}
#endif
+#endif
int board_early_init_f(void)
{
@@ -858,7 +859,15 @@ int board_init(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
+#else
+ /*
+ * Set daisy chain for otg_pin_id on 6q.
+ * For 6dl, this bit is reserved.
+ */
+ imx_iomux_set_gpr_register(1, 13, 1, 0);
+#endif
#endif
return 0;
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 9f11f36..b655347 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -827,6 +827,8 @@ int board_eth_init(bd_t *bis)
}
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -889,6 +891,7 @@ int board_ehci_power(int port, int on)
return 0;
}
#endif
+#endif
int board_early_init_f(void)
{
@@ -914,7 +917,15 @@ int board_init(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
+#else
+ /*
+ * set daisy chain for otg_pin_id on 6q.
+ * for 6dl, this bit is reserved
+ */
+ imx_iomux_set_gpr_register(1, 13, 1, 0);
+#endif
#endif
#ifdef CONFIG_PCIE_IMX
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index f5b6646..f60df7f 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -573,6 +573,8 @@ static int setup_fec(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -614,6 +616,7 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
int board_early_init_f(void)
{
@@ -825,8 +828,10 @@ int board_init(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
#endif
+#endif
return 0;
}
diff --git a/board/freescale/mx6sll_arm2/mx6sll_arm2.c b/board/freescale/mx6sll_arm2/mx6sll_arm2.c
index 46f16b7..bde8962 100644
--- a/board/freescale/mx6sll_arm2/mx6sll_arm2.c
+++ b/board/freescale/mx6sll_arm2/mx6sll_arm2.c
@@ -669,6 +669,8 @@ void epdc_power_off(void)
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
iomux_v3_cfg_t const usb_otg1_pads[] = {
@@ -718,6 +720,7 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
int board_early_init_f(void)
{
diff --git a/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c b/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c
index 50a1949..f863e5d 100644
--- a/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c
+++ b/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c
@@ -732,6 +732,8 @@ int board_early_init_f(void)
}
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -768,6 +770,7 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
int board_init(void)
{
@@ -800,8 +803,10 @@ int board_init(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
#endif
+#endif
return 0;
}
diff --git a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c
index 666bcf0..0404996 100644
--- a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c
+++ b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c
@@ -739,6 +739,8 @@ int board_early_init_f(void)
}
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -778,6 +780,7 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
int board_init(void)
{
@@ -806,8 +809,10 @@ int board_init(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
#endif
+#endif
#ifdef CONFIG_FSL_QSPI
board_qspi_init();
diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
index 09cdd12..648dbf0 100644
--- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
+++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
@@ -217,6 +217,8 @@ void ldo_mode_set(int ldo_bypass)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -258,6 +260,7 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
int board_early_init_f(void)
{
@@ -499,8 +502,10 @@ int board_init(void)
dm_gpio_set_value(&desc, 0);
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
#endif
+#endif
#ifdef CONFIG_FSL_QSPI
board_qspi_init();
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 70e8be4..9563acf 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -486,6 +486,8 @@ void ldo_mode_set(int ldo_bypass)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -527,6 +529,7 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
int board_phy_config(struct phy_device *phydev)
{
@@ -930,8 +933,10 @@ int board_init(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
#endif
+#endif
#ifdef CONFIG_FSL_QSPI
board_qspi_init();
diff --git a/board/freescale/mx6sxscm/mx6sxscm.c b/board/freescale/mx6sxscm/mx6sxscm.c
index c216a6f..a5a559b 100644
--- a/board/freescale/mx6sxscm/mx6sxscm.c
+++ b/board/freescale/mx6sxscm/mx6sxscm.c
@@ -527,6 +527,8 @@ void ldo_mode_set(int ldo_bypass)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -568,6 +570,7 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
int board_phy_config(struct phy_device *phydev)
{
@@ -911,8 +914,10 @@ int board_init(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
#endif
+#endif
#ifdef CONFIG_FSL_QSPI
board_qspi_init();
diff --git a/board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c b/board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c
index ab98321..645e8d1 100644
--- a/board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c
+++ b/board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c
@@ -1010,6 +1010,8 @@ int checkboard(void)
}
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
iomux_v3_cfg_t const usb_otg1_pads[] = {
@@ -1063,3 +1065,4 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index 2aea9d0..8b707b6 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -586,6 +586,8 @@ int board_mmc_init(bd_t *bis)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -624,6 +626,7 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
#ifdef CONFIG_NAND_MXS
static iomux_v3_cfg_t const nand_pads[] = {
@@ -864,8 +867,10 @@ int board_init(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
setup_usb();
#endif
+#endif
#ifdef CONFIG_FSL_QSPI
board_qspi_init();
diff --git a/board/freescale/mx6ul_14x14_lpddr2_arm2/mx6ul_14x14_lpddr2_arm2.c b/board/freescale/mx6ul_14x14_lpddr2_arm2/mx6ul_14x14_lpddr2_arm2.c
index 62cb25d..ee6d725 100644
--- a/board/freescale/mx6ul_14x14_lpddr2_arm2/mx6ul_14x14_lpddr2_arm2.c
+++ b/board/freescale/mx6ul_14x14_lpddr2_arm2/mx6ul_14x14_lpddr2_arm2.c
@@ -947,6 +947,8 @@ int checkboard(void)
}
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
iomux_v3_cfg_t const usb_otg1_pads[] = {
@@ -1000,3 +1002,4 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
diff --git a/board/freescale/mx6ull_ddr3_arm2/mx6ull_ddr3_arm2.c b/board/freescale/mx6ull_ddr3_arm2/mx6ull_ddr3_arm2.c
index 8e9630e..3ba85ec 100644
--- a/board/freescale/mx6ull_ddr3_arm2/mx6ull_ddr3_arm2.c
+++ b/board/freescale/mx6ull_ddr3_arm2/mx6ull_ddr3_arm2.c
@@ -1137,6 +1137,8 @@ int checkboard(void)
}
#ifdef CONFIG_USB_EHCI_MX6
+#ifndef CONFIG_DM_USB
+
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
iomux_v3_cfg_t const usb_otg1_pads[] = {
@@ -1190,3 +1192,4 @@ int board_ehci_hcd_init(int port)
return 0;
}
#endif
+#endif
diff --git a/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c b/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c
index b3d4621..50b566c 100644
--- a/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c
+++ b/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c
@@ -456,6 +456,7 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
#endif
#ifdef CONFIG_USB_EHCI_MX7
+#ifndef CONFIG_DM_USB
iomux_v3_cfg_t const usb_otg1_pads[] = {
MX7D_PAD_GPIO1_IO05__USB_OTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
};
@@ -470,6 +471,7 @@ static void setup_usb(void)
imx_iomux_v3_setup_multiple_pads(usb_otg2_pads, ARRAY_SIZE(usb_otg2_pads));
}
#endif
+#endif
int board_early_init_f(void)
{
@@ -481,8 +483,10 @@ int board_early_init_f(void)
#endif
#ifdef CONFIG_USB_EHCI_MX7
+#ifndef CONFIG_DM_USB
setup_usb();
#endif
+#endif
return 0;
}
diff --git a/board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c b/board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c
index eee112a..b6c2b39 100644
--- a/board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c
+++ b/board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c
@@ -442,6 +442,8 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
#endif
#ifdef CONFIG_USB_EHCI_MX7
+#ifndef CONFIG_DM_USB
+
iomux_v3_cfg_t const usb_otg1_pads[] = {
MX7D_PAD_GPIO1_IO05__USB_OTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
};
@@ -456,6 +458,7 @@ static void setup_usb(void)
imx_iomux_v3_setup_multiple_pads(usb_otg2_pads, ARRAY_SIZE(usb_otg2_pads));
}
#endif
+#endif
int board_early_init_f(void)
{
@@ -467,8 +470,10 @@ int board_early_init_f(void)
#endif
#ifdef CONFIG_USB_EHCI_MX7
+#ifndef CONFIG_DM_USB
setup_usb();
#endif
+#endif
return 0;
}