U-Boot
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
June 2022
- 183 participants
- 562 discussions
Original ubifs code was designed that after ubifs_umount() call it is
required to also call ubi_close_volume() which closes underlying UBI
volume. But U-Boot ubifs modification have not implemented it properly
which caused that ubifsumount command contains resource leak. It can be
observed by calling simple sequence of commands:
=> ubi part mtd2
ubi0: attaching mtd2
...
=> ubifsmount ubi0
=> ubifsumount
Unmounting UBIFS volume rootfs!
=> ubi detach
ubi0 error: ubi_detach_mtd_dev: ubi0 reference count 1, destroy anyway
ubi0: detaching mtd2
ubi0: mtd2 is detached
Fix this issue by calling ubi_close_volume() and mutex_unlock() in
directly in ubifs_umount() function before freeing U-Boot's global
ubifs_sb. And remove duplicate calls of these two functions in remaining
places. With this change ubifsumount command does not throw that error
anymore.
=> ubi part rootfs
ubi0: attaching mtd2
...
=> ubifsmount ubi0
=> ubifsumount
Unmounting UBIFS volume rootfs!
=> ubi detach
ubi0: detaching mtd2
ubi0: mtd2 is detached
Signed-off-by: Pali Rohár <pali(a)kernel.org>
---
fs/ubifs/super.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index e3a4c0bca270..7677dcc2a140 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1757,6 +1757,8 @@ void ubifs_umount(struct ubifs_info *c)
kfree(c->bottom_up_buf);
ubifs_debugging_exit(c);
#ifdef __UBOOT__
+ ubi_close_volume(c->ubi);
+ mutex_unlock(&c->umount_mutex);
/* Finally free U-Boot's global copy of superblock */
if (ubifs_sb != NULL) {
free(ubifs_sb->s_fs_info);
@@ -2058,9 +2060,9 @@ static void ubifs_put_super(struct super_block *sb)
ubifs_umount(c);
#ifndef __UBOOT__
bdi_destroy(&c->bdi);
-#endif
ubi_close_volume(c->ubi);
mutex_unlock(&c->umount_mutex);
+#endif
}
#endif
@@ -2328,13 +2330,13 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
out_umount:
ubifs_umount(c);
out_unlock:
- mutex_unlock(&c->umount_mutex);
#ifndef __UBOOT__
+ mutex_unlock(&c->umount_mutex);
out_bdi:
bdi_destroy(&c->bdi);
out_close:
-#endif
ubi_close_volume(c->ubi);
+#endif
out:
return err;
}
--
2.20.1
2
2
Hi
This updated version of the patch fixes a problem noticed
by Stefan Roese where the CI build fails for the
dra7xx_hs_evm_usb_defconfig target if this patch is included
Let me know if any other changes are needed.
Thanks and regards
Rogier
2
2
This series will add support for MediaTek MT7621 SoC with two reference boards
and related drivers.
The MediaTek MT7621 is a network processor integrating a dual-core
dual-threaded MIPS 1004Kc processor running at a normal frequency of 880MHz.
This chip can be found in many wireless routers.
This series add all basic drivers which are useful in u-boot, like usb, sdxc,
ethernet, spi, nand and serial.
Building the u-boot requires external binary blob which is described in
doc/board/mediatek/mt7621.rst
Thanks,
Weijie
v6 changes:
- Use FIELD_GET/FIELD_PREP for register fields instead of shift opertations
- Rename fixed clock node name in mt7621.dtsi
- Panic if dram binary blob is wrong in spl
- Remove redundant nop's if noreorder is not used
- Use execution_hazard_barrier() in tpl
v5 changes:
- Adjust mt7621.dtsi, clkctrl node moved to sysc, pinctrl default states moved
to board dts files
- Modify clk driver due to its node changed in mt7621.dtsi
- Minor fixes
v4 changes:
- Add full support for booting from flash
v3 changes:
- Rewrite clk driver to follow definitions from upstream kernel
- Implement noncached_alloc() for MIPS platform
- Update register remap for mtk-eth driver needed by mt7621
v2 changes:
- Add a kconfig for max supported ram size
- Remove network configs from default config file
- Add config file for mt7621-rfb boards
Weijie Gao (25):
mips: add asm/mipsmtregs.h for MIPS multi-threading
mips: add more definitions for asm/cm.h
mips: add __image_copy_len for SPL linker script
mips: add support for noncached_alloc()
mips: mtmips: add support for MediaTek MT7621 SoC
mips: mtmips: add two reference boards for mt7621
doc: mediatek: add documentation for mt7621 reference boards
clk: mtmips: add clock driver for MediaTek MT7621 SoC
reset: mtmips: add reset controller support for MediaTek MT7621 SoC
pinctrl: mtmips: add support for MediaTek MT7621 SoC
usb: xhci-mtk: add support for MediaTek MT7621 SoC
phy: mtk-tphy: add support for MediaTek MT7621 SoC
spi: add support for MediaTek MT7621 SoC
gpio: add support for MediaTek MT7621 SoC
watchdog: add support for MediaTek MT7621 SoC
mmc: mediatek: add support for MediaTek MT7621 SoC
net: mediatek: remap iobase address
net: mediatek: use regmap api to modify ethsys registers
net: mediatek: add support for MediaTek MT7621 SoC
nand: raw: add support for MediaTek MT7621 SoC
spl: allow using nand base without standard nand driver
spl: spl_legacy: fix the use of SPL_COPY_PAYLOAD_ONLY
spl: nand: support loading legacy image with payload compressed
tools: mtk_image: add support for MT7621 NAND images
MAINTAINERS: update maintainer for MediaTek MIPS platform
MAINTAINERS | 8 +
arch/mips/cpu/u-boot-spl.lds | 3 +
arch/mips/dts/Makefile | 2 +
arch/mips/dts/mediatek,mt7621-nand-rfb.dts | 67 +
arch/mips/dts/mediatek,mt7621-rfb.dts | 82 ++
arch/mips/dts/mt7621-u-boot.dtsi | 111 ++
arch/mips/dts/mt7621.dtsi | 349 +++++
arch/mips/include/asm/cm.h | 67 +
arch/mips/include/asm/mipsmtregs.h | 142 ++
arch/mips/include/asm/system.h | 20 +
arch/mips/lib/cache.c | 43 +
arch/mips/mach-mtmips/Kconfig | 49 +-
arch/mips/mach-mtmips/Makefile | 4 +
arch/mips/mach-mtmips/cpu.c | 2 +-
arch/mips/mach-mtmips/mt7621/Kconfig | 115 ++
arch/mips/mach-mtmips/mt7621/Makefile | 14 +
arch/mips/mach-mtmips/mt7621/init.c | 246 ++++
arch/mips/mach-mtmips/mt7621/mt7621.h | 229 ++++
arch/mips/mach-mtmips/mt7621/serial.c | 23 +
arch/mips/mach-mtmips/mt7621/spl/Makefile | 9 +
arch/mips/mach-mtmips/mt7621/spl/cps.c | 153 +++
arch/mips/mach-mtmips/mt7621/spl/dram.c | 153 +++
arch/mips/mach-mtmips/mt7621/spl/dram.h | 39 +
arch/mips/mach-mtmips/mt7621/spl/launch.c | 100 ++
arch/mips/mach-mtmips/mt7621/spl/launch.h | 52 +
arch/mips/mach-mtmips/mt7621/spl/launch_ll.S | 339 +++++
arch/mips/mach-mtmips/mt7621/spl/serial.c | 24 +
arch/mips/mach-mtmips/mt7621/spl/spl.c | 95 ++
arch/mips/mach-mtmips/mt7621/spl/start.S | 226 ++++
arch/mips/mach-mtmips/mt7621/sram_init.S | 22 +
arch/mips/mach-mtmips/mt7621/tpl/Makefile | 4 +
arch/mips/mach-mtmips/mt7621/tpl/start.S | 161 +++
arch/mips/mach-mtmips/mt7621/tpl/tpl.c | 144 ++
board/mediatek/mt7621/MAINTAINERS | 8 +
board/mediatek/mt7621/Makefile | 3 +
board/mediatek/mt7621/board.c | 6 +
common/spl/Kconfig | 2 +-
common/spl/spl_legacy.c | 21 +-
common/spl/spl_nand.c | 27 +
configs/mt7621_nand_rfb_defconfig | 83 ++
configs/mt7621_rfb_defconfig | 82 ++
doc/board/mediatek/mt7621.rst | 48 +
drivers/clk/mtmips/Makefile | 1 +
drivers/clk/mtmips/clk-mt7621.c | 288 ++++
drivers/gpio/Kconfig | 2 +-
drivers/mmc/mtk-sd.c | 13 +
drivers/mtd/nand/raw/Kconfig | 17 +-
drivers/mtd/nand/raw/Makefile | 2 +
drivers/mtd/nand/raw/mt7621_nand.c | 1205 +++++++++++++++++
drivers/mtd/nand/raw/mt7621_nand.h | 29 +
drivers/mtd/nand/raw/mt7621_nand_spl.c | 237 ++++
drivers/net/mtk_eth.c | 45 +-
drivers/phy/Kconfig | 2 +-
drivers/pinctrl/mtmips/Kconfig | 9 +
drivers/pinctrl/mtmips/Makefile | 1 +
drivers/pinctrl/mtmips/pinctrl-mt7621.c | 306 +++++
.../pinctrl/mtmips/pinctrl-mtmips-common.c | 4 +-
.../pinctrl/mtmips/pinctrl-mtmips-common.h | 12 +
drivers/spi/Kconfig | 2 +-
drivers/usb/host/Kconfig | 2 +-
drivers/watchdog/Kconfig | 2 +-
include/configs/mt7621.h | 67 +
include/dt-bindings/clock/mt7621-clk.h | 46 +
include/dt-bindings/reset/mt7621-reset.h | 38 +
tools/mtk_image.c | 182 +++
tools/mtk_image.h | 24 +
66 files changed, 5877 insertions(+), 36 deletions(-)
create mode 100644 arch/mips/dts/mediatek,mt7621-nand-rfb.dts
create mode 100644 arch/mips/dts/mediatek,mt7621-rfb.dts
create mode 100644 arch/mips/dts/mt7621-u-boot.dtsi
create mode 100644 arch/mips/dts/mt7621.dtsi
create mode 100644 arch/mips/include/asm/mipsmtregs.h
create mode 100644 arch/mips/mach-mtmips/mt7621/Kconfig
create mode 100644 arch/mips/mach-mtmips/mt7621/Makefile
create mode 100644 arch/mips/mach-mtmips/mt7621/init.c
create mode 100644 arch/mips/mach-mtmips/mt7621/mt7621.h
create mode 100644 arch/mips/mach-mtmips/mt7621/serial.c
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/Makefile
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/cps.c
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/dram.c
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/dram.h
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/launch.c
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/launch.h
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/launch_ll.S
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/serial.c
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/spl.c
create mode 100644 arch/mips/mach-mtmips/mt7621/spl/start.S
create mode 100644 arch/mips/mach-mtmips/mt7621/sram_init.S
create mode 100644 arch/mips/mach-mtmips/mt7621/tpl/Makefile
create mode 100644 arch/mips/mach-mtmips/mt7621/tpl/start.S
create mode 100644 arch/mips/mach-mtmips/mt7621/tpl/tpl.c
create mode 100644 board/mediatek/mt7621/MAINTAINERS
create mode 100644 board/mediatek/mt7621/Makefile
create mode 100644 board/mediatek/mt7621/board.c
create mode 100644 configs/mt7621_nand_rfb_defconfig
create mode 100644 configs/mt7621_rfb_defconfig
create mode 100644 doc/board/mediatek/mt7621.rst
create mode 100644 drivers/clk/mtmips/clk-mt7621.c
create mode 100644 drivers/mtd/nand/raw/mt7621_nand.c
create mode 100644 drivers/mtd/nand/raw/mt7621_nand.h
create mode 100644 drivers/mtd/nand/raw/mt7621_nand_spl.c
create mode 100644 drivers/pinctrl/mtmips/pinctrl-mt7621.c
create mode 100644 include/configs/mt7621.h
create mode 100644 include/dt-bindings/clock/mt7621-clk.h
create mode 100644 include/dt-bindings/reset/mt7621-reset.h
--
2.17.1
4
30
This converts the following to Kconfig:
CONFIG_SYS_OHCI_SWAP_REG_ACCESS
CONFIG_SYS_USB_OHCI_CPU_INIT
CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS
CONFIG_SYS_USB_OHCI_SLOT_NAME
CONFIG_USB_ATMEL
CONFIG_USB_ATMEL_CLK_SEL_PLLB
CONFIG_USB_ATMEL_CLK_SEL_UPLL
CONFIG_USB_OHCI_LPC32XX
CONFIG_USB_OHCI_NEW
Signed-off-by: Tom Rini <trini(a)konsulko.com>
---
arch/arm/include/asm/arch-lpc32xx/config.h | 4 --
configs/at91sam9260ek_dataflash_cs0_defconfig | 3 ++
configs/at91sam9260ek_dataflash_cs1_defconfig | 3 ++
configs/at91sam9260ek_nandflash_defconfig | 3 ++
configs/at91sam9261ek_dataflash_cs0_defconfig | 3 ++
configs/at91sam9261ek_dataflash_cs3_defconfig | 3 ++
configs/at91sam9261ek_nandflash_defconfig | 3 ++
configs/at91sam9263ek_dataflash_cs0_defconfig | 3 ++
configs/at91sam9263ek_dataflash_defconfig | 3 ++
configs/at91sam9263ek_nandflash_defconfig | 3 ++
configs/at91sam9263ek_norflash_boot_defconfig | 3 ++
configs/at91sam9263ek_norflash_defconfig | 3 ++
configs/at91sam9g10ek_dataflash_cs0_defconfig | 3 ++
configs/at91sam9g10ek_dataflash_cs3_defconfig | 3 ++
configs/at91sam9g10ek_nandflash_defconfig | 3 ++
configs/at91sam9g20ek_2mmc_defconfig | 3 ++
.../at91sam9g20ek_2mmc_nandflash_defconfig | 3 ++
configs/at91sam9g20ek_dataflash_cs0_defconfig | 3 ++
configs/at91sam9g20ek_dataflash_cs1_defconfig | 3 ++
configs/at91sam9g20ek_nandflash_defconfig | 3 ++
configs/at91sam9xeek_dataflash_cs0_defconfig | 3 ++
configs/at91sam9xeek_dataflash_cs1_defconfig | 3 ++
configs/at91sam9xeek_nandflash_defconfig | 3 ++
configs/axs103_defconfig | 1 +
configs/chromebook_bob_defconfig | 1 +
configs/chromebook_kevin_defconfig | 1 +
configs/comtrend_ar5315u_ram_defconfig | 2 +
configs/comtrend_ar5387un_ram_defconfig | 2 +
configs/comtrend_ct5361_ram_defconfig | 2 +
configs/comtrend_vr3032u_ram_defconfig | 2 +
configs/comtrend_wap5813n_ram_defconfig | 2 +
configs/da850evm_defconfig | 1 +
configs/da850evm_direct_nor_defconfig | 1 +
configs/da850evm_nand_defconfig | 1 +
configs/devkit3250_defconfig | 3 ++
configs/elgin-rv1108_defconfig | 1 +
configs/evb-rk3128_defconfig | 1 +
configs/evb-rk3328_defconfig | 1 +
configs/evb-rv1108_defconfig | 1 +
configs/hsdk_4xd_defconfig | 1 +
configs/hsdk_defconfig | 1 +
configs/huawei_hg556a_ram_defconfig | 2 +
configs/khadas-edge-captain-rk3399_defconfig | 1 +
configs/khadas-edge-rk3399_defconfig | 1 +
configs/khadas-edge-v-rk3399_defconfig | 1 +
configs/nanopi-r2s-rk3328_defconfig | 1 +
configs/netgear_dgnd3700v2_ram_defconfig | 2 +
configs/omapl138_lcdk_defconfig | 1 +
configs/pinebook-pro-rk3399_defconfig | 1 +
configs/pm9261_defconfig | 3 ++
configs/pm9263_defconfig | 3 ++
configs/roc-cc-rk3328_defconfig | 1 +
configs/rock-pi-e-rk3328_defconfig | 1 +
configs/rock64-rk3328_defconfig | 1 +
configs/rock960-rk3399_defconfig | 1 +
configs/rockpro64-rk3399_defconfig | 1 +
configs/sama5d3_xplained_mmc_defconfig | 3 ++
configs/sama5d3_xplained_nandflash_defconfig | 3 ++
configs/sfr_nb4-ser_ram_defconfig | 2 +
configs/smartweb_defconfig | 2 +
configs/socrates_defconfig | 2 +
configs/stih410-b2260_defconfig | 1 +
configs/taurus_defconfig | 2 +
configs/vexpress_aemv8a_juno_defconfig | 1 +
drivers/usb/host/Kconfig | 44 +++++++++++++++++++
drivers/usb/host/ohci-at91.c | 5 ---
drivers/usb/host/ohci-generic.c | 4 --
drivers/usb/host/ohci.h | 2 +-
include/configs/at91sam9260ek.h | 6 ---
include/configs/at91sam9261ek.h | 10 -----
include/configs/at91sam9263ek.h | 6 ---
include/configs/at91sam9n12ek.h | 6 ---
include/configs/at91sam9x5ek.h | 6 ---
include/configs/axs10x.h | 2 -
include/configs/bmips_bcm6318.h | 7 ---
include/configs/bmips_bcm63268.h | 7 ---
include/configs/bmips_bcm6328.h | 7 ---
include/configs/bmips_bcm6348.h | 7 ---
include/configs/bmips_bcm6358.h | 7 ---
include/configs/bmips_bcm6362.h | 7 ---
include/configs/bmips_bcm6368.h | 7 ---
include/configs/da850evm.h | 4 --
include/configs/devkit3250.h | 1 -
include/configs/ethernut5.h | 6 ---
include/configs/evb_rk3399.h | 3 --
include/configs/gru.h | 3 --
include/configs/hsdk-4xd.h | 6 ---
include/configs/hsdk.h | 6 ---
include/configs/omapl138_lcdk.h | 6 ---
include/configs/pinebook-pro-rk3399.h | 3 --
include/configs/pm9261.h | 6 ---
include/configs/pm9263.h | 6 ---
include/configs/rk3128_common.h | 3 --
include/configs/rk3328_common.h | 4 --
include/configs/rock960_rk3399.h | 3 --
include/configs/rockpro64_rk3399.h | 3 --
include/configs/rv1108_common.h | 2 -
include/configs/sama5d3_xplained.h | 6 ---
include/configs/sama5d3xek.h | 5 ---
include/configs/smartweb.h | 6 ---
include/configs/snapper9260.h | 6 ---
include/configs/socrates.h | 4 --
include/configs/stih410-b2260.h | 2 -
include/configs/sunxi-common.h | 5 ---
include/configs/taurus.h | 6 ---
include/configs/usb_a9263.h | 5 ---
include/configs/vexpress_aemv8.h | 5 ---
107 files changed, 173 insertions(+), 214 deletions(-)
diff --git a/arch/arm/include/asm/arch-lpc32xx/config.h b/arch/arm/include/asm/arch-lpc32xx/config.h
index 653792c610cb..32d68cbeb81a 100644
--- a/arch/arm/include/asm/arch-lpc32xx/config.h
+++ b/arch/arm/include/asm/arch-lpc32xx/config.h
@@ -52,11 +52,7 @@
/* USB OHCI */
#if defined(CONFIG_USB_OHCI_LPC32XX)
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
#define CONFIG_SYS_USB_OHCI_REGS_BASE USB_BASE
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "lpc32xx-ohci"
#endif
#endif /* _LPC32XX_CONFIG_H */
diff --git a/configs/at91sam9260ek_dataflash_cs0_defconfig b/configs/at91sam9260ek_dataflash_cs0_defconfig
index 9947d1d4c670..62b467ea3097 100644
--- a/configs/at91sam9260ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs0_defconfig
@@ -65,3 +65,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9260ek_dataflash_cs1_defconfig b/configs/at91sam9260ek_dataflash_cs1_defconfig
index 8e54f1b13358..a5ccce1eae25 100644
--- a/configs/at91sam9260ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs1_defconfig
@@ -65,3 +65,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9260ek_nandflash_defconfig b/configs/at91sam9260ek_nandflash_defconfig
index 1badceeb2c1f..d3706d158b7d 100644
--- a/configs/at91sam9260ek_nandflash_defconfig
+++ b/configs/at91sam9260ek_nandflash_defconfig
@@ -63,3 +63,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9261ek_dataflash_cs0_defconfig b/configs/at91sam9261ek_dataflash_cs0_defconfig
index 8b2f27a406ea..d479d76c79ec 100644
--- a/configs/at91sam9261ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs0_defconfig
@@ -65,4 +65,7 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9261"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_ATMEL_LCD_BGR555=y
diff --git a/configs/at91sam9261ek_dataflash_cs3_defconfig b/configs/at91sam9261ek_dataflash_cs3_defconfig
index e5350cfd6fe6..96c44e9a1628 100644
--- a/configs/at91sam9261ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs3_defconfig
@@ -65,4 +65,7 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9261"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_ATMEL_LCD_BGR555=y
diff --git a/configs/at91sam9261ek_nandflash_defconfig b/configs/at91sam9261ek_nandflash_defconfig
index 3557c4e57a67..16de51951191 100644
--- a/configs/at91sam9261ek_nandflash_defconfig
+++ b/configs/at91sam9261ek_nandflash_defconfig
@@ -63,4 +63,7 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9261"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_ATMEL_LCD_BGR555=y
diff --git a/configs/at91sam9263ek_dataflash_cs0_defconfig b/configs/at91sam9263ek_dataflash_cs0_defconfig
index aa69b0f97a07..e73ff8861bed 100644
--- a/configs/at91sam9263ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9263ek_dataflash_cs0_defconfig
@@ -68,4 +68,7 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9263"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_ATMEL_LCD_BGR555=y
diff --git a/configs/at91sam9263ek_dataflash_defconfig b/configs/at91sam9263ek_dataflash_defconfig
index aa69b0f97a07..e73ff8861bed 100644
--- a/configs/at91sam9263ek_dataflash_defconfig
+++ b/configs/at91sam9263ek_dataflash_defconfig
@@ -68,4 +68,7 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9263"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_ATMEL_LCD_BGR555=y
diff --git a/configs/at91sam9263ek_nandflash_defconfig b/configs/at91sam9263ek_nandflash_defconfig
index f88ea5cc3dc3..184431640e66 100644
--- a/configs/at91sam9263ek_nandflash_defconfig
+++ b/configs/at91sam9263ek_nandflash_defconfig
@@ -66,4 +66,7 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9263"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_ATMEL_LCD_BGR555=y
diff --git a/configs/at91sam9263ek_norflash_boot_defconfig b/configs/at91sam9263ek_norflash_boot_defconfig
index b93eeaa2143c..7b975813928c 100644
--- a/configs/at91sam9263ek_norflash_boot_defconfig
+++ b/configs/at91sam9263ek_norflash_boot_defconfig
@@ -68,4 +68,7 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9263"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_ATMEL_LCD_BGR555=y
diff --git a/configs/at91sam9263ek_norflash_defconfig b/configs/at91sam9263ek_norflash_defconfig
index eb2e13ccc09f..2c354f3b5b51 100644
--- a/configs/at91sam9263ek_norflash_defconfig
+++ b/configs/at91sam9263ek_norflash_defconfig
@@ -69,4 +69,7 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9263"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_ATMEL_LCD_BGR555=y
diff --git a/configs/at91sam9g10ek_dataflash_cs0_defconfig b/configs/at91sam9g10ek_dataflash_cs0_defconfig
index 818e630ea2c5..ee4de9b67d67 100644
--- a/configs/at91sam9g10ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs0_defconfig
@@ -62,3 +62,6 @@ CONFIG_ATMEL_USART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9261"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9g10ek_dataflash_cs3_defconfig b/configs/at91sam9g10ek_dataflash_cs3_defconfig
index 118d778d4cfa..4a47ad128655 100644
--- a/configs/at91sam9g10ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs3_defconfig
@@ -62,3 +62,6 @@ CONFIG_ATMEL_USART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9261"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9g10ek_nandflash_defconfig b/configs/at91sam9g10ek_nandflash_defconfig
index bf667606a2a9..0e3d0b13140c 100644
--- a/configs/at91sam9g10ek_nandflash_defconfig
+++ b/configs/at91sam9g10ek_nandflash_defconfig
@@ -60,3 +60,6 @@ CONFIG_ATMEL_USART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9261"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9g20ek_2mmc_defconfig b/configs/at91sam9g20ek_2mmc_defconfig
index d175575f7917..add019c10afd 100644
--- a/configs/at91sam9g20ek_2mmc_defconfig
+++ b/configs/at91sam9g20ek_2mmc_defconfig
@@ -66,3 +66,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9g20ek_2mmc_nandflash_defconfig b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
index 2ea5bbd03407..72a21c3da94d 100644
--- a/configs/at91sam9g20ek_2mmc_nandflash_defconfig
+++ b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
@@ -65,3 +65,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9g20ek_dataflash_cs0_defconfig b/configs/at91sam9g20ek_dataflash_cs0_defconfig
index 304ee157bb7a..03b029cee8d9 100644
--- a/configs/at91sam9g20ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs0_defconfig
@@ -65,3 +65,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9g20ek_dataflash_cs1_defconfig b/configs/at91sam9g20ek_dataflash_cs1_defconfig
index a93ae955a57b..1ae1b28feefd 100644
--- a/configs/at91sam9g20ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs1_defconfig
@@ -65,3 +65,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9g20ek_nandflash_defconfig b/configs/at91sam9g20ek_nandflash_defconfig
index 4c51e7a3355a..77ad4b9fda2d 100644
--- a/configs/at91sam9g20ek_nandflash_defconfig
+++ b/configs/at91sam9g20ek_nandflash_defconfig
@@ -63,3 +63,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9xeek_dataflash_cs0_defconfig b/configs/at91sam9xeek_dataflash_cs0_defconfig
index 9947d1d4c670..62b467ea3097 100644
--- a/configs/at91sam9xeek_dataflash_cs0_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs0_defconfig
@@ -65,3 +65,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9xeek_dataflash_cs1_defconfig b/configs/at91sam9xeek_dataflash_cs1_defconfig
index 8e54f1b13358..a5ccce1eae25 100644
--- a/configs/at91sam9xeek_dataflash_cs1_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs1_defconfig
@@ -65,3 +65,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/at91sam9xeek_nandflash_defconfig b/configs/at91sam9xeek_nandflash_defconfig
index 1badceeb2c1f..d3706d158b7d 100644
--- a/configs/at91sam9xeek_nandflash_defconfig
+++ b/configs/at91sam9xeek_nandflash_defconfig
@@ -63,3 +63,6 @@ CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9260"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
diff --git a/configs/axs103_defconfig b/configs/axs103_defconfig
index 64407655767f..0d1764958224 100644
--- a/configs/axs103_defconfig
+++ b/configs/axs103_defconfig
@@ -62,5 +62,6 @@ CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_STORAGE=y
CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/chromebook_bob_defconfig b/configs/chromebook_bob_defconfig
index 84fe5be19d56..938bc28a1d27 100644
--- a/configs/chromebook_bob_defconfig
+++ b/configs/chromebook_bob_defconfig
@@ -102,6 +102,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
CONFIG_USB_DWC3=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_HOST_ETHER=y
diff --git a/configs/chromebook_kevin_defconfig b/configs/chromebook_kevin_defconfig
index 669d6f570b9e..6f88002f968c 100644
--- a/configs/chromebook_kevin_defconfig
+++ b/configs/chromebook_kevin_defconfig
@@ -103,6 +103,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
CONFIG_USB_DWC3=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_HOST_ETHER=y
diff --git a/configs/comtrend_ar5315u_ram_defconfig b/configs/comtrend_ar5315u_ram_defconfig
index 170b766089d0..36eab571eafe 100644
--- a/configs/comtrend_ar5315u_ram_defconfig
+++ b/configs/comtrend_ar5315u_ram_defconfig
@@ -72,3 +72,5 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_SYS_OHCI_SWAP_REG_ACCESS=y
diff --git a/configs/comtrend_ar5387un_ram_defconfig b/configs/comtrend_ar5387un_ram_defconfig
index 599fda481aa8..68969c041386 100644
--- a/configs/comtrend_ar5387un_ram_defconfig
+++ b/configs/comtrend_ar5387un_ram_defconfig
@@ -73,3 +73,5 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_SYS_OHCI_SWAP_REG_ACCESS=y
diff --git a/configs/comtrend_ct5361_ram_defconfig b/configs/comtrend_ct5361_ram_defconfig
index b1ad57b5a56c..cb2caf454350 100644
--- a/configs/comtrend_ct5361_ram_defconfig
+++ b/configs/comtrend_ct5361_ram_defconfig
@@ -67,4 +67,6 @@ CONFIG_BCM6345_SERIAL=y
CONFIG_USB=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_SYS_OHCI_SWAP_REG_ACCESS=y
CONFIG_WDT_BCM6345=y
diff --git a/configs/comtrend_vr3032u_ram_defconfig b/configs/comtrend_vr3032u_ram_defconfig
index d07895de9b82..138d3c84bac7 100644
--- a/configs/comtrend_vr3032u_ram_defconfig
+++ b/configs/comtrend_vr3032u_ram_defconfig
@@ -72,3 +72,5 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_SYS_OHCI_SWAP_REG_ACCESS=y
diff --git a/configs/comtrend_wap5813n_ram_defconfig b/configs/comtrend_wap5813n_ram_defconfig
index ca370e66a346..b7174ff5ee34 100644
--- a/configs/comtrend_wap5813n_ram_defconfig
+++ b/configs/comtrend_wap5813n_ram_defconfig
@@ -69,3 +69,5 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_SYS_OHCI_SWAP_REG_ACCESS=y
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index de2d709a7a22..d7348298587f 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -110,6 +110,7 @@ CONFIG_USB=y
# CONFIG_SPL_DM_USB is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_DA8XX=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=15
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_DA8XX=y
CONFIG_USB_MUSB_PIO_ONLY=y
diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig
index 88ef772d9d50..8f6b8b9702f4 100644
--- a/configs/da850evm_direct_nor_defconfig
+++ b/configs/da850evm_direct_nor_defconfig
@@ -88,6 +88,7 @@ CONFIG_DAVINCI_SPI=y
CONFIG_USB=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_DA8XX=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=15
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_DA8XX=y
CONFIG_USB_MUSB_PIO_ONLY=y
diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig
index 052ef3070334..95b41ef32b14 100644
--- a/configs/da850evm_nand_defconfig
+++ b/configs/da850evm_nand_defconfig
@@ -113,6 +113,7 @@ CONFIG_USB=y
# CONFIG_SPL_DM_USB is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_DA8XX=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=15
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_DA8XX=y
CONFIG_USB_MUSB_PIO_ONLY=y
diff --git a/configs/devkit3250_defconfig b/configs/devkit3250_defconfig
index a0b7a2e2d36c..eae073d76ea6 100644
--- a/configs/devkit3250_defconfig
+++ b/configs/devkit3250_defconfig
@@ -86,4 +86,7 @@ CONFIG_CONS_INDEX=5
CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="lpc32xx-ohci"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
+CONFIG_USB_OHCI_LPC32XX=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
index 2f595be1c24a..263fe3b7c8d1 100644
--- a/configs/elgin-rv1108_defconfig
+++ b/configs/elgin-rv1108_defconfig
@@ -55,6 +55,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_DWC2=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
diff --git a/configs/evb-rk3128_defconfig b/configs/evb-rk3128_defconfig
index e0fb3f62b45c..ac38d5e78852 100644
--- a/configs/evb-rk3128_defconfig
+++ b/configs/evb-rk3128_defconfig
@@ -51,6 +51,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_DWC2=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index 4d6d235cb125..c81437300c74 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -99,6 +99,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
index dbca68fcf300..65b76c6b36d4 100644
--- a/configs/evb-rv1108_defconfig
+++ b/configs/evb-rv1108_defconfig
@@ -49,6 +49,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_DWC2=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_PRODUCT_NUM=0x110a
diff --git a/configs/hsdk_4xd_defconfig b/configs/hsdk_4xd_defconfig
index 85844f7ec882..1d78c17d13b0 100644
--- a/configs/hsdk_4xd_defconfig
+++ b/configs/hsdk_4xd_defconfig
@@ -68,6 +68,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_STORAGE=y
CONFIG_USE_PRIVATE_LIBGCC=y
CONFIG_PANIC_HANG=y
diff --git a/configs/hsdk_defconfig b/configs/hsdk_defconfig
index a714d28134bf..f9823af34d4d 100644
--- a/configs/hsdk_defconfig
+++ b/configs/hsdk_defconfig
@@ -67,6 +67,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_STORAGE=y
CONFIG_USE_PRIVATE_LIBGCC=y
CONFIG_PANIC_HANG=y
diff --git a/configs/huawei_hg556a_ram_defconfig b/configs/huawei_hg556a_ram_defconfig
index 1c43ae262d81..2b5a58714102 100644
--- a/configs/huawei_hg556a_ram_defconfig
+++ b/configs/huawei_hg556a_ram_defconfig
@@ -69,3 +69,5 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_SYS_OHCI_SWAP_REG_ACCESS=y
diff --git a/configs/khadas-edge-captain-rk3399_defconfig b/configs/khadas-edge-captain-rk3399_defconfig
index e9618e3e207a..9a0171e4a8a4 100644
--- a/configs/khadas-edge-captain-rk3399_defconfig
+++ b/configs/khadas-edge-captain-rk3399_defconfig
@@ -65,6 +65,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_ASIX88179=y
diff --git a/configs/khadas-edge-rk3399_defconfig b/configs/khadas-edge-rk3399_defconfig
index 252a02b579e1..27f119931fb4 100644
--- a/configs/khadas-edge-rk3399_defconfig
+++ b/configs/khadas-edge-rk3399_defconfig
@@ -64,6 +64,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_ASIX88179=y
diff --git a/configs/khadas-edge-v-rk3399_defconfig b/configs/khadas-edge-v-rk3399_defconfig
index 731fbfcab264..de2b625120aa 100644
--- a/configs/khadas-edge-v-rk3399_defconfig
+++ b/configs/khadas-edge-v-rk3399_defconfig
@@ -65,6 +65,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_ASIX88179=y
diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
index 41793ca7e486..15c2e1698c20 100644
--- a/configs/nanopi-r2s-rk3328_defconfig
+++ b/configs/nanopi-r2s-rk3328_defconfig
@@ -102,6 +102,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
diff --git a/configs/netgear_dgnd3700v2_ram_defconfig b/configs/netgear_dgnd3700v2_ram_defconfig
index bbfa9e13fa3c..73de5ed15b15 100644
--- a/configs/netgear_dgnd3700v2_ram_defconfig
+++ b/configs/netgear_dgnd3700v2_ram_defconfig
@@ -68,3 +68,5 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_SYS_OHCI_SWAP_REG_ACCESS=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index b45f6d8564e9..28f4f95c95bd 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -105,6 +105,7 @@ CONFIG_USB=y
# CONFIG_SPL_DM_USB is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_DA8XX=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=15
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_DA8XX=y
CONFIG_USB_MUSB_PIO_ONLY=y
diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig
index 121182c55d74..af473f913672 100644
--- a/configs/pinebook-pro-rk3399_defconfig
+++ b/configs/pinebook-pro-rk3399_defconfig
@@ -90,6 +90,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_KEYBOARD=y
diff --git a/configs/pm9261_defconfig b/configs/pm9261_defconfig
index c22076250bc7..6922380b0093 100644
--- a/configs/pm9261_defconfig
+++ b/configs/pm9261_defconfig
@@ -61,6 +61,9 @@ CONFIG_ATMEL_USART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9261"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_DM_VIDEO=y
# CONFIG_VIDEO_BPP32 is not set
CONFIG_ATMEL_LCD=y
diff --git a/configs/pm9263_defconfig b/configs/pm9263_defconfig
index 1406e7f1aa4d..2b4a844d804b 100644
--- a/configs/pm9263_defconfig
+++ b/configs/pm9263_defconfig
@@ -65,6 +65,9 @@ CONFIG_ATMEL_USART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_SLOT_NAME="at91sam9263"
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_DM_VIDEO=y
# CONFIG_VIDEO_BPP32 is not set
CONFIG_ATMEL_LCD=y
diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
index ab25abc1a031..43b90c7879b7 100644
--- a/configs/roc-cc-rk3328_defconfig
+++ b/configs/roc-cc-rk3328_defconfig
@@ -108,6 +108,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
index 1d51a267b93a..7d95e171f7f4 100644
--- a/configs/rock-pi-e-rk3328_defconfig
+++ b/configs/rock-pi-e-rk3328_defconfig
@@ -109,6 +109,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 640fe558d414..bc333a5e2a6a 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -106,6 +106,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
index 78e50dbfbcb7..bb5b2143691d 100644
--- a/configs/rock960-rk3399_defconfig
+++ b/configs/rock960-rk3399_defconfig
@@ -74,6 +74,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
CONFIG_USB_DWC3=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_HOST_ETHER=y
diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig
index 4d2a5b32e31c..ef28fe6a937a 100644
--- a/configs/rockpro64-rk3399_defconfig
+++ b/configs/rockpro64-rk3399_defconfig
@@ -87,6 +87,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_KEYBOARD=y
diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig
index 848326051239..486e2190b2b3 100644
--- a/configs/sama5d3_xplained_mmc_defconfig
+++ b/configs/sama5d3_xplained_mmc_defconfig
@@ -104,6 +104,9 @@ CONFIG_ATMEL_PIT_TIMER=y
CONFIG_SPL_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
+CONFIG_USB_ATMEL_CLK_SEL_UPLL=y
CONFIG_USB_STORAGE=y
CONFIG_W1=y
CONFIG_W1_GPIO=y
diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig
index f12c5d791724..184ff5ff7248 100644
--- a/configs/sama5d3_xplained_nandflash_defconfig
+++ b/configs/sama5d3_xplained_nandflash_defconfig
@@ -107,6 +107,9 @@ CONFIG_ATMEL_PIT_TIMER=y
CONFIG_SPL_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
+CONFIG_USB_ATMEL_CLK_SEL_UPLL=y
CONFIG_USB_STORAGE=y
CONFIG_W1=y
CONFIG_W1_GPIO=y
diff --git a/configs/sfr_nb4-ser_ram_defconfig b/configs/sfr_nb4-ser_ram_defconfig
index 6f261882faae..df008b797f86 100644
--- a/configs/sfr_nb4-ser_ram_defconfig
+++ b/configs/sfr_nb4-ser_ram_defconfig
@@ -71,3 +71,5 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_SYS_OHCI_SWAP_REG_ACCESS=y
diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
index 4e05f71bf3af..84337e49e6c9 100644
--- a/configs/smartweb_defconfig
+++ b/configs/smartweb_defconfig
@@ -92,6 +92,8 @@ CONFIG_MACB=y
CONFIG_RMII=y
CONFIG_ATMEL_USART=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="Siemens AG"
CONFIG_USB_GADGET_VENDOR_NUM=0x0908
diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig
index 28ea447ec55f..621573653785 100644
--- a/configs/socrates_defconfig
+++ b/configs/socrates_defconfig
@@ -96,4 +96,6 @@ CONFIG_USB=y
# CONFIG_USB_EHCI_HCD is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_PCI=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=15
+CONFIG_SYS_OHCI_SWAP_REG_ACCESS=y
CONFIG_USB_STORAGE=y
diff --git a/configs/stih410-b2260_defconfig b/configs/stih410-b2260_defconfig
index 198a0c7f9e5f..cb8c73afd474 100644
--- a/configs/stih410-b2260_defconfig
+++ b/configs/stih410-b2260_defconfig
@@ -58,6 +58,7 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
CONFIG_USB_DWC3=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
diff --git a/configs/taurus_defconfig b/configs/taurus_defconfig
index cf538d0f5f5f..3d61c7b57b59 100644
--- a/configs/taurus_defconfig
+++ b/configs/taurus_defconfig
@@ -110,6 +110,8 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_ATMEL_USART=y
CONFIG_USB=y
# CONFIG_SPL_DM_USB is not set
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
+CONFIG_USB_ATMEL=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="Siemens AG"
CONFIG_USB_GADGET_VENDOR_NUM=0x0908
diff --git a/configs/vexpress_aemv8a_juno_defconfig b/configs/vexpress_aemv8a_juno_defconfig
index ba8883dced55..792bcf1eb5d4 100644
--- a/configs/vexpress_aemv8a_juno_defconfig
+++ b/configs/vexpress_aemv8a_juno_defconfig
@@ -35,3 +35,4 @@ CONFIG_SYS_FLASH_CFI=y
CONFIG_DM_ETH=y
CONFIG_PCI=y
CONFIG_USB=y
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 0b82c2fdaf71..31ae9f74e7ac 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -297,10 +297,17 @@ config USB_EHCI_TXFIFO_THRESH
endif # USB_EHCI_HCD
+config USB_OHCI_NEW
+ bool
+
+config SYS_USB_OHCI_CPU_INIT
+ bool
+
config USB_OHCI_HCD
bool "OHCI HCD (USB 1.1) support"
depends on DM && OF_CONTROL
select USB_HOST
+ select USB_OHCI_NEW
---help---
The Open Host Controller Interface (OHCI) is a standard for accessing
USB 1.1 host controller hardware. It does more in hardware than Intel's
@@ -332,6 +339,19 @@ config USB_OHCI_DA8XX
endif # USB_OHCI_HCD
+config SYS_USB_OHCI_SLOT_NAME
+ string "Display name for the OHCI controller"
+ depends on USB_OHCI_NEW && !DM_USB
+
+config SYS_USB_OHCI_MAX_ROOT_PORTS
+ int "Maximal number of ports of the root hub"
+ depends on USB_OHCI_NEW
+ default 1 if ARCH_SUNXI
+
+config SYS_OHCI_SWAP_REG_ACCESS
+ bool "Perform byte swapping on OHCI controller register accesses"
+ depends on USB_OHCI_NEW
+
config USB_UHCI_HCD
bool "UHCI HCD (most Intel and VIA) support"
select USB_HOST
@@ -381,6 +401,30 @@ config USB_R8A66597_HCD
This enables support for the on-chip Renesas R8A66597 USB 2.0
controller, present in various RZ and SH SoCs.
+config USB_ATMEL
+ bool "AT91 OHCI USB support"
+ depends on ARCH_AT91
+ select SYS_USB_OHCI_CPU_INIT
+ select USB_OHCI_NEW
+
+choice
+ prompt "Clock for OHCI"
+ depends on USB_ATMEL
+
+config USB_ATMEL_CLK_SEL_PLLB
+ bool "PLLB"
+
+config USB_ATMEL_CLK_SEL_UPLL
+ bool "UPLL"
+
+endchoice
+
+config USB_OHCI_LPC32XX
+ bool "LPC32xx USB OHCI support"
+ depends on ARCH_LPC32XX
+ select SYS_USB_OHCI_CPU_INIT
+ select USB_OHCI_NEW
+
config USB_MAX_CONTROLLER_COUNT
int "Maximum number of USB host controllers"
depends on USB_EHCI_FSL || USB_XHCI_FSL || \
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 8ceabaf45c1b..9b955c1bd678 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -5,9 +5,6 @@
*/
#include <common.h>
-
-#if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
-
#include <asm/arch/clk.h>
int usb_cpu_init(void)
@@ -65,5 +62,3 @@ int usb_cpu_init_fail(void)
{
return usb_cpu_stop();
}
-
-#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */
diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c
index 163f0ef17b11..5d23058aaf6a 100644
--- a/drivers/usb/host/ohci-generic.c
+++ b/drivers/usb/host/ohci-generic.c
@@ -14,10 +14,6 @@
#include <reset.h>
#include "ohci.h"
-#if !defined(CONFIG_USB_OHCI_NEW)
-# error "Generic OHCI driver requires CONFIG_USB_OHCI_NEW"
-#endif
-
struct generic_ohci {
ohci_t ohci;
struct clk *clocks; /* clock list */
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index a38cd25eb85f..7699f2e6b15a 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -151,7 +151,7 @@ struct ohci_hcca {
* Maximum number of root hub ports.
*/
#ifndef CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS
-# error "CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS undefined!"
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
#endif
/*
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 2c4f229d3476..ef9335c523f4 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -53,12 +53,6 @@
#endif
/* USB */
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW 1
-#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000 /* AT91SAM9260_UHP_BASE */
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#endif
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 563fff531d11..12726c10bd6d 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -51,16 +51,6 @@
#define CONFIG_DM9000_NO_SROM
/* USB */
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000 /* AT91SAM9261_UHP_BASE */
-#ifdef CONFIG_AT91SAM9G10EK
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9g10"
-#else
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9261"
-#endif
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#endif
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index c100a411b2dc..9497f055035d 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -173,12 +173,6 @@
#endif
/* USB */
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW 1
-#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00a00000 /* AT91SAM9263_UHP_BASE */
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#endif
diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index 29affe7b5cd6..4fac0aad42c5 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -41,13 +41,7 @@
/* USB host */
#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_BASE_OHCI
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9n12"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
#endif
/* SPL */
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index 6857f2e3c4a2..758a91cdaa97 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -41,13 +41,7 @@
/* USB */
#ifdef CONFIG_CMD_USB
#ifndef CONFIG_USB_EHCI_HCD
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_UPLL
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_BASE_OHCI
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9x5"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 3
#endif
#endif
diff --git a/include/configs/axs10x.h b/include/configs/axs10x.h
index 7e25846e401d..3e98ce09c720 100644
--- a/include/configs/axs10x.h
+++ b/include/configs/axs10x.h
@@ -39,8 +39,6 @@
/*
* USB 1.1 configuration
*/
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
/*
* Environment settings
diff --git a/include/configs/bmips_bcm6318.h b/include/configs/bmips_bcm6318.h
index ad7781bd3a27..55c1d439d58b 100644
--- a/include/configs/bmips_bcm6318.h
+++ b/include/configs/bmips_bcm6318.h
@@ -14,13 +14,6 @@
/* RAM */
#define CONFIG_SYS_SDRAM_BASE 0x80000000
-/* USB */
-#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-#if defined(CONFIG_USB_OHCI_HCD)
-#define CONFIG_USB_OHCI_NEW
-#endif /* CONFIG_USB_OHCI_HCD */
-
/* U-Boot */
#if defined(CONFIG_BMIPS_BOOT_RAM)
diff --git a/include/configs/bmips_bcm63268.h b/include/configs/bmips_bcm63268.h
index 0901f6e88ac4..f046b7e6622f 100644
--- a/include/configs/bmips_bcm63268.h
+++ b/include/configs/bmips_bcm63268.h
@@ -14,13 +14,6 @@
/* RAM */
#define CONFIG_SYS_SDRAM_BASE 0x80000000
-/* USB */
-#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-#if defined(CONFIG_USB_OHCI_HCD)
-#define CONFIG_USB_OHCI_NEW
-#endif /* CONFIG_USB_OHCI_HCD */
-
/* U-Boot */
#if defined(CONFIG_BMIPS_BOOT_RAM)
diff --git a/include/configs/bmips_bcm6328.h b/include/configs/bmips_bcm6328.h
index 3f45f1f2550f..7e488072edc0 100644
--- a/include/configs/bmips_bcm6328.h
+++ b/include/configs/bmips_bcm6328.h
@@ -14,13 +14,6 @@
/* RAM */
#define CONFIG_SYS_SDRAM_BASE 0x80000000
-/* USB */
-#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-#if defined(CONFIG_USB_OHCI_HCD)
-#define CONFIG_USB_OHCI_NEW
-#endif /* CONFIG_USB_OHCI_HCD */
-
/* U-Boot */
#if defined(CONFIG_BMIPS_BOOT_RAM)
diff --git a/include/configs/bmips_bcm6348.h b/include/configs/bmips_bcm6348.h
index af1c3673fbb9..f704fe26ca0d 100644
--- a/include/configs/bmips_bcm6348.h
+++ b/include/configs/bmips_bcm6348.h
@@ -14,13 +14,6 @@
/* RAM */
#define CONFIG_SYS_SDRAM_BASE 0x80000000
-/* USB */
-#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-#if defined(CONFIG_USB_OHCI_HCD)
-#define CONFIG_USB_OHCI_NEW
-#endif /* CONFIG_USB_OHCI_HCD */
-
/* U-Boot */
#if defined(CONFIG_BMIPS_BOOT_RAM)
diff --git a/include/configs/bmips_bcm6358.h b/include/configs/bmips_bcm6358.h
index c15218fc9cb5..9aaa694cad91 100644
--- a/include/configs/bmips_bcm6358.h
+++ b/include/configs/bmips_bcm6358.h
@@ -14,13 +14,6 @@
/* RAM */
#define CONFIG_SYS_SDRAM_BASE 0x80000000
-/* USB */
-#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-#if defined(CONFIG_USB_OHCI_HCD)
-#define CONFIG_USB_OHCI_NEW
-#endif /* CONFIG_USB_OHCI_HCD */
-
/* U-Boot */
#if defined(CONFIG_BMIPS_BOOT_RAM)
diff --git a/include/configs/bmips_bcm6362.h b/include/configs/bmips_bcm6362.h
index 0c94b2c52543..34e542544cb8 100644
--- a/include/configs/bmips_bcm6362.h
+++ b/include/configs/bmips_bcm6362.h
@@ -14,13 +14,6 @@
/* RAM */
#define CONFIG_SYS_SDRAM_BASE 0x80000000
-/* USB */
-#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-#if defined(CONFIG_USB_OHCI_HCD)
-#define CONFIG_USB_OHCI_NEW
-#endif /* CONFIG_USB_OHCI_HCD */
-
/* U-Boot */
#if defined(CONFIG_BMIPS_BOOT_RAM)
diff --git a/include/configs/bmips_bcm6368.h b/include/configs/bmips_bcm6368.h
index 6486b7e61107..0319124a0edd 100644
--- a/include/configs/bmips_bcm6368.h
+++ b/include/configs/bmips_bcm6368.h
@@ -14,13 +14,6 @@
/* RAM */
#define CONFIG_SYS_SDRAM_BASE 0x80000000
-/* USB */
-#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-#if defined(CONFIG_USB_OHCI_HCD)
-#define CONFIG_USB_OHCI_NEW
-#endif /* CONFIG_USB_OHCI_HCD */
-
/* U-Boot */
#if defined(CONFIG_BMIPS_BOOT_RAM)
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 1f6ac8d28adf..3db97205dab8 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -170,10 +170,6 @@
"console=ttyS2,115200n8\0" \
"hwconfig=dsp:wake=yes"
-/* USB Configs */
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
-
#ifdef CONFIG_SPL_BUILD
/* defines for SPL */
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index e101d1f60048..328e4958f86a 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -55,7 +55,6 @@
/*
* USB
*/
-#define CONFIG_USB_OHCI_LPC32XX
#define CONFIG_USB_ISP1301_I2C_ADDR 0x2d
/*
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index 2126731ccfc9..529b9837318f 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -61,13 +61,7 @@
/* USB */
#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "host"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#endif
/* RTC */
diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h
index 492b7b4df128..b7e850370b31 100644
--- a/include/configs/evb_rk3399.h
+++ b/include/configs/evb_rk3399.h
@@ -15,7 +15,4 @@
#define SDRAM_BANK_SIZE (2UL << 30)
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-
#endif
diff --git a/include/configs/gru.h b/include/configs/gru.h
index b1084bb21d4d..be2dc79968c0 100644
--- a/include/configs/gru.h
+++ b/include/configs/gru.h
@@ -13,7 +13,4 @@
#include <configs/rk3399_common.h>
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-
#endif
diff --git a/include/configs/hsdk-4xd.h b/include/configs/hsdk-4xd.h
index 7785bab7147b..03ca9281c829 100644
--- a/include/configs/hsdk-4xd.h
+++ b/include/configs/hsdk-4xd.h
@@ -38,12 +38,6 @@
* Ethernet PHY configuration
*/
-/*
- * USB 1.1 configuration
- */
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
-
/*
* Environment settings
*/
diff --git a/include/configs/hsdk.h b/include/configs/hsdk.h
index 6dd69ca38b42..0b8ac78e2794 100644
--- a/include/configs/hsdk.h
+++ b/include/configs/hsdk.h
@@ -37,12 +37,6 @@
* Ethernet PHY configuration
*/
-/*
- * USB 1.1 configuration
- */
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
-
/*
* Environment settings
*/
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index a344a46a3e66..c9f5004117f2 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -137,12 +137,6 @@
* U-Boot general configuration
*/
-/*
- * USB Configs
- */
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
-
/*
* Linux Information
*/
diff --git a/include/configs/pinebook-pro-rk3399.h b/include/configs/pinebook-pro-rk3399.h
index d478b19917df..241dc39be008 100644
--- a/include/configs/pinebook-pro-rk3399.h
+++ b/include/configs/pinebook-pro-rk3399.h
@@ -16,7 +16,4 @@
#define SDRAM_BANK_SIZE (2UL << 30)
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
-
#endif
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index bc15cdb44602..7374514698f9 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -152,13 +152,7 @@
#define CONFIG_SYS_MAX_FLASH_SECT 256
/* USB */
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW 1
-#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9261"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#define CONFIG_EXTRA_ENV_SETTINGS \
"partition=nand0,0\0" \
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index a0eed66b5ff1..7a6d817926c7 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -175,13 +175,7 @@
AT91_MATRIX_SCFG_SLOT_CYCLE(255))
/* USB */
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW 1
-#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00a00000 /* AT91SAM9263_UHP_BASE */
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#define CONFIG_EXTRA_ENV_SETTINGS \
"partition=nand0,0\0" \
diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h
index f3e0eefb9a21..d5a4ca26b048 100644
--- a/include/configs/rk3128_common.h
+++ b/include/configs/rk3128_common.h
@@ -19,9 +19,6 @@
#define CONFIG_SYS_SDRAM_BASE 0x60000000
#define SDRAM_MAX_SIZE 0x80000000
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
-
/* usb mass storage */
#define ENV_MEM_LAYOUT_SETTINGS \
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
index 90183579202d..165b78ff3309 100644
--- a/include/configs/rk3328_common.h
+++ b/include/configs/rk3328_common.h
@@ -30,8 +30,4 @@
"partitions=" PARTS_DEFAULT \
BOOTENV
-/* rockchip ohci host driver */
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
-
#endif
diff --git a/include/configs/rock960_rk3399.h b/include/configs/rock960_rk3399.h
index 2edad710284f..6099d2fa55a6 100644
--- a/include/configs/rock960_rk3399.h
+++ b/include/configs/rock960_rk3399.h
@@ -14,7 +14,4 @@
#include <configs/rk3399_common.h>
#define SDRAM_BANK_SIZE (2UL << 30)
-
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#endif
diff --git a/include/configs/rockpro64_rk3399.h b/include/configs/rockpro64_rk3399.h
index 903e9df527c1..9195b9b99e41 100644
--- a/include/configs/rockpro64_rk3399.h
+++ b/include/configs/rockpro64_rk3399.h
@@ -14,7 +14,4 @@
#include <configs/rk3399_common.h>
#define SDRAM_BANK_SIZE (2UL << 30)
-
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#endif
diff --git a/include/configs/rv1108_common.h b/include/configs/rv1108_common.h
index d8de9c25df2b..83c3167f38dc 100644
--- a/include/configs/rv1108_common.h
+++ b/include/configs/rv1108_common.h
@@ -18,8 +18,6 @@
#define CONFIG_SYS_SDRAM_BASE 0x60000000
/* rockchip ohci host driver */
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
#define ENV_MEM_LAYOUT_SETTINGS \
"scriptaddr=0x60000000\0" \
diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h
index a10057452fe4..22839d544a50 100644
--- a/include/configs/sama5d3_xplained.h
+++ b/include/configs/sama5d3_xplained.h
@@ -39,13 +39,7 @@
/* USB */
#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_UPLL
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00600000
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "SAMA5D3 Xplained"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#endif
/* SPL */
diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h
index f61b6e0dabc7..dc89148a0450 100644
--- a/include/configs/sama5d3xek.h
+++ b/include/configs/sama5d3xek.h
@@ -52,12 +52,7 @@
/* USB */
#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_ATMEL_CLK_SEL_UPLL
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_BASE_OHCI
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "sama5d3"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 3
#endif
/* SPL */
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index 215c31bca410..65bc3c672eed 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -67,13 +67,7 @@
#define CONFIG_USART_ID ATMEL_ID_SYS
/* USB configuration */
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_UHP_BASE
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
/* USB DFU support */
diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index 6ff21b921687..2b7afb5d25e5 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -38,13 +38,7 @@
#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC13
/* USB */
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_UHP_BASE
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
/* GPIOs and IO expander */
#define CONFIG_PCA953X
diff --git a/include/configs/socrates.h b/include/configs/socrates.h
index 6a78cb1f2648..db2826813261 100644
--- a/include/configs/socrates.h
+++ b/include/configs/socrates.h
@@ -223,10 +223,6 @@
/* pass open firmware flat tree */
/* USB support */
-#define CONFIG_USB_OHCI_NEW 1
#define CONFIG_PCI_OHCI 1
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "ohci_pci"
-#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS 1
#endif /* __CONFIG_H */
diff --git a/include/configs/stih410-b2260.h b/include/configs/stih410-b2260.h
index a425dad69214..1b8d38f4b52a 100644
--- a/include/configs/stih410-b2260.h
+++ b/include/configs/stih410-b2260.h
@@ -43,8 +43,6 @@
/* Extra Commands */
/* USB Configs */
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
/* NET Configs */
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index d52552c5fe76..2bf4e58cddf7 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -120,11 +120,6 @@
/* Ethernet support */
-#ifdef CONFIG_USB_EHCI_HCD
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
-#endif
-
#ifdef CONFIG_ARM64
/*
* Boards seem to come with at least 512MB of DRAM.
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index 798d72d8e26b..ab2dc3d7146b 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -65,13 +65,7 @@
/* USB */
#if defined(CONFIG_BOARD_TAURUS)
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
/* USB DFU support */
diff --git a/include/configs/usb_a9263.h b/include/configs/usb_a9263.h
index e432b04e9f5a..8cb8c609d052 100644
--- a/include/configs/usb_a9263.h
+++ b/include/configs/usb_a9263.h
@@ -45,12 +45,7 @@
/* USB */
#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_ATMEL
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_CPU_INIT
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00a00000
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
#endif
/* bootstrap + u-boot + env + linux in dataflash on CS0 */
diff --git a/include/configs/vexpress_aemv8.h b/include/configs/vexpress_aemv8.h
index 14b92c095a0d..e864b3fee6ae 100644
--- a/include/configs/vexpress_aemv8.h
+++ b/include/configs/vexpress_aemv8.h
@@ -274,11 +274,6 @@
/* Store environment at top of flash */
#endif
-#ifdef CONFIG_USB_EHCI_HCD
-#define CONFIG_USB_OHCI_NEW
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
-#endif
-
#define CONFIG_SYS_FLASH_EMPTY_INFO /* flinfo indicates empty blocks */
#define FLASH_MAX_SECTOR_SIZE 0x00040000
--
2.25.1
5
29
This converts the following to Kconfig:
CONFIG_E1000_NO_NVM
Signed-off-by: Tom Rini <trini(a)konsulko.com>
---
configs/apalis-tk1_defconfig | 1 +
configs/apalis_t30_defconfig | 1 +
drivers/net/Kconfig | 4 ++++
include/configs/apalis-tk1.h | 3 ---
include/configs/apalis_t30.h | 3 ---
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig
index 2d9c0ae18e37..0915bca64214 100644
--- a/configs/apalis-tk1_defconfig
+++ b/configs/apalis-tk1_defconfig
@@ -58,6 +58,7 @@ CONFIG_SYS_I2C_TEGRA=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK=y
CONFIG_E1000=y
+CONFIG_E1000_NO_NVM=y
CONFIG_PCI=y
CONFIG_PCI_TEGRA=y
CONFIG_DM_PMIC=y
diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig
index 2a8d3c6e0a35..f5d958646fa7 100644
--- a/configs/apalis_t30_defconfig
+++ b/configs/apalis_t30_defconfig
@@ -50,6 +50,7 @@ CONFIG_TFTP_TSIZE=y
CONFIG_SPL_DM=y
CONFIG_SYS_I2C_TEGRA=y
CONFIG_E1000=y
+CONFIG_E1000_NO_NVM=y
CONFIG_PCI=y
CONFIG_PCI_TEGRA=y
CONFIG_SYS_NS16550=y
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 84d859c21eb8..56f9416a48db 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -239,6 +239,10 @@ config E1000
<http://support.intel.com/support/network/adapter/pro100/21397.htm>
+config E1000_NO_NVM
+ bool "Intel PRO/1000 has no NVMEM / EEPROM"
+ depends on E1000
+
config E1000_SPI_GENERIC
bool "Allow access to the Intel 8257x SPI bus"
depends on E1000
diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h
index 19e6a1e04eeb..a362282a291e 100644
--- a/include/configs/apalis-tk1.h
+++ b/include/configs/apalis-tk1.h
@@ -22,9 +22,6 @@
/* PCI host support */
#undef CONFIG_PCI_SCAN_SHOW
-/* PCI networking support */
-#define CONFIG_E1000_NO_NVM
-
/*
* Custom Distro Boot configuration:
* 1. 8bit SD port (MMC1)
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h
index 104c4135e284..84bd88f835ae 100644
--- a/include/configs/apalis_t30.h
+++ b/include/configs/apalis_t30.h
@@ -23,9 +23,6 @@
#define CONFIG_TEGRA_ENABLE_UARTA
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
-/* PCI networking support */
-#define CONFIG_E1000_NO_NVM
-
#define UBOOT_UPDATE \
"uboot_hwpart=1\0" \
"uboot_blk=0\0" \
--
2.25.1
2
24
From: Ayan Kumar Halder <ayankuma(a)amd.com>
"#stream-id-cells" was being used with "mmu-masters" for Xen specific
device trees.
With Xen commit 2278d2cbb0b7c1b48b298c6c4c6a7de2271ac928 (Link below)
Xen is able to support smmu bindings in both formats ie :
1. Using iommus (linux format)
2. Using mmu-masters (legacy format).
Thus, "#stream-id-cells" which was used for the legacy format, can be
removed as Xen can use smmu bindings in linux format.
Link: https://www.mail-archive.com/xen-devel@lists.xenproject.org/msg101649.html
Signed-off-by: Ayan Kumar Halder <ayankuma(a)amd.com>
Signed-off-by: Michal Simek <michal.simek(a)amd.com>
---
arch/arm/dts/versal-mini-emmc0.dts | 1 -
arch/arm/dts/versal-mini-emmc1.dts | 1 -
arch/arm/dts/zynqmp.dtsi | 28 ----------------------------
3 files changed, 30 deletions(-)
diff --git a/arch/arm/dts/versal-mini-emmc0.dts b/arch/arm/dts/versal-mini-emmc0.dts
index 6a6e7467a233..7c81a82fb92d 100644
--- a/arch/arm/dts/versal-mini-emmc0.dts
+++ b/arch/arm/dts/versal-mini-emmc0.dts
@@ -47,7 +47,6 @@
xlnx,device_id = <0>;
no-1-8-v;
xlnx,mio-bank = <0>;
- #stream-id-cells = <1>;
};
};
diff --git a/arch/arm/dts/versal-mini-emmc1.dts b/arch/arm/dts/versal-mini-emmc1.dts
index c342e6bdf7ad..bf7569d4cca4 100644
--- a/arch/arm/dts/versal-mini-emmc1.dts
+++ b/arch/arm/dts/versal-mini-emmc1.dts
@@ -47,7 +47,6 @@
xlnx,device_id = <1>;
no-1-8-v;
xlnx,mio-bank = <0>;
- #stream-id-cells = <1>;
};
};
diff --git a/arch/arm/dts/zynqmp.dtsi b/arch/arm/dts/zynqmp.dtsi
index dae8f0669df8..fbc6e752da93 100644
--- a/arch/arm/dts/zynqmp.dtsi
+++ b/arch/arm/dts/zynqmp.dtsi
@@ -281,7 +281,6 @@
interrupts = <0 124 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <128>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x14e8>;
power-domains = <&zynqmp_firmware PD_GDMA>;
#dma-cells = <1>;
@@ -295,7 +294,6 @@
interrupts = <0 125 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <128>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x14e9>;
power-domains = <&zynqmp_firmware PD_GDMA>;
#dma-cells = <1>;
@@ -309,7 +307,6 @@
interrupts = <0 126 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <128>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x14ea>;
power-domains = <&zynqmp_firmware PD_GDMA>;
#dma-cells = <1>;
@@ -323,7 +320,6 @@
interrupts = <0 127 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <128>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x14eb>;
power-domains = <&zynqmp_firmware PD_GDMA>;
#dma-cells = <1>;
@@ -337,7 +333,6 @@
interrupts = <0 128 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <128>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x14ec>;
power-domains = <&zynqmp_firmware PD_GDMA>;
#dma-cells = <1>;
@@ -351,7 +346,6 @@
interrupts = <0 129 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <128>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x14ed>;
power-domains = <&zynqmp_firmware PD_GDMA>;
#dma-cells = <1>;
@@ -365,7 +359,6 @@
interrupts = <0 130 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <128>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x14ee>;
power-domains = <&zynqmp_firmware PD_GDMA>;
#dma-cells = <1>;
@@ -379,7 +372,6 @@
interrupts = <0 131 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <128>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x14ef>;
power-domains = <&zynqmp_firmware PD_GDMA>;
#dma-cells = <1>;
@@ -420,7 +412,6 @@
interrupts = <0 77 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <64>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x868>;
power-domains = <&zynqmp_firmware PD_ADMA>;
#dma-cells = <1>;
@@ -434,7 +425,6 @@
interrupts = <0 78 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <64>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x869>;
power-domains = <&zynqmp_firmware PD_ADMA>;
#dma-cells = <1>;
@@ -448,7 +438,6 @@
interrupts = <0 79 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <64>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x86a>;
power-domains = <&zynqmp_firmware PD_ADMA>;
#dma-cells = <1>;
@@ -462,7 +451,6 @@
interrupts = <0 80 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <64>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x86b>;
power-domains = <&zynqmp_firmware PD_ADMA>;
#dma-cells = <1>;
@@ -476,7 +464,6 @@
interrupts = <0 81 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <64>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x86c>;
power-domains = <&zynqmp_firmware PD_ADMA>;
#dma-cells = <1>;
@@ -490,7 +477,6 @@
interrupts = <0 82 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <64>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x86d>;
power-domains = <&zynqmp_firmware PD_ADMA>;
#dma-cells = <1>;
@@ -504,7 +490,6 @@
interrupts = <0 83 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <64>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x86e>;
power-domains = <&zynqmp_firmware PD_ADMA>;
#dma-cells = <1>;
@@ -518,7 +503,6 @@
interrupts = <0 84 4>;
clock-names = "clk_main", "clk_apb";
xlnx,bus-width = <64>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x86f>;
power-domains = <&zynqmp_firmware PD_ADMA>;
#dma-cells = <1>;
@@ -540,7 +524,6 @@
interrupts = <0 14 4>;
#address-cells = <1>;
#size-cells = <0>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x872>;
power-domains = <&zynqmp_firmware PD_NAND>;
};
@@ -554,7 +537,6 @@
clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
#address-cells = <1>;
#size-cells = <0>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x874>;
power-domains = <&zynqmp_firmware PD_ETH_0>;
resets = <&zynqmp_reset ZYNQMP_RESET_GEM0>;
@@ -569,7 +551,6 @@
clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
#address-cells = <1>;
#size-cells = <0>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x875>;
power-domains = <&zynqmp_firmware PD_ETH_1>;
resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>;
@@ -584,7 +565,6 @@
clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
#address-cells = <1>;
#size-cells = <0>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x876>;
power-domains = <&zynqmp_firmware PD_ETH_2>;
resets = <&zynqmp_reset ZYNQMP_RESET_GEM2>;
@@ -599,7 +579,6 @@
clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
#address-cells = <1>;
#size-cells = <0>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x877>;
power-domains = <&zynqmp_firmware PD_ETH_3>;
resets = <&zynqmp_reset ZYNQMP_RESET_GEM3>;
@@ -676,7 +655,6 @@
<0x0 0x0 0x0 0x2 &pcie_intc 0x2>,
<0x0 0x0 0x0 0x3 &pcie_intc 0x3>,
<0x0 0x0 0x0 0x4 &pcie_intc 0x4>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x4d0>;
power-domains = <&zynqmp_firmware PD_PCIE>;
pcie_intc: legacy-interrupt-controller {
@@ -698,7 +676,6 @@
<0x0 0xc0000000 0x0 0x8000000>;
#address-cells = <1>;
#size-cells = <0>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x873>;
power-domains = <&zynqmp_firmware PD_QSPI>;
};
@@ -730,7 +707,6 @@
interrupts = <0 133 4>;
power-domains = <&zynqmp_firmware PD_SATA>;
resets = <&zynqmp_reset ZYNQMP_RESET_SATA>;
- #stream-id-cells = <4>;
iommus = <&smmu 0x4c0>, <&smmu 0x4c1>,
<&smmu 0x4c2>, <&smmu 0x4c3>;
/* dma-coherent; */
@@ -745,7 +721,6 @@
reg = <0x0 0xff160000 0x0 0x1000>;
clock-names = "clk_xin", "clk_ahb";
xlnx,device_id = <0>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x870>;
#clock-cells = <1>;
clock-output-names = "clk_out_sd0", "clk_in_sd0";
@@ -762,7 +737,6 @@
reg = <0x0 0xff170000 0x0 0x1000>;
clock-names = "clk_xin", "clk_ahb";
xlnx,device_id = <1>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x871>;
#clock-cells = <1>;
clock-output-names = "clk_out_sd1", "clk_in_sd1";
@@ -892,7 +866,6 @@
interrupt-parent = <&gic>;
interrupt-names = "dwc_usb3", "otg", "hiber";
interrupts = <0 65 4>, <0 69 4>, <0 75 4>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x860>;
snps,quirk-frame-length-adjustment = <0x20>;
snps,refclk_fladj;
@@ -924,7 +897,6 @@
interrupt-parent = <&gic>;
interrupt-names = "dwc_usb3", "otg", "hiber";
interrupts = <0 70 4>, <0 74 4>, <0 76 4>;
- #stream-id-cells = <1>;
iommus = <&smmu 0x861>;
snps,quirk-frame-length-adjustment = <0x20>;
snps,refclk_fladj;
--
2.36.1
1
1
add nuvoton BMC npcm750 host configuartion driver
Signed-off-by: Jim Liu <JJLIU0(a)nuvoton.com>
---
Changes for v2:
- add kconfig and use depend for kconfig
---
drivers/misc/Kconfig | 6 ++
drivers/misc/Makefile | 1 +
drivers/misc/npcm_host_intf.c | 110 ++++++++++++++++++++++++++++++++++
3 files changed, 117 insertions(+)
create mode 100644 drivers/misc/npcm_host_intf.c
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 85ae7f62e9..265a7e510d 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -282,6 +282,12 @@ config MXC_OCOTP
Programmable memory pages that are stored on the some
Freescale i.MX processors.
+config NPCM_HOST
+ bool "Enable support espi or LPC for Host"
+ depends on REGMAP && SYSCON
+ help
+ Enable NPCM BMC espi or LPC support for Host reading and writing.
+
config SPL_MXC_OCOTP
bool "Enable MXC OCOTP driver in SPL"
depends on SPL && (ARCH_IMX8M || ARCH_MX6 || ARCH_MX7 || ARCH_MX7ULP || ARCH_VF610)
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 7a6047f64f..51a534d535 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -53,6 +53,7 @@ obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o
obj-$(CONFIG_MPC83XX_SERDES) += mpc83xx_serdes.o
obj-$(CONFIG_$(SPL_)MXC_OCOTP) += mxc_ocotp.o
obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.o
+obj-$(CONFIG_NPCM_HOST) += npcm_host_intf.o
obj-$(CONFIG_NUVOTON_NCT6102D) += nuvoton_nct6102d.o
obj-$(CONFIG_P2SB) += p2sb-uclass.o
obj-$(CONFIG_PCA9551_LED) += pca9551_led.o
diff --git a/drivers/misc/npcm_host_intf.c b/drivers/misc/npcm_host_intf.c
new file mode 100644
index 0000000000..0244e40457
--- /dev/null
+++ b/drivers/misc/npcm_host_intf.c
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Host interface (LPC or eSPI) configuration on Nuvoton BMC
+ * Copyright (c) 2022 Nuvoton Technology Corp.
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <regmap.h>
+#include <syscon.h>
+#include <asm/io.h>
+#include <dm/device_compat.h>
+#include <linux/bitfield.h>
+
+#define SMC_CTL_REG_ADDR 0xc0001001
+#define SMC_CTL_HOSTWAIT 0x80
+
+/* GCR Register Offsets */
+#define HIFCR 0x50
+#define MFSEL1 0x260
+#define MFSEL4 0x26c
+
+/* ESPI Register offsets */
+#define ESPICFG 0x4
+#define ESPIHINDP 0x80
+
+/* MFSEL bit fileds */
+#define MFSEL1_LPCSEL BIT(26)
+#define MFSEL4_ESPISEL BIT(8)
+
+/* ESPICFG bit fileds */
+#define CHSUPP_MASK GENMASK(27, 24)
+#define IOMODE_MASK GENMASK(9, 8)
+#define IOMODE_SDQ FIELD_PREP(IOMODE_MASK, 3)
+#define MAXFREQ_MASK GENMASK(12, 10)
+#define MAXFREQ_33MHZ FIELD_PREP(MAXFREQ_MASK, 2)
+
+/* ESPIHINDP bit fileds */
+#define AUTO_SBLD BIT(4)
+#define AUTO_HS1 BIT(8)
+#define AUTO_HS2 BIT(12)
+#define AUTO_HS3 BIT(16)
+
+static int npcm_host_intf_bind(struct udevice *dev)
+{
+ struct regmap *syscon;
+ void __iomem *base;
+ u32 ch_supp, val;
+ u32 ioaddr;
+ const char *type;
+ int ret;
+
+ /* Release host wait */
+ setbits_8(SMC_CTL_REG_ADDR, SMC_CTL_HOSTWAIT);
+
+ syscon = syscon_regmap_lookup_by_phandle(dev, "syscon");
+ if (IS_ERR(syscon)) {
+ dev_err(dev, "%s: unable to get syscon, dev %s\n", __func__, dev->name);
+ return PTR_ERR(syscon);
+ }
+
+ ioaddr = dev_read_u32_default(dev, "ioaddr", 0);
+ if (ioaddr)
+ regmap_write(syscon, HIFCR, ioaddr);
+
+ type = dev_read_string(dev, "type");
+ if (!type)
+ return -EINVAL;
+
+ if (!strcmp(type, "espi")) {
+ base = dev_read_addr_ptr(dev);
+ if (!base)
+ return -EINVAL;
+
+ ret = dev_read_u32(dev, "channel-support", &ch_supp);
+ if (ret)
+ return ret;
+
+ /* Select eSPI pins function */
+ regmap_update_bits(syscon, MFSEL1, MFSEL1_LPCSEL, 0);
+ regmap_update_bits(syscon, MFSEL4, MFSEL4_ESPISEL, MFSEL4_ESPISEL);
+
+ val = AUTO_SBLD | AUTO_HS1 | AUTO_HS2 | AUTO_HS3 | ch_supp;
+ writel(val, base + ESPIHINDP);
+
+ val = readl(base + ESPICFG);
+ val &= ~(CHSUPP_MASK | IOMODE_MASK | MAXFREQ_MASK);
+ val |= IOMODE_SDQ | MAXFREQ_33MHZ | FIELD_PREP(CHSUPP_MASK, ch_supp);
+ writel(val, base + ESPICFG);
+ } else if (!strcmp(type, "lpc")) {
+ /* Select LPC pin function */
+ regmap_update_bits(syscon, MFSEL4, MFSEL4_ESPISEL, 0);
+ regmap_update_bits(syscon, MFSEL1, MFSEL1_LPCSEL, MFSEL1_LPCSEL);
+ }
+
+ return 0;
+}
+
+static const struct udevice_id npcm_hostintf_ids[] = {
+ { .compatible = "nuvoton,npcm750-host-intf" },
+ { .compatible = "nuvoton,npcm845-host-intf" },
+ { }
+};
+
+U_BOOT_DRIVER(npcm_host_intf) = {
+ .name = "npcm_host_intf",
+ .id = UCLASS_MISC,
+ .of_match = npcm_hostintf_ids,
+ .bind = npcm_host_intf_bind,
+};
--
2.17.1
2
1
These changes get the SDHCI hardware on the AST2600 and AST2500 working
using the same device tree layout as upstream Linux.
The series has been tested on the Qemu models of the ast2500-evb and
ast2600-evb, and tested on the ast2600a3-evb hardware.
(this is a resend as I had a stray comma in the To list that broke
sending the first attempt)
Joel Stanley (9):
ARM: dts: ast2600: Update SDHCI nodes
ARM: dts: ast2500: Update SDHCI nodes
clk/aspeed: Add debug message when clock fails
clk/ast2600: Adjust eMMC clock names
clk/ast2500: Add SD clock
mmc/aspeed: Add debuging for clock probe failures
mmc/aspeed: Probe from controller
mmc/aspeed: Enable controller clocks
config/ast2600: Enable eMMC related boot options
drivers/clk/aspeed/clk_ast2500.c | 26 +++++++++++++++
drivers/clk/aspeed/clk_ast2600.c | 8 ++---
drivers/mmc/aspeed_sdhci.c | 45 +++++++++++++++++++++++--
arch/arm/dts/ast2500-evb.dts | 4 +++
arch/arm/dts/ast2500-u-boot.dtsi | 25 --------------
arch/arm/dts/ast2500.dtsi | 28 ++++++++++++++++
arch/arm/dts/ast2600-evb.dts | 24 ++++++--------
arch/arm/dts/ast2600.dtsi | 57 ++++++++++++++------------------
configs/evb-ast2600_defconfig | 13 ++++++++
drivers/mmc/Kconfig | 1 +
10 files changed, 154 insertions(+), 77 deletions(-)
--
2.35.1
2
10
This set of patches clean up the aspeed i2c support for the ast2500 and
enable the ast2600.
v2:
- fixes the device tree
- adds a new patch that cleans up unnecessary pinctrl nodes
- Adds Ryan's r-b from v1 to the relevant patches
It has been tested in qemu and on the ast2600-evb.
Eddie James (1):
ARM: dts: ast2600: Add I2C pinctrl
Joel Stanley (10):
ARM: dts: ast2600: Add I2C reset properties
ARM: dts: ast2600: Disable I2C nodes by default
ARM: dts: ast2600-evb: Remove redundant pinctrl
ARM: dts: ast2500-evb: Add I2C devices
ARM: dts: ast2600-evb: Add I2C devices
reset/aspeed: Implement status callback
i2c/aspeed: Fix reset control
i2c/aspeed: Add AST2600 compatible
config/ast2600: Enable I2C driver
config/aspeed: Enable EEPROM options
drivers/i2c/ast_i2c.c | 23 +++++++++-----
drivers/reset/reset-ast2500.c | 19 ++++++++++++
drivers/reset/reset-ast2600.c | 17 +++++++++++
arch/arm/dts/ast2500-evb.dts | 19 ++++++++++++
arch/arm/dts/ast2600-evb.dts | 27 +++++++++--------
arch/arm/dts/ast2600.dtsi | 56 +++++++++++++++++++++++++++++++++++
configs/evb-ast2500_defconfig | 3 ++
configs/evb-ast2600_defconfig | 3 ++
8 files changed, 147 insertions(+), 20 deletions(-)
--
2.35.1
2
22
Anytime a new revision of a chip is produced, Texas Instruments
will increment the 4 bit VARIANT section of the CTRLMMR_WKUP_JTAGID
register by one. Typically this will be decoded as SR1.0 -> SR2.0 ...
however a few TI SoCs do not follow this convention.
Rather than defining a revision string array for each SoC, use a
default revision string array for all TI SoCs that continue to follow
the typical 1.0 -> 2.0 revision scheme.
Signed-off-by: Bryan Brattlof <bb(a)ti.com>
---
drivers/soc/soc_ti_k3.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c
index 965728e8185a0..88bf153d9f6a6 100644
--- a/drivers/soc/soc_ti_k3.c
+++ b/drivers/soc/soc_ti_k3.c
@@ -60,8 +60,8 @@ static char *j721e_rev_string_map[] = {
"1.0", "1.1",
};
-static char *am65x_rev_string_map[] = {
- "1.0", "2.0",
+static char *typical_rev_string_map[] = {
+ "1.0", "2.0", "3.0",
};
static const char *get_rev_string(u32 idreg)
@@ -78,16 +78,10 @@ static const char *get_rev_string(u32 idreg)
goto bail;
return j721e_rev_string_map[rev];
- case AM65X:
- if (rev > ARRAY_SIZE(am65x_rev_string_map))
- goto bail;
- return am65x_rev_string_map[rev];
-
- case AM64X:
- case J7200:
default:
- if (!rev)
- return "1.0";
+ if (rev > ARRAY_SIZE(typical_rev_string_map))
+ goto bail;
+ return typical_rev_string_map[rev];
};
bail:
--
2.17.1
2
1