From de58694f0d5431627d7389f50a6b2034a682ba24 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Fri, 10 Feb 2023 11:25:07 +0100 Subject: ARM: meson: odroid-go-ultra: setup PMIC regulators are board init The Odroid Go Ultra has 2 chained PMICs RK818 and RK818, and needs an adjustment on the BUCK and LDO values. Add the initial regulators values in -u-boot.dtsi & run the initial regulator setup in a new odroid-go-ultra board. Proper OTG and BOOST regulators are still missing to have USB-A host properly working. Link: https://lore.kernel.org/r/20230210-u-boot-odroid-go-ultra-pmics-setup-v1-1-1f16d62b76af@linaro.org Signed-off-by: Neil Armstrong --- board/amlogic/odroid-go-ultra/MAINTAINERS | 7 +++++++ board/amlogic/odroid-go-ultra/Makefile | 5 +++++ board/amlogic/odroid-go-ultra/odroid-go-ultra.c | 22 ++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 board/amlogic/odroid-go-ultra/MAINTAINERS create mode 100644 board/amlogic/odroid-go-ultra/Makefile create mode 100644 board/amlogic/odroid-go-ultra/odroid-go-ultra.c (limited to 'board') diff --git a/board/amlogic/odroid-go-ultra/MAINTAINERS b/board/amlogic/odroid-go-ultra/MAINTAINERS new file mode 100644 index 00000000000..c22951b4e71 --- /dev/null +++ b/board/amlogic/odroid-go-ultra/MAINTAINERS @@ -0,0 +1,7 @@ +ODROID-GO-ULTRA +M: Neil Armstrong +S: Maintained +L: u-boot-amlogic@groups.io +F: board/amlogic/odroid-go-ultra +F: configs/odroid-go-ultra_defconfig +F: doc/board/amlogic/odroid-go-ultra.rst diff --git a/board/amlogic/odroid-go-ultra/Makefile b/board/amlogic/odroid-go-ultra/Makefile new file mode 100644 index 00000000000..8ebaa0c215a --- /dev/null +++ b/board/amlogic/odroid-go-ultra/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2023 Neil Armstrong + +obj-y := odroid-go-ultra.o diff --git a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c new file mode 100644 index 00000000000..bbd23e20fcd --- /dev/null +++ b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2023 Neil Armstrong + */ + +#include +#include +#include + +int mmc_get_env_dev(void) +{ + if (meson_get_boot_device() == BOOT_DEVICE_EMMC) + return 1; + return 0; +} + +int board_init(void) +{ + regulators_enable_boot_on(_DEBUG); + + return 0; +} -- cgit v1.3.1 From 6d0642494993f39440a4d6e95f88c0456ee6d689 Mon Sep 17 00:00:00 2001 From: Antoine Mazeas Date: Fri, 19 Aug 2022 10:56:45 +0200 Subject: rpi: Copy properties from firmware dtb to the loaded dtb The RPI firmware adjusts several property values in the dtb it passes to u-boot depending on the board/SoC revision. Inherit some of these when u-boot loads a dtb itself. Specificaly copy: * /model: The firmware provides a more specific string * /memreserve: The firmware defines a reserved range, better keep it * emmc2bus and pcie0 dma-ranges: The C0T revision of the bcm2711 Soc (as present on rpi 400 and some rpi 4B boards) has different values for these then the B0T revision. So these need to be adjusted to boot on these boards * blconfig: The firmware defines the memory area where the blconfig stored. Copy those over so it can be enabled. * /chosen/kaslr-seed: The firmware generates a kaslr seed, take advantage of that. Signed-off-by: Sjoerd Simons Signed-off-by: Antoine Mazeas Reviewed-by: Simon Glass Signed-off-by: Peter Robinson --- board/raspberrypi/rpi/rpi.c | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'board') diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 8603c93de77..d4b059c6204 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -503,10 +503,58 @@ void *board_fdt_blob_setup(int *err) return (void *)fw_dtb_pointer; } +int copy_property(void *dst, void *src, char *path, char *property) +{ + int dst_offset, src_offset; + const fdt32_t *prop; + int len; + + src_offset = fdt_path_offset(src, path); + dst_offset = fdt_path_offset(dst, path); + + if (src_offset < 0 || dst_offset < 0) + return -1; + + prop = fdt_getprop(src, src_offset, property, &len); + if (!prop) + return -1; + + return fdt_setprop(dst, dst_offset, property, prop, len); +} + +/* Copy tweaks from the firmware dtb to the loaded dtb */ +void update_fdt_from_fw(void *fdt, void *fw_fdt) +{ + /* Using dtb from firmware directly; leave it alone */ + if (fdt == fw_fdt) + return; + + /* The firmware provides a more precie model; so copy that */ + copy_property(fdt, fw_fdt, "/", "model"); + + /* memory reserve as suggested by the firmware */ + copy_property(fdt, fw_fdt, "/", "memreserve"); + + /* Adjust dma-ranges for the SD card and PCI bus as they can depend on + * the SoC revision + */ + copy_property(fdt, fw_fdt, "emmc2bus", "dma-ranges"); + copy_property(fdt, fw_fdt, "pcie0", "dma-ranges"); + + /* Bootloader configuration template exposes as nvmem */ + if (copy_property(fdt, fw_fdt, "blconfig", "reg") == 0) + copy_property(fdt, fw_fdt, "blconfig", "status"); + + /* kernel address randomisation seed as provided by the firmware */ + copy_property(fdt, fw_fdt, "/chosen", "kaslr-seed"); +} + int ft_board_setup(void *blob, struct bd_info *bd) { int node; + update_fdt_from_fw(blob, (void *)fw_dtb_pointer); + node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer"); if (node < 0) fdt_simplefb_add_node(blob); -- cgit v1.3.1 From 4a45086c0ca874858d4064ee26d45199bcab494d Mon Sep 17 00:00:00 2001 From: Antoine Mazeas Date: Fri, 19 Aug 2022 10:56:46 +0200 Subject: rpi: Copy eth PHY address from fw DT to loaded DT Some Raspberry Pi 400 boards, specifically rev 1.1, have a different address for the ethernet PHY device than what is provided by the kernel DTB. The correct address is provided by the firmware, so we should carry it over into the loaded device tree so that ethernet works on such boards. Signed-off-by: Antoine Mazeas Signed-off-by: Peter Robinson --- board/raspberrypi/rpi/rpi.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'board') diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index d4b059c6204..fc1fffedfb7 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -547,6 +547,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) /* kernel address randomisation seed as provided by the firmware */ copy_property(fdt, fw_fdt, "/chosen", "kaslr-seed"); + + /* address of the PHY device as provided by the firmware */ + copy_property(fdt, fw_fdt, "ethernet0/mdio@e14/ethernet-phy@1", "reg"); } int ft_board_setup(void *blob, struct bd_info *bd) -- cgit v1.3.1 From 0e8c94054fd80535e868900deb978a9a1ebcab67 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 28 Feb 2023 10:17:26 +0000 Subject: rpi: Update the RPi Zero 2W DT filename Update the Raspberry Pi Zero 2W device tree file name to match what landed upstream. Signed-off-by: Peter Robinson --- board/raspberrypi/rpi/rpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index fc1fffedfb7..1057ebb9948 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -158,7 +158,7 @@ static const struct rpi_model rpi_models_new_scheme[] = { }, [0x12] = { "Zero 2 W", - DTB_DIR "bcm2837-rpi-zero-2.dtb", + DTB_DIR "bcm2837-rpi-zero-2-w.dtb", false, }, [0x13] = { -- cgit v1.3.1 From 461cca79972dd9737432860cfe63ce8b3a2d0535 Mon Sep 17 00:00:00 2001 From: Angelo Dureghello Date: Mon, 6 Feb 2023 22:54:37 +0100 Subject: board: stmark2: fix clock value Fix totally blank console at boot, clock value must be decimal, as for the 30Mhz external crystal. Fixes: 26e5944ec90c ("stmark2: Migrate CONFIG_SYS_EXTRA_OPTIONS to Kconfig") Signed-off-by: Angelo Dureghello Reviewed-by: Tom Rini --- board/sysam/stmark2/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/sysam/stmark2/Kconfig b/board/sysam/stmark2/Kconfig index b2595059c68..94f5049c94d 100644 --- a/board/sysam/stmark2/Kconfig +++ b/board/sysam/stmark2/Kconfig @@ -11,7 +11,7 @@ config SERIAL_BOOT depends on CF_SBF config SYS_INPUT_CLKSRC - hex + int "External crystal clock" default 30000000 config SYS_CPU -- cgit v1.3.1 From 7ff7b46e6ce44b2ee09647a928ce1021c3c8a66e Mon Sep 17 00:00:00 2001 From: Angelo Dureghello Date: Sat, 25 Feb 2023 23:25:26 +0100 Subject: m68k: rename CONFIG_MCFTMR to CFG_MCFTMR This is not a Kconfig option so changing to _CFG. Signed-off-by: Angelo Durgehello --- arch/m68k/cpu/mcf523x/interrupts.c | 2 +- arch/m68k/cpu/mcf52x2/interrupts.c | 12 ++++++------ arch/m68k/cpu/mcf532x/interrupts.c | 2 +- arch/m68k/cpu/mcf5445x/interrupts.c | 2 +- arch/m68k/include/asm/immap.h | 24 ++++++++++++------------ arch/m68k/lib/time.c | 4 ++-- board/freescale/m53017evb/README | 2 +- board/freescale/m5373evb/README | 2 +- configs/M5208EVBE_defconfig | 1 - configs/M5235EVB_Flash32_defconfig | 1 - configs/M5235EVB_defconfig | 1 - configs/M5249EVB_defconfig | 1 - configs/M5253DEMO_defconfig | 1 - configs/M5272C3_defconfig | 1 - configs/M5275EVB_defconfig | 1 - configs/M5282EVB_defconfig | 1 - configs/M53017EVB_defconfig | 1 - configs/M5329AFEE_defconfig | 1 - configs/M5329BFEE_defconfig | 1 - configs/M5373EVB_defconfig | 1 - configs/amcore_defconfig | 1 - configs/astro_mcf5373l_defconfig | 1 - configs/cobra5272_defconfig | 1 - configs/eb_cpu5282_defconfig | 1 - configs/eb_cpu5282_internal_defconfig | 1 - configs/stmark2_defconfig | 1 - include/configs/M5208EVBE.h | 2 ++ include/configs/M5235EVB.h | 2 ++ include/configs/M5249EVB.h | 2 ++ include/configs/M5253DEMO.h | 2 ++ include/configs/M5272C3.h | 3 +++ include/configs/M5275EVB.h | 2 ++ include/configs/M5282EVB.h | 2 ++ include/configs/M53017EVB.h | 2 ++ include/configs/M5329EVB.h | 2 ++ include/configs/M5373EVB.h | 2 ++ include/configs/amcore.h | 2 +- include/configs/astro_mcf5373l.h | 2 ++ include/configs/cobra5272.h | 2 ++ include/configs/eb_cpu5282.h | 2 ++ include/configs/stmark2.h | 2 ++ 41 files changed, 55 insertions(+), 44 deletions(-) (limited to 'board') diff --git a/arch/m68k/cpu/mcf523x/interrupts.c b/arch/m68k/cpu/mcf523x/interrupts.c index 331288e0060..b02ea29f635 100644 --- a/arch/m68k/cpu/mcf523x/interrupts.c +++ b/arch/m68k/cpu/mcf523x/interrupts.c @@ -22,7 +22,7 @@ int interrupt_init(void) return 0; } -#if defined(CONFIG_MCFTMR) +#if defined(CFG_MCFTMR) void dtimer_intr_setup(void) { int0_t *intp = (int0_t *) (CFG_SYS_INTR_BASE); diff --git a/arch/m68k/cpu/mcf52x2/interrupts.c b/arch/m68k/cpu/mcf52x2/interrupts.c index e8a1e132d27..e787c7605f8 100644 --- a/arch/m68k/cpu/mcf52x2/interrupts.c +++ b/arch/m68k/cpu/mcf52x2/interrupts.c @@ -34,7 +34,7 @@ int interrupt_init(void) return 0; } -#if defined(CONFIG_MCFTMR) +#if defined(CFG_MCFTMR) void dtimer_intr_setup(void) { intctrl_t *intp = (intctrl_t *) (CFG_SYS_INTR_BASE); @@ -42,7 +42,7 @@ void dtimer_intr_setup(void) clrbits_be32(&intp->int_icr1, INT_ICR1_TMR3MASK); setbits_be32(&intp->int_icr1, CFG_SYS_TMRINTR_PRI); } -#endif /* CONFIG_MCFTMR */ +#endif /* CFG_MCFTMR */ #endif /* CONFIG_M5272 */ #if defined(CONFIG_M5208) || defined(CONFIG_M5282) || \ @@ -63,7 +63,7 @@ int interrupt_init(void) return 0; } -#if defined(CONFIG_MCFTMR) +#if defined(CFG_MCFTMR) void dtimer_intr_setup(void) { int0_t *intp = (int0_t *) (CFG_SYS_INTR_BASE); @@ -72,7 +72,7 @@ void dtimer_intr_setup(void) clrbits_be32(&intp->imrl0, 0x00000001); clrbits_be32(&intp->imrl0, CFG_SYS_TMRINTR_MASK); } -#endif /* CONFIG_MCFTMR */ +#endif /* CFG_MCFTMR */ #endif /* CONFIG_M5282 | CONFIG_M5271 | CONFIG_M5275 */ #if defined(CONFIG_M5249) || defined(CONFIG_M5253) @@ -83,11 +83,11 @@ int interrupt_init(void) return 0; } -#if defined(CONFIG_MCFTMR) +#if defined(CFG_MCFTMR) void dtimer_intr_setup(void) { mbar_writeLong(MCFSIM_IMR, mbar_readLong(MCFSIM_IMR) & ~0x00000400); mbar_writeByte(MCFSIM_TIMER2ICR, CFG_SYS_TMRINTR_PRI); } -#endif /* CONFIG_MCFTMR */ +#endif /* CFG_MCFTMR */ #endif /* CONFIG_M5249 || CONFIG_M5253 */ diff --git a/arch/m68k/cpu/mcf532x/interrupts.c b/arch/m68k/cpu/mcf532x/interrupts.c index 64e04664a52..bbe823c0cf7 100644 --- a/arch/m68k/cpu/mcf532x/interrupts.c +++ b/arch/m68k/cpu/mcf532x/interrupts.c @@ -23,7 +23,7 @@ int interrupt_init(void) return 0; } -#if defined(CONFIG_MCFTMR) +#if defined(CFG_MCFTMR) void dtimer_intr_setup(void) { int0_t *intp = (int0_t *) (CFG_SYS_INTR_BASE); diff --git a/arch/m68k/cpu/mcf5445x/interrupts.c b/arch/m68k/cpu/mcf5445x/interrupts.c index ea0cf87990c..fb80a879c7e 100644 --- a/arch/m68k/cpu/mcf5445x/interrupts.c +++ b/arch/m68k/cpu/mcf5445x/interrupts.c @@ -26,7 +26,7 @@ int interrupt_init(void) return 0; } -#if defined(CONFIG_MCFTMR) +#if defined(CFG_MCFTMR) void dtimer_intr_setup(void) { int0_t *intp = (int0_t *) (CFG_SYS_INTR_BASE); diff --git a/arch/m68k/include/asm/immap.h b/arch/m68k/include/asm/immap.h index 8207c8d5b73..74516cc6219 100644 --- a/arch/m68k/include/asm/immap.h +++ b/arch/m68k/include/asm/immap.h @@ -16,7 +16,7 @@ #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x4000)) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR1) #define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprh0) @@ -38,7 +38,7 @@ #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40)) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR3) #define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprl0) @@ -63,7 +63,7 @@ #define CFG_SYS_NUM_IRQS (64) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR1) #define CFG_SYS_TMRPND_REG (mbar_readLong(MCFSIM_IPR)) @@ -86,7 +86,7 @@ #define CFG_SYS_NUM_IRQS (64) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR1) #define CFG_SYS_TMRPND_REG (mbar_readLong(MCFSIM_IPR)) @@ -105,7 +105,7 @@ #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x40)) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR3) #define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprl0) @@ -130,7 +130,7 @@ #define CFG_SYS_NUM_IRQS (64) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_TMR0) #define CFG_SYS_TMR_BASE (MMAP_TMR3) #define CFG_SYS_TMRPND_REG (((volatile intctrl_t *)(CFG_SYS_INTR_BASE))->int_isr) @@ -152,7 +152,7 @@ #define CFG_SYS_NUM_IRQS (192) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR3) #define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprl0) @@ -174,7 +174,7 @@ #define CFG_SYS_NUM_IRQS (128) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR3) #define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprl0) @@ -196,7 +196,7 @@ #define CFG_SYS_NUM_IRQS (64) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR1) #define CFG_SYS_TMRPND_REG (((volatile intctrl_t *) \ @@ -217,7 +217,7 @@ #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x4000)) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR1) #define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprh0) @@ -239,7 +239,7 @@ #define CFG_SYS_UART_BASE (MMAP_UART0 + (CFG_SYS_UART_PORT * 0x4000)) /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR1) #define CFG_SYS_TMRPND_REG (((volatile int0_t *)(CFG_SYS_INTR_BASE))->iprh0) @@ -269,7 +269,7 @@ #define MMAP_DSPI MMAP_DSPI0 /* Timer */ -#ifdef CONFIG_MCFTMR +#ifdef CFG_MCFTMR #define CFG_SYS_UDELAY_BASE (MMAP_DTMR0) #define CFG_SYS_TMR_BASE (MMAP_DTMR1) #define CFG_SYS_TMRPND_REG (((int0_t *)(CFG_SYS_INTR_BASE))->iprh0) diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index 2ce69088d94..ca8c0396235 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -25,7 +25,7 @@ static volatile ulong timestamp = 0; #define CFG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2) #endif -#if defined(CONFIG_MCFTMR) +#if defined(CFG_MCFTMR) #ifndef CFG_SYS_UDELAY_BASE # error "uDelay base not defined!" #endif @@ -111,7 +111,7 @@ ulong get_timer(ulong base) return (timestamp - base); } -#endif /* CONFIG_MCFTMR */ +#endif /* CFG_MCFTMR */ /* * This function is derived from PowerPC code (read timebase as long long). diff --git a/board/freescale/m53017evb/README b/board/freescale/m53017evb/README index 34f05f3fdc7..5d5c5e7adf9 100644 --- a/board/freescale/m53017evb/README +++ b/board/freescale/m53017evb/README @@ -87,7 +87,7 @@ CONFIG_SYS_FEC0_PINMUX -- Set FEC0 Pin configuration CONFIG_SYS_FEC0_MIIBASE -- Set FEC0 MII base register MCFFEC_TOUT_LOOP -- set FEC timeout loop -CONFIG_MCFTMR -- define to use DMA timer +CFG_MCFTMR -- define to use DMA timer CONFIG_SYS_I2C_FSL -- define to use FSL common I2C driver CONFIG_SYS_I2C_SOFT -- define for I2C bit-banged diff --git a/board/freescale/m5373evb/README b/board/freescale/m5373evb/README index 7240648796b..e8bf75f4fb9 100644 --- a/board/freescale/m5373evb/README +++ b/board/freescale/m5373evb/README @@ -86,7 +86,7 @@ CONFIG_SYS_FEC0_PINMUX -- Set FEC0 Pin configuration CONFIG_SYS_FEC0_MIIBASE -- Set FEC0 MII base register MCFFEC_TOUT_LOOP -- set FEC timeout loop -CONFIG_MCFTMR -- define to use DMA timer +CFG_MCFTMR -- define to use DMA timer CONFIG_SYS_I2C_FSL -- define to use FSL common I2C driver CONFIG_SYS_I2C_SOFT -- define for I2C bit-banged diff --git a/configs/M5208EVBE_defconfig b/configs/M5208EVBE_defconfig index 263e57f46a0..3263414d1c2 100644 --- a/configs/M5208EVBE_defconfig +++ b/configs/M5208EVBE_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="-> " CONFIG_SYS_LOAD_ADDR=0x40010000 CONFIG_ENV_ADDR=0x2000 CONFIG_TARGET_M5208EVBE=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=262144 CONFIG_SYS_MONITOR_BASE=0x00000400 CONFIG_BOOTDELAY=1 diff --git a/configs/M5235EVB_Flash32_defconfig b/configs/M5235EVB_Flash32_defconfig index 88c11162111..0b924563d2a 100644 --- a/configs/M5235EVB_Flash32_defconfig +++ b/configs/M5235EVB_Flash32_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_LOAD_ADDR=0x20000 CONFIG_ENV_ADDR=0xFFE04000 CONFIG_TARGET_M5235EVB=y CONFIG_NORFLASH_PS32BIT=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=262144 CONFIG_SYS_MONITOR_BASE=0xFFC00400 CONFIG_BOOTDELAY=1 diff --git a/configs/M5235EVB_defconfig b/configs/M5235EVB_defconfig index 255f3b9d2f1..fbd3e086ec3 100644 --- a/configs/M5235EVB_defconfig +++ b/configs/M5235EVB_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="-> " CONFIG_SYS_LOAD_ADDR=0x20000 CONFIG_ENV_ADDR=0xFFE04000 CONFIG_TARGET_M5235EVB=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=262144 CONFIG_SYS_MONITOR_BASE=0xFFE00400 CONFIG_BOOTDELAY=1 diff --git a/configs/M5249EVB_defconfig b/configs/M5249EVB_defconfig index de7f14165bd..78f1f4f4bba 100644 --- a/configs/M5249EVB_defconfig +++ b/configs/M5249EVB_defconfig @@ -7,7 +7,6 @@ CONFIG_DEFAULT_DEVICE_TREE="M5249EVB" CONFIG_SYS_LOAD_ADDR=0x200000 CONFIG_ENV_ADDR=0xFFE04000 CONFIG_TARGET_M5249EVB=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=131072 CONFIG_SYS_MONITOR_BASE=0xFFE00400 # CONFIG_AUTOBOOT is not set diff --git a/configs/M5253DEMO_defconfig b/configs/M5253DEMO_defconfig index ea079972c9b..e6ab998f292 100644 --- a/configs/M5253DEMO_defconfig +++ b/configs/M5253DEMO_defconfig @@ -7,7 +7,6 @@ CONFIG_DEFAULT_DEVICE_TREE="M5253DEMO" CONFIG_SYS_LOAD_ADDR=0x100000 CONFIG_ENV_ADDR=0xFF804000 CONFIG_TARGET_M5253DEMO=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=262144 CONFIG_SYS_MONITOR_BASE=0xFF800400 CONFIG_BOOTDELAY=5 diff --git a/configs/M5272C3_defconfig b/configs/M5272C3_defconfig index 324daa016ef..1c51c4a1666 100644 --- a/configs/M5272C3_defconfig +++ b/configs/M5272C3_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="-> " CONFIG_SYS_LOAD_ADDR=0x20000 CONFIG_ENV_ADDR=0xFFE04000 CONFIG_TARGET_M5272C3=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=131072 CONFIG_SYS_MONITOR_BASE=0xFFE00400 CONFIG_BOOTDELAY=5 diff --git a/configs/M5275EVB_defconfig b/configs/M5275EVB_defconfig index d84d9d98c5a..ca1c18420ff 100644 --- a/configs/M5275EVB_defconfig +++ b/configs/M5275EVB_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="-> " CONFIG_SYS_LOAD_ADDR=0x800000 CONFIG_ENV_ADDR=0xFFE04000 CONFIG_TARGET_M5275EVB=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=131072 CONFIG_SYS_MONITOR_BASE=0xFFE00400 CONFIG_BOOTDELAY=5 diff --git a/configs/M5282EVB_defconfig b/configs/M5282EVB_defconfig index 7988d250034..2b053e3bbfe 100644 --- a/configs/M5282EVB_defconfig +++ b/configs/M5282EVB_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="-> " CONFIG_SYS_LOAD_ADDR=0x20000 CONFIG_ENV_ADDR=0xFFE04000 CONFIG_TARGET_M5282EVB=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=131072 CONFIG_SYS_MONITOR_BASE=0xFFE00400 CONFIG_BOOTDELAY=5 diff --git a/configs/M53017EVB_defconfig b/configs/M53017EVB_defconfig index d7c07aa2ea9..c70964f7aa0 100644 --- a/configs/M53017EVB_defconfig +++ b/configs/M53017EVB_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="-> " CONFIG_SYS_LOAD_ADDR=0x40010000 CONFIG_ENV_ADDR=0x40000 CONFIG_TARGET_M53017EVB=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=262144 CONFIG_SYS_MONITOR_BASE=0x00000400 CONFIG_BOOTDELAY=1 diff --git a/configs/M5329AFEE_defconfig b/configs/M5329AFEE_defconfig index 989af925f74..455eea255ae 100644 --- a/configs/M5329AFEE_defconfig +++ b/configs/M5329AFEE_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="-> " CONFIG_SYS_LOAD_ADDR=0x40010000 CONFIG_ENV_ADDR=0x4000 CONFIG_TARGET_M5329EVB=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=262144 CONFIG_SYS_MONITOR_BASE=0x00000400 CONFIG_BOOTDELAY=1 diff --git a/configs/M5329BFEE_defconfig b/configs/M5329BFEE_defconfig index 7be2a27ba2b..0251444b3bf 100644 --- a/configs/M5329BFEE_defconfig +++ b/configs/M5329BFEE_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="-> " CONFIG_SYS_LOAD_ADDR=0x40010000 CONFIG_ENV_ADDR=0x4000 CONFIG_TARGET_M5329EVB=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=262144 CONFIG_SYS_MONITOR_BASE=0x00000400 CONFIG_BOOTDELAY=1 diff --git a/configs/M5373EVB_defconfig b/configs/M5373EVB_defconfig index 4b278a5b1c8..eec95da8573 100644 --- a/configs/M5373EVB_defconfig +++ b/configs/M5373EVB_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="-> " CONFIG_SYS_LOAD_ADDR=0x40010000 CONFIG_ENV_ADDR=0x4000 CONFIG_TARGET_M5373EVB=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=262144 CONFIG_SYS_MONITOR_BASE=0x00000400 CONFIG_BOOTDELAY=1 diff --git a/configs/amcore_defconfig b/configs/amcore_defconfig index 6775379428f..0b1a4e87459 100644 --- a/configs/amcore_defconfig +++ b/configs/amcore_defconfig @@ -9,7 +9,6 @@ CONFIG_SYS_PROMPT="amcore $ " CONFIG_SYS_LOAD_ADDR=0x20000 CONFIG_ENV_ADDR=0xFFC1F000 CONFIG_TARGET_AMCORE=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=126976 CONFIG_SYS_MONITOR_BASE=0xFFC00400 CONFIG_BOOTDELAY=1 diff --git a/configs/astro_mcf5373l_defconfig b/configs/astro_mcf5373l_defconfig index a1a25622c77..827ebfe7420 100644 --- a/configs/astro_mcf5373l_defconfig +++ b/configs/astro_mcf5373l_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="URMEL > " CONFIG_SYS_LOAD_ADDR=0x20000 CONFIG_ENV_ADDR=0x1FF8000 CONFIG_TARGET_ASTRO_MCF5373L=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=262144 CONFIG_SYS_MONITOR_BASE=0x00000400 CONFIG_BOOTDELAY=1 diff --git a/configs/cobra5272_defconfig b/configs/cobra5272_defconfig index 377781f0bc9..6d6380f3be6 100644 --- a/configs/cobra5272_defconfig +++ b/configs/cobra5272_defconfig @@ -8,7 +8,6 @@ CONFIG_SYS_PROMPT="COBRA > " CONFIG_SYS_LOAD_ADDR=0x20000 CONFIG_ENV_ADDR=0xFFE04000 CONFIG_TARGET_COBRA5272=y -CONFIG_MCFTMR=y CONFIG_SYS_MONITOR_LEN=131072 CONFIG_SYS_MONITOR_BASE=0xFFE00400 CONFIG_BOOTDELAY=5 diff --git a/configs/eb_cpu5282_defconfig b/configs/eb_cpu5282_defconfig index 7304b493872..6f0882fccfa 100644 --- a/configs/eb_cpu5282_defconfig +++ b/configs/eb_cpu5282_defconfig @@ -7,7 +7,6 @@ CONFIG_SYS_PROMPT="\nEB+CPU5282> " CONFIG_SYS_LOAD_ADDR=0x20000 CONFIG_ENV_ADDR=0xFF040000 CONFIG_TARGET_EB_CPU5282=y -CONFIG_MCFTMR=y CONFIG_SYS_BARGSIZE=1024 CONFIG_SYS_MONITOR_LEN=131072 CONFIG_SYS_MONITOR_BASE=0xFF000400 diff --git a/configs/eb_cpu5282_internal_defconfig b/configs/eb_cpu5282_internal_defconfig index 5ecdda418aa..5f4ec93401e 100644 --- a/configs/eb_cpu5282_internal_defconfig +++ b/configs/eb_cpu5282_internal_defconfig @@ -6,7 +6,6 @@ CONFIG_DEFAULT_DEVICE_TREE="eb_cpu5282_internal" CONFIG_SYS_LOAD_ADDR=0x20000 CONFIG_ENV_ADDR=0xFF040000 CONFIG_TARGET_EB_CPU5282=y -CONFIG_MCFTMR=y CONFIG_SYS_BARGSIZE=1024 CONFIG_SYS_MONITOR_LEN=131072 CONFIG_SYS_MONITOR_BASE=0xF0000418 diff --git a/configs/stmark2_defconfig b/configs/stmark2_defconfig index ae7a9cf6da2..ee757099ff5 100644 --- a/configs/stmark2_defconfig +++ b/configs/stmark2_defconfig @@ -8,7 +8,6 @@ CONFIG_DEFAULT_DEVICE_TREE="stmark2" CONFIG_SYS_PROMPT="stmark2 $ " CONFIG_SYS_LOAD_ADDR=0x40010000 CONFIG_TARGET_STMARK2=y -CONFIG_MCFTMR=y CONFIG_SYS_BARGSIZE=256 CONFIG_SYS_MONITOR_LEN=262144 CONFIG_TIMESTAMP=y diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h index a4fda551f1f..4b89f31209a 100644 --- a/include/configs/M5208EVBE.h +++ b/include/configs/M5208EVBE.h @@ -111,4 +111,6 @@ #define CFG_SYS_CS0_MASK 0x007F0001 #define CFG_SYS_CS0_CTRL 0x00001FA0 +#define CFG_MCFTMR + #endif /* _M5208EVBE_H */ diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h index 8939c8e7ab9..14d46178116 100644 --- a/include/configs/M5235EVB.h +++ b/include/configs/M5235EVB.h @@ -130,4 +130,6 @@ # define CFG_SYS_CS0_CTRL 0x00001D80 #endif +#define CFG_MCFTMR + #endif /* _M5329EVB_H */ diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h index 4fd539c0174..b24042328d3 100644 --- a/include/configs/M5249EVB.h +++ b/include/configs/M5249EVB.h @@ -120,4 +120,6 @@ #define CFG_SYS_GPIO1_OUT 0x00c70000 /* Set outputs to default state */ #define CFG_SYS_GPIO1_LED 0x00400000 /* user led */ +#define CFG_MCFTMR + #endif /* M5249 */ diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h index a6349fc0861..008c7257c43 100644 --- a/include/configs/M5253DEMO.h +++ b/include/configs/M5253DEMO.h @@ -132,4 +132,6 @@ #define CFG_SYS_GPIO1_OUT 0x00c70000 /* Set outputs to default state */ #define CFG_SYS_GPIO1_LED 0x00400000 /* user led */ +#define CFG_MCFTMR + #endif /* _M5253DEMO_H */ diff --git a/include/configs/M5272C3.h b/include/configs/M5272C3.h index 33c2fc08706..49cf3e878ea 100644 --- a/include/configs/M5272C3.h +++ b/include/configs/M5272C3.h @@ -106,4 +106,7 @@ #define CFG_SYS_PBDDR 0x0000 #define CFG_SYS_PBDAT 0x0000 #define CFG_SYS_PDCNT 0x00000000 + +#define CFG_MCFTMR + #endif /* _M5272C3_H */ diff --git a/include/configs/M5275EVB.h b/include/configs/M5275EVB.h index 607c5dee2fb..965327d759d 100644 --- a/include/configs/M5275EVB.h +++ b/include/configs/M5275EVB.h @@ -116,4 +116,6 @@ #define CFG_SYS_CS1_CTRL 0x00001900 #define CFG_SYS_CS1_MASK 0x00070001 +#define CFG_MCFTMR + #endif /* _M5275EVB_H */ diff --git a/include/configs/M5282EVB.h b/include/configs/M5282EVB.h index 31699a40b6f..f04d9b1b2ab 100644 --- a/include/configs/M5282EVB.h +++ b/include/configs/M5282EVB.h @@ -127,4 +127,6 @@ #define CFG_SYS_DDRUA 0x05 #define CFG_SYS_PJPAR 0xFF +#define CFG_MCFTMR + #endif /* _CONFIG_M5282EVB_H */ diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h index 6359915e09a..04c456ff9f1 100644 --- a/include/configs/M53017EVB.h +++ b/include/configs/M53017EVB.h @@ -132,4 +132,6 @@ #define CFG_SYS_CS1_MASK 0x00070001 #define CFG_SYS_CS1_CTRL 0x00001FA0 +#define CFG_MCFTMR + #endif /* _M53017EVB_H */ diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h index 456135bdc64..0aa1ffd4d4f 100644 --- a/include/configs/M5329EVB.h +++ b/include/configs/M5329EVB.h @@ -138,4 +138,6 @@ #define CFG_SYS_CS2_CTRL 0x00001f60 #endif +#define CFG_MCFTMR + #endif /* _M5329EVB_H */ diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h index 4e8dcb5ef7f..8b9e65de98c 100644 --- a/include/configs/M5373EVB.h +++ b/include/configs/M5373EVB.h @@ -136,4 +136,6 @@ #define CFG_SYS_CS2_MASK (16 << 20) #define CFG_SYS_CS2_CTRL 0x00001f60 +#define CFG_MCFTMR + #endif /* _M5373EVB_H */ diff --git a/include/configs/amcore.h b/include/configs/amcore.h index 37c45e7172f..35f09b47e85 100644 --- a/include/configs/amcore.h +++ b/include/configs/amcore.h @@ -10,7 +10,7 @@ #define CFG_SYS_UART_PORT 0 -#define CONFIG_MCFTMR +#define CFG_MCFTMR #define CONFIG_MCFUART #define CONFIG_SYS_UART_PORT 0 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h index 65224324fbc..80f8c4129f5 100644 --- a/include/configs/astro_mcf5373l.h +++ b/include/configs/astro_mcf5373l.h @@ -184,4 +184,6 @@ #define CFG_SYS_CACHE_ICACR (CF_CACR_EC | CF_CACR_CINVA | \ CF_CACR_DCM_P) +#define CFG_MCFTMR + #endif /* _CONFIG_ASTRO_MCF5373L_H */ diff --git a/include/configs/cobra5272.h b/include/configs/cobra5272.h index cd50ffe98d0..276ecc30ccc 100644 --- a/include/configs/cobra5272.h +++ b/include/configs/cobra5272.h @@ -184,4 +184,6 @@ configuration */ #define CFG_SYS_PBDAT 0x0000 /* PortB value reg. */ #define CFG_SYS_PDCNT 0x00000000 /* PortD control reg. */ +#define CFG_MCFTMR + #endif /* _CONFIG_COBRA5272_H */ diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h index 26e4ade34ee..9503ab66f0f 100644 --- a/include/configs/eb_cpu5282.h +++ b/include/configs/eb_cpu5282.h @@ -138,5 +138,7 @@ #define CFG_SYS_DDRUA 0x05 #define CFG_SYS_PJPAR 0xFF +#define CFG_MCFTMR + #endif /* _CONFIG_M5282EVB_H */ /*---------------------------------------------------------------------*/ diff --git a/include/configs/stmark2.h b/include/configs/stmark2.h index 19589be270f..05de376f0e6 100644 --- a/include/configs/stmark2.h +++ b/include/configs/stmark2.h @@ -95,4 +95,6 @@ #define CACR_STATUS (CFG_SYS_INIT_RAM_ADDR + \ CFG_SYS_INIT_RAM_SIZE - 12) +#define CFG_MCFTMR + #endif /* __STMARK2_CONFIG_H */ -- cgit v1.3.1 From 791840fdc41d7e937158a6ac56e9316391fde7ab Mon Sep 17 00:00:00 2001 From: Angelo Dureghello Date: Wed, 15 Mar 2023 00:43:07 +0100 Subject: board: m5253demo: remove floating point flash size calculation This board is using floating point arithmetic to display the SST39VF6401B flash size. This actually generates errors with toolchains without appropriate sw fp math functions available. SST39VF6401B is the only flash for wich the size is displayed, it's size is 8192KB and floating point calculation seems not needed. Removing it. Signed-off-by: Angelo Dureghello --- board/freescale/m5253demo/flash.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'board') diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c index fbd48354160..eeb9cfd3125 100644 --- a/board/freescale/m5253demo/flash.c +++ b/board/freescale/m5253demo/flash.c @@ -96,24 +96,8 @@ void flash_print_info(flash_info_t * info) return; } - if (info->size > 0x100000) { - int remainder; - - printf(" Size: %ld", info->size >> 20); - - remainder = (info->size % 0x100000); - if (remainder) { - remainder >>= 10; - remainder = (int)((float) - (((float)remainder / (float)1024) * - 10000)); - printf(".%d ", remainder); - } - - printf("MB in %d Sectors\n", info->sector_count); - } else - printf(" Size: %ld KB in %d Sectors\n", - info->size >> 10, info->sector_count); + printf(" Size: %ld KB in %d Sectors\n", + info->size >> 10, info->sector_count); printf(" Sector Start Addresses:"); for (i = 0; i < info->sector_count; ++i) { -- cgit v1.3.1