Re: [U-Boot] [PATCH 14/17] x86: Add a forward struct declaration in coreboot_tables.h
On Sun, May 19, 2019 at 2:00 AM Simon Glass wrote: > > This struct is not defined in this header file. Add a forward declaration > so that it can be included in any context. > > Signed-off-by: Simon Glass > --- > > arch/x86/include/asm/coreboot_tables.h | 2 ++ > 1 file changed, 2 insertions(+) > Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] pci: renesas: Add RCar Gen3 PCIe controller driver
On Sun, May 19, 2019 at 6:24 AM Marek Vasut wrote: > > Add driver for the Renesas RCar PCIe controller present on Gen3 SoCs. > The PCIe on Gen3 is used both to connect external PCIe peripherals. > > Signed-off-by: Marek Vasut > Cc: Bin Meng > Cc: Nobuhiro Iwamatsu > --- > drivers/pci/Kconfig | 8 + > drivers/pci/Makefile | 1 + > drivers/pci/pcie-rcar-gen3.c | 411 +++ > 3 files changed, 420 insertions(+) > create mode 100644 drivers/pci/pcie-rcar-gen3.c > > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig > index 1521885bde..f8f8004429 100644 > --- a/drivers/pci/Kconfig > +++ b/drivers/pci/Kconfig > @@ -69,6 +69,14 @@ config PCI_RCAR_GEN2 > Renesas RCar Gen2 SoCs. The PCIe controller on RCar Gen2 is > also used to access EHCI USB controller on the SoC. > > +config PCIE_RCAR_GEN3 nits: should this be PCI_RCAR_GEN3 to be consistent with PCI_RCAR_GEN2? or maybe we should rename previous PCI_RCAR_GEN2 to PCIE_RCAR_GEN2? I have no problem with PCI vs PCIe, but better to be consistent. > + bool "Renesas RCar Gen3 PCIe driver" > + depends on DM_PCI > + depends on RCAR_GEN3 > + help > + Say Y here if you want to enable PCIe controller support on > + Renesas RCar Gen3 SoCs. > + > config PCI_SANDBOX > bool "Sandbox PCI support" > depends on SANDBOX && DM_PCI > diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile > index 4923641895..f6dd769bba 100644 > --- a/drivers/pci/Makefile > +++ b/drivers/pci/Makefile > @@ -24,6 +24,7 @@ obj-$(CONFIG_PCIE_IMX) += pcie_imx.o > obj-$(CONFIG_FTPCI100) += pci_ftpci100.o > obj-$(CONFIG_PCI_MVEBU) += pci_mvebu.o > obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o > +obj-$(CONFIG_PCIE_RCAR_GEN3) += pcie-rcar-gen3.o > obj-$(CONFIG_SH4_PCI) += pci_sh4.o > obj-$(CONFIG_SH7751_PCI) +=pci_sh7751.o > obj-$(CONFIG_SH7780_PCI) +=pci_sh7780.o > diff --git a/drivers/pci/pcie-rcar-gen3.c b/drivers/pci/pcie-rcar-gen3.c > new file mode 100644 > index 00..dcf455e135 > --- /dev/null > +++ b/drivers/pci/pcie-rcar-gen3.c > @@ -0,0 +1,411 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Renesas RCar Gen3 PCIEC driver > + * > + * Copyright (C) 2018-2019 Marek Vasut > + * > + * Based on Linux PCIe driver for Renesas R-Car SoCs > + * Copyright (C) 2014 Renesas Electronics Europe Ltd > + * > + * Based on: > + * arch/sh/drivers/pci/pcie-sh7786.c > + * arch/sh/drivers/pci/ops-sh7786.c > + * Copyright (C) 2009 - 2011 Paul Mundt > + * > + * Author: Phil Edworthy > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define PCIECAR0x10 > +#define PCIECCTLR 0x18 > +#define CONFIG_SEND_ENABLEBIT(31) > +#define TYPE0 (0 << 8) > +#define TYPE1 BIT(8) > +#define PCIECDR0x20 > +#define PCIEMSR0x28 > +#define PCIEINTXR 0x000400 > +#define PCIEPHYSR 0x0007f0 > +#define PHYRDYBIT(0) > +#define PCIEMSITXR 0x000840 > + > +/* Transfer control */ > +#define PCIETCTLR 0x02000 > +#define CFINIT1 > +#define PCIETSTR 0x02004 > +#define DATA_LINK_ACTIVE 1 > +#define PCIEERRFR 0x02020 > +#define UNSUPPORTED_REQUEST BIT(4) > +#define PCIEMSIFR 0x02044 > +#define PCIEMSIALR 0x02048 > +#define MSIFE 1 > +#define PCIEMSIAUR 0x0204c > +#define PCIEMSIIER 0x02050 > + > +/* root port address */ > +#define PCIEPRAR(x)(0x02080 + ((x) * 0x4)) > + > +/* local address reg & mask */ > +#define PCIELAR(x) (0x02200 + ((x) * 0x20)) > +#define PCIELAMR(x)(0x02208 + ((x) * 0x20)) > +#define LAM_PREFETCH BIT(3) > +#define LAM_64BIT BIT(2) > +#define LAR_ENABLEBIT(1) > + > +/* PCIe address reg & mask */ > +#define PCIEPALR(x)(0x03400 + ((x) * 0x20)) > +#define PCIEPAUR(x)(0x03404 + ((x) * 0x20)) > +#define PCIEPAMR(x)(0x03408 + ((x) * 0x20)) > +#define PCIEPTCTLR(x) (0x0340c + ((x) * 0x20)) > +#define PAR_ENABLEBIT(31) > +#define IO_SPACE BIT(8) > + > +/* Configuration */ > +#define PCICONF(x) (0x01 + ((x) * 0x4)) > +#define PMCAP(x) (0x010040 + ((x) * 0x4)) > +#define EXPCAP(x) (0x010070 + ((x) * 0x4)) > +#define VCCAP(x) (0x010100 + ((x) * 0x4)) > + > +/* link layer */ > +#define IDSETR10x011004 > +#define TLCTLR 0x011048 > +#define MACSR 0x011054 > +#define SPCHGFIN BIT(4) > +#define SPCHGFAIL BIT(6) > +#define SPCHGSUC BIT(7) > +#define LINK_SPEED(0xf << 16) > +#define LINK_SPEED
Re: [U-Boot] [PATCH] nvme: Fix warning of cast from pointer to integer of different size
On Wed, May 15, 2019 at 11:38 PM Bin Meng wrote: > > When dma_addr_t is u32 in 64-bit, there are some warnings when > building NVME driver. Fix it by doing an additional (long) cast. > > Signed-off-by: Bin Meng > --- > > drivers/nvme/nvme.c | 4 ++-- > drivers/nvme/nvme_show.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > applied to u-boot-x86, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Please pull u-boot-x86
Hi Tom, This PR includes the following updates to U-Boot x86 support: - Allow coreboot to process unhandled tags - Enable NVMe on QEMU x86_64 target The following changes since commit 98b3156b0df4b0df9cb3a0bbfc240d0c4edd2638: Merge branch 'master' of git://git.denx.de/u-boot-samsung (2019-05-16 07:09:59 -0400) are available in the git repository at: git://git.denx.de/u-boot-x86.git for you to fetch changes up to 604ce762e3ef2e8e1ce387df4a40bdc52119421d: x86: qemu-x86_64: Enable NVMe (2019-05-19 16:17:33 +0800) Bin Meng (2): nvme: Fix warning of cast from pointer to integer of different size x86: qemu-x86_64: Enable NVMe Christian Gmeiner (1): x86: coreboot: make it possible to process unhandled tags arch/x86/cpu/coreboot/tables.c | 7 +++ configs/qemu-x86_64_defconfig | 1 + drivers/nvme/nvme.c| 4 ++-- drivers/nvme/nvme_show.c | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] x86: qemu-x86_64: Enable NVMe
On Sun, May 19, 2019 at 12:33 AM Simon Glass wrote: > > On Wed, 15 May 2019 at 09:52, Bin Meng wrote: > > > > NVMe was turned on in qemu-x86 but somehow we missed it for 64-bit. > > > > Signed-off-by: Bin Meng > > --- > > > > configs/qemu-x86_64_defconfig | 1 + > > 1 file changed, 1 insertion(+) > > Reviewed-by: Simon Glass applied to u-boot-x86, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 0/5] Add initial support for Pine64 Rock64 board
This series adds initial basic support for Pine64 Rock64 board. The ROCK64 is a credit card size SBC based on Rockchip RK3328 Quad-Core ARM Cortex A53. This series allow building u-boot SPL and u-boot.itb for Rock64 board. Unfortunately, proprietary TPL is stil required for deploy: ./tools/mkimage -n rk3328 -T rksd -d ./rkbin/bin/rk33/rk3328_ddr_333MHz_v1.14.bin idbloader.img cat ./spl/u-boot-spl.bin >> idbloader.img dd if=idbloader.img of=/dev/sdcard seek=64 conv=notrunc dd if=u-boot.itb of=/dev/sdcard seek=16384 conv=notrunc The series has been tested with ATF v1.6. Some patches in the series are taken from https://github.com/rockchip-linux/u-boot Credits are given in each patch separately. Changes since v1: - reword messages for commit 2,4,5 - set SPL_REVERVE_IRAM to 0x4 - add spl-boot-order to rk3328-rock64-u-boot.dtsi Kever Yang (3): rockchip: rk3328: add SPL board file support rockchip: rk3328: add SPL support rockchip: Kconfig: enable SPL support for rk3328 Matwey V. Kornilov (2): rockchip: dts: rk3328: add rk3328-rock64.dts rockchip: rk3328: add rock64-rk3328_defconfig arch/arm/dts/Makefile | 3 +- arch/arm/dts/rk3328-rock64-u-boot.dtsi| 34 arch/arm/dts/rk3328-rock64.dts| 294 ++ arch/arm/mach-rockchip/Kconfig| 7 + arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rk3328-board-spl.c | 59 ++ configs/rock64-rk3328_defconfig | 91 + include/configs/rk3328_common.h | 4 + 8 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/rk3328-rock64-u-boot.dtsi create mode 100644 arch/arm/dts/rk3328-rock64.dts create mode 100644 arch/arm/mach-rockchip/rk3328-board-spl.c create mode 100644 configs/rock64-rk3328_defconfig -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 4/5] rockchip: dts: rk3328: add rk3328-rock64.dts
rk3328-rock64.dts has been taken from Linux kernel commit cff6d1d6f88b ("arm64: dts: rockchip: enable HS200 for eMMC on rock64") with minor modifications (drop nodes not known by rk3328.dtsi). Signed-off-by: Matwey V. Kornilov --- arch/arm/dts/Makefile | 3 +- arch/arm/dts/rk3328-rock64-u-boot.dtsi | 34 arch/arm/dts/rk3328-rock64.dts | 294 + 3 files changed, 330 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/rk3328-rock64-u-boot.dtsi create mode 100644 arch/arm/dts/rk3328-rock64.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 0ec7bc987d..42ee1fb654 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -93,7 +93,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3288) += \ rk3288-vyasa.dtb dtb-$(CONFIG_ROCKCHIP_RK3328) += \ - rk3328-evb.dtb + rk3328-evb.dtb \ + rk3328-rock64.dtb dtb-$(CONFIG_ROCKCHIP_RK3368) += \ rk3368-lion.dtb \ diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi new file mode 100644 index 00..b077436cbc --- /dev/null +++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi @@ -0,0 +1,34 @@ +/* + * (C) Copyright 2018 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/ { + aliases { + mmc0 = &emmc; + mmc1 = &sdmmc; + }; + + chosen { + u-boot,spl-boot-order = &emmc, &sdmmc; + }; +}; + +&cru { + u-boot,dm-pre-reloc; +}; + +&uart2 { + u-boot,dm-pre-reloc; +}; + +&emmc { + u-boot,dm-pre-reloc; + fifo-mode; +}; + +&sdmmc { + u-boot,dm-pre-reloc; + fifo-mode; +}; diff --git a/arch/arm/dts/rk3328-rock64.dts b/arch/arm/dts/rk3328-rock64.dts new file mode 100644 index 00..7bcc53fcce --- /dev/null +++ b/arch/arm/dts/rk3328-rock64.dts @@ -0,0 +1,294 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 PINE64 + */ + +/dts-v1/; +#include "rk3328.dtsi" + +/ { + model = "Pine64 Rock64"; + compatible = "pine64,rock64", "rockchip,rk3328"; + + chosen { + stdout-path = "serial2:150n8"; + }; + + gmac_clkin: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <12500>; + clock-output-names = "gmac_clkin"; + #clock-cells = <0>; + }; + + vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_gpio>; + regulator-name = "vcc_sd"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + vin-supply = <&vcc_io>; + }; + + vcc_host_5v: vcc-host-5v-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb30_host_drv>; + regulator-name = "vcc_host_5v"; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_sys>; + }; + + vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb20_host_drv>; + regulator-name = "vcc_host1_5v"; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_sys>; + }; + + vcc_sys: vcc-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + }; +}; + +&cpu0 { + cpu-supply = <&vdd_arm>; +}; + +&cpu1 { + cpu-supply = <&vdd_arm>; +}; + +&cpu2 { + cpu-supply = <&vdd_arm>; +}; + +&cpu3 { + cpu-supply = <&vdd_arm>; +}; + +&emmc { + bus-width = <8>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc18_emmc>; + status = "okay"; +}; + +&gmac2io { + assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; + assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; + clock_in_out = "input"; + phy-supply = <&vcc_io>; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmiim1_pins>; + snps,force_thresh_dma_mode; + snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
[U-Boot] [PATCH v2 1/5] rockchip: rk3328: add SPL board file support
From: Kever Yang rk3328 SPL is locate at dram, so do not have strict size limit, suppose to enable storage media controller driver, load ATF and U-Boot, then boot into ATF. Signed-off-by: Kever Yang [cherry picked from https://github.com/rockchip-linux/u-boot/commit/4ebe3968b683190cb8e5741aa7227b4fa7497874 with minor modifications] Signed-off-by: Matwey V. Kornilov --- arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rk3328-board-spl.c | 59 +++ 2 files changed, 60 insertions(+) create mode 100644 arch/arm/mach-rockchip/rk3328-board-spl.c diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index 846c82d70a..23760a959a 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -18,6 +18,7 @@ obj-spl-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board-spl.o obj-spl-$(CONFIG_ROCKCHIP_RK3188) += rk3188-board-spl.o obj-spl-$(CONFIG_ROCKCHIP_RK322X) += rk322x-board-spl.o spl-boot-order.o obj-spl-$(CONFIG_ROCKCHIP_RK3288) += rk3288-board-spl.o +obj-spl-$(CONFIG_ROCKCHIP_RK3328) += rk3328-board-spl.o obj-spl-$(CONFIG_ROCKCHIP_RK3368) += rk3368-board-spl.o spl-boot-order.o obj-spl-$(CONFIG_ROCKCHIP_RK3399) += rk3399-board-spl.o spl-boot-order.o diff --git a/arch/arm/mach-rockchip/rk3328-board-spl.c b/arch/arm/mach-rockchip/rk3328-board-spl.c new file mode 100644 index 00..7f49d056a0 --- /dev/null +++ b/arch/arm/mach-rockchip/rk3328-board-spl.c @@ -0,0 +1,59 @@ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +void board_debug_uart_init(void) +{ +} + +void board_init_f(ulong dummy) +{ + struct udevice *dev; + int ret; + + ret = spl_early_init(); + if (ret) { + debug("spl_early_init() failed: %d\n", ret); + hang(); + } + + preloader_console_init(); + + ret = uclass_get_device(UCLASS_RAM, 0, &dev); + if (ret) { + debug("DRAM init failed: %d\n", ret); + return; + } +} + +u32 spl_boot_mode(const u32 boot_device) +{ + return MMCSD_MODE_RAW; +} + +u32 spl_boot_device(void) +{ + return BOOT_DEVICE_MMC1; +} + +#ifdef CONFIG_SPL_LOAD_FIT +int board_fit_config_name_match(const char *name) +{ + /* Just empty function now - can't decide what to choose */ + debug("%s: %s\n", __func__, name); + + return 0; +} +#endif -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 2/5] rockchip: rk3328: add SPL support
From: Kever Yang Add SPL support for rk3328, default with of-platdata enabled. Signed-off-by: Kever Yang [cherry picked from https://github.com/rockchip-linux/u-boot/commit/cb2b7a1bc75ebb116b1eb9b0ae0223e84d86fc4b with minor modifications] Signed-off-by: Matwey V. Kornilov --- include/configs/rk3328_common.h | 4 1 file changed, 4 insertions(+) diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h index 71aad7029a..2a81c803b6 100644 --- a/include/configs/rk3328_common.h +++ b/include/configs/rk3328_common.h @@ -16,6 +16,10 @@ #define CONFIG_SYS_INIT_SP_ADDR0x0030 #define CONFIG_SYS_LOAD_ADDR 0x00800800 +#define CONFIG_SPL_STACK 0x0040 +#define CONFIG_SPL_MAX_SIZE0x10 +#define CONFIG_SPL_BSS_START_ADDR 0x200 +#define CONFIG_SPL_BSS_MAX_SIZE0x2000 #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */ -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 3/5] rockchip: Kconfig: enable SPL support for rk3328
From: Kever Yang Enable SPL support and some related option in Kconfig. Signed-off-by: Kever Yang [cherry picked from https://github.com/rockchip-linux/u-boot/commit/430b01462bf3f24aaf7920ae2587a6943c39ab5d with minor modifications] Signed-off-by: Matwey V. Kornilov --- arch/arm/mach-rockchip/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index c05e3c3f48..3e38344b50 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -109,6 +109,13 @@ endif config ROCKCHIP_RK3328 bool "Support Rockchip RK3328" select ARM64 + select SUPPORT_SPL + select SPL + imply SPL_SERIAL_SUPPORT + imply SPL_SEPARATE_BSS + select ENABLE_ARM_SOC_BOOT0_HOOK + select DEBUG_UART_BOARD_INIT + select SYS_NS16550 help The Rockchip RK3328 is a ARM-based SoC with a quad-core Cortex-A53. including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 5/5] rockchip: rk3328: add rock64-rk3328_defconfig
The ROCK64 is a credit card size SBC based on Rockchip RK3328 Quad-Core ARM Cortex A53. This series allow building u-boot SPL and u-boot.itb for Rock64 board. The proprietary TPL is stil required for deploy: ./tools/mkimage -n rk3328 -T rksd \ -d ./rkbin/bin/rk33/rk3328_ddr_333MHz_v1.14.bin idbloader.img cat ./spl/u-boot-spl.bin >> idbloader.img dd if=idbloader.img of=/dev/sdcard seek=64 conv=notrunc dd if=u-boot.itb of=/dev/sdcard seek=16384 conv=notrunc Signed-off-by: Matwey V. Kornilov --- configs/rock64-rk3328_defconfig | 91 + 1 file changed, 91 insertions(+) create mode 100644 configs/rock64-rk3328_defconfig diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig new file mode 100644 index 00..6529dedfb6 --- /dev/null +++ b/configs/rock64-rk3328_defconfig @@ -0,0 +1,91 @@ +CONFIG_SMBIOS_MANUFACTURER="pine64" +CONFIG_SMBIOS_PRODUCT_NAME="rock64_rk3328" +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_TEXT_BASE=0x0020 +CONFIG_ROCKCHIP_RK3328=y +CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4 +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_SPL_STACK_R_ADDR=0x60 +CONFIG_DEBUG_UART_BASE=0xFF13 +CONFIG_DEBUG_UART_CLOCK=2400 +CONFIG_DEBUG_UART=y +CONFIG_NR_DRAM_BANKS=1 +# CONFIG_ANDROID_BOOT_IMAGE is not set +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py" +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-rock64.dtb" +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SPL_STACK_R=y +CONFIG_SPL_ATF=y +CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y +CONFIG_FASTBOOT_BUF_ADDR=0x800800 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_TIME=y +CONFIG_DEFAULT_DEVICE_TREE="rk3328-rock64" +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_ENV_IS_IN_MMC=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_SYSCON=y +CONFIG_SPL_SYSCON=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_FASTBOOT_CMD_OEM_FORMAT=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_SPI_FLASH=y +CONFIG_SF_DEFAULT_SPEED=2000 +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PHY=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y +CONFIG_PINCTRL_ROCKCHIP_RK3328=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_RK8XX=y +CONFIG_REGULATOR_PWM=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_REGULATOR_RK8XX=y +CONFIG_PWM_ROCKCHIP=y +CONFIG_RAM=y +CONFIG_SPL_RAM=y +CONFIG_DM_RESET=y +CONFIG_BAUDRATE=150 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYSRESET=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_GENERIC=y +CONFIG_USB_DWC2=y +CONFIG_USB_DWC3=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="Rockchip" +CONFIG_USB_GADGET_VENDOR_NUM=0x2207 +CONFIG_USB_GADGET_PRODUCT_NUM=0x330a +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USE_TINY_PRINTF=y +CONFIG_SPL_TINY_MEMSET=y +CONFIG_ERRNO_STR=y -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] rockchip: rk3328: add rock64-rk3328_defconfig
Hi Kever, чт, 16 мая 2019 г. в 10:01, Kever Yang : > > Hi Matwey, > > Please add commit message for the patch. > > On 05/08/2019 02:34 PM, Matwey V. Kornilov wrote: > > Signed-off-by: Matwey V. Kornilov > > --- > > configs/rock64-rk3328_defconfig | 91 > > + > > 1 file changed, 91 insertions(+) > > create mode 100644 configs/rock64-rk3328_defconfig > > > > diff --git a/configs/rock64-rk3328_defconfig > > b/configs/rock64-rk3328_defconfig > > new file mode 100644 > > index 00..b278315035 > > --- /dev/null > > +++ b/configs/rock64-rk3328_defconfig > > @@ -0,0 +1,91 @@ > > +CONFIG_SMBIOS_MANUFACTURER="pine64" > > +CONFIG_SMBIOS_PRODUCT_NAME="rock64_rk3328" > > +CONFIG_ARM=y > > +CONFIG_ARCH_ROCKCHIP=y > > +CONFIG_SPL_LIBCOMMON_SUPPORT=y > > +CONFIG_SPL_LIBGENERIC_SUPPORT=y > > +CONFIG_SYS_MALLOC_F_LEN=0x2000 > > +CONFIG_SYS_TEXT_BASE=0x0020 > > +CONFIG_ROCKCHIP_RK3328=y > > +CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x0 > Does this SPL_REVERVE_IRAM=0 fine with support ATF? > SPL TEXT_BASE is 0, and ATF starts at 0x10, I use to reserve > big enough space for ATF and U-Boot before SPL enable > the relocate feature, or else it's very easy to get panic in SPL. I set it to 0x4 now as in evb-rk3328_defconfig. However It works for me also with 0x0. > > Thanks, > - Kever > > +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y > > +CONFIG_SPL_STACK_R_ADDR=0x60 > > +CONFIG_DEBUG_UART_BASE=0xFF13 > > +CONFIG_DEBUG_UART_CLOCK=2400 > > +CONFIG_DEBUG_UART=y > > +CONFIG_NR_DRAM_BANKS=1 > > +# CONFIG_ANDROID_BOOT_IMAGE is not set > > +CONFIG_FIT=y > > +CONFIG_FIT_VERBOSE=y > > +CONFIG_SPL_LOAD_FIT=y > > +CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py" > > +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-rock64.dtb" > > +# CONFIG_DISPLAY_CPUINFO is not set > > +CONFIG_DISPLAY_BOARDINFO_LATE=y > > +CONFIG_SPL_STACK_R=y > > +CONFIG_SPL_ATF=y > > +CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y > > +CONFIG_FASTBOOT_BUF_ADDR=0x800800 > > +CONFIG_FASTBOOT_FLASH=y > > +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 > > +CONFIG_CMD_BOOTZ=y > > +CONFIG_CMD_GPT=y > > +CONFIG_CMD_MMC=y > > +CONFIG_CMD_SF=y > > +CONFIG_CMD_USB=y > > +# CONFIG_CMD_SETEXPR is not set > > +CONFIG_CMD_TIME=y > > +CONFIG_DEFAULT_DEVICE_TREE="rk3328-rock64" > > +CONFIG_SPL_OF_CONTROL=y > > +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names > > interrupt-parent assigned-clocks assigned-clock-rates > > assigned-clock-parents" > > +CONFIG_ENV_IS_IN_MMC=y > > +CONFIG_NET_RANDOM_ETHADDR=y > > +CONFIG_REGMAP=y > > +CONFIG_SPL_REGMAP=y > > +CONFIG_SYSCON=y > > +CONFIG_SPL_SYSCON=y > > +CONFIG_CLK=y > > +CONFIG_SPL_CLK=y > > +CONFIG_FASTBOOT_CMD_OEM_FORMAT=y > > +CONFIG_ROCKCHIP_GPIO=y > > +CONFIG_SYS_I2C_ROCKCHIP=y > > +CONFIG_MMC_DW=y > > +CONFIG_MMC_DW_ROCKCHIP=y > > +CONFIG_SPI_FLASH=y > > +CONFIG_SF_DEFAULT_SPEED=2000 > > +CONFIG_DM_ETH=y > > +CONFIG_ETH_DESIGNWARE=y > > +CONFIG_GMAC_ROCKCHIP=y > > +CONFIG_PHY=y > > +CONFIG_PINCTRL=y > > +CONFIG_SPL_PINCTRL=y > > +CONFIG_PINCTRL_ROCKCHIP_RK3328=y > > +CONFIG_DM_PMIC=y > > +CONFIG_PMIC_RK8XX=y > > +CONFIG_REGULATOR_PWM=y > > +CONFIG_DM_REGULATOR_FIXED=y > > +CONFIG_REGULATOR_RK8XX=y > > +CONFIG_PWM_ROCKCHIP=y > > +CONFIG_RAM=y > > +CONFIG_SPL_RAM=y > > +CONFIG_DM_RESET=y > > +CONFIG_BAUDRATE=150 > > +CONFIG_DEBUG_UART_SHIFT=2 > > +CONFIG_SYSRESET=y > > +CONFIG_USB=y > > +CONFIG_USB_XHCI_HCD=y > > +CONFIG_USB_XHCI_DWC3=y > > +CONFIG_USB_EHCI_HCD=y > > +CONFIG_USB_EHCI_GENERIC=y > > +CONFIG_USB_OHCI_HCD=y > > +CONFIG_USB_OHCI_GENERIC=y > > +CONFIG_USB_DWC2=y > > +CONFIG_USB_DWC3=y > > +CONFIG_USB_GADGET=y > > +CONFIG_USB_GADGET_MANUFACTURER="Rockchip" > > +CONFIG_USB_GADGET_VENDOR_NUM=0x2207 > > +CONFIG_USB_GADGET_PRODUCT_NUM=0x330a > > +CONFIG_USB_GADGET_DWC2_OTG=y > > +CONFIG_USE_TINY_PRINTF=y > > +CONFIG_SPL_TINY_MEMSET=y > > +CONFIG_ERRNO_STR=y > > > -- With best regards, Matwey V. Kornilov ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 4/5] rockchip: dts: rk3328: add rk3328-rock64.dts
Hi Kever, чт, 16 мая 2019 г. в 09:56, Kever Yang : > > Hi Matwey, > > > On 05/08/2019 02:34 PM, Matwey V. Kornilov wrote: > > rk3328-rock64.dts has been taken from Linux kernel with minor > > modifications. > > Could you detail about which commit of kernel do you take > this dts from? Sure. > > > > > Signed-off-by: Matwey V. Kornilov > > --- > > arch/arm/dts/Makefile | 1 + > > arch/arm/dts/rk3328-rock64-u-boot.dtsi | 30 > > arch/arm/dts/rk3328-rock64.dts | 294 > > + > > 3 files changed, 325 insertions(+) > > create mode 100644 arch/arm/dts/rk3328-rock64-u-boot.dtsi > > create mode 100644 arch/arm/dts/rk3328-rock64.dts > > > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > > index 8e082f2840..cacc580502 100644 > > --- a/arch/arm/dts/Makefile > > +++ b/arch/arm/dts/Makefile > > @@ -85,6 +85,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ > > rk3288-veyron-speedy.dtb \ > > rk3288-vyasa.dtb \ > > rk3328-evb.dtb \ > > + rk3328-rock64.dtb \ > > rk3399-ficus.dtb \ > > rk3368-lion.dtb \ > > rk3368-sheep.dtb \ > > diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi > > b/arch/arm/dts/rk3328-rock64-u-boot.dtsi > > new file mode 100644 > > index 00..a0e04be758 > > --- /dev/null > > +++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi > > @@ -0,0 +1,30 @@ > > +/* > > + * (C) Copyright 2018 Rockchip Electronics Co., Ltd > > + * > > + * SPDX-License-Identifier: GPL-2.0+ > > + */ > > + > > +/ { > > + aliases { > > + mmc0 = &emmc; > > + mmc1 = &sdmmc; > > + }; > > Maybe you would need a spl-boot-order here to make sure SPL can find > u-boot from > both emmc and sdmmc. Done. Yet I don't have EMMC on my board to test. > > > +}; > > + > > +&cru { > > + u-boot,dm-pre-reloc; > > +}; > > + > > +&uart2 { > > + u-boot,dm-pre-reloc; > > +}; > > And maybe you need add 'clock-frequency=2400' for uart2. uart2 node in rk3328.dtsi already has the clock-frequency. > > Thanks, > - Kever > > + > > +&emmc { > > + u-boot,dm-pre-reloc; > > + fifo-mode; > > +}; > > + > > +&sdmmc { > > + u-boot,dm-pre-reloc; > > + fifo-mode; > > +}; > > diff --git a/arch/arm/dts/rk3328-rock64.dts b/arch/arm/dts/rk3328-rock64.dts > > new file mode 100644 > > index 00..7bcc53fcce > > --- /dev/null > > +++ b/arch/arm/dts/rk3328-rock64.dts > > @@ -0,0 +1,294 @@ > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > +/* > > + * Copyright (c) 2017 PINE64 > > + */ > > + > > +/dts-v1/; > > +#include "rk3328.dtsi" > > + > > +/ { > > + model = "Pine64 Rock64"; > > + compatible = "pine64,rock64", "rockchip,rk3328"; > > + > > + chosen { > > + stdout-path = "serial2:150n8"; > > + }; > > + > > + gmac_clkin: external-gmac-clock { > > + compatible = "fixed-clock"; > > + clock-frequency = <12500>; > > + clock-output-names = "gmac_clkin"; > > + #clock-cells = <0>; > > + }; > > + > > + vcc_sd: sdmmc-regulator { > > + compatible = "regulator-fixed"; > > + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&sdmmc0m1_gpio>; > > + regulator-name = "vcc_sd"; > > + regulator-min-microvolt = <330>; > > + regulator-max-microvolt = <330>; > > + vin-supply = <&vcc_io>; > > + }; > > + > > + vcc_host_5v: vcc-host-5v-regulator { > > + compatible = "regulator-fixed"; > > + enable-active-high; > > + gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&usb30_host_drv>; > > + regulator-name = "vcc_host_5v"; > > + regulator-always-on; > > + regulator-boot-on; > > + vin-supply = <&vcc_sys>; > > + }; > > + > > + vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { > > + compatible = "regulator-fixed"; > > + enable-active-high; > > + gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&usb20_host_drv>; > > + regulator-name = "vcc_host1_5v"; > > + regulator-always-on; > > + regulator-boot-on; > > + vin-supply = <&vcc_sys>; > > + }; > > + > > + vcc_sys: vcc-sys { > > + compatible = "regulator-fixed"; > > + regulator-name = "vcc_sys"; > > + regulator-always-on; > > + regulator-boot-on; > > + regulator-min-microvolt = <500>; > > + regulator-max-microvolt = <500>; > > + }; > > +}; > > + > > +&cpu0 { > > + cpu-supply = <&vdd_arm>; > > +}; > > + > > +&cpu1 { > > + cpu-supply = <&vdd_arm>; > > +}; > > + > > +&cpu2 { > > + cpu-supply = <&vdd_arm>; > > +}; > > + > > +&cp
Re: [U-Boot] U-Boot, efi-x86_app and gcc-8.1?
On Sun, May 19, 2019 at 08:55:53AM +0800, Bin Meng wrote: > Hi Tom, > > On Sun, May 19, 2019 at 12:07 AM Simon Glass wrote: > > > > Hi Tom, > > > > On Sat, 18 May 2019 at 06:13, Tom Rini wrote: > > > > > > Hey guys, > > > > > > Looking at https://travis-ci.org/trini/u-boot/jobs/534037240 this is the > > > only board that doesn't build (having switched ARM to gcc-8.3 from > > > Arm/Linaro) and the error is pretty odd. Do you have any idea what's > > > going on? Thanks! > > > > I wonder if the assembler output of image.c would give any clues? I'm > > assuming it isn't a toolchain bug. > > I've analysed this before, and it is a gcc regression. > See my bug report @ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87793 > > The bug is fixed in gcc 8.3 and 9.0. Ugh. And gcc-8.2 from Bootlin has the problem too (along with being not relocatable). Thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHv2 03/11] Kconfig: Add DEPRECATED option
Add a new option, CONFIG_DEPRECATED, for code that relies on deprecated functionality and has not been converted past the deadline for conversion. Signed-off-by: Tom Rini --- Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Kconfig b/Kconfig index da208d65a32c..e780fce8efdb 100644 --- a/Kconfig +++ b/Kconfig @@ -20,6 +20,13 @@ config BROKEN This option cannot be enabled. It is used as dependency for broken and incomplete features. +config DEPRECATED + bool + help + This option cannot be enabled. It it used as a dependency for + code that relies on deprecated features that will be removed and + the conversion deadline has passed. + config LOCALVERSION string "Local version - append to U-Boot release" help -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHv2 02/11] Kconfig: Add SPI / SPI_FLASH as dependencies
In order to use CMD_SF / CMD_SPI / ENV_IS_IN_SPI_FLASH we need to have the SPI (or SPI_FLASH/DM_SPI_FLASH, for CMD_SF) enabled. Express this in the Kconfigs. Signed-off-by: Tom Rini --- arch/Kconfig | 2 ++ cmd/Kconfig | 3 +++ env/Kconfig | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 239289b88565..486d7a8ae522 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -100,6 +100,7 @@ config SANDBOX imply CMD_IOTRACE imply CMD_LZMADEC imply CMD_SATA + imply CMD_SF imply CMD_SF_TEST imply CRC32_VERIFY imply FAT_WRITE @@ -146,6 +147,7 @@ config X86 imply CMD_IO imply CMD_IRQ imply CMD_PCI + imply CMD_SF imply CMD_SF_TEST imply CMD_ZBOOT imply DM_ETH diff --git a/cmd/Kconfig b/cmd/Kconfig index 0d36da2a5c43..ab709d96e0d6 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1035,11 +1035,13 @@ config CMD_SDRAM config CMD_SF bool "sf" + depends on DM_SPI_FLASH || SPI_FLASH help SPI Flash support config CMD_SF_TEST bool "sf test - Allow testing of SPI flash" + depends on CMD_SF help Provides a way to test that SPI flash is working correctly. The test is destructive, in that an area of SPI flash must be provided @@ -1051,6 +1053,7 @@ config CMD_SF_TEST config CMD_SPI bool "sspi - Command to access spi device" + depends on SPI help SPI utility command. diff --git a/env/Kconfig b/env/Kconfig index 70858d3b4075..9f7746e8baa6 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -293,7 +293,7 @@ config ENV_IS_IN_REMOTE config ENV_IS_IN_SPI_FLASH bool "Environment is in SPI flash" - depends on !CHAIN_OF_TRUST + depends on !CHAIN_OF_TRUST && SPI default y if ARMADA_XP default y if INTEL_BAYTRAIL default y if INTEL_BRASWELL -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHv2 07/11] spi: Kconfig: Mark SH_SPI as DEPRECATED
From: Jagan Teki Mark SH_SPI as DEPRECATED, this so the resulting build shows warning for a deprecated configuration enabled and associated code will remove in v2019.07 release. Cc: Marek Vasut Signed-off-by: Jagan Teki [trini: Switch to DEPRECATED] Signed-off-by: Tom Rini --- drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 3c345f108498..9aac500bb187 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -343,6 +343,7 @@ config DAVINCI_SPI config SH_SPI bool "SuperH SPI driver" + depends on DEPRECATED help Enable the SuperH SPI controller driver. This driver can be used on various SuperH SoCs, such as SH7757. -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHv2 05/11] Makefile: Trigger a warning for legcay spi drivers
From: Jagan Teki We have a warning text for non dm converted spi drivers, but the plan is to mark all these respective drivers with CONFIG_DEPRECATED. So, trigger a warning saying that these driver configurations and associated code will remove in v2019.07 (earlier plan is to remove it from v2019.04) Signed-off-by: Jagan Teki --- Makefile | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 3547c95103e2..6b73d0f89e4a 100644 --- a/Makefile +++ b/Makefile @@ -920,6 +920,11 @@ cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \ all: $(ALL-y) ifeq ($(CONFIG_DEPRECATED),y) $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.") +ifeq ($(CONFIG_SPI),y) +ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) + $(warning "The relevant config item with associated code will remove in v2019.07 release.") +endif +endif endif ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y) @echo >&2 "= WARNING ==" @@ -997,17 +1002,6 @@ ifeq ($(CONFIG_OF_EMBED),y) @echo >&2 "See doc/README.fdt-control for more info." @echo >&2 "" endif -ifeq ($(CONFIG_SPI),y) -ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) - @echo >&2 "= WARNING ==" - @echo >&2 "This board does not use CONFIG_DM_SPI. Please update" - @echo >&2 "the board before v2019.04 for no dm conversion" - @echo >&2 "and v2019.07 for partially dm converted drivers." - @echo >&2 "Failure to update can lead to driver/board removal" - @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." - @echo >&2 "" -endif -endif ifeq ($(CONFIG_SPI_FLASH),y) ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) @echo >&2 "= WARNING ==" -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHv2 06/11] spi: Kconfig: Mark MXS_SPI has DEPRECATED
From: Jagan Teki Mark MXS_SPI as DEPRECATED, this so the resulting build shows warning for broken configuration enabled and associated code will remove in v2019.07 release. Cc: Marek Vasut Cc: Fabio Estevam Cc: Michael Trimarchi Signed-off-by: Jagan Teki [trini: Switch to DEPRECATED] Signed-off-by: Tom Rini --- drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index c3a829deaec6..3c345f108498 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -377,6 +377,7 @@ config MXC_SPI config MXS_SPI bool "MXS SPI Driver" + depends on DEPRECATED help Enable the MXS SPI controller driver. This driver can be used on the i.MX23 and i.MX28 SoCs. -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHv2 08/11] spi: Kconfig: Mark SOFT_SPI as DEPRECATED
From: Jagan Teki Mark SOFT_SPI as DEPRECATED, this so the resulting build shows warning for deprecated configuration enabled and associated code will remove in v2019.07 release. Cc: Vasily Khoruzhick Signed-off-by: Jagan Teki [trini: Switch to DEPRECATED] Signed-off-by: Tom Rini --- drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 9aac500bb187..e5477d5a110d 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -303,6 +303,7 @@ endif # if DM_SPI config SOFT_SPI bool "Soft SPI driver" + depends on DM_SPI || (DEPRECATED && !DM_SPI) help Enable Soft SPI driver. This driver is to use GPIO simulate the SPI protocol. -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHv2 04/11] Makefile: Trigger a Warning if DEPRECATED is defined
From: Jagan Teki If configured target has deprecated configs enabled, trigger a warning about this. Cc: Heinrich Schuchardt Signed-off-by: Jagan Teki [trini: Change from BROKEN to DEPRECATED] Signed-off-by: Tom Rini --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 6eb08a57247e..3547c95103e2 100644 --- a/Makefile +++ b/Makefile @@ -918,6 +918,9 @@ cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \ $(srctree)/scripts/config_whitelist.txt $(srctree) all: $(ALL-y) +ifeq ($(CONFIG_DEPRECATED),y) + $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.") +endif ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y) @echo >&2 "= WARNING ==" @echo >&2 "This board uses CONFIG_DM_I2C_COMPAT. Please remove" -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHv2 09/11] spi: Kconfig: Mark FSL_ESPI as DEPRECATED
From: Jagan Teki Mark FSL_ESPI as DEPRECATED, this so the resulting build shows warning for deprecated configuration enabled and associated code will remove in v2019.07 release. Cc: Oleksandr Zhadan and Michael Durrant Signed-off-by: Jagan Teki [trini: Switch to DEPRECATED] Signed-off-by: Tom Rini --- drivers/qe/Kconfig | 1 + drivers/spi/Kconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/qe/Kconfig b/drivers/qe/Kconfig index 864b36b82252..824a69a3d3de 100644 --- a/drivers/qe/Kconfig +++ b/drivers/qe/Kconfig @@ -32,6 +32,7 @@ config SYS_QE_FMAN_FW_IN_NAND config SYS_QE_FMAN_FW_IN_SPIFLASH bool "SPI flash" + depends on BROKEN || DM_SPI config SYS_QE_FMAN_FW_IN_MMC bool "MMC" diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index e5477d5a110d..201a4d970a95 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -323,6 +323,7 @@ config CF_SPI config FSL_ESPI bool "Freescale eSPI driver" + depends on DEPRECATED help Enable the Freescale eSPI driver. This driver can be used to access the SPI interface and SPI NOR flash on platforms embedding -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCHv2 10/11] spi: Kconfig: Mark LPC32XX_SSP as DEPRECATED
From: Jagan Teki Mark LPC32XX_SSP as DEPRECATED, this so the resulting build shows warning for deprecated configuration enabled and associated code will remove in v2019.07 release. Cc: Albert ARIBAUD Signed-off-by: Jagan Teki Acked-by: Vladimir Zapolskiy Acked-by: Sylvain Lemieux [trini: Switch to DEPRECATED] Signed-off-by: Tom Rini --- drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 201a4d970a95..cd92b0d44895 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -364,6 +364,7 @@ config KIRKWOOD_SPI config LPC32XX_SSP bool "LPC32XX SPI Driver" + depends on DEPRECATED help Enable support for SPI on LPC32xx -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 00/13] clk: Port Linux common clock framework [CCF] to U-boot (tag: 5.0-rc3)
Hi Simon, > Hi Lukasz, > > On Sat, 18 May 2019 at 14:49, Lukasz Majewski wrote: > > > > Hi Simon, > > > > > kHi Lukasz, > > > > > > On Thu, 16 May 2019 at 16:11, Lukasz Majewski > > > wrote: > > > > > > > > This patch series brings the files from Linux kernel to provide > > > > clocks support as it is used on the Linux kernel with common > > > > clock framework [CCF] setup. > > > > > > > > This series also fixes several problems with current clocks and > > > > provides sandbox tests for functions addded to clk-uclass.c > > > > file. > > > > > > > > Repository: > > > > https://github.com/lmajewski/u-boot-dfu/commits/CCF-v4 > > > > > > > > > > > > Changes in v4: > > > > - New patch > > > > - None > > > > - None > > > > - None > > > > - New patch > > > > - None > > > > - Port some more Linux code to facilitate imx8 code porting > > > > (most notably flags) > > > > - Explicitly use container_of() based macro to provide struct > > > > clk in various places (e.g. gate2, mux, etc) > > > > Following patches has been squashed: > > > > http://patchwork.ozlabs.org/patch/1093141/ > > > > http://patchwork.ozlabs.org/patch/1093142/ > > > > http://patchwork.ozlabs.org/patch/1093146/ > > > > - New patch > > > > > > > > Changes in v3: > > > > - New patch > > > > - The rate information is now cached into struct clk field > > > > - The clk_get_parent() is used to get pointer to the parent > > > > struct clk > > > > - Replace -ENODEV with -ENOENT > > > > - Use **clkp instead of **c > > > > - New patch > > > > - New patch > > > > > > > > Lukasz Majewski (13): > > > > clk: doc: Add documentation entry for Common Clock Framework > > > > [CCF] (i.MX) > > > > dm: Fix documentation entry as there is no UCLASS_CLOCK uclass > > > > clk: Remove clock ID check in .get_rate() of clk_fixed_* > > > > clk: Extend struct clk to provide information regarding clock > > > > rate clk: Extend struct clk to provide clock type agnostic flags > > > > clk: Provide struct clk for fixed rate clock > > > > (clk_fixed_rate.c) dm: clk: Define clk_get_parent() for clk > > > > operations dm: clk: Define clk_get_parent_rate() for clk > > > > operations dm: clk: Define clk_get_by_id() for clk operations > > > > clk: test: Provide unit test for clk_get_by_id() method > > > > clk: test: Provide unit test for clk_get_parent_rate() method > > > > clk: Port Linux common clock framework [CCF] for imx6q to > > > > U-boot (tag: 5.0-rc3) > > > > dm: clk: Extend clk_get_parent_rate() to support > > > > CLK_GET_RATE_NOCACHE flag > > > > > > > > arch/sandbox/include/asm/clk.h | 16 > > > > doc/imx/clk/ccf.txt| 83 +++ > > > > drivers/clk/Kconfig| 14 > > > > drivers/clk/Makefile | 2 + > > > > drivers/clk/clk-divider.c | 148 > > > > ++ > > > > drivers/clk/clk-fixed-factor.c | 87 > > > > drivers/clk/clk-mux.c | 164 > > > > + > > > > drivers/clk/clk-uclass.c | 60 ++ > > > > drivers/clk/clk.c | 56 + > > > > drivers/clk/clk_fixed_factor.c | 3 - > > > > drivers/clk/clk_fixed_rate.c | 8 +- > > > > drivers/clk/clk_sandbox_test.c | 49 +++ > > > > drivers/clk/imx/Kconfig| 9 +++ > > > > drivers/clk/imx/Makefile | 2 + > > > > drivers/clk/imx/clk-gate2.c| 113 ++ > > > > drivers/clk/imx/clk-imx6q.c| 179 > > > > + > > > > drivers/clk/imx/clk-pfd.c | 91 + > > > > drivers/clk/imx/clk-pllv3.c| 83 +++ > > > > drivers/clk/imx/clk.h | 75 + > > > > include/clk.h | 37 - > > > > include/linux/clk-provider.h | 115 ++ > > > > test/dm/clk.c | 4 +- 22 files changed, 1390 > > > > insertions(+), 8 deletions(-) create mode 100644 > > > > doc/imx/clk/ccf.txt create mode 100644 > > > > drivers/clk/clk-divider.c create mode 100644 > > > > drivers/clk/clk-fixed-factor.c create mode 100644 > > > > drivers/clk/clk-mux.c create mode 100644 drivers/clk/clk.c > > > > create mode 100644 drivers/clk/imx/clk-gate2.c create mode > > > > 100644 drivers/clk/imx/clk-imx6q.c create mode 100644 > > > > drivers/clk/imx/clk-pfd.c create mode 100644 > > > > drivers/clk/imx/clk-pllv3.c create mode 100644 > > > > drivers/clk/imx/clk.h create mode 100644 > > > > include/linux/clk-provider.h > > > > > > I don't see any new tests here other a trivial change in > > > test/dm/clk.c > > > > > > When adding new functionality to the generic clock code, tests > > > should be added to cover this code. The sandbox clock driver > > > should be enhanced as needed. > > > > Please correct me if I'm wrong (or provide not enough code for those > > use cases), but I've added some tests here: > > > > http://patchwork.ozlabs.org/patch/1100767/ > > h
[U-Boot] [PATCH V2 1/2] pci: renesas: Add RCar Gen3 PCIe controller driver
Add driver for the Renesas RCar PCIe controller present on Gen3 SoCs. The PCIe on Gen3 is used both to connect external PCIe peripherals. Signed-off-by: Marek Vasut Cc: Bin Meng Cc: Nobuhiro Iwamatsu --- V2: - Rename the driver - Use platdata instead of priv --- drivers/pci/Kconfig | 8 + drivers/pci/Makefile| 1 + drivers/pci/pci-rcar-gen3.c | 411 3 files changed, 420 insertions(+) create mode 100644 drivers/pci/pci-rcar-gen3.c diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 1521885bde..bfc43fe58e 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -69,6 +69,14 @@ config PCI_RCAR_GEN2 Renesas RCar Gen2 SoCs. The PCIe controller on RCar Gen2 is also used to access EHCI USB controller on the SoC. +config PCI_RCAR_GEN3 + bool "Renesas RCar Gen3 PCIe driver" + depends on DM_PCI + depends on RCAR_GEN3 + help + Say Y here if you want to enable PCIe controller support on + Renesas RCar Gen3 SoCs. + config PCI_SANDBOX bool "Sandbox PCI support" depends on SANDBOX && DM_PCI diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 4923641895..e551f203d0 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_PCIE_IMX) += pcie_imx.o obj-$(CONFIG_FTPCI100) += pci_ftpci100.o obj-$(CONFIG_PCI_MVEBU) += pci_mvebu.o obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o +obj-$(CONFIG_PCI_RCAR_GEN3) += pci-rcar-gen3.o obj-$(CONFIG_SH4_PCI) += pci_sh4.o obj-$(CONFIG_SH7751_PCI) +=pci_sh7751.o obj-$(CONFIG_SH7780_PCI) +=pci_sh7780.o diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c new file mode 100644 index 00..52ca13b70c --- /dev/null +++ b/drivers/pci/pci-rcar-gen3.c @@ -0,0 +1,411 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Renesas RCar Gen3 PCIEC driver + * + * Copyright (C) 2018-2019 Marek Vasut + * + * Based on Linux PCIe driver for Renesas R-Car SoCs + * Copyright (C) 2014 Renesas Electronics Europe Ltd + * + * Based on: + * arch/sh/drivers/pci/pcie-sh7786.c + * arch/sh/drivers/pci/ops-sh7786.c + * Copyright (C) 2009 - 2011 Paul Mundt + * + * Author: Phil Edworthy + */ + +#include +#include +#include +#include +#include +#include +#include + +#define PCIECAR0x10 +#define PCIECCTLR 0x18 +#define CONFIG_SEND_ENABLEBIT(31) +#define TYPE0 (0 << 8) +#define TYPE1 BIT(8) +#define PCIECDR0x20 +#define PCIEMSR0x28 +#define PCIEINTXR 0x000400 +#define PCIEPHYSR 0x0007f0 +#define PHYRDYBIT(0) +#define PCIEMSITXR 0x000840 + +/* Transfer control */ +#define PCIETCTLR 0x02000 +#define CFINIT1 +#define PCIETSTR 0x02004 +#define DATA_LINK_ACTIVE 1 +#define PCIEERRFR 0x02020 +#define UNSUPPORTED_REQUEST BIT(4) +#define PCIEMSIFR 0x02044 +#define PCIEMSIALR 0x02048 +#define MSIFE 1 +#define PCIEMSIAUR 0x0204c +#define PCIEMSIIER 0x02050 + +/* root port address */ +#define PCIEPRAR(x)(0x02080 + ((x) * 0x4)) + +/* local address reg & mask */ +#define PCIELAR(x) (0x02200 + ((x) * 0x20)) +#define PCIELAMR(x)(0x02208 + ((x) * 0x20)) +#define LAM_PREFETCH BIT(3) +#define LAM_64BIT BIT(2) +#define LAR_ENABLEBIT(1) + +/* PCIe address reg & mask */ +#define PCIEPALR(x)(0x03400 + ((x) * 0x20)) +#define PCIEPAUR(x)(0x03404 + ((x) * 0x20)) +#define PCIEPAMR(x)(0x03408 + ((x) * 0x20)) +#define PCIEPTCTLR(x) (0x0340c + ((x) * 0x20)) +#define PAR_ENABLEBIT(31) +#define IO_SPACE BIT(8) + +/* Configuration */ +#define PCICONF(x) (0x01 + ((x) * 0x4)) +#define PMCAP(x) (0x010040 + ((x) * 0x4)) +#define EXPCAP(x) (0x010070 + ((x) * 0x4)) +#define VCCAP(x) (0x010100 + ((x) * 0x4)) + +/* link layer */ +#define IDSETR10x011004 +#define TLCTLR 0x011048 +#define MACSR 0x011054 +#define SPCHGFIN BIT(4) +#define SPCHGFAIL BIT(6) +#define SPCHGSUC BIT(7) +#define LINK_SPEED(0xf << 16) +#define LINK_SPEED_2_5GTS (1 << 16) +#define LINK_SPEED_5_0GTS (2 << 16) +#define MACCTLR0x011058 +#define SPEED_CHANGE BIT(24) +#define SCRAMBLE_DISABLE BIT(27) +#define MACS2R 0x011078 +#define MACCGSPSETR0x011084 +#define SPCNGRSN BIT(31) + +/* R-Car H1 PHY */ +#define H1_PCIEPHYADRR 0x04000c +#define WRITE_CMD BIT(16) +#define PHY_ACK BIT(24) +#define R
[U-Boot] [PATCH V2 2/2] ARM: rmobile: Enable PCIe driver on R-Car Gen3 Salvator-X
Enable PCIe driver on R-Car Gen3 Salvator-X boards. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- V2: Rename the driver --- configs/r8a7795_salvator-x_defconfig | 4 configs/r8a77965_salvator-x_defconfig | 4 configs/r8a7796_salvator-x_defconfig | 4 3 files changed, 12 insertions(+) diff --git a/configs/r8a7795_salvator-x_defconfig b/configs/r8a7795_salvator-x_defconfig index 8c5c9ed0c4..3943097216 100644 --- a/configs/r8a7795_salvator-x_defconfig +++ b/configs/r8a7795_salvator-x_defconfig @@ -16,6 +16,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y @@ -51,6 +52,9 @@ CONFIG_RENESAS_RAVB=y CONFIG_PINCTRL=y CONFIG_PINCONF=y CONFIG_PINCTRL_PFC=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCI_RCAR_GEN3=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y diff --git a/configs/r8a77965_salvator-x_defconfig b/configs/r8a77965_salvator-x_defconfig index 228d848c23..c5a300ae09 100644 --- a/configs/r8a77965_salvator-x_defconfig +++ b/configs/r8a77965_salvator-x_defconfig @@ -17,6 +17,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y @@ -52,6 +53,9 @@ CONFIG_RENESAS_RAVB=y CONFIG_PINCTRL=y CONFIG_PINCONF=y CONFIG_PINCTRL_PFC=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCI_RCAR_GEN3=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y diff --git a/configs/r8a7796_salvator-x_defconfig b/configs/r8a7796_salvator-x_defconfig index 67d3b517f4..cd8e3eea51 100644 --- a/configs/r8a7796_salvator-x_defconfig +++ b/configs/r8a7796_salvator-x_defconfig @@ -17,6 +17,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y @@ -52,6 +53,9 @@ CONFIG_RENESAS_RAVB=y CONFIG_PINCTRL=y CONFIG_PINCONF=y CONFIG_PINCTRL_PFC=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCI_RCAR_GEN3=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y -- 2.20.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCHv2 07/11] spi: Kconfig: Mark SH_SPI as DEPRECATED
On 5/19/19 3:52 PM, Tom Rini wrote: > From: Jagan Teki > > Mark SH_SPI as DEPRECATED, this so the resulting build shows > warning for a deprecated configuration enabled and associated code > will remove in v2019.07 release. > > Cc: Marek Vasut > Signed-off-by: Jagan Teki > [trini: Switch to DEPRECATED] > Signed-off-by: Tom Rini Acked-by: Marek Vasut > --- > drivers/spi/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig > index 3c345f108498..9aac500bb187 100644 > --- a/drivers/spi/Kconfig > +++ b/drivers/spi/Kconfig > @@ -343,6 +343,7 @@ config DAVINCI_SPI > > config SH_SPI > bool "SuperH SPI driver" > + depends on DEPRECATED > help > Enable the SuperH SPI controller driver. This driver can be used > on various SuperH SoCs, such as SH7757. > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 17/17] spi: Avoid using malloc() in a critical function
Hi, On Sat, May 18, 2019 at 6:05 PM Simon Glass wrote: > > In general we should avoid calling malloc() and free() repeatedly in > U-Boot lest we turn it into tianocore. In SPL this can make SPI flash > unusable since free() is often a nop and allocation space is limited. > > In any case, these seems no need for malloc() since the number of bytes > is very small, perhaps less than 8. > > Signed-off-by: Simon Glass > Fixes: d13f5b254a (spi: Extend the core to ease integration of SPI > memory controllers) > > --- > > drivers/spi/spi-mem.c | 15 +++ > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c > index b86eee75bcb..7aabebeff5f 100644 > --- a/drivers/spi/spi-mem.c > +++ b/drivers/spi/spi-mem.c > @@ -201,7 +201,6 @@ int spi_mem_exec_op(struct spi_slave *slave, const struct > spi_mem_op *op) > unsigned int pos = 0; > const u8 *tx_buf = NULL; > u8 *rx_buf = NULL; > - u8 *op_buf; > int op_len; > u32 flag; > int ret; > @@ -338,7 +337,17 @@ int spi_mem_exec_op(struct spi_slave *slave, const > struct spi_mem_op *op) > } > > op_len = sizeof(op->cmd.opcode) + op->addr.nbytes + op->dummy.nbytes; > - op_buf = calloc(1, op_len); > + > + /* > +* Avoid using malloc() here so that we can use this code in SPL where > +* simple malloc may be used. That implementation does not allow > free() > +* so repeated calls to this code can exhaust the space. > +* > +* The value of op_len is small, since it does not include the actual > +* data being sent, only the op-code and address. In fact, it should > be > +* possible to just use a small fixed value here instead of op_len. > +*/ > + u8 op_buf[op_len]; I'd say just make this a fixed buffer instead of a VLA - less code space bloat and potential stack problems in case of nonsensical inputs. As for the size, 8 bytes would be fine and actually leave some margin: the most i would expect for op_len is 1 + 4 + 1 = 6 bytes (the lowest would be 1+3+0 and the usual 1+3+1). -- Urja Rannikko ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/2] mmc: tmio: sdhi: Minor macro cleanup
Clean up the whitespaces in macros, no functional change. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu Cc: Peng Fan --- drivers/mmc/renesas-sdhi.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c index 6c51ccc294..698ecf69bd 100644 --- a/drivers/mmc/renesas-sdhi.c +++ b/drivers/mmc/renesas-sdhi.c @@ -23,21 +23,21 @@ /* SCC registers */ #define RENESAS_SDHI_SCC_DTCNTL0x800 -#define RENESAS_SDHI_SCC_DTCNTL_TAPENBIT(0) -#define RENESAS_SDHI_SCC_DTCNTL_TAPNUM_SHIFT 16 -#define RENESAS_SDHI_SCC_DTCNTL_TAPNUM_MASK 0xff +#define RENESAS_SDHI_SCC_DTCNTL_TAPEN BIT(0) +#define RENESAS_SDHI_SCC_DTCNTL_TAPNUM_SHIFT 16 +#define RENESAS_SDHI_SCC_DTCNTL_TAPNUM_MASK0xff #define RENESAS_SDHI_SCC_TAPSET0x804 #define RENESAS_SDHI_SCC_DT2FF 0x808 #define RENESAS_SDHI_SCC_CKSEL 0x80c -#define RENESAS_SDHI_SCC_CKSEL_DTSEL BIT(0) -#define RENESAS_SDHI_SCC_RVSCNTL 0x810 -#define RENESAS_SDHI_SCC_RVSCNTL_RVSEN BIT(0) +#define RENESAS_SDHI_SCC_CKSEL_DTSEL BIT(0) +#define RENESAS_SDHI_SCC_RVSCNTL 0x810 +#define RENESAS_SDHI_SCC_RVSCNTL_RVSEN BIT(0) #define RENESAS_SDHI_SCC_RVSREQ0x814 -#define RENESAS_SDHI_SCC_RVSREQ_RVSERR BIT(2) +#define RENESAS_SDHI_SCC_RVSREQ_RVSERR BIT(2) #define RENESAS_SDHI_SCC_SMPCMP0x818 -#define RENESAS_SDHI_SCC_TMPPORT2 0x81c -#define RENESAS_SDHI_SCC_TMPPORT2_HS400ENBIT(31) -#define RENESAS_SDHI_SCC_TMPPORT2_HS400OSEL BIT(4) +#define RENESAS_SDHI_SCC_TMPPORT2 0x81c +#define RENESAS_SDHI_SCC_TMPPORT2_HS400EN BIT(31) +#define RENESAS_SDHI_SCC_TMPPORT2_HS400OSELBIT(4) #define RENESAS_SDHI_MAX_TAP 3 -- 2.20.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/2] mmc: tmio: sdhi: HS400 manual adjustment
Since Gen3 SDHI has an internal DS signal AC-spec violation in HS400 mode, CRC-error may occur in read command in HS400 mode. This phoenomenon occurs at low/high temperature. To fix this, after completion of HS400 tuning, enable manual calibration. However, Gen3 M3 Ver.1.2 or earlier and H3 1.x does not support HS400. These SoC forcibly use HS200 mode by SoC attribute. The DT adjustment of the tuning parameters is not supported until the DT property names become clear. Signed-off-by: Marek Vasut Adapted from a patch by Takeshi Saito Cc: Nobuhiro Iwamatsu Cc: Peng Fan --- drivers/mmc/renesas-sdhi.c | 165 - drivers/mmc/tmio-common.h | 4 + 2 files changed, 166 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c index 698ecf69bd..7c53aa221e 100644 --- a/drivers/mmc/renesas-sdhi.c +++ b/drivers/mmc/renesas-sdhi.c @@ -38,9 +38,111 @@ #define RENESAS_SDHI_SCC_TMPPORT2 0x81c #define RENESAS_SDHI_SCC_TMPPORT2_HS400EN BIT(31) #define RENESAS_SDHI_SCC_TMPPORT2_HS400OSELBIT(4) +#define RENESAS_SDHI_SCC_TMPPORT3 0x828 +#define RENESAS_SDHI_SCC_TMPPORT3_OFFSET_0 3 +#define RENESAS_SDHI_SCC_TMPPORT3_OFFSET_1 2 +#define RENESAS_SDHI_SCC_TMPPORT3_OFFSET_2 1 +#define RENESAS_SDHI_SCC_TMPPORT3_OFFSET_3 0 +#define RENESAS_SDHI_SCC_TMPPORT3_OFFSET_MASK 0x3 +#define RENESAS_SDHI_SCC_TMPPORT4 0x82c +#define RENESAS_SDHI_SCC_TMPPORT4_DLL_ACC_STARTBIT(0) +#define RENESAS_SDHI_SCC_TMPPORT5 0x830 +#define RENESAS_SDHI_SCC_TMPPORT5_DLL_RW_SEL_R BIT(8) +#define RENESAS_SDHI_SCC_TMPPORT5_DLL_RW_SEL_W (0 << 8) +#define RENESAS_SDHI_SCC_TMPPORT5_DLL_ADR_MASK 0x3F +#define RENESAS_SDHI_SCC_TMPPORT6 0x834 +#define RENESAS_SDHI_SCC_TMPPORT7 0x838 +#define RENESAS_SDHI_SCC_TMPPORT_DISABLE_WP_CODE 0xa500 +#define RENESAS_SDHI_SCC_TMPPORT_CALIB_CODE_MASK 0x1f +#define RENESAS_SDHI_SCC_TMPPORT_MANUAL_MODE BIT(7) #define RENESAS_SDHI_MAX_TAP 3 +static u32 sd_scc_tmpport_read32(struct tmio_sd_priv *priv, u32 addr) +{ + /* read mode */ + tmio_sd_writel(priv, RENESAS_SDHI_SCC_TMPPORT5_DLL_RW_SEL_R | + (RENESAS_SDHI_SCC_TMPPORT5_DLL_ADR_MASK & addr), + RENESAS_SDHI_SCC_TMPPORT5); + + /* access start and stop */ + tmio_sd_writel(priv, RENESAS_SDHI_SCC_TMPPORT4_DLL_ACC_START, + RENESAS_SDHI_SCC_TMPPORT4); + tmio_sd_writel(priv, 0, RENESAS_SDHI_SCC_TMPPORT4); + + return tmio_sd_readl(priv, RENESAS_SDHI_SCC_TMPPORT7); +} + +static void sd_scc_tmpport_write32(struct tmio_sd_priv *priv, u32 addr, u32 val) +{ + /* write mode */ + tmio_sd_writel(priv, RENESAS_SDHI_SCC_TMPPORT5_DLL_RW_SEL_W | + (RENESAS_SDHI_SCC_TMPPORT5_DLL_ADR_MASK & addr), + RENESAS_SDHI_SCC_TMPPORT5); + tmio_sd_writel(priv, val, RENESAS_SDHI_SCC_TMPPORT6); + + /* access start and stop */ + tmio_sd_writel(priv, RENESAS_SDHI_SCC_TMPPORT4_DLL_ACC_START, + RENESAS_SDHI_SCC_TMPPORT4); + tmio_sd_writel(priv, 0, RENESAS_SDHI_SCC_TMPPORT4); +} + +static void renesas_sdhi_adjust_hs400_mode_enable(struct tmio_sd_priv *priv) +{ + u32 calib_code; + + if (!priv->adjust_hs400_enable) + return; + + if (!priv->needs_adjust_hs400) + return; + + /* +* Enabled Manual adjust HS400 mode +* +* 1) Disabled Write Protect +*W(addr=0x00, WP_DISABLE_CODE) +* 2) Read Calibration code and adjust +*R(addr=0x26) - adjust value +* 3) Enabled Manual Calibration +*W(addr=0x22, manual mode | Calibration code) +* 4) Set Offset value to TMPPORT3 Reg +*/ + sd_scc_tmpport_write32(priv, 0x00, + RENESAS_SDHI_SCC_TMPPORT_DISABLE_WP_CODE); + calib_code = sd_scc_tmpport_read32(priv, 0x26); + calib_code &= RENESAS_SDHI_SCC_TMPPORT_CALIB_CODE_MASK; + if (calib_code > priv->adjust_hs400_calibrate) + calib_code -= priv->adjust_hs400_calibrate; + else + calib_code = 0; + sd_scc_tmpport_write32(priv, 0x22, + RENESAS_SDHI_SCC_TMPPORT_MANUAL_MODE | + calib_code); + tmio_sd_writel(priv, priv->adjust_hs400_offset, + RENESAS_SDHI_SCC_TMPPORT3); + + /* Clear flag */ + priv->needs_adjust_hs400 = false; +} + +static void renesas_sdhi_adjust_hs400_mode_disable(struct tmio_sd_priv *priv) +{ + + /* Disabled Manual adjust HS400 mode +* +* 1) Disabled Write Protect +*W(addr=0x00, WP_DISABLE_CODE) +* 2) Disabled Manual Calibration +*W(addr=0x22, 0) +* 3) Clear offset value to TMPPORT3 Reg +*/ + sd_scc_tmpport_write
[U-Boot] [PATCH 1/1] efi_loader: return values of GetTime()
According to the UEFI spec 2.8 the GetTime() runtime service should return EFI_UNSUPPORTED if the real time clock is not available. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_runtime.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index 5f40659ee7..855b228e6b 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -169,7 +169,6 @@ static efi_status_t EFIAPI efi_get_time_boottime( { #ifdef CONFIG_DM_RTC efi_status_t ret = EFI_SUCCESS; - int r; struct rtc_time tm; struct udevice *dev; @@ -179,11 +178,12 @@ static efi_status_t EFIAPI efi_get_time_boottime( ret = EFI_INVALID_PARAMETER; goto out; } - - r = uclass_get_device(UCLASS_RTC, 0, &dev); - if (!r) - r = dm_rtc_get(dev, &tm); - if (r) { + if (uclass_get_device(UCLASS_RTC, 0, &dev) || + dm_rtc_get(dev, &tm)) { + ret = EFI_UNSUPPORTED; + goto out; + } + if (dm_rtc_get(dev, &tm)) { ret = EFI_DEVICE_ERROR; goto out; } @@ -210,7 +210,7 @@ out: return EFI_EXIT(ret); #else EFI_ENTRY("%p %p", time, capabilities); - return EFI_EXIT(EFI_DEVICE_ERROR); + return EFI_EXIT(EFI_UNSUPPORTED); #endif } -- 2.20.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] efi_loader: implement SetTime
Implement the SetTime() runtime service. Extend the real time clock selftest to check setting the clock. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_runtime.c| 73 - lib/efi_selftest/efi_selftest_rtc.c | 56 ++ 2 files changed, 120 insertions(+), 9 deletions(-) diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index 636dfdab39..5f40659ee7 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -214,7 +214,57 @@ out: #endif } +/** + * efi_set_time_boottime() - set current time + * + * This function implements the SetTime() runtime service before + * SetVirtualAddressMap() is called. + * + * See the Unified Extensible Firmware Interface (UEFI) specification + * for details. + * + * @time: pointer to structure to with current time + * Returns:status code + */ +static efi_status_t EFIAPI efi_set_time_boottime(struct efi_time *time) +{ +#ifdef CONFIG_DM_RTC + efi_status_t ret = EFI_SUCCESS; + struct rtc_time tm; + struct udevice *dev; + + EFI_ENTRY("%p", time); + + if (!time) { + ret = EFI_INVALID_PARAMETER; + goto out; + } + + if (uclass_get_device(UCLASS_RTC, 0, &dev)) { + ret = EFI_UNSUPPORTED; + goto out; + } + memset(&tm, 0, sizeof(tm)); + tm.tm_year = time->year; + tm.tm_mon = time->month; + tm.tm_mday = time->day; + tm.tm_hour = time->hour; + tm.tm_min = time->minute; + tm.tm_sec = time->second; + tm.tm_isdst = time->daylight == EFI_TIME_IN_DAYLIGHT; + /* Calculate day of week */ + rtc_calc_weekday(&tm); + + if (dm_rtc_set(dev, &tm)) + ret = EFI_DEVICE_ERROR; +out: + return EFI_EXIT(ret); +#else + EFI_ENTRY("%p %p", time, capabilities); + return EFI_EXIT(EFI_UNSUPPORTED); +#endif +} /** * efi_reset_system() - reset system * @@ -271,6 +321,24 @@ efi_status_t __weak __efi_runtime EFIAPI efi_get_time( return EFI_DEVICE_ERROR; } +/** + * efi_set_time() - set current time + * + * This function implements the SetTime runtime service after + * SetVirtualAddressMap() is called. As the U-Boot driver are not available + * anymore only an error code is returned. + * + * See the Unified Extensible Firmware Interface (UEFI) specification + * for details. + * + * @time: pointer to structure to with current time + * Returns:status code + */ +efi_status_t __weak __efi_runtime EFIAPI efi_set_time(struct efi_time *time) +{ + return EFI_UNSUPPORTED; +} + struct efi_runtime_detach_list_struct { void *ptr; void *patchto; @@ -289,6 +357,9 @@ static const struct efi_runtime_detach_list_struct efi_runtime_detach_list[] = { /* RTC accessors are gone */ .ptr = &efi_runtime_services.get_time, .patchto = &efi_get_time, + }, { + .ptr = &efi_runtime_services.set_time, + .patchto = &efi_set_time, }, { /* Clean up system table */ .ptr = &systab.con_in, @@ -697,7 +768,7 @@ struct efi_runtime_services __efi_runtime_data efi_runtime_services = { .headersize = sizeof(struct efi_runtime_services), }, .get_time = &efi_get_time_boottime, - .set_time = (void *)&efi_device_error, + .set_time = &efi_set_time_boottime, .get_wakeup_time = (void *)&efi_unimplemented, .set_wakeup_time = (void *)&efi_unimplemented, .set_virtual_address_map = &efi_set_virtual_address_map, diff --git a/lib/efi_selftest/efi_selftest_rtc.c b/lib/efi_selftest/efi_selftest_rtc.c index 8d440dc0b3..9eb29add3b 100644 --- a/lib/efi_selftest/efi_selftest_rtc.c +++ b/lib/efi_selftest/efi_selftest_rtc.c @@ -10,6 +10,7 @@ #include #define EFI_ST_NO_RTC "Could not read real time clock\n" +#define EFI_ST_NO_RTC_SET "Could not set real time clock\n" static struct efi_runtime_services *runtime; @@ -30,17 +31,26 @@ static int setup(const efi_handle_t handle, /* * Execute unit test. * - * Display current time. + * Read and display current time. + * Set a new value and read it back. + * Set the real time clock back the current time. * * @return:EFI_ST_SUCCESS for success */ static int execute(void) { efi_status_t ret; - struct efi_time tm; + struct efi_time tm, tm_old, tm_new = { + .year = 2017, + .month = 5, + .day = 19, + .hour = 13, + .minute = 47, + .second = 53, + }; /* Display current time */ - ret = runtime->get_time(&tm, NULL); + ret = runtime->get_time(&tm_old, NULL); if (ret != EFI_SUCCESS) { #ifdef CONFIG_CMD_DATE efi_st_error(EFI_ST_NO_RTC); @@ -49,11 +59,41 @@ static int execute(void)
[U-Boot] Pull request for UEFI sub-system for v2019.07-rc3 (2)
The following changes since commit 98b3156b0df4b0df9cb3a0bbfc240d0c4edd2638: Merge branch 'master' of git://git.denx.de/u-boot-samsung (2019-05-16 07:09:59 -0400) are available in the Git repository at: git://git.denx.de/u-boot-efi.git tags/efi-2019-07-rc3-2 for you to fetch changes up to b31ca6bf8484ca10bab4ae544698294a4197bef9: efi_loader: parameter check OutputString (2019-05-19 08:10:10 +0200) Pull request for UEFI sub-system for v2019.07-rc3 (2) Minor patches to improve UEFI specification compliance are provided. To allow running the UEFI self compliance tests an outdated version of the Unicode collation protocol has been added as a configuration option (disabled by default). Travis CI reports no problems: https://travis-ci.org/xypron2/u-boot/builds/534362390 Primary key fingerprint: 6DC4 F9C7 1F29 A6FA 06B7 6D33 C481 DBBC 2C05 1AC4 Heinrich Schuchardt (10): efi_loader: GetVariable set attributes for EFI_BUFFER_TOO_SMALL efi_loader: parameter checks simple network protocol efi_loader: merge adjacent sprintf() efi_loader: rename Unicode collation protocol 2 variables efi_loader: implement deprecated Unicode collation protocol efi_loader: check device path in InstallMultipleProtocolInterfaces efi_loader: parameter checks CalculateCrc32() efi_loader: GetNextMonotonicCount() check parameter efi_loader: EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState() correct parameter efi_loader: parameter check OutputString include/efi_api.h| 7 ++- include/efi_loader.h | 9 +++-- lib/efi_loader/Kconfig | 15 +-- lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_boottime.c| 30 -- lib/efi_loader/efi_console.c | 11 --- lib/efi_loader/efi_device_path_to_text.c | 5 ++--- lib/efi_loader/efi_net.c | 6 +++--- lib/efi_loader/efi_root_node.c | 7 ++- lib/efi_loader/efi_unicode_collation.c | 33 ++--- lib/efi_loader/efi_variable.c| 15 ++- lib/efi_selftest/Makefile| 3 ++- 12 files changed, 116 insertions(+), 27 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/5] CONFIG_SYS_[DI]CACHE_OFF: remove superfluous "1"
On Fri, May 03, 2019 at 09:40:57AM -0400, Trevor Woerner wrote: > This config is the only config that uses: > #define CONFIG_SYS_DCACHE_OFF 1 > in its #define. > > Remove the superfluous "1" so this cache #define is like all the others. > > Signed-off-by: Trevor Woerner Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/5] CONFIG_SYS_[ID]CACHE_OFF: unify the 'any' case
On Fri, May 03, 2019 at 09:40:56AM -0400, Trevor Woerner wrote: > According to De Morgan's Law[1]: > !(A && B) = !A || !B > !(A || B) = !A && !B > > There are 5 places in the code where we find: > #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) > and 4 places in the code where we find: > #if (!defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF)) > > In words, the construct: > !defined(CONFIG_SYS_[DI]CACHE_OFF) > means: > "is the [DI]CACHE on?" > and the construct: > defined(CONFIG_SYS_[DI]CACHE_OFF) > means: > "is the [DI]CACHE off?" > > Therefore > !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) > means: > "the opposite of 'are they both off?'" > in other words: > "are either or both on?" > and: > (!defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF) > means: > "are either or both on?" > > As a result, I've converted the 4 instances of '(!A || !B)' to '!(A && B)' for > consistency. > > [1] https://en.wikipedia.org/wiki/De_Morgan%27s_laws > > Signed-off-by: Trevor Woerner Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 3/5] CONFIG_SYS_[DI]CACHE_OFF: remove commented lines
On Fri, May 03, 2019 at 09:40:58AM -0400, Trevor Woerner wrote: > Eventually these configuration items will be converted to Kconfig, > therefore there's little point in leaving commented-out versions of > them in include/configs. > > Signed-off-by: Trevor Woerner Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 4/5] CONFIG_SYS_[DI]CACHE_OFF: convert to Kconfig
On Fri, May 03, 2019 at 09:40:59AM -0400, Trevor Woerner wrote: > CONFIG_SYS_[DI]CACHE_OFF had been partially converted to Kconfig > parameters; only for the ARC architecture. This patch turns these two > parameters into Kconfig items everywhere else they are found. > > All of the include/configs/* and defconfig changes in this patch are > for arm machines only. The Kconfig changes for arc, nds32, riscv, > and xtensa have been included since these symbols are found in code > under arch/{arc,nds32,riscv,xtensa}, however, no currently-defined > include/configs/* or defconfigs for these architectures exist which > include these symbols. > > These results have been confirmed with tools/moveconfig.py. > > Acked-by: Alexey Brodkin > Signed-off-by: Trevor Woerner Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] bcm968580xref: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
On Fri, May 03, 2019 at 07:51:42PM +0200, Philippe Reynes wrote: > This board define the flag CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT > but it's a mistake. It's a workaround for an issue in nand core. > This issue was fixed by the commit 5f626e78491c ("mtd: nand: raw: > Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behavior"). Now, this flag > break the nand on this board, so we simply remove it. > > Signed-off-by: Philippe Reynes Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] dt: bcm63158: watchdog should use a 50Mhz clock
On Fri, May 03, 2019 at 07:43:08PM +0200, Philippe Reynes wrote: > The watchdog should use a clock at 50 Mhz, so > instead of using the clock osc (200 Mhz), we > define a reference clock at 50Mhz and use it > for both watchdog. > > Signed-off-by: Philippe Reynes > Reviewed-by: Stefan Roese Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] bcm963158: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
On Fri, May 03, 2019 at 07:51:43PM +0200, Philippe Reynes wrote: > This board define the flag CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT > but it's a mistake. It's a workaround for an issue in nand core. > This issue was fixed by the commit 5f626e78491c ("mtd: nand: raw: > Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behavior"). Now, this flag > break the nand on this board, so we simply remove it. > > Signed-off-by: Philippe Reynes Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Makefile: Prioritize external dtb if defined
On Mon, Mar 25, 2019 at 03:55:16PM +0100, Michal Simek wrote: > Prioritize external dtb if its passed via EXT_DTB > than the dtb that was built in the tree. With this > patch it appends the specified external dtb to > the u-boot image. > > Signed-off-by: Michal Simek > Signed-off-by: Siva Durga Prasad Paladugu > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] fit: Add support for printing more than one FPGA node name
On Wed, Feb 13, 2019 at 08:32:24PM +0800, tien.fong.c...@intel.com wrote: > From: Tien Fong Chee > > This would print out all the FPGA node names setting to fpga property. > > Signed-off-by: Tien Fong Chee > --- > common/image-fit.c | 14 +++--- > 1 files changed, 11 insertions(+), 3 deletions(-) > > diff --git a/common/image-fit.c b/common/image-fit.c > index ac901e1..816e17d 100644 > --- a/common/image-fit.c > +++ b/common/image-fit.c > @@ -263,6 +263,7 @@ static void fit_conf_print(const void *fit, int noffset, > const char *p) > int ret; > int fdt_index, loadables_index; > int ndepth; > + ulong count; > > /* Mandatory properties */ > ret = fit_get_desc(fit, noffset, &desc); > @@ -299,9 +300,16 @@ static void fit_conf_print(const void *fit, int noffset, > const char *p) > printf("%s\n", uname); > } > > - uname = fdt_getprop(fit, noffset, FIT_FPGA_PROP, NULL); > - if (uname) > - printf("%s FPGA: %s\n", p, uname); > + count = fit_conf_get_prop_node_count(fit, noffset, FIT_FPGA_PROP); > + > + for (ndepth = 0; ndepth < count; ndepth++) { > + int images_noffset = fit_conf_get_prop_node_index(fit, noffset, > + FIT_FPGA_PROP, ndepth); > + uname = fit_get_name(fit, images_noffset, NULL); > + > + if (uname) > + printf("%s FPGA: %s\n", p, uname); > + } > > /* Print out all of the specified loadables */ > for (loadables_index = 0; There's a problem here. When I use buildman to make multiple boards (say 'arm', but something smaller should trigger it too), all of my builds get stuck on mkimage doing something. A build of a single board is fine. -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] dt: bcm6858: watchdog should use a 50Mhz clock
On Fri, May 03, 2019 at 07:43:07PM +0200, Philippe Reynes wrote: > The watchdog should use a clock at 50 Mhz, so > instead of using the clock osc (200 Mhz), we > define a reference clock at 50Mhz and use it > for both watchdog. > > Signed-off-by: Philippe Reynes > Reviewed-by: Stefan Roese Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 5/5] CONFIG_SPL_SYS_[DI]CACHE_OFF: add
On Fri, May 03, 2019 at 09:41:00AM -0400, Trevor Woerner wrote: > While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances > where these configuration items are conditional on SPL. This commit adds SPL > variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates > the configurations as required. > > Acked-by: Alexey Brodkin > Signed-off-by: Trevor Woerner Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] tools: use read-only mmap in fit_check_sign
On Tue, May 14, 2019 at 07:35:02PM +0100, luca.bocca...@gmail.com wrote: > From: Luca Boccassi > > Add an option to open files in read-only mode in mmap_fdt so > that fit_check_sign can be used to inspect files on read-only > filesystems. > For example, this is useful when a key is shipped in a read-only > rootfs or squashfs. > > Signed-off-by: Luca Boccassi Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: mediatek: mt8516: use PSCI to reset the SoC
On Mon, May 06, 2019 at 04:17:56PM +0200, Fabien Parent wrote: > Instead of using the watchdog, let's use PSCI to perform the reset > of the SoC. > > Signed-off-by: Fabien Parent Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] configs: bcm968580 disable CONFIG_CMD_BOOTEFI_SELFTEST
On Thu, May 09, 2019 at 05:35:12PM +0200, Heinrich Schuchardt wrote: > Configuration option CONFIG_CMD_BOOTEFI_SELFTEST is useful for the > development of the UEFI sub-system. For production it is not needed. > > Remove CONFIG_CMD_BOOTEFI_SELFTEST from bcm968580xref_ram_defconfig. > > Suggested-by: Tom Rini > Signed-off-by: Heinrich Schuchardt Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] watchdog: bcm6345: callback start use tick instead of ms
On Fri, May 03, 2019 at 07:43:06PM +0200, Philippe Reynes wrote: > The function bcm6345_wdt_start use the argument timeout > as tick but it should be used as milliseconds. > > A clock is added as requirement for this driver. > The frequency of the clock is then used to convert the > millisecond to ticks in the function bcm6345_wdt_start. > > Signed-off-by: Philippe Reynes > Reviewed-by: Stefan Roese Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-x86
On Sun, May 19, 2019 at 04:19:06PM +0800, Bin Meng wrote: > Hi Tom, > > This PR includes the following updates to U-Boot x86 support: > > - Allow coreboot to process unhandled tags > - Enable NVMe on QEMU x86_64 target > > The following changes since commit 98b3156b0df4b0df9cb3a0bbfc240d0c4edd2638: > > Merge branch 'master' of git://git.denx.de/u-boot-samsung > (2019-05-16 07:09:59 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-x86.git > > for you to fetch changes up to 604ce762e3ef2e8e1ce387df4a40bdc52119421d: > > x86: qemu-x86_64: Enable NVMe (2019-05-19 16:17:33 +0800) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Import include/android_bootloader_message.h from AOSP
On Tue, May 14, 2019 at 09:05:26PM +0200, Alex Deymo wrote: > This takes the latest changes from AOSP from the file > bootloader_message/include/bootloader_message/bootloader_message.h > in the repository > https://android.googlesource.com/platform/bootable/recovery > and re-licensed them to BSD-3 for U-Boot. > > Minimum local changes have been applied (convert C++ to C comments and > adding #ifndef __UBOOT__ block to skip all the function declarations). > > Signed-off-by: Alex Deymo > Reviewed-by: Sam Protsenko Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: da850evm: Enable block cache during SPL
On Wed, May 15, 2019 at 04:18:35PM -0500, Adam Ford wrote: > There appears to be enough RAM to support cache in SPL. > This pach enables block cache in SPL. > > Signed-off-by: Adam Ford > > diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig > index 09c6147e2d..8c16d5c4f5 100644 Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] bcm968380gerg: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
On Fri, May 03, 2019 at 07:51:44PM +0200, Philippe Reynes wrote: > This board define the flag CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT > but it's a mistake. It's a workaround for an issue in nand core. > This issue was fixed by the commit 5f626e78491c ("mtd: nand: raw: > Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behavior"). Now, this flag > break the nand on this board, so we simply remove it. > > Signed-off-by: Philippe Reynes Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] spl: Set spl_image->fdt_addr pointer for full fitImage configuration
On Tue, May 07, 2019 at 09:17:02PM +0200, Marek Vasut wrote: > Set the spl_image->fdt_addr pointer both for simple fitImage configuration > as well as full fitImage configuration, to let spl_perform_fixups() access > the DT and perform modifications to it if necessary. > > Signed-off-by: Marek Vasut > Cc: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] ata: ahci: drop read-only ahci_ioports members
On Tue, May 14, 2019 at 10:33:41AM +0200, Christian Gmeiner wrote: > Also get rid of ahci_setup_port(..). > > Signed-off-by: Christian Gmeiner Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Kconfig: fix FIT offset prompt text
On Wed, May 15, 2019 at 10:10:04PM +0100, Ibai Erkiaga wrote: > The current prompt text for FIT external offset is identical to > SYS_TEXT_BASE which might confuse the users. Provided more accurate > description for the prompt text. > > Signed-off-by: Ibai Erkiaga > Reviewed-by: Marek Vasut Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: omap3_logic/omap35_logic: Enable GPIO in SPL
On Wed, May 15, 2019 at 08:37:52AM -0500, Adam Ford wrote: > The MMC controller enabled card detect, so this patch enables > the GPIO driver in SPL to support it. > > Signed-off-by: Adam Ford > > diff --git a/configs/omap35_logic_defconfig b/configs/omap35_logic_defconfig > index ea27731da3..3a529e8836 100644 Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] configs: bcm963158 disable CONFIG_CMD_BOOTEFI_SELFTEST
On Thu, May 09, 2019 at 05:34:15PM +0200, Heinrich Schuchardt wrote: > Configuration option CONFIG_CMD_BOOTEFI_SELFTEST is useful for the > development of the UEFI sub-system. For production it is not needed. > > Remove CONFIG_CMD_BOOTEFI_SELFTEST from bcm963158_ram_defconfig. > > Suggested-by: Tom Rini > Signed-off-by: Heinrich Schuchardt Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 00/11] clk: Port Linux common clock framework [CCF] to U-boot (tag: 5.0-rc3)
Hi Simon, > Hi Lukasz, > > On Sat, 18 May 2019 at 15:28, Lukasz Majewski wrote: > > > > Hi Simon, > > > > This is not the newest patch set version of CCF (v3 vs. v4), but the > > comments/issues apply. > > > > > Hi Lukasz, > > > > > > On Thu, 25 Apr 2019 at 04:30, Lukasz Majewski > > > wrote: > > > > > > > > This patch series brings the files from Linux kernel to provide > > > > clocks support as it is used on the Linux kernel with common > > > > clock framework [CCF] setup. > > > > > > > > This series also fixes several problems with current clocks and > > > > provides sandbox tests for functions addded to clk-uclass.c > > > > file. > > > > > > > > Design decisions/issues: > > > > = > > > > > > > > - U-boot's DM for clk differs from Linux CCF. The most notably > > > > difference is the lack of support for hierarchical clocks and > > > > "clock as a manager driver" (single clock DTS node acts as a > > > > starting point for all other clocks). > > > > > > > > - The clk_get_rate() now caches the previously read data (no > > > > need for recursive access. > > > > > > > > - On purpose the "manager" clk driver (clk-imx6q.c) is not using > > > > large table to store pointers to clocks - e.g. > > > > clk[IMX6QDL_CLK_USDHC2_SEL] = Instead we use udevice's > > > > linked list for the same class (UCLASS_CLK). The rationale - > > > > when porting the code as is from Linux, one would need ~1KiB of > > > > RAM to store it. This is way too much if we do plan to use this > > > > driver in SPL. > > > > > > > > - The "central" structure of this patch series is struct udevice > > > > and its driver_data field contains the struct clk pointer (to > > > > the originally created one). > > > > > > > > - Up till now U-boot's driver model's CLK operates on udevice > > > > (main access to clock is by udevice ops) > > > > In the CCF the access to struct clk (comprising pointer to > > > > *dev) is possible via dev_get_driver_data() > > > > > > > > Storing back pointer (from udevice to struct clk) as > > > > driver_data is a convention for CCF. > > > > > > Ick. Why not use uclass-private data to store this, since every > > > UCLASS_CLK device can have a parent. > > > > The "private_data" field would be also a good place to store the > > back pointer from udevice to struct clk [*]. The problem with CCF > > and udevice's priv pointer is explained just below: > > > > > > > > > > > > > - I could use *private_alloc_size to allocate driver's 'private" > > > > structures (dev->priv) for e.g. divider (struct clk_divider > > > > *divider) for IMX6Q clock, but this would change the original > > > > structure of the CCF code. > > > > The original Linux's CCF code for iMX relies on using kmalloc > > internally: > > > > https://elixir.bootlin.com/linux/v5.1.2/source/drivers/clk/imx/clk-gate2.c#L139 > > https://elixir.bootlin.com/linux/v5.1.2/source/drivers/clk/clk-divider.c#L471 > > > > By using driver_data I've avoided the need to make more changes to > > the original Linux code. > > > > I could use udevice's priv with automatic data allocation but then > > the CCF ported code would require more changes and considering the > > (from the outset) need to "fit" this code into U-Boot's DM, it > > drives away from the original Linux code. > > Is the main change the need to cast driver_data? The main change would be to remove the per clock device memory allocation code (with exit paths) from the original CCF code. This shall not be so difficult. > Perhaps that could be > hidden in a helper function/macro, so that in U-Boot it can hide the > use of (struct clk_uc_priv *)dev_get_uclass_priv(clk->dev))>parent ? Helper function would help to some extend as we operate on structures similar to: struct clk_gate2 { struct clk clk; void __iomem*reg; u8 bit_idx; u8 cgr_val; u8 flags; }; The helper would return struct clk's address which is the same as struct's clk_gate2 (this is assured by C standard). > > > > > > > > > > > > > The question is if it would be better to use private_alloc_size > > > > (and dev->private) or stay with driver_data. > > > > The former requires some rewritting in CCF original code (to > > > > remove (c)malloc, etc), but comply with u-boot DM. The latter > > > > allows re-using the CCF code as is, but introduces some > > > > convention special for CCF (I'm not sure thought if dev->priv > > > > is NOT another convention as well). > > > > > > Yes I would like to avoid malloc() calls in drivers and use the > > > in-built mechanism. > > > > I see your point. > > > > If the community agrees - I can rewrite the code to use such > > approach (but issues pointed out in [*] still apply). > > > > > > > > > > > > > - I've added the clk_get_parent(), which reads parent's > > > > dev->driver_data to provide parent's struct clk pointer. This > > > > seems the easiest way to get child/parent rela
[U-Boot] [PATCH 1/1] tools/logos: add text to U-Boot logo
At the OSFC conference the U-Boot logo has been used with a text. So let's add the text to the SVG file. Signed-off-by: Heinrich Schuchardt --- tools/logos/u-boot_logo.svg | 116 +++- 1 file changed, 74 insertions(+), 42 deletions(-) diff --git a/tools/logos/u-boot_logo.svg b/tools/logos/u-boot_logo.svg index e45ef2ef77..1527e79a3a 100644 --- a/tools/logos/u-boot_logo.svg +++ b/tools/logos/u-boot_logo.svg @@ -12,11 +12,11 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"; xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"; width="186" - height="186" - viewBox="0 0 186 186" + height="244" + viewBox="0 0 186 244" id="svg2" version="1.1" - inkscape:version="0.92.3 (2405546, 2018-03-11)" + inkscape:version="0.92.4 (5da689c313, 2019-01-14)" sodipodi:docname="u-boot_logo.svg" inkscape:export-filename="tools/logos/u-boot_logo.png" inkscape:export-xdpi="41.290001" @@ -69,63 +69,56 @@ guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:window-width="1440" - inkscape:window-height="871" + inkscape:window-width="1920" + inkscape:window-height="1051" id="namedview27" showgrid="false" - inkscape:zoom="3" - inkscape:cx="93" - inkscape:cy="93" + inkscape:zoom="2.1213203" + inkscape:cx="40" + inkscape:cy="66.33" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" - inkscape:current-layer="layer1" /> + inkscape:current-layer="flowRoot840" /> - + transform="translate(0,58)"> + y="-2" /> + y="8.5" /> + y="41" /> + + + + + + + + + + -- 2.20.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Makefile: Prioritize external dtb if defined
On 5/19/19 10:44 PM, Tom Rini wrote: > On Mon, Mar 25, 2019 at 03:55:16PM +0100, Michal Simek wrote: > >> Prioritize external dtb if its passed via EXT_DTB >> than the dtb that was built in the tree. With this >> patch it appends the specified external dtb to >> the u-boot image. >> >> Signed-off-by: Michal Simek >> Signed-off-by: Siva Durga Prasad Paladugu >> Reviewed-by: Simon Glass > > Applied to u-boot/master, thanks! The R-Car Gen3 boards (r8a779{5,6}*_salvator-x_defconfig) u-boot.bin size grew from 986 kiB to 1240 kiB with this patch, rendering the boards unbootable. I expect there to be more such cases, so please revert until there's new version which has this fixed. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Makefile: Prioritize external dtb if defined
On Mon, May 20, 2019 at 12:03:45AM +0200, Marek Vasut wrote: > On 5/19/19 10:44 PM, Tom Rini wrote: > > On Mon, Mar 25, 2019 at 03:55:16PM +0100, Michal Simek wrote: > > > >> Prioritize external dtb if its passed via EXT_DTB > >> than the dtb that was built in the tree. With this > >> patch it appends the specified external dtb to > >> the u-boot image. > >> > >> Signed-off-by: Michal Simek > >> Signed-off-by: Siva Durga Prasad Paladugu > >> Reviewed-by: Simon Glass > > > > Applied to u-boot/master, thanks! > > The R-Car Gen3 boards (r8a779{5,6}*_salvator-x_defconfig) u-boot.bin > size grew from 986 kiB to 1240 kiB with this patch, rendering the boards > unbootable. I expect there to be more such cases, so please revert until > there's new version which has this fixed. I must have messed something up when re-adjusting this to apply to top of tree. I'll revert this, thanks for reporting. Michal, please rebase the original patch and resend, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Makefile: Prioritize external dtb if defined
On 5/20/19 12:08 AM, Tom Rini wrote: > On Mon, May 20, 2019 at 12:03:45AM +0200, Marek Vasut wrote: >> On 5/19/19 10:44 PM, Tom Rini wrote: >>> On Mon, Mar 25, 2019 at 03:55:16PM +0100, Michal Simek wrote: >>> Prioritize external dtb if its passed via EXT_DTB than the dtb that was built in the tree. With this patch it appends the specified external dtb to the u-boot image. Signed-off-by: Michal Simek Signed-off-by: Siva Durga Prasad Paladugu Reviewed-by: Simon Glass >>> >>> Applied to u-boot/master, thanks! >> >> The R-Car Gen3 boards (r8a779{5,6}*_salvator-x_defconfig) u-boot.bin >> size grew from 986 kiB to 1240 kiB with this patch, rendering the boards >> unbootable. I expect there to be more such cases, so please revert until >> there's new version which has this fixed. > > I must have messed something up when re-adjusting this to apply to top > of tree. I'll revert this, thanks for reporting. Michal, please rebase > the original patch and resend, thanks! My guess is that it has to do with the LZO compression of the DTBs on Gen3 , that fit-blob.itb is probably appended uncompressed or something. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] ARM: renesas: Factor out DRAM setup on R-Car Gen3
Pull DRAM layout configuration code into rcar-common.c instead of having it in multiple copies across board files. This poses no change for Salvator-X/XS, ULCB and Ebisu boards, however it adds a bit of extra code for Draak and Eagle boards, which now gain the capability of being passed in the DRAM layout by the ATF. Signed-off-by: Marek Vasut Cc: Eugeniu Rosca Cc: Nobuhiro Iwamatsu --- board/renesas/draak/Makefile | 2 +- board/renesas/draak/draak.c | 15 --- board/renesas/eagle/Makefile | 2 +- board/renesas/eagle/eagle.c | 15 --- board/renesas/ebisu/Makefile | 2 +- board/renesas/ebisu/ebisu.c | 35 board/renesas/rcar-common/common.c| 38 +++ board/renesas/salvator-x/Makefile | 2 +- board/renesas/salvator-x/salvator-x.c | 35 board/renesas/ulcb/Makefile | 2 +- board/renesas/ulcb/ulcb.c | 35 11 files changed, 43 insertions(+), 140 deletions(-) diff --git a/board/renesas/draak/Makefile b/board/renesas/draak/Makefile index 0140b61bff..1fc90d1dab 100644 --- a/board/renesas/draak/Makefile +++ b/board/renesas/draak/Makefile @@ -9,5 +9,5 @@ ifdef CONFIG_SPL_BUILD obj-y := ../rcar-common/gen3-spl.o else -obj-y := draak.o +obj-y := draak.o ../rcar-common/common.o endif diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c index 8f3d3915f7..46d9f74785 100644 --- a/board/renesas/draak/draak.c +++ b/board/renesas/draak/draak.c @@ -70,21 +70,6 @@ int board_init(void) return 0; } -int dram_init(void) -{ - if (fdtdec_setup_mem_size_base() != 0) - return -EINVAL; - - return 0; -} - -int dram_init_banksize(void) -{ - fdtdec_setup_memory_banksize(); - - return 0; -} - #define RST_BASE 0xE616 #define RST_CA57RESCNT (RST_BASE + 0x40) #define RST_CA53RESCNT (RST_BASE + 0x44) diff --git a/board/renesas/eagle/Makefile b/board/renesas/eagle/Makefile index 04402a2ced..062c46ba24 100644 --- a/board/renesas/eagle/Makefile +++ b/board/renesas/eagle/Makefile @@ -9,5 +9,5 @@ ifdef CONFIG_SPL_BUILD obj-y := ../rcar-common/gen3-spl.o else -obj-y := eagle.o +obj-y := eagle.o ../rcar-common/common.o endif diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c index 0e5efea19d..d6240b19ef 100644 --- a/board/renesas/eagle/eagle.c +++ b/board/renesas/eagle/eagle.c @@ -67,21 +67,6 @@ int board_init(void) return 0; } -int dram_init(void) -{ - if (fdtdec_setup_mem_size_base() != 0) - return -EINVAL; - - return 0; -} - -int dram_init_banksize(void) -{ - fdtdec_setup_memory_banksize(); - - return 0; -} - #define RST_BASE 0xE616 #define RST_CA57RESCNT (RST_BASE + 0x40) #define RST_CA53RESCNT (RST_BASE + 0x44) diff --git a/board/renesas/ebisu/Makefile b/board/renesas/ebisu/Makefile index 39971f11b2..1fd9a03ecc 100644 --- a/board/renesas/ebisu/Makefile +++ b/board/renesas/ebisu/Makefile @@ -9,5 +9,5 @@ ifdef CONFIG_SPL_BUILD obj-y := ../rcar-common/gen3-spl.o else -obj-y := ebisu.o +obj-y := ebisu.o ../rcar-common/common.o endif diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c index 60429e4529..cb7d432a15 100644 --- a/board/renesas/ebisu/ebisu.c +++ b/board/renesas/ebisu/ebisu.c @@ -43,41 +43,6 @@ int board_init(void) return 0; } -/* - * If the firmware passed a device tree use it for U-Boot DRAM setup. - */ -extern u64 rcar_atf_boot_args[]; - -int dram_init(void) -{ - const void *atf_fdt_blob = (const void *)(rcar_atf_boot_args[1]); - const void *blob; - - /* Check if ATF passed us DTB. If not, fall back to builtin DTB. */ - if (fdt_magic(atf_fdt_blob) == FDT_MAGIC) - blob = atf_fdt_blob; - else - blob = gd->fdt_blob; - - return fdtdec_setup_mem_size_base_fdt(blob); -} - -int dram_init_banksize(void) -{ - const void *atf_fdt_blob = (const void *)(rcar_atf_boot_args[1]); - const void *blob; - - /* Check if ATF passed us DTB. If not, fall back to builtin DTB. */ - if (fdt_magic(atf_fdt_blob) == FDT_MAGIC) - blob = atf_fdt_blob; - else - blob = gd->fdt_blob; - - fdtdec_setup_memory_banksize_fdt(blob); - - return 0; -} - #define RST_BASE 0xE616 #define RST_CA57RESCNT (RST_BASE + 0x40) #define RST_CA53RESCNT (RST_BASE + 0x44) diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c index 1ce6e2eac1..292867e496 100644 --- a/board/renesas/rcar-common/common.c +++ b/board/renesas/rcar-common/common.c @@ -9,3 +9,41 @@ #include #include + +#ifdef CONFIG_RCAR_GEN3 + +DECLARE_GLOBAL_DATA_PTR; + +/* If the firmware passed a device tree use it for U-Boot DRAM setup. */ +extern u64 rcar_atf_boot_args[]; + +int dram_init(void) +{ + const void *atf_fdt_blob =
Re: [U-Boot] [PATCH 1/1] tools/logos: add text to U-Boot logo
On 5/19/19 11:57 PM, Heinrich Schuchardt wrote: > At the OSFC conference the U-Boot logo has been used with a text. So let's > add the text to the SVG file. > > Signed-off-by: Heinrich Schuchardt Can we also get rid of those windows, the periscope, and the propeller ? They look really unprofessional on the logo. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] ARM: renesas: Configure DRAM size from ATF DT fragment
On 4/4/19 3:45 PM, Eugeniu Rosca wrote: > Hi Marek, Hi, > On Tue, Apr 02, 2019 at 05:45:29AM +0200, Marek Vasut wrote: >> On 3/13/19 4:25 PM, Eugeniu Rosca wrote: >>> On Tue, Mar 12, 2019 at 10:11:21PM +0100, Marek Vasut wrote: On 3/12/19 8:30 PM, Eugeniu Rosca wrote: > Hi Marek cc: Michael Hi, > On Tue, Mar 5, 2019 at 4:37 AM Marek Vasut wrote: >> >> The ATF can pass additional information via the first four registers, >> x0...x3. The R-Car Gen3 with mainline ATF, register x1 contains pointer >> to a device tree with platform information. Parse this device tree and >> extract DRAM size information from it. This is useful on systems where >> the DRAM size can vary between configurations. > > 1. Do the ATF changes supporting this feature already exist in mainline > ATF? Yes, for quite some time, see commit 1d85c4bd5b6291b99feb2409525c96f0c1744328 plat: rcar: Pass DTB with DRAM layout from BL2 to next stages >>> >>> That's helpful, but I think such information should go by default into >>> commit description. >>> >>> [..] >>> >>> Besides the above, I wonder why this patch duplicates code across three >>> board files? Could this code be relocated to some common area like [1]? >> >> That's the plan. > > I look forward to seeing v2 then, since this would allow us not > duplicating this code over and over again in the board-specific files > of the customer R-Car3 targets. Should be fixed by http://patchwork.ozlabs.org/patch/1101744/ [...] -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 01/10] mmc: add missing space before comment delimiter
Add missing space before a comment delimiter. Signed-off-by: Marcel Ziswiler --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 456c1b4cc9..ede528dc5a 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -2672,7 +2672,7 @@ retry: if (err) return err; - /* The internal partition reset to user partition(0) at every CMD0*/ + /* The internal partition reset to user partition(0) at every CMD0 */ mmc_get_blk_desc(mmc)->hwpart = 0; /* Test for SD version 2 */ -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 03/10] serial: pxa: clean-up platform data include file
Clean-up platform data include file by using BIT macro and converting indentation with spaces to tabs. Signed-off-by: Marcel Ziswiler --- include/dm/platform_data/serial_pxa.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/dm/platform_data/serial_pxa.h b/include/dm/platform_data/serial_pxa.h index 408c00885d..b78bdb6409 100644 --- a/include/dm/platform_data/serial_pxa.h +++ b/include/dm/platform_data/serial_pxa.h @@ -17,7 +17,7 @@ #define FFUART_INDEX 1 #define STUART_INDEX 2 #elif CONFIG_CPU_PXA25X -#define UART_CLK_BASE (1 << 4)/* HWUART */ +#define UART_CLK_BASE BIT(4) /* HWUART */ #define UART_CLK_REG CKEN #define HWUART_INDEX 0 #define STUART_INDEX 1 @@ -42,9 +42,9 @@ /* * struct pxa_serial_platdata - information about a PXA port * - * @base: Uart port base register address - * @port: Uart port index, for cpu with pinmux for uart / gpio - * baudrtatre: Uart port baudrate + * @base: Uart port base register address + * @port: Uart port index, for cpu with pinmux for uart / gpio + * baudrtatre: Uart port baudrate */ struct pxa_serial_platdata { struct pxa_uart_regs *base; -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 05/10] dm: core: gracefully handle alias seq without of
Gracefully handle alias seq in the platform data rather than OF case. Signed-off-by: Marcel Ziswiler --- drivers/core/read.c | 4 +++- include/dm/read.h | 4 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/core/read.c b/drivers/core/read.c index 6bda077a34..670ffe5dc5 100644 --- a/drivers/core/read.c +++ b/drivers/core/read.c @@ -212,15 +212,17 @@ int dev_read_alias_seq(struct udevice *dev, int *devnump) { ofnode node = dev_ofnode(dev); const char *uc_name = dev->uclass->uc_drv->name; - int ret; + int ret = -ENOTSUPP; if (ofnode_is_np(node)) { ret = of_alias_get_id(ofnode_to_np(node), uc_name); if (ret >= 0) *devnump = ret; } else { +#if CONFIG_IS_ENABLED(OF_CONTROL) ret = fdtdec_get_alias_seq(gd->fdt_blob, uc_name, ofnode_to_offset(node), devnump); +#endif } return ret; diff --git a/include/dm/read.h b/include/dm/read.h index 60b727cbd8..a8ffbe42ac 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -702,8 +702,12 @@ static inline const void *dev_read_prop(struct udevice *dev, static inline int dev_read_alias_seq(struct udevice *dev, int *devnump) { +#if CONFIG_IS_ENABLED(OF_CONTROL) return fdtdec_get_alias_seq(gd->fdt_blob, dev->uclass->uc_drv->name, dev_of_offset(dev), devnump); +#else + return -ENOTSUPP; +#endif } static inline int dev_read_u32_array(struct udevice *dev, const char *propname, -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 02/10] mmc: fsl_esdhc: annotate endifs
Annotate endifs to make CONFIG_IS_ENABLED(DM_MMC) or not more obvious. Signed-off-by: Marcel Ziswiler --- drivers/mmc/fsl_esdhc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 1b7de74a72..0742cd64e1 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -1372,7 +1372,7 @@ int fsl_esdhc_mmc_init(bd_t *bis) cfg->sdhc_clk = gd->arch.sdhc_clk; return fsl_esdhc_initialize(bis, cfg); } -#endif +#endif /* !CONFIG_IS_ENABLED(DM_MMC) */ #ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT void mmc_adapter_card_type_ident(void) @@ -1635,7 +1635,7 @@ static const struct dm_mmc_ops fsl_esdhc_ops = { .execute_tuning = fsl_esdhc_execute_tuning, #endif }; -#endif +#endif /* CONFIG_IS_ENABLED(DM_MMC) */ static struct esdhc_soc_data usdhc_imx7d_data = { .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 07/10] arm: pxa: mmc: add driver model support
Add driver model (DM) support. Signed-off-by: Marcel Ziswiler --- drivers/mmc/pxa_mmc_gen.c | 160 - include/dm/platform_data/pxa_mmc_gen.h | 22 2 files changed, 154 insertions(+), 28 deletions(-) create mode 100644 include/dm/platform_data/pxa_mmc_gen.h diff --git a/drivers/mmc/pxa_mmc_gen.c b/drivers/mmc/pxa_mmc_gen.c index a4dcdb5cff..08a5ca36a1 100644 --- a/drivers/mmc/pxa_mmc_gen.c +++ b/drivers/mmc/pxa_mmc_gen.c @@ -2,6 +2,9 @@ /* * Copyright (C) 2010 Marek Vasut * + * Modified to add driver model (DM) support + * Copyright (C) 2019 Marcel Ziswiler + * * Loosely based on the old code and Linux's PXA MMC driver */ @@ -10,6 +13,8 @@ #include #include #include +#include +#include #include #include @@ -95,7 +100,7 @@ static int pxa_mmc_stop_clock(struct mmc *mmc) } static int pxa_mmc_start_cmd(struct mmc *mmc, struct mmc_cmd *cmd, - uint32_t cmdat) +uint32_t cmdat) { struct pxa_mmc_priv *priv = mmc->priv; struct pxa_mmc_regs *regs = priv->regs; @@ -142,7 +147,7 @@ static int pxa_mmc_cmd_done(struct mmc *mmc, struct mmc_cmd *cmd) { struct pxa_mmc_priv *priv = mmc->priv; struct pxa_mmc_regs *regs = priv->regs; - uint32_t a, b, c; + u32 a, b, c; int i; int stat; @@ -151,7 +156,7 @@ static int pxa_mmc_cmd_done(struct mmc *mmc, struct mmc_cmd *cmd) /* * Linux says: -* Did I mention this is Sick. We always need to +* Did I mention this is Sick. We always need to * discard the upper 8 bits of the first 16-bit word. */ a = readl(®s->res) & 0x; @@ -163,13 +168,13 @@ static int pxa_mmc_cmd_done(struct mmc *mmc, struct mmc_cmd *cmd) } /* The command response didn't arrive */ - if (stat & MMC_STAT_TIME_OUT_RESPONSE) + if (stat & MMC_STAT_TIME_OUT_RESPONSE) { return -ETIMEDOUT; - else if (stat & MMC_STAT_RES_CRC_ERROR - && cmd->resp_type & MMC_RSP_CRC) { -#ifdef PXAMMC_CRC_SKIP - if (cmd->resp_type & MMC_RSP_136 - && cmd->response[0] & (1 << 31)) + } else if (stat & MMC_STAT_RES_CRC_ERROR && + cmd->resp_type & MMC_RSP_CRC) { +#ifdef PXAMMC_CRC_SKIP + if (cmd->resp_type & MMC_RSP_136 && + cmd->response[0] & (1 << 31)) printf("Ignoring CRC, this may be dangerous!\n"); else #endif @@ -184,8 +189,8 @@ static int pxa_mmc_do_read_xfer(struct mmc *mmc, struct mmc_data *data) { struct pxa_mmc_priv *priv = mmc->priv; struct pxa_mmc_regs *regs = priv->regs; - uint32_t len; - uint32_t *buf = (uint32_t *)data->dest; + u32 len; + u32 *buf = (uint32_t *)data->dest; int size; int ret; @@ -201,7 +206,6 @@ static int pxa_mmc_do_read_xfer(struct mmc *mmc, struct mmc_data *data) /* Read data into the buffer */ while (size--) *buf++ = readl(®s->rxfifo); - } if (readl(®s->stat) & MMC_STAT_ERRORS) @@ -220,8 +224,8 @@ static int pxa_mmc_do_write_xfer(struct mmc *mmc, struct mmc_data *data) { struct pxa_mmc_priv *priv = mmc->priv; struct pxa_mmc_regs *regs = priv->regs; - uint32_t len; - uint32_t *buf = (uint32_t *)data->src; + u32 len; + u32 *buf = (uint32_t *)data->src; int size; int ret; @@ -258,12 +262,11 @@ static int pxa_mmc_do_write_xfer(struct mmc *mmc, struct mmc_data *data) return 0; } -static int pxa_mmc_request(struct mmc *mmc, struct mmc_cmd *cmd, - struct mmc_data *data) +static int pxa_mmc_send_cmd_common(struct pxa_mmc_priv *priv, struct mmc *mmc, + struct mmc_cmd *cmd, struct mmc_data *data) { - struct pxa_mmc_priv *priv = mmc->priv; struct pxa_mmc_regs *regs = priv->regs; - uint32_t cmdat = 0; + u32 cmdat = 0; int ret; /* Stop the controller */ @@ -312,12 +315,11 @@ static int pxa_mmc_request(struct mmc *mmc, struct mmc_cmd *cmd, return 0; } -static int pxa_mmc_set_ios(struct mmc *mmc) +static int pxa_mmc_set_ios_common(struct pxa_mmc_priv *priv, struct mmc *mmc) { - struct pxa_mmc_priv *priv = mmc->priv; struct pxa_mmc_regs *regs = priv->regs; - uint32_t tmp; - uint32_t pxa_mmc_clock; + u32 tmp; + u32 pxa_mmc_clock; if (!mmc->clock) { pxa_mmc_stop_clock(mmc); @@ -345,9 +347,8 @@ static int pxa_mmc_set_ios(struct mmc *mmc) return 0; } -static int pxa_mmc_init(struct mmc *mmc) +static int pxa_mmc_init_common(struct pxa_mmc_priv *priv, struct mmc *mmc) { - struct pxa_mmc_priv *priv = mmc->priv; str
[U-Boot] [PATCH v1 00/10] arm: pxa: mmc: add driver model support
This series, after some initial clean-up, ultimately adds support for the driver model (DM) in the PXA MMC driver. Marcel Ziswiler (10): mmc: add missing space before comment delimiter mmc: fsl_esdhc: annotate endifs serial: pxa: clean-up platform data include file Makefile: allow dm_mmc without of_control dm: core: gracefully handle alias seq without of kconfig: mmc: move pxa_mmc_generic to kconfig arm: pxa: mmc: add driver model support colibri_pxa270_defconfig: enable cmd_dm colibri_pxa270: add mmc platform data colibri_pxa270_defconfig: enable dm_mmc Makefile | 2 +- board/toradex/colibri_pxa270/colibri_pxa270.c | 20 ++- configs/colibri_pxa270_defconfig | 3 + configs/zipitz2_defconfig | 1 + drivers/core/read.c | 4 +- drivers/mmc/Kconfig | 8 + drivers/mmc/fsl_esdhc.c | 4 +- drivers/mmc/mmc.c | 2 +- drivers/mmc/pxa_mmc_gen.c | 160 +++--- include/configs/pxa-common.h | 7 - include/configs/zipitz2.h | 8 - include/dm/platform_data/pxa_mmc_gen.h| 22 +++ include/dm/platform_data/serial_pxa.h | 8 +- include/dm/read.h | 4 + scripts/config_whitelist.txt | 1 - 15 files changed, 196 insertions(+), 58 deletions(-) create mode 100644 include/dm/platform_data/pxa_mmc_gen.h -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 08/10] colibri_pxa270_defconfig: enable cmd_dm
Enable CONFIG_CMD_DM. Signed-off-by: Marcel Ziswiler --- configs/colibri_pxa270_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/colibri_pxa270_defconfig b/configs/colibri_pxa270_defconfig index a3c07d5887..c9d7e4e7ce 100644 --- a/configs/colibri_pxa270_defconfig +++ b/configs/colibri_pxa270_defconfig @@ -15,6 +15,7 @@ CONFIG_SYS_PROMPT="$ " # CONFIG_CMD_ELF is not set # CONFIG_CMD_EXPORTENV is not set # CONFIG_CMD_IMPORTENV is not set +CONFIG_CMD_DM=y # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set CONFIG_CMD_MMC=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 09/10] colibri_pxa270: add mmc platform data
Add MMC platform data. While at it also fix trivial checkpatch.pl issues. Signed-off-by: Marcel Ziswiler --- board/toradex/colibri_pxa270/colibri_pxa270.c | 20 ++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c index e9e17508a5..507bf579cf 100644 --- a/board/toradex/colibri_pxa270/colibri_pxa270.c +++ b/board/toradex/colibri_pxa270/colibri_pxa270.c @@ -3,7 +3,7 @@ * Toradex Colibri PXA270 Support * * Copyright (C) 2010 Marek Vasut - * Copyright (C) 2016 Marcel Ziswiler + * Copyright (C) 2016-2019 Marcel Ziswiler */ #include @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -32,7 +33,7 @@ int board_init(void) /* arch number of Toradex Colibri PXA270 */ gd->bd->bi_arch_number = MACH_TYPE_COLIBRI; - /* adress of boot parameters */ + /* address of boot parameters */ gd->bd->bi_boot_params = 0xa100; return 0; @@ -82,7 +83,7 @@ int board_usb_init(int index, enum usb_init_type init) writel(readl(UHCRHDA) | 0x100, UHCRHDA); /* Set port power control mask bits, only 3 ports. */ - writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB); + writel(readl(UHCRHDB) | (0x7 << 17), UHCRHDB); /* enable port 2 */ writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS | @@ -106,8 +107,6 @@ void usb_board_stop(void) udelay(10); writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN); - - return; } #endif @@ -119,11 +118,22 @@ int board_eth_init(bd_t *bis) #endif #ifdef CONFIG_CMD_MMC +#if !CONFIG_IS_ENABLED(DM_MMC) int board_mmc_init(bd_t *bis) { pxa_mmc_register(0); return 0; } +#else /* !CONFIG_IS_ENABLED(DM_MMC) */ +static const struct pxa_mmc_plat mmc_platdata = { + .base = (struct pxa_mmc_regs *)MMC0_BASE, +}; + +U_BOOT_DEVICE(pxa_mmcs) = { + .name = "pxa_mmc", + .platdata = &mmc_platdata, +}; +#endif /* !CONFIG_IS_ENABLED(DM_MMC) */ #endif static const struct pxa_serial_platdata serial_platdata = { -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 04/10] Makefile: allow dm_mmc without of_control
Allow for CONFIG_DM_MMC with platform data rather than CONFIG_OF_CONTROL. Signed-off-by: Marcel Ziswiler --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6eb08a5724..eb08aaea75 100644 --- a/Makefile +++ b/Makefile @@ -926,7 +926,7 @@ ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y) @echo >&2 "" endif ifeq ($(CONFIG_MMC),y) -ifneq ($(CONFIG_DM_MMC)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy) +ifneq ($(CONFIG_DM_MMC)$(CONFIG_BLK),yy) @echo >&2 "= WARNING ==" @echo >&2 "This board does not use CONFIG_DM_MMC. Please update" @echo >&2 "the board to use CONFIG_DM_MMC before the v2019.04 release." -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 06/10] kconfig: mmc: move pxa_mmc_generic to kconfig
Move CONFIG_PXA_MMC_GENERIC to Kconfig. Signed-off-by: Marcel Ziswiler --- configs/colibri_pxa270_defconfig | 1 + configs/zipitz2_defconfig| 1 + drivers/mmc/Kconfig | 8 include/configs/pxa-common.h | 7 --- include/configs/zipitz2.h| 8 scripts/config_whitelist.txt | 1 - 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/configs/colibri_pxa270_defconfig b/configs/colibri_pxa270_defconfig index 492ee9eaaf..a3c07d5887 100644 --- a/configs/colibri_pxa270_defconfig +++ b/configs/colibri_pxa270_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_FAT=y CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DM=y +CONFIG_PXA_MMC_GENERIC=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y diff --git a/configs/zipitz2_defconfig b/configs/zipitz2_defconfig index 509adcffd9..9590d16593 100644 --- a/configs/zipitz2_defconfig +++ b/configs/zipitz2_defconfig @@ -11,6 +11,7 @@ CONFIG_HUSH_PARSER=y # CONFIG_AUTO_COMPLETE is not set CONFIG_SYS_PROMPT="$ " CONFIG_CMD_MMC=y +CONFIG_PXA_MMC_GENERIC=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index c23299ea96..d89140e520 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -274,6 +274,14 @@ config MMC_PCI If unsure, say N. +config PXA_MMC_GENERIC + bool "Support for MMC controllers on PXA" + help + This selects MMC controllers on PXA. + If you are on a PXA architecture, say Y here. + + If unsure, say N. + config MMC_OMAP_HS bool "TI OMAP High Speed Multimedia Card Interface support" select DM_REGULATOR_PBIAS if DM_MMC && DM_REGULATOR diff --git a/include/configs/pxa-common.h b/include/configs/pxa-common.h index e25800a095..ba315b3fb8 100644 --- a/include/configs/pxa-common.h +++ b/include/configs/pxa-common.h @@ -17,13 +17,6 @@ #defineCONFIG_KGDB_BAUDRATE230400 #endif -/* - * MMC Card Configuration - */ -#ifdef CONFIG_CMD_MMC -#defineCONFIG_PXA_MMC_GENERIC -#endif - /* * OHCI USB */ diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h index 24fea68a11..cf8f6ff671 100644 --- a/include/configs/zipitz2.h +++ b/include/configs/zipitz2.h @@ -47,14 +47,6 @@ * Bootloader Components Configuration */ -/* - * MMC Card Configuration - */ -#ifdef CONFIG_CMD_MMC -#defineCONFIG_PXA_MMC_GENERIC -#defineCONFIG_SYS_MMC_BASE 0xF000 -#endif - /* * SPI and LCD */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index b16bc6ae34..511287ada0 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1533,7 +1533,6 @@ CONFIG_PSRAM_SCFG CONFIG_PWM CONFIG_PWM_IMX CONFIG_PXA_LCD -CONFIG_PXA_MMC_GENERIC CONFIG_PXA_PWR_I2C CONFIG_PXA_STD_I2C CONFIG_PXA_VGA -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 10/10] colibri_pxa270_defconfig: enable dm_mmc
Enable CONFIG_DM_MMC. Signed-off-by: Marcel Ziswiler --- configs/colibri_pxa270_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/colibri_pxa270_defconfig b/configs/colibri_pxa270_defconfig index c9d7e4e7ce..609855fe7d 100644 --- a/configs/colibri_pxa270_defconfig +++ b/configs/colibri_pxa270_defconfig @@ -28,6 +28,7 @@ CONFIG_CMD_FAT=y CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DM=y +CONFIG_DM_MMC=y CONFIG_PXA_MMC_GENERIC=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 03/10] serial: pxa: clean-up platform data include file
On 5/20/19 2:44 AM, Marcel Ziswiler wrote: > Clean-up platform data include file by using BIT macro and converting > indentation with spaces to tabs. > > Signed-off-by: Marcel Ziswiler > > --- > > include/dm/platform_data/serial_pxa.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/dm/platform_data/serial_pxa.h > b/include/dm/platform_data/serial_pxa.h > index 408c00885d..b78bdb6409 100644 > --- a/include/dm/platform_data/serial_pxa.h > +++ b/include/dm/platform_data/serial_pxa.h > @@ -17,7 +17,7 @@ > #define FFUART_INDEX 1 > #define STUART_INDEX 2 > #elif CONFIG_CPU_PXA25X > -#define UART_CLK_BASE(1 << 4)/* HWUART */ > +#define UART_CLK_BASEBIT(4) /* HWUART */ > #define UART_CLK_REG CKEN > #define HWUART_INDEX 0 > #define STUART_INDEX 1 > @@ -42,9 +42,9 @@ > /* > * struct pxa_serial_platdata - information about a PXA port > * > - * @base: Uart port base register address > - * @port: Uart port index, for cpu with pinmux for uart / gpio > - * baudrtatre: Uart port baudrate > + * @base:Uart port base register address > + * @port:Uart port index, for cpu with pinmux for uart / gpio > + * baudrtatre: Uart port baudrate So while we're messing around with this, can we also s/[uU]art/UART/ and s/cpu/CPU/ and s/gpio/GPIO/ ? > */ > struct pxa_serial_platdata { > struct pxa_uart_regs *base; > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 08/10] colibri_pxa270_defconfig: enable cmd_dm
On 5/20/19 2:45 AM, Marcel Ziswiler wrote: > Enable CONFIG_CMD_DM. > > Signed-off-by: Marcel Ziswiler > > --- > > configs/colibri_pxa270_defconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/configs/colibri_pxa270_defconfig > b/configs/colibri_pxa270_defconfig > index a3c07d5887..c9d7e4e7ce 100644 > --- a/configs/colibri_pxa270_defconfig > +++ b/configs/colibri_pxa270_defconfig > @@ -15,6 +15,7 @@ CONFIG_SYS_PROMPT="$ " > # CONFIG_CMD_ELF is not set > # CONFIG_CMD_EXPORTENV is not set > # CONFIG_CMD_IMPORTENV is not set > +CONFIG_CMD_DM=y > # CONFIG_CMD_LOADB is not set > # CONFIG_CMD_LOADS is not set > CONFIG_CMD_MMC=y > Can you just imply it somewhere in arch/arm/ instead ? -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 07/10] arm: pxa: mmc: add driver model support
On 5/20/19 2:44 AM, Marcel Ziswiler wrote: > Add driver model (DM) support. > > Signed-off-by: Marcel Ziswiler > > --- > > drivers/mmc/pxa_mmc_gen.c | 160 - > include/dm/platform_data/pxa_mmc_gen.h | 22 > 2 files changed, 154 insertions(+), 28 deletions(-) > create mode 100644 include/dm/platform_data/pxa_mmc_gen.h > > diff --git a/drivers/mmc/pxa_mmc_gen.c b/drivers/mmc/pxa_mmc_gen.c > index a4dcdb5cff..08a5ca36a1 100644 > --- a/drivers/mmc/pxa_mmc_gen.c > +++ b/drivers/mmc/pxa_mmc_gen.c > @@ -2,6 +2,9 @@ > /* > * Copyright (C) 2010 Marek Vasut > * > + * Modified to add driver model (DM) support > + * Copyright (C) 2019 Marcel Ziswiler > + * > * Loosely based on the old code and Linux's PXA MMC driver > */ > > @@ -10,6 +13,8 @@ > #include > #include > #include > +#include > +#include > #include > #include > > @@ -95,7 +100,7 @@ static int pxa_mmc_stop_clock(struct mmc *mmc) > } > > static int pxa_mmc_start_cmd(struct mmc *mmc, struct mmc_cmd *cmd, > - uint32_t cmdat) > + uint32_t cmdat) u32 just like you do in the next hunk ? I think you might want to split the cleanup from DM conversion. > { > struct pxa_mmc_priv *priv = mmc->priv; > struct pxa_mmc_regs *regs = priv->regs; > @@ -142,7 +147,7 @@ static int pxa_mmc_cmd_done(struct mmc *mmc, struct > mmc_cmd *cmd) > { > struct pxa_mmc_priv *priv = mmc->priv; > struct pxa_mmc_regs *regs = priv->regs; > - uint32_t a, b, c; > + u32 a, b, c; > int i; > int stat; > > @@ -151,7 +156,7 @@ static int pxa_mmc_cmd_done(struct mmc *mmc, struct > mmc_cmd *cmd) > > /* >* Linux says: > - * Did I mention this is Sick. We always need to > + * Did I mention this is Sick. We always need to >* discard the upper 8 bits of the first 16-bit word. >*/ > a = readl(®s->res) & 0x; > @@ -163,13 +168,13 @@ static int pxa_mmc_cmd_done(struct mmc *mmc, struct > mmc_cmd *cmd) > } > > /* The command response didn't arrive */ > - if (stat & MMC_STAT_TIME_OUT_RESPONSE) > + if (stat & MMC_STAT_TIME_OUT_RESPONSE) { > return -ETIMEDOUT; > - else if (stat & MMC_STAT_RES_CRC_ERROR > - && cmd->resp_type & MMC_RSP_CRC) { > -#ifdef PXAMMC_CRC_SKIP > - if (cmd->resp_type & MMC_RSP_136 > - && cmd->response[0] & (1 << 31)) > + } else if (stat & MMC_STAT_RES_CRC_ERROR && > +cmd->resp_type & MMC_RSP_CRC) { > +#ifdef PXAMMC_CRC_SKIP > + if (cmd->resp_type & MMC_RSP_136 && > + cmd->response[0] & (1 << 31)) BIT(31) [...] > +#if !CONFIG_IS_ENABLED(DM_MMC) > +static int pxa_mmc_init(struct mmc *mmc) > +{ > + struct pxa_mmc_priv *priv = mmc->priv; > + > + return pxa_mmc_init_common(priv, mmc); > +} > + > +static int pxa_mmc_request(struct mmc *mmc, struct mmc_cmd *cmd, > +struct mmc_data *data) > +{ > + struct pxa_mmc_priv *priv = mmc->priv; > + > + return pxa_mmc_send_cmd_common(priv, mmc, cmd, data); > +} > + > +static int pxa_mmc_set_ios(struct mmc *mmc) > +{ > + struct pxa_mmc_priv *priv = mmc->priv; > + > + return pxa_mmc_set_ios_common(priv, mmc); > +} > + > static const struct mmc_ops pxa_mmc_ops = { > .send_cmd = pxa_mmc_request, > .set_ios= pxa_mmc_set_ios, > @@ -385,7 +410,7 @@ int pxa_mmc_register(int card_index) > { > struct mmc *mmc; > struct pxa_mmc_priv *priv; > - uint32_t reg; > + u32 reg; > int ret = -ENOMEM; > > priv = malloc(sizeof(struct pxa_mmc_priv)); > @@ -404,7 +429,7 @@ int pxa_mmc_register(int card_index) > default: > ret = -EINVAL; > printf("PXA MMC: Invalid MMC controller ID (card_index = %d)\n", > - card_index); > +card_index); > goto err1; > } > > @@ -419,7 +444,7 @@ int pxa_mmc_register(int card_index) > #endif > > mmc = mmc_create(&pxa_mmc_cfg, priv); > - if (mmc == NULL) > + if (!mmc) > goto err1; > > return 0; > @@ -429,3 +454,82 @@ err1: > err0: > return ret; > } > +#else /* !CONFIG_IS_ENABLED(DM_MMC) */ > +static int pxa_mmc_probe(struct udevice *dev) > +{ > + struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); > + struct pxa_mmc_plat *plat = dev_get_platdata(dev); > + struct mmc_config *cfg = &plat->cfg; > + struct mmc *mmc = &plat->mmc; > + struct pxa_mmc_priv *priv = dev_get_priv(dev); > + u32 reg; > + > + upriv->mmc = mmc; > + > + cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT; > + cfg->f_max = PXAMMC_MAX_SPEED; > + cfg->f_min = PXAMMC_MIN_SPEED; > + cfg->host_caps = PXAMMC_HOST_CAPS; > + cfg->name = dev->name; > + cfg->voltages = MMC_VDD_32_33 | MMC_VDD
Re: [U-Boot] [PATCH v1 09/10] colibri_pxa270: add mmc platform data
On 5/20/19 2:45 AM, Marcel Ziswiler wrote: > Add MMC platform data. > > While at it also fix trivial checkpatch.pl issues. > > Signed-off-by: Marcel Ziswiler > > --- > > board/toradex/colibri_pxa270/colibri_pxa270.c | 20 ++- > 1 file changed, 15 insertions(+), 5 deletions(-) > > diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c > b/board/toradex/colibri_pxa270/colibri_pxa270.c > index e9e17508a5..507bf579cf 100644 > --- a/board/toradex/colibri_pxa270/colibri_pxa270.c > +++ b/board/toradex/colibri_pxa270/colibri_pxa270.c > @@ -3,7 +3,7 @@ > * Toradex Colibri PXA270 Support > * > * Copyright (C) 2010 Marek Vasut > - * Copyright (C) 2016 Marcel Ziswiler > + * Copyright (C) 2016-2019 Marcel Ziswiler > */ > > #include > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -32,7 +33,7 @@ int board_init(void) > /* arch number of Toradex Colibri PXA270 */ > gd->bd->bi_arch_number = MACH_TYPE_COLIBRI; > > - /* adress of boot parameters */ > + /* address of boot parameters */ > gd->bd->bi_boot_params = 0xa100; > > return 0; > @@ -82,7 +83,7 @@ int board_usb_init(int index, enum usb_init_type init) > writel(readl(UHCRHDA) | 0x100, UHCRHDA); > > /* Set port power control mask bits, only 3 ports. */ > - writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB); > + writel(readl(UHCRHDB) | (0x7 << 17), UHCRHDB); setbits_le32(UHCRHDB, GEN_MASK(17, 19)); I think ? > /* enable port 2 */ > writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS | > @@ -106,8 +107,6 @@ void usb_board_stop(void) > udelay(10); > > writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN); > - > - return; > } > #endif > > @@ -119,11 +118,22 @@ int board_eth_init(bd_t *bis) > #endif > > #ifdef CONFIG_CMD_MMC > +#if !CONFIG_IS_ENABLED(DM_MMC) > int board_mmc_init(bd_t *bis) > { > pxa_mmc_register(0); > return 0; > } > +#else /* !CONFIG_IS_ENABLED(DM_MMC) */ > +static const struct pxa_mmc_plat mmc_platdata = { > + .base = (struct pxa_mmc_regs *)MMC0_BASE, > +}; > + > +U_BOOT_DEVICE(pxa_mmcs) = { > + .name = "pxa_mmc", > + .platdata = &mmc_platdata, > +}; > +#endif /* !CONFIG_IS_ENABLED(DM_MMC) */ > #endif > > static const struct pxa_serial_platdata serial_platdata = { > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 4/6] spl: mmc: support loading i.MX container format file
Hi Simon, > Subject: Re: [PATCH 4/6] spl: mmc: support loading i.MX container format file > > Hi Peng, > > On Tue, 7 May 2019 at 06:52, Peng Fan wrote: > > > > i.MX8 only support AHAB secure boot with Container format image, we > > could not use FIT to support secure boot, so introduce container > > Why not FIT? Actually before we implement secure boot, we use FIT image, however i.MX8 only support i.MX container format image for secure boot, The chip will verify the container image when secure boot. It could not recognize FIT image. So we have to drop FIT image. > > > support to let SPL could load container images. > > What is a container image? Can you please point to documentation? Sadly, there is no public reference manual. There is a doc that has a bit of information. https://community.nxp.com/docs/DOC-343178 Thanks, Peng. > > > > > Cc: Simon Goldschmidt > > Cc: Tien Fong Chee > > Cc: York Sun > > Cc: Marek Vasut > > Cc: Alex Kiernan > > Cc: Simon Glass > > Cc: Philipp Tomsich > > Cc: Kever Yang > > Cc: Heiko Schocher > > Signed-off-by: Peng Fan > > --- > > common/spl/spl_mmc.c | 10 ++ > > include/spl.h| 12 > > 2 files changed, 22 insertions(+) > > Regards, > Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/6] sh: espt_giga: Remove the board
Last change to this board was done in 2016, has no prospects of ever being converted to DM, drop it. Signed-off-by: Marek Vasut Cc: Chris Brandt Cc: Nobuhiro Iwamatsu Cc: Vladimir Zapolskiy Cc: Yoshihiro Shimoda --- arch/sh/Kconfig| 5 - board/espt/Kconfig | 9 -- board/espt/MAINTAINERS | 6 - board/espt/Makefile| 9 -- board/espt/espt.c | 26 --- board/espt/lowlevel_init.S | 317 - configs/espt_defconfig | 34 include/configs/espt.h | 78 - 8 files changed, 484 deletions(-) delete mode 100644 board/espt/Kconfig delete mode 100644 board/espt/MAINTAINERS delete mode 100644 board/espt/Makefile delete mode 100644 board/espt/espt.c delete mode 100644 board/espt/lowlevel_init.S delete mode 100644 configs/espt_defconfig delete mode 100644 include/configs/espt.h diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 0ce74cf24a..26d64b973b 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -21,10 +21,6 @@ choice prompt "Target select" optional -config TARGET_ESPT - bool "Data Technology ESPT-GIGA board" - select CPU_SH4 - config TARGET_MS7722SE bool "SolutionEngine 7722" select CPU_SH4 @@ -84,7 +80,6 @@ config SYS_CPU source "arch/sh/lib/Kconfig" source "board/alphaproject/ap_sh4a_4a/Kconfig" -source "board/espt/Kconfig" source "board/ms7722se/Kconfig" source "board/ms7750se/Kconfig" source "board/renesas/MigoR/Kconfig" diff --git a/board/espt/Kconfig b/board/espt/Kconfig deleted file mode 100644 index 0294926cf5..00 --- a/board/espt/Kconfig +++ /dev/null @@ -1,9 +0,0 @@ -if TARGET_ESPT - -config SYS_BOARD - default "espt" - -config SYS_CONFIG_NAME - default "espt" - -endif diff --git a/board/espt/MAINTAINERS b/board/espt/MAINTAINERS deleted file mode 100644 index fdbbc3eb45..00 --- a/board/espt/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -ESPT BOARD -#M:- -S: Maintained -F: board/espt/ -F: include/configs/espt.h -F: configs/espt_defconfig diff --git a/board/espt/Makefile b/board/espt/Makefile deleted file mode 100644 index 8f333a5d3c..00 --- a/board/espt/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2009 Renesas Solutions Corp. -# Copyright (C) 2009 Nobuhiro Iwamatsu -# -# board/espt/Makefile - -obj-y := espt.o -extra-y+= lowlevel_init.o diff --git a/board/espt/espt.c b/board/espt/espt.c deleted file mode 100644 index 8cdaf6300c..00 --- a/board/espt/espt.c +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2009 Renesas Solutions Corp. - * Copyright (C) 2009 Nobuhiro Iwamatsu - * - * board/espt/espt.c - */ - -#include -#include -#include - -int checkboard(void) -{ - puts("BOARD: ESPT-GIGA\n"); - return 0; -} - -int board_init(void) -{ - return 0; -} - -void led_set_state(unsigned short value) -{ -} diff --git a/board/espt/lowlevel_init.S b/board/espt/lowlevel_init.S deleted file mode 100644 index 0a44487fb2..00 --- a/board/espt/lowlevel_init.S +++ /dev/null @@ -1,317 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2009 Renesas Solutions Corp. - * Copyright (C) 2009 Nobuhiro Iwamatsu - * - * board/espt/lowlevel_init.S - */ - -#include -#include -#include - - .global lowlevel_init - - .text - .align 2 - -lowlevel_init: - - write32 WDTCSR_A, WDTCSR_D - - write32 WDTST_A, WDTST_D - - write32 WDTBST_A, WDTBST_D - - write32 CCR_A, CCR_CACHE_ICI_D - - write32 MMUCR_A, MMU_CONTROL_TI_D - - write32 MSTPCR0_A, MSTPCR0_D - - write32 MSTPCR1_A, MSTPCR1_D - - write32 RAMCR_A, RAMCR_D - - /* -* Setting infomation from -* original ESPT-GIGA bootloader register -*/ - write32 MMSEL_A, MMSEL_D - - /* dummy */ - mov.l @r1, r2 - mov.l @r1, r2 - synco - -write32 BCR_A, BCR_D - -write32 CS0BCR_A, CS0BCR_D - -write32 CS0WCR_A, CS0WCR_D - - /* -* DDR-SDRAM setting -*/ - - /* set DDR-SDRAM dummy read */ - write32 MMSEL_A, MMSEL_D - - write32 MMSEL_A, CS0_A - - /* set DDR-SDRAM bus/endian etc */ - write32 MIM_U_A, MIM_U_D - - write32 MIM_L_A, MIM_L_D0 - - write32 SDR_L_A, SDR_L_A_D0 - - write32 STR_L_A, STR_L_A_D0 - - /* DDR-SDRAM access control */ - write32 MIM_L_A, MIM_L_D1 - - write32 SCR_L_A, SCR_L_A_D0 - - write32 SCR_L_A, SCR_L_A_D1 - - write32 EMRS_A, EMRS_D - - write32 MRS1_A, MRS1_D - - write32 MIM_U_A, MIM_U_D - - write32 MIM_L_A, MIM_L_A_D2 - - write32 SCR_L_A, SCR_L_A_D2 - - write32 SCR_L_A, SCR_L_A_D2 - - write32 MRS2_A, MRS2_D - - /* wait 200us */ - wait_timer REPEAT_R3 - - /* GPIO setting */ - write16 PSEL0_A, PSEL0_D - - write16 P
[U-Boot] [PATCH 2/6] sh: ms7722: Remove the board
Last change to this board was done in 2016, has no prospects of ever being converted to DM, drop it. Signed-off-by: Marek Vasut Cc: Chris Brandt Cc: Nobuhiro Iwamatsu Cc: Vladimir Zapolskiy Cc: Yoshihiro Shimoda --- arch/sh/Kconfig| 5 - board/ms7722se/Kconfig | 9 -- board/ms7722se/MAINTAINERS | 7 -- board/ms7722se/Makefile| 13 -- board/ms7722se/lowlevel_init.S | 224 - board/ms7722se/ms7722se.c | 47 --- configs/ms7722se_defconfig | 33 - include/configs/ms7722se.h | 83 8 files changed, 421 deletions(-) delete mode 100644 board/ms7722se/Kconfig delete mode 100644 board/ms7722se/MAINTAINERS delete mode 100644 board/ms7722se/Makefile delete mode 100644 board/ms7722se/lowlevel_init.S delete mode 100644 board/ms7722se/ms7722se.c delete mode 100644 configs/ms7722se_defconfig delete mode 100644 include/configs/ms7722se.h diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 26d64b973b..5e83416ba3 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -21,10 +21,6 @@ choice prompt "Target select" optional -config TARGET_MS7722SE - bool "SolutionEngine 7722" - select CPU_SH4 - config TARGET_MS7750SE bool "SolutionEngine 7750" select CPU_SH4 @@ -80,7 +76,6 @@ config SYS_CPU source "arch/sh/lib/Kconfig" source "board/alphaproject/ap_sh4a_4a/Kconfig" -source "board/ms7722se/Kconfig" source "board/ms7750se/Kconfig" source "board/renesas/MigoR/Kconfig" source "board/renesas/ap325rxa/Kconfig" diff --git a/board/ms7722se/Kconfig b/board/ms7722se/Kconfig deleted file mode 100644 index 39027c9864..00 --- a/board/ms7722se/Kconfig +++ /dev/null @@ -1,9 +0,0 @@ -if TARGET_MS7722SE - -config SYS_BOARD - default "ms7722se" - -config SYS_CONFIG_NAME - default "ms7722se" - -endif diff --git a/board/ms7722se/MAINTAINERS b/board/ms7722se/MAINTAINERS deleted file mode 100644 index 61614baece..00 --- a/board/ms7722se/MAINTAINERS +++ /dev/null @@ -1,7 +0,0 @@ -MS7722SE BOARD -M: Nobuhiro Iwamatsu -M: Nobuhiro Iwamatsu -S: Maintained -F: board/ms7722se/ -F: include/configs/ms7722se.h -F: configs/ms7722se_defconfig diff --git a/board/ms7722se/Makefile b/board/ms7722se/Makefile deleted file mode 100644 index 4c0b87a805..00 --- a/board/ms7722se/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2007 -# Nobuhiro Iwamatsu -# -# Copyright (C) 2007 -# Kenati Technologies, Inc. -# -# board/ms7722se/Makefile -# - -obj-y := ms7722se.o -extra-y+= lowlevel_init.o diff --git a/board/ms7722se/lowlevel_init.S b/board/ms7722se/lowlevel_init.S deleted file mode 100644 index d4484ef1f0..00 --- a/board/ms7722se/lowlevel_init.S +++ /dev/null @@ -1,224 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2007 - * Nobuhiro Iwamatsu - * - * Copyright (C) 2007 - * Kenati Technologies, Inc. - * - * board/ms7722se/lowlevel_init.S - */ - -#include - -#include -#include - -/* - * Board specific low level init code, called _very_ early in the - * startup sequence. Relocation to SDRAM has not happened yet, no - * stack is available, bss section has not been initialised, etc. - * - * (Note: As no stack is available, no subroutines can be called...). - */ - - .global lowlevel_init - - .text - .align 2 - -lowlevel_init: - - /* -* Cache Control Register -* Instruction Cache Invalidate -*/ - write32 CCR_A, CCR_D - - /* -* Address of MMU Control Register -* TI == TLB Invalidate bit -*/ - write32 MMUCR_A, MMUCR_D - - /* Address of Power Control Register 0 */ - write32 MSTPCR0_A, MSTPCR0_D - - /* Address of Power Control Register 2 */ - write32 MSTPCR2_A, MSTPCR2_D - - write16 SBSCR_A, SBSCR_D - - write16 PSCR_A, PSCR_D - - /* 0xA4520004 (Watchdog Control / Status Register) */ -! write16 RWTCSR_A, RWTCSR_D_1/* 0xA507 -> timer_STOP/WDT_CLK=max */ - - /* 0xA452 (Watchdog Count Register) */ - write16 RWTCNT_A, RWTCNT_D /*0x5A00 -> Clear */ - - /* 0xA4520004 (Watchdog Control / Status Register) */ - write16 RWTCSR_A, RWTCSR_D_2/* 0xA504 -> timer_STOP/CLK=500ms */ - - /* 0xA415 Frequency control register */ - write32 FRQCR_A, FRQCR_D - - write32 CCR_A, CCR_D_2 - -bsc_init: - - write16 PSELA_A, PSELA_D - - write16 DRVCR_A, DRVCR_D - - write16 PCCR_A, PCCR_D - - write16 PECR_A, PECR_D - - write16 PJCR_A, PJCR_D - - write16 PXCR_A, PXCR_D - - write32 CMNCR_A, CMNCR_D - - write32 CS0BCR_A, CS0BCR_D - - write32 CS2BCR_A, CS2BCR_D - - write32 CS4BCR_A, CS4BCR_D - - write32 CS5ABCR_A, CS5ABCR_D - - write32 CS5BBCR_A, CS5BBCR_D - - write32 CS6ABCR_A, CS6ABCR_D - - write32 CS0WCR_A
[U-Boot] [PATCH 3/6] sh: ms7750se: Remove the board
Last change to this board was done in 2016, has no prospects of ever being converted to DM, drop it. Signed-off-by: Marek Vasut Cc: Chris Brandt Cc: Nobuhiro Iwamatsu Cc: Vladimir Zapolskiy Cc: Yoshihiro Shimoda --- arch/sh/Kconfig| 5 -- board/ms7750se/Kconfig | 9 --- board/ms7750se/MAINTAINERS | 7 -- board/ms7750se/Makefile| 7 -- board/ms7750se/lowlevel_init.S | 141 - board/ms7750se/ms7750se.c | 24 -- configs/ms7750se_defconfig | 32 include/configs/ms7750se.h | 65 --- 8 files changed, 290 deletions(-) delete mode 100644 board/ms7750se/Kconfig delete mode 100644 board/ms7750se/MAINTAINERS delete mode 100644 board/ms7750se/Makefile delete mode 100644 board/ms7750se/lowlevel_init.S delete mode 100644 board/ms7750se/ms7750se.c delete mode 100644 configs/ms7750se_defconfig delete mode 100644 include/configs/ms7750se.h diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 5e83416ba3..8c9f7aed1a 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -21,10 +21,6 @@ choice prompt "Target select" optional -config TARGET_MS7750SE - bool "SolutionEngine 7750" - select CPU_SH4 - config TARGET_AP_SH4A_4A bool "ALPHAPROJECT AP-SH4A-4A" select CPU_SH4A @@ -76,7 +72,6 @@ config SYS_CPU source "arch/sh/lib/Kconfig" source "board/alphaproject/ap_sh4a_4a/Kconfig" -source "board/ms7750se/Kconfig" source "board/renesas/MigoR/Kconfig" source "board/renesas/ap325rxa/Kconfig" source "board/renesas/r0p7734/Kconfig" diff --git a/board/ms7750se/Kconfig b/board/ms7750se/Kconfig deleted file mode 100644 index 2c0b88c775..00 --- a/board/ms7750se/Kconfig +++ /dev/null @@ -1,9 +0,0 @@ -if TARGET_MS7750SE - -config SYS_BOARD - default "ms7750se" - -config SYS_CONFIG_NAME - default "ms7750se" - -endif diff --git a/board/ms7750se/MAINTAINERS b/board/ms7750se/MAINTAINERS deleted file mode 100644 index e23a53247c..00 --- a/board/ms7750se/MAINTAINERS +++ /dev/null @@ -1,7 +0,0 @@ -MS7750SE BOARD -M: Nobuhiro Iwamatsu -M: Nobuhiro Iwamatsu -S: Maintained -F: board/ms7750se/ -F: include/configs/ms7750se.h -F: configs/ms7750se_defconfig diff --git a/board/ms7750se/Makefile b/board/ms7750se/Makefile deleted file mode 100644 index a077810600..00 --- a/board/ms7750se/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2007 -# Nobuhiro Iwamatsu - -obj-y := ms7750se.o -extra-y+= lowlevel_init.o diff --git a/board/ms7750se/lowlevel_init.S b/board/ms7750se/lowlevel_init.S deleted file mode 100644 index 9cd2705e5d..00 --- a/board/ms7750se/lowlevel_init.S +++ /dev/null @@ -1,141 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - modified from SH-IPL+g - Renesaso SuperH / Solution Enginge MS775xSE01 BSC setting. - - Support CPU : SH7750/SH7750S/SH7750R/SH7751/SH7751R - - Coyright (c) 2007 Nobuhiro Iwamatsu -*/ - -#include - -#include -#include - -#ifdef CONFIG_CPU_SH7751 -#define BCR2_D_VALUE 0x2FFC /* Area 1-6 width: 32/32/32/32/32/16 */ -#define WCR1_D_VALUE 0x02770771 /* DMA:0 A6:2 A3:0 A0:1 Others:15 */ -#ifdef CONFIG_MARUBUN_PCCARD -#define WCR2_D_VALUE 0xFFFE4FE7 /* A6:15 A6B:7 A5:15 A5B:7 A4:15 - A3:2 A2:15 A1:15 A0:6 A0B:7 */ -#else /* CONFIG_MARUBUN_PCCARD */ -#define WCR2_D_VALUE 0x7FFE4FE7 /* A6:3 A6B:7 A5:15 A5B:7 A4:15 - A3:2 A2:15 A1:15 A0:6 A0B:7 */ -#endif /* CONFIG_MARUBUN_PCCARD */ -#define WCR3_D_VALUE 0x0171 /* A6: 0-1 A5: 1-3 A4: 1-3 A3: 1-3 - A2: 1-3 A1: 1-3 A0: 0-1 */ -#define RTCOR_D_VALUE 0xA50D /* Write code A5, data 0D (~15us?) */ -#define SDMR3_ADDRESS 0xFF940088 /* SDMR3 address on 32-bit bus */ -#define MCR_D1_VALUE 0x100901B4 /* SDRAM 32-bit, CAS/RAS Refresh, .. */ -#define MCR_D2_VALUE 0x500901B4 /* Same w/MRSET now 1 (mode reg cmd) */ -#else /* CONFIG_CPU_SH7751 */ -#define BCR2_D_VALUE 0x2E3C /* Area 1-6 width: 32/32/64/16/32/16 */ -#define WCR1_D_VALUE 0x02720777 /* DMA:0 A6:2 A4:2 A3:0 Others:15 */ -#define WCR2_D_VALUE 0xFFFE4FFF /* A6:15 A6B:7 A5:15 A5B:7 A4:15 - A3:2 A2:15 A1:15 A0:15 A0B:7 */ -#define WCR3_D_VALUE 0x01717771 /* A6: 0-1 A5: 1-3 A4: 0-1 A3: 1-3 - A2: 1-3 A1: 1-3 A0: 0-1 */ -#define RTCOR_D_VALUE 0xA510 /* Write code A5, data 10 (~15us?) */ -#define SDMR3_ADDRESS 0xFF940110 /* SDMR3 address on 64-bit bus */ -#define MCR_D1_VALUE 0x8801001C /* SDRAM 64-bit, CAS/RAS Refresh, .. */ -#define MCR_D2_VALUE 0xC801001C /* Same w/MRSET now 1 (mode reg cmd) */ -#endif /* CONFIG_CPU_SH7751 */ - - .global lowlevel_init - .text - .align
[U-Boot] [PATCH 5/6] sh: ap325rxa: Remove the board
Last change to this board was done in 2016, has no prospects of ever being converted to DM, drop it. Signed-off-by: Marek Vasut Cc: Chris Brandt Cc: Nobuhiro Iwamatsu Cc: Vladimir Zapolskiy Cc: Yoshihiro Shimoda --- arch/sh/Kconfig| 5 - board/renesas/ap325rxa/Kconfig | 12 -- board/renesas/ap325rxa/MAINTAINERS | 7 - board/renesas/ap325rxa/Makefile| 10 -- board/renesas/ap325rxa/ap325rxa.c | 148 -- board/renesas/ap325rxa/cpld-ap325rxa.c | 204 - board/renesas/ap325rxa/lowlevel_init.S | 170 - configs/ap325rxa_defconfig | 37 - include/configs/ap325rxa.h | 114 -- 9 files changed, 707 deletions(-) delete mode 100644 board/renesas/ap325rxa/Kconfig delete mode 100644 board/renesas/ap325rxa/MAINTAINERS delete mode 100644 board/renesas/ap325rxa/Makefile delete mode 100644 board/renesas/ap325rxa/ap325rxa.c delete mode 100644 board/renesas/ap325rxa/cpld-ap325rxa.c delete mode 100644 board/renesas/ap325rxa/lowlevel_init.S delete mode 100644 configs/ap325rxa_defconfig delete mode 100644 include/configs/ap325rxa.h diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 036f54a4df..da4bfd2cc3 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -21,10 +21,6 @@ choice prompt "Target select" optional -config TARGET_AP325RXA - bool "Renesas AP-325RXA" - select CPU_SH4 - config TARGET_MIGOR bool "Migo-R" select CPU_SH4 @@ -68,7 +64,6 @@ config SYS_CPU source "arch/sh/lib/Kconfig" source "board/renesas/MigoR/Kconfig" -source "board/renesas/ap325rxa/Kconfig" source "board/renesas/r0p7734/Kconfig" source "board/renesas/r2dplus/Kconfig" source "board/renesas/r7780mp/Kconfig" diff --git a/board/renesas/ap325rxa/Kconfig b/board/renesas/ap325rxa/Kconfig deleted file mode 100644 index c8f2de2959..00 --- a/board/renesas/ap325rxa/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_AP325RXA - -config SYS_BOARD - default "ap325rxa" - -config SYS_VENDOR - default "renesas" - -config SYS_CONFIG_NAME - default "ap325rxa" - -endif diff --git a/board/renesas/ap325rxa/MAINTAINERS b/board/renesas/ap325rxa/MAINTAINERS deleted file mode 100644 index bdc49c5ec9..00 --- a/board/renesas/ap325rxa/MAINTAINERS +++ /dev/null @@ -1,7 +0,0 @@ -AP325RXA BOARD -M: Nobuhiro Iwamatsu -M: Nobuhiro Iwamatsu -S: Maintained -F: board/renesas/ap325rxa/ -F: include/configs/ap325rxa.h -F: configs/ap325rxa_defconfig diff --git a/board/renesas/ap325rxa/Makefile b/board/renesas/ap325rxa/Makefile deleted file mode 100644 index 6551b940d3..00 --- a/board/renesas/ap325rxa/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# Copyright (C) 2008 Renesas Solutions Corp. -# Copyright (C) 2008 Nobuhiro Iwamatsu -# -# board/ap325rxa/Makefile -# -# - -obj-y := ap325rxa.o cpld-ap325rxa.o -extra-y+= lowlevel_init.o diff --git a/board/renesas/ap325rxa/ap325rxa.c b/board/renesas/ap325rxa/ap325rxa.c deleted file mode 100644 index 700a48687d..00 --- a/board/renesas/ap325rxa/ap325rxa.c +++ /dev/null @@ -1,148 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2008 Renesas Solutions Corp. - * Copyright (C) 2008 Nobuhiro Iwamatsu - */ - -#include -#include -#include -#include - -/* PRI control register */ -#define PRPRICR5 0xFF800048 /* LMB */ -#define PRPRICR5_D 0x2a - -/* FPGA control */ -#define FPGA_NAND_CTL 0xB410020C -#define FPGA_NAND_RST 0x0008 -#define FPGA_NAND_INIT 0x -#define FPGA_NAND_RST_WAIT 1 - -/* I/O port data */ -#define PACR_D 0x -#define PBCR_D 0x -#define PCCR_D 0x1000 -#define PDCR_D 0x -#define PECR_D 0x0410 -#define PFCR_D 0x -#define PGCR_D 0x -#define PHCR_D 0x5011 -#define PJCR_D 0x4400 -#define PKCR_D 0x7c00 -#define PLCR_D 0x -#define PMCR_D 0x -#define PNCR_D 0x -#define PQCR_D 0x -#define PRCR_D 0x -#define PSCR_D 0x -#define PTCR_D 0x0010 -#define PUCR_D 0x0fff -#define PVCR_D 0x -#define PWCR_D 0x -#define PXCR_D 0x7500 -#define PYCR_D 0x -#define PZCR_D 0x5540 - -/* Pin Function Controler data */ -#define PSELA_D0x1410 -#define PSELB_D0x0140 -#define PSELC_D0x -#define PSELD_D0x0400 - -/* I/O Buffer Hi-Z data */ -#defineHIZCRA_D0x -#define HIZCRB_D 0x1000 -#define HIZCRC_D 0x -#define HIZCRD_D 0x - -/* Module select reg data */ -#define MSELCRA_D 0x0014 -#define MSELCRB_D 0x0018 - -/* Module Stop reg Data */ -#define MSTPCR2_D 0xFFD9F280 - -/* CPLD loader */ -extern void init_cpld(void); - -int checkboard(void) -{ - puts("BOARD: AP325RXA\n"); - return 0; -} - -int board_init(void) -{ - /* Pin Function Controler Init */ - outw(
[U-Boot] [PATCH 4/6] sh: ap_sh4a_4a: Remove the board
Last change to this board was done in 2016, has no prospects of ever being converted to DM, drop it. Signed-off-by: Marek Vasut Cc: Chris Brandt Cc: Nobuhiro Iwamatsu Cc: Vladimir Zapolskiy Cc: Yoshihiro Shimoda --- arch/sh/Kconfig | 5 - board/alphaproject/ap_sh4a_4a/Kconfig | 12 - board/alphaproject/ap_sh4a_4a/MAINTAINERS | 7 - board/alphaproject/ap_sh4a_4a/Makefile| 7 - board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c| 161 --- board/alphaproject/ap_sh4a_4a/lowlevel_init.S | 448 -- configs/ap_sh4a_4a_defconfig | 34 -- include/configs/ap_sh4a_4a.h | 102 8 files changed, 776 deletions(-) delete mode 100644 board/alphaproject/ap_sh4a_4a/Kconfig delete mode 100644 board/alphaproject/ap_sh4a_4a/MAINTAINERS delete mode 100644 board/alphaproject/ap_sh4a_4a/Makefile delete mode 100644 board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c delete mode 100644 board/alphaproject/ap_sh4a_4a/lowlevel_init.S delete mode 100644 configs/ap_sh4a_4a_defconfig delete mode 100644 include/configs/ap_sh4a_4a.h diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 8c9f7aed1a..036f54a4df 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -21,10 +21,6 @@ choice prompt "Target select" optional -config TARGET_AP_SH4A_4A - bool "ALPHAPROJECT AP-SH4A-4A" - select CPU_SH4A - config TARGET_AP325RXA bool "Renesas AP-325RXA" select CPU_SH4 @@ -71,7 +67,6 @@ config SYS_CPU source "arch/sh/lib/Kconfig" -source "board/alphaproject/ap_sh4a_4a/Kconfig" source "board/renesas/MigoR/Kconfig" source "board/renesas/ap325rxa/Kconfig" source "board/renesas/r0p7734/Kconfig" diff --git a/board/alphaproject/ap_sh4a_4a/Kconfig b/board/alphaproject/ap_sh4a_4a/Kconfig deleted file mode 100644 index 4692851b26..00 --- a/board/alphaproject/ap_sh4a_4a/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_AP_SH4A_4A - -config SYS_BOARD - default "ap_sh4a_4a" - -config SYS_VENDOR - default "alphaproject" - -config SYS_CONFIG_NAME - default "ap_sh4a_4a" - -endif diff --git a/board/alphaproject/ap_sh4a_4a/MAINTAINERS b/board/alphaproject/ap_sh4a_4a/MAINTAINERS deleted file mode 100644 index f24489d01d..00 --- a/board/alphaproject/ap_sh4a_4a/MAINTAINERS +++ /dev/null @@ -1,7 +0,0 @@ -AP_SH4A_4A BOARD -M: Nobuhiro Iwamatsu -M: Nobuhiro Iwamatsu -S: Maintained -F: board/alphaproject/ap_sh4a_4a/ -F: include/configs/ap_sh4a_4a.h -F: configs/ap_sh4a_4a_defconfig diff --git a/board/alphaproject/ap_sh4a_4a/Makefile b/board/alphaproject/ap_sh4a_4a/Makefile deleted file mode 100644 index 7dd596c3cc..00 --- a/board/alphaproject/ap_sh4a_4a/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2012 Nobuhiro Iwamatsu -# - -obj-y := ap_sh4a_4a.o -extra-y+= lowlevel_init.o diff --git a/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c b/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c deleted file mode 100644 index bdceed6ba8..00 --- a/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c +++ /dev/null @@ -1,161 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2012 Nobuhiro Iwamatsu - * Copyright (C) 2012 Renesas Solutions Corp. - */ - -#include -#include -#include -#include -#include - -#define MODEMR (0xFFCC0020) -#define MODEMR_MASK(0x6) -#define MODEMR_533MHZ (0x2) - -int checkboard(void) -{ - u32 r = readl(MODEMR); - if ((r & MODEMR_MASK) & MODEMR_533MHZ) - puts("CPU Clock: 533MHz\n"); - else - puts("CPU Clock: 400MHz\n"); - - puts("BOARD: Alpha Project. AP-SH4A-4A\n"); - return 0; -} - -#define MSTPSR1(0xFFC80044) -#define MSTPCR1(0xFFC80034) -#define MSTPSR1_GETHER (1 << 14) - -/* IPSR3 */ -#define ET0_ETXD0 (0x4 << 3) -#define ET0_GTX_CLK_A (0x4 << 6) -#define ET0_ETXD1_A (0x4 << 9) -#define ET0_ETXD2_A (0x4 << 12) -#define ET0_ETXD3_A (0x4 << 15) -#define ET0_ETXD4 (0x3 << 18) -#define ET0_ETXD5_A (0x5 << 21) -#define ET0_ETXD6_A (0x5 << 24) -#define ET0_ETXD7 (0x4 << 27) -#define IPSR3_ETH_ENABLE \ - (ET0_ETXD0 | ET0_GTX_CLK_A | ET0_ETXD1_A | ET0_ETXD2_A | \ - ET0_ETXD3_A | ET0_ETXD4 | ET0_ETXD5_A | ET0_ETXD6_A | ET0_ETXD7) - -/* IPSR4 */ -#define ET0_ERXD7 (0x4) -#define ET0_RX_DV (0x4 << 3) -#define ET0_RX_ER (0x4 << 6) -#define ET0_CRS(0x4 << 9) -#define ET0_COL(0x4 << 12) -#define ET0_MDC(0x4 << 15) -#define ET0_MDIO_A (0x3 << 18) -#define ET0_LINK_A (0x3 << 20) -#define ET0_PHY_INT_A (0x3 << 24) - -#define IPSR4_ETH_ENABLE \ - (ET0_ERXD7 | ET0_RX_DV | ET0_RX_ER | ET0_CRS | ET0_COL | \ - ET0_MDC | ET0_MDIO_A | ET0_LINK_A | ET0_PHY_INT_A) - -/* IPSR8 */ -#define ET0_ERXD0 (0x4 << 20) -#define ET0_ERXD1 (0x4 << 23) -#define
[U-Boot] [PATCH 6/6] sh: r0p7734: Remove the board
Last change to this board was done in 2016, has no prospects of ever being converted to DM, drop it. Signed-off-by: Marek Vasut Cc: Chris Brandt Cc: Nobuhiro Iwamatsu Cc: Vladimir Zapolskiy Cc: Yoshihiro Shimoda --- arch/sh/Kconfig | 5 - board/renesas/r0p7734/Kconfig | 12 - board/renesas/r0p7734/MAINTAINERS | 7 - board/renesas/r0p7734/Makefile| 7 - board/renesas/r0p7734/lowlevel_init.S | 591 -- board/renesas/r0p7734/r0p7734.c | 58 --- configs/r0p7734_defconfig | 34 -- include/configs/r0p7734.h | 100 - 8 files changed, 814 deletions(-) delete mode 100644 board/renesas/r0p7734/Kconfig delete mode 100644 board/renesas/r0p7734/MAINTAINERS delete mode 100644 board/renesas/r0p7734/Makefile delete mode 100644 board/renesas/r0p7734/lowlevel_init.S delete mode 100644 board/renesas/r0p7734/r0p7734.c delete mode 100644 configs/r0p7734_defconfig delete mode 100644 include/configs/r0p7734.h diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index da4bfd2cc3..91002a9be0 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -25,10 +25,6 @@ config TARGET_MIGOR bool "Migo-R" select CPU_SH4 -config TARGET_R0P7734 - bool "Support r0p7734" - select CPU_SH4A - config TARGET_R2DPLUS bool "Renesas R2D-PLUS" select CPU_SH4 @@ -64,7 +60,6 @@ config SYS_CPU source "arch/sh/lib/Kconfig" source "board/renesas/MigoR/Kconfig" -source "board/renesas/r0p7734/Kconfig" source "board/renesas/r2dplus/Kconfig" source "board/renesas/r7780mp/Kconfig" source "board/renesas/sh7752evb/Kconfig" diff --git a/board/renesas/r0p7734/Kconfig b/board/renesas/r0p7734/Kconfig deleted file mode 100644 index 7f24f41b8f..00 --- a/board/renesas/r0p7734/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_R0P7734 - -config SYS_BOARD - default "r0p7734" - -config SYS_VENDOR - default "renesas" - -config SYS_CONFIG_NAME - default "r0p7734" - -endif diff --git a/board/renesas/r0p7734/MAINTAINERS b/board/renesas/r0p7734/MAINTAINERS deleted file mode 100644 index c169ad7ecc..00 --- a/board/renesas/r0p7734/MAINTAINERS +++ /dev/null @@ -1,7 +0,0 @@ -R0P7734 BOARD -M: Nobuhiro Iwamatsu -M: Nobuhiro Iwamatsu -S: Maintained -F: board/renesas/r0p7734/ -F: include/configs/r0p7734.h -F: configs/r0p7734_defconfig diff --git a/board/renesas/r0p7734/Makefile b/board/renesas/r0p7734/Makefile deleted file mode 100644 index 8d98016cbe..00 --- a/board/renesas/r0p7734/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2011 Nobuhiro Iwamatsu -# - -obj-y := r0p7734.o -extra-y+= lowlevel_init.o diff --git a/board/renesas/r0p7734/lowlevel_init.S b/board/renesas/r0p7734/lowlevel_init.S deleted file mode 100644 index feb92f0cf4..00 --- a/board/renesas/r0p7734/lowlevel_init.S +++ /dev/null @@ -1,591 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2011 Nobuhiro Iwamatsu - * Copyright (C) 2011 Renesas Solutions Corp. - */ -#include -#include -#include - -#include - - .global lowlevel_init - - .text - .align 2 - -lowlevel_init: - - /* WDT */ - write32 WDTCSR_A, WDTCSR_D - - /* MMU */ - write32 MMUCR_A, MMUCR_D - - write32 FRQCR2_A, FRQCR2_D - write32 FRQCR0_A, FRQCR0_D - - write32 CS0CTRL_A, CS0CTRL_D - write32 CS1CTRL_A, CS1CTRL_D - write32 CS0CTRL2_A, CS0CTRL2_D - - write32 CSPWCR0_A, CSPWCR0_D - write32 CSPWCR1_A, CSPWCR1_D - write32 CS1GDST_A, CS1GDST_D - - # clock mode check - mov.l MODEMR, r1 - mov.l @r1, r0 - and #6, r0 /* Check 1 and 2 bit.*/ - cmp/eq #2, r0 /* 0x02 is 533Mhz mode */ - bt init_lbsc_533 - -init_lbsc_400: - - write32 CSWCR0_A, CSWCR0_D_400 - write32 CSWCR1_A, CSWCR1_D - - bra init_dbsc3_400_pad - nop - - .align 2 - -MODEMR:.long 0xFFCC0020 -WDTCSR_A: .long 0xFFCC0004 -WDTCSR_D: .long 0xA500 -MMUCR_A: .long 0xFF10 -MMUCR_D: .long 0x0004 - -FRQCR2_A: .long 0xFFC80008 -FRQCR2_D: .long 0x -FRQCR0_A: .long 0xFFC8 -FRQCR0_D: .long 0xCF01 - -CS0CTRL_A: .long 0xFF800200 -CS0CTRL_D: .long 0x0020 -CS1CTRL_A: .long 0xFF800204 -CS1CTRL_D: .long 0x0020 - -CS0CTRL2_A:.long 0xFF800220 -CS0CTRL2_D:.long 0x4000 - -CSPWCR0_A: .long 0xFF800280 -CSPWCR0_D: .long 0x -CSPWCR1_A: .long 0xFF800284 -CSPWCR1_D: .long 0x -CS1GDST_A: .long 0xFF8002C0 -CS1GDST_D: .long 0x0011 - -init_lbsc_533: - - write32 CSWCR0_A, CSWCR0_D_533 - write32 CSWCR1_A, CSWCR1_D - - bra init_dbsc3_533_pad - nop - - .align 2 - -CSWCR0_A: .long 0xFF800230 -CSWCR0_D
Re: [U-Boot] [RFC] spl: imx6: Let spl_boot_device return USDHC1 or USDHC2
> Subject: [RFC] spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > Currently, when the spl_boot_device checks the boot device, it will only > return MMC1 when it's either sd or eMMC regardless of whether or not it's > MMC1 or MMC2. This is a problem when booting from MMC2 if MMC isn't > being manually configured like in the DM_SPL case with SPL_OF_CONTROL. > > This patch will check the register and return either MMC1 or MMC2. > > Signed-off-by: Adam Ford > > diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index > 9f1e0f6a72..1f230aca33 100644 > --- a/arch/arm/mach-imx/spl.c > +++ b/arch/arm/mach-imx/spl.c > @@ -24,6 +24,7 @@ u32 spl_boot_device(void) { > unsigned int bmode = readl(&src_base->sbmr2); > u32 reg = imx6_src_get_boot_mode(); > + u32 mmc_index = ((reg >> 11) & 0x03); > > /* >* Check for BMODE if serial downloader is enabled @@ -84,11 +85,12 > @@ u32 spl_boot_device(void) > /* SD/eSD: 8.5.3, Table 8-15 */ > case IMX6_BMODE_SD: > case IMX6_BMODE_ESD: > - return BOOT_DEVICE_MMC1; > - /* MMC/eMMC: 8.5.3 */ > case IMX6_BMODE_MMC: > case IMX6_BMODE_EMMC: > - return BOOT_DEVICE_MMC1; > + if (mmc_index == 1) > + return BOOT_DEVICE_MMC2; > + else > + return BOOT_DEVICE_MMC1; Although it not fixes all the 4 sdhc ports for i.MX6Q, it is fine. Reviewed-by: Peng Fan > /* NAND Flash: 8.5.2, Table 8-10 */ > case IMX6_BMODE_NAND_MIN ... IMX6_BMODE_NAND_MAX: > return BOOT_DEVICE_NAND; > -- > 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] imx8mq_evk: Staticize when appropriate
> Subject: [PATCH] imx8mq_evk: Staticize when appropriate > > Staticize 'spl_dram_init' and 'i2c_pad_info1' to fix the following sparse > warnings: > > board/freescale/imx8mq_evk/spl.c:30:6: warning: symbol 'spl_dram_init' was > not declared. Should it be static? > board/freescale/imx8mq_evk/spl.c:41:22: warning: symbol 'i2c_pad_info1' > was not declared. Should it be static? > > Signed-off-by: Fabio Estevam > --- > board/freescale/imx8mq_evk/spl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/board/freescale/imx8mq_evk/spl.c > b/board/freescale/imx8mq_evk/spl.c > index e6cbc34b0d..3c0ff0bb1b 100644 > --- a/board/freescale/imx8mq_evk/spl.c > +++ b/board/freescale/imx8mq_evk/spl.c > @@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR; > > extern struct dram_timing_info dram_timing_b0; > > -void spl_dram_init(void) > +static void spl_dram_init(void) > { > /* ddr init */ > if ((get_cpu_rev() & 0xfff) == CHIP_REV_2_1) @@ -38,7 +38,7 @@ void > spl_dram_init(void) > > #define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | > PAD_CTL_PUE) > #define PC MUX_PAD_CTRL(I2C_PAD_CTRL) > -struct i2c_pads_info i2c_pad_info1 = { > +static struct i2c_pads_info i2c_pad_info1 = { > .scl = { > .i2c_mode = IMX8MQ_PAD_I2C1_SCL__I2C1_SCL | PC, > .gpio_mode = IMX8MQ_PAD_I2C1_SCL__GPIO5_IO14 | PC, Reviewed-by: Peng Fan > -- > 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V2 1/2] pci: renesas: Add RCar Gen3 PCIe controller driver
On Sun, May 19, 2019 at 11:56 PM Marek Vasut wrote: > > Add driver for the Renesas RCar PCIe controller present on Gen3 SoCs. > The PCIe on Gen3 is used both to connect external PCIe peripherals. > > Signed-off-by: Marek Vasut > Cc: Bin Meng > Cc: Nobuhiro Iwamatsu > --- > V2: - Rename the driver > - Use platdata instead of priv > --- > drivers/pci/Kconfig | 8 + > drivers/pci/Makefile| 1 + > drivers/pci/pci-rcar-gen3.c | 411 > 3 files changed, 420 insertions(+) > create mode 100644 drivers/pci/pci-rcar-gen3.c > Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 4/6] spl: mmc: support loading i.MX container format file
On 5/20/19 3:30 AM, Peng Fan wrote: > Hi Simon, > >> Subject: Re: [PATCH 4/6] spl: mmc: support loading i.MX container format file >> >> Hi Peng, >> >> On Tue, 7 May 2019 at 06:52, Peng Fan wrote: >>> >>> i.MX8 only support AHAB secure boot with Container format image, we >>> could not use FIT to support secure boot, so introduce container >> >> Why not FIT? > > Actually before we implement secure boot, we use FIT image, however > i.MX8 only support i.MX container format image for secure boot, > The chip will verify the container image when secure boot. It could not > recognize > FIT image. So we have to drop FIT image. > >> >>> support to let SPL could load container images. >> >> What is a container image? Can you please point to documentation? > > Sadly, there is no public reference manual. There is a doc that has > a bit of information. https://community.nxp.com/docs/DOC-343178 Shouldn't it suffice for the SPL to be in this custom format , while the rest of the binaries can be in fitImage ? -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V2 2/2] ARM: rmobile: Enable PCIe driver on R-Car Gen3 Salvator-X
On Sun, May 19, 2019 at 11:57 PM Marek Vasut wrote: > > Enable PCIe driver on R-Car Gen3 Salvator-X boards. > > Signed-off-by: Marek Vasut > Cc: Nobuhiro Iwamatsu > --- > V2: Rename the driver > --- > configs/r8a7795_salvator-x_defconfig | 4 > configs/r8a77965_salvator-x_defconfig | 4 > configs/r8a7796_salvator-x_defconfig | 4 > 3 files changed, 12 insertions(+) > Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 4/6] spl: mmc: support loading i.MX container format file
Hi Marek, > Subject: Re: [U-Boot] [PATCH 4/6] spl: mmc: support loading i.MX container > format file > > On 5/20/19 3:30 AM, Peng Fan wrote: > > Hi Simon, > > > >> Subject: Re: [PATCH 4/6] spl: mmc: support loading i.MX container > >> format file > >> > >> Hi Peng, > >> > >> On Tue, 7 May 2019 at 06:52, Peng Fan wrote: > >>> > >>> i.MX8 only support AHAB secure boot with Container format image, we > >>> could not use FIT to support secure boot, so introduce container > >> > >> Why not FIT? > > > > Actually before we implement secure boot, we use FIT image, however > > i.MX8 only support i.MX container format image for secure boot, The > > chip will verify the container image when secure boot. It could not > > recognize FIT image. So we have to drop FIT image. > > > >> > >>> support to let SPL could load container images. > >> > >> What is a container image? Can you please point to documentation? > > > > Sadly, there is no public reference manual. There is a doc that has a > > bit of information. > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcomm > > > unity.nxp.com%2Fdocs%2FDOC-343178&data=02%7C01%7Cpeng.fan%4 > 0nxp.co > > > m%7C8626e7a1d20c44b8715408d6dcc4d866%7C686ea1d3bc2b4c6fa92cd9 > 9c5c30163 > > > 5%7C0%7C0%7C636939135344595378&sdata=vmIaO78XmuL1tQJufqf7 > HCGdWHTCJ > > bEpmGBio15j46U%3D&reserved=0 > > Shouldn't it suffice for the SPL to be in this custom format , while the rest > of > the binaries can be in fitImage ? The issue is the SoC only support i.MX container format for secure boot(AHAB boot), if we not use secure boot, FIT image do work and could work well. We investigated using FIT for i.MX8 secure boot, but it does not make sense we did a FIT wrapper for container. Container itself is also an image format, it contains image load/entry/size and etc information. I add a kconfig entry in SPL code, it does not hurt others if the Kconfig entry not chosen. I do not know how other SoC vendor did FIT hardware secure boot, please share you have any information. Thanks, Peng. > > -- > Best regards, > Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 02/10] mmc: fsl_esdhc: annotate endifs
On Sun, May 19, 2019 at 9:45 PM Marcel Ziswiler wrote: > > Annotate endifs to make CONFIG_IS_ENABLED(DM_MMC) or not more obvious. > > Signed-off-by: Marcel Ziswiler Reviewed-by: Fabio Estevam Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] mmc: fsl_esdhc: fix ddr mode settings
When sd/mmc work at DDR mode, like HS400/HS400ES/DDR52/DDR50 mode, the output clock rate is half of the internal clock rate. But first need set DDR_EN bit first , then hardware will automatically divide the usdhc clock. The mixctrl register exits on new i.MX SoC since i.MX6, so add CONFIG check. Signed-off-by: Peng Fan --- drivers/mmc/fsl_esdhc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 377b2673a3..acd6e08abb 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -625,6 +625,19 @@ static void set_sysctl(struct fsl_esdhc_priv *priv, struct mmc *mmc, uint clock) int sdhc_clk = priv->sdhc_clk; uint clk; + /* +* For ddr mode, usdhc need to enable DDR mode first, +* after select this DDR mode, usdhc will automatically +* divide the usdhc clock +*/ + if (CONFIG_IS_ENABLED(ARCH_MX6) || CONFIG_IS_ENABLED(ARCH_MX7) || + CONFIG_IS_ENABLED(ARCH_MX7ULP) || CONFIG_IS_ENABLED(ARCH_IMX8) || + CONFIG_IS_ENABLED(ARCH_IMX8M)) { + if (mmc->ddr_mode) + writel(readl(®s->mixctrl) | MIX_CTRL_DDREN, + ®s->mixctrl); + } + if (clock < mmc->cfg->f_min) clock = mmc->cfg->f_min; -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"
Hi Lukasz, Do you expect me to pick this patch, just see this patch was delegated to Stefano? Regards, Peng. > Subject: RE: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock > setting issue" > > > Subject: RE: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock > > setting issue" > > > > > Subject: Re: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode > > > clock setting issue" > > > > > > On Wed, 8 May 2019 13:59:14 + > > > Peng Fan wrote: > > > > > > > > -Original Message- > > > > > From: Lukasz Majewski [mailto:lu...@denx.de] > > > > > Sent: 2019年5月8日 14:38 > > > > > To: Peng Fan > > > > > Cc: u-boot@lists.denx.de; Tom Rini ; Marcel > > > > > Ziswiler ; Fabio Estevam > > > > > ; dl-uboot-imx ; > > > > > sba...@denx.de; Stefan Agner ; BOUGH > > > CHEN > > > > > ; Ye Li > > > > > Subject: Re: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode > > > > > clock setting issue" > > > > > > > > > > On Wed, 8 May 2019 08:19:45 +0200 Lukasz Majewski > > > > > wrote: > > > > > > > > > > > Hi Peng, > > > > > > > > > > > > > Hi Lukasz, > > > > > > > > > > > > > > > Subject: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr > > > > > > > > mode clock setting issue" > > > > > > > > > > > > > > > > This reverts commit > > > 72a89e0da5ac6a4ab929b15a2b656f04f50767f6, > > > > > > > > which causes the imx53 HSC to hang as the eMMC is not > > > > > > > > working properly anymore. > > > > > > > > > > > > > > > > The exact error message: > > > > > > > > MMC write: dev # 0, block # 2, count 927 ... mmc write > > > > > > > > failed > > > > > > > > 0 blocks written: ERROR > > > > > > > > > > > > > > > > imx53 is not using the DDR mode. > > > > > > > > > > > > > > > > Debugging of pre_div and div generation showed that those > > > > > > > > values are generated in a way, which is not matching the > > > > > > > > ones from working setup. > > > > > > > > > > > > > > > > As the original patch was performing code refactoring, > > > > > > > > let's revert this change, so all imx53 boards would work again. > > > > > > > > > > > > > > Could you share what is the clock value for your board? > > > > > > > > > > > > Sure, no problem: > > > > > > > > > > > > Working setup: > > > > > > -- > > > > > > > > > > > > MMC: > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > FSL_SDHC: 0 > > > > > > Loading Environment from MMC... > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 1 div: 1 set_sysctl: clk: 272 > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 1 div: 0 set_sysctl: clk: 256 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Broken: > > > > > > --- > > > > > > MMC: > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > FSL_SDHC: 0 > > > > > > Loading Environment from MMC... > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 0 div: 3 set_sysctl: clk: 48 > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > pre_div: 0 div: 1 set_sysctl: clk: 16 > > > > > > > > > > > > > > > > > > (Please also find attached patch to reproduce debug output). > > > > > > > > > > > > > > > > And maybe the most important question - why it was necessary to > > > > > refactor this code? > > > > > > > > > > Parts responsible for calculating pre_div and div seems not > > > > > related to ddr problem (one spot issue is div <= 16 , but in the > > > > > original code it was div < 16)? > > > > > > > > Could you help verify whether the patch fixes you issue? > > > > > > > > index 1b7de74a72..3347fbe738 100644 > > > > --- a/drivers/mmc/fsl_esdhc.c > > > > +++ b/drivers/mmc/fsl_esdhc.c > > > > @@ -640,8 +640,7 @@ static void set_sysctl(struct fsl_esdhc_priv > > > > *priv, struct mmc *mmc, uint clock) for (; pre_div < 256; pre_div > > > > *= > > > > 2) if ((sdhc_clk / pre_div) <= (clock * 16)) > > > > break; > > > > - } else > > > > - pre_div = 1; > > > > + } > > > > > > Please examine this code thoroughly and provide patch. > > > > The pre_div should not override the initialization value at the > > beginning of the function. > > > > > > > > The > > > } else > > > pre_div = 1; > > > > > > was added there for a pur
Re: [U-Boot] [PATCH 4/8] ipam390: remove board
Hello Bartosz, Am 17.05.2019 um 11:17 schrieb Bartosz Golaszewski: From: Bartosz Golaszewski This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/Kconfig | 7 - board/Barix/ipam390/Kconfig| 12 - board/Barix/ipam390/MAINTAINERS| 6 - board/Barix/ipam390/Makefile | 8 - board/Barix/ipam390/README.ipam390 | 229 -- board/Barix/ipam390/ipam390-ais-uart.cfg | 202 - board/Barix/ipam390/ipam390.c | 335 - board/Barix/ipam390/u-boot-spl-ipam390.lds | 57 configs/ipam390_defconfig | 45 --- include/configs/ipam390.h | 237 --- 10 files changed, 1138 deletions(-) delete mode 100644 board/Barix/ipam390/Kconfig delete mode 100644 board/Barix/ipam390/MAINTAINERS delete mode 100644 board/Barix/ipam390/Makefile delete mode 100644 board/Barix/ipam390/README.ipam390 delete mode 100644 board/Barix/ipam390/ipam390-ais-uart.cfg delete mode 100644 board/Barix/ipam390/ipam390.c delete mode 100644 board/Barix/ipam390/u-boot-spl-ipam390.lds delete mode 100644 configs/ipam390_defconfig delete mode 100644 include/configs/ipam390.h Thanks! Acked-by: Heiko Schocher bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: h...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"
Hi Peng, > Hi Lukasz, > > Do you expect me to pick this patch, just see this patch was > delegated to Stefano? I think that you shall decide with Stefano who would take this patch. For me there is no difference, I would just like to have it in main line ASAP (depends who prepare PR first). > > Regards, > Peng. > > > Subject: RE: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode > > clock setting issue" > > > > > Subject: RE: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode > > > clock setting issue" > > > > > > > Subject: Re: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode > > > > clock setting issue" > > > > > > > > On Wed, 8 May 2019 13:59:14 + > > > > Peng Fan wrote: > > > > > > > > > > -Original Message- > > > > > > From: Lukasz Majewski [mailto:lu...@denx.de] > > > > > > Sent: 2019年5月8日 14:38 > > > > > > To: Peng Fan > > > > > > Cc: u-boot@lists.denx.de; Tom Rini ; > > > > > > Marcel Ziswiler ; Fabio Estevam > > > > > > ; dl-uboot-imx ; > > > > > > sba...@denx.de; Stefan Agner ; > > > > > > BOUGH > > > > CHEN > > > > > > ; Ye Li > > > > > > Subject: Re: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr > > > > > > mode clock setting issue" > > > > > > > > > > > > On Wed, 8 May 2019 08:19:45 +0200 Lukasz Majewski > > > > > > wrote: > > > > > > > > > > > > > Hi Peng, > > > > > > > > > > > > > > > Hi Lukasz, > > > > > > > > > > > > > > > > > Subject: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc > > > > > > > > > ddr mode clock setting issue" > > > > > > > > > > > > > > > > > > This reverts commit > > > > 72a89e0da5ac6a4ab929b15a2b656f04f50767f6, > > > > > > > > > which causes the imx53 HSC to hang as the eMMC is not > > > > > > > > > working properly anymore. > > > > > > > > > > > > > > > > > > The exact error message: > > > > > > > > > MMC write: dev # 0, block # 2, count 927 ... mmc write > > > > > > > > > failed > > > > > > > > > 0 blocks written: ERROR > > > > > > > > > > > > > > > > > > imx53 is not using the DDR mode. > > > > > > > > > > > > > > > > > > Debugging of pre_div and div generation showed that > > > > > > > > > those values are generated in a way, which is not > > > > > > > > > matching the ones from working setup. > > > > > > > > > > > > > > > > > > As the original patch was performing code refactoring, > > > > > > > > > let's revert this change, so all imx53 boards would > > > > > > > > > work again. > > > > > > > > > > > > > > > > Could you share what is the clock value for your > > > > > > > > board? > > > > > > > > > > > > > > Sure, no problem: > > > > > > > > > > > > > > Working setup: > > > > > > > -- > > > > > > > > > > > > > > MMC: > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > FSL_SDHC: 0 > > > > > > > Loading Environment from MMC... > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 1 div: 1 set_sysctl: clk: 272 > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 1 div: 0 set_sysctl: clk: 256 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Broken: > > > > > > > --- > > > > > > > MMC: > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > FSL_SDHC: 0 > > > > > > > Loading Environment from MMC... > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 0 div: 3 set_sysctl: clk: 48 > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > pre_div: 0 div: 1 set_sysctl: clk: 16 > > > > > > > > > > > > > > > > > > > > > (Please also find attached patch to reproduce debug > > > > > > > output). > > > > > > > > > > > > And maybe the most important question - why it was > > > > > > necessary to refactor this code? > > > > > > > > > > > > Parts responsible for calculating pre_div and div seems not > > > > > > related to ddr problem (one spot issue is div <= 16 , but > > > > > > in the original code it was div < 16)? > > > > > > > > > > Could you help verify whether the patch fixes you issue? > > > > > > > > > > index 1b7de74a72..3347fbe738 100644 > > > > > --- a/drivers/mmc/fsl_esdhc.c > > > > > +++ b/drivers/mmc/fsl_esdhc.c > > > > > @@ -640,8 +640,7 @@ static void set_sysctl(struct > > > > > fsl_esdhc_pri
Re: [U-Boot] [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"
Hi Lukasz, > Subject: Re: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock > setting issue" > > Hi Peng, > > > Hi Lukasz, > > > > Do you expect me to pick this patch, just see this patch was delegated > > to Stefano? > > I think that you shall decide with Stefano who would take this patch. > > For me there is no difference, I would just like to have it in main line ASAP > (depends who prepare PR first). ok. I'll send a PR to Tom today after CI done. I was waiting IT to fix my ssh push issue, so delayed. I still have to use my github to PR (: Regards, Peng. > > > > > Regards, > > Peng. > > > > > Subject: RE: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode > > > clock setting issue" > > > > > > > Subject: RE: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode > > > > clock setting issue" > > > > > > > > > Subject: Re: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode > > > > > clock setting issue" > > > > > > > > > > On Wed, 8 May 2019 13:59:14 + Peng Fan > > > > > wrote: > > > > > > > > > > > > -Original Message- > > > > > > > From: Lukasz Majewski [mailto:lu...@denx.de] > > > > > > > Sent: 2019年5月8日 14:38 > > > > > > > To: Peng Fan > > > > > > > Cc: u-boot@lists.denx.de; Tom Rini ; > > > > > > > Marcel Ziswiler ; Fabio Estevam > > > > > > > ; dl-uboot-imx ; > > > > > > > sba...@denx.de; Stefan Agner ; > > > > > > > BOUGH > > > > > CHEN > > > > > > > ; Ye Li > > > > > > > Subject: Re: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr > > > > > > > mode clock setting issue" > > > > > > > > > > > > > > On Wed, 8 May 2019 08:19:45 +0200 Lukasz Majewski > > > > > > > wrote: > > > > > > > > > > > > > > > Hi Peng, > > > > > > > > > > > > > > > > > Hi Lukasz, > > > > > > > > > > > > > > > > > > > Subject: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc > > > > > > > > > > ddr mode clock setting issue" > > > > > > > > > > > > > > > > > > > > This reverts commit > > > > > 72a89e0da5ac6a4ab929b15a2b656f04f50767f6, > > > > > > > > > > which causes the imx53 HSC to hang as the eMMC is not > > > > > > > > > > working properly anymore. > > > > > > > > > > > > > > > > > > > > The exact error message: > > > > > > > > > > MMC write: dev # 0, block # 2, count 927 ... mmc write > > > > > > > > > > failed > > > > > > > > > > 0 blocks written: ERROR > > > > > > > > > > > > > > > > > > > > imx53 is not using the DDR mode. > > > > > > > > > > > > > > > > > > > > Debugging of pre_div and div generation showed that > > > > > > > > > > those values are generated in a way, which is not > > > > > > > > > > matching the ones from working setup. > > > > > > > > > > > > > > > > > > > > As the original patch was performing code refactoring, > > > > > > > > > > let's revert this change, so all imx53 boards would > > > > > > > > > > work again. > > > > > > > > > > > > > > > > > > Could you share what is the clock value for your board? > > > > > > > > > > > > > > > > Sure, no problem: > > > > > > > > > > > > > > > > Working setup: > > > > > > > > -- > > > > > > > > > > > > > > > > MMC: > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > FSL_SDHC: 0 > > > > > > > > Loading Environment from MMC... > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 1 div: 1 set_sysctl: clk: 272 > > > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 1 div: 0 set_sysctl: clk: 256 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Broken: > > > > > > > > --- > > > > > > > > MMC: > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > FSL_SDHC: 0 > > > > > > > > Loading Environment from MMC... > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 8 div: 12 set_sysctl: clk: 2240 > > > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 0 div: 3 set_sysctl: clk: 48 > > > > > > > > > > > > > > > > set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 > > > > > > > > pre_div: 0 div: 1 set_sysctl: clk: 16 > > > > > > > > > > > > > > > > > > > > > > > > (Please also find attached patch to reproduce debug > > > > > > > > output). > > > > > > > > > > > > > > And maybe the most important question - why it was necessary > > > > > > > to refactor this code? > > > > > > > > > > > > > > Parts r
Re: [U-Boot] [PATCH v2 2/3] spl: add relocation support【请注意,邮件由s...@google.com代发】
Hi Simon: On 2019/5/19 上午12:26, Simon Glass wrote: Hi Andy, Instead of this could you: - move ATF? All rockchip based arm64 ATF run from the start 64KB of dram as this will give convenient for kernel manage the memory. On the other hand, change the ATF load address will break the compatibility of the exiting firmware. - change the SPL load address so it is not in the way (since TPL can load to any address) The SPL is loaded by bootrom after TPL back to bootrom, so the load address if fixed by bootrom code. I know we can build mmc or other storage driver into TPL so we can use tpl load spl on some platform that sram is big enough, but there are also many rockchip soc has very small sram, so we tend to only do dram initialization in tpl, and let bootrom load next stage . - (in extremis) create a function which does a memmove() and a jump, copy it somewhere and run it (I think x86 does this) Regards, Simon On Thu, 16 May 2019 at 06:22, Andy Yan wrote: Some times we want to relocate spl code to dram after dram initialization or relocate spl code to a high memory to avoid code overid. For example on Rockchip armv8 platform, we run with boot flow TPL->SPL->ATF->U-Boot. TPL run in sram and is responsible for dram initialization. SPL run from the start address of dram and is responsible for loading ATF and U-Boot. The case here is that the ATF load address is from 64KB of dram, which overlaps with spl code itself. So we want to relocate spl itself to high memory to aovid this. Signed-off-by: Andy Yan --- Changes in v2: - Move Kconfig modification to PATCH 1/3 common/spl/spl.c | 55 1 file changed, 55 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index 88d4b8a9bf..affb65ccbd 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -439,6 +440,28 @@ static int spl_common_init(bool setup_malloc) return 0; } +#if !defined(CONFIG_SPL_SKIP_RELOCATE) && !defined(CONFIG_TPL_BUILD) +static void spl_setup_relocate(void) +{ + gd->relocaddr = CONFIG_SPL_RELOC_TEXT_BASE; + gd->new_gd = (gd_t *)gd; + gd->start_addr_sp = gd->relocaddr; + gd->fdt_size = ALIGN(fdt_totalsize(gd->fdt_blob) + 0x1000, 32); + + gd->start_addr_sp -= gd->fdt_size; + gd->new_fdt = (void *)gd->start_addr_sp; + memcpy(gd->new_fdt, gd->fdt_blob, gd->fdt_size); + gd->fdt_blob = gd->new_fdt; + + gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start; +} +#else +static void spl_setup_relocate(void) +{ + +} +#endif + void spl_set_bd(void) { /* @@ -460,6 +483,8 @@ int spl_early_init(void) return ret; gd->flags |= GD_FLG_SPL_EARLY_INIT; + spl_setup_relocate(); + return 0; } @@ -563,6 +588,34 @@ static int boot_from_devices(struct spl_image_info *spl_image, return -ENODEV; } +#if defined(CONFIG_DM) && !defined(CONFIG_SPL_SKIP_RELOCATE) && !defined(CONFIG_TPL_BUILD) +static int spl_initr_dm(void) +{ + int ret; + + /* Save the pre-reloc driver model and start a new one */ + gd->dm_root_f = gd->dm_root; + gd->dm_root = NULL; + bootstage_start(BOOTSTATE_ID_ACCUM_DM_R, "dm_r"); + ret = dm_init_and_scan(false); + bootstage_accum(BOOTSTATE_ID_ACCUM_DM_R); + if (ret) + return ret; + +#if defined(CONFIG_TIMER) + gd->timer = NULL; +#endif + serial_init(); + + return 0; +} +#else +static int spl_initr_dm(void) +{ + return 0; +} +#endif + void board_init_r(gd_t *dummy1, ulong dummy2) { u32 spl_boot_list[] = { @@ -577,6 +630,8 @@ void board_init_r(gd_t *dummy1, ulong dummy2) debug(">>" SPL_TPL_PROMPT "board_init_r()\n"); + spl_initr_dm(); + spl_set_bd(); #if defined(CONFIG_SYS_SPL_MALLOC_START) -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot