[U-Boot] [PATCH 2/2] x86: ich-spi: Clear atomic preop only when SPI settings are not locked
The atomic preop register can only be written when SPI settings are not locked, otherwise it's read-only. Signed-off-by: Bin Meng--- drivers/spi/ich.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 5a3d690..22fc83d 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -563,7 +563,8 @@ static int ich_spi_xfer(struct udevice *dev, unsigned int bitlen, } /* Clear atomic preop now that xfer is done */ - ich_writew(ctlr, 0, ctlr->preop); + if (!lock) + ich_writew(ctlr, 0, ctlr->preop); return 0; } -- 2.9.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/2] x86: ich-spi: Remove useless assignment in ich_spi_xfer()
In ich_spi_xfer() when the driver presets control fields, control variable gets assigned twice. Apparently only the last assignment takes effect. Remove the other one. Signed-off-by: Bin Meng--- drivers/spi/ich.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 373bc26..5a3d690 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -468,8 +468,6 @@ static int ich_spi_xfer(struct udevice *dev, unsigned int bitlen, } /* Preset control fields */ - control = ich_readw(ctlr, ctlr->control); - control &= ~SSFC_RESERVED; control = SPIC_SCGO | ((opcode_index & 0x07) << 4); /* Issue atomic preop cycle if needed */ -- 2.9.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] cmd/spl.c: Include for fdt_totalsize
In order to be able to reliably use fdt_totalsize, we must have included. Fixes: 767cb74a0028 ("cmd: spl: provide address and size of prepared FDT ...") Signed-off-by: Tom Rini--- cmd/spl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/spl.c b/cmd/spl.c index 1165b786d342..ad033652d4c2 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -8,6 +8,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Patman avoiding bounces
+Simon, Tom, Wolfgang, On Sun, Aug 27, 2017 at 7:59 AM, Chris Packhamwrote: > Hi, > > I recently sent a few patches using patman and ran into two problems. > > The first is a set of undeliverable addresses. This isn't a big problem, > more of an annoyance but it also means that anyone replying to my patches > also gets the same set of bounces. Would adding a blacklist feature be a > good idea? Should such a list be stored in-tree? It might also be worth > integrating with git's mailmap to handle those who are still active under a > new address, that's probably something that would be useful in-tree for > other uses. > I've encountered this for several times. Yes, it's quite annoying. > The other issue is the number of addresses hitting the mailing list limit > requiring moderator approval. I'm not sure what the exact limit is but > presumably it's something in the mailman config. It would be great if > patman had some (configurable) knowledge of this limit an only added Ccs up > to this. I'm less certain of a heuristic for which addresses to drop, > obviously the known inactive ones mentioned above are easy to drop. After > that I'm not sure maybe base it on number of commits to the affected files > (i think get_maintainer.pl already gathers this info). > I think the patch cc idea is to make sure everyone that is probably affected by this patch will get direct email (not from ML) sent to him/herself. If we cut down the cc list to match the ML limit, that's probably not a good idea. Maybe we can increase the ML limit? Tom or Wolfgang could comment on this. > Thoughts? If i get some time I'll try and make a proof of concept for the > blacklist. Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] x86: fsp: Configure SPI opcode registers before SPI is locked down
Hi Simon, On Sun, Aug 27, 2017 at 6:40 AM, Simon Glasswrote: > Hi Bin, > > On 26 August 2017 at 07:58, Bin Meng wrote: >> Hi Simon, >> >> On Sat, Aug 26, 2017 at 9:39 PM, Simon Glass wrote: >>> Hi Bin, >>> >>> On 15 August 2017 at 23:38, Bin Meng wrote: Some Intel FSP (like Braswell) does SPI lock-down during the call to fsp_notify(INIT_PHASE_BOOT). But before SPI lock-down is done, it's bootloader's responsibility to configure the SPI controller's opcode registers properly otherwise SPI controller driver doesn't know how to communicate with the SPI flash device. This introduces a Kconfig option CONFIG_FSP_LOCKDOWN_SPI for such FSPs. When it is on, U-Boot will configure the SPI opcode registers before the lock-down. Signed-off-by: Bin Meng --- arch/x86/Kconfig | 9 + arch/x86/lib/fsp/fsp_common.c | 24 2 files changed, 33 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c26710b..5373082 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -401,6 +401,15 @@ config FSP_BROKEN_HOB do not overwrite the important boot service data which is used by FSP, otherwise the subsequent call to fsp_notify() will fail. +config FSP_LOCKDOWN_SPI + bool + depends on HAVE_FSP + help + Some Intel FSP (like Braswell) does SPI lock-down during the call + to fsp_notify(INIT_PHASE_BOOT). This option should be turned on + for such FSP and U-Boot will configure the SPI opcode registers + before the lock-down. + config ENABLE_MRC_CACHE bool "Enable MRC cache" depends on !EFI && !SYS_COREBOOT diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index 3397bb8..320d87d 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -19,6 +19,8 @@ DECLARE_GLOBAL_DATA_PTR; +extern void ich_spi_config_opcode(struct udevice *dev); + int checkcpu(void) { return 0; @@ -49,6 +51,28 @@ void board_final_cleanup(void) { u32 status; +#ifdef CONFIG_FSP_LOCKDOWN_SPI + struct udevice *dev; + + /* +* Some Intel FSP (like Braswell) does SPI lock-down during the call +* to fsp_notify(INIT_PHASE_BOOT). But before SPI lock-down is done, +* it's bootloader's responsibility to configure the SPI controller's +* opcode registers properly otherwise SPI controller driver doesn't +* know how to communicate with the SPI flash device. +* +* Note we cannot do such configuration elsewhere (eg: during the SPI +* controller driver's probe() routine), becasue: +* +* 1). U-Boot SPI controller driver does not set the lock-down bit +* 2). Any SPI transfer will corrupt the contents of these registers +* +* Hence we have to do it right here before SPI lock-down bit is set. +*/ + if (!uclass_first_device_err(UCLASS_SPI, )) + ich_spi_config_opcode(dev); >>> >>> I wonder if we could do this by using an operation instead of directly >>> calling a function in the driver? >>> >> >> Do you mean adding one operation to dm_spi_ops? > > Yes I think that would be better. > Since this is x86-specific, I would hesitate to add one. Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 11/13] x86: braswell: Add FSP configuration
Hi Simon, On Sun, Aug 27, 2017 at 6:39 AM, Simon Glasswrote: > Hi Bin, > > On 26 August 2017 at 07:56, Bin Meng wrote: >> Hi Simon, >> >> On Sat, Aug 26, 2017 at 9:39 PM, Simon Glass wrote: >>> On 15 August 2017 at 23:42, Bin Meng wrote: Add FSP related configuration for Braswell. Signed-off-by: Bin Meng --- arch/x86/cpu/braswell/Makefile | 2 +- arch/x86/cpu/braswell/fsp_configs.c| 158 ++ .../include/asm/arch-braswell/fsp/fsp_configs.h| 89 arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h | 172 +++ arch/x86/include/asm/arch-braswell/gpio.h | 234 + 5 files changed, 654 insertions(+), 1 deletion(-) create mode 100644 arch/x86/cpu/braswell/fsp_configs.c create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_configs.h create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h create mode 100644 arch/x86/include/asm/arch-braswell/gpio.h >>> >>> Reviewed-by: Simon Glass >>> >>> Can this use drivers instead of manual device-tree access? >> >> Which part? > > Well you have intel,braswell-fsp for example. You could create a > driver with the two compatible strings and have it read the platdata > from the DT in the ofdata_to_platdata() method. I thought this before. We discussed the possibility of adding a new FSP uclass long time ago. When I added the Braswell support, I wanted to have a try since Braswell's FSP is v1.1 spec complaint and if we have a uclass for FSP we can put the common stuff in the uclass driver. But in the end I did not do it because: 1. FSP's initialization sequence is just a one time initialization and we don't do anything after the initialization completes. 2. Making a uclass for FSP means we have to delay fsp_init() to after initf_dm().But after fsp_init(), we will return to board_init_f() again and do the initialization for the second time. So all previous platdata of FSP that is set up by DM gets lost during this process. 3. There are some other architecture-dependent stuff in the arch_fsp_init() that is not suitable to be put in a FSP driver. Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Patman avoiding bounces
Hi, I recently sent a few patches using patman and ran into two problems. The first is a set of undeliverable addresses. This isn't a big problem, more of an annoyance but it also means that anyone replying to my patches also gets the same set of bounces. Would adding a blacklist feature be a good idea? Should such a list be stored in-tree? It might also be worth integrating with git's mailmap to handle those who are still active under a new address, that's probably something that would be useful in-tree for other uses. The other issue is the number of addresses hitting the mailing list limit requiring moderator approval. I'm not sure what the exact limit is but presumably it's something in the mailman config. It would be great if patman had some (configurable) knowledge of this limit an only added Ccs up to this. I'm less certain of a heuristic for which addresses to drop, obviously the known inactive ones mentioned above are easy to drop. After that I'm not sure maybe base it on number of commits to the affected files (i think get_maintainer.pl already gathers this info). Thoughts? If i get some time I'll try and make a proof of concept for the blacklist. Thanks, Chris ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 4/4] usb: net: migrate USB Ethernet adapters to Kconfig
On 20 August 2017 at 04:20, Chris Packhamwrote: > This migrates ASIX, ASIX88179, MCS7830, RTL8152 and SMSC95XX to Kconfig. > Update defconfigs. > > Signed-off-by: Chris Packham > --- > > configs/arndale_defconfig | 4 +++ > configs/bayleybay_defconfig| 2 ++ > configs/beaver_defconfig | 1 + > configs/cardhu_defconfig | 1 + > configs/cei-tk1-som_defconfig | 1 + > configs/cgtqmx6eval_defconfig | 1 + > configs/chromebook_link64_defconfig| 2 ++ > configs/chromebook_link_defconfig | 2 ++ > configs/chromebook_samus_defconfig | 2 ++ > configs/chromebox_panther_defconfig| 2 ++ > configs/cl-som-am57x_defconfig | 3 ++ > configs/cm_t54_defconfig | 3 ++ > configs/colibri_t20_defconfig | 1 + > configs/colibri_t30_defconfig | 1 + > ...conga-qeval20-qa3-e3845-internal-uart_defconfig | 2 ++ > configs/conga-qeval20-qa3-e3845_defconfig | 2 ++ > configs/coreboot-x86_defconfig | 2 ++ > configs/cougarcanyon2_defconfig| 2 ++ > configs/crownbay_defconfig | 2 ++ > configs/dalmore_defconfig | 1 + > configs/dfi-bt700-q7x-151_defconfig| 4 +++ > configs/dragonboard410c_defconfig | 4 +++ > configs/e2220-1170_defconfig | 1 + > configs/evb-rk3399_defconfig | 5 +++ > configs/fennec-rk3288_defconfig| 2 ++ > configs/firefly-rk3288_defconfig | 2 ++ > configs/firefly-rk3399_defconfig | 5 +++ > configs/galileo_defconfig | 2 ++ > configs/gwventana_emmc_defconfig | 2 ++ > configs/gwventana_gw5904_defconfig | 2 ++ > configs/gwventana_nand_defconfig | 2 ++ > configs/harmony_defconfig | 3 ++ > configs/hikey_defconfig| 2 ++ > configs/jetson-tk1_defconfig | 1 + > configs/kylin-rk3036_defconfig | 2 ++ > configs/m53evk_defconfig | 3 ++ > configs/marsboard_defconfig| 1 + > configs/mcx_defconfig | 2 ++ > configs/medcom-wide_defconfig | 1 + > configs/minnowmax_defconfig| 2 ++ > configs/miqi-rk3288_defconfig | 2 ++ > configs/mvebu_db-88f3720_defconfig | 4 +++ > configs/mvebu_db_armada8k_defconfig| 4 +++ > configs/mvebu_espressobin-88f3720_defconfig| 4 +++ > configs/mvebu_mcbin-88f8040_defconfig | 4 +++ > configs/mx23_olinuxino_defconfig | 1 + > configs/mx28evk_auart_console_defconfig| 2 ++ > configs/mx28evk_defconfig | 2 ++ > configs/mx28evk_nand_defconfig | 2 ++ > configs/mx28evk_spi_defconfig | 2 ++ > configs/mx51evk_defconfig | 2 ++ > configs/mx53loco_defconfig | 3 ++ > configs/mx6dlarm2_defconfig| 1 + > configs/mx6dlarm2_lpddr2_defconfig | 1 + > configs/mx6qarm2_defconfig | 1 + > configs/mx6qarm2_lpddr2_defconfig | 1 + > configs/mx6qsabrelite_defconfig| 3 ++ > configs/mx6sabreauto_defconfig | 1 + > configs/mx6sabresd_defconfig | 1 + > configs/mx6slevk_defconfig | 1 + > configs/mx6slevk_spinor_defconfig | 1 + > configs/mx6slevk_spl_defconfig | 1 + > configs/mx6sllevk_defconfig| 2 ++ > configs/mx6sllevk_plugin_defconfig | 2 ++ > configs/mx6sxsabreauto_defconfig | 1 + > configs/mx6sxsabresd_defconfig | 1 + > configs/mx6sxsabresd_spl_defconfig | 1 + > configs/mx7dsabresd_defconfig | 1 + > configs/mx7dsabresd_secure_defconfig | 1 + > configs/nitrogen6dl2g_defconfig| 3 ++ > configs/nitrogen6dl_defconfig | 3 ++ > configs/nitrogen6q2g_defconfig | 3 ++ > configs/nitrogen6q_defconfig | 3 ++ > configs/nitrogen6s1g_defconfig | 3 ++ > configs/nitrogen6s_defconfig | 3 ++ > configs/novena_defconfig | 2 ++ > configs/nyan-big_defconfig | 1 + >
Re: [U-Boot] [RFC PATCH 3/4] usb: net: migrate CONFIG_USB_HOST_ETHER to Kconfig
On 27/08/2017 11:13 AM, "Simon Glass"wrote: On 20 August 2017 at 04:20, Chris Packham wrote: > CONFIG_USB_HOST_ETHER is the framework that the drivers are dependent on > USB_HOST_ETHER. Use this as a menu and move the existing LAN75XX and > LAN78XX options under new menu. Finally update the defconfigs that need > CONFIG_USB_HOST_ETHER. > > Signed-off-by: Chris Packham > --- > > configs/apalis_imx6_defconfig | 1 + > configs/apalis_imx6_nospl_com_defconfig | 1 + > configs/apalis_imx6_nospl_it_defconfig| 1 + > configs/arndale_defconfig | 1 + > configs/bayleybay_defconfig | 1 + > configs/beaver_defconfig | 1 + > configs/cardhu_defconfig | 1 + > configs/cei-tk1-som_defconfig | 1 + > configs/cgtqmx6eval_defconfig | 1 + > configs/chromebook_link64_defconfig | 1 + > configs/chromebook_link_defconfig | 1 + > configs/chromebook_samus_defconfig| 1 + > configs/chromebox_panther_defconfig | 1 + > configs/cl-som-am57x_defconfig| 1 + > configs/cm_t54_defconfig | 1 + > configs/colibri_imx6_defconfig| 1 + > configs/colibri_imx6_nospl_defconfig | 1 + > configs/colibri_t20_defconfig | 1 + > configs/colibri_t30_defconfig | 1 + > configs/conga-qeval20-qa3-e3845-internal-uart_defconfig | 1 + > configs/conga-qeval20-qa3-e3845_defconfig | 1 + > configs/coreboot-x86_defconfig| 1 + > configs/cougarcanyon2_defconfig | 1 + > configs/crownbay_defconfig| 1 + > configs/dalmore_defconfig | 1 + > configs/dfi-bt700-q7x-151_defconfig | 1 + > configs/dragonboard410c_defconfig | 1 + > configs/e2220-1170_defconfig | 1 + > configs/evb-rk3399_defconfig | 1 + > configs/fennec-rk3288_defconfig | 1 + > configs/firefly-rk3288_defconfig | 1 + > configs/firefly-rk3399_defconfig | 1 + > configs/galileo_defconfig | 1 + > configs/gwventana_emmc_defconfig | 1 + > configs/gwventana_gw5904_defconfig| 1 + > configs/gwventana_nand_defconfig | 1 + > configs/harmony_defconfig | 1 + > configs/hikey_defconfig | 1 + > configs/jetson-tk1_defconfig | 1 + > configs/kylin-rk3036_defconfig| 1 + > configs/m53evk_defconfig | 1 + > configs/marsboard_defconfig | 1 + > configs/mcx_defconfig | 1 + > configs/medcom-wide_defconfig | 1 + > configs/minnowmax_defconfig | 1 + > configs/miqi-rk3288_defconfig | 1 + > configs/mvebu_db-88f3720_defconfig| 1 + > configs/mvebu_db_armada8k_defconfig | 1 + > configs/mvebu_espressobin-88f3720_defconfig | 1 + > configs/mvebu_mcbin-88f8040_defconfig | 1 + > configs/mx23_olinuxino_defconfig | 1 + > configs/mx28evk_auart_console_defconfig | 1 + > configs/mx28evk_defconfig | 1 + > configs/mx28evk_nand_defconfig| 1 + > configs/mx28evk_spi_defconfig | 1 + > configs/mx51evk_defconfig | 1 + > configs/mx53loco_defconfig| 1 + > configs/mx6dlarm2_defconfig | 1 + > configs/mx6dlarm2_lpddr2_defconfig| 1 + > configs/mx6qarm2_defconfig| 1 + > configs/mx6qarm2_lpddr2_defconfig | 1 + > configs/mx6qsabrelite_defconfig | 1 + > configs/mx6sabreauto_defconfig| 1 + > configs/mx6sabresd_defconfig | 1 + > configs/mx6slevk_defconfig| 1 + > configs/mx6slevk_spinor_defconfig | 1 + > configs/mx6slevk_spl_defconfig
Re: [U-Boot] [RFC PATCH 3/4] usb: net: migrate CONFIG_USB_HOST_ETHER to Kconfig
On 20 August 2017 at 04:20, Chris Packhamwrote: > CONFIG_USB_HOST_ETHER is the framework that the drivers are dependent on > USB_HOST_ETHER. Use this as a menu and move the existing LAN75XX and > LAN78XX options under new menu. Finally update the defconfigs that need > CONFIG_USB_HOST_ETHER. > > Signed-off-by: Chris Packham > --- > > configs/apalis_imx6_defconfig | 1 + > configs/apalis_imx6_nospl_com_defconfig | 1 + > configs/apalis_imx6_nospl_it_defconfig| 1 + > configs/arndale_defconfig | 1 + > configs/bayleybay_defconfig | 1 + > configs/beaver_defconfig | 1 + > configs/cardhu_defconfig | 1 + > configs/cei-tk1-som_defconfig | 1 + > configs/cgtqmx6eval_defconfig | 1 + > configs/chromebook_link64_defconfig | 1 + > configs/chromebook_link_defconfig | 1 + > configs/chromebook_samus_defconfig| 1 + > configs/chromebox_panther_defconfig | 1 + > configs/cl-som-am57x_defconfig| 1 + > configs/cm_t54_defconfig | 1 + > configs/colibri_imx6_defconfig| 1 + > configs/colibri_imx6_nospl_defconfig | 1 + > configs/colibri_t20_defconfig | 1 + > configs/colibri_t30_defconfig | 1 + > configs/conga-qeval20-qa3-e3845-internal-uart_defconfig | 1 + > configs/conga-qeval20-qa3-e3845_defconfig | 1 + > configs/coreboot-x86_defconfig| 1 + > configs/cougarcanyon2_defconfig | 1 + > configs/crownbay_defconfig| 1 + > configs/dalmore_defconfig | 1 + > configs/dfi-bt700-q7x-151_defconfig | 1 + > configs/dragonboard410c_defconfig | 1 + > configs/e2220-1170_defconfig | 1 + > configs/evb-rk3399_defconfig | 1 + > configs/fennec-rk3288_defconfig | 1 + > configs/firefly-rk3288_defconfig | 1 + > configs/firefly-rk3399_defconfig | 1 + > configs/galileo_defconfig | 1 + > configs/gwventana_emmc_defconfig | 1 + > configs/gwventana_gw5904_defconfig| 1 + > configs/gwventana_nand_defconfig | 1 + > configs/harmony_defconfig | 1 + > configs/hikey_defconfig | 1 + > configs/jetson-tk1_defconfig | 1 + > configs/kylin-rk3036_defconfig| 1 + > configs/m53evk_defconfig | 1 + > configs/marsboard_defconfig | 1 + > configs/mcx_defconfig | 1 + > configs/medcom-wide_defconfig | 1 + > configs/minnowmax_defconfig | 1 + > configs/miqi-rk3288_defconfig | 1 + > configs/mvebu_db-88f3720_defconfig| 1 + > configs/mvebu_db_armada8k_defconfig | 1 + > configs/mvebu_espressobin-88f3720_defconfig | 1 + > configs/mvebu_mcbin-88f8040_defconfig | 1 + > configs/mx23_olinuxino_defconfig | 1 + > configs/mx28evk_auart_console_defconfig | 1 + > configs/mx28evk_defconfig | 1 + > configs/mx28evk_nand_defconfig| 1 + > configs/mx28evk_spi_defconfig | 1 + > configs/mx51evk_defconfig | 1 + > configs/mx53loco_defconfig| 1 + > configs/mx6dlarm2_defconfig | 1 + > configs/mx6dlarm2_lpddr2_defconfig| 1 + > configs/mx6qarm2_defconfig| 1 + > configs/mx6qarm2_lpddr2_defconfig | 1 + > configs/mx6qsabrelite_defconfig | 1 + > configs/mx6sabreauto_defconfig| 1 + > configs/mx6sabresd_defconfig | 1 + > configs/mx6slevk_defconfig| 1 + > configs/mx6slevk_spinor_defconfig | 1 + > configs/mx6slevk_spl_defconfig| 1 + > configs/mx6sllevk_defconfig
Re: [U-Boot] [PATCH] ARM: mvebu: Convert CONFIG_MVNETA to Kconfig
On 21 August 2017 at 02:17, Chris Packhamwrote: > This converts the following to Kconfig: >CONFIG_MVNETA > > Signed-off-by: Chris Packham > --- > > arch/arm/mach-mvebu/include/mach/config.h | 3 --- > configs/clearfog_defconfig| 2 +- > configs/controlcenterdc_defconfig | 2 +- > configs/db-88f6820-amc_defconfig | 2 +- > configs/db-88f6820-gp_defconfig | 2 +- > configs/db-mv784mp-gp_defconfig | 2 +- > configs/ds414_defconfig | 2 +- > configs/maxbcm_defconfig | 2 +- > configs/theadorable_debug_defconfig | 2 +- > configs/turris_omnia_defconfig| 2 +- > drivers/net/Kconfig | 8 > include/configs/mvebu_armada-37xx.h | 1 - > scripts/config_whitelist.txt | 1 - > 13 files changed, 17 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] [RFC PATCH 2/4] Kconfig: drop CONFIG_USB_ETHER_RNDIS
On 20 August 2017 at 04:20, Chris Packhamwrote: > This is not a valid option. Drop it. > > Signed-off-by: Chris Packham > --- > > include/configs/cl-som-am57x.h | 1 - > include/configs/cm_t54.h | 1 - > include/configs/omap3_beagle.h | 1 - > include/configs/omap3_evm.h| 1 - > include/configs/omap3_logic.h | 1 - > include/configs/tao3530.h | 1 - > include/configs/vinco.h| 1 - > scripts/config_whitelist.txt | 1 - > 8 files changed, 8 deletions(-) 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 1/4] Kconfig: drop CONFIG_USB_ETHER_DM9601
On 20 August 2017 at 04:20, Chris Packhamwrote: > This is not a valid option. Drop it. > > Signed-off-by: Chris Packham > --- > > include/configs/dragonboard410c.h | 1 - > scripts/config_whitelist.txt | 1 - > 2 files changed, 2 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 1/3] rockchip: rk3399-evb: add script for atf fit
Hi, On 17 August 2017 at 23:07, Kever Yangwrote: > Add a script to generate binaries from bl31.elf, and generate > u-boot.its file for FIT image including u-boot, dtb and atf binaries. > > Signed-off-by: Kever Yang > --- > > board/rockchip/evb_rk3399/mk_fit_atf.sh | 110 > > 1 file changed, 110 insertions(+) > create mode 100755 board/rockchip/evb_rk3399/mk_fit_atf.sh Can you instead write this in python and put it in binman? That is the tool which should be used to generate more complex firmware images. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 21/23] efi_loader: fix efi_net_get_status
The returned interrupt status was wrong. As out transmit buffer is empty we need to always set EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT. When we have received a packet we need to set EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT. Furthermore we should call efi_timer_check() to handle events. Signed-off-by: Heinrich Schuchardt--- include/efi_api.h| 6 ++ lib/efi_loader/efi_net.c | 11 --- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index 029b57ca5e..7d2355c033 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -537,6 +537,12 @@ struct efi_simple_network_mode { #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10 +/* interrupt status bit mask */ +#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01 +#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02 +#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04 +#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08 + struct efi_simple_network { u64 revision; diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index 7659109386..e15f403c20 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -127,9 +127,14 @@ static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this, { EFI_ENTRY("%p, %p, %p", this, int_status, txbuf); - /* We send packets synchronously, so nothing is outstanding */ - if (int_status) - *int_status = 0; + efi_timer_check(); + + if (int_status) { + /* We send packets synchronously, so nothing is outstanding */ + *int_status = EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT; + if (new_rx_packet) + *int_status |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT; + } if (txbuf) *txbuf = new_tx_packet; -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 10/23] efi_loader: open_info in OpenProtocol
efi_open_protocol and close_protocol have to keep track of opened protocols. So we add an array open_info to each protocol of each handle. OpenProtocol has enter the agent and controller handle information into this array. Signed-off-by: Heinrich Schuchardt--- include/efi_loader.h | 1 + lib/efi_loader/efi_boottime.c | 130 +++--- 2 files changed, 99 insertions(+), 32 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 193fca24ce..2c3360534b 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -87,6 +87,7 @@ extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop; struct efi_handler { const efi_guid_t *guid; void *protocol_interface; + struct efi_open_protocol_info_entry open_info[4]; }; /* diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index a483b827cd..294bc1f138 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1152,24 +1152,111 @@ static void EFIAPI efi_set_mem(void *buffer, unsigned long size, uint8_t value) memset(buffer, value, size); } +static efi_status_t efi_protocol_open( + struct efi_handler *protocol, + void **protocol_interface, void *agent_handle, + void *controller_handle, uint32_t attributes) +{ + bool opened_exclusive = false; + bool opened_by_driver = false; + int i; + struct efi_open_protocol_info_entry *open_info; + struct efi_open_protocol_info_entry *match = NULL; + + if (attributes != + EFI_OPEN_PROTOCOL_TEST_PROTOCOL) { + *protocol_interface = NULL; + } + + for (i = 0; i < ARRAY_SIZE(protocol->open_info); ++i) { + open_info = >open_info[i]; + + if (!open_info->open_count) + continue; + if (open_info->agent_handle == agent_handle) { + if ((attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) && + (open_info->attributes == attributes)) + return EFI_ALREADY_STARTED; + if (open_info->controller_handle == controller_handle) + match = open_info; + } + if (open_info->attributes & EFI_OPEN_PROTOCOL_EXCLUSIVE) + opened_exclusive = true; + } + + if (attributes & + (EFI_OPEN_PROTOCOL_EXCLUSIVE | EFI_OPEN_PROTOCOL_BY_DRIVER) && + opened_exclusive) + return EFI_ACCESS_DENIED; + + if (attributes & EFI_OPEN_PROTOCOL_EXCLUSIVE) { + for (i = 0; i < ARRAY_SIZE(protocol->open_info); ++i) { + open_info = >open_info[i]; + + if (!open_info->open_count) + continue; + if (open_info->attributes == + EFI_OPEN_PROTOCOL_BY_DRIVER) + EFI_CALL(efi_disconnect_controller( + open_info->controller_handle, + open_info->agent_handle, + NULL)); + } + opened_by_driver = false; + for (i = 0; i < ARRAY_SIZE(protocol->open_info); ++i) { + open_info = >open_info[i]; + + if (!open_info->open_count) + continue; + if (open_info->attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) + opened_by_driver = true; + } + if (opened_by_driver) + return EFI_ACCESS_DENIED; + if (match && !match->open_count) + match = NULL; + } + + /* +* Find an empty slot. +*/ + if (!match) { + for (i = 0; i < ARRAY_SIZE(protocol->open_info); ++i) { + open_info = >open_info[i]; + + if (!open_info->open_count) { + match = open_info; + break; + } + } + } + if (!match) + return EFI_OUT_OF_RESOURCES; + + match->agent_handle = agent_handle; + match->controller_handle = controller_handle; + match->attributes = attributes; + match->open_count++; + *protocol_interface = protocol->protocol_interface; + + return EFI_SUCCESS; +} + static efi_status_t EFIAPI efi_open_protocol( void *handle, efi_guid_t *protocol, void **protocol_interface, void *agent_handle, void *controller_handle, uint32_t attributes) { - struct list_head *lhandle; - int i; +
[U-Boot] [PATCH 17/23] efi_loader: efi_net: hwaddr_size = 6
The length of a MAC address is 6. We have to set this length in the EFI_SIMPLE_NETWORK_MODE structure of the EFI_SIMPLE_NETWORK_PROTOCOL. Without this patch iPXE fails to initialize the network with error message SNP MAC(001e0633bcbf,0x0) has invalid hardware address length 0 Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index 0b949d86e8..75d7974b0e 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -259,6 +259,7 @@ int efi_net_register(void **handle) netobj->dp_end = dp_end; memcpy(netobj->dp_mac.mac.addr, eth_get_ethaddr(), 6); memcpy(netobj->net_mode.current_address.mac_addr, eth_get_ethaddr(), 6); + netobj->net_mode.hwaddr_size = 6; netobj->net_mode.max_packet_size = PKTSIZE; netobj->pxe.mode = >pxe_mode; -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 22/23] efi_loader: set parent handle in efi_load_image
The parent_handle of the loaded image must be set. Add the file path protocol from the provided parameter. Set system table. Add parameter checks. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_boottime.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index c5a17b6252..477809e4ca 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -774,27 +774,54 @@ static efi_status_t EFIAPI efi_load_image(bool boot_policy, }; struct efi_loaded_image *info; struct efi_object *obj; + efi_status_t r; EFI_ENTRY("%d, %p, %p, %p, %ld, %p", boot_policy, parent_image, file_path, source_buffer, source_size, image_handle); + + /* We do not support loading by device path, yet. */ + if (!source_buffer) { + r = EFI_NOT_FOUND; + goto out; + } + if (!parent_image || !image_handle) { + r = EFI_INVALID_PARAMETER; + goto out; + } + info = malloc(sizeof(*info)); + if (!info) { + r = EFI_OUT_OF_RESOURCES; + goto out; + } loaded_image_info_obj.protocols[0].protocol_interface = info; + loaded_image_info_obj.protocols[1].protocol_interface = file_path; obj = malloc(sizeof(loaded_image_info_obj)); + if (!obj) { + free(info); + r = EFI_OUT_OF_RESOURCES; + goto out; + } memset(info, 0, sizeof(*info)); memcpy(obj, _image_info_obj, sizeof(loaded_image_info_obj)); obj->handle = info; + info->system_table = + info->parent_handle = parent_image; info->file_path = file_path; info->reserved = efi_load_pe(source_buffer, info); if (!info->reserved) { free(info); free(obj); - return EFI_EXIT(EFI_UNSUPPORTED); + r = EFI_UNSUPPORTED; + goto out; } *image_handle = info; list_add_tail(>link, _obj_list); - return EFI_EXIT(EFI_SUCCESS); + r = EFI_SUCCESS; +out: + return EFI_EXIT(r); } static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle, -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 20/23] efi_loader: use events for efi_net_receive
A timer event is defined. The timer handler cares for receiving new packets. efi_timer_check is called both in efi_net_transmit and efi_net_receive to enable events during network communication. Calling efi_timer_check in efi_net_get_status is implemented in a separate patch. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_net.c | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index 38a3a4fac4..7659109386 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -146,6 +146,8 @@ static efi_status_t EFIAPI efi_net_transmit(struct efi_simple_network *this, EFI_ENTRY("%p, %lx, %lx, %p, %p, %p, %p", this, header_size, buffer_size, buffer, src_addr, dest_addr, protocol); + efi_timer_check(); + if (header_size) { /* We would need to create the header if header_size != 0 */ return EFI_EXIT(EFI_INVALID_PARAMETER); @@ -177,9 +179,7 @@ static efi_status_t EFIAPI efi_net_receive(struct efi_simple_network *this, EFI_ENTRY("%p, %p, %p, %p, %p, %p, %p", this, header_size, buffer_size, buffer, src_addr, dest_addr, protocol); - push_packet = efi_net_push; - eth_rx(); - push_packet = NULL; + efi_timer_check(); if (!new_rx_packet) return EFI_EXIT(EFI_NOT_READY); @@ -207,6 +207,21 @@ void efi_net_set_dhcp_ack(void *pkt, int len) memcpy(dhcp_ack, pkt, min(len, maxsize)); } +static struct efi_event *network_timer_event; + +static void EFIAPI efi_network_timer_notify(struct efi_event *event, + void *context) +{ + EFI_ENTRY("%p, %p", event, context); + + if (!new_rx_packet) { + push_packet = efi_net_push; + eth_rx(); + push_packet = NULL; + } + EFI_EXIT(EFI_SUCCESS); +} + /* This gets called from do_bootefi_exec(). */ int efi_net_register(void **handle) { @@ -221,6 +236,7 @@ int efi_net_register(void **handle) .dp.sub_type = DEVICE_PATH_SUB_TYPE_END, .dp.length = sizeof(dp_end), }; + efi_status_t r; if (!eth_get_dev()) { /* No eth device active, don't expose any */ @@ -270,5 +286,18 @@ int efi_net_register(void **handle) if (handle) *handle = >net; + r = efi_create_event(EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_CALLBACK, +efi_network_timer_notify, NULL, +_timer_event); + if (r != EFI_SUCCESS) { + printf("ERROR: Failed to register network event\n"); + return r; + } + /* Network is time critical, call in every timer cyle */ + r = efi_set_timer(network_timer_event, EFI_TIMER_PERIODIC, 0); + if (r != EFI_SUCCESS) + printf("ERROR: Failed to set network timer\n"); + return r; + return 0; } -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 14/23] efi_loader: pass GUIDs as const efi_guid_t *
We need to call some boottime services internally. Our GUIDs are stored as const efi_guid_t *. The boottime services never change GUIDs. So we can define the parameters as const efi_guid_t *. Signed-off-by: Heinrich Schuchardt--- include/efi_api.h | 44 +-- include/efi_loader.h | 4 ++-- lib/efi_loader/efi_boottime.c | 37 ++-- 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index ec1b321e8e..8efc8dfab8 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -74,25 +74,25 @@ struct efi_boot_services { efi_status_t (EFIAPI *close_event)(struct efi_event *event); efi_status_t (EFIAPI *check_event)(struct efi_event *event); #define EFI_NATIVE_INTERFACE 0x - efi_status_t (EFIAPI *install_protocol_interface)( - void **handle, efi_guid_t *protocol, + efi_status_t (EFIAPI * install_protocol_interface)( + void **handle, const efi_guid_t *protocol, int protocol_interface_type, void *protocol_interface); - efi_status_t (EFIAPI *reinstall_protocol_interface)( - void *handle, efi_guid_t *protocol, + efi_status_t (EFIAPI * reinstall_protocol_interface)( + void *handle, const efi_guid_t *protocol, void *old_interface, void *new_interface); - efi_status_t (EFIAPI *uninstall_protocol_interface)(void *handle, - efi_guid_t *protocol, void *protocol_interface); - efi_status_t (EFIAPI *handle_protocol)(efi_handle_t, efi_guid_t *, - void **); + efi_status_t (EFIAPI * uninstall_protocol_interface)(void *handle, + const efi_guid_t *protocol, void *protocol_interface); + efi_status_t (EFIAPI * handle_protocol)(efi_handle_t, + const efi_guid_t *, void **); void *reserved; - efi_status_t (EFIAPI *register_protocol_notify)( - efi_guid_t *protocol, struct efi_event *event, + efi_status_t (EFIAPI * register_protocol_notify)( + const efi_guid_t *protocol, struct efi_event *event, void **registration); - efi_status_t (EFIAPI *locate_handle)( + efi_status_t (EFIAPI * locate_handle)( enum efi_locate_search_type search_type, - efi_guid_t *protocol, void *search_key, + const efi_guid_t *protocol, void *search_key, unsigned long *buffer_size, efi_handle_t *buffer); - efi_status_t (EFIAPI *locate_device_path)(efi_guid_t *protocol, + efi_status_t (EFIAPI * locate_device_path)(const efi_guid_t *protocol, struct efi_device_path **device_path, efi_handle_t *device); efi_status_t (EFIAPI *install_configuration_table)( @@ -128,25 +128,25 @@ struct efi_boot_services { #define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x0008 #define EFI_OPEN_PROTOCOL_BY_DRIVER 0x0010 #define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x0020 - efi_status_t (EFIAPI *open_protocol)(efi_handle_t handle, - efi_guid_t *protocol, void **interface, + efi_status_t (EFIAPI * open_protocol)(efi_handle_t handle, + const efi_guid_t *protocol, void **interface, efi_handle_t agent_handle, efi_handle_t controller_handle, u32 attributes); - efi_status_t (EFIAPI *close_protocol)(void *handle, - efi_guid_t *protocol, void *agent_handle, + efi_status_t (EFIAPI * close_protocol)(void *handle, + const efi_guid_t *protocol, void *agent_handle, void *controller_handle); - efi_status_t(EFIAPI *open_protocol_information)(efi_handle_t handle, - efi_guid_t *protocol, + efi_status_t(EFIAPI * open_protocol_information)(efi_handle_t handle, + const efi_guid_t *protocol, struct efi_open_protocol_info_entry **entry_buffer, unsigned long *entry_count); efi_status_t (EFIAPI *protocols_per_handle)(efi_handle_t handle, efi_guid_t ***protocol_buffer, unsigned long *protocols_buffer_count); - efi_status_t (EFIAPI *locate_handle_buffer) ( + efi_status_t (EFIAPI * locate_handle_buffer) ( enum efi_locate_search_type search_type, - efi_guid_t *protocol, void *search_key, + const efi_guid_t *protocol, void *search_key, unsigned long *no_handles, efi_handle_t **buffer); -
[U-Boot] [PATCH 12/23] efi_loader: implement OpenProtocolInformation
efi_open_protocol_information provides the agent and controller handles as well as the attributes and open count of an protocol on a handle. Cc: Rob ClarkSigned-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_boottime.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index c9aec597a2..23b8894e73 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -985,9 +985,62 @@ static efi_status_t EFIAPI efi_open_protocol_information(efi_handle_t handle, struct efi_open_protocol_info_entry **entry_buffer, unsigned long *entry_count) { + unsigned long buffer_size; + unsigned long count; + struct efi_handler *handler; + size_t i; + efi_status_t r; + EFI_ENTRY("%p, %p, %p, %p", handle, protocol, entry_buffer, entry_count); - return EFI_EXIT(EFI_NOT_FOUND); + + /* Check parameters */ + if (!handle || !protocol || !entry_buffer) { + r = EFI_INVALID_PARAMETER; + goto out; + } + + /* Find the protocol */ + r = efi_search_protocol(handle, protocol, ); + if (r != EFI_SUCCESS) + goto out; + + *entry_buffer = NULL; + + /* Count entries */ + count = 0; + for (i = 0; i < ARRAY_SIZE(handler->open_info); ++i) { + struct efi_open_protocol_info_entry *open_info = + >open_info[i]; + + if (open_info->open_count) + ++count; + } + *entry_count = count; + if (!count) { + r = EFI_SUCCESS; + goto out; + } + + /* Copy entries */ + buffer_size = count * sizeof(struct efi_open_protocol_info_entry); + r = efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, buffer_size, + (void **)entry_buffer); + if (r != EFI_SUCCESS) + goto out; + count = 0; + for (i = 0; i < ARRAY_SIZE(handler->open_info); ++i) { + struct efi_open_protocol_info_entry *open_info = + >open_info[i]; + + if (!open_info->open_count) + continue; + (*entry_buffer)[count] = *open_info; + ++count; + } + +out: + return EFI_EXIT(r); } static efi_status_t EFIAPI efi_protocols_per_handle(void *handle, -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 23/23] efi_loader: implement SetWatchdogTimer
The watchdog is initialized with a 5 minute timeout period. It can be reset by SetWatchdogTimer. It is stopped by ExitBoottimeServices. Signed-off-by: Heinrich Schuchardt--- cmd/bootefi.c | 1 + include/efi_loader.h | 4 +++ lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_boottime.c | 3 ++- lib/efi_loader/efi_watchdog.c | 58 +++ 5 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 lib/efi_loader/efi_watchdog.c diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 3196d86040..47771f87cc 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -132,6 +132,7 @@ static void efi_init_obj_list(void) #ifdef CONFIG_GENERATE_SMBIOS_TABLE efi_smbios_register(); #endif + efi_watchdog_register(); /* Initialize EFI runtime services */ efi_reset_system_init(); diff --git a/include/efi_loader.h b/include/efi_loader.h index f9f33e1d01..0c1f4e21ca 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -150,11 +150,15 @@ int efi_disk_register(void); int efi_gop_register(void); /* Called by bootefi to make the network interface available */ int efi_net_register(void **handle); +/* Called by bootefi to make the watchdog available */ +int efi_watchdog_register(void); /* Called by bootefi to make SMBIOS tables available */ void efi_smbios_register(void); /* Called by networking code to memorize the dhcp ack package */ void efi_net_set_dhcp_ack(void *pkt, int len); +/* Called by efi_set_watchdog_timer to reset the timer */ +efi_status_t efi_set_watchdog(unsigned long timeout); /* Called from places to check whether a timer expired */ void efi_timer_check(void); diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index 30bf343a36..6bca05aeb4 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -15,7 +15,7 @@ always := $(efiprogs-y) obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o -obj-y += efi_memory.o efi_device_path_to_text.o +obj-y += efi_memory.o efi_device_path_to_text.o efi_watchdog.o obj-$(CONFIG_LCD) += efi_gop.o obj-$(CONFIG_DM_VIDEO) += efi_gop.o obj-$(CONFIG_PARTITIONS) += efi_disk.o diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 477809e4ca..8f06209794 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -928,6 +928,7 @@ static efi_status_t EFIAPI efi_exit_boot_services(void *image_handle, bootm_disable_interrupts(); /* Give the payload some time to boot */ + efi_set_watchdog(0); WATCHDOG_RESET(); return EFI_EXIT(EFI_SUCCESS); @@ -955,7 +956,7 @@ static efi_status_t EFIAPI efi_set_watchdog_timer(unsigned long timeout, { EFI_ENTRY("%ld, 0x%"PRIx64", %ld, %p", timeout, watchdog_code, data_size, watchdog_data); - return efi_unsupported(__func__); + return EFI_EXIT(efi_set_watchdog(timeout)); } static efi_status_t efi_bind_controller( diff --git a/lib/efi_loader/efi_watchdog.c b/lib/efi_loader/efi_watchdog.c new file mode 100644 index 00..58c098e8bd --- /dev/null +++ b/lib/efi_loader/efi_watchdog.c @@ -0,0 +1,58 @@ +/* + * EFI device path interface + * + * Copyright (c) 2017 Heinrich Schuchardt + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include + +static struct efi_event *watchdog_timer_event; + +static void EFIAPI efi_watchdog_timer_notify(struct efi_event *event, +void *context) +{ + EFI_ENTRY("%p, %p", event, context); + + printf("\nEFI: Watchdog timeout\n"); + EFI_CALL_VOID(efi_reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL)); + + EFI_EXIT(EFI_UNSUPPORTED); +} + +efi_status_t efi_set_watchdog(unsigned long timeout) +{ + efi_status_t r; + + if (timeout) + /* Reset watchdog */ + r = efi_set_timer(watchdog_timer_event, EFI_TIMER_RELATIVE, + 1000 * timeout); + else + /* Deactivate watchdog */ + r = efi_set_timer(watchdog_timer_event, EFI_TIMER_STOP, 0); + return r; +} + +/* This gets called from do_bootefi_exec(). */ +int efi_watchdog_register(void) +{ + efi_status_t r; + + r = efi_create_event(EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_CALLBACK, +efi_watchdog_timer_notify, NULL, +_timer_event); + if (r != EFI_SUCCESS) { + printf("ERROR: Failed to register watchdog event\n"); + return r; + } + /* Set watchdog to trigger after 5 minutes */ + r = efi_set_watchdog(300); + if (r != EFI_SUCCESS) { + printf("ERROR: Failed to set watchdog timer\n"); + return r; + } + return 0; +} -- 2.14.1 ___
[U-Boot] [PATCH 16/23] efi_loader: implement DisconnectController
Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_boottime.c | 77 ++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 1069da7d79..c5a17b6252 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1052,9 +1052,84 @@ static efi_status_t EFIAPI efi_disconnect_controller(void *controller_handle, void *driver_image_handle, void *child_handle) { + struct efi_driver_binding_protocol *binding_protocol; + efi_handle_t child_handle_buffer; + unsigned long driver_count; + efi_handle_t *driver_handle_buffer; + size_t i; + UINTN number_of_children; + efi_status_t r; + size_t stop_count = 0; + EFI_ENTRY("%p, %p, %p", controller_handle, driver_image_handle, child_handle); - return EFI_EXIT(EFI_INVALID_PARAMETER); + + if (!efi_search_obj(controller_handle)) { + r = EFI_INVALID_PARAMETER; + goto out; + } + + /* Create list of driver handles */ + if (driver_image_handle) { + driver_handle_buffer = _image_handle, + driver_count = 1; + /* Check that the handle supports driver binding protocol */ + r = efi_search_protocol(driver_image_handle, + _guid_driver_binding_protocol, + NULL); + } else { + /* Get buffer with all handles with driver binding protocol */ + r = EFI_CALL(efi_locate_handle_buffer( +by_protocol, _guid_driver_binding_protocol, +NULL, _count, _handle_buffer)); + } + if (r != EFI_SUCCESS) + goto out; + + /* Create list of child handles */ + if (child_handle) { + number_of_children = 1; + child_handle_buffer = _handle; + } else { + /* +* We do not fully support child handles. +* +* It is unclear from which handle and which protocols the +* list of child controllers should be collected. +*/ + number_of_children = 0; + child_handle_buffer = NULL; + } + + for (i = 0; i < driver_count; ++i) { + r = EFI_CALL(efi_open_protocol( +driver_handle_buffer[i], +_guid_driver_binding_protocol, +(void **)_protocol, +driver_handle_buffer[i], NULL, +EFI_OPEN_PROTOCOL_GET_PROTOCOL)); + if (r != EFI_SUCCESS) + continue; + + r = EFI_CALL(binding_protocol->stop(binding_protocol, + controller_handle, + number_of_children, + child_handle_buffer)); + if (r == EFI_SUCCESS) + ++stop_count; + EFI_CALL(efi_close_protocol(driver_handle_buffer[i], + _guid_driver_binding_protocol, + driver_handle_buffer[i], NULL)); + } + + if (driver_image_handle) + efi_free_pool(driver_handle_buffer); + if (stop_count) + r = EFI_SUCCESS; + else + r = EFI_NOT_FOUND; +out: + return EFI_EXIT(r); } efi_status_t EFIAPI efi_close_protocol(void *handle, const efi_guid_t *protocol, -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 19/23] efi_loader: correct bits of receive_filters bit mask
Remove extraneous commas. Add comment. Signed-off-by: Heinrich Schuchardt--- include/efi_api.h | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index b2838125d7..029b57ca5e 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -530,11 +530,12 @@ struct efi_simple_network_mode { u8 media_present; }; -#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01, -#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02, -#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04, -#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08, -#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10, +/* receive_filters bit mask */ +#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01 +#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02 +#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04 +#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08 +#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10 struct efi_simple_network { -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 13/23] efi_loader: non-static efi_open_protocol, efi_close_protocol
We need efi_open_protocol and efi_close_protocol for implementing other functions. So they shouldn't be static. Signed-off-by: Heinrich Schuchardt--- include/efi_loader.h | 9 + lib/efi_loader/efi_boottime.c | 9 - 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 2c3360534b..2a98bf66b8 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -181,6 +181,15 @@ efi_status_t efi_set_timer(struct efi_event *event, enum efi_timer_delay type, uint64_t trigger_time); /* Call this to signal an event */ void efi_signal_event(struct efi_event *event); +/* Call this with EFI_CALL to close a protocol */ +efi_status_t EFIAPI efi_close_protocol(void *handle, efi_guid_t *protocol, + void *agent_handle, + void *controller_handle); +/* Call this with EFI_CALL to open a protocol */ +efi_status_t EFIAPI efi_open_protocol( + void *handle, efi_guid_t *protocol, + void **protocol_interface, void *agent_handle, + void *controller_handle, uint32_t attributes); /* Generic EFI memory allocator, call this to get memory */ void *efi_alloc(uint64_t len, int memory_type); diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 23b8894e73..ad8733d3e5 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -939,10 +939,9 @@ static efi_status_t EFIAPI efi_disconnect_controller(void *controller_handle, return EFI_EXIT(EFI_INVALID_PARAMETER); } -static efi_status_t EFIAPI efi_close_protocol(void *handle, - efi_guid_t *protocol, - void *agent_handle, - void *controller_handle) +efi_status_t EFIAPI efi_close_protocol(void *handle, efi_guid_t *protocol, + void *agent_handle, + void *controller_handle) { struct efi_handler *handler; size_t i; @@ -1326,7 +1325,7 @@ static efi_status_t efi_protocol_open( return EFI_SUCCESS; } -static efi_status_t EFIAPI efi_open_protocol( +efi_status_t EFIAPI efi_open_protocol( void *handle, efi_guid_t *protocol, void **protocol_interface, void *agent_handle, void *controller_handle, uint32_t attributes) -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 15/23] efi_loader: implement ConnectController
Signed-off-by: Heinrich Schuchardt--- include/efi_api.h | 22 include/efi_loader.h | 1 + lib/efi_loader/efi_boottime.c | 119 +- 3 files changed, 141 insertions(+), 1 deletion(-) diff --git a/include/efi_api.h b/include/efi_api.h index 8efc8dfab8..b2838125d7 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -609,4 +609,26 @@ struct efi_pxe { struct efi_pxe_mode *mode; }; +#define EFI_DRIVER_BINDING_PROTOCOL_GUID \ + EFI_GUID(0x18a031ab, 0xb443, 0x4d1a,\ +0xa5, 0xc0, 0x0c, 0x09, 0x26, 0x1e, 0x9f, 0x71) +struct efi_driver_binding_protocol { + efi_status_t (EFIAPI * supported)( + struct efi_driver_binding_protocol *this, + efi_handle_t controller_handle, + struct efi_device_path *remaining_device_path); + efi_status_t (EFIAPI * start)( + struct efi_driver_binding_protocol *this, + efi_handle_t controller_handle, + struct efi_device_path *remaining_device_path); + efi_status_t (EFIAPI * stop)( + struct efi_driver_binding_protocol *this, + efi_handle_t controller_handle, + UINTN number_of_children, + efi_handle_t child_handle_buffer); + u32 version; + efi_handle_t image_handle; + efi_handle_t driver_binding_handle; +}; + #endif diff --git a/include/efi_loader.h b/include/efi_loader.h index 9c68246c7c..f9f33e1d01 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -74,6 +74,7 @@ extern const struct efi_device_path_to_text_protocol efi_device_path_to_text; extern const efi_guid_t efi_guid_console_control; extern const efi_guid_t efi_guid_device_path; +extern const efi_guid_t efi_guid_driver_binding_protocol; extern const efi_guid_t efi_guid_loaded_image; extern const efi_guid_t efi_guid_device_path_to_text_protocol; diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 5a73ea5cd0..1069da7d79 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -18,6 +18,14 @@ DECLARE_GLOBAL_DATA_PTR; +static efi_status_t EFIAPI efi_locate_protocol(const efi_guid_t *protocol, + void *registration, + void **protocol_interface); +static efi_status_t EFIAPI efi_locate_handle_buffer( + enum efi_locate_search_type search_type, + const efi_guid_t *protocol, void *search_key, + unsigned long *no_handles, efi_handle_t **buffer); + /* This list contains all the EFI objects our payload has access to */ LIST_HEAD(efi_obj_list); @@ -49,6 +57,9 @@ static struct efi_configuration_table __efi_runtime_data efi_conf_table[2]; static volatile void *efi_gd, *app_gd; #endif +const efi_guid_t efi_guid_driver_binding_protocol = + EFI_DRIVER_BINDING_PROTOCOL_GUID; + static int entry_count; static int nesting_level; @@ -920,15 +931,121 @@ static efi_status_t EFIAPI efi_set_watchdog_timer(unsigned long timeout, return efi_unsupported(__func__); } +static efi_status_t efi_bind_controller( + efi_handle_t controller_handle, + efi_handle_t driver_image_handle, + struct efi_device_path *remain_device_path) +{ + struct efi_driver_binding_protocol *binding_protocol; + efi_status_t r; + + r = EFI_CALL(efi_open_protocol(driver_image_handle, + _guid_driver_binding_protocol, + (void **)_protocol, + driver_image_handle, NULL, + EFI_OPEN_PROTOCOL_GET_PROTOCOL)); + if (r != EFI_SUCCESS) + return r; + r = EFI_CALL(binding_protocol->supported(binding_protocol, +controller_handle, +remain_device_path)); + if (r == EFI_SUCCESS) + r = EFI_CALL(binding_protocol->start(binding_protocol, +controller_handle, +remain_device_path)); + EFI_CALL(efi_close_protocol(driver_image_handle, + _guid_driver_binding_protocol, + driver_image_handle, NULL)); + return r; +} + +static efi_status_t efi_connect_single_controller( + efi_handle_t controller_handle, + efi_handle_t *driver_image_handle, + struct efi_device_path *remain_device_path) +{ + efi_handle_t *buffer; + unsigned long count; +
[U-Boot] [PATCH 09/23] efi_loader: simplify efi_uninstall_protocol_interface
Use function efi_search_obj and efi_search_protocol to simplify the coding. Do away with efi_uninstall_protocol_interface_ext. We can use EFI_CALL for internal usage. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_boottime.c | 56 ++- 1 file changed, 18 insertions(+), 38 deletions(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 9f8d64659f..a483b827cd 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -562,51 +562,31 @@ static efi_status_t EFIAPI efi_reinstall_protocol_interface(void *handle, static efi_status_t EFIAPI efi_uninstall_protocol_interface(void *handle, efi_guid_t *protocol, void *protocol_interface) { - struct list_head *lhandle; - int i; - efi_status_t r = EFI_NOT_FOUND; + struct efi_handler *handler; + efi_status_t r; + + EFI_ENTRY("%p, %p, %p", handle, protocol, protocol_interface); if (!handle || !protocol) { r = EFI_INVALID_PARAMETER; goto out; } - list_for_each(lhandle, _obj_list) { - struct efi_object *efiobj; - efiobj = list_entry(lhandle, struct efi_object, link); - - if (efiobj->handle != handle) - continue; - - for (i = 0; i < ARRAY_SIZE(efiobj->protocols); i++) { - struct efi_handler *handler = >protocols[i]; - const efi_guid_t *hprotocol = handler->guid; + /* Find the protocol on the handle */ + r = efi_search_protocol(handle, protocol, ); + if (r != EFI_SUCCESS) + goto out; - if (!hprotocol) - continue; - if (!guidcmp(hprotocol, protocol)) { - if (handler->protocol_interface) { - r = EFI_ACCESS_DENIED; - } else { - handler->guid = 0; - r = EFI_SUCCESS; - } - goto out; - } - } + if (handler->protocol_interface) { + /* Disconnect controllers */ + r = EFI_ACCESS_DENIED; + } else { + handler->guid = 0; + r = EFI_SUCCESS; } out: - return r; -} - -static efi_status_t EFIAPI efi_uninstall_protocol_interface_ext(void *handle, - efi_guid_t *protocol, void *protocol_interface) -{ - EFI_ENTRY("%p, %p, %p", handle, protocol, protocol_interface); - - return EFI_EXIT(efi_uninstall_protocol_interface(handle, protocol, -protocol_interface)); + return EFI_EXIT(r); } static efi_status_t EFIAPI efi_register_protocol_notify(efi_guid_t *protocol, @@ -1135,8 +1115,8 @@ static efi_status_t EFIAPI efi_install_multiple_protocol_interfaces( for (; i; --i) { protocol = va_arg(argptr, efi_guid_t*); protocol_interface = va_arg(argptr, void*); - efi_uninstall_protocol_interface(handle, protocol, -protocol_interface); + EFI_CALL(efi_uninstall_protocol_interface(handle, protocol, + protocol_interface)); } va_end(argptr); @@ -1269,7 +1249,7 @@ static const struct efi_boot_services efi_boot_services = { .check_event = efi_check_event, .install_protocol_interface = efi_install_protocol_interface, .reinstall_protocol_interface = efi_reinstall_protocol_interface, - .uninstall_protocol_interface = efi_uninstall_protocol_interface_ext, + .uninstall_protocol_interface = efi_uninstall_protocol_interface, .handle_protocol = efi_handle_protocol, .reserved = NULL, .register_protocol_notify = efi_register_protocol_notify, -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 05/23] efi_loader: rework efi_search_obj
EFI_HANDLEs are used both in boottime and in runtime services. efi_search_obj is a function that can be used to validate handles. So let's make it accessible via efi_loader.h. We can simplify the coding using list_for_each_entry. Signed-off-by: Heinrich Schuchardt--- include/efi_loader.h | 2 ++ lib/efi_loader/efi_boottime.c | 8 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index e8fb4fbb0a..193fca24ce 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -167,6 +167,8 @@ void efi_restore_gd(void); void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map); /* Call this to set the current device name */ void efi_set_bootdev(const char *dev, const char *devnr, const char *path); +/* Call this to validate a handle and find the EFI object for it */ +struct efi_object *efi_search_obj(void *handle); /* Call this to create an event */ efi_status_t efi_create_event(uint32_t type, UINTN notify_tpl, void (EFIAPI *notify_function) ( diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 570a5ea186..b643d299b9 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -822,13 +822,11 @@ static efi_status_t EFIAPI efi_exit(efi_handle_t image_handle, panic("EFI application exited"); } -static struct efi_object *efi_search_obj(void *handle) +struct efi_object *efi_search_obj(void *handle) { - struct list_head *lhandle; + struct efi_object *efiobj; - list_for_each(lhandle, _obj_list) { - struct efi_object *efiobj; - efiobj = list_entry(lhandle, struct efi_object, link); + list_for_each_entry(efiobj, _obj_list, link) { if (efiobj->handle == handle) return efiobj; } -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 18/23] efi_net: return EFI_UNSUPPORTED where appropriate
U-Boot does not implement all functions of the simple network protocol. The unimplemented functions return either of EFI_SUCCESS and EFI_INVALID_PARAMETER. The UEFI spec foresees to return EFI_UNSUPPORTED in these cases. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_net.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index 75d7974b0e..38a3a4fac4 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -81,9 +81,7 @@ static efi_status_t EFIAPI efi_net_receive_filters( EFI_ENTRY("%p, %x, %x, %x, %lx, %p", this, enable, disable, reset_mcast_filter, mcast_filter_count, mcast_filter); - /* XXX Do we care? */ - - return EFI_EXIT(EFI_SUCCESS); + return EFI_EXIT(EFI_UNSUPPORTED); } static efi_status_t EFIAPI efi_net_station_address( @@ -92,7 +90,7 @@ static efi_status_t EFIAPI efi_net_station_address( { EFI_ENTRY("%p, %x, %p", this, reset, new_mac); - return EFI_EXIT(EFI_INVALID_PARAMETER); + return EFI_EXIT(EFI_UNSUPPORTED); } static efi_status_t EFIAPI efi_net_statistics(struct efi_simple_network *this, @@ -101,7 +99,7 @@ static efi_status_t EFIAPI efi_net_statistics(struct efi_simple_network *this, { EFI_ENTRY("%p, %x, %p, %p", this, reset, stat_size, stat_table); - return EFI_EXIT(EFI_INVALID_PARAMETER); + return EFI_EXIT(EFI_UNSUPPORTED); } static efi_status_t EFIAPI efi_net_mcastiptomac(struct efi_simple_network *this, @@ -121,7 +119,7 @@ static efi_status_t EFIAPI efi_net_nvdata(struct efi_simple_network *this, EFI_ENTRY("%p, %x, %lx, %lx, %p", this, read_write, offset, buffer_size, buffer); - return EFI_EXIT(EFI_INVALID_PARAMETER); + return EFI_EXIT(EFI_UNSUPPORTED); } static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this, -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 11/23] efi_loader: open_info in CloseProtocol
efi_open_protocol and efi_close_protocol have to keep track of opened protocols. efi_close_protocol has to mark the appropriate entry as empty. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_boottime.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 294bc1f138..c9aec597a2 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -944,9 +944,40 @@ static efi_status_t EFIAPI efi_close_protocol(void *handle, void *agent_handle, void *controller_handle) { + struct efi_handler *handler; + size_t i; + struct efi_open_protocol_info_entry *open_info; + efi_status_t r; + EFI_ENTRY("%p, %p, %p, %p", handle, protocol, agent_handle, controller_handle); - return EFI_EXIT(EFI_NOT_FOUND); + + if (!agent_handle) { + r = EFI_INVALID_PARAMETER; + goto out; + } + + r = efi_search_protocol(handle, protocol, ); + if (r != EFI_SUCCESS) + goto out; + + for (i = 0; i < ARRAY_SIZE(handler->open_info); ++i) { + open_info = >open_info[i]; + + if (!open_info->open_count) + continue; + + if (open_info->agent_handle == agent_handle && + open_info->controller_handle == + controller_handle) { + open_info->open_count--; + r = EFI_SUCCESS; + goto out; + } + } + r = EFI_NOT_FOUND; +out: + return EFI_EXIT(r); } static efi_status_t EFIAPI efi_open_protocol_information(efi_handle_t handle, -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 07/23] efi_loader: simplify efi_install_protocol_interface
Use function efi_search_obj and efi_search_protocol to simplify the coding. Do away with efi_install_protocol_interface_ext. We can use EFI_CALL for internal usage. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_boottime.c | 76 ++- 1 file changed, 31 insertions(+), 45 deletions(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 9dae02daca..96cb1fa410 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -482,9 +482,12 @@ static efi_status_t EFIAPI efi_install_protocol_interface(void **handle, efi_guid_t *protocol, int protocol_interface_type, void *protocol_interface) { - struct list_head *lhandle; int i; efi_status_t r; + struct efi_object *efiobj; + + EFI_ENTRY("%p, %p, %d, %p", handle, protocol, protocol_interface_type, + protocol_interface); if (!handle || !protocol || protocol_interface_type != EFI_NATIVE_INTERFACE) { @@ -497,54 +500,36 @@ static efi_status_t EFIAPI efi_install_protocol_interface(void **handle, r = EFI_OUT_OF_RESOURCES; goto out; } + /* Find object. */ - list_for_each(lhandle, _obj_list) { - struct efi_object *efiobj; - efiobj = list_entry(lhandle, struct efi_object, link); + efiobj = efi_search_obj(*handle); + if (!efiobj) { + r = EFI_INVALID_PARAMETER; + goto out; + } - if (efiobj->handle != *handle) - continue; - /* Check if protocol is already installed on the handle. */ - for (i = 0; i < ARRAY_SIZE(efiobj->protocols); i++) { - struct efi_handler *handler = >protocols[i]; + /* Check if protocol is already installed on the handle. */ + r = efi_search_protocol(*handle, protocol, NULL); + if (r == EFI_SUCCESS) { + r = EFI_INVALID_PARAMETER; + goto out; + } - if (!handler->guid) - continue; - if (!guidcmp(handler->guid, protocol)) { - r = EFI_INVALID_PARAMETER; - goto out; - } - } - /* Install protocol in first empty slot. */ - for (i = 0; i < ARRAY_SIZE(efiobj->protocols); i++) { - struct efi_handler *handler = >protocols[i]; + /* Install protocol in first empty slot. */ + for (i = 0; i < ARRAY_SIZE(efiobj->protocols); i++) { + struct efi_handler *handler = >protocols[i]; - if (handler->guid) - continue; + if (handler->guid) + continue; - handler->guid = protocol; - handler->protocol_interface = protocol_interface; - r = EFI_SUCCESS; - goto out; - } - r = EFI_OUT_OF_RESOURCES; + handler->guid = protocol; + handler->protocol_interface = protocol_interface; + r = EFI_SUCCESS; goto out; } - r = EFI_INVALID_PARAMETER; + r = EFI_OUT_OF_RESOURCES; out: - return r; -} - -static efi_status_t EFIAPI efi_install_protocol_interface_ext(void **handle, - efi_guid_t *protocol, int protocol_interface_type, - void *protocol_interface) -{ - EFI_ENTRY("%p, %p, %d, %p", handle, protocol, protocol_interface_type, - protocol_interface); - - return EFI_EXIT(efi_install_protocol_interface(handle, protocol, - protocol_interface_type, - protocol_interface)); + return EFI_EXIT(r); } static efi_status_t EFIAPI efi_reinstall_protocol_interface(void *handle, @@ -1115,9 +1100,10 @@ static efi_status_t EFIAPI efi_install_multiple_protocol_interfaces( if (!protocol) break; protocol_interface = va_arg(argptr, void*); - r = efi_install_protocol_interface(handle, protocol, - EFI_NATIVE_INTERFACE, - protocol_interface); + r = EFI_CALL(efi_install_protocol_interface( + handle, protocol, + EFI_NATIVE_INTERFACE, + protocol_interface)); if (r != EFI_SUCCESS) break; i++; @@ -1263,7 +1249,7 @@ static const struct
[U-Boot] [PATCH 06/23] efi_loader: new function efi_search_protocol
In multiple functions we are searching for the protocol of a handle. This patch provides a new function efi_search_protocol that we can use to avoid duplicating code. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_boottime.c | 25 + 1 file changed, 25 insertions(+) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index b643d299b9..9dae02daca 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -453,6 +453,31 @@ static efi_status_t EFIAPI efi_check_event(struct efi_event *event) return EFI_EXIT(EFI_INVALID_PARAMETER); } +static efi_status_t efi_search_protocol(void *handle, efi_guid_t *protocol_guid, + struct efi_handler **handler) +{ + struct efi_object *efiobj; + size_t i; + struct efi_handler *protocol; + + if (!handle || !protocol_guid) + return EFI_INVALID_PARAMETER; + efiobj = efi_search_obj(handle); + if (!efiobj) + return EFI_INVALID_PARAMETER; + for (i = 0; i < ARRAY_SIZE(efiobj->protocols); i++) { + protocol = >protocols[i]; + if (!protocol->guid) + continue; + if (!guidcmp(protocol->guid, protocol_guid)) { + if (handler) + *handler = protocol; + return EFI_SUCCESS; + } + } + return EFI_NOT_FOUND; +} + static efi_status_t EFIAPI efi_install_protocol_interface(void **handle, efi_guid_t *protocol, int protocol_interface_type, void *protocol_interface) -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 03/23] efi_loader: support 16 protocols per efi_object
8 protocols per efi_object is insufficient for iPXE. Signed-off-by: Heinrich Schuchardt--- include/efi_loader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 6f71a6202b..e8fb4fbb0a 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -99,8 +99,8 @@ struct efi_handler { struct efi_object { /* Every UEFI object is part of a global object list */ struct list_head link; - /* We support up to 8 "protocols" an object can be accessed through */ - struct efi_handler protocols[8]; + /* We support up to 16 "protocols" an object can be accessed through */ + struct efi_handler protocols[16]; /* The object spawner can either use this for data or as identifier */ void *handle; }; -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 08/23] efi_loader: allow creating new handles
In efi_install_protocol_interface support creating a new handle. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_boottime.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 96cb1fa410..9f8d64659f 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -238,6 +238,23 @@ static efi_status_t EFIAPI efi_free_pool_ext(void *buffer) return EFI_EXIT(r); } +static efi_status_t efi_create_handle(void **handle) +{ + struct efi_object *obj; + efi_status_t r; + + r = efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, + sizeof(struct efi_object), + (void **)); + if (r != EFI_SUCCESS) + return r; + memset(obj, 0, sizeof(struct efi_object)); + obj->handle = obj; + list_add_tail(>link, _obj_list); + *handle = obj; + return r; +} + /* * Our event capabilities are very limited. Only a small limited * number of events is allowed to coexist. @@ -497,8 +514,9 @@ static efi_status_t EFIAPI efi_install_protocol_interface(void **handle, /* Create new handle if requested. */ if (!*handle) { - r = EFI_OUT_OF_RESOURCES; - goto out; + r = efi_create_handle(handle); + if (r != EFI_SUCCESS) + goto out; } /* Find object. */ -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 04/23] efi_loader: rework efi_locate_handle
Check the parameters in efi_locate_handle. Use list_for_each_entry instead of list_for_each. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_boottime.c | 42 +++--- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index b5538e0769..570a5ea186 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -599,6 +599,7 @@ static int efi_search(enum efi_locate_search_type search_type, case all_handles: return 0; case by_register_notify: + /* RegisterProtocolNotify is not implemented yet */ return -1; case by_protocol: for (i = 0; i < ARRAY_SIZE(efiobj->protocols); i++) { @@ -617,16 +618,38 @@ static efi_status_t efi_locate_handle( efi_guid_t *protocol, void *search_key, unsigned long *buffer_size, efi_handle_t *buffer) { - struct list_head *lhandle; + struct efi_object *efiobj; unsigned long size = 0; + /* Check parameters */ + switch (search_type) { + case all_handles: + break; + case by_register_notify: + if (!search_key) + return EFI_INVALID_PARAMETER; + /* RegisterProtocolNotify is not implemented yet */ + return EFI_UNSUPPORTED; + case by_protocol: + if (!protocol) + return EFI_INVALID_PARAMETER; + break; + default: + return EFI_INVALID_PARAMETER; + } + + /* +* efi_locate_handle_buffer uses this function for +* the calculation of the necessary buffer size. +* So do not require a buffer for buffersize == 0. +*/ + if (!buffer_size || (*buffer_size && !buffer)) + return EFI_INVALID_PARAMETER; + /* Count how much space we need */ - list_for_each(lhandle, _obj_list) { - struct efi_object *efiobj; - efiobj = list_entry(lhandle, struct efi_object, link); - if (!efi_search(search_type, protocol, search_key, efiobj)) { + list_for_each_entry(efiobj, _obj_list, link) { + if (!efi_search(search_type, protocol, search_key, efiobj)) size += sizeof(void*); - } } if (*buffer_size < size) { @@ -639,12 +662,9 @@ static efi_status_t efi_locate_handle( return EFI_NOT_FOUND; /* Then fill the array */ - list_for_each(lhandle, _obj_list) { - struct efi_object *efiobj; - efiobj = list_entry(lhandle, struct efi_object, link); - if (!efi_search(search_type, protocol, search_key, efiobj)) { + list_for_each_entry(efiobj, _obj_list, link) { + if (!efi_search(search_type, protocol, search_key, efiobj)) *(buffer++) = efiobj->handle; - } } return EFI_SUCCESS; -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 02/23] efi_loader: notify when ExitBootServices is invoked
All events of type EVT_SIGNAL_EXIT_BOOT_SERVICES have to be notified when ExitBootServices is invoked. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_boottime.c | 9 + 1 file changed, 9 insertions(+) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index ab26e2989b..b5538e0769 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -843,8 +843,17 @@ static void efi_exit_caches(void) static efi_status_t EFIAPI efi_exit_boot_services(void *image_handle, unsigned long map_key) { + int i; + EFI_ENTRY("%p, %ld", image_handle, map_key); + /* Notify that ExitBootServices is invoked. */ + for (i = 0; i < ARRAY_SIZE(efi_events); ++i) { + if (efi_events[i].type != EVT_SIGNAL_EXIT_BOOT_SERVICES) + continue; + efi_signal_event(_events[i]); + } + board_quiesce_devices(); /* Fix up caches for EFI payloads if necessary */ -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 01/23] efi_loader: allow return value in EFI_CALL
Macro EFI_CALL was introduced to call an UEFI function. Unfortunately it does not support return values. Most UEFI functions have a return value. So let's rename EFI_CALL to EFI_CALL_VOID and introduce a new EFI_CALL macro that supports return values. Cc: Rob ClarkSigned-off-by: Heinrich Schuchardt --- include/efi_loader.h | 17 +++-- lib/efi_loader/efi_boottime.c | 3 ++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 1179234f68..6f71a6202b 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -41,9 +41,22 @@ const char *__efi_nesting_dec(void); }) /* - * Callback into UEFI world from u-boot: + * Call non-void UEFI function from u-boot and retrieve return value: */ -#define EFI_CALL(exp) do { \ +#define EFI_CALL(exp) ({ \ + debug("%sEFI: Call: %s\n", __efi_nesting_inc(), #exp); \ + assert(__efi_exit_check()); \ + typeof(exp) _r = exp; \ + assert(__efi_entry_check()); \ + debug("%sEFI: %lu returned by %s\n", __efi_nesting_dec(), \ + (unsigned long)((uintptr_t)_r & ~EFI_ERROR_MASK), #exp); \ + _r; \ +}) + +/* + * Call void UEFI function from u-boot: + */ +#define EFI_CALL_VOID(exp) do { \ debug("%sEFI: Call: %s\n", __efi_nesting_inc(), #exp); \ assert(__efi_exit_check()); \ exp; \ diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index ea953dca82..ab26e2989b 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -158,7 +158,8 @@ void efi_signal_event(struct efi_event *event) return; event->signaled = 1; if (event->type & EVT_NOTIFY_SIGNAL) { - EFI_CALL(event->notify_function(event, event->notify_context)); + EFI_CALL_VOID(event->notify_function(event, +event->notify_context)); } } -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 00/23] efi_loader implement missing functions
This patch sequence contains all patches needed to load iPXE and use it for downloading and executing images via https or http or to mount iSCSI volumes. Network speed on an Odroid C2 reached 30 MB/s which should be enough for most use cases. I have tested the following iPXE commands successfully * dhcp * route * ntp * sanhook iSCSI-target * chain http-target * kernel http-target * boot (after calling kernel) * exit * reboot The only adjustment in iPXE was adding file src/config/local/nap.h with #undef NAP_EFIX86 #undef NAP_EFIARM #define NAP_NULL and src/config/local/myscript.ipxe with #!ipxe shell before building iPXE with make bin-arm64-efi/snp.efi EMBED=config/local/myscript.ipxe The next task will be to put iXPE binaries on a server and to create Travis CI test cases. Heinrich Schuchardt (23): efi_loader: allow return value in EFI_CALL efi_loader: notify when ExitBootServices is invoked efi_loader: support 16 protocols per efi_object efi_loader: rework efi_locate_handle efi_loader: rework efi_search_obj efi_loader: new function efi_search_protocol efi_loader: simplify efi_install_protocol_interface efi_loader: allow creating new handles efi_loader: simplify efi_uninstall_protocol_interface efi_loader: open_info in OpenProtocol efi_loader: open_info in CloseProtocol efi_loader: implement OpenProtocolInformation efi_loader: non-static efi_open_protocol, efi_close_protocol efi_loader: pass GUIDs as const efi_guid_t * efi_loader: implement ConnectController efi_loader: implement DisconnectController efi_loader: efi_net: hwaddr_size = 6 efi_net: return EFI_UNSUPPORTED where appropriate efi_loader: correct bits of receive_filters bit mask efi_loader: use events for efi_net_receive efi_loader: fix efi_net_get_status efi_loader: set parent handle in efi_load_image efi_loader: implement SetWatchdogTimer cmd/bootefi.c | 1 + include/efi_api.h | 83 +++-- include/efi_loader.h | 38 ++- lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_boottime.c | 729 -- lib/efi_loader/efi_net.c | 57 +++- lib/efi_loader/efi_watchdog.c | 58 7 files changed, 763 insertions(+), 205 deletions(-) create mode 100644 lib/efi_loader/efi_watchdog.c -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] x86: fsp: Configure SPI opcode registers before SPI is locked down
Hi Bin, On 26 August 2017 at 07:58, Bin Mengwrote: > Hi Simon, > > On Sat, Aug 26, 2017 at 9:39 PM, Simon Glass wrote: >> Hi Bin, >> >> On 15 August 2017 at 23:38, Bin Meng wrote: >>> Some Intel FSP (like Braswell) does SPI lock-down during the call >>> to fsp_notify(INIT_PHASE_BOOT). But before SPI lock-down is done, >>> it's bootloader's responsibility to configure the SPI controller's >>> opcode registers properly otherwise SPI controller driver doesn't >>> know how to communicate with the SPI flash device. >>> >>> This introduces a Kconfig option CONFIG_FSP_LOCKDOWN_SPI for such >>> FSPs. When it is on, U-Boot will configure the SPI opcode registers >>> before the lock-down. >>> >>> Signed-off-by: Bin Meng >>> --- >>> >>> arch/x86/Kconfig | 9 + >>> arch/x86/lib/fsp/fsp_common.c | 24 >>> 2 files changed, 33 insertions(+) >>> >>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>> index c26710b..5373082 100644 >>> --- a/arch/x86/Kconfig >>> +++ b/arch/x86/Kconfig >>> @@ -401,6 +401,15 @@ config FSP_BROKEN_HOB >>> do not overwrite the important boot service data which is used by >>> FSP, otherwise the subsequent call to fsp_notify() will fail. >>> >>> +config FSP_LOCKDOWN_SPI >>> + bool >>> + depends on HAVE_FSP >>> + help >>> + Some Intel FSP (like Braswell) does SPI lock-down during the call >>> + to fsp_notify(INIT_PHASE_BOOT). This option should be turned on >>> + for such FSP and U-Boot will configure the SPI opcode registers >>> + before the lock-down. >>> + >>> config ENABLE_MRC_CACHE >>> bool "Enable MRC cache" >>> depends on !EFI && !SYS_COREBOOT >>> diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c >>> index 3397bb8..320d87d 100644 >>> --- a/arch/x86/lib/fsp/fsp_common.c >>> +++ b/arch/x86/lib/fsp/fsp_common.c >>> @@ -19,6 +19,8 @@ >>> >>> DECLARE_GLOBAL_DATA_PTR; >>> >>> +extern void ich_spi_config_opcode(struct udevice *dev); >>> + >>> int checkcpu(void) >>> { >>> return 0; >>> @@ -49,6 +51,28 @@ void board_final_cleanup(void) >>> { >>> u32 status; >>> >>> +#ifdef CONFIG_FSP_LOCKDOWN_SPI >>> + struct udevice *dev; >>> + >>> + /* >>> +* Some Intel FSP (like Braswell) does SPI lock-down during the call >>> +* to fsp_notify(INIT_PHASE_BOOT). But before SPI lock-down is done, >>> +* it's bootloader's responsibility to configure the SPI >>> controller's >>> +* opcode registers properly otherwise SPI controller driver doesn't >>> +* know how to communicate with the SPI flash device. >>> +* >>> +* Note we cannot do such configuration elsewhere (eg: during the >>> SPI >>> +* controller driver's probe() routine), becasue: >>> +* >>> +* 1). U-Boot SPI controller driver does not set the lock-down bit >>> +* 2). Any SPI transfer will corrupt the contents of these registers >>> +* >>> +* Hence we have to do it right here before SPI lock-down bit is >>> set. >>> +*/ >>> + if (!uclass_first_device_err(UCLASS_SPI, )) >>> + ich_spi_config_opcode(dev); >> >> I wonder if we could do this by using an operation instead of directly >> calling a function in the driver? >> > > Do you mean adding one operation to dm_spi_ops? Yes I think that would be better. > >>> +#endif >>> + >>> /* call into FspNotify */ >>> debug("Calling into FSP (notify phase INIT_PHASE_BOOT): "); >>> status = fsp_notify(NULL, INIT_PHASE_BOOT); >>> -- > > Regards, > Bin Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 11/13] x86: braswell: Add FSP configuration
Hi Bin, On 26 August 2017 at 07:56, Bin Mengwrote: > Hi Simon, > > On Sat, Aug 26, 2017 at 9:39 PM, Simon Glass wrote: >> On 15 August 2017 at 23:42, Bin Meng wrote: >>> Add FSP related configuration for Braswell. >>> >>> Signed-off-by: Bin Meng >>> --- >>> >>> arch/x86/cpu/braswell/Makefile | 2 +- >>> arch/x86/cpu/braswell/fsp_configs.c| 158 ++ >>> .../include/asm/arch-braswell/fsp/fsp_configs.h| 89 >>> arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h | 172 +++ >>> arch/x86/include/asm/arch-braswell/gpio.h | 234 >>> + >>> 5 files changed, 654 insertions(+), 1 deletion(-) >>> create mode 100644 arch/x86/cpu/braswell/fsp_configs.c >>> create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_configs.h >>> create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h >>> create mode 100644 arch/x86/include/asm/arch-braswell/gpio.h >>> >> >> Reviewed-by: Simon Glass >> >> Can this use drivers instead of manual device-tree access? > > Which part? Well you have intel,braswell-fsp for example. You could create a driver with the two compatible strings and have it read the platdata from the DT in the ofdata_to_platdata() method. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] ARM: DRA72x: Add support for detection of DRA71x SR 2.1
DRA71x processors are reduced pin and software compatible derivative of DRA72 processors. Add support for detection of SR2.1 version of DRA71x family of processors. Signed-off-by: Vishal Mahaveer--- arch/arm/include/asm/arch-omap5/omap.h | 1 + arch/arm/include/asm/omap_common.h | 1 + arch/arm/mach-omap2/omap5/hw_data.c| 2 ++ arch/arm/mach-omap2/omap5/hwinit.c | 3 +++ arch/arm/mach-omap2/omap5/sdram.c | 2 ++ board/ti/dra7xx/evm.c | 3 +++ 6 files changed, 12 insertions(+) diff --git a/arch/arm/include/asm/arch-omap5/omap.h b/arch/arm/include/asm/arch-omap5/omap.h index b047f0d..6705544 100644 --- a/arch/arm/include/asm/arch-omap5/omap.h +++ b/arch/arm/include/asm/arch-omap5/omap.h @@ -63,6 +63,7 @@ #define DRA752_CONTROL_ID_CODE_ES2_0 0x2B99002F #define DRA722_CONTROL_ID_CODE_ES1_0 0x0B9BC02F #define DRA722_CONTROL_ID_CODE_ES2_0 0x1B9BC02F +#define DRA722_CONTROL_ID_CODE_ES2_1 0x2B9BC02F /* UART */ #define UART1_BASE (OMAP54XX_L4_PER_BASE + 0x6a000) diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index ef5c481..46ee9c2 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -766,6 +766,7 @@ static inline u8 is_dra72x(void) #define DRA752_ES2_0 0x07520200 #define DRA722_ES1_0 0x07220100 #define DRA722_ES2_0 0x07220200 +#define DRA722_ES2_1 0x07220210 /* * silicon device type diff --git a/arch/arm/mach-omap2/omap5/hw_data.c b/arch/arm/mach-omap2/omap5/hw_data.c index 4ad6b53..06a9fd2 100644 --- a/arch/arm/mach-omap2/omap5/hw_data.c +++ b/arch/arm/mach-omap2/omap5/hw_data.c @@ -719,6 +719,7 @@ void __weak hw_data_init(void) case DRA722_ES1_0: case DRA722_ES2_0: + case DRA722_ES2_1: *prcm = _prcm; *dplls_data = _dplls; *ctrl = _ctrl; @@ -753,6 +754,7 @@ void get_ioregs(const struct ctrl_ioregs **regs) *regs = _dra72x_es1; break; case DRA722_ES2_0: + case DRA722_ES2_1: *regs = _dra72x_es2; break; diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c index afe59e0..d53900f 100644 --- a/arch/arm/mach-omap2/omap5/hwinit.c +++ b/arch/arm/mach-omap2/omap5/hwinit.c @@ -377,6 +377,9 @@ void init_omap_revision(void) case DRA722_CONTROL_ID_CODE_ES2_0: *omap_si_rev = DRA722_ES2_0; break; + case DRA722_CONTROL_ID_CODE_ES2_1: + *omap_si_rev = DRA722_ES2_1; + break; default: *omap_si_rev = OMAP5430_SILICON_ID_INVALID; } diff --git a/arch/arm/mach-omap2/omap5/sdram.c b/arch/arm/mach-omap2/omap5/sdram.c index 7712923..684b5bc 100644 --- a/arch/arm/mach-omap2/omap5/sdram.c +++ b/arch/arm/mach-omap2/omap5/sdram.c @@ -481,6 +481,7 @@ void __weak emif_get_ext_phy_ctrl_const_regs(u32 emif_nr, *size = ARRAY_SIZE(dra_ddr3_ext_phy_ctrl_const_base_666MHz); break; case DRA722_ES2_0: + case DRA722_ES2_1: *regs = dra_ddr3_ext_phy_ctrl_const_base_666MHz_es2; *size = ARRAY_SIZE(dra_ddr3_ext_phy_ctrl_const_base_666MHz_es2); break; @@ -714,6 +715,7 @@ const struct read_write_regs *get_bug_regs(u32 *iterations) case DRA752_ES2_0: case DRA722_ES1_0: case DRA722_ES2_0: + case DRA722_ES2_1: bug_00339_regs_ptr = dra_bug_00339_regs; *iterations = sizeof(dra_bug_00339_regs)/ sizeof(dra_bug_00339_regs[0]); diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 93d3d0b..58feb15 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -236,6 +236,7 @@ void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs) break; case DRA722_ES1_0: case DRA722_ES2_0: + case DRA722_ES2_1: if (ram_size < CONFIG_MAX_MEM_MAPPED) *regs = _1_regs_ddr3_666_mhz_1cs_dra_es1; else @@ -299,6 +300,7 @@ void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs) break; case DRA722_ES1_0: case DRA722_ES2_0: + case DRA722_ES2_1: default: if (ram_size < CONFIG_MAX_MEM_MAPPED) *dmm_lisa_regs = _map_2G_x_2; @@ -643,6 +645,7 @@ void recalibrate_iodelay(void) switch (omap_revision()) { case DRA722_ES1_0: case DRA722_ES2_0: + case DRA722_ES2_1: pads = dra72x_core_padconf_array_common; npads = ARRAY_SIZE(dra72x_core_padconf_array_common); if (board_is_dra71x_evm()) { -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] mtdparts: Fix uninitialized scalar usage
On Sat, Aug 26, 2017 at 05:05:30PM -0400, Tom Rini wrote: > When reworking this code to fix other issues found by Coverity, I forgot > to ensure tmp_ep was always cleared before use. > > Reported-by: Coverity (CID: 166612) > Fixes: bc028345acc4 ("mtdparts: Fix final outstanding issue reported by > Coverity") > Signed-off-by: Tom RiniApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] mtdparts: Fix uninitialized scalar usage
When reworking this code to fix other issues found by Coverity, I forgot to ensure tmp_ep was always cleared before use. Reported-by: Coverity (CID: 166612) Fixes: bc028345acc4 ("mtdparts: Fix final outstanding issue reported by Coverity") Signed-off-by: Tom Rini--- cmd/mtdparts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index 6e12275b4083..3275eb919bfb 100644 --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c @@ -1751,6 +1751,7 @@ int mtdparts_init(void) /* save it for later parsing, cannot rely on current partition pointer * as 'partition' variable may be updated during init */ memset(tmp_parts, 0, sizeof(tmp_parts)); + memset(tmp_ep, 0, sizeof(tmp_ep)); if (current_partition) strncpy(tmp_ep, current_partition, PARTITION_MAXLEN); -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3] rpi: Enable USB keyboard support
On Sat, Aug 26, 2017 at 11:43:44AM -0600, Simon Glass wrote: > This is currently disabled, so USB keyboards are not detected in U-Boot. > Enable this option to fix that. > > Signed-off-by: Simon Glass> Tested-by: Jonathan Gray > Reviewed-by: Bin Meng > Tested-by: Paul Barker Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] scripts: objdiff: Ignore debug info when comparing
On Wed, Aug 23, 2017 at 10:59:31AM +0900, Masahiro Yamada wrote: > From: Stephen Boyd> > If the kernel is configured to be built with debug symbols, or > has bug tables, comparing files may not work if line numbers > change. This makes comparing object files with these options > harder to do. Let's strip out the debug info and drop the > __bug_table here so that we don't see false positives. There may > be other things to drop later, and it may be architecture > specific, but this works for me with my ARM64 build. > > [ Import Linux commit: 65ba6fa439e7c3cbf97de9dce9e7a3390ae2638c ] > > Signed-off-by: Stephen Boyd > Reviewed-by: Jason Cooper > Signed-off-by: Masahiro Yamada Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/2] igep00x0: move SPL routines into separate file
On Thu, Aug 17, 2017 at 03:06:45AM +0200, Ladislav Michl wrote: > Avoid cluttering board file with CONFIG_SPL_BUILD ifdefs > by moving SPL related functions into separate file. > > Signed-off-by: Ladislav Michl> Tested-by: Pau Pajuelo > Acked-by: Enric Balletbo i Serra Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v4] ARMv8/sec_firmware : Update chosen/kaslr-seed with random number
On Wed, Aug 16, 2017 at 03:58:10PM +0530, Ruchika Gupta wrote: > kASLR support in kernel requires a random number to be passed via > chosen/kaslr-seed propert. sec_firmware generates this random seed > which can then be passed in the device tree node. > > sec_firmware reserves JR3 for it's own usage. Node for JR3 is > removed from device-tree. > > Signed-off-by: Ruchika GuptaApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 2/3] arm: am57xx: Define Android boot arguments
On Wed, Aug 16, 2017 at 03:55:49PM +0300, Semen Protsenko wrote: > Signed-off-by: Sam ProtsenkoApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] spl: stm32: make falcon mode activation configurable
On Sun, Aug 20, 2017 at 11:05:37AM -0700, Vikas Manocha wrote: > With this change, it will be possible to de-select falcon mode & spl > will only boot U-Boot. > > Signed-off-by: Vikas Manocha> Suggested-by: Bo Shen > Reviewed-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 1/3] arm: omap: Define command for booting Android from eMMC
On Wed, Aug 16, 2017 at 03:55:48PM +0300, Semen Protsenko wrote: > If SD card is present -- try to boot from it first. If no -- try to boot > Android from eMMC. > > Signed-off-by: Sam ProtsenkoApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] disk: part: align buffer so it can be used with DMA enabled drivers
On Wed, Aug 23, 2017 at 09:46:17AM -0700, Stefan Agner wrote: > From: Stefan Agner> > When using ISO partitions with a DMA enabled block device driver > reading the ISO partition leads to unaligned DMA operations: > CACHE: Misaligned operation at range [bffb7da8, bffb85a8] > > Align the buffer to make sure we pass a buffer which works for > DMA operations. > > Signed-off-by: Stefan Agner > Reviewed-by: Bin Meng Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 2/2] arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMC
On Tue, Aug 15, 2017 at 10:52:45PM +0200, Thomas Petazzoni wrote: > do_switch_ecc() calls fsmc_nand_switch_ecc(), which is a direct > function call into drivers/mtd/nand/fsmc_nand.c. However, this > function is not guarded by CONFIG_NAND_FSMC, which results to a build > failure if CONFIG_NAND_FSMC is disabled. > > Signed-off-by: Thomas PetazzoniApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] cmd: spl: provide address and size of prepared FDT in environment
On Thu, Aug 17, 2017 at 09:01:48PM +0200, Anatolij Gustschin wrote: > Writing prepared FDT to persistent storage should be possible in > scripts. Create environment variables containing address and size > of the updated FDT. Scripts can use these variables after running > 'spl export fdt ...' command to write the new blob to persistent > storage. > > Signed-off-by: Anatolij GustschinApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] doc: verified-boot: fix typos
On Tue, Aug 22, 2017 at 03:19:20PM +0900, Masahiro Yamada wrote: > Signed-off-by: Masahiro YamadaApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, PATCHv2, 2/2] igep00x0: merge igep0020 and igep0030 defconfigs to igep00x0_defconfig
On Thu, Aug 17, 2017 at 03:09:14AM +0200, Ladislav Michl wrote: > From: Pau Pajuelo> > Update igep00x0 code with the following features: Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 2/2] board: atmel: Use the new PIT timer driver
On Tue, Aug 15, 2017 at 05:40:27PM +0800, wenyou.y...@microchip.com wrote: > Use the Atmel PIT timer driver which supports the driver model > and device tree. > > Signed-off-by: Wenyou YangApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 3/3] arm: dra7xx: Define Android boot arguments
On Wed, Aug 16, 2017 at 03:55:50PM +0300, Semen Protsenko wrote: > Signed-off-by: Sam ProtsenkoApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] ram: kconfig: s/SPL/TPL/ in TPL_RAM help text
On Fri, Aug 25, 2017 at 08:16:00PM +0530, Jagannadha Sutradharudu Teki wrote: > From: Jagan Teki> > Signed-off-by: Jagan Teki Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mtdparts: Fix final outstanding issue reported by Coverity
On Sun, Aug 20, 2017 at 08:05:40PM -0400, Tom Rini wrote: > As part of fixing the previously reported issues, it was missed that in > the case of mtdparts_init() we need to make sure that tmp_ep is long > enough to contain PARTITION_MAXLEN and a NULL termination. Then, to be > sure the buffer is NULL terminated, zero the entire buffer rather than > just ensuring the first character is NULL. > > Cc: Lothar Waßmann> Cc: Maxime Ripard > Reported-by: Coverity (CID: 166329) > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] fs: fat: fix fatwrite overflow calculation
On Sun, Aug 13, 2017 at 03:16:17PM -0400, Reno Farnesi wrote: > The overflow calculation was incorrect. Adding the start block of the > partition is not needed because the sectors are already relative to the > beginning of the partition. If you attempted to write a file smaller > than cur_part_info.start blocks on a full partition the old calculation > fails to catch the overflow. This would cause an infinite loop in the > determine_fatent function. > > Old, incorrect calculation: > > ending sector of new file = start sector + file size (in sectors) > last sector = partition start + total sectors on the partition > > Adding the partition start block number is not needed because sectors > are already relative to the start of the partition. > > New calculation: > > ending sector of new file = start sector + file size (in sectors) > last sector = total sectors on the partition > > Signed-off-by: Reno FarnesiApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot,1/2] powerpc: Rework interrupt_init_cpu()
On Sun, Aug 13, 2017 at 10:44:37PM -0400, Tom Rini wrote: > The function interrupt_init_cpu() is given an int return type but does > not return anything but 0. Rework this to be a void function. > > Signed-off-by: Tom Rini> Acked-by: Mario Six Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2] arm: dts: am33xx: sync DTS with Linux 4.13-rc4
On Sat, Aug 12, 2017 at 01:26:38PM +0530, suni...@techveda.org wrote: > From: Suniel Mahesh> > This re-syncs AM33xx DTS file with current file from > Linux v4.13-rc4 to ensure a consistent configuration. Upstream > Linux removed the redundant Interrupt-parent property from mmc, > mac, lcdc and tscadc sub nodes. > > Signed-off-by: Suniel Mahesh > Reviewed-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] fs: ext4: Fix journal overrun issue reported by Coverity
On Sun, Aug 20, 2017 at 10:30:15PM -0400, Tom Rini wrote: > While _jdb[fs->blksz] is a valid expression (it points *one* char > sized element past the end of the array, e.g. _jdb[fs->blksz + 1] is > invalid (according to the C standard (C99/C11)). > > Changing this to tag = (struct ext3_journal_block_tag *)(p_jdb + ofs); > > Cc: Stefan Brüns> Suggested-by: Stefan Brüns > Reported-by: Coverity (CID: 165117, 165110) > Signed-off-by: Tom Rini > Reviewed-by: Stefan Brüns Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/
On Tue, Aug 15, 2017 at 10:52:44PM +0200, Thomas Petazzoni wrote: > The code in board/spear/common/ is not board-specific but > SoC-specific. Therefore, boards from other vendors than "spear" may > want to re-use this code, which is currently difficult with the code > being placed in board/spear/common/. > > Since this code really is SoC-specific, this commit moves it to > arch/arm/cpu/arm926ejs/spear/, with the rest of the SPEAr related > code. > > Signed-off-by: Thomas PetazzoniApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull from u-boot-i2c
On Wed, Aug 23, 2017 at 10:38:04AM +0200, Heiko Schocher wrote: > Hello Tom, > > please pull from u-boot-i2c master > > The following changes since commit 90ae53ce1ae665a1b43ecf5ccafc339839392427: > > fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as long (2017-08-22 > 08:20:02 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-i2c.git master > > for you to fetch changes up to a430556ecb630d26880b34b914b6ec29f5454d01: > > i2c: muxes: add i2c gpio multiplexer driver (2017-08-23 07:04:56 +0200) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-sh/rmobile branch
On Sat, Aug 26, 2017 at 07:31:03AM +0900, Nobuhiro Iwamatsu wrote: > Hi Tom, > > The following changes since commit 90ae53ce1ae665a1b43ecf5ccafc339839392427: > > fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as long > (2017-08-22 08:20:02 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-sh.git rmobile > > for you to fetch changes up to f7f79b4493b8beeb1de099d1d1c86049b018ef5c: > > ARM: rmobile: Enable MMC and USB DM on ULCB (2017-08-26 07:04:49 +0900) > Reviewed-by: Tom Rini-- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-x86
On Thu, Aug 24, 2017 at 11:18:14AM +0800, Bin Meng wrote: > Hi Tom, > > This contains various fixes and a reworked version of serial RX buffer > support. Hopefully this is the last PR from x86 for v2017.09. > > The following changes since commit 90ae53ce1ae665a1b43ecf5ccafc339839392427: > > fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as long > (2017-08-22 08:20:02 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-x86.git > > for you to fetch changes up to 438505fe696b176cbf56cd34db870e04027d3531: > > x86: tangier: kconfig: Guard tangier-specific options (2017-08-24 > 11:00:47 +0800) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 1/2] driver: timer: Add the Atmel PIT timer driver
On Tue, Aug 15, 2017 at 05:40:26PM +0800, wenyou.y...@microchip.com wrote: > Add the new Atmel PIT timer driver, which supports the driver model > and device tree. > > Signed-off-by: Wenyou YangApplied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-cfi-flash/master
On Tue, Aug 22, 2017 at 12:11:12PM +0200, Stefan Roese wrote: > Hi Tom, > > please pull the cleanup patch from Marek for the CFI driver. > > Thanks, > Stefan > > > The following changes since commit 2d7cb5b426e7e0cdf684d7f8029ad132d7a8d383: > > env: Replace all open-coded gd->env_valid values with ENV_ flags > (2017-08-20 19:27:44 -0400) > > are available in the git repository at: > > git://www.denx.de/git/u-boot-cfi-flash.git > > for you to fetch changes up to 236c49a1c89f959e0b96c87a712688ba93abd3c4: > > mtd: cfi: staticize functions (2017-08-22 09:56:09 +0200) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-sh/master branch
On Sat, Aug 26, 2017 at 07:42:45AM +0900, Nobuhiro Iwamatsu wrote: > Hi, Tom. > > The following changes since commit 90ae53ce1ae665a1b43ecf5ccafc339839392427: > > fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as long > (2017-08-22 08:20:02 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-sh.git master > > for you to fetch changes up to f40ad66fa066c7eacbcbb11c2e2f251bb82426e0: > > arch/sh: don't bring common/env_embedded.o into the link (2017-08-26 > 07:40:36 +0900) > Reviewed-by: Tom Rini-- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [Patch v2] configs: SECURE_BOOT: Enable CONFIG_CMD_EXT4_WRITE
On Fri, Aug 25, 2017 at 03:33:10PM +0530, Sumit Garg wrote: > As part of chain of trust with confidentiality along with distro > boot, linux kernel image needs to be stored in encrypted form on > ext4 boot partition. So enable CONFIG_CMD_EXT4_WRITE in case of > Secure boot. > > Signed-off-by: Sumit GargReviewed-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] efi_disk: efi_disk_rw_blocks is not an API function
There is no need to use attribute EFIAPI for efi_disk_rw_blocks. It is not an API function. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_disk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index ed06485e33..4e78ade2ed 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -47,7 +47,7 @@ enum efi_disk_direction { EFI_DISK_WRITE, }; -static efi_status_t EFIAPI efi_disk_rw_blocks(struct efi_block_io *this, +static efi_status_t efi_disk_rw_blocks(struct efi_block_io *this, u32 media_id, u64 lba, unsigned long buffer_size, void *buffer, enum efi_disk_direction direction) { -- 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/3] arm: da850-evm: Enable DM and device tree support for da850-evm
With the device tree ported and DM compatible drivers, enable: OF_CONTROL, DM_SPI, DM_SPI_FLASH and DM_SERIAL Signed-off-by: Adam Ford--- configs/da850evm_defconfig | 9 +++-- include/configs/da850evm.h | 17 +++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig index 0135e7d..652da01 100644 --- a/configs/da850evm_defconfig +++ b/configs/da850evm_defconfig @@ -6,8 +6,8 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y +CONFIG_DEFAULT_DEVICE_TREE="da850-evm" CONFIG_SYS_EXTRA_OPTIONS="MAC_ADDR_IN_SPIFLASH" -CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="mem=32M console=ttyS2,115200n8 root=/dev/mtdblock2 rw noinitrd ip=dhcp" @@ -34,8 +34,13 @@ CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_DIAG=y +CONFIG_OF_CONTROL=y +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_DM=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y -CONFIG_OF_LIBFDT=y +CONFIG_DM_SPI=y diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 0736b39..b147bc5 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -21,6 +21,15 @@ #endif /* +* Disable DM_* for SPL build and can be re-enabled after adding +* DM support in SPL +*/ +#ifdef CONFIG_SPL_BUILD +#undef CONFIG_DM_SPI +#undef CONFIG_DM_SPI_FLASH +#undef CONFIG_DM_I2C +#endif +/* * SoC Configuration */ #define CONFIG_MACH_DAVINCI_DA850_EVM @@ -130,18 +139,23 @@ /* * Serial Driver info */ + +#ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE-4 /* NS16550 register size */ #define CONFIG_SYS_NS16550_COM1DAVINCI_UART2_BASE /* Base address of UART2 */ +#endif #define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID) #define CONFIG_CONS_INDEX 1 /* use UART0 for console */ #define CONFIG_SPI #define CONFIG_DAVINCI_SPI -#define CONFIG_SYS_SPI_BASEDAVINCI_SPI1_BASE #define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID) +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_SPI_BASEDAVINCI_SPI1_BASE #define CONFIG_SF_DEFAULT_SPEED3000 #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED +#endif #ifdef CONFIG_USE_SPIFLASH #define CONFIG_SPL_SPI_LOAD @@ -152,7 +166,6 @@ /* * I2C Configuration */ -#define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_DAVINCI #define CONFIG_SYS_DAVINCI_I2C_SPEED 25000 #define CONFIG_SYS_DAVINCI_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */ -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/3] spi: davinci_spi: Add da830-spi support for DM
The DM support is already in the driver, so add da830-spi to the compatible list. Signed-off-by: Adam Ford--- drivers/spi/davinci_spi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c index 291ef95..eda252d 100644 --- a/drivers/spi/davinci_spi.c +++ b/drivers/spi/davinci_spi.c @@ -563,6 +563,7 @@ static const struct dm_spi_ops davinci_spi_ops = { static const struct udevice_id davinci_spi_ids[] = { { .compatible = "ti,keystone-spi" }, { .compatible = "ti,dm6441-spi" }, + { .compatible = "ti,da830-spi" }, { } }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/3] arm: dts: da850: Migrate da850-evm DTS files from Linux 4.13-RC5
A few small additional items are needed to support DM_SPI and DM_SERIAL, so those were added to da850-evm-u-boot.dtsi Signed-off-by: Adam Ford--- arch/arm/dts/da850-evm-u-boot.dtsi | 22 ++ arch/arm/dts/da850-evm.dts | 304 +++ arch/arm/dts/da850.dtsi| 581 + arch/arm/dts/tps6507x.dtsi | 47 +++ 4 files changed, 954 insertions(+) diff --git a/arch/arm/dts/da850-evm-u-boot.dtsi b/arch/arm/dts/da850-evm-u-boot.dtsi new file mode 100644 index 000..516bc1d --- /dev/null +++ b/arch/arm/dts/da850-evm-u-boot.dtsi @@ -0,0 +1,22 @@ +/* + * da850-evm U-Boot Additions + * + * Copyright (C) 2017 Logic PD, Inc. + * Copyright (C) Adam Ford + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +/ { + chosen { + stdout-path = + }; + + aliases { + spi0 = + }; +}; + + { + compatible = "m25p64", "spi-flash"; +}; diff --git a/arch/arm/dts/da850-evm.dts b/arch/arm/dts/da850-evm.dts new file mode 100644 index 000..67e72bc --- /dev/null +++ b/arch/arm/dts/da850-evm.dts @@ -0,0 +1,304 @@ +/* + * Device Tree for DA850 EVM board + * + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, version 2. + */ +/dts-v1/; +#include "da850.dtsi" +#include + +/ { + compatible = "ti,da850-evm", "ti,da850"; + model = "DA850/AM1808/OMAP-L138 EVM"; + + soc@1c0 { + pmx_core: pinmux@14120 { + status = "okay"; + + mcasp0_pins: pinmux_mcasp0_pins { + pinctrl-single,bits = < + /* +* AHCLKX, ACLKX, AFSX, AHCLKR, ACLKR, +* AFSR, AMUTE +*/ + 0x00 0x 0x + /* AXR11, AXR12 */ + 0x04 0x00011000 0x000ff000 + >; + }; + nand_pins: nand_pins { + pinctrl-single,bits = < + /* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[4], EMA_CS[3] */ + 0x1c 0x10110110 0xf0ff0ff0 + /* +* EMA_D[0], EMA_D[1], EMA_D[2], +* EMA_D[3], EMA_D[4], EMA_D[5], +* EMA_D[6], EMA_D[7] +*/ + 0x24 0x 0x + /* EMA_A[1], EMA_A[2] */ + 0x30 0x0110 0x0ff0 + >; + }; + }; + serial0: serial@42000 { + status = "okay"; + }; + serial1: serial@10c000 { + status = "okay"; + }; + serial2: serial@10d000 { + status = "okay"; + }; + rtc0: rtc@23000 { + status = "okay"; + }; + i2c0: i2c@22000 { + status = "okay"; + clock-frequency = <10>; + pinctrl-names = "default"; + pinctrl-0 = <_pins>; + + tps: tps@48 { + reg = <0x48>; + }; + tlv320aic3106: tlv320aic3106@18 { + #sound-dai-cells = <0>; + compatible = "ti,tlv320aic3106"; + reg = <0x18>; + status = "okay"; + + /* Regulators */ + IOVDD-supply = <_reg>; + /* Derived from VBAT: Baseboard 3.3V / 1.8V */ + AVDD-supply = <>; + DRVDD-supply = <>; + DVDD-supply = <>; + }; + tca6416: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + }; + }; + wdt: wdt@21000 { + status = "okay"; + }; + mmc0: mmc@4 { + max-frequency =
Re: [U-Boot] rk3xxx.dtsi /usb_host missing specific compatible
On Sat, Aug 26, 2017 at 07:48:28PM +0200, Heiko Stuebner wrote: > Am Freitag, 25. August 2017, 13:20:47 CEST schrieb Philipp Tomsich: > > + Heiko > > > > On Wed, 23 Aug 2017, Artturi Alm wrote: > > > > > Hi, > > > > > > > > > no idea if this is the right place to mail about this, but i got > > > suggested this node is out-of-norm, and the diff below fixes that > > > for me on rk3188. > > > > > > -Artturi > > > > When submitting changes, please send a patch w/ an appropriate commit > > message (e.g. using patman). If you tag it as "rockchip:", it will > > eventually get assigned to my queue. > > > > > > > > diff --git a/arch/arm/dts/rk3xxx.dtsi b/arch/arm/dts/rk3xxx.dtsi > > > index 6d9e36d235..21f2afc104 100644 > > > --- a/arch/arm/dts/rk3xxx.dtsi > > > +++ b/arch/arm/dts/rk3xxx.dtsi > > > @@ -157,7 +157,7 @@ > > > }; > > > > > > usb_host: usb@101c { > > > - compatible = "snps,dwc2"; > > > + compatible = "rockchip,rk3066-usb", "snps,dwc2"; > > > > This is the same on the Linux upstream, which is the leading repository > > for this DTS file. Also, the "rockchip,rk3066-usb" is used by none of the > > drivers (whereas "snsp,dwc2" is matche by drivers/usb/host/dwc2.c. > > > > From my point of view, there's no point in changing this (unless Heiko > > would like to see this changed both here and in Linux). > > In general it is common practice to have a more specialized compatible > as a reserve, to be able add "quirks" later on if necessary without needing > devicetree updates as well. For example the otg node does already have > the rk3066-usb compatible. > > On the kernel-side, we even do have specialized init values for Rockchip > dwc2 controllers, which is bound to the rk3066-usb compatible. I'm not > sure why only the otg controller got it though and the addition of the > dwc2 nodes in the mainline kernel was already in 2014 :-) . > > So I don't have a set opinion one way or another, as it looks like things > work reasonably well as they are now, but if someone sends in a > _tested_ kernel patch setting the specific compatible, I'll look at it > and possibly apply it :-) . > > > Heiko I was asking this for OpenBSD actually, as it has these FDT "attachment-drivers" via rather generic stubs to do the driver attachment with compatibles alone for matching the needed config. I've already worked around, but think of it as ugly SoC-specific hack as-is. Hmmph, i missed a detail before, i might actually need this fixed in Linux too. I haven't seen any patches to .dts files in the OpenBSD-ports package, for the .dtb files shipped for use, and iirc they're sourced from Linux. I'll leave the tested linux patch for a very rainy day, because atm. u-boot is broken enough on rk3188 that i can't really test anything on them. -Artturi ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 0/8] sf: improve support of (Q)SPI flash memories
On Sat, Aug 26, 2017 at 10:36:57AM +0200, Marek Vasut wrote: > On 08/26/2017 08:14 AM, Jagan Teki wrote: > > On Sat, Aug 26, 2017 at 4:35 AM, Bin Mengwrote: > >> On Sat, Aug 26, 2017 at 12:45 AM, Marek Vasut wrote: > >>> On 08/25/2017 06:28 PM, Jagan Teki wrote: > On Fri, Aug 25, 2017 at 9:43 PM, Marek Vasut wrote: > > On 08/25/2017 06:07 PM, Jagan Teki wrote: > >> On Fri, Aug 25, 2017 at 6:47 AM, Yang, Wenyou > >> wrote: > >>> Hi, > >>> > >>> This patch set has been here for a long time, could you have a look > >>> and take > >>> it? > >> > >> Yeah, I'm holding this because of my current spi-nor work. But anyway > >> I will try to merge on coming MW If all OK. > > > > Is your work posted somewhere or available in some git repository ? > >>> > >>> You did not answer this question. > >>> > > I don't see any reason why you should not perform your maintainer duties > > by reviewing/replying to an incoming patch, no matter what work you do > > to the subsystem though ... > > I didn't write "this series holding spi-nor work" since it has some > new features I'm taking time to review. > >>> > >>> I never implied this. Rather the opposite, you claim you do some work on > >>> the SPI NOR core, yet you let this patchset rot in the list for over a > >>> month now and gave the author zero feedback. > >>> > >>> Notifying the author about the core changes early could've prevented a > >>> lot of wasted effort on his side. Reviewing early could've prevented a > >>> lot of frustration from patches being ignored. > >>> > There is nothing wrong with > maintainer duties here, you must need to understand. > >>> > >>> I disagree. > >>> > >> > >> I agree with Marek here. I found it's really hard to get feedback for > >> SF patches in time and what I have to do is to ping again and again. > > > > I agree that the SF side patches have got some delay recently, but ie > > something not intentional. SF stack is not stable as of now, so I'm > > working on SPI-NOR (v10)[1] the new patches for SF need to wait - > > please be patient. > > What are the problems with the stack causing this instability ? > > How do you plan to stabilize the stack for the current release ? > > Given how complex and incomplete this patch(set) [1] is and that it's > already in v10, it seems it will take a while to get it into shape in > which it can be included in mainline. Blocking all other contributions > because of this patchset seems wrong and hurtful to the contributors to me. Yes. We cannot let a new framework block progress enabling things on our current framework. We are not at the point with spi-nor that we can say nothing else is allowed to move forward. Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] rk3xxx.dtsi /usb_host missing specific compatible
Am Freitag, 25. August 2017, 13:20:47 CEST schrieb Philipp Tomsich: > + Heiko > > On Wed, 23 Aug 2017, Artturi Alm wrote: > > > Hi, > > > > > > no idea if this is the right place to mail about this, but i got > > suggested this node is out-of-norm, and the diff below fixes that > > for me on rk3188. > > > > -Artturi > > When submitting changes, please send a patch w/ an appropriate commit > message (e.g. using patman). If you tag it as "rockchip:", it will > eventually get assigned to my queue. > > > > > diff --git a/arch/arm/dts/rk3xxx.dtsi b/arch/arm/dts/rk3xxx.dtsi > > index 6d9e36d235..21f2afc104 100644 > > --- a/arch/arm/dts/rk3xxx.dtsi > > +++ b/arch/arm/dts/rk3xxx.dtsi > > @@ -157,7 +157,7 @@ > > }; > > > > usb_host: usb@101c { > > - compatible = "snps,dwc2"; > > + compatible = "rockchip,rk3066-usb", "snps,dwc2"; > > This is the same on the Linux upstream, which is the leading repository > for this DTS file. Also, the "rockchip,rk3066-usb" is used by none of the > drivers (whereas "snsp,dwc2" is matche by drivers/usb/host/dwc2.c. > > From my point of view, there's no point in changing this (unless Heiko > would like to see this changed both here and in Linux). In general it is common practice to have a more specialized compatible as a reserve, to be able add "quirks" later on if necessary without needing devicetree updates as well. For example the otg node does already have the rk3066-usb compatible. On the kernel-side, we even do have specialized init values for Rockchip dwc2 controllers, which is bound to the rk3066-usb compatible. I'm not sure why only the otg controller got it though and the addition of the dwc2 nodes in the mainline kernel was already in 2014 :-) . So I don't have a set opinion one way or another, as it looks like things work reasonably well as they are now, but if someone sends in a _tested_ kernel patch setting the specific compatible, I'll look at it and possibly apply it :-) . Heiko ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3] rpi: Enable USB keyboard support
This is currently disabled, so USB keyboards are not detected in U-Boot. Enable this option to fix that. Signed-off-by: Simon GlassTested-by: Jonathan Gray Reviewed-by: Bin Meng Tested-by: Paul Barker --- Changes in v3: - Add missing review/test tags Changes in v2: - Fix U_Boot typo configs/rpi_2_defconfig | 1 + configs/rpi_3_32b_defconfig | 1 + configs/rpi_3_defconfig | 1 + configs/rpi_defconfig | 1 + 4 files changed, 4 insertions(+) diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig index 63d1e4042d..5150eed79c 100644 --- a/configs/rpi_2_defconfig +++ b/configs/rpi_2_defconfig @@ -15,6 +15,7 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y +CONFIG_DM_KEYBOARD=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig index 343cb197a1..caceb85b07 100644 --- a/configs/rpi_3_32b_defconfig +++ b/configs/rpi_3_32b_defconfig @@ -16,6 +16,7 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y +CONFIG_DM_KEYBOARD=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig index 6c9f2e32b5..e3dd1b9124 100644 --- a/configs/rpi_3_defconfig +++ b/configs/rpi_3_defconfig @@ -16,6 +16,7 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y +CONFIG_DM_KEYBOARD=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig index 6b3cec5ce0..eaf9bb9189 100644 --- a/configs/rpi_defconfig +++ b/configs/rpi_defconfig @@ -15,6 +15,7 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y +CONFIG_DM_KEYBOARD=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y -- 2.14.1.342.g6490525c54-goog ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2] rpi: Enable USB keyboard support
This is currently disabled, so USB keyboards are not detected in U-Boot. Enable this option to fix that. Series-cc trini Signed-off-by: Simon Glass--- Changes in v2: - Fix U_Boot typo configs/rpi_2_defconfig | 1 + configs/rpi_3_32b_defconfig | 1 + configs/rpi_3_defconfig | 1 + configs/rpi_defconfig | 1 + 4 files changed, 4 insertions(+) diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig index 63d1e4042d..5150eed79c 100644 --- a/configs/rpi_2_defconfig +++ b/configs/rpi_2_defconfig @@ -15,6 +15,7 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y +CONFIG_DM_KEYBOARD=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig index 343cb197a1..caceb85b07 100644 --- a/configs/rpi_3_32b_defconfig +++ b/configs/rpi_3_32b_defconfig @@ -16,6 +16,7 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y +CONFIG_DM_KEYBOARD=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig index 6c9f2e32b5..e3dd1b9124 100644 --- a/configs/rpi_3_defconfig +++ b/configs/rpi_3_defconfig @@ -16,6 +16,7 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y +CONFIG_DM_KEYBOARD=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig index 6b3cec5ce0..eaf9bb9189 100644 --- a/configs/rpi_defconfig +++ b/configs/rpi_defconfig @@ -15,6 +15,7 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y +CONFIG_DM_KEYBOARD=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y -- 2.14.1.342.g6490525c54-goog ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/4] rockchip: enable rockusb for all rockchip SoCs
On 08/26/2017 02:46 PM, Tom Rini wrote: On Fri, Aug 25, 2017 at 01:06:55PM +0200, Łukasz Majewski wrote: Hi Philipp, Andy, Tom On 25 Aug 2017, at 03:51, Andy Yanwrote: Hi Lukasz: 2017-08-22 18:05 GMT+08:00 Łukasz Majewski >: Hi Kever, Philipp, I have no idea about the status of rockusb, it has been a long time on the list. Maybe Eddie or Lukasz have an answer? I've asked Eddie to fix issues with breaking other boards when enabling USB gadget infrastructure on RK. No reply since then. Eddie has fix all the issues he can reproduced on local。 The only problem now is that the rk3036 based boards(evb-rk3036/kylin-rk3036) show compile errors on CI[0], The Travis log shows linker errors for some of the other boards (i.e. not evb-rk3036/kylin-rk3036), due to unresolved symbols. Yes, Indeed. I've build those boards locally with gcc 6.3 and it was successful. The same one we use in travis-ci, from Linaro? I've been using some OE build from yocto 2.3 SDK. I will try to use the one from Linaro. Regarding travis CI: With Eddie's patches it shows error: https://travis-ci.org/lmajewski/u-boot-dfu/builds/268270904 However, without Eddie's patches travis-CI doesn't show any errors: https://travis-ci.org/lmajewski/u-boot-dfu/builds/268303030 Let's ask Tom (who has far more experience with travis-CI), if he saw something like that before. Well, travis talks about using docker to replicate their environment, which means someone should be able to do that, get it to fail in a debugable environment and then move forward. From the sentence it seems like travis-ci is going to use docker. Is it correct? Is it now possible to download the docker container for build testing? -- Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] efi_loader: call __efi_exit_check in efi_exit
On Fri, Aug 25, 2017 at 1:53 PM, Heinrich Schuchardtwrote: > The calls to __efi_entry_check and __efi_exit_check have to match. > If DEBUG is defined, panic() will be called otherwise. > > If debugging is activated some Travis CI builds fail due to an > assertion in EFI_CALL without the patch. > > Signed-off-by: Heinrich Schuchardt Thanks, Reviewed-by: Rob Clark > --- > lib/efi_loader/efi_boottime.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c > index 5444b32530..ef3ae05126 100644 > --- a/lib/efi_loader/efi_boottime.c > +++ b/lib/efi_loader/efi_boottime.c > @@ -828,6 +828,8 @@ static efi_status_t EFIAPI efi_exit(efi_handle_t > image_handle, > EFI_ENTRY("%p, %ld, %ld, %p", image_handle, exit_status, > exit_data_size, exit_data); > > + __efi_exit_check(); > + > loaded_image_info->exit_status = exit_status; > longjmp(_image_info->exit_jmp, 1); > > -- > 2.14.1 > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] x86: fsp: Configure SPI opcode registers before SPI is locked down
Hi Simon, On Sat, Aug 26, 2017 at 9:39 PM, Simon Glasswrote: > Hi Bin, > > On 15 August 2017 at 23:38, Bin Meng wrote: >> Some Intel FSP (like Braswell) does SPI lock-down during the call >> to fsp_notify(INIT_PHASE_BOOT). But before SPI lock-down is done, >> it's bootloader's responsibility to configure the SPI controller's >> opcode registers properly otherwise SPI controller driver doesn't >> know how to communicate with the SPI flash device. >> >> This introduces a Kconfig option CONFIG_FSP_LOCKDOWN_SPI for such >> FSPs. When it is on, U-Boot will configure the SPI opcode registers >> before the lock-down. >> >> Signed-off-by: Bin Meng >> --- >> >> arch/x86/Kconfig | 9 + >> arch/x86/lib/fsp/fsp_common.c | 24 >> 2 files changed, 33 insertions(+) >> >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >> index c26710b..5373082 100644 >> --- a/arch/x86/Kconfig >> +++ b/arch/x86/Kconfig >> @@ -401,6 +401,15 @@ config FSP_BROKEN_HOB >> do not overwrite the important boot service data which is used by >> FSP, otherwise the subsequent call to fsp_notify() will fail. >> >> +config FSP_LOCKDOWN_SPI >> + bool >> + depends on HAVE_FSP >> + help >> + Some Intel FSP (like Braswell) does SPI lock-down during the call >> + to fsp_notify(INIT_PHASE_BOOT). This option should be turned on >> + for such FSP and U-Boot will configure the SPI opcode registers >> + before the lock-down. >> + >> config ENABLE_MRC_CACHE >> bool "Enable MRC cache" >> depends on !EFI && !SYS_COREBOOT >> diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c >> index 3397bb8..320d87d 100644 >> --- a/arch/x86/lib/fsp/fsp_common.c >> +++ b/arch/x86/lib/fsp/fsp_common.c >> @@ -19,6 +19,8 @@ >> >> DECLARE_GLOBAL_DATA_PTR; >> >> +extern void ich_spi_config_opcode(struct udevice *dev); >> + >> int checkcpu(void) >> { >> return 0; >> @@ -49,6 +51,28 @@ void board_final_cleanup(void) >> { >> u32 status; >> >> +#ifdef CONFIG_FSP_LOCKDOWN_SPI >> + struct udevice *dev; >> + >> + /* >> +* Some Intel FSP (like Braswell) does SPI lock-down during the call >> +* to fsp_notify(INIT_PHASE_BOOT). But before SPI lock-down is done, >> +* it's bootloader's responsibility to configure the SPI controller's >> +* opcode registers properly otherwise SPI controller driver doesn't >> +* know how to communicate with the SPI flash device. >> +* >> +* Note we cannot do such configuration elsewhere (eg: during the SPI >> +* controller driver's probe() routine), becasue: >> +* >> +* 1). U-Boot SPI controller driver does not set the lock-down bit >> +* 2). Any SPI transfer will corrupt the contents of these registers >> +* >> +* Hence we have to do it right here before SPI lock-down bit is set. >> +*/ >> + if (!uclass_first_device_err(UCLASS_SPI, )) >> + ich_spi_config_opcode(dev); > > I wonder if we could do this by using an operation instead of directly > calling a function in the driver? > Do you mean adding one operation to dm_spi_ops? >> +#endif >> + >> /* call into FspNotify */ >> debug("Calling into FSP (notify phase INIT_PHASE_BOOT): "); >> status = fsp_notify(NULL, INIT_PHASE_BOOT); >> -- Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 11/13] x86: braswell: Add FSP configuration
Hi Simon, On Sat, Aug 26, 2017 at 9:39 PM, Simon Glasswrote: > On 15 August 2017 at 23:42, Bin Meng wrote: >> Add FSP related configuration for Braswell. >> >> Signed-off-by: Bin Meng >> --- >> >> arch/x86/cpu/braswell/Makefile | 2 +- >> arch/x86/cpu/braswell/fsp_configs.c| 158 ++ >> .../include/asm/arch-braswell/fsp/fsp_configs.h| 89 >> arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h | 172 +++ >> arch/x86/include/asm/arch-braswell/gpio.h | 234 >> + >> 5 files changed, 654 insertions(+), 1 deletion(-) >> create mode 100644 arch/x86/cpu/braswell/fsp_configs.c >> create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_configs.h >> create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h >> create mode 100644 arch/x86/include/asm/arch-braswell/gpio.h >> > > Reviewed-by: Simon Glass > > Can this use drivers instead of manual device-tree access? Which part? Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 12/18] rockchip: sdhci: Convert to livetree
On 16 August 2017 at 11:32, Philipp Tomsichwrote: > Update the Rockchip SDHCI wrapper to support a live device tree. > > Signed-off-by: Philipp Tomsich > --- > > drivers/mmc/rockchip_sdhci.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Simon Glass Please see below. > > diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c > index f31d329..8d62bf9 100644 > --- a/drivers/mmc/rockchip_sdhci.c > +++ b/drivers/mmc/rockchip_sdhci.c > @@ -9,7 +9,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -82,7 +81,7 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice > *dev) > struct sdhci_host *host = dev_get_priv(dev); > > host->name = dev->name; > - host->ioaddr = devfdt_get_addr_ptr(dev); > + host->ioaddr = (void *)dev_read_addr(dev); Can you please add a dev_read_addr_ptr() ? > #endif > > return 0; > -- > 2.1.4 > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] board: atmel: Use the new PIT timer driver
On 15 August 2017 at 03:40, Wenyou Yangwrote: > Use the Atmel PIT timer driver which supports the driver model > and device tree. > > Signed-off-by: Wenyou Yang > --- > > Changes in v2: > - Integrate the PATCH {timer: Add Atmel PIT timer driver} to >one patch set. > - Rebase on latest commit of uboot/master (2d3c4ae35). > - Retain the CONFIG_SYS_TIMER_COUNTER macro in . > - Convert all atmel boards to support the new timer driver. > > arch/arm/dts/sama5d2.dtsi | 28 > ++ > configs/at91sam9260ek_dataflash_cs0_defconfig | 2 ++ > configs/at91sam9260ek_dataflash_cs1_defconfig | 2 ++ > configs/at91sam9260ek_nandflash_defconfig | 2 ++ > configs/at91sam9261ek_dataflash_cs0_defconfig | 2 ++ > configs/at91sam9261ek_dataflash_cs3_defconfig | 2 ++ > configs/at91sam9261ek_nandflash_defconfig | 2 ++ > configs/at91sam9263ek_dataflash_cs0_defconfig | 2 ++ > configs/at91sam9263ek_dataflash_defconfig | 2 ++ > configs/at91sam9263ek_nandflash_defconfig | 2 ++ > configs/at91sam9263ek_norflash_boot_defconfig | 2 ++ > configs/at91sam9263ek_norflash_defconfig | 2 ++ > configs/at91sam9g20ek_2mmc_defconfig | 2 ++ > configs/at91sam9g20ek_2mmc_nandflash_defconfig | 2 ++ > configs/at91sam9g20ek_dataflash_cs0_defconfig | 2 ++ > configs/at91sam9g20ek_dataflash_cs1_defconfig | 2 ++ > configs/at91sam9g20ek_nandflash_defconfig | 2 ++ > configs/at91sam9m10g45ek_mmc_defconfig | 2 ++ > configs/at91sam9m10g45ek_nandflash_defconfig | 2 ++ > configs/at91sam9n12ek_mmc_defconfig| 2 ++ > configs/at91sam9n12ek_nandflash_defconfig | 2 ++ > configs/at91sam9n12ek_spiflash_defconfig | 2 ++ > configs/at91sam9rlek_dataflash_defconfig | 2 ++ > configs/at91sam9rlek_mmc_defconfig | 2 ++ > configs/at91sam9rlek_nandflash_defconfig | 2 ++ > configs/at91sam9x5ek_dataflash_defconfig | 2 ++ > configs/at91sam9x5ek_mmc_defconfig | 2 ++ > configs/at91sam9x5ek_nandflash_defconfig | 2 ++ > configs/at91sam9x5ek_spiflash_defconfig| 2 ++ > configs/at91sam9xeek_dataflash_cs0_defconfig | 2 ++ > configs/at91sam9xeek_dataflash_cs1_defconfig | 2 ++ > configs/at91sam9xeek_nandflash_defconfig | 2 ++ > configs/gurnard_defconfig | 2 ++ > configs/sama5d2_xplained_mmc_defconfig | 3 +++ > configs/sama5d2_xplained_spiflash_defconfig| 3 +++ > configs/sama5d36ek_cmp_mmc_defconfig | 2 ++ > configs/sama5d36ek_cmp_nandflash_defconfig | 2 ++ > configs/sama5d36ek_cmp_spiflash_defconfig | 2 ++ > configs/sama5d3_xplained_mmc_defconfig | 3 +++ > configs/sama5d3_xplained_nandflash_defconfig | 3 +++ > configs/sama5d3xek_mmc_defconfig | 3 +++ > configs/sama5d3xek_nandflash_defconfig | 3 +++ > configs/sama5d3xek_spiflash_defconfig | 3 +++ > configs/sama5d4_xplained_mmc_defconfig | 3 +++ > configs/sama5d4_xplained_nandflash_defconfig | 3 +++ > configs/sama5d4_xplained_spiflash_defconfig| 3 +++ > configs/sama5d4ek_mmc_defconfig| 3 +++ > configs/sama5d4ek_nandflash_defconfig | 3 +++ > configs/sama5d4ek_spiflash_defconfig | 3 +++ > 49 files changed, 137 insertions(+) I wonder if you could 'imply' these options in Kconfig instead? Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 10/13] x86: braswell: Add microcode for B0/C0/D0 stepping SoC
On 15 August 2017 at 23:41, Bin Mengwrote: > This adds microcode device tree fragment for Braswell B0 (406C2), > C0 (406C3) and D0 (406C4) stepping SoC. > > Signed-off-by: Bin Meng > --- > > arch/x86/dts/microcode/m01406c2220.dtsi | 4308 > +++ > arch/x86/dts/microcode/m01406c3363.dtsi | 4308 > +++ > arch/x86/dts/microcode/m01406c440a.dtsi | 4308 > +++ > 3 files changed, 12924 insertions(+) > create mode 100644 arch/x86/dts/microcode/m01406c2220.dtsi > create mode 100644 arch/x86/dts/microcode/m01406c3363.dtsi > create mode 100644 arch/x86/dts/microcode/m01406c440a.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 v3 4/5] spl: fit: Support both external and embedded data
On 15 August 2017 at 12:14, York Sunwrote: > SPL supports U-Boot image in FIT format which has data outside of > FIT structure. This adds support for embedded data for normal FIT > images. > > Signed-off-by: York Sun > Reviewed-by: Tom Rini > > --- > > Changes in v3: > Update doc/uImage.FIT/source_file_format.txt with embedded and external data > > Changes in v2: > Rebase on top of "SPL: FIT: factor out spl_load_fit_image()" by Andre Przywara > > common/spl/spl_fit.c | 52 > ++- > doc/uImage.FIT/source_file_format.txt | 4 +++ > 2 files changed, 37 insertions(+), 19 deletions(-) Reviewed-by: Simon Glass Please see nit below. > > diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c > index fe41ce0..9449a22 100644 > --- a/common/spl/spl_fit.c > +++ b/common/spl/spl_fit.c > @@ -132,14 +132,16 @@ static int spl_load_fit_image(struct spl_load_info > *info, ulong sector, > void *fit, ulong base_offset, int node, > struct spl_image_info *image_info) > { > - ulong offset; > + int offset; > size_t length; > + int len; > ulong load_addr, load_ptr; > void *src; > ulong overhead; > int nr_sectors; > int align_len = ARCH_DMA_MINALIGN - 1; > uint8_t image_comp = -1, type = -1; > + const void *data; > > if (IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_GZIP)) { > if (fit_image_get_comp(fit, node, _comp)) > @@ -153,28 +155,40 @@ static int spl_load_fit_image(struct spl_load_info > *info, ulong sector, > debug("%s ", genimg_get_type_name(type)); > } > > - offset = fdt_getprop_u32(fit, node, "data-offset"); > - if (offset == FDT_ERROR) > - return -ENOENT; > - offset += base_offset; > - length = fdt_getprop_u32(fit, node, "data-size"); > - if (length == FDT_ERROR) > - return -ENOENT; > - load_addr = fdt_getprop_u32(fit, node, "load"); > - if (load_addr == FDT_ERROR && image_info) > + if (fit_image_get_load(fit, node, _addr)) > load_addr = image_info->load_addr; > - load_ptr = (load_addr + align_len) & ~align_len; > > - overhead = get_aligned_image_overhead(info, offset); > - nr_sectors = get_aligned_image_size(info, length, offset); > + if (!fit_image_get_data_offset(fit, node, )) { > + /* External data */ > + offset += base_offset; > + if (fit_image_get_data_size(fit, node, )) > + return -ENOENT; > > - if (info->read(info, sector + get_aligned_image_offset(info, offset), > - nr_sectors, (void*)load_ptr) != nr_sectors) > - return -EIO; > - debug("image dst=%lx, offset=%lx, size=%lx\n", load_ptr, offset, > - (unsigned long)length); > + load_ptr = (load_addr + align_len) & ~align_len; > + length = len; > + > + overhead = get_aligned_image_overhead(info, offset); > + nr_sectors = get_aligned_image_size(info, length, offset); > + > + if (info->read(info, > + sector + get_aligned_image_offset(info, > offset), > + nr_sectors, (void *)load_ptr) != nr_sectors) > + return -EIO; > + > + debug("External data: dst=%lx, offset=%x, size=%lx\n", > + load_ptr, offset, (unsigned long)length); > + src = (void *)load_ptr + overhead; > + } else { > + /* Embedded data */ > + if (fit_image_get_data(fit, node, , )) { > + puts("Cannot get image data/size\n"); > + return -ENOENT; > + } > + debug("Embedded data: dst=%lx, size=%lx\n", load_addr, > + (unsigned long)length); > + src = (void *)data; > + } > > - src = (void *)load_ptr + overhead; > #ifdef CONFIG_SPL_FIT_IMAGE_POST_PROCESS > board_fit_image_post_process(, ); > #endif > diff --git a/doc/uImage.FIT/source_file_format.txt > b/doc/uImage.FIT/source_file_format.txt > index 136d3d7..3ce47ed 100644 > --- a/doc/uImage.FIT/source_file_format.txt > +++ b/doc/uImage.FIT/source_file_format.txt > @@ -288,6 +288,10 @@ The 'data-offset' property can be substituted with > 'data-position', which > defines an absolute position or address as the offset. This is helpful when > booting U-Boot proper before performing relocation. > > +Normal kernel FIT image has data embedded within FIT structure. Normal U-Boot > +image has external data. Existence of 'data-offset' can be used to identify I think actually external data is normal for SPL but not for U-Boot proper. I don't know
Re: [U-Boot] [PATCH 11/13] x86: braswell: Add FSP configuration
On 15 August 2017 at 23:42, Bin Mengwrote: > Add FSP related configuration for Braswell. > > Signed-off-by: Bin Meng > --- > > arch/x86/cpu/braswell/Makefile | 2 +- > arch/x86/cpu/braswell/fsp_configs.c| 158 ++ > .../include/asm/arch-braswell/fsp/fsp_configs.h| 89 > arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h | 172 +++ > arch/x86/include/asm/arch-braswell/gpio.h | 234 > + > 5 files changed, 654 insertions(+), 1 deletion(-) > create mode 100644 arch/x86/cpu/braswell/fsp_configs.c > create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_configs.h > create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h > create mode 100644 arch/x86/include/asm/arch-braswell/gpio.h > Reviewed-by: Simon Glass Can this use drivers instead of manual device-tree access? ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 09/13] x86: Add Intel Braswell SoC support
On 15 August 2017 at 23:41, Bin Mengwrote: > This adds initial Intel Braswell SoC support. It uses Intel FSP > to initialize the chipset. > > Similar to its predecessor BayTrail, there are some work to do to > enable the legacy UART integrated in the Braswell SoC. > > Signed-off-by: Bin Meng > --- > > arch/x86/Kconfig | 1 + > arch/x86/cpu/Makefile | 1 + > arch/x86/cpu/braswell/Kconfig | 38 +++ > arch/x86/cpu/braswell/Makefile | 7 ++ > arch/x86/cpu/braswell/braswell.c | 36 ++ > arch/x86/cpu/braswell/cpu.c| 170 > + > arch/x86/cpu/braswell/early_uart.c | 86 +++ > arch/x86/include/asm/arch-braswell/iomap.h | 50 + > 8 files changed, 389 insertions(+) > create mode 100644 arch/x86/cpu/braswell/Kconfig > create mode 100644 arch/x86/cpu/braswell/Makefile > create mode 100644 arch/x86/cpu/braswell/braswell.c > create mode 100644 arch/x86/cpu/braswell/cpu.c > create mode 100644 arch/x86/cpu/braswell/early_uart.c > create mode 100644 arch/x86/include/asm/arch-braswell/iomap.h Reviewed-by: Simon Glass A few nits / suggestions below. > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index f72d307..9620764 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -108,6 +108,7 @@ source "board/intel/Kconfig" > > # platform-specific options below > source "arch/x86/cpu/baytrail/Kconfig" > +source "arch/x86/cpu/braswell/Kconfig" > source "arch/x86/cpu/broadwell/Kconfig" > source "arch/x86/cpu/coreboot/Kconfig" > source "arch/x86/cpu/ivybridge/Kconfig" > diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile > index 999429e..94cdff1 100644 > --- a/arch/x86/cpu/Makefile > +++ b/arch/x86/cpu/Makefile > @@ -27,6 +27,7 @@ endif > > obj-y += intel_common/ > obj-$(CONFIG_INTEL_BAYTRAIL) += baytrail/ > +obj-$(CONFIG_INTEL_BRASWELL) += braswell/ > obj-$(CONFIG_INTEL_BROADWELL) += broadwell/ > obj-$(CONFIG_SYS_COREBOOT) += coreboot/ > obj-$(CONFIG_EFI_APP) += efi/ > diff --git a/arch/x86/cpu/braswell/Kconfig b/arch/x86/cpu/braswell/Kconfig > new file mode 100644 > index 000..c993889 > --- /dev/null > +++ b/arch/x86/cpu/braswell/Kconfig > @@ -0,0 +1,38 @@ > +# > +# Copyright (C) 2017, Bin Meng > +# > +# SPDX-License-Identifier: GPL-2.0+ > +# > + > +config INTEL_BRASWELL > + bool > + select HAVE_FSP > + select ARCH_MISC_INIT > + imply HAVE_INTEL_ME > + imply HAVE_VBT > + imply ENABLE_MRC_CACHE > + imply ENV_IS_IN_SPI_FLASH > + imply AHCI_PCI > + imply ICH_SPI > + imply MMC > + imply MMC_PCI > + imply MMC_SDHCI > + imply MMC_SDHCI_SDMA > + imply SCSI > + imply SPI_FLASH > + imply SYS_NS16550 > + imply USB > + imply USB_XHCI_HCD > + imply VIDEO_FSP > + > +if INTEL_BRASWELL > + > +config FSP_ADDR > + hex > + default 0xfff2 > + > +config FSP_LOCKDOWN_SPI > + bool > + default y > + > +endif > diff --git a/arch/x86/cpu/braswell/Makefile b/arch/x86/cpu/braswell/Makefile > new file mode 100644 > index 000..19bcee6 > --- /dev/null > +++ b/arch/x86/cpu/braswell/Makefile > @@ -0,0 +1,7 @@ > +# > +# Copyright (C) 2017, Bin Meng > +# > +# SPDX-License-Identifier: GPL-2.0+ > +# > + > +obj-y += braswell.o cpu.o early_uart.o > diff --git a/arch/x86/cpu/braswell/braswell.c > b/arch/x86/cpu/braswell/braswell.c > new file mode 100644 > index 000..37099aa > --- /dev/null > +++ b/arch/x86/cpu/braswell/braswell.c > @@ -0,0 +1,36 @@ > +/* > + * Copyright (C) 2017, Bin Meng > + * > + * SPDX-License-Identifier:GPL-2.0+ > + */ > + > +#include > +#include > +#include > + > +int arch_cpu_init(void) > +{ > + post_code(POST_CPU_INIT); > + > + return x86_cpu_init_f(); > +} > + > +int arch_misc_init(void) > +{ > +#ifdef CONFIG_ENABLE_MRC_CACHE > + /* > +* We intend not to check any return value here, as even MRC cache > +* is not saved successfully, it is not a severe error that will > +* prevent system from continuing to boot. > +*/ > + mrccache_save(); > +#endif > + > + return 0; > +} > + > +void reset_cpu(ulong addr) > +{ > + /* cold reset */ > + x86_full_reset(); > +} > diff --git a/arch/x86/cpu/braswell/cpu.c b/arch/x86/cpu/braswell/cpu.c > new file mode 100644 > index 000..6ff9036 > --- /dev/null > +++ b/arch/x86/cpu/braswell/cpu.c > @@ -0,0 +1,170 @@ > +/* > + * Copyright (C) 2017, Bin Meng > + * > + * SPDX-License-Identifier:GPL-2.0+ > + * > + * Derived from arch/x86/cpu/baytrail/cpu.c > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +static const unsigned int
Re: [U-Boot] [PATCH 15/18] rockchip: gpio: convert to livetree
On 16 August 2017 at 11:32, Philipp Tomsichwrote: > Update the Rockchip GPIO-bank driver to support a live tree. > > Signed-off-by: Philipp Tomsich > --- > > drivers/gpio/rk_gpio.c | 2 +- > 1 file changed, 1 insertion(+), 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] [PATCH 11/18] rockchip: spi: Convert to livetree
On 16 August 2017 at 11:32, Philipp Tomsichwrote: > Update the Rockchip SPI driver to support a live device tree. > > Signed-off-by: Philipp Tomsich > --- > > drivers/spi/rk_spi.c | 2 +- > 1 file changed, 1 insertion(+), 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] [PATCH 06/13] x86: dts: Include Intel Video BIOS Table in the ROM image
On 15 August 2017 at 23:41, Bin Mengwrote: > Now that binman is able to recognize the Video BIOS Table entry, > add such one in the u-boot.dtsi. > > Signed-off-by: Bin Meng > --- > > arch/x86/dts/u-boot.dtsi | 6 ++ > 1 file changed, 6 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 01/13] x86: tsc: Add Airmont reference clock values
On 15 August 2017 at 23:41, Bin Mengwrote: > Per the Intel 64 and IA-32 Architecture Software Developer's Manual, > add the reference clock for Intel Atom Processors based on the Airmont > Microarchitecture (Braswell). > > This keeps in sync with Linux kernel commit: > 6fcb41c: x86/tsc_msr: Add Airmont reference clock values > > Signed-off-by: Bin Meng > --- > > drivers/timer/tsc_timer.c | 17 ++--- > 1 file changed, 10 insertions(+), 7 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 13/18] rockchip: rk8xx: remove unused header includes
On 16 August 2017 at 11:32, Philipp Tomsichwrote: > Remove header file includes that have been left over after the > conversion to livetree-support. > > Signed-off-by: Philipp Tomsich > --- > > drivers/power/pmic/rk8xx.c | 2 -- > 1 file changed, 2 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 05/13] tools: binman: Add a new entry type for Intel VBT
On 15 August 2017 at 23:41, Bin Mengwrote: > This adds a new entry type for Intel Video BIOS Table. > > Signed-off-by: Bin Meng > --- > > tools/binman/etype/intel_vbt.py| 14 ++ > tools/binman/func_test.py | 9 - > tools/binman/test/46_intel-vbt.dts | 14 ++ > 3 files changed, 36 insertions(+), 1 deletion(-) > create mode 100644 tools/binman/etype/intel_vbt.py > create mode 100644 tools/binman/test/46_intel-vbt.dts Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 17/18] rockchip: dts: rk3368-lion: add /chosen/tick-timer
On 16 August 2017 at 11:32, Philipp Tomsichwrote: > To support bootstage recording, we want to mark our DM timer as the > tick-timer; this triggers the support for 'trying harder' to read the > timer in the Rockchip DM timer driver, even if the device model isn't > ready yet. > > Signed-off-by: Philipp Tomsich > --- > > arch/arm/dts/rk3368-lion-u-boot.dtsi | 2 ++ > 1 file changed, 2 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 13/13] x86: Support Intel Cherry Hill board
On 15 August 2017 at 23:42, Bin Mengwrote: > This adds support to Intel Cherry Hill board, a board based on > Intel Braswell SoC. The following devices are validated: > > - serial port as the serial console > - on-board Realtek 8169 ethernet controller > - SATA AHCI controller > - EMMC/SDHC controller > - USB 3.0 xHCI controller > - PCIe x1 slot with a graphics card > - ICH SPI controller with an 8MB Macronix SPI flash > - Integrated graphics device as the video console > > Signed-off-by: Bin Meng > > --- > > arch/x86/dts/Makefile | 1 + > arch/x86/dts/cherryhill.dts | 215 + > board/intel/Kconfig | 10 + > board/intel/cherryhill/Kconfig | 25 ++ > board/intel/cherryhill/MAINTAINERS | 6 + > board/intel/cherryhill/Makefile | 7 + > board/intel/cherryhill/cherryhill.c | 596 > > board/intel/cherryhill/start.S | 9 + > configs/cherryhill_defconfig| 36 +++ > doc/README.x86 | 30 ++ > include/configs/cherryhill.h| 22 ++ > 11 files changed, 957 insertions(+) > create mode 100644 arch/x86/dts/cherryhill.dts > create mode 100644 board/intel/cherryhill/Kconfig > create mode 100644 board/intel/cherryhill/MAINTAINERS > create mode 100644 board/intel/cherryhill/Makefile > create mode 100644 board/intel/cherryhill/cherryhill.c > create mode 100644 board/intel/cherryhill/start.S > create mode 100644 configs/cherryhill_defconfig > create mode 100644 include/configs/cherryhill.h 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 09/10] ut: fix fdt_getprop_u32() change
On 11 August 2017 at 02:52, Pantelis Antoniouwrote: > fdt_getprop_u32 is not exported and it's different than what the > unit test uses. Rename u32 prop access methods to something that's > unit test specific. > > Signed-off-by: Pantelis Antoniou > --- > test/overlay/cmd_ut_overlay.c | 16 > 1 file changed, 8 insertions(+), 8 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 10/18] rockchip: pinctrl: rk3368: Convert to livetree
On 16 August 2017 at 11:32, Philipp Tomsichwrote: > Update the pinctrl driver for the RK3368 to support a live device tree. > > Signed-off-by: Philipp Tomsich > --- > > drivers/pinctrl/rockchip/pinctrl_rk3368.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot