Re: [U-Boot] [PATCH v2 3/3] watchdog: Convert Xilinx Axi watchdog driver to driver model
Hi Simon, On 19.7.2018 03:31, Simon Glass wrote: > Hi Shreenidhi, > > On 14 July 2018 at 14:35, Shreenidhi Shedi wrote: >> Xilinx Axi wdt driver conversion to driver model & Kconfig update >> for the same. >> >> Changes in V1: >> - Xilinx Axi wdt driver conversion to DM initial version >> >> Changes in V2: >> - Rectified print message >> - Removed stop instruction from probe >> >> Signed-off-by: Shreenidhi Shedi >> --- >> >> Changes in v2: None >> >> drivers/watchdog/Kconfig | 8 +++ >> drivers/watchdog/xilinx_tb_wdt.c | 105 --- >> 2 files changed, 89 insertions(+), 24 deletions(-) >> >> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig >> index 148c6a0d68..351d2af8d9 100644 >> --- a/drivers/watchdog/Kconfig >> +++ b/drivers/watchdog/Kconfig >> @@ -103,4 +103,12 @@ config WDT_CDNS >>Select this to enable Cadence watchdog timer, which can be found >> on some >>Xilinx Microzed Platform. >> >> +config XILINX_TB_WATCHDOG >> + bool "Xilinx Axi watchdog timer support" >> + depends on WDT >> + imply WATCHDOG >> + help >> + Select this to enable Xilinx Axi watchdog timer, which can be >> found on some >> + Xilinx Microblaze Platform. > > platforms? will fix. > >> + >> endmenu >> diff --git a/drivers/watchdog/xilinx_tb_wdt.c >> b/drivers/watchdog/xilinx_tb_wdt.c >> index 2274123e49..23ddbdfbee 100644 >> --- a/drivers/watchdog/xilinx_tb_wdt.c >> +++ b/drivers/watchdog/xilinx_tb_wdt.c >> @@ -1,13 +1,17 @@ >> // SPDX-License-Identifier: GPL-2.0+ >> /* >> + * Xilinx Axi platforms watchdog timer driver. >> + * >> + * Author(s): Michal Šimek >> + * Shreenidhi Shedi >> + * >> * Copyright (c) 2011-2013 Xilinx Inc. >> */ >> >> #include >> -#include >> -#include >> -#include >> -#include >> +#include >> +#include >> +#include >> >> #define XWT_CSR0_WRS_MASK 0x0008 /* Reset status Mask */ >> #define XWT_CSR0_WDS_MASK 0x0004 /* Timer state Mask */ >> @@ -20,49 +24,102 @@ struct watchdog_regs { >> u32 tbr; /* 0x8 */ >> }; >> >> -static struct watchdog_regs *watchdog_base = >> - (struct watchdog_regs *)CONFIG_WATCHDOG_BASEADDR; >> +struct xlnx_wdt_priv { >> + bool enable_once; >> + struct watchdog_regs *regs; >> +}; >> >> -void hw_watchdog_reset(void) >> +static int xlnx_wdt_reset(struct udevice *dev) > > You could pass just regs to this function? Same below. I don't think so. This function is the part of struct wdt_ops{} which is 82 /* 83 * Reset the timer, typically restoring the counter to 84 * the value configured by start() 85 * 86 * @dev: WDT Device 87 * @return: 0 if OK, -ve on error 88 */ 89 int (*reset)(struct udevice *dev); > >> { >> u32 reg; >> + struct xlnx_wdt_priv *priv = dev_get_priv(dev); >> + >> + debug("%s\n", __func__); >> >> /* Read the current contents of TCSR0 */ >> - reg = readl(&watchdog_base->twcsr0); >> + reg = readl(&priv->regs->twcsr0); >> >> /* Clear the watchdog WDS bit */ >> if (reg & (XWT_CSR0_EWDT1_MASK | XWT_CSRX_EWDT2_MASK)) >> - writel(reg | XWT_CSR0_WDS_MASK, &watchdog_base->twcsr0); >> + writel(reg | XWT_CSR0_WDS_MASK, &priv->regs->twcsr0); >> + >> + return 0; >> } >> >> -void hw_watchdog_disable(void) >> +static int xlnx_wdt_stop(struct udevice *dev) >> { >> u32 reg; >> + struct xlnx_wdt_priv *priv = dev_get_priv(dev); >> + >> + if (priv->enable_once) { >> + puts("Can't stop Xilinx watchdog.\n"); > > debug() will fix > >> + return -1; > > return -EBUSY > > -1 is -EPERM which might not be correct. will fix > >> + } >> >> /* Read the current contents of TCSR0 */ >> - reg = readl(&watchdog_base->twcsr0); >> + reg = readl(&priv->regs->twcsr0); >> >> - writel(reg & ~XWT_CSR0_EWDT1_MASK, &watchdog_base->twcsr0); >> - writel(~XWT_CSRX_EWDT2_MASK, &watchdog_base->twcsr1); >> + writel(reg & ~XWT_CSR0_EWDT1_MASK, &priv->regs->twcsr0); >> + writel(~XWT_CSRX_EWDT2_MASK, &priv->regs->twcsr1); >> >> puts("Watchdog disabled!\n"); > > Drivers should not output to the console. debug is fine here. > >> + >> + return 0; >> } >> >> -static void hw_watchdog_isr(void *arg) >> +static int xlnx_wdt_start(struct udevice *dev, u64 timeout, ulong flags) >> { >> - hw_watchdog_reset(); >> + struct xlnx_wdt_priv *priv = dev_get_priv(dev); >> + >> + writel((XWT_CSR0_WRS_MASK | XWT_CSR0_WDS_MASK | XWT_CSR0_EWDT1_MASK), >> + &priv->regs->twcsr0); >> + >> + writel(XWT_CSRX_EWDT2_MASK, &priv->regs->twcsr1); >> + >> + return 0; >> } >> >> -void hw_watchdog_init(void) >> +static int xlnx_wdt_probe(struct udevice *dev) >> { >> - int ret; >> + deb
[U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded
A message should be displayed if an image is loaded to an FPGA, because the hardware might have changed, and the user should be informed Signed-off-by: Luis Araneda --- common/spl/spl_fit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 5b51a28a08..9eabb1c105 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -412,6 +412,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, printf("%s: Cannot load the FPGA: %i\n", __func__, ret); return ret; } + puts("FPGA image loaded from FIT\n"); node = -1; } #endif -- 2.18.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/3] arm: zynq: spl: fix FPGA initialization
commit 4aba5fb857c1 ("arm: zynq: Rework FPGA initialization") moved FPGA initialization from board_init() to arch_early_init_r(), which is not called as part of the SPL Fix this by calling arch_early_init_r() in the spl_board_init() function, so the FPGA is correctly initialized Signed-off-by: Luis Araneda --- arch/arm/mach-zynq/spl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c index 83297d6c69..9b7c0be951 100644 --- a/arch/arm/mach-zynq/spl.c +++ b/arch/arm/mach-zynq/spl.c @@ -29,6 +29,9 @@ void board_init_f(ulong dummy) void spl_board_init(void) { preloader_console_init(); +#if defined(CONFIG_ARCH_EARLY_INIT_R) && defined(CONFIG_SPL_FPGA_SUPPORT) + arch_early_init_r(); +#endif board_init(); } #endif -- 2.18.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/3] drivers: fpga: zynqpl: fix compilation with SPL
Disable the use of function zynq_loadfs when compiling the driver for the SPL, as the following filesystem functions are not found by the linker: - fs_set_blk_dev - fs_read - fs_set_blk_dev - fs_read - fs_read Signed-off-by: Luis Araneda --- drivers/fpga/zynqpl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c index fd37d18c7f..8e49c7010e 100644 --- a/drivers/fpga/zynqpl.c +++ b/drivers/fpga/zynqpl.c @@ -410,7 +410,7 @@ static int zynq_load(xilinx_desc *desc, const void *buf, size_t bsize, return FPGA_SUCCESS; } -#if defined(CONFIG_CMD_FPGA_LOADFS) +#if defined(CONFIG_CMD_FPGA_LOADFS) && !defined(CONFIG_SPL_BUILD) static int zynq_loadfs(xilinx_desc *desc, const void *buf, size_t bsize, fpga_fs_info *fsinfo) { @@ -493,7 +493,7 @@ static int zynq_loadfs(xilinx_desc *desc, const void *buf, size_t bsize, struct xilinx_fpga_op zynq_op = { .load = zynq_load, -#if defined(CONFIG_CMD_FPGA_LOADFS) +#if defined(CONFIG_CMD_FPGA_LOADFS) && !defined(CONFIG_SPL_BUILD) .loadfs = zynq_loadfs, #endif }; -- 2.18.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 0/1] Xilinx Axi Watchdog driver conversion to driver model
Hi, this is moving MB watchdog to DM. I have taken v2 from Shreenidhi and did some changes to speedup upstreaming because I need this for my gpio work. Removing watchdog in the first patch is not big deal because this is generic platform and adresses are fake. Sending only last patch because the rest was already applied and there are patches which depends on that. Thanks, Michal Changes in v4: - Fix Kconfig typo - by sjg - Use debug instead of puts in drivers - by sjg - Use EBUSY instead of -1 - by sjg Changes in v3: - Fix commit message - s/Axi/AXI - Use platdata instead of private data. - Remove \n from wdt reset to catch logs - Add debug to wdt_start Changes in v2: - Rectified print message - Removed stop instruction from probe Changes in v1: - Xilinx Axi wdt driver conversion to DM initial version Shreenidhi Shedi (1): watchdog: Convert Xilinx Axi watchdog driver to driver model drivers/watchdog/Kconfig | 8 +++ drivers/watchdog/xilinx_tb_wdt.c | 111 ++- 2 files changed, 93 insertions(+), 26 deletions(-) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4] watchdog: Convert Xilinx Axi watchdog driver to driver model
From: Shreenidhi Shedi Xilinx Axi wdt driver conversion to driver model & Kconfig update for the same. Signed-off-by: Shreenidhi Shedi Signed-off-by: Michal Simek --- Changes in v4: - Fix Kconfig typo - by sjg - Use debug instead of puts in drivers - by sjg - Use EBUSY instead of -1 - by sjg Changes in v3: - Fix commit message - s/Axi/AXI - Use platdata instead of private data. - Remove \n from wdt reset to catch logs - Add debug to wdt_start Changes in v2: - Rectified print message - Removed stop instruction from probe Changes in v1: - Xilinx Axi wdt driver conversion to DM initial version drivers/watchdog/Kconfig | 8 +++ drivers/watchdog/xilinx_tb_wdt.c | 111 ++- 2 files changed, 93 insertions(+), 26 deletions(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 148c6a0d687c..d545b3e00072 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -103,4 +103,12 @@ config WDT_CDNS Select this to enable Cadence watchdog timer, which can be found on some Xilinx Microzed Platform. +config XILINX_TB_WATCHDOG + bool "Xilinx Axi watchdog timer support" + depends on WDT + imply WATCHDOG + help + Select this to enable Xilinx Axi watchdog timer, which can be found on some + Xilinx Microblaze Platforms. + endmenu diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c index 2274123e4919..929c8e60d37c 100644 --- a/drivers/watchdog/xilinx_tb_wdt.c +++ b/drivers/watchdog/xilinx_tb_wdt.c @@ -1,13 +1,17 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright (c) 2011-2013 Xilinx Inc. + * Xilinx AXI platforms watchdog timer driver. + * + * Author(s): Michal Simek + * Shreenidhi Shedi + * + * Copyright (c) 2011-2018 Xilinx Inc. */ #include -#include -#include -#include -#include +#include +#include +#include #define XWT_CSR0_WRS_MASK 0x0008 /* Reset status Mask */ #define XWT_CSR0_WDS_MASK 0x0004 /* Timer state Mask */ @@ -20,49 +24,104 @@ struct watchdog_regs { u32 tbr; /* 0x8 */ }; -static struct watchdog_regs *watchdog_base = - (struct watchdog_regs *)CONFIG_WATCHDOG_BASEADDR; +struct xlnx_wdt_platdata { + bool enable_once; + struct watchdog_regs *regs; +}; -void hw_watchdog_reset(void) +static int xlnx_wdt_reset(struct udevice *dev) { u32 reg; + struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev); + + debug("%s ", __func__); /* Read the current contents of TCSR0 */ - reg = readl(&watchdog_base->twcsr0); + reg = readl(&platdata->regs->twcsr0); /* Clear the watchdog WDS bit */ if (reg & (XWT_CSR0_EWDT1_MASK | XWT_CSRX_EWDT2_MASK)) - writel(reg | XWT_CSR0_WDS_MASK, &watchdog_base->twcsr0); + writel(reg | XWT_CSR0_WDS_MASK, &platdata->regs->twcsr0); + + return 0; } -void hw_watchdog_disable(void) +static int xlnx_wdt_stop(struct udevice *dev) { u32 reg; + struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev); + + if (platdata->enable_once) { + debug("Can't stop Xilinx watchdog.\n"); + return -EBUSY; + } /* Read the current contents of TCSR0 */ - reg = readl(&watchdog_base->twcsr0); + reg = readl(&platdata->regs->twcsr0); + + writel(reg & ~XWT_CSR0_EWDT1_MASK, &platdata->regs->twcsr0); + writel(~XWT_CSRX_EWDT2_MASK, &platdata->regs->twcsr1); - writel(reg & ~XWT_CSR0_EWDT1_MASK, &watchdog_base->twcsr0); - writel(~XWT_CSRX_EWDT2_MASK, &watchdog_base->twcsr1); + debug("Watchdog disabled!\n"); - puts("Watchdog disabled!\n"); + return 0; } -static void hw_watchdog_isr(void *arg) +static int xlnx_wdt_start(struct udevice *dev, u64 timeout, ulong flags) { - hw_watchdog_reset(); + struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev); + + debug("%s:\n", __func__); + + writel((XWT_CSR0_WRS_MASK | XWT_CSR0_WDS_MASK | XWT_CSR0_EWDT1_MASK), + &platdata->regs->twcsr0); + + writel(XWT_CSRX_EWDT2_MASK, &platdata->regs->twcsr1); + + return 0; } -void hw_watchdog_init(void) +static int xlnx_wdt_probe(struct udevice *dev) { - int ret; + debug("%s: Probing wdt%u\n", __func__, dev->seq); - writel((XWT_CSR0_WRS_MASK | XWT_CSR0_WDS_MASK | XWT_CSR0_EWDT1_MASK), - &watchdog_base->twcsr0); - writel(XWT_CSRX_EWDT2_MASK, &watchdog_base->twcsr1); + return 0; +} - ret = install_interrupt_handler(CONFIG_WATCHDOG_IRQ, - hw_watchdog_isr, NULL); - if (ret) - puts("Watchdog IRQ registration failed."); +static int xlnx_wdt_ofdata_to_platdata(struct udevice *dev) +{ + struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev); + + platdata->regs = (s
Re: [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded
On 19.7.2018 09:10, Luis Araneda wrote: > A message should be displayed if an image is loaded > to an FPGA, because the hardware might have changed, > and the user should be informed > > Signed-off-by: Luis Araneda > --- > common/spl/spl_fit.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c > index 5b51a28a08..9eabb1c105 100644 > --- a/common/spl/spl_fit.c > +++ b/common/spl/spl_fit.c > @@ -412,6 +412,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, > printf("%s: Cannot load the FPGA: %i\n", __func__, ret); > return ret; > } > + puts("FPGA image loaded from FIT\n"); > node = -1; > } > #endif > Applied all. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 0/4] arm: zynq: migrate to DM I2C driver
On 9.7.2018 07:00, Luis Araneda wrote: > This series migrate most zynq boards to using the > Cadence DM I2C driver > > The first patch adds kconfig options to generalize the concept > of reading the MAC address from an I2C EEPROM. Then the zynq and > zynqmp boards were migrated with patches two and three to use > the options > > Finally, the last patch migrates the boards to the Cadence I2C driver. > The boards ZC702 and ZC706 were not migrated because they have > I2C multiplexers and I don't have a board with a multiplexer to > perform testing and validation > > I ran a round of reproducible builds on master and another one > after the third patch for all zynq and zynqmp boards, and the same > binaries where generated for all boards > > All commits were tested on a Digilent Zybo board > > Luis Araneda (4): > drivers/misc: add options to read MAC address from EEPROM > arm: zynq: migrate EEPROM MAC address options to kconfig > arm64: zynqmp: migrate EEPROM MAC address options to kconfig > arm: zynq: use i2c cadence DM driver > > arch/arm/dts/zynq-syzygy-hub.dts | 1 + > arch/arm/dts/zynq-zybo.dts| 10 ++ > board/xilinx/zynq/board.c | 27 > board/xilinx/zynqmp/zynqmp.c | 10 +++--- > configs/syzygy_hub_defconfig | 9 +++--- > configs/topic_miami_defconfig | 5 ++- > configs/topic_miamilite_defconfig | 5 ++- > configs/topic_miamiplus_defconfig | 5 ++- > configs/xilinx_zynqmp_zcu102_rev1_0_defconfig | 5 ++- > configs/xilinx_zynqmp_zcu102_revA_defconfig | 5 ++- > configs/xilinx_zynqmp_zcu102_revB_defconfig | 5 ++- > configs/xilinx_zynqmp_zcu106_revA_defconfig | 5 ++- > configs/xilinx_zynqmp_zcu111_revA_defconfig | 5 ++- > configs/zynq_zybo_defconfig | 10 +++--- > drivers/misc/Kconfig | 32 +++ > include/configs/syzygy_hub.h | 3 -- > include/configs/xilinx_zynqmp_zcu102.h| 2 -- > include/configs/xilinx_zynqmp_zcu106.h| 2 -- > include/configs/xilinx_zynqmp_zcu111.h| 2 -- > include/configs/zynq_zybo.h | 2 -- > 20 files changed, 98 insertions(+), 52 deletions(-) > Please take a look at https://lists.denx.de/pipermail/u-boot/2016-November/274068.html which was the series which should replace all these boards setting in a generic way. Unfortunately I don't know why it didn't go through. And then regarding DM i2c. Driver is in the driver for a while but for i2c muxes support it requires all subbusses to be listed in DTS file which is not what it is common in Linux dt binding. That's why some work needs to be done in this area to convert all platforms. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 6/6] ARM: uniphier: enable MTD partition and UBI
Enable "mtdparts" and "ubi" commands for uniphier_v8_defconfig to use UBI on NAND devices. Enable only "mtdparts" for uniphier_{v7,ld4_sld8}_defconfig because enabling UBI would increase 170KB, which would be memory footprint problem. Signed-off-by: Masahiro Yamada --- configs/uniphier_ld4_sld8_defconfig | 4 configs/uniphier_v7_defconfig | 4 configs/uniphier_v8_defconfig | 4 include/configs/uniphier.h | 1 + 4 files changed, 13 insertions(+) diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig index e5c1deb..225be21 100644 --- a/configs/uniphier_ld4_sld8_defconfig +++ b/configs/uniphier_ld4_sld8_defconfig @@ -31,6 +31,9 @@ CONFIG_CMD_TIME=y # CONFIG_CMD_MISC is not set CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0" +CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_NET_RANDOM_ETHADDR=y @@ -52,3 +55,4 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_PANIC_HANG=y +CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/configs/uniphier_v7_defconfig b/configs/uniphier_v7_defconfig index 89b7b4a..c54ee00 100644 --- a/configs/uniphier_v7_defconfig +++ b/configs/uniphier_v7_defconfig @@ -30,6 +30,9 @@ CONFIG_CMD_TIME=y # CONFIG_CMD_MISC is not set CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0" +CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_NET_RANDOM_ETHADDR=y @@ -53,3 +56,4 @@ CONFIG_USB_DWC3=y CONFIG_USB_DWC3_UNIPHIER=y CONFIG_USB_STORAGE=y CONFIG_PANIC_HANG=y +CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/configs/uniphier_v8_defconfig b/configs/uniphier_v8_defconfig index 93df2f6..67ebde7 100644 --- a/configs/uniphier_v8_defconfig +++ b/configs/uniphier_v8_defconfig @@ -26,6 +26,9 @@ CONFIG_CMD_TIME=y # CONFIG_CMD_MISC is not set CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0" +CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)" +CONFIG_CMD_UBI=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_GPIO_UNIPHIER=y CONFIG_MISC=y @@ -53,3 +56,4 @@ CONFIG_USB_DWC3=y CONFIG_USB_DWC3_UNIPHIER=y CONFIG_USB_STORAGE=y CONFIG_PANIC_HANG=y +CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index b631f79..49eb18f 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -26,6 +26,7 @@ /* FLASH related */ #define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS #define CONFIG_FLASH_CFI_DRIVER #define CONFIG_SYS_FLASH_CFI -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/6] fdt_support: make fdt_fixup_mtdparts() prototype more specific
The second argument of fdt_fixup_mtdparts() is an opaque pointer, 'void *node_info', hence callers can pass any pointer. Obviously, fdt_fixup_mtdparts() expects 'struct node_info *' otherwise, it crashes run-time. Change the prototype so that it is compile-time checked. Also, add 'const' qualifier to it so that callers can constify the struct node_info arrays. Signed-off-by: Masahiro Yamada --- common/fdt_support.c | 13 +++-- include/fdt_support.h | 11 --- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 812eca8..3b31f3d 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -893,9 +893,9 @@ err_prop: * * fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); */ -void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size) +void fdt_fixup_mtdparts(void *blob, const struct node_info *node_info, + int node_info_size) { - struct node_info *ni = node_info; struct mtd_device *dev; int i, idx; int noff; @@ -905,12 +905,13 @@ void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size) for (i = 0; i < node_info_size; i++) { idx = 0; - noff = fdt_node_offset_by_compatible(blob, -1, ni[i].compat); + noff = fdt_node_offset_by_compatible(blob, -1, +node_info[i].compat); while (noff != -FDT_ERR_NOTFOUND) { debug("%s: %s, mtd dev type %d\n", fdt_get_name(blob, noff, 0), - ni[i].compat, ni[i].type); - dev = device_find(ni[i].type, idx++); + node_info[i].compat, node_info[i].type); + dev = device_find(node_info[i].type, idx++); if (dev) { if (fdt_node_set_part_info(blob, noff, dev)) return; /* return on error */ @@ -918,7 +919,7 @@ void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size) /* Jump to next flash node */ noff = fdt_node_offset_by_compatible(blob, noff, -ni[i].compat); + node_info[i].compat); } } } diff --git a/include/fdt_support.h b/include/fdt_support.h index a9a0078..27fe564 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -205,11 +205,16 @@ int fdt_increase_size(void *fdt, int add_len); int fdt_fixup_nor_flash_size(void *blob); +struct node_info; #if defined(CONFIG_FDT_FIXUP_PARTITIONS) -void fdt_fixup_mtdparts(void *fdt, void *node_info, int node_info_size); +void fdt_fixup_mtdparts(void *fdt, const struct node_info *node_info, + int node_info_size); #else -static inline void fdt_fixup_mtdparts(void *fdt, void *node_info, - int node_info_size) {} +static inline void fdt_fixup_mtdparts(void *fdt, + const struct node_info *node_info, + int node_info_size) +{ +} #endif void fdt_del_node_and_alias(void *blob, const char *alias); -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 5/6] ARM: uniphier: support fdt_fixup_mtdparts
Propagate the "mtdparts" environment variable to the DT passed in to OS. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/fdt-fixup.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-uniphier/fdt-fixup.c b/arch/arm/mach-uniphier/fdt-fixup.c index 022e442..6f3c29d 100644 --- a/arch/arm/mach-uniphier/fdt-fixup.c +++ b/arch/arm/mach-uniphier/fdt-fixup.c @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include #include @@ -46,8 +48,14 @@ static int uniphier_ld20_fdt_mem_rsv(void *fdt, bd_t *bd) int ft_board_setup(void *fdt, bd_t *bd) { + static const struct node_info nodes[] = { + { "socionext,uniphier-denali-nand-v5a", MTD_DEV_TYPE_NAND }, + { "socionext,uniphier-denali-nand-v5b", MTD_DEV_TYPE_NAND }, + }; int ret; + fdt_fixup_mtdparts(fdt, nodes, ARRAY_SIZE(nodes)); + ret = uniphier_ld20_fdt_mem_rsv(fdt, bd); if (ret) return ret; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 4/6] ARM: uniphier: split ft_board_setup() out to a separate file
Prepare to add more fdt fixup code. Signed-off-by: Masahiro Yamada --- arch/arm/Kconfig | 1 + arch/arm/mach-uniphier/Kconfig | 1 - arch/arm/mach-uniphier/Makefile| 1 + arch/arm/mach-uniphier/dram_init.c | 35 arch/arm/mach-uniphier/fdt-fixup.c | 56 ++ 5 files changed, 58 insertions(+), 36 deletions(-) create mode 100644 arch/arm/mach-uniphier/fdt-fixup.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5b3746c..ebd7c9a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1221,6 +1221,7 @@ config ARCH_UNIPHIER select DM_RESET select DM_SERIAL select DM_USB + select OF_BOARD_SETUP select OF_CONTROL select OF_LIBFDT select PINCTRL diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig index 91bea77..c199374 100644 --- a/arch/arm/mach-uniphier/Kconfig +++ b/arch/arm/mach-uniphier/Kconfig @@ -68,7 +68,6 @@ config ARCH_UNIPHIER_LD11 config ARCH_UNIPHIER_LD20 bool "Enable UniPhier LD20 SoC support" depends on ARCH_UNIPHIER_V8_MULTI - select OF_BOARD_SETUP default y config ARCH_UNIPHIER_PXS3 diff --git a/arch/arm/mach-uniphier/Makefile b/arch/arm/mach-uniphier/Makefile index 269c51b..d0c39d42 100644 --- a/arch/arm/mach-uniphier/Makefile +++ b/arch/arm/mach-uniphier/Makefile @@ -21,6 +21,7 @@ endif obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc/ micro-support-card.o obj-y += pinctrl-glue.o obj-$(CONFIG_MMC) += mmc-first-dev.o +obj-y += fdt-fixup.o endif diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index 8aa3f81..7e7c1d9 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -6,8 +6,6 @@ */ #include -#include -#include #include #include #include @@ -264,36 +262,3 @@ int dram_init_banksize(void) return 0; } - -#ifdef CONFIG_OF_BOARD_SETUP -/* - * The DRAM PHY requires 64 byte scratch area in each DRAM channel - * for its dynamic PHY training feature. - */ -int ft_board_setup(void *fdt, bd_t *bd) -{ - unsigned long rsv_addr; - const unsigned long rsv_size = 64; - int i, ret; - - if (uniphier_get_soc_id() != UNIPHIER_LD20_ID) - return 0; - - for (i = 0; i < ARRAY_SIZE(bd->bi_dram); i++) { - if (!bd->bi_dram[i].size) - continue; - - rsv_addr = bd->bi_dram[i].start + bd->bi_dram[i].size; - rsv_addr -= rsv_size; - - ret = fdt_add_mem_rsv(fdt, rsv_addr, rsv_size); - if (ret) - return -ENOSPC; - - pr_notice(" Reserved memory region for DRAM PHY training: addr=%lx size=%lx\n", - rsv_addr, rsv_size); - } - - return 0; -} -#endif diff --git a/arch/arm/mach-uniphier/fdt-fixup.c b/arch/arm/mach-uniphier/fdt-fixup.c new file mode 100644 index 000..022e442 --- /dev/null +++ b/arch/arm/mach-uniphier/fdt-fixup.c @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2016-2018 Socionext Inc. + * Author: Masahiro Yamada + */ + +#include +#include +#include +#include +#include + +#include "soc-info.h" + +/* + * The DRAM PHY requires 64 byte scratch area in each DRAM channel + * for its dynamic PHY training feature. + */ +static int uniphier_ld20_fdt_mem_rsv(void *fdt, bd_t *bd) +{ + unsigned long rsv_addr; + const unsigned long rsv_size = 64; + int i, ret; + + if (!IS_ENABLED(CONFIG_ARCH_UNIPHIER_LD20) || + uniphier_get_soc_id() != UNIPHIER_LD20_ID) + return 0; + + for (i = 0; i < ARRAY_SIZE(bd->bi_dram); i++) { + if (!bd->bi_dram[i].size) + continue; + + rsv_addr = bd->bi_dram[i].start + bd->bi_dram[i].size; + rsv_addr -= rsv_size; + + ret = fdt_add_mem_rsv(fdt, rsv_addr, rsv_size); + if (ret) + return -ENOSPC; + + pr_notice(" Reserved memory region for DRAM PHY training: addr=%lx size=%lx\n", + rsv_addr, rsv_size); + } + + return 0; +} + +int ft_board_setup(void *fdt, bd_t *bd) +{ + int ret; + + ret = uniphier_ld20_fdt_mem_rsv(fdt, bd); + if (ret) + return ret; + + return 0; +} -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/6] board: constify struct node_info array
Add 'const' (also 'static' in some places) to struct node_info arrays to save memory footprint. Signed-off-by: Masahiro Yamada --- board/CarMediaLab/flea3/flea3.c | 2 +- board/compulab/cm_fx6/cm_fx6.c| 2 +- board/freescale/bsc9131rdb/bsc9131rdb.c | 2 +- board/freescale/bsc9132qds/bsc9132qds.c | 2 +- board/gateworks/gw_ventana/gw_ventana.c | 2 +- board/isee/igep003x/board.c | 2 +- board/isee/igep00x0/igep00x0.c| 2 +- board/toradex/colibri_imx7/colibri_imx7.c | 2 +- board/toradex/colibri_vf/colibri_vf.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c index c0f33b8..9eec1b7 100644 --- a/board/CarMediaLab/flea3/flea3.c +++ b/board/CarMediaLab/flea3/flea3.c @@ -205,7 +205,7 @@ u32 get_board_rev(void) */ int ft_board_setup(void *blob, bd_t *bd) { - struct node_info nodes[] = { + static const struct node_info nodes[] = { { "physmap-flash.0", MTD_DEV_TYPE_NOR, }, /* NOR flash */ { "mxc_nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */ }; diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index c114cdc..d42f57d 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -519,7 +519,7 @@ int cm_fx6_setup_ecspi(void) { return 0; } #ifdef CONFIG_OF_BOARD_SETUP #define USDHC3_PATH"/soc/aips-bus@0210/usdhc@02198000/" -struct node_info nodes[] = { +static const struct node_info nodes[] = { /* * Both entries target the same flash chip. The st,m25p compatible * is used in the vendor device trees, while upstream uses (the diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c index 367152f..9d9c83f 100644 --- a/board/freescale/bsc9131rdb/bsc9131rdb.c +++ b/board/freescale/bsc9131rdb/bsc9131rdb.c @@ -53,7 +53,7 @@ int checkboard(void) #if defined(CONFIG_OF_BOARD_SETUP) #ifdef CONFIG_FDT_FIXUP_PARTITIONS -struct node_info nodes[] = { +static const struct node_info nodes[] = { { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, }, }; #endif diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c index 6885668..36a5528 100644 --- a/board/freescale/bsc9132qds/bsc9132qds.c +++ b/board/freescale/bsc9132qds/bsc9132qds.c @@ -357,7 +357,7 @@ void fdt_del_node_compat(void *blob, const char *compatible) #if defined(CONFIG_OF_BOARD_SETUP) #ifdef CONFIG_FDT_FIXUP_PARTITIONS -struct node_info nodes[] = { +static const struct node_info nodes[] = { { "cfi-flash", MTD_DEV_TYPE_NOR, }, { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, }, }; diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index b86924e..c4ec974 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -1114,7 +1114,7 @@ int ft_board_setup(void *blob, bd_t *bd) { struct ventana_board_info *info = &ventana_info; struct ventana_eeprom_config *cfg; - struct node_info nodes[] = { + static const struct node_info nodes[] = { { "sst,w25q256", MTD_DEV_TYPE_NOR, }, /* SPI flash */ { "fsl,imx6q-gpmi-nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */ }; diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c index cc55bcc..965a009 100644 --- a/board/isee/igep003x/board.c +++ b/board/isee/igep003x/board.c @@ -211,7 +211,7 @@ int board_late_init(void) int ft_board_setup(void *blob, bd_t *bd) { #ifdef CONFIG_FDT_FIXUP_PARTITIONS - static struct node_info nodes[] = { + static const struct node_info nodes[] = { { "ti,omap2-nand", MTD_DEV_TYPE_NAND, }, }; diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index 45a414c..367af82 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -157,7 +157,7 @@ static int ft_enable_by_compatible(void *blob, char *compat, int enable) int ft_board_setup(void *blob, bd_t *bd) { #ifdef CONFIG_FDT_FIXUP_PARTITIONS - static struct node_info nodes[] = { + static const struct node_info nodes[] = { { "ti,omap2-nand", MTD_DEV_TYPE_NAND, }, { "ti,omap2-onenand", MTD_DEV_TYPE_ONENAND, }, }; diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index cd98ec8..c05ca0c 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -408,7 +408,7 @@ int checkboard(void) int ft_board_setup(void *blob, bd_t *bd) { #if defined(CONFIG_FDT_FIXUP_PARTITIONS) - static struct node_info nodes[] = { + static const struct node_info nodes[] = { { "fsl,imx7d-gpmi-nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */
[U-Boot] [PATCH 3/6] ARM: uniphier: clean-up ft_board_setup()
The 'bd' is passed in ft_board_setup() as the second argument. Replace 'gd->bd' with 'bd'. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/dram_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index 2eb4836..8aa3f81 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -279,11 +279,11 @@ int ft_board_setup(void *fdt, bd_t *bd) if (uniphier_get_soc_id() != UNIPHIER_LD20_ID) return 0; - for (i = 0; i < ARRAY_SIZE(gd->bd->bi_dram); i++) { - if (!gd->bd->bi_dram[i].size) + for (i = 0; i < ARRAY_SIZE(bd->bi_dram); i++) { + if (!bd->bi_dram[i].size) continue; - rsv_addr = gd->bd->bi_dram[i].start + gd->bd->bi_dram[i].size; + rsv_addr = bd->bi_dram[i].start + bd->bi_dram[i].size; rsv_addr -= rsv_size; ret = fdt_add_mem_rsv(fdt, rsv_addr, rsv_size); -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] omap3: beagle: re-enable EFI support after the following commit removed it by mistake:
Hi Derald, Le 19/07/2018 à 01:47, Derald D. Woods a écrit : On Wed, Jul 18, 2018 at 09:38:44PM +0200, Guillaume GARDET wrote: commit d233ccb1d84b901f7e23e6d9b4f2c6a57198b23b ARM: omap3: beagle: Enable DM_SERIAL, update distro usage and NAND layout I have found no compile or runtime issues, on my BeagleBoard Rev. C4 or xM, with the current default configuration. At least, for my non-EFI boot environment. It is related to EFI options since I use GPT partitions (and EFI/Grub2 to boot). That is why you did not find anything. The following items are brought in from the EFI config additions: +CONFIG_SMBIOS_PRODUCT_NAME="beagle" +CONFIG_CMD_BOOTEFI=y +CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y +CONFIG_EFI_PARTITION=y +CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=128 +CONFIG_EFI_PARTITION_ENTRIES_OFF=0 +CONFIG_SPL_EFI_PARTITION=y +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_GENERATE_SMBIOS_TABLE=y +CONFIG_SMBIOS_MANUFACTURER="ti" +CONFIG_EFI_LOADER=y I would change the commit message though. It was not a mistake. It was removed to provide a minimal set of configuration options for the base BSP type of setup. Using EFI is a choice. In fact, I tested my changes on 3 different OMAP3 boards. So there has been no period of not working in the basic board configuration. Provably. So if EFI is required, even though one may not use it, this is a don't care for me. My boards boot just fine without EFI. The thing is you introduced a regression with your commit, since EFI was supported previously. And you did not explicitly stated that you disabled it on purpose. So, it sounds like a mistake to me. If you don't care about EFI, it is your choice, but please do not break setup of others. A use case is openSUSE which relies on EFI/Grub2 to boot. Please note that EFI is now a default feature in U-Boot, so, please, let it enabled. Guillaume Derald Signed-off-by: Guillaume GARDET Cc: Derald D. Woods Cc: Tom Rini --- configs/omap3_beagle_defconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig index a37a38f881..1e1a391d7f 100644 --- a/configs/omap3_beagle_defconfig +++ b/configs/omap3_beagle_defconfig @@ -32,8 +32,6 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0" CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(spl),1920k(u-boot),128k(u-boot-env),128k(dtb),6m(kernel),-(rootfs)" CONFIG_CMD_UBI=y # CONFIG_ISO_PARTITION is not set -# CONFIG_EFI_PARTITION is not set -CONFIG_SPL_PARTITION_UUIDS=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y CONFIG_SPL_DM=y @@ -79,4 +77,3 @@ CONFIG_USB_ETHER_SMSC95XX=y CONFIG_FAT_WRITE=y CONFIG_BCH=y CONFIG_SPL_OF_LIBFDT=y -# CONFIG_EFI_LOADER is not set -- 2.18.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: zynq: Setup ENV_SIZE via Kconfig
On 18.7.2018 13:01, Michal Simek wrote: > Simplify zynq_cse config by setting up ENV_SIZE via Kconfig. > > Signed-off-by: Michal Simek > --- > > Based on: > https://lists.denx.de/pipermail/u-boot/2018-July/335126.html > > --- > configs/zynq_cse_nand_defconfig | 1 + > configs/zynq_cse_nor_defconfig | 1 + > configs/zynq_cse_qspi_defconfig | 1 + > include/configs/zynq_cse.h | 2 -- > 4 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/configs/zynq_cse_nand_defconfig b/configs/zynq_cse_nand_defconfig > index dcd4eda3ca3a..eb7e574040af 100644 > --- a/configs/zynq_cse_nand_defconfig > +++ b/configs/zynq_cse_nand_defconfig > @@ -2,6 +2,7 @@ CONFIG_ARM=y > CONFIG_SYS_CONFIG_NAME="zynq_cse" > CONFIG_ARCH_ZYNQ=y > CONFIG_SYS_TEXT_BASE=0x10 > +CONFIG_ENV_SIZE=0x190 > CONFIG_SPL=y > CONFIG_SPL_STACK_R_ADDR=0x20 > CONFIG_DEFAULT_DEVICE_TREE="zynq-cse-nand" > diff --git a/configs/zynq_cse_nor_defconfig b/configs/zynq_cse_nor_defconfig > index 9e2546b19785..95b31a0be66f 100644 > --- a/configs/zynq_cse_nor_defconfig > +++ b/configs/zynq_cse_nor_defconfig > @@ -2,6 +2,7 @@ CONFIG_ARM=y > CONFIG_SYS_CONFIG_NAME="zynq_cse" > CONFIG_ARCH_ZYNQ=y > CONFIG_SYS_TEXT_BASE=0xFFFC > +CONFIG_ENV_SIZE=0x190 > CONFIG_SPL=y > CONFIG_SPL_STACK_R_ADDR=0x20 > CONFIG_DEFAULT_DEVICE_TREE="zynq-cse-nor" > diff --git a/configs/zynq_cse_qspi_defconfig b/configs/zynq_cse_qspi_defconfig > index df6ebdc03a28..c094a5e7de48 100644 > --- a/configs/zynq_cse_qspi_defconfig > +++ b/configs/zynq_cse_qspi_defconfig > @@ -2,6 +2,7 @@ CONFIG_ARM=y > CONFIG_SYS_CONFIG_NAME="zynq_cse" > CONFIG_ARCH_ZYNQ=y > CONFIG_SYS_TEXT_BASE=0xFFFC > +CONFIG_ENV_SIZE=0x190 > CONFIG_SPL=y > CONFIG_DEBUG_UART_BASE=0x0 > CONFIG_DEBUG_UART_CLOCK=0 > diff --git a/include/configs/zynq_cse.h b/include/configs/zynq_cse.h > index adc02f0a4a3b..36fbe0eb5e2d 100644 > --- a/include/configs/zynq_cse.h > +++ b/include/configs/zynq_cse.h > @@ -18,7 +18,6 @@ > /* Undef unneeded configs */ > #undef CONFIG_EXTRA_ENV_SETTINGS > #undef CONFIG_BOARD_LATE_INIT > -#undef CONFIG_ENV_SIZE > #undef CONFIG_ZLIB > #undef CONFIG_GZIP > > @@ -28,7 +27,6 @@ > > #define CONFIG_SYS_CBSIZE1024 > > -#define CONFIG_ENV_SIZE 400 > #undef CONFIG_SYS_INIT_RAM_ADDR > #undef CONFIG_SYS_INIT_RAM_SIZE > #define CONFIG_SYS_INIT_RAM_ADDR 0xFFFDE000 > Applied. M -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] x86: acpi: Move APIs unrelated to ACPI tables generation to a separate library
On Wed, 2018-07-18 at 21:42 -0700, Bin Meng wrote: > acpi_find_fadt(), acpi_find_wakeup_vector() and enter_acpi_mode() > are something unrelated to ACPI tables generation. Move these to > a separate library. > > This also fixes several style issues reported by checkpatch in the > original codes. > Hi! Is it possible to have some test branch under your tree to try? > Signed-off-by: Bin Meng > --- > > Changes in v2: None > > arch/x86/cpu/cpu.c| 1 + > arch/x86/include/asm/acpi.h | 41 +++ > arch/x86/include/asm/acpi_table.h | 28 -- > arch/x86/lib/Makefile | 1 + > arch/x86/lib/acpi.c | 108 > ++ > arch/x86/lib/acpi_s3.c| 1 + > arch/x86/lib/acpi_table.c | 101 +-- > > 7 files changed, 153 insertions(+), 128 deletions(-) > create mode 100644 arch/x86/include/asm/acpi.h > create mode 100644 arch/x86/lib/acpi.c > > diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c > index 6aefa12..f7601b3 100644 > --- a/arch/x86/cpu/cpu.c > +++ b/arch/x86/cpu/cpu.c > @@ -24,6 +24,7 @@ > #include > #include > #include > +#include > #include > #include > #include > diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h > new file mode 100644 > index 000..4475d04 > --- /dev/null > +++ b/arch/x86/include/asm/acpi.h > @@ -0,0 +1,41 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > +/* > + * Copyright (C) 2018, Bin Meng > + */ > + > +#ifndef __ASM_ACPI_H__ > +#define __ASM_ACPI_H__ > + > +struct acpi_fadt; > + > +/** > + * acpi_find_fadt() - find ACPI FADT table in the system memory > + * > + * This routine parses the ACPI table to locate the ACPI FADT table. > + * > + * @return: a pointer to the ACPI FADT table in the system > memory > + */ > +struct acpi_fadt *acpi_find_fadt(void); > + > +/** > + * acpi_find_wakeup_vector() - find OS installed wake up vector > address > + * > + * This routine parses the ACPI table to locate the wake up vector > installed > + * by the OS previously. > + * > + * @fadt:a pointer to the ACPI FADT table in the system > memory > + * @return: wake up vector address installed by the OS > + */ > +void *acpi_find_wakeup_vector(struct acpi_fadt *fadt); > + > +/** > + * enter_acpi_mode() - enter into ACPI mode > + * > + * This programs the ACPI-defined PM1_CNT register to enable SCI > interrupt > + * so that the whole system swiches to ACPI mode. > + * > + * @pm1_cnt: PM1_CNT register I/O address > + */ > +void enter_acpi_mode(int pm1_cnt); > + > +#endif /* __ASM_ACPI_H__ */ > diff --git a/arch/x86/include/asm/acpi_table.h > b/arch/x86/include/asm/acpi_table.h > index 239bcdc..dd516df 100644 > --- a/arch/x86/include/asm/acpi_table.h > +++ b/arch/x86/include/asm/acpi_table.h > @@ -317,15 +317,6 @@ int acpi_create_mcfg_mmconfig(struct > acpi_mcfg_mmconfig *mmconfig, u32 base, > u16 seg_nr, u8 start, u8 end); > u32 acpi_fill_mcfg(u32 current); > void acpi_create_gnvs(struct acpi_global_nvs *gnvs); > -/** > - * enter_acpi_mode() - enter into ACPI mode > - * > - * This programs the ACPI-defined PM1_CNT register to enable SCI > interrupt > - * so that the whole system swiches to ACPI mode. > - * > - * @pm1_cnt: PM1_CNT register I/O address > - */ > -void enter_acpi_mode(int pm1_cnt); > ulong write_acpi_tables(ulong start); > > /** > @@ -336,22 +327,3 @@ ulong write_acpi_tables(ulong start); > * @return: ACPI RSDP table address > */ > ulong acpi_get_rsdp_addr(void); > - > -/** > - * acpi_find_fadt() - find ACPI FADT table in the sytem memory > - * > - * This routine parses the ACPI table to locate the ACPI FADT table. > - * > - * @return: a pointer to the ACPI FADT table in the system > memory > - */ > -struct acpi_fadt *acpi_find_fadt(void); > - > -/** > - * acpi_find_wakeup_vector() - find OS installed wake up vector > address > - * > - * This routine parses the ACPI table to locate the wake up vector > installed > - * by the OS previously. > - * > - * @return: wake up vector address installed by the OS > - */ > -void *acpi_find_wakeup_vector(struct acpi_fadt *); > diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile > index ba07ac7..1e8efcc 100644 > --- a/arch/x86/lib/Makefile > +++ b/arch/x86/lib/Makefile > @@ -33,6 +33,7 @@ obj-$(CONFIG_INTEL_MID) += scu.o > obj-y+= sections.o > obj-y += sfi.o > obj-y+= string.o > +obj-y+= acpi.o > obj-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.o > ifndef CONFIG_QEMU > obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o > diff --git a/arch/x86/lib/acpi.c b/arch/x86/lib/acpi.c > new file mode 100644 > index 000..cba9c24 > --- /dev/null > +++ b/arch/x86/lib/acpi.c > @@ -0,0 +1,108 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright (C) 2018, Bin Meng > + */ > + > +#include > +#include > +#include > +#include > + > +static struct acpi_rsdp *acpi_valid_rsdp(struct acpi_rsdp *
Re: [U-Boot] [PATCH v2 1/3] x86: acpi: Move APIs unrelated to ACPI tables generation to a separate library
Hi Andy, On Thu, Jul 19, 2018 at 4:30 PM, Andy Shevchenko wrote: > On Wed, 2018-07-18 at 21:42 -0700, Bin Meng wrote: >> acpi_find_fadt(), acpi_find_wakeup_vector() and enter_acpi_mode() >> are something unrelated to ACPI tables generation. Move these to >> a separate library. >> >> This also fixes several style issues reported by checkpatch in the >> original codes. >> > > Hi! > > Is it possible to have some test branch under your tree to try? > Yes, it's already on u-boot-x86/acpi branch. Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] spl: fpga: Implement fpga bistream loading with fpga_load
On 07/19/2018 08:44 AM, Michal Simek wrote: > On 19.7.2018 08:36, Luis Araneda wrote: >> Hi, >> >> On Thu, Jul 19, 2018 at 1:58 AM Michal Simek wrote: >>> On 18.7.2018 22:11, Marek Vasut wrote: On 07/18/2018 04:57 PM, Michal Simek wrote: > On 18.7.2018 16:24, Marek Vasut wrote: >> On 07/18/2018 04:18 PM, Michal Simek wrote: >>> On 18.7.2018 16:15, Marek Vasut wrote: On 07/18/2018 04:00 PM, Michal Simek wrote: > On 18.7.2018 14:54, Marek Vasut wrote: >> This breaks Arria10, sorry. The private loading function is needed on >> Arria10 as the whole bitstream is not available in RAM and needs to >> be >> loaded piece by piece, see [1] >> >> [1] >> http://git.denx.de/?p=u-boot/u-boot-socfpga.git;a=blobdiff;f=arch/arm/mach-socfpga/spl.c;h=82adb5dfb8de62e3d928f6f4405705f3f32a780c;hp=7ee988a2d59831ec6bff927b2a5fdad7f57da055;hb=21f835ebf2b40fc8a3e8b818c5c5ba2555dd7c65;hpb=bd198801cb95b5a8460c95a762cc4a9a44ca85ef >> >> [...] > The second solution is to check if load address is not 0 and call > fpga_load only for that. In this case there is a need to check size > for SPL. 0 is a valid load address, so no. >>> >>> Then new Kconfig option is another way to go now. >> >> No, the firmware loader is a way to go. Sadly, it's still work in >> progress. > > I have looked at that series and it will take some time to get it done > but even that series has no user and also only support filesystems. > Which is fine but not enough and support for RAW mode is necessary too. It already took like a year and half I think ... well, better invest your resources in perfecting it for your usecase, for that's the way to go. >>> >>> I don't think so because for SPL boot we need support for a RAW mode. >>> > Anyway Luis sent series where this SPL fpga supported is requested to > add and I had this functionality in more raw state in Xilinx tree for > quite a long time and it is time to support it because on Zybo (because > of i2c eeprom) and also cc108 (because of uart routing via PL) fpga load > needs to be done in SPL and we need that support. Ha > I have not a problem to keep your code in SPL but I need a way to enable > fpga load directly with all that features like hashes which are already > available. GZIP can be added pretty easily too. > That's why please suggest a way what you are comfortable with not to > block functionality on these devices. Look at the A10 nand branch, it uses full fit with all the bells and whistles. Maybe that's the way to go if you have DRAM available. >>> >>> Enabling full fit should be possible but there is really no need to >>> enable more and more features for load something to fpga. SPL still >>> needs to fit to small space. >> >> I tested Michal's patch by replacing the fourth patch of my series [1] >> with his patch, and it worked fine on a Zybo Z7-20. I think that for >> devices with DRAM available is the way to go, but as Marek said, it >> will brake Arria10. > > It doesn't break anything in mainline because there is no support for > Arria10. You might want to git grep a bit ? > His patch for this interface shouldn't reach mainline like it > is normal style in Linux. No user, no interface. Also if there is > interface already but no user then interfaces are removed like happened > with SG_DMA. Uhh, that's some strong wording right there. We have many other __weak functions in U-Boot which are probably never implemented either. Why don't you clean those up too instead of focusing on one which enables competing platform to work and is protected by Kconfig option, so it doesn't change anything for the other platforms ? >> I'd like to see the functionality merged, but waiting to firmware >> loader might delay it. So I propose the following: >> - Keep the spl_load_fpga_image() function for devices >> like the Arria10. >> - Apply the first three patches of my series [1], >> as they fix FPGA (Zynq) support on SPL. > > They are fine please send me as regular patches and I will take them. > >> - Apply a modified version of Michal's patch, adding >> a temporary Kconfig option, like he suggested, >> to choose between the two implementations: >> fpga_load() for devices with DRAM available, and >> spl_load_fpga_image() for devices like the Arria10. >> - Once firmware loader is ready, convert the code to >> use it and unify the functions if possible. > > Let's continue to talk with Marek on this. If there he is not open to > better solution we need to create new Kconfig property to cover it. Like CONFIG_SPL_FPGA_SUPPORT ? -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] spl: fpga: Implement fpga bistream loading with fpga_load
On 07/19/2018 07:57 AM, Michal Simek wrote: > On 18.7.2018 22:11, Marek Vasut wrote: >> On 07/18/2018 04:57 PM, Michal Simek wrote: >>> On 18.7.2018 16:24, Marek Vasut wrote: On 07/18/2018 04:18 PM, Michal Simek wrote: > On 18.7.2018 16:15, Marek Vasut wrote: >> On 07/18/2018 04:00 PM, Michal Simek wrote: >>> On 18.7.2018 14:54, Marek Vasut wrote: On 07/18/2018 02:51 PM, Michal Simek wrote: > There shouldn't be a need to call private spl_load_fpga_image() > because the whole sequence should be already handled by fpga_load(). > The patch let spl_load_fit_image() to load data to right location > based > on "load" property in FIT and then call fpga_load(). NAK This breaks Arria10, sorry. The private loading function is needed on Arria10 as the whole bitstream is not available in RAM and needs to be loaded piece by piece, see [1] [1] http://git.denx.de/?p=u-boot/u-boot-socfpga.git;a=blobdiff;f=arch/arm/mach-socfpga/spl.c;h=82adb5dfb8de62e3d928f6f4405705f3f32a780c;hp=7ee988a2d59831ec6bff927b2a5fdad7f57da055;hb=21f835ebf2b40fc8a3e8b818c5c5ba2555dd7c65;hpb=bd198801cb95b5a8460c95a762cc4a9a44ca85ef [...] >>> The second solution is to check if load address is not 0 and call >>> fpga_load only for that. In this case there is a need to check size for >>> SPL. >> >> 0 is a valid load address, so no. > > Then new Kconfig option is another way to go now. No, the firmware loader is a way to go. Sadly, it's still work in progress. >>> >>> I have looked at that series and it will take some time to get it done >>> but even that series has no user and also only support filesystems. >>> Which is fine but not enough and support for RAW mode is necessary too. >> >> It already took like a year and half I think ... well, better invest >> your resources in perfecting it for your usecase, for that's the way to go. > > I don't think so because for SPL boot we need support for a RAW mode. > >> >>> Anyway Luis sent series where this SPL fpga supported is requested to >>> add and I had this functionality in more raw state in Xilinx tree for >>> quite a long time and it is time to support it because on Zybo (because >>> of i2c eeprom) and also cc108 (because of uart routing via PL) fpga load >>> needs to be done in SPL and we need that support. >> >> Ha >> >>> I have not a problem to keep your code in SPL but I need a way to enable >>> fpga load directly with all that features like hashes which are already >>> available. GZIP can be added pretty easily too. >>> That's why please suggest a way what you are comfortable with not to >>> block functionality on these devices. >> >> Look at the A10 nand branch, it uses full fit with all the bells and >> whistles. Maybe that's the way to go if you have DRAM available. > > Enabling full fit should be possible but there is really no need to > enable more and more features for load something to fpga. SPL still > needs to fit to small space. Bitrot protection is always a good idea when loading from raw storage. -- 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 1/3] x86: acpi: Move APIs unrelated to ACPI tables generation to a separate library
On Thu, 2018-07-19 at 16:36 +0800, Bin Meng wrote: > Hi Andy, > > On Thu, Jul 19, 2018 at 4:30 PM, Andy Shevchenko > wrote: > > On Wed, 2018-07-18 at 21:42 -0700, Bin Meng wrote: > > > acpi_find_fadt(), acpi_find_wakeup_vector() and enter_acpi_mode() > > > are something unrelated to ACPI tables generation. Move these to > > > a separate library. > > > > > > This also fixes several style issues reported by checkpatch in the > > > original codes. > > > > > > > Hi! > > > > Is it possible to have some test branch under your tree to try? > > > > Yes, it's already on u-boot-x86/acpi branch. I have tested this on my environment and everything looks fine, thus Tested-by: Andy Shevchenko For ACPI bits in u-boot-x86/acpi branch for today. -- Andy Shevchenko Intel Finland Oy ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Issue with fat16 format
Hi Heinrich/Rob, Do we have any update on this issue. Thanks, Siva > -Original Message- > From: Vipul Kumar > Sent: Monday, June 18, 2018 10:35 AM > To: Heinrich Schuchardt ; u-boot@lists.denx.de > Cc: Michal Simek ; Siva Durga Prasad Paladugu > ; Rob Clark ; Łukasz Majewski > ; Simon Glass > Subject: RE: [U-Boot] Issue with fat16 format > > Hi Heinrich, > > > -Original Message- > > From: Heinrich Schuchardt [mailto:xypron.deb...@gmx.de] > > Sent: Sunday, June 17, 2018 1:07 AM > > To: Vipul Kumar ; u-boot@lists.denx.de > > Cc: Michal Simek ; Siva Durga Prasad Paladugu > > ; Rob Clark ; Łukasz > Majewski > > ; Simon Glass > > Subject: Re: [U-Boot] Issue with fat16 format > > > > On 06/15/2018 08:37 AM, Vipul Kumar wrote: > > > Hi, > > > > > > After formatting SD card in fat16 format in windows, we are facing > > > issue. I > > used git bisect and came to know that this issue is due to > > 8eafae209c35932d9a6560809c55ee4641534236 commit. > > > > > > When we use "gparted" utility for formatting SD card in fat16 in > > > linux, it > > works fine. > > > > > > Please give your comments on this issue and point out what's causing > > > this > > issue. > > > > > > Regards, > > > Vipul Kumar > > > > > > > > > > Hello Vipul, > > > > >> we are facing issue > > could you, please, indicate what issue you face. Please, also tell > > which configuration file you are using. > > Configuration file: zynq_zc702_defconfig > > Issue: We are using BOOT.BIN and fit image (Kernel image + dtb + rootfs) to > boot the board. Board is booting till u-boot successfully but when it goes to > read image.ub for further booting, it gives below message: > > ERROR: > Hit any key to stop autoboot: 0 > Copying FIT from SD to RAM... > ** Unable to read file image.ub ** > > After this, I run the fatls command and it seems that it removed both > BOOT.BIN and image.ub files. > > Zynq> mmc info > Device: sdhci@e010 > Manufacturer ID: 27 > OEM: 5048 > Name: SD04G > Bus Speed: 5000 > Mode : SD High Speed (50MHz) > Rd Block Len: 512 > SD version 3.0 > High Capacity: Yes > Capacity: 3.7 GiB > Bus Width: 4-bit > Erase Group Size: 512 Bytes > > Zynq> fatls mmc 0:1 > > 0 file(s), 0 dir(s) > > Zynq> > > > Regards, > Vipul > > > > As you are complaining about Rob's patch I put him and the reviewers > > of the patch on CC. > > > > Best regards > > > > Heinrich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 00/20] Add support for 1wire protocol and 1wire eeproms
This is a patch series originally written by Maxime Ripard, https://lists.denx.de/pipermail/u-boot/2016-November/272138.html titled: [U-Boot] [PATCH RESEND 0/9] sunxi: chip: Enable the DIP auto-detection and reworked to include support for the EEPROMs on the PDAs connected to the sama xplained boards. The patch series adds first a driver for onewire uclass, and onewire over gpio bitbanging driver. Then it adds a uclass for onewire EEPROMS, and specific driver for Maxim EEPROMs. I have added some sandbox support, configuration and device tree for it and for boards sama5d2_xplained and sama5d3_xplained. Also added common code for PDA detection, as the memory on the PDAs is connected to the SoC on the onewire bus. Thanks to everyone for the review and feedback. Below is a short summary of the commits: The series adds a w1-uclass driver for the onewire interface u-class. This is done in patch: [PATCH 01/20] w1: Add 1-Wire uclass Also, we add a driver for the w1-uclass specific to the onewire over bitbanged gpio, this is done in patch: [PATCH 02/20] w1: Add 1-Wire gpio driver Add the bindings documentation in: [PATCH 03/20] dt-bindings: W1: w1-gpio: added bindings for w1-gpio A uclass driver is added for one wire eeproms, in patch : [PATCH 04/20] W1-EEPROM: Add an W1-EEPROM uclass for 1 wire EEPROMs Specific driver for the DS24 Maxim EEPROMs is added in the patch: [PATCH 05/20] W1-EEPROM: add support for Maxim DS24 eeprom families A sandbox driver for a onewire EEPROM is added in patch: [PATCH 06/20] W1-EEPROM: add sandbox driver A command is added for the onewire protocol in patch: [PATCH 07/20] w1: add command for onewire protocol Pinctrl driver for sandbox was updated to add a new group and function for w1: [PATCH 08/20] pinctrl: sandbox: add gpio onewire w1 group Add a node in sandbox DT to have a test node for sandbox. [PATCH 09/20] sandbox: DTS: w1: add node for one wire interface on GPIO The defconfig for sandbox is updated to include the drivers: [PATCH 10/20] configs: sandbox: add onewire w1 and sandbox eeprom Modify the w1 class driver to add a sandbox device if sandbox is configured: [PATCH 11/20] w1: enumerate sandbox driver if configured Configuration for sama5d2 xplained is updated in patch: [PATCH 12/20] configs: sama5d2_xplained: add onewire and eeprom Configuration for sama5d3 xplained is updated in patch: [PATCH 13/20] configs: sama5d3_xplained: add onewire and eeprom Pda detection is added in the common part for atmel boards: [PATCH 14/20] board: atmel: add support for pda detection Specifically add it for Sama5d2 xplained board in patch: [PATCH 15/20] board: sama5d2_xplained: add pda detect call at init time Specifically add it for Sama5d3 xplained board in patch: [PATCH 16/20] board: sama5d3_xplained: add pda detect call at init time Add support for overlays for sama5d2 xplained config in patch: [PATCH 17/20] configs: sama5d2_xplained: add fdt overlay support Add support for overlays for sama5d3 xplained config in patch: [PATCH 18/20] configs: sama5d3_xplained: add fdt overlay support The DT for the SAMA5D2 Soc and xplained is updated to include a onewire node. This is done in patch: [PATCH 19/20] ARM: dts: at91: sama5d2_xplained: add onewire connector The DT for the SAMA5D3 Soc and xplained is updated to include a onewire node. This is done in patch: [PATCH 20/20] ARM: dts: at91: sama5d3_xplained: add onewire connector Eugen Hristev (16): dt-bindings: W1: w1-gpio: added bindings for w1-gpio W1-EEPROM: add sandbox driver w1: add command for onewire protocol pinctrl: sandbox: add gpio onewire w1 group sandbox: DTS: w1: add node for one wire interface on GPIO configs: sandbox: add onewire w1 and sandbox eeprom w1: enumerate sandbox driver if configured configs: sama5d2_xplained: add onewire and eeprom drivers configs: sama5d3_xplained: add onewire and eeprom drivers board: atmel: add support for pda detection board: sama5d2_xplained: add pda detect call at init time board: sama5d3_xplained: add pda detect call at init time configs: sama5d2_xplained: add fdt overlay support configs: sama5d3_xplained: add fdt overlay support ARM: dts: at91: sama5d2_xplained: add onewire connector for LCD eeprom ARM: dts: at91: sama5d3_xplained: add onewire connector for LCD eeprom Maxime Ripard (4): w1: Add 1-Wire uclass w1: Add 1-Wire gpio driver W1-EEPROM: Add an W1-EEPROM uclass for 1 wire EEPROMs W1-EEPROM: add support for Maxim DS24 eeprom families arch/arm/dts/at91-sama5d2_xplained.dts | 12 ++ arch/arm/dts/at91-sama5d3_xplained.dts | 12 ++ arch/arm/dts/sama5d2.dtsi | 6 + arch/arm/dts/sama5d3.dtsi | 6 + arch/arm/mach-at91/Kconfig | 1 + arch/sandbox/dts/sandbox.dts| 15 ++ board/atmel/common/board.c | 55 + board/atmel/sama5d2_xplained/sama5d2_xplained.c | 3 + board/atmel/sama5d3_xplained/s
[U-Boot] [PATCH 01/20] w1: Add 1-Wire uclass
From: Maxime Ripard We might want to use 1-Wire devices connected on boards such as EEPROMs in U-Boot. Provide a framework to be able to do that. Signed-off-by: Maxime Ripard [eugen.hris...@microchip.com: fixed small issues and rebased] Signed-off-by: Eugen Hristev --- drivers/Kconfig| 2 + drivers/Makefile | 1 + drivers/w1/Kconfig | 18 drivers/w1/Makefile| 1 + drivers/w1/w1-uclass.c | 268 + include/dm/uclass-id.h | 1 + include/w1.h | 48 + 7 files changed, 339 insertions(+) create mode 04 drivers/w1 create mode 100644 drivers/w1/Kconfig create mode 100644 drivers/w1/Makefile create mode 100644 drivers/w1/w1-uclass.c create mode 100644 include/w1.h diff --git a/drivers/Kconfig b/drivers/Kconfig index 9e21b28..2cae829 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -102,6 +102,8 @@ source "drivers/usb/Kconfig" source "drivers/video/Kconfig" +source "drivers/w1/Kconfig" + source "drivers/watchdog/Kconfig" config PHYS_TO_BUS diff --git a/drivers/Makefile b/drivers/Makefile index a213ea9..728380b 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -101,6 +101,7 @@ obj-y += input/ obj-y += soc/ obj-$(CONFIG_REMOTEPROC) += remoteproc/ obj-y += thermal/ +obj-$(CONFIG_W1) += w1/ obj-$(CONFIG_MACH_PIC32) += ddr/microchip/ endif diff --git a/drivers/w1/Kconfig b/drivers/w1/Kconfig new file mode 100644 index 000..64b27c6 --- /dev/null +++ b/drivers/w1/Kconfig @@ -0,0 +1,18 @@ +# +# W1 subsystem configuration +# + +menu "1-Wire support" + +config W1 + bool "Enable 1-wire controllers support" + default no + depends on DM + help + Support for the Dallas 1-Wire bus. + +if W1 + +endif + +endmenu diff --git a/drivers/w1/Makefile b/drivers/w1/Makefile new file mode 100644 index 000..f81693b --- /dev/null +++ b/drivers/w1/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_W1) += w1-uclass.o diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c new file mode 100644 index 000..cfddda3 --- /dev/null +++ b/drivers/w1/w1-uclass.c @@ -0,0 +1,268 @@ +/* SPDX-License-Identifier:GPL-2.0+ + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co. + * + * Maxime Ripard + * + */ + +#include +#include +#include + +#include + +#define W1_MATCH_ROM 0x55 +#define W1_SKIP_ROM0xcc +#define W1_SEARCH 0xf0 + +int w1_init(void); + +struct w1_bus { + u64 search_id; +}; + +struct w1_device { + u64 id; +}; + +static int w1_new_device(struct udevice *bus, u64 id) +{ + struct w1_driver_entry *start, *entry; + int n_ents, ret = -ENODEV; + u8 family = id & 0xff; + + debug("%s: Detected new device 0x%llx (family 0x%x)\n", + bus->name, id, family); + + start = ll_entry_start(struct w1_driver_entry, w1_driver_entry); + n_ents = ll_entry_count(struct w1_driver_entry, w1_driver_entry); + + for (entry = start; entry != start + n_ents; entry++) { + const struct driver *drv; + struct w1_device *w1; + struct udevice *dev; + + if (entry->family != family) + continue; + + drv = entry->driver; + ret = device_bind(bus, drv, drv->name, NULL, -1, + &dev); + if (ret) + goto error; + + debug("%s: Match found: %s\n", __func__, drv->name); + + w1 = dev_get_parent_platdata(dev); + w1->id = id; + + return 0; + } + +error: + debug("%s: No matches found: error %d\n", __func__, ret); + return ret; +} + +static int w1_enumerate(struct udevice *bus) +{ + const struct w1_ops *ops = device_get_ops(bus); + struct w1_bus *w1 = dev_get_uclass_priv(bus); + u64 last_rn, rn = w1->search_id, tmp64; + bool last_device = false; + int search_bit, desc_bit = 64; + int last_zero = -1; + u8 triplet_ret = 0; + int i; + + if (!ops->reset || !ops->write_byte || !ops->triplet) + return -ENOSYS; + + while (!last_device) { + last_rn = rn; + rn = 0; + + /* +* Reset bus and all 1-wire device state machines +* so they can respond to our requests. +* +* Return 0 - device(s) present, 1 - no devices present. +*/ + if (ops->reset(bus)) { + debug("%s: No devices present on the wire.\n", + __func__); + break; + } + + /* Start the search */ + ops->write_byte(bus, W1_SEARCH); + for (i = 0; i < 64; ++i) { + /* Determine the direction/search bit */ + if (i == desc_bit) +
[U-Boot] [PATCH 02/20] w1: Add 1-Wire gpio driver
From: Maxime Ripard Add a bus driver for bitbanging a 1-Wire bus over a GPIO. Signed-off-by: Maxime Ripard [eugen.hris...@microchip.com: addressed review comments] Signed-off-by: Eugen Hristev --- drivers/w1/Kconfig | 7 +++ drivers/w1/Makefile | 2 + drivers/w1/w1-gpio.c | 158 +++ 3 files changed, 167 insertions(+) create mode 100644 drivers/w1/w1-gpio.c diff --git a/drivers/w1/Kconfig b/drivers/w1/Kconfig index 64b27c6..d6e0457 100644 --- a/drivers/w1/Kconfig +++ b/drivers/w1/Kconfig @@ -13,6 +13,13 @@ config W1 if W1 +config W1_GPIO + bool "Enable 1-wire GPIO bitbanging" + default no + depends on DM_GPIO + help + Emulate a 1-wire bus using a GPIO. + endif endmenu diff --git a/drivers/w1/Makefile b/drivers/w1/Makefile index f81693b..7fd8697 100644 --- a/drivers/w1/Makefile +++ b/drivers/w1/Makefile @@ -1 +1,3 @@ obj-$(CONFIG_W1) += w1-uclass.o + +obj-$(CONFIG_W1_GPIO) += w1-gpio.o diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c new file mode 100644 index 000..941ab2c --- /dev/null +++ b/drivers/w1/w1-gpio.c @@ -0,0 +1,158 @@ +/* SPDX-License-Identifier:GPL-2.0+ + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co + * + * Maxime Ripard + * + */ + +#include +#include +#include + +#include + +#define W1_TIMING_A6 +#define W1_TIMING_B64 +#define W1_TIMING_C60 +#define W1_TIMING_D10 +#define W1_TIMING_E9 +#define W1_TIMING_F55 +#define W1_TIMING_G0 +#define W1_TIMING_H480 +#define W1_TIMING_I70 +#define W1_TIMING_J410 + +struct w1_gpio_pdata { + struct gpio_descgpio; + u64 search_id; +}; + +static bool w1_gpio_read_bit(struct udevice *dev) +{ + struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + int val; + + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT); + udelay(W1_TIMING_A); + + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_IN); + udelay(W1_TIMING_E); + + val = dm_gpio_get_value(&pdata->gpio); + if (val < 0) + debug("error in retrieving GPIO value"); + udelay(W1_TIMING_F); + + return val; +} + +static u8 w1_gpio_read_byte(struct udevice *dev) +{ + int i; + u8 ret = 0; + + for (i = 0; i < 8; ++i) + ret |= (w1_gpio_read_bit(dev) ? 1 : 0) << i; + + return ret; +} + +static void w1_gpio_write_bit(struct udevice *dev, bool bit) +{ + struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT); + + bit ? udelay(W1_TIMING_A) : udelay(W1_TIMING_C); + + dm_gpio_set_value(&pdata->gpio, 1); + + bit ? udelay(W1_TIMING_B) : udelay(W1_TIMING_D); +} + +static void w1_gpio_write_byte(struct udevice *dev, u8 byte) +{ + int i; + + for (i = 0; i < 8; ++i) + w1_gpio_write_bit(dev, (byte >> i) & 0x1); +} + +static bool w1_gpio_reset(struct udevice *dev) +{ + struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + int val; + + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); + udelay(W1_TIMING_G); + + dm_gpio_set_value(&pdata->gpio, 0); + udelay(W1_TIMING_H); + + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_IN); + udelay(W1_TIMING_I); + + val = dm_gpio_get_value(&pdata->gpio); + if (val < 0) + debug("error in retrieving GPIO value"); + udelay(W1_TIMING_J); + + return val; +} + +static u8 w1_gpio_triplet(struct udevice *dev, bool bdir) +{ + u8 id_bit = w1_gpio_read_bit(dev); + u8 comp_bit = w1_gpio_read_bit(dev); + u8 retval; + + if (id_bit && comp_bit) + return 0x03; /* error */ + + if (!id_bit && !comp_bit) { + /* Both bits are valid, take the direction given */ + retval = bdir ? 0x04 : 0; + } else { + /* Only one bit is valid, take that direction */ + bdir = id_bit; + retval = id_bit ? 0x05 : 0x02; + } + + w1_gpio_write_bit(dev, bdir); + return retval; +} + +static const struct w1_ops w1_gpio_ops = { + .read_byte = w1_gpio_read_byte, + .reset = w1_gpio_reset, + .triplet= w1_gpio_triplet, + .write_byte = w1_gpio_write_byte, +}; + +static int w1_gpio_ofdata_to_platdata(struct udevice *dev) +{ + struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + int ret; + + ret = gpio_request_by_name(dev, "gpios", 0, &pdata->gpio, 0); + if (ret < 0) + printf("Error claiming GPIO %d\n", ret); + + return ret; +}; + +static const struct udevice_id w1_gpio_id[] = { + { "w1-gpio", 0 }, + { }, +}; + +U_BOOT_DRIVER(w1_gpio_drv) = { + .id = UCLASS_W1, + .name = "w1_gpio_drv", + .of_mat
[U-Boot] [PATCH 03/20] dt-bindings: W1: w1-gpio: added bindings for w1-gpio
Added bindings specification for bitbanged gpio driver for Dallas one wire protocol Signed-off-by: Eugen Hristev --- doc/device-tree-bindings/w1/w1-gpio.txt | 26 ++ 1 file changed, 26 insertions(+) create mode 04 doc/device-tree-bindings/w1 create mode 100644 doc/device-tree-bindings/w1/w1-gpio.txt diff --git a/doc/device-tree-bindings/w1/w1-gpio.txt b/doc/device-tree-bindings/w1/w1-gpio.txt new file mode 100644 index 000..b976d8c --- /dev/null +++ b/doc/device-tree-bindings/w1/w1-gpio.txt @@ -0,0 +1,26 @@ +W1 gpio device binding - one wire protocol over bitbanged gpio +=== + + +No child nodes are required in device tree. The driver will autodetect +the devices and instantiate the driver for the child according to the detected +family. This is done according to the discovery protocol in 1wire standard. + +Driver: +- drivers/w1/w1-gpio.c + +Software w1 device-tree node properties: +Required: +* compatible = "w1-gpio"; +* gpios = <...>; + This is the gpio used for one wire protocol, using bitbanging + +Optional: +* none + +Example: + +onewire_tm: onewire { + compatible = "w1-gpio"; + gpios = <&pioA 32 0>; +}; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 4/5] x86: fsp: Eliminate the reset_cpu() call
In preparation for the reset driver conversion, eliminate the reset_cpu() call in the FSP init path as it's too early for the reset driver to work. Signed-off-by: Bin Meng --- Changes in v2: None arch/x86/lib/fsp/fsp_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index b4ba129..d5ed1d5 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -132,7 +132,7 @@ int arch_fsp_init(void) chipset_clear_sleep_state(); /* Reboot */ debug("Rebooting..\n"); - reset_cpu(0); + outb(SYS_RST | RST_CPU, IO_PORT_RESET); /* Should not reach here.. */ panic("Reboot System"); } -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 3/5] dm: sysreset: Add a standard message when doing reset
It's good to print a message when doing reset. Signed-off-by: Bin Meng --- Changes in v2: - new patch per Wolfgang's suggestion to add a standard message when doing reset drivers/sysreset/sysreset-uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c index 7e06c3c..59dbe99 100644 --- a/drivers/sysreset/sysreset-uclass.c +++ b/drivers/sysreset/sysreset-uclass.c @@ -69,6 +69,8 @@ void reset_cpu(ulong addr) int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { + printf("resetting ...\n"); + sysreset_walk_halt(SYSRESET_COLD); return 0; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 04/20] W1-EEPROM: Add an W1-EEPROM uclass for 1 wire EEPROMs
From: Maxime Ripard We might want to access data stored onto one wire EEPROMs. Create a framework to provide a consistent API. Signed-off-by: Maxime Ripard [eugen.hris...@microchip.com: reworked patch] Signed-off-by: Eugen Hristev --- drivers/Kconfig | 2 ++ drivers/Makefile | 1 + drivers/w1-eeprom/Kconfig| 17 +++ drivers/w1-eeprom/Makefile | 2 ++ drivers/w1-eeprom/w1-eeprom-uclass.c | 56 include/dm/uclass-id.h | 1 + include/w1-eeprom.h | 28 ++ 7 files changed, 107 insertions(+) create mode 04 drivers/w1-eeprom create mode 100644 drivers/w1-eeprom/Kconfig create mode 100644 drivers/w1-eeprom/Makefile create mode 100644 drivers/w1-eeprom/w1-eeprom-uclass.c create mode 100644 include/w1-eeprom.h diff --git a/drivers/Kconfig b/drivers/Kconfig index 2cae829..386af75 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -104,6 +104,8 @@ source "drivers/video/Kconfig" source "drivers/w1/Kconfig" +source "drivers/w1-eeprom/Kconfig" + source "drivers/watchdog/Kconfig" config PHYS_TO_BUS diff --git a/drivers/Makefile b/drivers/Makefile index 728380b..de67a17 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -102,6 +102,7 @@ obj-y += soc/ obj-$(CONFIG_REMOTEPROC) += remoteproc/ obj-y += thermal/ obj-$(CONFIG_W1) += w1/ +obj-$(CONFIG_W1_EEPROM) += w1-eeprom/ obj-$(CONFIG_MACH_PIC32) += ddr/microchip/ endif diff --git a/drivers/w1-eeprom/Kconfig b/drivers/w1-eeprom/Kconfig new file mode 100644 index 000..d5ddc80 --- /dev/null +++ b/drivers/w1-eeprom/Kconfig @@ -0,0 +1,17 @@ +# +# EEPROM subsystem configuration +# + +menu "1-wire EEPROM support" + +config W1_EEPROM + bool "Enable support for EEPROMs on 1wire interface" + depends on DM + help + Support for the EEPROMs connected on 1-wire Dallas protocol interface + +if W1_EEPROM + +endif + +endmenu diff --git a/drivers/w1-eeprom/Makefile b/drivers/w1-eeprom/Makefile new file mode 100644 index 000..b72950e --- /dev/null +++ b/drivers/w1-eeprom/Makefile @@ -0,0 +1,2 @@ +obj-$(CONFIG_W1_EEPROM) += w1-eeprom-uclass.o + diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c new file mode 100644 index 000..4176baf --- /dev/null +++ b/drivers/w1-eeprom/w1-eeprom-uclass.c @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier:GPL-2.0+ + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co. + * + * Maxime Ripard + * + */ + +#include +#include +#include + +#include + +int w1_eeprom_read_buf(struct udevice *dev, unsigned int offset, + u8 *buf, unsigned int count) +{ + const struct w1_eeprom_ops *ops = device_get_ops(dev); + + if (!ops->read_buf) + return -ENOSYS; + + return ops->read_buf(dev, offset, buf, count); +} + +UCLASS_DRIVER(w1_eeprom) = { + .name = "w1_eeprom", + .id = UCLASS_W1_EEPROM, +}; + +int w1_eeprom_dm_init(void) +{ + struct udevice *bus; + struct uclass *uc; + int ret; + + ret = uclass_get(UCLASS_W1_EEPROM, &uc); + if (ret) + return ret; + + uclass_foreach_dev(bus, uc) { + ret = device_probe(bus); + if (ret == -ENODEV) { /* No such device. */ + debug("W1_EEPROM not available.\n"); + continue; + } + + if (ret) { /* Other error. */ + printf("W1_EEPROM probe failed, error %d\n", ret); + continue; + } + } + + return 0; +} diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 8eca9dc..06ff339 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -90,6 +90,7 @@ enum uclass_id { UCLASS_VIDEO_BRIDGE,/* Video bridge, e.g. DisplayPort to LVDS */ UCLASS_VIDEO_CONSOLE, /* Text console driver for video device */ UCLASS_W1, /* Dallas 1-Wire bus */ + UCLASS_W1_EEPROM, /* one-wire EEPROMs */ UCLASS_WDT, /* Watchdot Timer driver */ UCLASS_COUNT, diff --git a/include/w1-eeprom.h b/include/w1-eeprom.h new file mode 100644 index 000..7c9dd96 --- /dev/null +++ b/include/w1-eeprom.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier:GPL-2.0+ + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co + * Copyright (c) 2018 Microchip Technology, Inc. + * + */ + +#ifndef __W1_EEPROM_H +#define __W1_EEPROM_H + +struct udevice; + +struct w1_eeprom_ops { + /* +* Reads a buff from the given EEPROM memory, starting at +* given offset and place the results into the given buffer. +* Should read given count of bytes. +* Should return 0 on success, and normal error.h on error +*/ + int (*read_buf)(struc
[U-Boot] [PATCH v2 1/5] efi: app: Add a sysreset driver
This adds the DM sysreset driver for EFI application support. Signed-off-by: Bin Meng --- Changes in v2: - drop patches already applied - new patch to add a sysreset driver for efi app lib/efi/efi_app.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 3eb8eeb..5879d40 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -10,11 +10,13 @@ #include #include +#include #include #include #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -129,7 +131,7 @@ efi_status_t EFIAPI efi_main(efi_handle_t image, return EFI_SUCCESS; } -void reset_cpu(ulong addr) +static void efi_exit(void) { struct efi_priv *priv = global_priv; @@ -137,3 +139,27 @@ void reset_cpu(ulong addr) printf("U-Boot EFI exiting\n"); priv->boot->exit(priv->parent_image, EFI_SUCCESS, 0, NULL); } + +static int efi_sysreset_request(struct udevice *dev, enum sysreset_t type) +{ + efi_exit(); + + return -EINPROGRESS; +} + +static const struct udevice_id efi_sysreset_ids[] = { + { .compatible = "efi,reset" }, + { } +}; + +static struct sysreset_ops efi_sysreset_ops = { + .request = efi_sysreset_request, +}; + +U_BOOT_DRIVER(efi_sysreset) = { + .name = "efi-sysreset", + .id = UCLASS_SYSRESET, + .of_match = efi_sysreset_ids, + .ops = &efi_sysreset_ops, + .flags = DM_FLAG_PRE_RELOC, +}; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 07/20] w1: add command for onewire protocol
Add basic command for bus information and read for onewire bus using Dallas 1-Wire protocol. Signed-off-by: Eugen Hristev --- cmd/Kconfig | 7 cmd/Makefile | 1 + cmd/w1.c | 121 +++ 3 files changed, 129 insertions(+) create mode 100644 cmd/w1.c diff --git a/cmd/Kconfig b/cmd/Kconfig index aec2090..1a68b1f 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -816,6 +816,13 @@ config CMD_I2C help I2C support. +config CMD_W1 + depends on W1 + default y if W1 + bool "w1 - Support for Dallas 1-Wire protocol" + help + Dallas 1-wire protocol support + config CMD_LOADB bool "loadb" default y diff --git a/cmd/Makefile b/cmd/Makefile index 323f1fd..51ad1d8 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -143,6 +143,7 @@ obj-$(CONFIG_CMD_THOR_DOWNLOAD) += thordown.o obj-$(CONFIG_CMD_XIMG) += ximg.o obj-$(CONFIG_CMD_YAFFS2) += yaffs2.o obj-$(CONFIG_CMD_SPL) += spl.o +obj-$(CONFIG_CMD_W1) += w1.o obj-$(CONFIG_CMD_ZIP) += zip.o obj-$(CONFIG_CMD_ZFS) += zfs.o diff --git a/cmd/w1.c b/cmd/w1.c new file mode 100644 index 000..6255bc2 --- /dev/null +++ b/cmd/w1.c @@ -0,0 +1,121 @@ +/* SPDX-License-Identifier: GPL-2.0+ + * + * (C) Copyright 2018 + * Microchip Technology, Inc. + * Eugen Hristev + */ +#include +#include +#include +#include +#include + +static int w1_bus(void) +{ + struct udevice *bus, *dev; + int ret; + + ret = w1_get_bus(0, &bus); + if (ret) { + printf("one wire interface not found\n"); + return CMD_RET_FAILURE; + } + printf("Bus %d:\t%s", bus->seq, bus->name); + if (device_active(bus)) + printf(" (active)"); + printf("\n"); + + for (device_find_first_child(bus, &dev); +dev; +device_find_next_child(&dev)) { + ret = device_probe(dev); + + printf("\t%s (%d) uclass %s : ", dev->name, dev->seq, + dev->uclass->uc_drv->name); + + if (ret) + printf("device error\n"); + else + printf("family 0x%x\n", w1_get_device_family(dev)); + } + return CMD_RET_SUCCESS; +} + +static int w1_read(int argc, char *const argv[]) +{ + int bus_n = 0, dev_n = 0, offset = 0, len = 512; + int i; + struct udevice *bus, *dev; + int ret; + u8 buf[512]; + + if (argc > 2) + bus_n = simple_strtoul(argv[2], NULL, 10); + + if (argc > 3) + dev_n = simple_strtoul(argv[3], NULL, 10); + + if (argc > 4) + offset = simple_strtoul(argv[4], NULL, 10); + + if (argc > 5) + len = simple_strtoul(argv[5], NULL, 10); + + if (len > 512) { + printf("len needs to be <= 512\n"); + return CMD_RET_FAILURE; + } + + ret = w1_get_bus(bus_n, &bus); + if (ret) { + printf("one wire interface not found\n"); + return CMD_RET_FAILURE; + } + + for (device_find_first_child(bus, &dev), i = 0; + dev && i <= dev_n; + device_find_next_child(&dev), i++) { + ret = device_probe(dev); + if (!ret && i == dev_n) + break; + } + + if (i != dev_n || ret || !dev) { + printf("invalid dev\n"); + return CMD_RET_FAILURE; + } + + if (strcmp(dev->uclass->uc_drv->name, "w1_eeprom")) { + printf("the device present on the interface is of unknown device class\n"); + return CMD_RET_FAILURE; + } + + w1_eeprom_read_buf(dev, offset, (u8 *)buf, len); + for (i = 0; i < len; i++) + printf("%x", buf[i]); + printf("\n"); + + return CMD_RET_SUCCESS; +} + +int do_w1(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +{ + if (argc < 2) + return CMD_RET_USAGE; + + if (!strcmp(argv[1], "bus")) + return w1_bus(); + + if (!strcmp(argv[1], "read")) + return w1_read(argc, argv); + + return CMD_RET_SUCCESS; +} + +U_BOOT_CMD(w1, 6, 0, do_w1, + "onewire interface utility commands", + "bus - show onewire bus info (all)\n" + "w1 read [ [ [offset [length" + "- read from onewire device 'dev' on onewire bus 'bus'" + " starting from offset 'offset' and length 'length'\n" + " defaults: bus 0, dev 0, offset 0, length 512 bytes."); -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 08/20] pinctrl: sandbox: add gpio onewire w1 group
Add onewire "w1" groups and pin function for onewire GPIOs in sandbox. Signed-off-by: Eugen Hristev --- drivers/pinctrl/pinctrl-sandbox.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/pinctrl-sandbox.c b/drivers/pinctrl/pinctrl-sandbox.c index 468fa2a..755ac08 100644 --- a/drivers/pinctrl/pinctrl-sandbox.c +++ b/drivers/pinctrl/pinctrl-sandbox.c @@ -14,6 +14,7 @@ static const char * const sandbox_pins[] = { "SDA", "TX", "RX", + "W1" }; static const char * const sandbox_groups[] = { @@ -21,12 +22,14 @@ static const char * const sandbox_groups[] = { "serial_a", "serial_b", "spi", + "w1", }; static const char * const sandbox_functions[] = { "i2c", "serial", "spi", + "w1", }; static const struct pinconf_param sandbox_conf_params[] = { -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 5/5] x86: Switch to use DM sysreset driver
This converts all x86 boards over to DM sysreset. Signed-off-by: Bin Meng --- Changes in v2: - remove include of "reset.dsti" in edison.dts - add SYSRESET for efi-x86_app and edison arch/Kconfig | 2 ++ arch/x86/cpu/baytrail/valleyview.c| 6 -- arch/x86/cpu/braswell/braswell.c | 6 -- arch/x86/cpu/cpu.c| 26 -- arch/x86/cpu/ivybridge/early_me.c | 7 --- arch/x86/cpu/ivybridge/sdram.c| 3 ++- arch/x86/cpu/qemu/qemu.c | 6 -- arch/x86/cpu/quark/quark.c| 6 -- arch/x86/cpu/tangier/tangier.c| 6 -- arch/x86/dts/bayleybay.dts| 1 + arch/x86/dts/baytrail_som-db5800-som-6867.dts | 1 + arch/x86/dts/broadwell_som-6896.dts | 1 + arch/x86/dts/cherryhill.dts | 1 + arch/x86/dts/chromebook_link.dts | 1 + arch/x86/dts/chromebook_samus.dts | 1 + arch/x86/dts/chromebox_panther.dts| 1 + arch/x86/dts/conga-qeval20-qa3-e3845.dts | 1 + arch/x86/dts/cougarcanyon2.dts| 1 + arch/x86/dts/crownbay.dts | 1 + arch/x86/dts/dfi-bt700.dtsi | 1 + arch/x86/dts/edison.dts | 5 + arch/x86/dts/efi-x86_app.dts | 5 + arch/x86/dts/efi-x86_payload.dts | 1 + arch/x86/dts/galileo.dts | 1 + arch/x86/dts/minnowmax.dts| 1 + arch/x86/dts/qemu-x86_i440fx.dts | 1 + arch/x86/dts/qemu-x86_q35.dts | 1 + arch/x86/dts/reset.dtsi | 6 ++ arch/x86/include/asm/processor.h | 5 - arch/x86/include/asm/u-boot-x86.h | 1 - configs/chromebook_link64_defconfig | 1 + 31 files changed, 41 insertions(+), 66 deletions(-) create mode 100644 arch/x86/dts/reset.dtsi diff --git a/arch/Kconfig b/arch/Kconfig index dd5a887..cbeb9f6 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -118,6 +118,8 @@ config X86 imply DM_SPI_FLASH imply DM_USB imply DM_VIDEO + imply SYSRESET + imply SYSRESET_X86 imply CMD_FPGA_LOADMK imply CMD_GETTIME imply CMD_IO diff --git a/arch/x86/cpu/baytrail/valleyview.c b/arch/x86/cpu/baytrail/valleyview.c index b7d481a..8882a76 100644 --- a/arch/x86/cpu/baytrail/valleyview.c +++ b/arch/x86/cpu/baytrail/valleyview.c @@ -55,9 +55,3 @@ int arch_misc_init(void) return 0; } - -void reset_cpu(ulong addr) -{ - /* cold reset */ - x86_full_reset(); -} diff --git a/arch/x86/cpu/braswell/braswell.c b/arch/x86/cpu/braswell/braswell.c index 32a6a5e..7a83b06 100644 --- a/arch/x86/cpu/braswell/braswell.c +++ b/arch/x86/cpu/braswell/braswell.c @@ -27,9 +27,3 @@ int arch_misc_init(void) return 0; } - -void reset_cpu(ulong addr) -{ - /* cold reset */ - x86_full_reset(); -} diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 99f8e68..290ee08 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -76,37 +76,11 @@ int x86_init_cache(void) } int init_cache(void) __attribute__((weak, alias("x86_init_cache"))); -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - printf("resetting ...\n"); - - /* wait 50 ms */ - udelay(5); - disable_interrupts(); - reset_cpu(0); - - /*NOTREACHED*/ - return 0; -} - void flush_cache(unsigned long dummy1, unsigned long dummy2) { asm("wbinvd\n"); } -__weak void reset_cpu(ulong addr) -{ - /* Do a hard reset through the chipset's reset control register */ - outb(SYS_RST | RST_CPU, IO_PORT_RESET); - for (;;) - cpu_hlt(); -} - -void x86_full_reset(void) -{ - outb(FULL_RST | SYS_RST | RST_CPU, IO_PORT_RESET); -} - /* Define these functions to allow ehch-hcd to function */ void flush_dcache_range(unsigned long start, unsigned long stop) { diff --git a/arch/x86/cpu/ivybridge/early_me.c b/arch/x86/cpu/ivybridge/early_me.c index 1a15229..219d5be 100644 --- a/arch/x86/cpu/ivybridge/early_me.c +++ b/arch/x86/cpu/ivybridge/early_me.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -138,17 +139,17 @@ int intel_early_me_init_done(struct udevice *dev, struct udevice *me_dev, case ME_HFS_ACK_RESET: /* Non-power cycle reset */ set_global_reset(dev, 0); - reset_cpu(0); + sysreset_walk_halt(SYSRESET_COLD); break; case ME_HFS_ACK_PWR_CYCLE: /* Power cycle reset */ set_global_reset(dev, 0); - x86_full_reset(); + sysreset_walk_halt(SYSRESET_COLD); break; case ME_HFS_ACK_GBL_RESET: /* Global
[U-Boot] [PATCH v2 2/5] x86: tangier: Add a sysreset driver
This adds a reset driver for tangier processor. Signed-off-by: Bin Meng --- Changes in v2: - new patch to add a reset driver for tangier processor arch/x86/cpu/tangier/Makefile | 2 +- arch/x86/cpu/tangier/sysreset.c | 48 + 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 arch/x86/cpu/tangier/sysreset.c diff --git a/arch/x86/cpu/tangier/Makefile b/arch/x86/cpu/tangier/Makefile index 44ccb3f..8274482 100644 --- a/arch/x86/cpu/tangier/Makefile +++ b/arch/x86/cpu/tangier/Makefile @@ -2,5 +2,5 @@ # # Copyright (c) 2017 Intel Corporation -obj-y += car.o tangier.o sdram.o +obj-y += car.o tangier.o sdram.o sysreset.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi.o diff --git a/arch/x86/cpu/tangier/sysreset.c b/arch/x86/cpu/tangier/sysreset.c new file mode 100644 index 000..e762ee1 --- /dev/null +++ b/arch/x86/cpu/tangier/sysreset.c @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018, Bin Meng + * + * Reset driver for tangier processor + */ + +#include +#include +#include +#include + +static int tangier_sysreset_request(struct udevice *dev, enum sysreset_t type) +{ + int value; + + switch (type) { + case SYSRESET_WARM: + value = IPCMSG_WARM_RESET; + break; + case SYSRESET_COLD: + value = IPCMSG_COLD_RESET; + break; + default: + return -ENOSYS; + } + + scu_ipc_simple_command(value, 0); + + return -EINPROGRESS; +} + +static const struct udevice_id tangier_sysreset_ids[] = { + { .compatible = "intel,reset-tangier" }, + { } +}; + +static struct sysreset_ops tangier_sysreset_ops = { + .request = tangier_sysreset_request, +}; + +U_BOOT_DRIVER(tangier_sysreset) = { + .name = "tangier-sysreset", + .id = UCLASS_SYSRESET, + .of_match = tangier_sysreset_ids, + .ops = &tangier_sysreset_ops, + .flags = DM_FLAG_PRE_RELOC, +}; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 06/20] W1-EEPROM: add sandbox driver
Add a sandbox driver for a one wire EEPROM memory Signed-off-by: Eugen Hristev --- drivers/w1-eeprom/Kconfig | 6 + drivers/w1-eeprom/Makefile | 1 + drivers/w1-eeprom/eep_sandbox.c | 57 + include/w1.h| 1 + 4 files changed, 65 insertions(+) create mode 100644 drivers/w1-eeprom/eep_sandbox.c diff --git a/drivers/w1-eeprom/Kconfig b/drivers/w1-eeprom/Kconfig index 20ec549..4b7f3c4 100644 --- a/drivers/w1-eeprom/Kconfig +++ b/drivers/w1-eeprom/Kconfig @@ -18,6 +18,12 @@ config W1_EEPROM_DS24XXX help Maxim DS24 EEPROMs 1-Wire EEPROM support +config W1_EEPROM_SANDBOX + bool "Enable sandbox onewire EEPROM driver" + depends on W1 + help + Sandbox driver for a onewire EEPROM memory + endif endmenu diff --git a/drivers/w1-eeprom/Makefile b/drivers/w1-eeprom/Makefile index 3f4aa13..03cc4c8 100644 --- a/drivers/w1-eeprom/Makefile +++ b/drivers/w1-eeprom/Makefile @@ -2,3 +2,4 @@ obj-$(CONFIG_W1_EEPROM) += w1-eeprom-uclass.o obj-$(CONFIG_W1_EEPROM_DS24XXX) += ds24xxx.o +obj-$(CONFIG_W1_EEPROM_SANDBOX) += eep_sandbox.o diff --git a/drivers/w1-eeprom/eep_sandbox.c b/drivers/w1-eeprom/eep_sandbox.c new file mode 100644 index 000..46910dd --- /dev/null +++ b/drivers/w1-eeprom/eep_sandbox.c @@ -0,0 +1,57 @@ +/* SPDX-License-Identifier:GPL-2.0+ + * + * Copyright (c) 2018 Microchip Technology, Inc. + * + */ + +#include +#include +#include +#include +#include + +#define W1_F2D_READ_EEPROM 0xf0 + +#define EEP_SANDBOX_SAMPLE_MEM "this is a sample EEPROM memory string." + +static int eep_sandbox_read_buf(struct udevice *dev, unsigned int offset, + u8 *buf, unsigned int count) +{ + /* do not allow to copy more than our maximum sample string */ + if (offset + count < strlen(EEP_SANDBOX_SAMPLE_MEM)) { + offset = 0; + count = strlen(EEP_SANDBOX_SAMPLE_MEM); + } + strncpy((char *)buf, EEP_SANDBOX_SAMPLE_MEM, count); + + /* +* in case the w1 subsystem uses some different kind of sandbox testing, +* like randomized gpio values , we take the buffer from there +*/ + + w1_reset_select(dev); + + w1_write_byte(dev, W1_F2D_READ_EEPROM); + w1_write_byte(dev, offset & 0xff); + w1_write_byte(dev, offset >> 8); + + w1_read_buf(dev, buf, count); + + /* +* even if read buf from w1 fails, return success as we hardcoded +* the buffer. +*/ + return 0; +} + +static const struct w1_eeprom_ops eep_sandbox_ops = { + .read_buf = eep_sandbox_read_buf, +}; + +U_BOOT_DRIVER(eep_sandbox) = { + .name = "eep_sandbox", + .id = UCLASS_W1_EEPROM, + .ops= &eep_sandbox_ops, +}; + +U_BOOT_W1_DEVICE(eep_sandbox, W1_FAMILY_EEP_SANDBOX); diff --git a/include/w1.h b/include/w1.h index 1ca1740..c2ed51c 100644 --- a/include/w1.h +++ b/include/w1.h @@ -12,6 +12,7 @@ #define W1_FAMILY_DS24B33 0x23 #define W1_FAMILY_DS2431 0x2d +#define W1_FAMILY_EEP_SANDBOX 0xfe /** * struct w1_driver_entry - Matches a driver to its w1 family -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 05/20] W1-EEPROM: add support for Maxim DS24 eeprom families
From: Maxime Ripard Add a driver that supports Maxim 1 wire EEPROMs families DS24B33 and DS2431. Can be extended for other families as well. Signed-off-by: Maxime Ripard [eugen.hris...@microchip.com: reworked driver] Signed-off-by: Eugen Hristev --- drivers/w1-eeprom/Kconfig | 6 ++ drivers/w1-eeprom/Makefile | 2 ++ drivers/w1-eeprom/ds24xxx.c | 46 + 3 files changed, 54 insertions(+) create mode 100644 drivers/w1-eeprom/ds24xxx.c diff --git a/drivers/w1-eeprom/Kconfig b/drivers/w1-eeprom/Kconfig index d5ddc80..20ec549 100644 --- a/drivers/w1-eeprom/Kconfig +++ b/drivers/w1-eeprom/Kconfig @@ -12,6 +12,12 @@ config W1_EEPROM if W1_EEPROM +config W1_EEPROM_DS24XXX + bool "Enable Maxim DS24 families EEPROM support" + depends on W1 + help + Maxim DS24 EEPROMs 1-Wire EEPROM support + endif endmenu diff --git a/drivers/w1-eeprom/Makefile b/drivers/w1-eeprom/Makefile index b72950e..3f4aa13 100644 --- a/drivers/w1-eeprom/Makefile +++ b/drivers/w1-eeprom/Makefile @@ -1,2 +1,4 @@ obj-$(CONFIG_W1_EEPROM) += w1-eeprom-uclass.o +obj-$(CONFIG_W1_EEPROM_DS24XXX) += ds24xxx.o + diff --git a/drivers/w1-eeprom/ds24xxx.c b/drivers/w1-eeprom/ds24xxx.c new file mode 100644 index 000..423aa99 --- /dev/null +++ b/drivers/w1-eeprom/ds24xxx.c @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier:GPL-2.0+ + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co + * Copyright (c) 2018 Microchip Technology, Inc. + * + */ + +#include +#include +#include +#include +#include + +#define W1_F2D_READ_EEPROM 0xf0 + +static int ds24xxx_read_buf(struct udevice *dev, unsigned int offset, + u8 *buf, unsigned int count) +{ + w1_reset_select(dev); + + w1_write_byte(dev, W1_F2D_READ_EEPROM); + w1_write_byte(dev, offset & 0xff); + w1_write_byte(dev, offset >> 8); + + return w1_read_buf(dev, buf, count); +} + +static const struct w1_eeprom_ops ds24xxx_ops = { + .read_buf = ds24xxx_read_buf, +}; + +U_BOOT_DRIVER(ds24b33) = { + .name = "ds24b33", + .id = UCLASS_W1_EEPROM, + .ops= &ds24xxx_ops, +}; + +U_BOOT_DRIVER(ds2431) = { + .name = "ds2431", + .id = UCLASS_W1_EEPROM, + .ops= &ds24xxx_ops, +}; + +U_BOOT_W1_DEVICE(ds24b33, W1_FAMILY_DS24B33); +U_BOOT_W1_DEVICE(ds2431, W1_FAMILY_DS2431); -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 15/20] board: sama5d2_xplained: add pda detect call at init time
Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev --- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index 592b4d8..fccd80e 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -15,6 +15,8 @@ #include #include +extern void at91_pda_detect(void); + DECLARE_GLOBAL_DATA_PTR; static void board_usb_hw_init(void) @@ -28,6 +30,7 @@ int board_late_init(void) #ifdef CONFIG_DM_VIDEO at91_video_show_board_info(); #endif + at91_pda_detect(); return 0; } #endif -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 13/20] configs: sama5d3_xplained: add onewire and eeprom drivers
SAMA5D3 SoC can have extra clip boards (PDAs) connected, which have an EEPROM memory for identification. A special GPIO can be used to read this memory over 1wire protocol. Enabling one wire and eeprom drivers for this memory. Signed-off-by: Eugen Hristev --- configs/sama5d3_xplained_mmc_defconfig | 4 configs/sama5d3_xplained_nandflash_defconfig | 4 2 files changed, 8 insertions(+) diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig index 861a851..771264e 100644 --- a/configs/sama5d3_xplained_mmc_defconfig +++ b/configs/sama5d3_xplained_mmc_defconfig @@ -73,3 +73,7 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig index b72462d..a35beff 100644 --- a/configs/sama5d3_xplained_nandflash_defconfig +++ b/configs/sama5d3_xplained_nandflash_defconfig @@ -70,4 +70,8 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y CONFIG_FAT_WRITE=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 14/20] board: atmel: add support for pda detection
This adds the support for PDA detection as common code for Atmel boards. Using the one wire interface over GPIO , an EEPROM memory is read and compared to preprogrammed values for PDA screens TM4300, TM7000 and TM7000B. Once the PDA is detected, an environment variable is set accordingly. Signed-off-by: Eugen Hristev --- board/atmel/common/board.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/board/atmel/common/board.c b/board/atmel/common/board.c index 650eb22..b9cf54c 100644 --- a/board/atmel/common/board.c +++ b/board/atmel/common/board.c @@ -5,7 +5,62 @@ */ #include +#include +#include +#include + +#define AT91_PDA_EEPROM_ID_OFFSET 15 +#define AT91_PDA_EEPROM_ID_LENGTH 5 +#define AT91_PDA_EEPROM_DEFAULT_BUS0 void dummy(void) { } + +#if defined CONFIG_W1 +void at91_pda_detect(void) +{ + struct udevice *bus, *dev; + u8 buf[AT91_PDA_EEPROM_ID_LENGTH + 1] = {0}; + int ret; + int pda = 0; + + ret = w1_get_bus(AT91_PDA_EEPROM_DEFAULT_BUS, &bus); + if (ret) + return; + + for (device_find_first_child(bus, &dev); +dev; +device_find_next_child(&dev)) { + ret = device_probe(dev); + if (ret) { + continue; + } else { + w1_eeprom_read_buf(dev, AT91_PDA_EEPROM_ID_OFFSET, + (u8 *)buf, AT91_PDA_EEPROM_ID_LENGTH); + break; + } + } + pda = simple_strtoul((const char *)buf, NULL, 10); + + switch (pda) { + case 7000: + if (buf[4] == 'B') + printf("PDA TM7000B detected\n"); + else + printf("PDA TM7000 detected\n"); + break; + case 4300: + printf("PDA TM4300 detected\n"); + break; + case 5000: + printf("PDA TM5000 detected\n"); + break; + } + env_set("pda", (const char *)buf); +} +#else +void at91_pda_detect(void) +{ +} +#endif -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 11/20] w1: enumerate sandbox driver if configured
Add a sandbox eeprom on the bus as a device, if sandbox driver is configured. Signed-off-by: Eugen Hristev --- drivers/w1/w1-uclass.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c index cfddda3..e58c1ca 100644 --- a/drivers/w1/w1-uclass.c +++ b/drivers/w1/w1-uclass.c @@ -142,6 +142,11 @@ static int w1_enumerate(struct udevice *bus) } } +#ifdef CONFIG_W1_EEPROM_SANDBOX + /* before we are finished, add a sandbox device if we can */ + w1_new_device(bus, W1_FAMILY_EEP_SANDBOX); +#endif + return 0; } -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 12/20] configs: sama5d2_xplained: add onewire and eeprom drivers
SAMA5D2 SoC can have extra clip boards (PDAs) connected, which have an EEPROM memory for identification. A special GPIO can be used to read this memory over 1wire protocol. Enabling one wire and eeprom drivers for this memory. Signed-off-by: Eugen Hristev --- configs/sama5d2_xplained_mmc_defconfig | 4 configs/sama5d2_xplained_spiflash_defconfig | 4 2 files changed, 8 insertions(+) diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig index 4182e84..7e62d9f 100644 --- a/configs/sama5d2_xplained_mmc_defconfig +++ b/configs/sama5d2_xplained_mmc_defconfig @@ -86,3 +86,7 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_DM_VIDEO=y CONFIG_ATMEL_HLCD=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig index 18d1cb5..b5a95c5 100644 --- a/configs/sama5d2_xplained_spiflash_defconfig +++ b/configs/sama5d2_xplained_spiflash_defconfig @@ -83,3 +83,7 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_DM_VIDEO=y CONFIG_ATMEL_HLCD=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 19/20] ARM: dts: at91: sama5d2_xplained: add onewire connector for LCD eeprom
Add onewire node in device tree for TM series LCDs Signed-off-by: Eugen Hristev --- arch/arm/dts/at91-sama5d2_xplained.dts | 12 arch/arm/dts/sama5d2.dtsi | 6 ++ 2 files changed, 18 insertions(+) diff --git a/arch/arm/dts/at91-sama5d2_xplained.dts b/arch/arm/dts/at91-sama5d2_xplained.dts index 01326a1..9fada4a 100644 --- a/arch/arm/dts/at91-sama5d2_xplained.dts +++ b/arch/arm/dts/at91-sama5d2_xplained.dts @@ -11,6 +11,13 @@ stdout-path = &uart1; }; + onewire_tm: onewire { + gpios = <&pioA 32 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_onewire_tm_default>; + status = "okay"; + }; + ahb { usb1: ohci@0040 { num-ports = <3>; @@ -270,6 +277,11 @@ pinmux = ; bias-disable; }; + + pinctrl_onewire_tm_default: onewire_tm_default { + pinmux = ; + bias-pull-up; + }; }; }; }; diff --git a/arch/arm/dts/sama5d2.dtsi b/arch/arm/dts/sama5d2.dtsi index 6645a55..6f49842 100644 --- a/arch/arm/dts/sama5d2.dtsi +++ b/arch/arm/dts/sama5d2.dtsi @@ -9,6 +9,7 @@ spi1 = &qspi0; i2c0 = &i2c0; i2c1 = &i2c1; + w1 = &onewire_tm; }; clocks { @@ -769,4 +770,9 @@ }; }; }; + + onewire_tm: onewire { + compatible = "w1-gpio"; + status = "disabled"; + }; }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 10/20] configs: sandbox: add onewire w1 and sandbox eeprom
To be able to test Dallas onewire protocol and one wire eeproms driver and subsystem, add in sandbox defconfig the drivers' config. Signed-off-by: Eugen Hristev --- configs/sandbox_defconfig | 4 1 file changed, 4 insertions(+) diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 2fc84a1..2a86bf3 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -186,6 +186,10 @@ CONFIG_CONSOLE_ROTATION=y CONFIG_CONSOLE_TRUETYPE=y CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y CONFIG_VIDEO_SANDBOX_SDL=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_SANDBOX=y CONFIG_WDT=y CONFIG_WDT_SANDBOX=y CONFIG_FS_CBFS=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 09/20] sandbox: DTS: w1: add node for one wire interface on GPIO
Add a node for the one wire uclass and one wire gpio driver in sandbox. Signed-off-by: Eugen Hristev --- arch/sandbox/dts/sandbox.dts | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 0ea2452..70bc244 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -160,6 +160,7 @@ pinctrl { compatible = "sandbox,pinctrl"; + status = "okay"; pinctrl_i2c0: i2c0 { groups = "i2c"; @@ -171,6 +172,12 @@ groups = "serial_a"; function = "serial"; }; + + pinctrl_onewire0: onewire0 { + groups = "w1"; + function = "w1"; + bias-pull-up; + }; }; reset@1 { @@ -319,6 +326,14 @@ }; }; }; + + onewire0: onewire { + compatible = "w1-gpio"; + gpios = <&gpio_a 8>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_onewire0>; + status = "okay"; + }; }; #include "cros-ec-keyboard.dtsi" -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 16/20] board: sama5d3_xplained: add pda detect call at init time
Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev --- arch/arm/mach-at91/Kconfig | 1 + board/atmel/sama5d3_xplained/sama5d3_xplained.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index ce6be38..6fe701a 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -175,6 +175,7 @@ config TARGET_SAMA5D3_XPLAINED select SAMA5D3 select SUPPORT_SPL select BOARD_EARLY_INIT_F + select BOARD_LATE_INIT config TARGET_SAMA5D3XEK bool "SAMA5D3X-EK board" diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c index c47f638..289f8d8 100644 --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c @@ -18,6 +18,8 @@ DECLARE_GLOBAL_DATA_PTR; +extern void at91_pda_detect(void); + #ifdef CONFIG_NAND_ATMEL void sama5d3_xplained_nand_hw_init(void) { @@ -72,6 +74,14 @@ void board_debug_uart_init(void) } #endif +#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init(void) +{ + at91_pda_detect(); + return 0; +} +#endif + #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/5] x86: tangier: Add a sysreset driver
Hi Andy, On Thu, Jul 19, 2018 at 6:07 PM, Bin Meng wrote: > This adds a reset driver for tangier processor. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - new patch to add a reset driver for tangier processor > > arch/x86/cpu/tangier/Makefile | 2 +- > arch/x86/cpu/tangier/sysreset.c | 48 > + > 2 files changed, 49 insertions(+), 1 deletion(-) > create mode 100644 arch/x86/cpu/tangier/sysreset.c > Could you please help test this driver? This series is at u-boot-x86/reset branch. Thanks! Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 18/20] configs: sama5d3_xplained: add fdt overlay support
Add commands for fdt overlay merging. This is required for the boot scripts that detect PDAs and apply specific overlays to the DTB passed on to kernel. Signed-off-by: Eugen Hristev --- configs/sama5d3_xplained_mmc_defconfig | 1 + configs/sama5d3_xplained_nandflash_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig index 771264e..c6dddbf 100644 --- a/configs/sama5d3_xplained_mmc_defconfig +++ b/configs/sama5d3_xplained_mmc_defconfig @@ -77,3 +77,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig index a35beff..6fbbde0 100644 --- a/configs/sama5d3_xplained_nandflash_defconfig +++ b/configs/sama5d3_xplained_nandflash_defconfig @@ -75,3 +75,4 @@ CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y CONFIG_FAT_WRITE=y +CONFIG_OF_LIBFDT_OVERLAY=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 20/20] ARM: dts: at91: sama5d3_xplained: add onewire connector for LCD eeprom
Add onewire node in device tree for TM series LCDs Signed-off-by: Eugen Hristev --- arch/arm/dts/at91-sama5d3_xplained.dts | 12 arch/arm/dts/sama5d3.dtsi | 6 ++ 2 files changed, 18 insertions(+) diff --git a/arch/arm/dts/at91-sama5d3_xplained.dts b/arch/arm/dts/at91-sama5d3_xplained.dts index 6959710..c71e069 100644 --- a/arch/arm/dts/at91-sama5d3_xplained.dts +++ b/arch/arm/dts/at91-sama5d3_xplained.dts @@ -36,6 +36,13 @@ }; }; + onewire_tm: onewire { + gpios = <&pioE 23 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_onewire_tm_default>; + status = "okay"; + }; + ahb { apb { mmc0: mmc@f000 { @@ -243,6 +250,11 @@ atmel,pins = ; /* PE9, conflicts with A9 */ }; + + pinctrl_onewire_tm_default: onewire_tm_default { + atmel,pins = + ; + }; }; }; }; diff --git a/arch/arm/dts/sama5d3.dtsi b/arch/arm/dts/sama5d3.dtsi index ee0e14e..66417a9 100644 --- a/arch/arm/dts/sama5d3.dtsi +++ b/arch/arm/dts/sama5d3.dtsi @@ -39,6 +39,7 @@ ssc0 = &ssc0; ssc1 = &ssc1; pwm0 = &pwm0; + w1 = &onewire_tm; }; cpus { #address-cells = <1>; @@ -1538,4 +1539,9 @@ }; }; }; + + onewire_tm: onewire { + compatible = "w1-gpio"; + status = "disabled"; + }; }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 17/20] configs: sama5d2_xplained: add fdt overlay support
Add commands for fdt overlay merging. This is required for the boot scripts that detect PDAs and apply specific overlays to the DTB passed on to kernel. Signed-off-by: Eugen Hristev --- configs/sama5d2_xplained_mmc_defconfig | 1 + configs/sama5d2_xplained_spiflash_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig index 7e62d9f..4b2b5f0 100644 --- a/configs/sama5d2_xplained_mmc_defconfig +++ b/configs/sama5d2_xplained_mmc_defconfig @@ -90,3 +90,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig index b5a95c5..d2c264d 100644 --- a/configs/sama5d2_xplained_spiflash_defconfig +++ b/configs/sama5d2_xplained_spiflash_defconfig @@ -87,3 +87,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/5] x86: tangier: Add a sysreset driver
On Thu, 2018-07-19 at 18:04 +0800, Bin Meng wrote: > Hi Andy, > > On Thu, Jul 19, 2018 at 6:07 PM, Bin Meng wrote: > > This adds a reset driver for tangier processor. > > > > Signed-off-by: Bin Meng > > > > --- > > > > Changes in v2: > > - new patch to add a reset driver for tangier processor > > > > arch/x86/cpu/tangier/Makefile | 2 +- > > arch/x86/cpu/tangier/sysreset.c | 48 > > + > > 2 files changed, 49 insertions(+), 1 deletion(-) > > create mode 100644 arch/x86/cpu/tangier/sysreset.c > > > > Could you please help test this driver? This series is at > u-boot-x86/reset branch. Thanks! Can you point me out to what exact steps I have to perform to test this functionality? Just boot to U-boot console, run 'reset' and see if everything works as before? Or something more? -- Andy Shevchenko Intel Finland Oy ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/5] x86: tangier: Add a sysreset driver
On Thu, 2018-07-19 at 13:29 +0300, Andy Shevchenko wrote: > On Thu, 2018-07-19 at 18:04 +0800, Bin Meng wrote: > > Hi Andy, > > > > On Thu, Jul 19, 2018 at 6:07 PM, Bin Meng > > wrote: > > > This adds a reset driver for tangier processor. > > > > > > Signed-off-by: Bin Meng > > > > > > --- > > > > > > Changes in v2: > > > - new patch to add a reset driver for tangier processor > > > > > > arch/x86/cpu/tangier/Makefile | 2 +- > > > arch/x86/cpu/tangier/sysreset.c | 48 > > > + > > > 2 files changed, 49 insertions(+), 1 deletion(-) > > > create mode 100644 arch/x86/cpu/tangier/sysreset.c > > > > > > > Could you please help test this driver? This series is at > > u-boot-x86/reset branch. Thanks! > > Can you point me out to what exact steps I have to perform to test > this > functionality? > > Just boot to U-boot console, run 'reset' and see if everything works > as > before? Or something more? So, I merged the mentioned branch on top of my testing setup for ACPI bits. After, I boot to U-boot console and type reset (done 2 times with different delay after boot: few seconds vs. few dozen of seconds). After I tried to boot my ACPI kernel. If it's enough, you may take mine Tested-by: Andy Shevchenko for u-boot-x86/reset branch. -- Andy Shevchenko Intel Finland Oy ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] sunxi: support multiple memory banks
Hi I would like to support 4 memory chips for a sunxi board (a20). the current configuration in the sunxi-common.h looks like this: #define CONFIG_NR_DRAM_BANKS1 #define PHYS_SDRAM_0CONFIG_SYS_SDRAM_BASE #define PHYS_SDRAM_0_SIZE 0x8000 /* 2 GiB */ which seems to match the memory map for the a20. Question: While addressing 2gb ram works using one dram bank - will it work if there are two dram banks needed? Best regards Michael ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v6 0/5] Add support for reading memory configuration from DT at run-time
On 17.7.2018 15:16, Michal Simek wrote: > Hi, > > this is series which was send by Siva. I have just put there missing > Tom's tag which we got and adding more people to TO. > > Thanks, > Michal > > Changes in v6: > - Fix socfpga misc, bcmstb, ebisu which were recently added > > Changes in v5: > - Add Tom's tag - > https://lists.denx.de/pipermail/u-boot/2018-June/332810.html > - Add Tom's tag - > https://lists.denx.de/pipermail/u-boot/2018-June/332810.html > > Changes in v4: > - Rebased on latest master and used > available ram_base > - Separate the rename patch > - Rebased on latest master > - None, rebased on latest master > > Changes in v3: > - Used new varibale ram_start > - Rename fdtdec_setup_memory_size > > Changes in v2: > - Removed commit reference from description as per comment > - Update memory node as per comment > - Removed intc and fclk as per comment > > Siva Durga Prasad Paladugu (5): > lib: fdtdec: Update ram_base to store ram start adddress > lib: fdtdec: Rename routine fdtdec_setup_memory_size() > arm: zynq: Dont define SDRAM_BASE and SDRAM_SIZE in .h > arm: zynq: Add Nand flash mini u-boot configuration for zynq > arm: zynq: Add parallel NOR flash mini u-boot configuration for zynq > > arch/arm/dts/Makefile | 2 + > arch/arm/dts/zynq-cse-nand.dts | 80 > arch/arm/dts/zynq-cse-nor.dts | 88 > ++ > arch/arm/mach-mvebu/arm64-common.c | 2 +- > arch/arm/mach-socfpga/misc.c | 2 +- > board/broadcom/bcmstb/bcmstb.c | 2 +- > board/emulation/qemu-arm/qemu-arm.c| 2 +- > board/renesas/alt/alt.c| 2 +- > board/renesas/blanche/blanche.c| 2 +- > board/renesas/draak/draak.c| 2 +- > board/renesas/eagle/eagle.c| 2 +- > board/renesas/ebisu/ebisu.c| 2 +- > board/renesas/gose/gose.c | 2 +- > board/renesas/koelsch/koelsch.c| 2 +- > board/renesas/lager/lager.c| 2 +- > board/renesas/porter/porter.c | 2 +- > board/renesas/salvator-x/salvator-x.c | 2 +- > board/renesas/silk/silk.c | 2 +- > board/renesas/stout/stout.c| 2 +- > board/renesas/ulcb/ulcb.c | 2 +- > board/st/stm32f429-discovery/stm32f429-discovery.c | 2 +- > .../st/stm32f429-evaluation/stm32f429-evaluation.c | 2 +- > board/st/stm32f469-discovery/stm32f469-discovery.c | 2 +- > board/st/stm32h743-disco/stm32h743-disco.c | 2 +- > board/st/stm32h743-eval/stm32h743-eval.c | 2 +- > board/xilinx/zynq/board.c | 2 +- > board/xilinx/zynqmp/zynqmp.c | 2 +- > board/xilinx/zynqmp_r5/board.c | 2 +- > common/board_f.c | 4 +- > configs/zynq_cse_nand_defconfig| 50 > configs/zynq_cse_nor_defconfig | 50 > include/configs/zynq_cse.h | 3 - > include/fdtdec.h | 16 ++-- > lib/fdtdec.c | 3 +- > tools/patman/func_test.py | 2 +- > tools/patman/test/-cover-letter.patch | 2 +- > ...-cast-for-sandbox-in-fdtdec_setup_memory_.patch | 4 +- > tools/patman/test/test01.txt | 2 +- > 38 files changed, 313 insertions(+), 43 deletions(-) > create mode 100644 arch/arm/dts/zynq-cse-nand.dts > create mode 100644 arch/arm/dts/zynq-cse-nor.dts > create mode 100644 configs/zynq_cse_nand_defconfig > create mode 100644 configs/zynq_cse_nor_defconfig > Based on my discussion with Marek over IRC I have applied this series to my tree with one fix in commit message reported by Simon here https://lists.denx.de/pipermail/u-boot/2018-July/335230.html Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] env: Merge Rockchip, Sunxi, Zynq and ZynqMP
Hi, On Thu, Jul 19, 2018 at 08:45:45AM +0200, Michal Simek wrote: > There is no reason to have the same Kconfig options for different SoCs > separately. The patch is merging them together. > > Signed-off-by: Michal Simek > --- > > Patch is based on > https://lists.denx.de/pipermail/u-boot/2018-July/335126.html > > I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi > have this in their configs. When they decide to move then can enable > that option for them too. > I expect when more platforms extend this we will have less constrain > Kconfig setup. > > --- > env/Kconfig | 66 > - > 1 file changed, 17 insertions(+), 49 deletions(-) > > diff --git a/env/Kconfig b/env/Kconfig > index b37dcd78eb75..0ded003d7d41 100644 > --- a/env/Kconfig > +++ b/env/Kconfig > @@ -431,23 +431,37 @@ config ENV_EXT4_FILE > It's a string of the EXT4 file name. This file use to store the > environment (explicit path to the file) > > -if ARCH_SUNXI > +if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP Can we have a depends on instead? That would be more flexible. > config ENV_OFFSET > hex "Environment Offset" > depends on !ENV_IS_IN_UBI > depends on !ENV_IS_NOWHERE > + default 0x3f8000 if ARCH_ROCKCHIP > default 0x88000 if ARCH_SUNXI > + default 0xE if ARCH_ZYNQ > + default 0x1E0 if ARCH_ZYNQMP > help > Offset from the start of the device (or partition) > > config ENV_SIZE > hex "Environment Size" > - depends on !ENV_IS_NOWHERE > - default 0x2 if ARCH_SUNXI > + default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE > + default 0x2 if ARCH_SUNXI && !ENV_IS_NOWHERE I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you have a case where the environment is not store anywhere but still need a size? Thanks! Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] ARM: mx6ul: Apply ERR011115 errata workaround
ERR05 in IMX6UL errata says to use OCRAM memory above 0x908000 (instead of 0x907000) for silicon revision 1.2 shipped prior date code 1740. As we cannot check affected targets in runtime, apply that workaround by default for all IMX6UL platforms. Leave possibility to disable that workaround for non-affected targets, so more OCRAM area can be used by SPL (e.g. for featureful SPL images). Signed-off-by: Marcin Niestroj --- arch/arm/mach-imx/mx6/Kconfig | 9 + include/configs/imx6_spl.h| 11 +-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 521fad74b5..61708a0526 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -58,6 +58,15 @@ config MX6UL select SYSCOUNTER_TIMER bool +config MX6UL_ERR05 + bool "Workaround for ERR05 in IMX6UL Errata" + depends on MX6UL + default MX6UL + help + Say N here if you are sure that your platform is not affected + with ERR05. Doing so might be useful in case of featureful + (big) SPL images. + config MX6UL_LITESOM bool select MX6UL diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h index 720ff045a7..42d12c7503 100644 --- a/include/configs/imx6_spl.h +++ b/include/configs/imx6_spl.h @@ -19,16 +19,23 @@ *which consists of a 4K header in front of us that contains the IVT, DCD *and some padding thus 'our' max size is really 0x00908000 - 0x00918000 *or 64KB + * - Use 0x00909000 as start of OCRAM Free Area as a workaround for + *ERR05 in IMX6UL Errata */ +#ifdef CONFIG_MX6UL_ERR05 +#define CONFIG_SPL_TEXT_BASE 0x00909000 +#else #define CONFIG_SPL_TEXT_BASE 0x00908000 -#define CONFIG_SPL_MAX_SIZE0x1 +#endif + +#define CONFIG_SPL_MAX_SIZE(0x00918000 - CONFIG_SPL_TEXT_BASE) #define CONFIG_SPL_STACK 0x0091FFB8 /* * Pad SPL to 68KB (4KB header + 64KB max size). This allows to write the * SPL/U-Boot combination generated with u-boot-with-spl.imx directly to a * boot media (given that boot media specific offset is configured properly). */ -#define CONFIG_SPL_PAD_TO 0x11000 +#define CONFIG_SPL_PAD_TO (CONFIG_SPL_MAX_SIZE + 0x1000) /* MMC support */ #if defined(CONFIG_SPL_MMC_SUPPORT) -- 2.18.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] omap3: beagle: re-enable EFI support after the following commit removed it by mistake:
On Thu, Jul 19, 2018, 2:34 AM Guillaume Gardet wrote: > Hi Derald, > > > Le 19/07/2018 à 01:47, Derald D. Woods a écrit : > > On Wed, Jul 18, 2018 at 09:38:44PM +0200, Guillaume GARDET wrote: > >>commit d233ccb1d84b901f7e23e6d9b4f2c6a57198b23b > >>ARM: omap3: beagle: Enable DM_SERIAL, update distro usage and NAND > layout > > > > I have found no compile or runtime issues, on my BeagleBoard Rev. C4 > > or xM, with the current default configuration. At least, for my non-EFI > > boot environment. > > It is related to EFI options since I use GPT partitions (and EFI/Grub2 to > boot). That is why you did not find anything. > That is the piece that I do not use. > > > > The following items are brought in from the EFI config additions: > > > > +CONFIG_SMBIOS_PRODUCT_NAME="beagle" > > +CONFIG_CMD_BOOTEFI=y > > +CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y > > +CONFIG_EFI_PARTITION=y > > +CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=128 > > +CONFIG_EFI_PARTITION_ENTRIES_OFF=0 > > +CONFIG_SPL_EFI_PARTITION=y > > +CONFIG_OF_LIBFDT_OVERLAY=y > > +CONFIG_GENERATE_SMBIOS_TABLE=y > > +CONFIG_SMBIOS_MANUFACTURER="ti" > > +CONFIG_EFI_LOADER=y > > > > I would change the commit message though. It was not a mistake. It was > > removed to provide a minimal set of configuration options for the base > > BSP type of setup. Using EFI is a choice. In fact, I tested my changes > > on 3 different OMAP3 boards. So there has been no period of not working > > in the basic board configuration. Provably. > > > > So if EFI is required, even though one may not use it, this is a don't > > care for me. My boards boot just fine without EFI. > > The thing is you introduced a regression with your commit, since EFI was > supported previously. And you did not explicitly stated that you disabled > it on purpose. So, it sounds like a mistake to me. > If you don't care about EFI, it is your choice, but please do not break > setup of others. A use case is openSUSE which relies on EFI/Grub2 to boot. > Please note that EFI is now a default feature in U-Boot, so, please, let > it enabled. > > Guillaume > I am not a novice and my series received the usual mailing list oversight. Maybe even more than one iteration. As I stated, this is a don't care for me. EFI is not mandatory to function/boot. The bare minimum case was the target of the series. I acknowledge your commit. Derald > > > > > > Derald > > > >> Signed-off-by: Guillaume GARDET > >> Cc: Derald D. Woods > >> Cc: Tom Rini > >> > >> --- > >> configs/omap3_beagle_defconfig | 3 --- > >> 1 file changed, 3 deletions(-) > >> > >> diff --git a/configs/omap3_beagle_defconfig > b/configs/omap3_beagle_defconfig > >> index a37a38f881..1e1a391d7f 100644 > >> --- a/configs/omap3_beagle_defconfig > >> +++ b/configs/omap3_beagle_defconfig > >> @@ -32,8 +32,6 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0" > >> > > CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(spl),1920k(u-boot),128k(u-boot-env),128k(dtb),6m(kernel),-(rootfs)" > >> CONFIG_CMD_UBI=y > >> # CONFIG_ISO_PARTITION is not set > >> -# CONFIG_EFI_PARTITION is not set > >> -CONFIG_SPL_PARTITION_UUIDS=y > >> CONFIG_OF_CONTROL=y > >> CONFIG_ENV_IS_IN_NAND=y > >> CONFIG_SPL_DM=y > >> @@ -79,4 +77,3 @@ CONFIG_USB_ETHER_SMSC95XX=y > >> CONFIG_FAT_WRITE=y > >> CONFIG_BCH=y > >> CONFIG_SPL_OF_LIBFDT=y > >> -# CONFIG_EFI_LOADER is not set > >> -- > >> 2.18.0 > >> > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/5] x86: tangier: Add a sysreset driver
Hi Andy, On Thu, Jul 19, 2018 at 6:38 PM, Andy Shevchenko wrote: > On Thu, 2018-07-19 at 13:29 +0300, Andy Shevchenko wrote: >> On Thu, 2018-07-19 at 18:04 +0800, Bin Meng wrote: >> > Hi Andy, >> > >> > On Thu, Jul 19, 2018 at 6:07 PM, Bin Meng >> > wrote: >> > > This adds a reset driver for tangier processor. >> > > >> > > Signed-off-by: Bin Meng >> > > >> > > --- >> > > >> > > Changes in v2: >> > > - new patch to add a reset driver for tangier processor >> > > >> > > arch/x86/cpu/tangier/Makefile | 2 +- >> > > arch/x86/cpu/tangier/sysreset.c | 48 >> > > + >> > > 2 files changed, 49 insertions(+), 1 deletion(-) >> > > create mode 100644 arch/x86/cpu/tangier/sysreset.c >> > > >> > >> > Could you please help test this driver? This series is at >> > u-boot-x86/reset branch. Thanks! >> >> Can you point me out to what exact steps I have to perform to test >> this >> functionality? >> >> Just boot to U-boot console, run 'reset' and see if everything works >> as >> before? Or something more? > > So, I merged the mentioned branch on top of my testing setup for ACPI > bits. After, I boot to U-boot console and type reset (done 2 times with > different delay after boot: few seconds vs. few dozen of seconds). After > I tried to boot my ACPI kernel. > > If it's enough, you may take mine > Tested-by: Andy Shevchenko > This is enough. Thank you for the testing! > for u-boot-x86/reset branch. > Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
On Wed, Jul 18, 2018 at 10:13:59AM +0200, Koen Kooi wrote: > The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black, > but with the following differences: > > * Gigabit capable PHY > * Extra USB hub, optional i2c control > * lps3331ap barometer connected over i2c > * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c > * 1GiB DDR3 RAM > * RTL8723 Wifi/Bluetooth connected over USB > > Signed-off-by: Koen Kooi > Reviewed-by: Tom Rini -- 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] [RFC 2/2] env: Add prefix to error messages when loading env
On Wed, Jul 18, 2018 at 04:09:33PM +0200, Wolfgang Denk wrote: > Dear Tom, > > In message <20180718125351.GE4609@bill-the-cat> you wrote: > > > > > Loading Environment from FAT... > > >--> MMC: no card present > > >--> ** Bad device mmc 0 ** > > >--> Failed (-5) > > > Loading Environment from MMC... > > >--> OK > > > > > > instead of: > > > > > > Loading Environment from FAT... MMC: no card present > > > ** Bad device mmc 0 ** > > > Failed (-5) > > > Loading Environment from MMC... OK > > > > So, I think maybe (and given Wolfgang's comments) we should think about > > how the output might want to look, and how to get there without GD > > changes. Perhaps: > > Attempting to load Environment from FAT (do we have more easily > > available info at this point?): > > MMC: no card present > > ** Bad device mmc 0 ** > > Failed (-5) > > Loading Environment from MMC... > > Attempting to load Environment from MMC: > > Succeeded > > Just my 0.02€: > > In the non-error case, the output should be a single (ideally short) > line. > > Rationale: to many lines of ourput clutter your screen and make you > miss context faster; to many/long lines take time to print so they > make booting slower. > > In the error case, the user should be able to understand what the > problem was and decide if it was critical or can be ignored (like > here when intentionally booting without SDCard). I understand, but I don't know if we can get there still. The problem is we don't know if we've succeeded until we've done the relevant probing and that in turn is what's breaking the single line, and got us to where we are now. -- 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] Add Beaglebone Enhanced support
On 07/18/2018 10:13 AM, Koen Kooi wrote: > The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black, > but with the following differences: > > * Gigabit capable PHY > * Extra USB hub, optional i2c control > * lps3331ap barometer connected over i2c > * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c > * 1GiB DDR3 RAM > * RTL8723 Wifi/Bluetooth connected over USB > > Signed-off-by: Koen Kooi > > --- > [...] > diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h > index 652b10b..48df914 100644 > --- a/board/ti/am335x/board.h > +++ b/board/ti/am335x/board.h > @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void) > return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4); > } > > +static inline int board_is_bben(void) Should be just static int ... the compiler can decide. > +{ > + return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "SE", 2); > +} [...] -- 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] Add Beaglebone Enhanced support
> Op 19 jul. 2018, om 14:55 heeft Marek Vasut het volgende > geschreven: > > On 07/18/2018 10:13 AM, Koen Kooi wrote: >> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black, >> but with the following differences: >> >> * Gigabit capable PHY >> * Extra USB hub, optional i2c control >> * lps3331ap barometer connected over i2c >> * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c >> * 1GiB DDR3 RAM >> * RTL8723 Wifi/Bluetooth connected over USB >> >> Signed-off-by: Koen Kooi >> >> --- >> > [...] > >> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h >> index 652b10b..48df914 100644 >> --- a/board/ti/am335x/board.h >> +++ b/board/ti/am335x/board.h >> @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void) >> return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4); >> } >> >> +static inline int board_is_bben(void) > > Should be just static int ... the compiler can decide. I have a seperate patch for that, but I haven’t taken the time to compile both versions and look at size differences. regards, Koen > >> +{ >> +return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "SE", 2); >> +} > [...] > > -- > 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] Add Beaglebone Enhanced support
On Thu, Jul 19, 2018 at 02:55:37PM +0200, Marek Vasut wrote: > On 07/18/2018 10:13 AM, Koen Kooi wrote: > > The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black, > > but with the following differences: > > > > * Gigabit capable PHY > > * Extra USB hub, optional i2c control > > * lps3331ap barometer connected over i2c > > * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c > > * 1GiB DDR3 RAM > > * RTL8723 Wifi/Bluetooth connected over USB > > > > Signed-off-by: Koen Kooi > > > > --- > > > [...] > > > diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h > > index 652b10b..48df914 100644 > > --- a/board/ti/am335x/board.h > > +++ b/board/ti/am335x/board.h > > @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void) > > return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4); > > } > > > > +static inline int board_is_bben(void) > > Should be just static int ... the compiler can decide. No, it should be inline like all of the others in the file are. And then yes, if someone wants to do a size comparison with or without inlining on all of those functions, sure. -- 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] Add Beaglebone Enhanced support
> Op 19 jul. 2018, om 15:02 heeft Tom Rini het volgende > geschreven: > > On Thu, Jul 19, 2018 at 02:55:37PM +0200, Marek Vasut wrote: >> On 07/18/2018 10:13 AM, Koen Kooi wrote: >>> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black, >>> but with the following differences: >>> >>> * Gigabit capable PHY >>> * Extra USB hub, optional i2c control >>> * lps3331ap barometer connected over i2c >>> * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c >>> * 1GiB DDR3 RAM >>> * RTL8723 Wifi/Bluetooth connected over USB >>> >>> Signed-off-by: Koen Kooi >>> >>> --- >>> >> [...] >> >>> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h >>> index 652b10b..48df914 100644 >>> --- a/board/ti/am335x/board.h >>> +++ b/board/ti/am335x/board.h >>> @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void) >>> return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4); >>> } >>> >>> +static inline int board_is_bben(void) >> >> Should be just static int ... the compiler can decide. > > No, it should be inline like all of the others in the file are. And > then yes, if someone wants to do a size comparison with or without > inlining on all of those functions, sure. I wasn’t clear in my reply, I have a seperate patch that converts all of them :) regards, Koen > > -- > Tom ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
On 07/19/2018 03:02 PM, Tom Rini wrote: > On Thu, Jul 19, 2018 at 02:55:37PM +0200, Marek Vasut wrote: >> On 07/18/2018 10:13 AM, Koen Kooi wrote: >>> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black, >>> but with the following differences: >>> >>> * Gigabit capable PHY >>> * Extra USB hub, optional i2c control >>> * lps3331ap barometer connected over i2c >>> * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c >>> * 1GiB DDR3 RAM >>> * RTL8723 Wifi/Bluetooth connected over USB >>> >>> Signed-off-by: Koen Kooi >>> >>> --- >>> >> [...] >> >>> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h >>> index 652b10b..48df914 100644 >>> --- a/board/ti/am335x/board.h >>> +++ b/board/ti/am335x/board.h >>> @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void) >>> return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4); >>> } >>> >>> +static inline int board_is_bben(void) >> >> Should be just static int ... the compiler can decide. > > No, it should be inline like all of the others in the file are. And > then yes, if someone wants to do a size comparison with or without > inlining on all of those functions, sure. Can you explain why it should be static inline ? Last time this discussion came up in Linux kernel ML (decisions from which we seem to apply, cfr the SPDX C++ comments and DTC), static inline was frowned upon with the argument that the compiler can decide. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [RFC 2/2] env: Add prefix to error messages when loading env
On Thu, Jul 19, 2018 at 3:52 PM, Tom Rini wrote: > On Wed, Jul 18, 2018 at 04:09:33PM +0200, Wolfgang Denk wrote: >> Dear Tom, >> >> In message <20180718125351.GE4609@bill-the-cat> you wrote: >> > >> > > Loading Environment from FAT... >> > >--> MMC: no card present >> > >--> ** Bad device mmc 0 ** >> > >--> Failed (-5) >> > > Loading Environment from MMC... >> > >--> OK >> > > >> > > instead of: >> > > >> > > Loading Environment from FAT... MMC: no card present >> > > ** Bad device mmc 0 ** >> > > Failed (-5) >> > > Loading Environment from MMC... OK >> > >> > So, I think maybe (and given Wolfgang's comments) we should think about >> > how the output might want to look, and how to get there without GD >> > changes. Perhaps: >> > Attempting to load Environment from FAT (do we have more easily >> > available info at this point?): >> > MMC: no card present >> > ** Bad device mmc 0 ** >> > Failed (-5) >> > Loading Environment from MMC... >> > Attempting to load Environment from MMC: >> > Succeeded >> >> Just my 0.02€: >> >> In the non-error case, the output should be a single (ideally short) >> line. >> >> Rationale: to many lines of ourput clutter your screen and make you >> miss context faster; to many/long lines take time to print so they >> make booting slower. >> >> In the error case, the user should be able to understand what the >> problem was and decide if it was critical or can be ignored (like >> here when intentionally booting without SDCard). > > I understand, but I don't know if we can get there still. The problem > is we don't know if we've succeeded until we've done the relevant > probing and that in turn is what's breaking the single line, and got us > to where we are now. > Actually we can, please see my new RFC patch [1]. It's a bit hacky, but the only other way to do so is to rework drivers (MMC, etc). Also, I figured how to do prefixing (to display MMC errors as nested w.r.t. "Loading environment), without adding new field to gd. We can just add some new GD_LG_ and print prefix when it's installed. I'm gonna send new RFC soon. Please let me know what you think about [1]. [1] https://lists.denx.de/pipermail/u-boot/2018-July/335223.html > -- > Tom ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
On Thu, Jul 19, 2018 at 03:07:55PM +0200, Marek Vasut wrote: > On 07/19/2018 03:02 PM, Tom Rini wrote: > > On Thu, Jul 19, 2018 at 02:55:37PM +0200, Marek Vasut wrote: > >> On 07/18/2018 10:13 AM, Koen Kooi wrote: > >>> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black, > >>> but with the following differences: > >>> > >>> * Gigabit capable PHY > >>> * Extra USB hub, optional i2c control > >>> * lps3331ap barometer connected over i2c > >>> * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c > >>> * 1GiB DDR3 RAM > >>> * RTL8723 Wifi/Bluetooth connected over USB > >>> > >>> Signed-off-by: Koen Kooi > >>> > >>> --- > >>> > >> [...] > >> > >>> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h > >>> index 652b10b..48df914 100644 > >>> --- a/board/ti/am335x/board.h > >>> +++ b/board/ti/am335x/board.h > >>> @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void) > >>> return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4); > >>> } > >>> > >>> +static inline int board_is_bben(void) > >> > >> Should be just static int ... the compiler can decide. > > > > No, it should be inline like all of the others in the file are. And > > then yes, if someone wants to do a size comparison with or without > > inlining on all of those functions, sure. > > Can you explain why it should be static inline ? > Last time this discussion came up in Linux kernel ML (decisions from > which we seem to apply, cfr the SPDX C++ comments and DTC), static > inline was frowned upon with the argument that the compiler can decide. Ah, alright. So yeah, as people want to convert areas, that's fine. But no, just like how we also stay consistent within a file on other things, or fix those inconsistencies then add more stuff, no, we shouldn't have this be inconsistent. Fixing it in either order is fine with me. 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 21/25] fastboot: sunxi: Update fastboot mmc default device
On Wed, Jul 18, 2018 at 08:15:23PM +0100, Alex Kiernan wrote: > On Tue, Jul 17, 2018 at 12:57 PM Maxime Ripard > wrote: > > > > On Mon, Jul 16, 2018 at 12:11:59PM +0100, Alex Kiernan wrote: > > > On Mon, Jul 16, 2018 at 11:13 AM Jagan Teki > > > wrote: > > > > > > > > On Mon, Jul 16, 2018 at 3:16 PM, Maxime Ripard > > > > wrote: > > > > > On Mon, Jul 16, 2018 at 01:49:52PM +0530, Jagan Teki wrote: > > > > >> Usually eMMC is default env fat device for environment, > > > > >> if MMC_SUNXI_SLOT_EXTRA != 1 Sunxi always probed emmc > > > > >> device as 1. but with DM_MMC it can be more possible to > > > > >> probe eMMC as device 2 since for most of the sunxi platforms > > > > >> eMMC is configured mmc2. > > > > >> > > > > >> So update the fastboot mmc default device as 2 if DM_MMC and > > > > >> MMC_SUNXI_SLOT_EXTRA != 1 slot is 2 defined but some boards > > > > >> may not use all possible mmc devices or partly disabled in DT, > > > > >> for those update the device in board specific defconfig. > > > > >> > > > > >> Cc: Olliver Schinagl > > > > >> Cc: Chen-Yu Tsai > > > > >> Signed-off-by: Jagan Teki > > > > >> --- > > > > >> configs/A20-OLinuXino-Lime2-eMMC_defconfig | 1 + > > > > >> configs/Sinlinx_SinA33_defconfig | 1 + > > > > >> configs/amarula_a64_relic_defconfig| 1 + > > > > >> drivers/fastboot/Kconfig | 3 ++- > > > > >> 4 files changed, 5 insertions(+), 1 deletion(-) > > > > >> > > > > >> diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig > > > > >> b/configs/A20-OLinuXino-Lime2-eMMC_defconfig > > > > >> index 5657fc2594..20ea254191 100644 > > > > >> --- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig > > > > >> +++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig > > > > >> @@ -29,4 +29,5 @@ CONFIG_AXP_ALDO4_VOLT=2800 > > > > >> CONFIG_SCSI=y > > > > >> CONFIG_USB_EHCI_HCD=y > > > > >> CONFIG_USB_MUSB_GADGET=y > > > > >> +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 > > > > >> CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y > > > > >> diff --git a/configs/Sinlinx_SinA33_defconfig > > > > >> b/configs/Sinlinx_SinA33_defconfig > > > > >> index 394534b8b5..7841219a65 100644 > > > > >> --- a/configs/Sinlinx_SinA33_defconfig > > > > >> +++ b/configs/Sinlinx_SinA33_defconfig > > > > >> @@ -21,5 +21,6 @@ CONFIG_DFU_RAM=y > > > > >> CONFIG_FASTBOOT_CMD_OEM_FORMAT=y > > > > >> CONFIG_USB_EHCI_HCD=y > > > > >> CONFIG_USB_MUSB_GADGET=y > > > > >> +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 > > > > > > > > > > Your commit doesn't make any sense: the SinaA33 and the Lime2 both > > > > > have the eMMC on MMC2, and you claim you want to update the default to > > > > > point to MMC2, but you're changing both these boards to point to MMC1 > > > > > instead? > > > > > > > > If DM_MMC and SLOT != 1 => default device 2 which is updated by > > > > kconfig, this is with all relevant mmc nodes are enabled > > > > but these two boards mmc1 is not enabled so emmc will detected in > > > > device 1 > > > > > > > > > > > > > >> CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y > > > > >> CONFIG_USB_FUNCTION_MASS_STORAGE=y > > > > >> diff --git a/configs/amarula_a64_relic_defconfig > > > > >> b/configs/amarula_a64_relic_defconfig > > > > >> index b72cbfabc6..caeb3f6008 100644 > > > > >> --- a/configs/amarula_a64_relic_defconfig > > > > >> +++ b/configs/amarula_a64_relic_defconfig > > > > >> @@ -12,4 +12,5 @@ > > > > >> CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-amarula-relic" > > > > >> # CONFIG_SPL_DOS_PARTITION is not set > > > > >> # CONFIG_SPL_EFI_PARTITION is not set > > > > >> CONFIG_USB_MUSB_GADGET=y > > > > >> +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 > > > > >> CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y > > > > >> diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig > > > > >> index bc25ea1d9c..4a1bfd119c 100644 > > > > >> --- a/drivers/fastboot/Kconfig > > > > >> +++ b/drivers/fastboot/Kconfig > > > > >> @@ -88,7 +88,8 @@ config FASTBOOT_FLASH_MMC_DEV > > > > >> int "Define FASTBOOT MMC FLASH default device" > > > > >> depends on FASTBOOT_FLASH_MMC > > > > >> default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 > > > > >> - default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 > > > > >> + default 1 if ARCH_SUNXI && !DM_MMC && MMC_SUNXI_SLOT_EXTRA != > > > > >> -1 > > > > >> + default 2 if ARCH_SUNXI && DM_MMC && MMC_SUNXI_SLOT_EXTRA != -1 > > > > > > > > > > It'd be better to be fixed properly, instead of just relying on a > > > > > broken index. > > > > > > > > I don't think we can't do anything with this now, since this INDEX > > > > more rely on SPL for pinctrl enablement. if you have any suggestion > > > > please share. > > > > > > Would another answer (at least for this specific case) to change the > > > fastboot code so it doesn't need the device number in advance? Given > > > we get device names along the lines of 'mmcsda1', we could parse out > > > the 'a' to figure out the device number (and then use the alias code > > > so your board can expose a portable n
Re: [U-Boot] [PATCH V2 00/32] i.MX: Add i.MX8QXP support
Hi Peng, On Tue, Jul 17, 2018 at 10:35 PM, Peng Fan wrote: > This patchset is to upstream i.MX8QXP and mek board support, with some > drivers update to support i.MX8QXP. The information about the processor > could be found > https://www.nxp.com/products/processors-and-microcontrollers/applications-processors/i.mx-applications-processors/i.mx-8-processors/i.mx-8x-family-arm-cortex-a35-3d-graphics-4k-video-dsp-error-correcting-code-on-ddr:i.MX8X > > The architecture of i.MX8QXP is different from i.MX6/7/8M, inside i.MX8QXP, > there is a dedicated processor(SCU) used for power/clock/pin/ > pad/resource management/thermal and etc. I understand you are adding MX8QXP support in this series, but what happened to the previous MX8M one? I think we should get MX8M supported in U-Boot first. Also, in order to test this series we need a README file. Please prepare one so that we can test it. I hope you have managed to get rid of the custom mkimage by now :-) Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] env: Merge Rockchip, Sunxi, Zynq and ZynqMP
On 19.7.2018 13:13, Maxime Ripard wrote: > Hi, > > On Thu, Jul 19, 2018 at 08:45:45AM +0200, Michal Simek wrote: >> There is no reason to have the same Kconfig options for different SoCs >> separately. The patch is merging them together. >> >> Signed-off-by: Michal Simek >> --- >> >> Patch is based on >> https://lists.denx.de/pipermail/u-boot/2018-July/335126.html >> >> I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi >> have this in their configs. When they decide to move then can enable >> that option for them too. >> I expect when more platforms extend this we will have less constrain >> Kconfig setup. >> >> --- >> env/Kconfig | 66 >> - >> 1 file changed, 17 insertions(+), 49 deletions(-) >> >> diff --git a/env/Kconfig b/env/Kconfig >> index b37dcd78eb75..0ded003d7d41 100644 >> --- a/env/Kconfig >> +++ b/env/Kconfig >> @@ -431,23 +431,37 @@ config ENV_EXT4_FILE >>It's a string of the EXT4 file name. This file use to store the >>environment (explicit path to the file) >> >> -if ARCH_SUNXI >> +if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP > > Can we have a depends on instead? That would be more flexible. In what sense? If depends is used below then the same 4 platforms will be listed on all options below. (I want to also add ZYNQMP_R5 there too) And changing this in one place seems to me better then on four. >> config ENV_OFFSET >> hex "Environment Offset" >> depends on !ENV_IS_IN_UBI >> depends on !ENV_IS_NOWHERE >> +default 0x3f8000 if ARCH_ROCKCHIP >> default 0x88000 if ARCH_SUNXI >> +default 0xE if ARCH_ZYNQ >> +default 0x1E0 if ARCH_ZYNQMP >> help >>Offset from the start of the device (or partition) >> >> config ENV_SIZE >> hex "Environment Size" >> -depends on !ENV_IS_NOWHERE >> -default 0x2 if ARCH_SUNXI >> +default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE >> +default 0x2 if ARCH_SUNXI && !ENV_IS_NOWHERE > > I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you > have a case where the environment is not store anywhere but still need > a size? yes, I had a compilation warning for that case. in include/environment.h at line 145 it is written this #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE) ENV_SIZE is also used in typedef struct environment_s some lines below. And this structure is used a lot. How did you find out that this can't be used for ENV_IS_NOWHERE? Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 01/16] pico-imx7d: Convert to distro config
Hi Otavio On Fri, Jun 29, 2018 at 8:19 PM, Otavio Salvador wrote: > From: Fabio Estevam > > Instead of keeping a custom environment, use a more generic approach > by switching to disto config. > > Signed-off-by: Fabio Estevam > Signed-off-by: Otavio Salvador > --- > For all the series please add Tested-by: Michael Trimarchi > include/configs/pico-imx7d.h | 55 +--- > 1 file changed, 14 insertions(+), 41 deletions(-) > > diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h > index d2ffa70fc5..243c12faea 100644 > --- a/include/configs/pico-imx7d.h > +++ b/include/configs/pico-imx7d.h > @@ -41,48 +41,21 @@ > "console=ttymxc4\0" \ > "fdt_high=0x\0" \ > "initrd_high=0x\0" \ > - "fdt_file=imx7d-pico-pi.dtb\0" \ > + "fdtfile=imx7d-pico-pi.dtb\0" \ > "fdt_addr=0x8300\0" \ > - "ip_dyn=yes\0" \ > - "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ > - "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ > - "finduuid=part uuid mmc 0:2 uuid\0" \ > - "mmcargs=setenv bootargs console=${console},${baudrate} " \ > - "root=PARTUUID=${uuid} rootwait rw\0" \ > - "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ > - "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ > - "mmcboot=echo Booting from mmc ...; " \ > - "run finduuid; " \ > - "run mmcargs; " \ > - "if run loadfdt; then " \ > - "bootz ${loadaddr} - ${fdt_addr}; " \ > - "else " \ > - "echo WARN: Cannot load the DT; " \ > - "fi;\0" \ > - "netargs=setenv bootargs console=${console},${baudrate} " \ > - "root=/dev/nfs " \ > - "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ > - "netboot=echo Booting from net ...; " \ > - "run netargs; " \ > - "if test ${ip_dyn} = yes; then " \ > - "setenv get_cmd dhcp; " \ > - "else " \ > - "setenv get_cmd tftp; " \ > - "fi; " \ > - "${get_cmd} ${image}; " \ > - "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ > - "bootz ${loadaddr} - ${fdt_addr}; " \ > - "else " \ > - "echo WARN: Cannot load the DT; " \ > - "fi;\0" > - > -#define CONFIG_BOOTCOMMAND \ > - "if mmc rescan; then " \ > - "if run loadimage; then " \ > - "run mmcboot; " \ > - "else run netboot; " \ > - "fi; " \ > - "else run netboot; fi" > + "fdt_addr_r=0x8300\0" \ > + "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ > + "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ > + "ramdisk_addr_r=0x8300\0" \ > + "ramdiskaddr=0x8300\0" \ > + "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ > + BOOTENV > + > +#define BOOT_TARGET_DEVICES(func) \ > + func(MMC, mmc, 0) \ > + func(DHCP, dhcp, na) > + > +#include > > #define CONFIG_SYS_MEMTEST_START 0x8000 > #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + > 0x2000) > -- > 2.18.0 > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot -- | Michael Nazzareno Trimarchi Amarula Solutions BV | | COO - Founder Cruquiuskade 47 | | +31(0)851119172 Amsterdam 1018 AM NL | | [`as] http://www.amarulasolutions.com | ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V2 14/32] armv8: add cpu core helper functions
Hi Peng, On Tue, Jul 17, 2018 at 10:35 PM, Peng Fan wrote: > Add helper functions to identify different armv8 variants. > > Signed-off-by: Peng Fan > --- > arch/arm/include/asm/armv8/cpu.h | 26 ++ > 1 file changed, 26 insertions(+) > create mode 100644 arch/arm/include/asm/armv8/cpu.h > > diff --git a/arch/arm/include/asm/armv8/cpu.h > b/arch/arm/include/asm/armv8/cpu.h > new file mode 100644 > index 00..40d54dc85a > --- /dev/null > +++ b/arch/arm/include/asm/armv8/cpu.h > @@ -0,0 +1,26 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > +/* > + * Copyright 2018 NXP > + */ > + > +#define MIDR_PARTNUM_CORTEX_A350xD04 > +#define MIDR_PARTNUM_CORTEX_A530xD03 > +#define MIDR_PARTNUM_CORTEX_A720xD08 > +#define MIDR_PARTNUM_SHIFT 0x4 > +#define MIDR_PARTNUM_MASK (0xFFF << 0x4) > + > +static inline unsigned int read_midr(void) > +{ > + unsigned long val; > + > + asm volatile("mrs %0, midr_el1" : "=r" (val)); > + > + return val; > +} > + > +#define is_cortex_a35() (((read_midr() & MIDR_PARTNUM_MASK) >> \ > +MIDR_PARTNUM_SHIFT) == MIDR_PARTNUM_CORTEX_A35) > +#define is_cortex_a53() (((read_midr() & MIDR_PARTNUM_MASK) >> \ > +MIDR_PARTNUM_SHIFT) == MIDR_PARTNUM_CORTEX_A53) > +#define is_cortex_a72() (((read_midr() & MIDR_PARTNUM_MASK) >>\ > +MIDR_PARTNUM_SHIFT) == MIDR_PARTNUM_CORTEX_A72) This is not mx8 specific, so this header could be on a more common location. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V2 29/32] fsl_esdhc: Update usdhc driver to support i.MX8
On Tue, Jul 17, 2018 at 10:35 PM, Peng Fan wrote: > From: Ye Li > > Add CONFIG_ARCH_IMX8 to use the 64bits support in usdhc driver. > > Signed-off-by: Ye Li > Signed-off-by: Peng Fan > Cc: Jaehoon Chung > --- > drivers/mmc/fsl_esdhc.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c > index 4528345c67..785b9e87a6 100644 > --- a/drivers/mmc/fsl_esdhc.c > +++ b/drivers/mmc/fsl_esdhc.c > @@ -257,7 +257,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, > struct mmc *mmc, > int timeout; > struct fsl_esdhc *regs = priv->esdhc_regs; > #if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > - defined(CONFIG_MX8M) > + defined(CONFIG_ARCH_IMX8) || defined(CONFIG_MX8M) I am a bit confused: why do we need the || here? Doesn't CONFIG_ARCH_IMX8 also relate to MX8M? ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V2 00/32] i.MX: Add i.MX8QXP support
Hi Fabio, > -Original Message- > From: Fabio Estevam [mailto:feste...@gmail.com] > Sent: 2018年7月19日 21:42 > To: Peng Fan > Cc: Stefano Babic ; Fabio Estevam > ; U-Boot-Denx ; dl-linux-imx > ; Diego Dorta > Subject: Re: [U-Boot] [PATCH V2 00/32] i.MX: Add i.MX8QXP support > > Hi Peng, > > On Tue, Jul 17, 2018 at 10:35 PM, Peng Fan wrote: > > This patchset is to upstream i.MX8QXP and mek board support, with some > > drivers update to support i.MX8QXP. The information about the > > processor could be found > > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww > > .nxp.com%2Fproducts%2Fprocessors-and-microcontrollers%2Fapplications-p > > rocessors%2Fi.mx-applications-processors%2Fi.mx-8-processors%2Fi.mx-8x > > -family-arm-cortex-a35-3d-graphics-4k-video-dsp-error-correcting-code- > > > on-ddr%3Ai.MX8X&data=02%7C01%7Cpeng.fan%40nxp.com%7C3ec36c6b > 06ef45 > > > caefc608d5ed7d5a5d%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C > 636676 > > > 044997454563&sdata=LweMZY4wGqxws%2BDk%2FYZuwuCXZtj%2FKzEV > M98%2Be2z > > m2tA%3D&reserved=0 > > > > The architecture of i.MX8QXP is different from i.MX6/7/8M, inside > > i.MX8QXP, there is a dedicated processor(SCU) used for > > power/clock/pin/ pad/resource management/thermal and etc. > > I understand you are adding MX8QXP support in this series, but what happened > to the previous MX8M one? > > I think we should get MX8M supported in U-Boot first. As you could see from our internal maillist, Jacky has posted out i.MX8MM the Restricted DDR code for review today. i.MX8MQ ddr code restructure is his next step. After Jacky done that internally, the ddr and board code will be posted out to community. I understand the ddr part block i.MX8MQ support in community for months. But i.MX8QXP is totally different new architecture and it does not have the ddr code issue. Also the scfw part has been restructured in the patchset v2. Please consider reviewing the patchset > > Also, in order to test this series we need a README file. Please prepare one > so > that we can test it. Currently there is no public available code for atf and scfw, so There will no link in the README, I could only add steps on how to build out images. Is this ok? > > I hope you have managed to get rid of the custom mkimage by now :-) Still not. I have been working on other areas in the past days. Hope I could port imx-mkimage to uboot. Thanks, Peng. > > Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V2 26/32] serial_lpuart: Update lpuart driver to support i.MX8
On Tue, Jul 17, 2018 at 10:35 PM, Peng Fan wrote: > Add i.MX8 compatible string and cpu type support to lpuart driver, > to use little endian 32 bits configurations. > > Also, accroding to RM, the Receive FIFO Enable (RXFE) field in LPUART > FIFO register is bit 3, so the definition should change to 0x08 not 0x40 > for i.MX8, otherwise the Receive FIFO is not disabled. > > Signed-off-by: Peng Fan > Signed-off-by: Ye Li Who is the original author here? If it is Ye Li, then his name should appear in the From field. The driver part could be sent independently of this series. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V2 29/32] fsl_esdhc: Update usdhc driver to support i.MX8
Hi Fabio, > -Original Message- > From: Fabio Estevam [mailto:feste...@gmail.com] > Sent: 2018年7月19日 22:01 > To: Peng Fan > Cc: Stefano Babic ; Fabio Estevam > ; U-Boot-Denx ; dl-linux-imx > > Subject: Re: [U-Boot] [PATCH V2 29/32] fsl_esdhc: Update usdhc driver to > support i.MX8 > > On Tue, Jul 17, 2018 at 10:35 PM, Peng Fan wrote: > > From: Ye Li > > > > Add CONFIG_ARCH_IMX8 to use the 64bits support in usdhc driver. > > > > Signed-off-by: Ye Li > > Signed-off-by: Peng Fan > > Cc: Jaehoon Chung > > --- > > drivers/mmc/fsl_esdhc.c | 8 > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index > > 4528345c67..785b9e87a6 100644 > > --- a/drivers/mmc/fsl_esdhc.c > > +++ b/drivers/mmc/fsl_esdhc.c > > @@ -257,7 +257,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > *priv, struct mmc *mmc, > > int timeout; > > struct fsl_esdhc *regs = priv->esdhc_regs; #if > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_MX8M) > > + defined(CONFIG_ARCH_IMX8) || defined(CONFIG_MX8M) > > I am a bit confused: why do we need the || here? > > Doesn't CONFIG_ARCH_IMX8 also relate to MX8M? There is i.MX8/8X/8M, 8M is for i.MX8MQ and i.MX8MM i.MX8/8X has different SoC architecture compared with i.MX8M, such as there is SCU inside i.MX8/8X. So add a new macro dedicated for i.MX8/8X. Thanks, Peng. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 01/11] arch: arm: mach-rockchip: rk3288: Enable regulators in board_init
Hi Philipp, Am 18.07.2018 um 11:05 schrieb Dr. Philipp Tomsich: > Janine, > >> On 18 Jul 2018, at 10:46, Janine Hagemann wrote: >> >> At start-up, the regulators have to be enabled. Let's use >> regulators_enable_boot_on() to enable the regulators needed >> for boot. >> >> Signed-off-by: Wadim Egorov >> Signed-off-by: Janine Hagemann > An equivalent change from Carlo has already been applied to U-Boot master. > Please review whether there’s additional changes needed, otherwise I’ll just > skip this one when processing. I don't see this patch on master. Anyway, Carlos patch enables the regulators only for the google veyrons. Regards, Wadim > > Thanks, > Philipp. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V2 00/32] i.MX: Add i.MX8QXP support
On Thu, Jul 19, 2018 at 11:02 AM, Peng Fan wrote: > Currently there is no public available code for atf and scfw, so > There will no link in the README, I could only add steps > on how to build out images. Is this ok? Yes, a REAME file with the steps for generating a bootable SD card would be very helpful for us to test it. Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V2 00/32] i.MX: Add i.MX8QXP support
Hi Peng, On Thu, 19 Jul 2018 14:02:43 + Peng Fan peng@nxp.com wrote: ... > > Also, in order to test this series we need a README file. > > Please prepare one so that we can test it. > > Currently there is no public available code for atf and scfw, so > There will no link in the README, I could only add steps > on how to build out images. Is this ok? I'd like to test this series, too. It would be good if a README existed in the board directory, with some instructions how to build and install an image on SD card (or other boot source, if already supported). E.g. like board/freescale/mx6sabresd/README. Thanks! -- Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] env: Merge Rockchip, Sunxi, Zynq and ZynqMP
On Thu, Jul 19, 2018 at 03:45:11PM +0200, Michal Simek wrote: > On 19.7.2018 13:13, Maxime Ripard wrote: > > Hi, > > > > On Thu, Jul 19, 2018 at 08:45:45AM +0200, Michal Simek wrote: > >> There is no reason to have the same Kconfig options for different SoCs > >> separately. The patch is merging them together. > >> > >> Signed-off-by: Michal Simek > >> --- > >> > >> Patch is based on > >> https://lists.denx.de/pipermail/u-boot/2018-July/335126.html > >> > >> I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi > >> have this in their configs. When they decide to move then can enable > >> that option for them too. > >> I expect when more platforms extend this we will have less constrain > >> Kconfig setup. > >> > >> --- > >> env/Kconfig | 66 > >> - > >> 1 file changed, 17 insertions(+), 49 deletions(-) > >> > >> diff --git a/env/Kconfig b/env/Kconfig > >> index b37dcd78eb75..0ded003d7d41 100644 > >> --- a/env/Kconfig > >> +++ b/env/Kconfig > >> @@ -431,23 +431,37 @@ config ENV_EXT4_FILE > >> It's a string of the EXT4 file name. This file use to store the > >> environment (explicit path to the file) > >> > >> -if ARCH_SUNXI > >> +if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP > > > > Can we have a depends on instead? That would be more flexible. > > In what sense? If depends is used below then the same 4 platforms will > be listed on all options below. (I want to also add ZYNQMP_R5 there too) > And changing this in one place seems to me better then on four. For now I like the "if" method for now as we can't (or couldn't a while ago) globally migrate everyone over. I think trying to move everyone over again is something I should give another try. > >> config ENV_OFFSET > >>hex "Environment Offset" > >>depends on !ENV_IS_IN_UBI > >>depends on !ENV_IS_NOWHERE > >> + default 0x3f8000 if ARCH_ROCKCHIP > >>default 0x88000 if ARCH_SUNXI > >> + default 0xE if ARCH_ZYNQ > >> + default 0x1E0 if ARCH_ZYNQMP > >>help > >> Offset from the start of the device (or partition) > >> > >> config ENV_SIZE > >>hex "Environment Size" > >> - depends on !ENV_IS_NOWHERE > >> - default 0x2 if ARCH_SUNXI > >> + default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE > >> + default 0x2 if ARCH_SUNXI && !ENV_IS_NOWHERE > > > > I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you > > have a case where the environment is not store anywhere but still need > > a size? > > yes, I had a compilation warning for that case. > > in include/environment.h at line 145 it is written this > #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE) > > ENV_SIZE is also used in typedef struct environment_s some lines below. > And this structure is used a lot. > > How did you find out that this can't be used for ENV_IS_NOWHERE? I would have sworn that ENV_SIZE is used for ENV_IS_NOWHERE as that's how much space we have for environment when it's in memory as well. -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [GIT PULL] Xilinx changes for v2018.09
Hi Tom, please pull these changes to your tree. Buildman and travis looks good https://travis-ci.org/michalsimek/u-boot/builds/405716862 My pull request contains some change out of xilinx folders because one function name has been changed. I got a confirmation from Marek to go with this to the tree. And also some small changes in common area which were reviewed. usb_kdb is an exception because probably none cares. You can find more details below. Thanks, Michal The following changes since commit 1adbf2966adebe67de3dd17094749d387604194e: Merge branch 'master' of git://git.denx.de/u-boot-sunxi (2018-07-17 14:28:47 -0400) are available in the git repository at: git://www.denx.de/git/u-boot-microblaze.git tags/xilinx-for-v2018.09 for you to fetch changes up to 577012da71ea9dcf07272c7f458218aa8ab29984: arm: zynq: spl: fix FPGA initialization (2018-07-19 10:49:57 +0200) Xilinx changes for v2018.09 clk: - Fix zynqmp clock driver common: - Handle CMD_RET_USAGE in cmd_process_error - Use return macros in cmd_process_error - Fix duplication of CONFIG_SYS_PROMPT_HUSH_PS2 - Support watchdog in usb_kbd.c - Fix name usage in usb_kbd.c - Support systems with non zero memory start initialized from DT only gpio: - Add support for manual relocation in uclass - zynq - use live tree - zynq - fix match data reading - zynq - setup bank name - xilinx - convert driver to DM microblaze: - Use generic iounmap/ioremap implementations - Redesign reset logic with sysreset features - Use watchdog and gpio over DM - Remove unused macros and fix some checkpatch issues - Fix timer initialization not to be called twice serial: - zynq - Use platdata intead of priv data sysreset: - Add support for manual relocation in uclass - Add gpio-restart driver - Add microblaze soft reset driver watchdog: - Add support for aliases in uclass - Add support for manual relocation in uclass - Convert xilinx driver to DM - cadence - update info in the driver and not stop wdt in probe xilinx: - Enable LED gpio for some targets with gpio-leds DT node - Setup variables via Kconfig zynq: - Add support for watchdog aliases - Add support for mini nand/nor configurations - Wire FPGA initalization in SPL zynqmp: - Enable mass storage for zcu100 - Handle external pmufw files - Add support for secure images - Some Kconfig movements and alignments - Add support for watchdog aliases - Use subcommands style for platform command - Add mmio_read/write platform commands - DT updates - Add support for mini qspi configuration Luca Ceresoli (1): arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable Luis Araneda (3): spl: fit: display a message when an FPGA image is loaded drivers: fpga: zynqpl: fix compilation with SPL arm: zynq: spl: fix FPGA initialization Michal Simek (36): gpio: zynq: Use live-tree function arm64: zynqmp: Enable usb mass storage command and functionality common: command: Use command_ret_t enum values instead of values common: command: Handle USAGE failure separately hush: Remove default CONFIG_SYS_PROMPT_HUSH_PS2 setting from board files usb_kbd: Add support for watchdog usb_kdb: Get stdio_dev directly from sdev pointer serial: zynq: Use platdata for storing static data instead of priv microblaze: Use default implementation from include/linux/io.h microblaze: Guard do_reset by CONFIG_SYSRESET arm64: zcu100: Enable USB host ether and ASIX via defconfig watchdog: dm: Change uclass name to watchdog and enable DM_UC_FLAG_SEQ_ALIAS watchdog: dm: Support manual relocation for watchdogs arm64: zynqmp: Sync defconfigs in connection to DEFINE_TCM_OCM_MMAP microblaze: Remove unused XILINX_BOARD_NAME macro gpio: zynq: Fix typo in one error message sysreset: dm: Support manual relocation for sysreset gpio: dm: Support manual relocation for gpio gpio: zynq: Read of mach data in platdata with dev_get_driver_data microblaze: Do not call timer init that early gpio: zynq: Setup bank_name to dev->name arm64: zynqmp: Try to enable the first watchdog via aliases arm: zynq: Try to enable the first watchdog via aliases sysreset: Add support for gpio-restart sysreset: Add support for Microblaze soft reset jump gpio: xilinx: Convert driver to DM microblaze: Enable watchdog via defconfig arm64: xilinx: Setup default number of chipselects for zcu100 microblaze: Convert generic platform to DM gpio microblaze: Do not force saving variables to flash watchdog: cdns: Add comment for expire_now function xilinx: Enable led support for some boards watchdog: cadence: Do not stop wdt in probe microblaze: Remove XILINX_SPI_FLASH_BASEADDR logic arm: zynq: Setup ENV_SIZE via Kconfig arm
Re: [U-Boot] [PATCH v2 2/3] x86: acpi: Don't touch ACPI hardware in write_acpi_tables()
On 18 July 2018 at 22:42, Bin Meng wrote: > write_acpi_tables() currently touches ACPI hardware to switch to > ACPI mode at the end. Move such operation out of this function, > so that it only does what the function name tells us. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - move variable definition to the first line in the function > > arch/x86/cpu/cpu.c| 21 ++--- > arch/x86/lib/acpi_table.c | 11 --- > 2 files changed, 18 insertions(+), 14 deletions(-) Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/3] x86: acpi: Prevent acpi_table.h from being included more than once
On 18 July 2018 at 22:42, Bin Meng wrote: > The wrapper #ifndef is currently missing in acpi_table.h. Add it to > prevent it from being included multiple times. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: None > > arch/x86/include/asm/acpi_table.h | 5 + > 1 file changed, 5 insertions(+) Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4] watchdog: Convert Xilinx Axi watchdog driver to driver model
On 19 July 2018 at 01:15, Michal Simek wrote: > From: Shreenidhi Shedi > > Xilinx Axi wdt driver conversion to driver model & Kconfig update > for the same. > > Signed-off-by: Shreenidhi Shedi > Signed-off-by: Michal Simek > --- > > Changes in v4: > - Fix Kconfig typo - by sjg > - Use debug instead of puts in drivers - by sjg > - Use EBUSY instead of -1 - by sjg > > Changes in v3: > - Fix commit message > - s/Axi/AXI > - Use platdata instead of private data. > - Remove \n from wdt reset to catch logs > - Add debug to wdt_start > > Changes in v2: > - Rectified print message > - Removed stop instruction from probe > > Changes in v1: > - Xilinx Axi wdt driver conversion to DM initial version > > drivers/watchdog/Kconfig | 8 +++ > drivers/watchdog/xilinx_tb_wdt.c | 111 > ++- > 2 files changed, 93 insertions(+), 26 deletions(-) Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] watchdog: dm: Support manual relocation for watchdogs
+Tom Hi Michal, On 19 July 2018 at 00:52, Michal Simek wrote: > Hi Simon, > > On 19.7.2018 03:31, Simon Glass wrote: >> Hi Michal, >> >> On 15 July 2018 at 23:34, Michal Simek wrote: >>> On 15.7.2018 23:21, Simon Glass wrote: Hi Michal, On 11 July 2018 at 23:47, Michal Simek wrote: > On 11.7.2018 22:13, Simon Glass wrote: >> On 11 July 2018 at 08:41, Michal Simek wrote: >>> Relocate watchdog ops as was done by: >>> "dm: Add support for all targets which requires MANUAL_RELOC" >>> (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3) >>> >>> Signed-off-by: Michal Simek >>> --- >>> >>> based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html >>> >>> --- >>> drivers/watchdog/wdt-uclass.c | 23 +++ >>> 1 file changed, 23 insertions(+) >>> >> >> Reviewed-by: Simon Glass >> >> When will the toolchain be fixed? > > It is really several years back when I have looked at it last time but I > think that toolchain is fixed for quite some time and only changes in > microblaze u-boot code are needed but really I would have to check and > start to play with it. I think someone should sort this out. It would be good to remove this code. Is there a toolchain group at Xilinx? >>> >>> Xilinx has a toolchain group. I just looked a I was playing with it in >>> January 2015 but didn't finish that. It is still on my long todo list. >>> Will see when I have a time to look at it. >> >> Hoe about next week? -:) I think this is pretty important. > > will see but I need to do some Linux work first. Based on grep I see > that m68k is also enabling CONFIG_NEEDS_MANUAL_RELOC. > Is m68k going to be removed soon? I am not sure about that. Tom, do you know? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/5] x86: tangier: Add a sysreset driver
On 19 July 2018 at 04:07, Bin Meng wrote: > This adds a reset driver for tangier processor. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - new patch to add a reset driver for tangier processor > > arch/x86/cpu/tangier/Makefile | 2 +- > arch/x86/cpu/tangier/sysreset.c | 48 > + > 2 files changed, 49 insertions(+), 1 deletion(-) > create mode 100644 arch/x86/cpu/tangier/sysreset.c Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] x86: acpi: Move APIs unrelated to ACPI tables generation to a separate library
On 18 July 2018 at 22:42, Bin Meng wrote: > acpi_find_fadt(), acpi_find_wakeup_vector() and enter_acpi_mode() > are something unrelated to ACPI tables generation. Move these to > a separate library. > > This also fixes several style issues reported by checkpatch in the > original codes. > > Signed-off-by: Bin Meng > --- > > Changes in v2: None > > arch/x86/cpu/cpu.c| 1 + > arch/x86/include/asm/acpi.h | 41 +++ > arch/x86/include/asm/acpi_table.h | 28 -- > arch/x86/lib/Makefile | 1 + > arch/x86/lib/acpi.c | 108 > ++ > arch/x86/lib/acpi_s3.c| 1 + > arch/x86/lib/acpi_table.c | 101 +-- > 7 files changed, 153 insertions(+), 128 deletions(-) > create mode 100644 arch/x86/include/asm/acpi.h > create mode 100644 arch/x86/lib/acpi.c Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/5] efi: app: Add a sysreset driver
On 19 July 2018 at 04:07, Bin Meng wrote: > This adds the DM sysreset driver for EFI application support. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - drop patches already applied > - new patch to add a sysreset driver for efi app > > lib/efi/efi_app.c | 28 +++- > 1 file changed, 27 insertions(+), 1 deletion(-) Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 03/15] cmd: fpga: Move fpga_get_op to avoid local function declaration
Hi Michal, On 19 July 2018 at 00:55, Michal Simek wrote: > On 19.7.2018 03:32, Simon Glass wrote: >> On 18 July 2018 at 09:16, Michal Simek wrote: >>> Move fpga_get_op() to top of file to remove local function declaration >>> and also remove useless retyping. >>> >>> Signed-off-by: Michal Simek >>> --- >>> >>> cmd/fpga.c | 85 >>> ++ >>> 1 file changed, 41 insertions(+), 44 deletions(-) >>> >> >> Reviewed-by: Simon Glass >> >> But can this not use a sub-command array? > > As you see the whole series is coming to that direction. > I just needed to do some preparation steps before doing that. Yes I t see that, thanks. - Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 5/5] x86: Switch to use DM sysreset driver
On 19 July 2018 at 04:07, Bin Meng wrote: > This converts all x86 boards over to DM sysreset. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - remove include of "reset.dsti" in edison.dts > - add SYSRESET for efi-x86_app and edison > > arch/Kconfig | 2 ++ > arch/x86/cpu/baytrail/valleyview.c| 6 -- > arch/x86/cpu/braswell/braswell.c | 6 -- > arch/x86/cpu/cpu.c| 26 -- > arch/x86/cpu/ivybridge/early_me.c | 7 --- > arch/x86/cpu/ivybridge/sdram.c| 3 ++- > arch/x86/cpu/qemu/qemu.c | 6 -- > arch/x86/cpu/quark/quark.c| 6 -- > arch/x86/cpu/tangier/tangier.c| 6 -- > arch/x86/dts/bayleybay.dts| 1 + > arch/x86/dts/baytrail_som-db5800-som-6867.dts | 1 + > arch/x86/dts/broadwell_som-6896.dts | 1 + > arch/x86/dts/cherryhill.dts | 1 + > arch/x86/dts/chromebook_link.dts | 1 + > arch/x86/dts/chromebook_samus.dts | 1 + > arch/x86/dts/chromebox_panther.dts| 1 + > arch/x86/dts/conga-qeval20-qa3-e3845.dts | 1 + > arch/x86/dts/cougarcanyon2.dts| 1 + > arch/x86/dts/crownbay.dts | 1 + > arch/x86/dts/dfi-bt700.dtsi | 1 + > arch/x86/dts/edison.dts | 5 + > arch/x86/dts/efi-x86_app.dts | 5 + > arch/x86/dts/efi-x86_payload.dts | 1 + > arch/x86/dts/galileo.dts | 1 + > arch/x86/dts/minnowmax.dts| 1 + > arch/x86/dts/qemu-x86_i440fx.dts | 1 + > arch/x86/dts/qemu-x86_q35.dts | 1 + > arch/x86/dts/reset.dtsi | 6 ++ > arch/x86/include/asm/processor.h | 5 - > arch/x86/include/asm/u-boot-x86.h | 1 - > configs/chromebook_link64_defconfig | 1 + > 31 files changed, 41 insertions(+), 66 deletions(-) > create mode 100644 arch/x86/dts/reset.dtsi Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/6] fdt_support: make fdt_fixup_mtdparts() prototype more specific
Hi Masahiro, On 19 July 2018 at 01:28, Masahiro Yamada wrote: > The second argument of fdt_fixup_mtdparts() is an opaque pointer, > 'void *node_info', hence callers can pass any pointer. > > Obviously, fdt_fixup_mtdparts() expects 'struct node_info *' > otherwise, it crashes run-time. > > Change the prototype so that it is compile-time checked. > > Also, add 'const' qualifier to it so that callers can constify > the struct node_info arrays. > > Signed-off-by: Masahiro Yamada > --- > > common/fdt_support.c | 13 +++-- > include/fdt_support.h | 11 --- > 2 files changed, 15 insertions(+), 9 deletions(-) > Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/5] dm: sysreset: Add a standard message when doing reset
On 19 July 2018 at 04:07, Bin Meng wrote: > It's good to print a message when doing reset. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - new patch per Wolfgang's suggestion to add a standard message when > doing reset > > drivers/sysreset/sysreset-uclass.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Simon Glass I wonder how many platforms will actually show this message and how many will just put it in their serial buffer and then discard it? ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/5] x86: fsp: Eliminate the reset_cpu() call
On 19 July 2018 at 04:07, Bin Meng wrote: > In preparation for the reset driver conversion, eliminate the > reset_cpu() call in the FSP init path as it's too early for the > reset driver to work. > > Signed-off-by: Bin Meng > --- > > Changes in v2: None > > arch/x86/lib/fsp/fsp_common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Adding back Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] watchdog: dm: Support manual relocation for watchdogs
On Thu, Jul 19, 2018 at 09:21:39AM -0600, Simon Glass wrote: > +Tom > > Hi Michal, > > On 19 July 2018 at 00:52, Michal Simek wrote: > > Hi Simon, > > > > On 19.7.2018 03:31, Simon Glass wrote: > >> Hi Michal, > >> > >> On 15 July 2018 at 23:34, Michal Simek wrote: > >>> On 15.7.2018 23:21, Simon Glass wrote: > Hi Michal, > > On 11 July 2018 at 23:47, Michal Simek wrote: > > On 11.7.2018 22:13, Simon Glass wrote: > >> On 11 July 2018 at 08:41, Michal Simek wrote: > >>> Relocate watchdog ops as was done by: > >>> "dm: Add support for all targets which requires MANUAL_RELOC" > >>> (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3) > >>> > >>> Signed-off-by: Michal Simek > >>> --- > >>> > >>> based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html > >>> > >>> --- > >>> drivers/watchdog/wdt-uclass.c | 23 +++ > >>> 1 file changed, 23 insertions(+) > >>> > >> > >> Reviewed-by: Simon Glass > >> > >> When will the toolchain be fixed? > > > > It is really several years back when I have looked at it last time but I > > think that toolchain is fixed for quite some time and only changes in > > microblaze u-boot code are needed but really I would have to check and > > start to play with it. > > I think someone should sort this out. It would be good to remove this > code. Is there a toolchain group at Xilinx? > >>> > >>> Xilinx has a toolchain group. I just looked a I was playing with it in > >>> January 2015 but didn't finish that. It is still on my long todo list. > >>> Will see when I have a time to look at it. > >> > >> Hoe about next week? -:) I think this is pretty important. > > > > will see but I need to do some Linux work first. Based on grep I see > > that m68k is also enabling CONFIG_NEEDS_MANUAL_RELOC. > > Is m68k going to be removed soon? > > I am not sure about that. Tom, do you know? m68k is still active, so no, it's not being removed and we can't drop CONFIG_NEEDS_MANUAL_RELOC just yet. -- 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] fdt: fix fdtdec_setup_memory_banksize()
On Thu, Jul 19, 2018 at 3:32 AM, Simon Glass wrote: > Hi Jens, > > On 17 July 2018 at 09:42, Jens Wiklander wrote: >> On Sun, Jul 15, 2018 at 11:20:39PM -0600, Simon Glass wrote: >>> On 13 July 2018 at 04:12, Jens Wiklander wrote: >>> > Prior to this patch is fdtdec_setup_memory_banksize() incorrectly >>> > ignoring the "status" field. This patch fixes that by testing the status >>> > with fdtdec_get_is_enabled() before using a memory node. >>> > >>> > Signed-off-by: Jens Wiklander >>> > --- >>> > lib/fdtdec.c | 20 +++- >>> > 1 file changed, 15 insertions(+), 5 deletions(-) >>> >>> Reviewed-by: Simon Glass >>> >>> But can you convert this to livetree at the same time? E.g. use ofnode >>> functions. >> >> I can try, but the ofnode concept is new to me. >> >> This patch is based on the fdt_node_offset_by_prop_value() function. I >> can't find any such ofnode function or any other suitable helper >> function. Perhaps I'm missing something, or should I add an >> ofnode_by_prop_value() function (similar to ofnode_by_compatible())? >> >> Please advice. > > advise :-) > > Yes, you could add that function. Sorry it doesn't already exists. I'll give it a shot after my vacation. In the meantime can we take this patch or would you rather wait for the livetree version? Thanks, Jens ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] env: Merge Rockchip, Sunxi, Zynq and ZynqMP
On Thu, Jul 19, 2018 at 10:53:44AM -0400, Tom Rini wrote: > On Thu, Jul 19, 2018 at 03:45:11PM +0200, Michal Simek wrote: > > On 19.7.2018 13:13, Maxime Ripard wrote: > > > Hi, > > > > > > On Thu, Jul 19, 2018 at 08:45:45AM +0200, Michal Simek wrote: > > >> There is no reason to have the same Kconfig options for different SoCs > > >> separately. The patch is merging them together. > > >> > > >> Signed-off-by: Michal Simek > > >> --- > > >> > > >> Patch is based on > > >> https://lists.denx.de/pipermail/u-boot/2018-July/335126.html > > >> > > >> I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi > > >> have this in their configs. When they decide to move then can enable > > >> that option for them too. > > >> I expect when more platforms extend this we will have less constrain > > >> Kconfig setup. > > >> > > >> --- > > >> env/Kconfig | 66 > > >> - > > >> 1 file changed, 17 insertions(+), 49 deletions(-) > > >> > > >> diff --git a/env/Kconfig b/env/Kconfig > > >> index b37dcd78eb75..0ded003d7d41 100644 > > >> --- a/env/Kconfig > > >> +++ b/env/Kconfig > > >> @@ -431,23 +431,37 @@ config ENV_EXT4_FILE > > >>It's a string of the EXT4 file name. This file use to store > > >> the > > >>environment (explicit path to the file) > > >> > > >> -if ARCH_SUNXI > > >> +if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP > > > > > > Can we have a depends on instead? That would be more flexible. > > > > In what sense? If depends is used below then the same 4 platforms will > > be listed on all options below. (I want to also add ZYNQMP_R5 there too) > > And changing this in one place seems to me better then on four. > > For now I like the "if" method for now as we can't (or couldn't a while > ago) globally migrate everyone over. I think trying to move everyone > over again is something I should give another try. Ack. > > >> config ENV_OFFSET > > >> hex "Environment Offset" > > >> depends on !ENV_IS_IN_UBI > > >> depends on !ENV_IS_NOWHERE > > >> +default 0x3f8000 if ARCH_ROCKCHIP > > >> default 0x88000 if ARCH_SUNXI > > >> +default 0xE if ARCH_ZYNQ > > >> +default 0x1E0 if ARCH_ZYNQMP > > >> help > > >>Offset from the start of the device (or partition) > > >> > > >> config ENV_SIZE > > >> hex "Environment Size" > > >> -depends on !ENV_IS_NOWHERE > > >> -default 0x2 if ARCH_SUNXI > > >> +default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE > > >> +default 0x2 if ARCH_SUNXI && !ENV_IS_NOWHERE > > > > > > I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you > > > have a case where the environment is not store anywhere but still need > > > a size? > > > > yes, I had a compilation warning for that case. > > > > in include/environment.h at line 145 it is written this > > #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE) > > > > ENV_SIZE is also used in typedef struct environment_s some lines below. > > And this structure is used a lot. > > > > How did you find out that this can't be used for ENV_IS_NOWHERE? > > I would have sworn that ENV_SIZE is used for ENV_IS_NOWHERE as that's > how much space we have for environment when it's in memory as well. Argh, sorry for that I was abused by sunxi-common still having that: https://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/sunxi-common.h#l161 While i was convinced that we were relying solely on Kconfig. I'll send a subsequent patch, that one works for me. Sorry, Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com 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 3/5] dm: sysreset: Add a standard message when doing reset
On Thu, 2018-07-19 at 09:21 -0600, Simon Glass wrote: > On 19 July 2018 at 04:07, Bin Meng wrote: > > It's good to print a message when doing reset. > > > > Signed-off-by: Bin Meng > > > > --- > > > > Changes in v2: > > - new patch per Wolfgang's suggestion to add a standard message when > > doing reset > > > > drivers/sysreset/sysreset-uclass.c | 2 ++ > > 1 file changed, 2 insertions(+) > > Reviewed-by: Simon Glass > > I wonder how many platforms will actually show this message and how > many will just put it in their serial buffer and then discard it? Edison does. -- Andy Shevchenko Intel Finland Oy ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 4/4] arm: zynq: spl: implement FPGA load from FIT
Hi Michal, On Thu, Jul 19, 2018 at 2:16 AM Michal Simek wrote: > Also on zc706 without FULL_FIT my path in spl_load_fit_image is not > jumping to "if (external_data) {" branch where spl_load_fpga_image is > which is kind of interesting because it looks like you are going there. To enter the path "if (external_data) {" branch where spl_load_fpga_image is}" you have to create the FIT image with the "-E" option, I'm creating it with: > ./tools/mkimage -f -E I started to use the option because my initial tests weren't entering the path either, and I found it when analyzing the (generated) .u-boot.img.cmd file. I just tested your patch with and without the "-E" option, and it works on both cases :) Thanks, Luis Araneda. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 21/25] fastboot: sunxi: Update fastboot mmc default device
On Thu, Jul 19, 2018 at 6:56 PM, Maxime Ripard wrote: > On Wed, Jul 18, 2018 at 08:15:23PM +0100, Alex Kiernan wrote: >> On Tue, Jul 17, 2018 at 12:57 PM Maxime Ripard >> wrote: >> > >> > On Mon, Jul 16, 2018 at 12:11:59PM +0100, Alex Kiernan wrote: >> > > On Mon, Jul 16, 2018 at 11:13 AM Jagan Teki >> > > wrote: >> > > > >> > > > On Mon, Jul 16, 2018 at 3:16 PM, Maxime Ripard >> > > > wrote: >> > > > > On Mon, Jul 16, 2018 at 01:49:52PM +0530, Jagan Teki wrote: >> > > > >> Usually eMMC is default env fat device for environment, >> > > > >> if MMC_SUNXI_SLOT_EXTRA != 1 Sunxi always probed emmc >> > > > >> device as 1. but with DM_MMC it can be more possible to >> > > > >> probe eMMC as device 2 since for most of the sunxi platforms >> > > > >> eMMC is configured mmc2. >> > > > >> >> > > > >> So update the fastboot mmc default device as 2 if DM_MMC and >> > > > >> MMC_SUNXI_SLOT_EXTRA != 1 slot is 2 defined but some boards >> > > > >> may not use all possible mmc devices or partly disabled in DT, >> > > > >> for those update the device in board specific defconfig. >> > > > >> >> > > > >> Cc: Olliver Schinagl >> > > > >> Cc: Chen-Yu Tsai >> > > > >> Signed-off-by: Jagan Teki >> > > > >> --- >> > > > >> configs/A20-OLinuXino-Lime2-eMMC_defconfig | 1 + >> > > > >> configs/Sinlinx_SinA33_defconfig | 1 + >> > > > >> configs/amarula_a64_relic_defconfig| 1 + >> > > > >> drivers/fastboot/Kconfig | 3 ++- >> > > > >> 4 files changed, 5 insertions(+), 1 deletion(-) >> > > > >> >> > > > >> diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> > > > >> b/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> > > > >> index 5657fc2594..20ea254191 100644 >> > > > >> --- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> > > > >> +++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> > > > >> @@ -29,4 +29,5 @@ CONFIG_AXP_ALDO4_VOLT=2800 >> > > > >> CONFIG_SCSI=y >> > > > >> CONFIG_USB_EHCI_HCD=y >> > > > >> CONFIG_USB_MUSB_GADGET=y >> > > > >> +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 >> > > > >> CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y >> > > > >> diff --git a/configs/Sinlinx_SinA33_defconfig >> > > > >> b/configs/Sinlinx_SinA33_defconfig >> > > > >> index 394534b8b5..7841219a65 100644 >> > > > >> --- a/configs/Sinlinx_SinA33_defconfig >> > > > >> +++ b/configs/Sinlinx_SinA33_defconfig >> > > > >> @@ -21,5 +21,6 @@ CONFIG_DFU_RAM=y >> > > > >> CONFIG_FASTBOOT_CMD_OEM_FORMAT=y >> > > > >> CONFIG_USB_EHCI_HCD=y >> > > > >> CONFIG_USB_MUSB_GADGET=y >> > > > >> +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 >> > > > > >> > > > > Your commit doesn't make any sense: the SinaA33 and the Lime2 both >> > > > > have the eMMC on MMC2, and you claim you want to update the default >> > > > > to >> > > > > point to MMC2, but you're changing both these boards to point to MMC1 >> > > > > instead? >> > > > >> > > > If DM_MMC and SLOT != 1 => default device 2 which is updated by >> > > > kconfig, this is with all relevant mmc nodes are enabled >> > > > but these two boards mmc1 is not enabled so emmc will detected in >> > > > device 1 >> > > > >> > > > > >> > > > >> CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y >> > > > >> CONFIG_USB_FUNCTION_MASS_STORAGE=y >> > > > >> diff --git a/configs/amarula_a64_relic_defconfig >> > > > >> b/configs/amarula_a64_relic_defconfig >> > > > >> index b72cbfabc6..caeb3f6008 100644 >> > > > >> --- a/configs/amarula_a64_relic_defconfig >> > > > >> +++ b/configs/amarula_a64_relic_defconfig >> > > > >> @@ -12,4 +12,5 @@ >> > > > >> CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-amarula-relic" >> > > > >> # CONFIG_SPL_DOS_PARTITION is not set >> > > > >> # CONFIG_SPL_EFI_PARTITION is not set >> > > > >> CONFIG_USB_MUSB_GADGET=y >> > > > >> +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 >> > > > >> CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y >> > > > >> diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig >> > > > >> index bc25ea1d9c..4a1bfd119c 100644 >> > > > >> --- a/drivers/fastboot/Kconfig >> > > > >> +++ b/drivers/fastboot/Kconfig >> > > > >> @@ -88,7 +88,8 @@ config FASTBOOT_FLASH_MMC_DEV >> > > > >> int "Define FASTBOOT MMC FLASH default device" >> > > > >> depends on FASTBOOT_FLASH_MMC >> > > > >> default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 >> > > > >> - default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 >> > > > >> + default 1 if ARCH_SUNXI && !DM_MMC && MMC_SUNXI_SLOT_EXTRA != >> > > > >> -1 >> > > > >> + default 2 if ARCH_SUNXI && DM_MMC && MMC_SUNXI_SLOT_EXTRA != >> > > > >> -1 >> > > > > >> > > > > It'd be better to be fixed properly, instead of just relying on a >> > > > > broken index. >> > > > >> > > > I don't think we can't do anything with this now, since this INDEX >> > > > more rely on SPL for pinctrl enablement. if you have any suggestion >> > > > please share. >> > > >> > > Would another answer (at least for this specific case) to change the >> > > fastboot code so it doesn't need the device number in advance? Given >> > > we g
Re: [U-Boot] [linux-sunxi] [PATCH 00/13] Allwinner H6 support (w/ SPL)
On Mon, Jun 25, 2018 at 6:32 PM, Jagan Teki wrote: > On Mon, Jun 25, 2018 at 6:19 PM, Icenowy Zheng wrote: >> >> >> 于 2018年6月25日 GMT+08:00 下午8:40:21, Jagan Teki 写到: >>>On Mon, Jun 25, 2018 at 4:07 PM, Icenowy Zheng wrote: This patch trys to add support for Allwinner H6 SoC to U-Boot. Allwinner H6 is a quite new Allwinner SoC, with several parts changed >>>a lot (memory map, DRAM controller, CCU, so on). The position which SPL will be loaded (SRAM A1) also changed to 0x2. The Pine H64 board support comes with this patchset, as this is the first H6 board that I can get (being early bird). Icenowy Zheng (13): sunxi: change SUNXI_HIGH_SRAM option to SUNXI_SRAM_ADDRESS sunxi: add basical memory map definitions of H6 SoC sunxi: change RMR64's RVBAR address for H6 sunxi: change ATF position for H6 sunxi: add config for SPL at 0x2 on H6 sunxi: change GIC address on H6 sunxi: add clock code for H6 sunxi: use sun6i-style watchdog for H6 sunxi: add UART0 setup for H6 sunxi: add MMC support for H6 sunxi: add DRAM support to H6 sunxi: add support for Allwinner H6 SoC sunxi: add support for Pine H64 board >>> >>>is it on top of master? unable to apply for testing on master, point >>>me the branch would help. >> >> sunxi/next. > > please send it, on top of master Are you planning to send v2, if so please rebase it on master. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 22/25] env: sunxi: Update default env fat device
On Tue, Jul 17, 2018 at 5:24 PM, Maxime Ripard wrote: > On Mon, Jul 16, 2018 at 03:46:10PM +0530, Jagan Teki wrote: >> On Mon, Jul 16, 2018 at 3:17 PM, Maxime Ripard >> wrote: >> > On Mon, Jul 16, 2018 at 01:49:53PM +0530, Jagan Teki wrote: >> >> Usually eMMC is default env fat device for environment, >> >> if MMC_SUNXI_SLOT_EXTRA != 1 Sunxi always probed emmc >> >> device as 1. but with DM_MMC it can be more possible to >> >> probe eMMC as device 2 since for most of the sunxi platforms >> >> eMMC is configured mmc2. >> >> >> >> So update the env default device as 2 if DM_MMC and >> >> MMC_SUNXI_SLOT_EXTRA != 1 but some boards may not use all >> >> possible mmc devices or partly disabled in DT, for those update >> >> the device in board specific defconfig. >> >> >> >> Cc: Olliver Schinagl >> >> Cc: Hans de Goede >> >> Cc: Marcus Cooper >> >> Cc: Stefan Mavrodiev >> >> Cc: Paul Kocialkowski >> >> Cc: Chen-Yu Tsai >> >> Signed-off-by: Jagan Teki >> >> --- >> >> configs/A20-OLinuXino-Lime2-eMMC_defconfig | 1 + >> >> configs/A20-OLinuXino_MICRO-eMMC_defconfig | 1 + >> >> configs/A20-OLinuXino_MICRO_defconfig| 1 + >> >> configs/A20-Olimex-SOM-EVB_defconfig | 1 + >> >> configs/A20-Olimex-SOM204-EVB-eMMC_defconfig | 1 + >> >> configs/Mele_M3_defconfig| 1 + >> >> configs/Orangepi_mini_defconfig | 1 + >> >> configs/Sinlinx_SinA33_defconfig | 1 + >> >> configs/Yones_Toptech_BD1078_defconfig | 1 + >> >> configs/amarula_a64_relic_defconfig | 1 + >> >> env/Kconfig | 3 ++- >> >> 11 files changed, 12 insertions(+), 1 deletion(-) >> >> >> >> diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> >> b/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> >> index 20ea254191..98a8ceb178 100644 >> >> --- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> >> +++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> >> @@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y >> >> CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=2 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_USB0_VBUS_PIN="PC17" >> >> CONFIG_USB0_VBUS_DET="PH5" >> >> CONFIG_I2C1_ENABLE=y >> >> diff --git a/configs/A20-OLinuXino_MICRO-eMMC_defconfig >> >> b/configs/A20-OLinuXino_MICRO-eMMC_defconfig >> >> index f7e7cbab0a..1552960d88 100644 >> >> --- a/configs/A20-OLinuXino_MICRO-eMMC_defconfig >> >> +++ b/configs/A20-OLinuXino_MICRO-eMMC_defconfig >> >> @@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y >> >> CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=2 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_I2C1_ENABLE=y >> >> CONFIG_VIDEO_VGA=y >> >> CONFIG_SATAPWR="PB8" >> >> diff --git a/configs/A20-OLinuXino_MICRO_defconfig >> >> b/configs/A20-OLinuXino_MICRO_defconfig >> >> index 8dcbdc08f9..b5f1b7efe2 100644 >> >> --- a/configs/A20-OLinuXino_MICRO_defconfig >> >> +++ b/configs/A20-OLinuXino_MICRO_defconfig >> >> @@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC3_CD_PIN="PH11" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=3 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_I2C1_ENABLE=y >> >> CONFIG_VIDEO_VGA=y >> >> CONFIG_SATAPWR="PB8" >> >> diff --git a/configs/A20-Olimex-SOM-EVB_defconfig >> >> b/configs/A20-Olimex-SOM-EVB_defconfig >> >> index a06499e2d0..58f6fbad91 100644 >> >> --- a/configs/A20-Olimex-SOM-EVB_defconfig >> >> +++ b/configs/A20-Olimex-SOM-EVB_defconfig >> >> @@ -7,6 +7,7 @@ CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC3_CD_PIN="PH0" >> >> CONFIG_MMC3_PINS="PH" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=3 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_USB0_VBUS_PIN="PB9" >> >> CONFIG_USB0_VBUS_DET="PH5" >> >> CONFIG_SATAPWR="PC3" >> >> diff --git a/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig >> >> b/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig >> >> index 3bb8c4c7e6..ac4f841c4e 100644 >> >> --- a/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig >> >> +++ b/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig >> >> @@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y >> >> CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=2 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_USB0_VBUS_PIN="PC17" >> >> CONFIG_USB0_VBUS_DET="PH5" >> >> CONFIG_I2C1_ENABLE=y >> >> diff --git a/configs/Mele_M3_defconfig b/configs/Mele_M3_defconfig >> >> index 9f48bd91e0..93a2395aee 100644 >> >> --- a/configs/Mele_M3_defconfig >> >> +++ b/configs/Mele_M3_defconfig >> >> @@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y >> >> CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=2 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_VIDEO_VGA=y >> >> CONFIG_VIDEO_COMPOSITE=y >> >> CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-m3" >> >> diff --git a/configs/Orangepi_mini_defconfig >> >> b/configs/Orangepi_mini_defconfig >> >> index 46f27be254..d562273bef 100644 >> >> --- a/conf