diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/dts/fsl-imx8qxp-mek.dts | 1 | ||||
-rw-r--r-- | arch/arm/mach-sunxi/Kconfig | 12 | ||||
-rw-r--r-- | arch/mips/mach-mt7620/cpu.c | 2 | ||||
-rw-r--r-- | board/CZ.NIC/turris_mox/turris_mox.c | 2 | ||||
-rw-r--r-- | board/CZ.NIC/turris_omnia/turris_omnia.c | 2 | ||||
-rw-r--r-- | board/xilinx/microblaze-generic/microblaze-generic.c | 2 | ||||
-rw-r--r-- | board/xilinx/zynq/board.c | 7 | ||||
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 7 | ||||
-rw-r--r-- | drivers/net/fec_mxc.c | 11 | ||||
-rw-r--r-- | drivers/net/fec_mxc.h | 1 | ||||
-rw-r--r-- | drivers/net/phy/phy.c | 3 |
13 files changed, 34 insertions, 19 deletions
@@ -3,7 +3,7 @@ VERSION = 2019 PATCHLEVEL = 04 SUBLEVEL = -EXTRAVERSION = -rc4 +EXTRAVERSION = NAME = # *DOCUMENTATION* diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f42eccef80..4a23e327df 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -857,7 +857,6 @@ config ARCH_SUNXI select DM_ETH select DM_GPIO select DM_KEYBOARD - select DM_MMC if MMC select DM_SERIAL select DM_USB if DISTRO_DEFAULTS select OF_BOARD_SETUP diff --git a/arch/arm/dts/fsl-imx8qxp-mek.dts b/arch/arm/dts/fsl-imx8qxp-mek.dts index 41f7ec1763..4f35fbe31d 100644 --- a/arch/arm/dts/fsl-imx8qxp-mek.dts +++ b/arch/arm/dts/fsl-imx8qxp-mek.dts @@ -224,6 +224,7 @@ status = "okay"; phy-reset-gpios = <&pca9557_a 4 GPIO_ACTIVE_LOW>; phy-reset-duration = <10>; + phy-reset-post-delay = <150>; mdio { #address-cells = <1>; diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 74e234cded..152deb04e9 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -154,6 +154,7 @@ config MACH_SUN4I bool "sun4i (Allwinner A10)" select CPU_V7A select ARM_CORTEX_CPU_IS_UP + select DM_MMC if MMC select DM_SCSI if SCSI select PHY_SUN4I_USB select DRAM_SUN4I @@ -164,6 +165,7 @@ config MACH_SUN5I bool "sun5i (Allwinner A13)" select CPU_V7A select ARM_CORTEX_CPU_IS_UP + select DM_MMC if MMC select DRAM_SUN4I select PHY_SUN4I_USB select SUNXI_GEN_SUN4I @@ -176,6 +178,7 @@ config MACH_SUN6I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DM_MMC if MMC select DRAM_SUN6I select PHY_SUN4I_USB select SUN6I_P2WI @@ -202,6 +205,7 @@ config MACH_SUN8I_A23 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DM_MMC if MMC select DRAM_SUN8I_A23 select PHY_SUN4I_USB select SUNXI_GEN_SUN6I @@ -215,6 +219,7 @@ config MACH_SUN8I_A33 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DM_MMC if MMC select DRAM_SUN8I_A33 select PHY_SUN4I_USB select SUNXI_GEN_SUN6I @@ -225,6 +230,7 @@ config MACH_SUN8I_A33 config MACH_SUN8I_A83T bool "sun8i (Allwinner A83T)" select CPU_V7A + select DM_MMC if MMC select DRAM_SUN8I_A83T select PHY_SUN4I_USB select SUNXI_GEN_SUN6I @@ -240,6 +246,7 @@ config MACH_SUN8I_H3 select ARCH_SUPPORT_PSCI select MACH_SUNXI_H3_H5 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT + select DM_MMC if MMC config MACH_SUN8I_R40 bool "sun8i (Allwinner R40)" @@ -258,6 +265,7 @@ config MACH_SUN8I_V3S select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DM_MMC if MMC select SUNXI_GEN_SUN6I select SUNXI_DRAM_DW select SUNXI_DRAM_DW_16BIT @@ -272,11 +280,13 @@ config MACH_SUN9I select SUNXI_GEN_SUN6I select SUN8I_RSB select SUPPORT_SPL + select DM_MMC if MMC config MACH_SUN50I bool "sun50i (Allwinner A64)" select ARM64 select DM_I2C + select DM_MMC if MMC select PHY_SUN4I_USB select SUN6I_PRCM select SUNXI_DE2 @@ -293,6 +303,7 @@ config MACH_SUN50I_H5 bool "sun50i (Allwinner H5)" select ARM64 select MACH_SUNXI_H3_H5 + select DM_MMC if MMC select FIT select SPL_LOAD_FIT @@ -300,6 +311,7 @@ config MACH_SUN50I_H6 bool "sun50i (Allwinner H6)" select ARM64 select SUPPORT_SPL + select DM_MMC if MMC select FIT select SPL_LOAD_FIT select DRAM_SUN50I_H6 diff --git a/arch/mips/mach-mt7620/cpu.c b/arch/mips/mach-mt7620/cpu.c index 9e0ca716f7..fe74f26a54 100644 --- a/arch/mips/mach-mt7620/cpu.c +++ b/arch/mips/mach-mt7620/cpu.c @@ -70,7 +70,7 @@ int print_cpuinfo(void) } #ifdef CONFIG_WATCHDOG -static struct udevice *watchdog_dev; +static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL; /* Called by macro WATCHDOG_RESET */ void watchdog_reset(void) diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 65d50a92dd..96cb9c7e5c 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -120,7 +120,7 @@ int board_fix_fdt(void *blob) #endif #ifdef CONFIG_WDT_ARMADA_37XX -static struct udevice *watchdog_dev; +static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL; void watchdog_reset(void) { diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 1f7650cb36..c7f6479a0c 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -365,7 +365,7 @@ static bool disable_mcu_watchdog(void) #endif #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_ORION) -static struct udevice *watchdog_dev = NULL; +static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL; #endif int board_init(void) diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index c946ec3208..28c9efa3a2 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT) -static struct udevice *watchdog_dev; +static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL; #endif /* !CONFIG_SPL_BUILD && CONFIG_WDT */ ulong ram_base; diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index b4b84df576..ea26aad16f 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -19,17 +19,12 @@ DECLARE_GLOBAL_DATA_PTR; #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT) -static struct udevice *watchdog_dev; +static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL; #endif #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_BOARD_EARLY_INIT_F) int board_early_init_f(void) { -# if defined(CONFIG_WDT) - /* bss is not cleared at time when watchdog_reset() is called */ - watchdog_dev = NULL; -# endif - return 0; } #endif diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 5e1d2116bc..db27247850 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT) -static struct udevice *watchdog_dev; +static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL; #endif #if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) && \ @@ -322,11 +322,6 @@ int board_early_init_f(void) ret = psu_init(); #endif -#if defined(CONFIG_WDT) && !defined(CONFIG_SPL_BUILD) - /* bss is not cleared at time when watchdog_reset() is called */ - watchdog_dev = NULL; -#endif - return ret; } diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index f991b40b38..84f010d805 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1309,6 +1309,8 @@ static void fec_gpio_reset(struct fec_priv *priv) dm_gpio_set_value(&priv->phy_reset_gpio, 1); mdelay(priv->reset_delay); dm_gpio_set_value(&priv->phy_reset_gpio, 0); + if (priv->reset_post_delay) + mdelay(priv->reset_post_delay); } } #endif @@ -1468,6 +1470,15 @@ static int fecmxc_ofdata_to_platdata(struct udevice *dev) /* property value wrong, use default value */ priv->reset_delay = 1; } + + priv->reset_post_delay = dev_read_u32_default(dev, + "phy-reset-post-delay", + 0); + if (priv->reset_post_delay > 1000) { + printf("FEC MXC: phy reset post delay should be <= 1000ms\n"); + /* property value wrong, use default value */ + priv->reset_post_delay = 0; + } #endif return 0; diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h index e9a661f0a1..e5f2dd75c5 100644 --- a/drivers/net/fec_mxc.h +++ b/drivers/net/fec_mxc.h @@ -258,6 +258,7 @@ struct fec_priv { #ifdef CONFIG_DM_GPIO struct gpio_desc phy_reset_gpio; uint32_t reset_delay; + uint32_t reset_post_delay; #endif #ifdef CONFIG_DM_ETH u32 interface; diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 0c8b29dae4..4e8d2943ee 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -922,13 +922,14 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr, #endif { struct phy_device *phydev = NULL; + uint mask = (addr > 0) ? (1 << addr) : 0xffffffff; #ifdef CONFIG_PHY_FIXED phydev = phy_connect_fixed(bus, dev, interface); #endif if (!phydev) - phydev = phy_find_by_mask(bus, 1 << addr, interface); + phydev = phy_find_by_mask(bus, mask, interface); if (phydev) phy_connect_dev(phydev, dev); |