diff options
Diffstat (limited to 'board')
42 files changed, 158 insertions, 213 deletions
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c index 9bea1986d4..7b9c3223ed 100644 --- a/board/Marvell/mvebu_armada-37xx/board.c +++ b/board/Marvell/mvebu_armada-37xx/board.c @@ -44,6 +44,7 @@ DECLARE_GLOBAL_DATA_PTR; /* Switch Port Registers */ #define MVEBU_SW_LINK_CTRL_REG (1) #define MVEBU_SW_PORT_CTRL_REG (4) +#define MVEBU_SW_PORT_BASE_VLAN (6) /* Global 2 Registers */ #define MVEBU_G2_SMI_PHY_CMD_REG (24) @@ -207,8 +208,16 @@ int board_network_enable(struct mii_dev *bus) * FIXME: remove this code once Topaz driver gets available * A3720 Community Board Only * Configure Topaz switch (88E6341) + * Restrict output to ports 1,2,3 only from port 0 (CPU) * Set port 0,1,2,3 to forwarding Mode (through Switch Port registers) */ + mii_multi_chip_mode_write(bus, 1, MVEBU_PORT_CTRL_SMI_ADDR(1), + MVEBU_SW_PORT_BASE_VLAN, BIT(0)); + mii_multi_chip_mode_write(bus, 1, MVEBU_PORT_CTRL_SMI_ADDR(2), + MVEBU_SW_PORT_BASE_VLAN, BIT(0)); + mii_multi_chip_mode_write(bus, 1, MVEBU_PORT_CTRL_SMI_ADDR(3), + MVEBU_SW_PORT_BASE_VLAN, BIT(0)); + mii_multi_chip_mode_write(bus, 1, MVEBU_PORT_CTRL_SMI_ADDR(0), MVEBU_SW_PORT_CTRL_REG, 0x7f); mii_multi_chip_mode_write(bus, 1, MVEBU_PORT_CTRL_SMI_ADDR(1), @@ -234,3 +243,103 @@ int board_network_enable(struct mii_dev *bus) return 0; } + +#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_ENV_IS_IN_SPI_FLASH) +int ft_board_setup(void *blob, struct bd_info *bd) +{ + int ret; + int spi_off; + int parts_off; + int part_off; + + /* Fill SPI MTD partitions for Linux kernel on Espressobin */ + if (!of_machine_is_compatible("marvell,armada-3720-espressobin")) + return 0; + + spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor"); + if (spi_off < 0) + return 0; + + /* Do not touch partitions if they are already defined */ + if (fdt_subnode_offset(blob, spi_off, "partitions") >= 0) + return 0; + + parts_off = fdt_add_subnode(blob, spi_off, "partitions"); + if (parts_off < 0) { + printf("Can't add partitions node: %s\n", fdt_strerror(parts_off)); + return 0; + } + + ret = fdt_setprop_string(blob, parts_off, "compatible", "fixed-partitions"); + if (ret < 0) { + printf("Can't set compatible property: %s\n", fdt_strerror(ret)); + return 0; + } + + ret = fdt_setprop_u32(blob, parts_off, "#address-cells", 1); + if (ret < 0) { + printf("Can't set #address-cells property: %s\n", fdt_strerror(ret)); + return 0; + } + + ret = fdt_setprop_u32(blob, parts_off, "#size-cells", 1); + if (ret < 0) { + printf("Can't set #size-cells property: %s\n", fdt_strerror(ret)); + return 0; + } + + /* Add u-boot-env partition */ + + part_off = fdt_add_subnode(blob, parts_off, "partition@u-boot-env"); + if (part_off < 0) { + printf("Can't add partition@u-boot-env node: %s\n", fdt_strerror(part_off)); + return 0; + } + + ret = fdt_setprop_u32(blob, part_off, "reg", CONFIG_ENV_OFFSET); + if (ret < 0) { + printf("Can't set partition@u-boot-env reg property: %s\n", fdt_strerror(ret)); + return 0; + } + + ret = fdt_appendprop_u32(blob, part_off, "reg", CONFIG_ENV_SIZE); + if (ret < 0) { + printf("Can't set partition@u-boot-env reg property: %s\n", fdt_strerror(ret)); + return 0; + } + + ret = fdt_setprop_string(blob, part_off, "label", "u-boot-env"); + if (ret < 0) { + printf("Can't set partition@u-boot-env label property: %s\n", fdt_strerror(ret)); + return 0; + } + + /* Add firmware partition */ + + part_off = fdt_add_subnode(blob, parts_off, "partition@firmware"); + if (part_off < 0) { + printf("Can't add partition@firmware node: %s\n", fdt_strerror(part_off)); + return 0; + } + + ret = fdt_setprop_u32(blob, part_off, "reg", 0); + if (ret < 0) { + printf("Can't set partition@firmware reg property: %s\n", fdt_strerror(ret)); + return 0; + } + + ret = fdt_appendprop_u32(blob, part_off, "reg", CONFIG_ENV_OFFSET); + if (ret < 0) { + printf("Can't set partition@firmware reg property: %s\n", fdt_strerror(ret)); + return 0; + } + + ret = fdt_setprop_string(blob, part_off, "label", "firmware"); + if (ret < 0) { + printf("Can't set partition@firmware label property: %s\n", fdt_strerror(ret)); + return 0; + } + + return 0; +} +#endif diff --git a/board/advantech/som-db5800-som-6867/Makefile b/board/advantech/som-db5800-som-6867/Makefile index 0524766bb7..7975547f41 100644 --- a/board/advantech/som-db5800-som-6867/Makefile +++ b/board/advantech/som-db5800-som-6867/Makefile @@ -2,5 +2,5 @@ # # Copyright (C) 2015, Google, Inc -obj-y += som-db5800-som-6867.o start.o +obj-y += som-db5800-som-6867.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o diff --git a/board/advantech/som-db5800-som-6867/start.S b/board/advantech/som-db5800-som-6867/start.S deleted file mode 100644 index 65d1f7e961..0000000000 --- a/board/advantech/som-db5800-som-6867/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2015, Google, Inc - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c index 7d62a1d5a8..973bc5a927 100644 --- a/board/amazon/kc1/kc1.c +++ b/board/amazon/kc1/kc1.c @@ -8,6 +8,7 @@ #include <config.h> #include <common.h> #include <env.h> +#include <fastboot.h> #include <init.h> #include <linux/ctype.h> #include <linux/usb/musb.h> @@ -163,8 +164,11 @@ void get_board_serial(struct tag_serialnr *serialnr) omap_die_id_get_board_serial(serialnr); } -int fastboot_set_reboot_flag(void) +int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { + if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) + return -ENOTSUPP; + return omap_reboot_mode_store("b"); } diff --git a/board/congatec/conga-qeval20-qa3-e3845/Makefile b/board/congatec/conga-qeval20-qa3-e3845/Makefile index 2f04828a27..451a4fcd6c 100644 --- a/board/congatec/conga-qeval20-qa3-e3845/Makefile +++ b/board/congatec/conga-qeval20-qa3-e3845/Makefile @@ -2,5 +2,5 @@ # # Copyright (C) 2015, Google, Inc -obj-y += conga-qeval20-qa3.o start.o +obj-y += conga-qeval20-qa3.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o diff --git a/board/congatec/conga-qeval20-qa3-e3845/start.S b/board/congatec/conga-qeval20-qa3-e3845/start.S deleted file mode 100644 index 65d1f7e961..0000000000 --- a/board/congatec/conga-qeval20-qa3-e3845/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2015, Google, Inc - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/coreboot/coreboot/Makefile b/board/coreboot/coreboot/Makefile index 8db7cc62f3..d292b7032c 100644 --- a/board/coreboot/coreboot/Makefile +++ b/board/coreboot/coreboot/Makefile @@ -10,4 +10,4 @@ # (C) Copyright 2002 # Daniel Engström, Omicron Ceti AB, daniel@omicron.se. -obj-y += start.o coreboot.o +obj-y += coreboot.o diff --git a/board/coreboot/coreboot/start.S b/board/coreboot/coreboot/start.S deleted file mode 100644 index aa702622d4..0000000000 --- a/board/coreboot/coreboot/start.S +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (c) 2011 The Chromium OS Authors. - * (C) Copyright 2008 - * Graeme Russ, graeme.russ@gmail.com. - */ - -/* board early intialization */ -.globl early_board_init -early_board_init: - /* No 32-bit board specific initialisation */ - jmp early_board_init_ret diff --git a/board/dfi/dfi-bt700/Makefile b/board/dfi/dfi-bt700/Makefile index 99cf357b70..50d88f2954 100644 --- a/board/dfi/dfi-bt700/Makefile +++ b/board/dfi/dfi-bt700/Makefile @@ -2,5 +2,5 @@ # # Copyright (C) 2015, Google, Inc -obj-y += dfi-bt700.o start.o +obj-y += dfi-bt700.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o diff --git a/board/dfi/dfi-bt700/start.S b/board/dfi/dfi-bt700/start.S deleted file mode 100644 index 65d1f7e961..0000000000 --- a/board/dfi/dfi-bt700/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2015, Google, Inc - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/efi/efi-x86_payload/Makefile b/board/efi/efi-x86_payload/Makefile index 00ef69534d..a4ebc85aa5 100644 --- a/board/efi/efi-x86_payload/Makefile +++ b/board/efi/efi-x86_payload/Makefile @@ -2,4 +2,4 @@ # # Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> -obj-y += start.o payload.o +obj-y += payload.o diff --git a/board/efi/efi-x86_payload/start.S b/board/efi/efi-x86_payload/start.S deleted file mode 100644 index f7eaa7cb12..0000000000 --- a/board/efi/efi-x86_payload/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/emulation/qemu-x86/Makefile b/board/emulation/qemu-x86/Makefile index 782e298b74..ff4aaa51c5 100644 --- a/board/emulation/qemu-x86/Makefile +++ b/board/emulation/qemu-x86/Makefile @@ -2,4 +2,4 @@ # # Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> -obj-y += start.o +obj-y += qemu-x86.o diff --git a/board/emulation/qemu-x86/qemu-x86.c b/board/emulation/qemu-x86/qemu-x86.c new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/board/emulation/qemu-x86/qemu-x86.c diff --git a/board/emulation/qemu-x86/start.S b/board/emulation/qemu-x86/start.S deleted file mode 100644 index e4bde561b2..0000000000 --- a/board/emulation/qemu-x86/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/google/chromebook_coral/Kconfig b/board/google/chromebook_coral/Kconfig index 940bee89b0..27671958e1 100644 --- a/board/google/chromebook_coral/Kconfig +++ b/board/google/chromebook_coral/Kconfig @@ -18,6 +18,7 @@ config SYS_TEXT_BASE config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select X86_RESET_VECTOR + select USE_EARLY_BOARD_INIT select INTEL_APOLLOLAKE select BOARD_ROMSIZE_KB_16384 diff --git a/board/google/chromebook_link/Kconfig b/board/google/chromebook_link/Kconfig index 944716d002..dd29ddf694 100644 --- a/board/google/chromebook_link/Kconfig +++ b/board/google/chromebook_link/Kconfig @@ -19,6 +19,7 @@ config SYS_TEXT_BASE config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select X86_RESET_VECTOR + select USE_EARLY_BOARD_INIT select NORTHBRIDGE_INTEL_IVYBRIDGE select HAVE_INTEL_ME select BOARD_ROMSIZE_KB_8192 diff --git a/board/google/chromebook_samus/Kconfig b/board/google/chromebook_samus/Kconfig index 90c23cba1b..9f66d79988 100644 --- a/board/google/chromebook_samus/Kconfig +++ b/board/google/chromebook_samus/Kconfig @@ -19,6 +19,7 @@ config SYS_TEXT_BASE config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select X86_RESET_VECTOR + select USE_EARLY_BOARD_INIT select INTEL_BROADWELL select HAVE_INTEL_ME select BOARD_ROMSIZE_KB_8192 diff --git a/board/intel/bayleybay/Makefile b/board/intel/bayleybay/Makefile index e0553f1462..d19447184a 100644 --- a/board/intel/bayleybay/Makefile +++ b/board/intel/bayleybay/Makefile @@ -2,5 +2,5 @@ # # Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> -obj-y += bayleybay.o start.o +obj-y += bayleybay.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o diff --git a/board/intel/bayleybay/start.S b/board/intel/bayleybay/start.S deleted file mode 100644 index e4bde561b2..0000000000 --- a/board/intel/bayleybay/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/intel/cherryhill/Makefile b/board/intel/cherryhill/Makefile index b09581a919..ff6e14836a 100644 --- a/board/intel/cherryhill/Makefile +++ b/board/intel/cherryhill/Makefile @@ -2,4 +2,4 @@ # # Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com> -obj-y += cherryhill.o start.o +obj-y += cherryhill.o diff --git a/board/intel/cherryhill/start.S b/board/intel/cherryhill/start.S deleted file mode 100644 index 2e3e7f8409..0000000000 --- a/board/intel/cherryhill/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com> - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/intel/cougarcanyon2/Makefile b/board/intel/cougarcanyon2/Makefile index 75cc508f4e..13b19ae653 100644 --- a/board/intel/cougarcanyon2/Makefile +++ b/board/intel/cougarcanyon2/Makefile @@ -2,4 +2,4 @@ # # Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com> -obj-y += cougarcanyon2.o start.o +obj-y += cougarcanyon2.o diff --git a/board/intel/cougarcanyon2/start.S b/board/intel/cougarcanyon2/start.S deleted file mode 100644 index 8521800921..0000000000 --- a/board/intel/cougarcanyon2/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com> - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/intel/crownbay/Makefile b/board/intel/crownbay/Makefile index b52c69aeaa..6abd3eeb55 100644 --- a/board/intel/crownbay/Makefile +++ b/board/intel/crownbay/Makefile @@ -2,4 +2,4 @@ # # Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com> -obj-y += crownbay.o start.o +obj-y += crownbay.o diff --git a/board/intel/crownbay/start.S b/board/intel/crownbay/start.S deleted file mode 100644 index 7faa7d05fa..0000000000 --- a/board/intel/crownbay/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com> - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/intel/edison/Makefile b/board/intel/edison/Makefile index eed8d65eb6..1eaf7ca7f8 100644 --- a/board/intel/edison/Makefile +++ b/board/intel/edison/Makefile @@ -4,5 +4,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += start.o edison.o +obj-y += edison.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o diff --git a/board/intel/edison/start.S b/board/intel/edison/start.S deleted file mode 100644 index aa702622d4..0000000000 --- a/board/intel/edison/start.S +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (c) 2011 The Chromium OS Authors. - * (C) Copyright 2008 - * Graeme Russ, graeme.russ@gmail.com. - */ - -/* board early intialization */ -.globl early_board_init -early_board_init: - /* No 32-bit board specific initialisation */ - jmp early_board_init_ret diff --git a/board/intel/galileo/Makefile b/board/intel/galileo/Makefile index e8f58bff9a..4130bb0236 100644 --- a/board/intel/galileo/Makefile +++ b/board/intel/galileo/Makefile @@ -2,5 +2,5 @@ # # Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> -obj-y += galileo.o start.o +obj-y += galileo.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o diff --git a/board/intel/galileo/start.S b/board/intel/galileo/start.S deleted file mode 100644 index e4bde561b2..0000000000 --- a/board/intel/galileo/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/intel/minnowmax/Makefile b/board/intel/minnowmax/Makefile index 989344df1c..d339b5ad0a 100644 --- a/board/intel/minnowmax/Makefile +++ b/board/intel/minnowmax/Makefile @@ -2,5 +2,5 @@ # # Copyright (C) 2015, Google, Inc -obj-y += minnowmax.o start.o +obj-y += minnowmax.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o diff --git a/board/intel/minnowmax/start.S b/board/intel/minnowmax/start.S deleted file mode 100644 index 65d1f7e961..0000000000 --- a/board/intel/minnowmax/start.S +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2015, Google, Inc - */ - -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/intel/slimbootloader/Makefile b/board/intel/slimbootloader/Makefile index fd8fa98a8d..50330cc6e5 100644 --- a/board/intel/slimbootloader/Makefile +++ b/board/intel/slimbootloader/Makefile @@ -2,4 +2,4 @@ # # Copyright (C) 2019 Intel Corporation <www.intel.com> -obj-y += start.o slimbootloader.o +obj-y += slimbootloader.o diff --git a/board/intel/slimbootloader/start.S b/board/intel/slimbootloader/start.S deleted file mode 100644 index 5c3f3df09e..0000000000 --- a/board/intel/slimbootloader/start.S +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Intel Corporation <www.intel.com> - */ - -/* board early initialization */ -.globl early_board_init -early_board_init: - jmp early_board_init_ret diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c index b08a267c52..dff159025b 100644 --- a/board/lg/sniper/sniper.c +++ b/board/lg/sniper/sniper.c @@ -9,6 +9,7 @@ #include <common.h> #include <dm.h> #include <env.h> +#include <fastboot.h> #include <init.h> #include <linux/ctype.h> #include <linux/usb/musb.h> @@ -175,8 +176,11 @@ void reset_misc(void) omap_reboot_mode_store(reboot_mode); } -int fastboot_set_reboot_flag(void) +int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { + if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) + return -ENOTSUPP; + return omap_reboot_mode_store("b"); } diff --git a/board/seco/Kconfig b/board/seco/Kconfig index af1669733f..12dd965ad5 100644 --- a/board/seco/Kconfig +++ b/board/seco/Kconfig @@ -21,15 +21,15 @@ choice config SECOMX6Q bool "i.MX6Q" - select MX6Q + depends on MX6Q config SECOMX6DL bool "i.MX6DL" - select MX6DL + depends on MX6DL config SECOMX6S bool "i.MX6S" - select MX6S + depends on MX6S endchoice diff --git a/board/tbs/tbs2910/Kconfig b/board/tbs/tbs2910/Kconfig index 2e5e1d492a..d0ff2191a8 100644 --- a/board/tbs/tbs2910/Kconfig +++ b/board/tbs/tbs2910/Kconfig @@ -9,9 +9,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "tbs2910" -config MX6Q - default y - config IMX_CONFIG default "board/tbs/tbs2910/tbs2910.cfg" diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c index 5d6be26faa..126823fce0 100644 --- a/board/technexion/pico-imx6ul/pico-imx6ul.c +++ b/board/technexion/pico-imx6ul/pico-imx6ul.c @@ -18,7 +18,6 @@ #include <asm/io.h> #include <common.h> #include <miiphy.h> -#include <netdev.h> #include <linux/delay.h> #include <linux/sizes.h> #include <usb.h> @@ -39,61 +38,9 @@ DECLARE_GLOBAL_DATA_PTR; #define MDIO_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \ PAD_CTL_DSE_48ohm | PAD_CTL_SRE_FAST | PAD_CTL_ODE) -#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \ - PAD_CTL_SPEED_HIGH | \ - PAD_CTL_DSE_48ohm | PAD_CTL_SRE_FAST) - -#define ENET_CLK_PAD_CTRL (PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) - #define LCD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \ PAD_CTL_PKE | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm) -#define RMII_PHY_RESET IMX_GPIO_NR(1, 28) - -static iomux_v3_cfg_t const fec_pads[] = { - MX6_PAD_ENET1_TX_EN__ENET2_MDC | MUX_PAD_CTRL(MDIO_PAD_CTRL), - MX6_PAD_ENET1_TX_DATA1__ENET2_MDIO | MUX_PAD_CTRL(MDIO_PAD_CTRL), - MX6_PAD_ENET2_TX_DATA0__ENET2_TDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET2_TX_DATA1__ENET2_TDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL), - MX6_PAD_ENET2_TX_EN__ENET2_TX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET2_RX_DATA0__ENET2_RDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET2_RX_DATA1__ENET2_RDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET2_RX_EN__ENET2_RX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET2_RX_ER__ENET2_RX_ER | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_UART4_TX_DATA__GPIO1_IO28 | MUX_PAD_CTRL(NO_PAD_CTRL), -}; - -static void setup_iomux_fec(void) -{ - imx_iomux_v3_setup_multiple_pads(fec_pads, ARRAY_SIZE(fec_pads)); -} - -int board_eth_init(struct bd_info *bis) -{ - setup_iomux_fec(); - - gpio_request(RMII_PHY_RESET, "enet_phy_reset"); - gpio_direction_output(RMII_PHY_RESET, 0); - /* - * According to KSZ8081MNX-RNB manual: - * For warm reset, the reset (RST#) pin should be asserted low for a - * minimum of 500μs. The strap-in pin values are read and updated - * at the de-assertion of reset. - */ - udelay(500); - - gpio_direction_output(RMII_PHY_RESET, 1); - /* - * According to KSZ8081MNX-RNB manual: - * After the de-assertion of reset, wait a minimum of 100μs before - * starting programming on the MIIM (MDC/MDIO) interface. - */ - udelay(100); - - return fecmxc_initialize(bis); -} - static int setup_fec(void) { struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 69dce70a60..7809875510 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -9,6 +9,7 @@ #include <common.h> #include <env.h> +#include <fastboot.h> #include <fdt_support.h> #include <image.h> #include <init.h> @@ -1172,8 +1173,11 @@ int board_fit_config_name_match(const char *name) #endif #if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) -int fastboot_set_reboot_flag(void) +int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { + if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) + return -ENOTSUPP; + printf("Setting reboot to fastboot flag ...\n"); env_set("dofastboot", "1"); env_save(); diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index e09ecda4d7..8b3b4bc825 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -113,18 +113,15 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, /* Corrupted data??? */ if (hdr_read != header) { - rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4); /* * read the eeprom header using i2c again, but use only a * 1 byte address (some legacy boards need this..) */ - if (rc) { - rc = i2c_set_chip_offset_len(dev, 1); - if (rc) - return rc; + rc = i2c_set_chip_offset_len(dev, 1); + if (rc) + return rc; - rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4); - } + rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4); if (rc) return rc; } @@ -153,16 +150,13 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, /* Corrupted data??? */ if (hdr_read != header) { - rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, 4); /* * read the eeprom header using i2c again, but use only a * 1 byte address (some legacy boards need this..) */ byte = 1; - if (rc) { - rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, - 4); - } + rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, + 4); if (rc) return rc; } diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 5ae179f69b..ca1976e16a 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -12,6 +12,7 @@ #include <common.h> #include <env.h> #include <fdt_support.h> +#include <fastboot.h> #include <image.h> #include <init.h> #include <spl.h> @@ -1050,8 +1051,11 @@ int board_fit_config_name_match(const char *name) #endif #if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) -int fastboot_set_reboot_flag(void) +int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { + if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) + return -ENOTSUPP; + printf("Setting reboot to fastboot flag ...\n"); env_set("dofastboot", "1"); env_save(); diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig index 084fdb5230..0cf6d83038 100644 --- a/board/tqc/tqma6/Kconfig +++ b/board/tqc/tqma6/Kconfig @@ -18,19 +18,19 @@ choice config TQMA6Q bool "TQMa6Q / TQMa6D" - select MX6Q + depends on MX6Q help select TQMa6Q / TQMa6D with i.MX6Q/D and 1GiB DRAM config TQMA6DL bool "TQMa6DL" - select MX6DL + depends on MX6DL help select TQMa6DL with i.MX6DL and 1GiB DRAM config TQMA6S bool "TQMa6S" - select MX6S + depends on MX6S help select TQMa6S with i.MX6S and 512 MiB DRAM |