Re: [U-Boot] [PATCH 1/2] Convert CONFIG_BOOTCOUNT_LIMIT to Kconfig
On Fri, Feb 9, 2018 at 10:50 PM, Lukasz Majewski wrote: > diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig > index 3fbca2a08c..b83cf72022 100644 > --- a/configs/mx53ppd_defconfig > +++ b/configs/mx53ppd_defconfig > @@ -21,6 +21,7 @@ CONFIG_CMD_EXT4_WRITE=y > CONFIG_CMD_FAT=y > CONFIG_CMD_FS_GENERIC=y > CONFIG_BOOTCOUNT=y > +CONFIG_BOOTCOUNT_LIMIT=y > CONFIG_BOOTCOUNT_EXT=y > CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="0:5" > CONFIG_NETDEVICES=y ... > diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig > index c9d627cce2..cb6be73d52 100644 > --- a/drivers/bootcount/Kconfig > +++ b/drivers/bootcount/Kconfig > @@ -11,6 +11,12 @@ config BOOTCOUNT > number of times the board has booted on a number of different > persistent storage mediums. > > +config BOOTCOUNT_LIMIT > + bool "Enable support for checking boot count limit" > + help > + Enable checking for exceeding the boot count limit. > + More information: http://www.denx.de/wiki/DULG/UBootBootCountLimit > + > if BOOTCOUNT > > config BOOTCOUNT_EXT Can't CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT be merged? config BOOTCOUNT bool "Enable Boot count support" help Enable boot count support, which provides the ability to store the number of times the board has booted on a number of different persistent storage mediums. AFAICT mx53ppd is the only board which has CONFIG_BOOTCOUNT set, BOOTCOUNT is just used within Kconfig, not actually consumed either by a Makefile or any piece of code and should probably go? -- Alex Kiernan ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] spl: eMMC/SD: Provide one __weak spl_boot_mode() function
On Sat, Feb 10, 2018 at 01:45:16AM +0100, Lukasz Majewski wrote: > Hi Jonathan, > > > On Sat, Feb 03, 2018 at 11:00:35AM -0200, Fabio Estevam wrote: > > > On Sat, Feb 3, 2018 at 5:29 AM, Lukasz Majewski > > > wrote: > > > > The goal of this patch is to clean up the code related to > > > > choosing SPL MMC boot mode. > > > > > > > > The spl_boot_mode() now is called only in spl_mmc_load_image() > > > > function, which is only compiled in if CONFIG_SPL_MMC_SUPPORT is > > > > enabled. > > > > > > > > To achieve the goal, all per mach/arch implementations eligible > > > > for unification has been replaced with one __weak implementation. > > > > > > > > Signed-off-by: Lukasz Majewski > > > > Reviewed-by: Marek Vasut > > > > Reviewed-by: Stefano Babic > > > > Acked-by: Michal Simek (For ZynqMP) > > > > > > Nice cleanup: > > > > > > Reviewed-by: Fabio Estevam > > > > This has broken booting via mmc with mx6cuboxi for me. > > > > SPL loops on > > > > U-Boot SPL 2018.03-rc1-00212-g48914fc119 (Feb 10 2018 - 11:04:33 > > +1300) Trying to boot from MMC1 > > Failed to mount ext2 filesystem... > > spl_load_image_ext: ext4fs mount err - 0 > > Could you check what is the status of following defines in your .config > file: > > CONFIG_SPL_FAT_SUPPORT > CONFIG_SUPPORT_EMMC_BOOT "# CONFIG_SPL_FAT_SUPPORT is not set" CONFIG_SUPPORT_EMMC_BOOT is not in the .config at all CONFIG_SPL_EXT_SUPPORT previously for imx6 would result in MMCSD_MODE_RAW but now it results in MMCSD_MODE_FS. > > And if by any chance your don't have: > CONFIG_SPL_EXT_SUPPORT defined? CONFIG_SPL_EXT_SUPPORT=y CONFIG_SPL_MMC_SUPPORT=y mx6cuboxi_defconfig with no changes > > From what you have written above I assume that you boot from the > same medium - i.e. eMMC (so SPL and u-boot.img are on the same medium) ? Both SPL and u-boot.img are on a microsd card. The set CONFIG_SPL_* in .config are CONFIG_SPL_SYS_THUMB_BUILD=y CONFIG_SPL_USE_ARCH_MEMCPY=y CONFIG_SPL_USE_ARCH_MEMSET=y CONFIG_SPL_LDSCRIPT="arch/arm/mach-omap2/u-boot-spl.lds" CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SPL_SYS_MALLOC_F_LEN=0x400 CONFIG_SPL_BOOTSTAGE_RECORD_COUNT=5 CONFIG_SPL_LOGLEVEL=4 CONFIG_SPL=y CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y CONFIG_SPL_EXT_SUPPORT=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_DOS_PARTITION=y CONFIG_SPL_ISO_PARTITION=y CONFIG_SPL_EFI_PARTITION=y ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] spl: eMMC/SD: Provide one __weak spl_boot_mode() function
Hi Jonathan, > On Sat, Feb 03, 2018 at 11:00:35AM -0200, Fabio Estevam wrote: > > On Sat, Feb 3, 2018 at 5:29 AM, Lukasz Majewski > > wrote: > > > The goal of this patch is to clean up the code related to > > > choosing SPL MMC boot mode. > > > > > > The spl_boot_mode() now is called only in spl_mmc_load_image() > > > function, which is only compiled in if CONFIG_SPL_MMC_SUPPORT is > > > enabled. > > > > > > To achieve the goal, all per mach/arch implementations eligible > > > for unification has been replaced with one __weak implementation. > > > > > > Signed-off-by: Lukasz Majewski > > > Reviewed-by: Marek Vasut > > > Reviewed-by: Stefano Babic > > > Acked-by: Michal Simek (For ZynqMP) > > > > Nice cleanup: > > > > Reviewed-by: Fabio Estevam > > This has broken booting via mmc with mx6cuboxi for me. > > SPL loops on > > U-Boot SPL 2018.03-rc1-00212-g48914fc119 (Feb 10 2018 - 11:04:33 > +1300) Trying to boot from MMC1 > Failed to mount ext2 filesystem... > spl_load_image_ext: ext4fs mount err - 0 Could you check what is the status of following defines in your .config file: CONFIG_SPL_FAT_SUPPORT CONFIG_SUPPORT_EMMC_BOOT And if by any chance your don't have: CONFIG_SPL_EXT_SUPPORT defined? From what you have written above I assume that you boot from the same medium - i.e. eMMC (so SPL and u-boot.img are on the same medium) ? Best regards, Łukasz Majewski > > There is no ext2/ext3/ext4 fs, next U-Boot stage is raw, ie > > dd if=mx6cuboxi/SPL of=/dev/sd2c bs=1024 seek=1 > dd if=mx6cuboxi/u-boot.img of=/dev/sd2c bs=1024 seek=69 > > => part list mmc 0 > > Partition Map for MMC device 0 -- Partition Type: DOS > > PartStart SectorNum Sectors UUIDType > 1 204832768 -01 0c Boot > 4 34816 15642624-04 a6 > > With this commit reverted: > > U-Boot SPL 2018.03-rc1-00214-ge3f2485203 (Feb 10 2018 - 12:38:46 > +1300) Trying to boot from MMC1 > > > U-Boot 2018.03-rc1-00214-ge3f2485203 (Feb 10 2018 - 12:38:46 +1300) > > CPU: Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz) > CPU: Extended Commercial temperature grade (-20C to 105C) at 27C > Reset cause: POR > Board: MX6 Cubox-i > DRAM: 2 GiB > MMC: FSL_SDHC: 0 > Loading Environment from MMC... OK > No panel detected: default to HDMI > Display: HDMI (1024x768) > In:serial > Out: serial > Err: serial > Net: FEC > Hit any key to stop autoboot: 0 > switch to partitions #0, OK > mmc0 is current device > Scanning mmc 0:1... > 37503 bytes read in 18 ms (2 MiB/s) > Found EFI removable media binary efi/boot/bootarm.efi > Scanning disks on usb... > Disk usb0 not ready > Disk usb1 not ready > Disk usb2 not ready > Disk usb3 not ready > Scanning disks on mmc... > MMC Device 1 not found > MMC Device 2 not found > MMC Device 3 not found > Scanning disks on sata... > Disk sata0 not ready > Found 3 disks > 76528 bytes read in 30 ms (2.4 MiB/s) > ## Starting EFI application at 1200 ... > >> OpenBSD/armv7 BOOTARM 1.0 > boot> > booting sd0a:/bsd: 4531856+203028+560156 > [277405+90+281904+244582]=0x5d6b88 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 pgp2z7p_p4_c4.pgp Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] spl: eMMC/SD: Provide one __weak spl_boot_mode() function
On Sat, Feb 03, 2018 at 11:00:35AM -0200, Fabio Estevam wrote: > On Sat, Feb 3, 2018 at 5:29 AM, Lukasz Majewski wrote: > > The goal of this patch is to clean up the code related to choosing SPL > > MMC boot mode. > > > > The spl_boot_mode() now is called only in spl_mmc_load_image() function, > > which is only compiled in if CONFIG_SPL_MMC_SUPPORT is enabled. > > > > To achieve the goal, all per mach/arch implementations eligible for > > unification has been replaced with one __weak implementation. > > > > Signed-off-by: Lukasz Majewski > > Reviewed-by: Marek Vasut > > Reviewed-by: Stefano Babic > > Acked-by: Michal Simek (For ZynqMP) > > Nice cleanup: > > Reviewed-by: Fabio Estevam This has broken booting via mmc with mx6cuboxi for me. SPL loops on U-Boot SPL 2018.03-rc1-00212-g48914fc119 (Feb 10 2018 - 11:04:33 +1300) Trying to boot from MMC1 Failed to mount ext2 filesystem... spl_load_image_ext: ext4fs mount err - 0 There is no ext2/ext3/ext4 fs, next U-Boot stage is raw, ie dd if=mx6cuboxi/SPL of=/dev/sd2c bs=1024 seek=1 dd if=mx6cuboxi/u-boot.img of=/dev/sd2c bs=1024 seek=69 => part list mmc 0 Partition Map for MMC device 0 -- Partition Type: DOS PartStart SectorNum Sectors UUIDType 1 204832768 -01 0c Boot 4 34816 15642624-04 a6 With this commit reverted: U-Boot SPL 2018.03-rc1-00214-ge3f2485203 (Feb 10 2018 - 12:38:46 +1300) Trying to boot from MMC1 U-Boot 2018.03-rc1-00214-ge3f2485203 (Feb 10 2018 - 12:38:46 +1300) CPU: Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz) CPU: Extended Commercial temperature grade (-20C to 105C) at 27C Reset cause: POR Board: MX6 Cubox-i DRAM: 2 GiB MMC: FSL_SDHC: 0 Loading Environment from MMC... OK No panel detected: default to HDMI Display: HDMI (1024x768) In:serial Out: serial Err: serial Net: FEC Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... 37503 bytes read in 18 ms (2 MiB/s) Found EFI removable media binary efi/boot/bootarm.efi Scanning disks on usb... Disk usb0 not ready Disk usb1 not ready Disk usb2 not ready Disk usb3 not ready Scanning disks on mmc... MMC Device 1 not found MMC Device 2 not found MMC Device 3 not found Scanning disks on sata... Disk sata0 not ready Found 3 disks 76528 bytes read in 30 ms (2.4 MiB/s) ## Starting EFI application at 1200 ... >> OpenBSD/armv7 BOOTARM 1.0 boot> booting sd0a:/bsd: 4531856+203028+560156 [277405+90+281904+244582]=0x5d6b88 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PULL] efi v2018.03 patch queue 2018-02-10
Hi Tom, This is my current patch queue for efi against v2018.03. Please pull. Alex The following changes since commit 1811a928c6c7604d6d05a84b4d552a7c31b4994e: Move most CONFIG_HAVE_BLOCK_DEVICE to Kconfig (2018-02-08 19:09:03 -0500) are available in the git repository at: git://github.com/agraf/u-boot.git tags/signed-efi-v2018.03 for you to fetch changes up to df9cf561b04dd3fc5a94f7a2c2500948ae8ba56b: efi_loader: correct efi_disk_register (2018-02-10 00:25:49 +0100) Patch queue for efi in 2018.03 - 2018-02-10 This time we have a few important bug fixes. Most noticable are: - Fix OpenBSD loader with CONFIG_BLK=n - Fix builds on various circumstances - Add missing stubs so callers don't call NULL - Bump UEFI revision to 2.7 Heinrich Schuchardt (9): efi_loader: fix building crt0 on arm efi_loader: fix the online help for bootefi bootmgr efi_selftest: use correct compiler flags for miniapps efi_loader: create stub for CreateEventEx efi_loader: do not use 2.0.5 as UEFI revision number efi_driver: return type of efi_driver_init() efi_loader: split README.efi into two separate documents efi_loader: add missing runtime services stubs efi_loader: correct efi_disk_register MAINTAINERS | 3 + arch/arm/lib/crt0_aarch64_efi.S | 4 +- arch/arm/lib/crt0_arm_efi.S | 4 +- cmd/bootefi.c | 2 +- doc/README.efi| 275 ++ doc/README.u-boot_on_efi | 259 +++ include/asm-generic/pe.h | 21 +++ include/efi_api.h | 37 - include/efi_loader.h | 4 +- include/pe.h | 8 +- lib/efi_driver/efi_uclass.c | 6 +- lib/efi_loader/efi_boottime.c | 35 - lib/efi_loader/efi_disk.c | 71 ++ lib/efi_loader/efi_image_loader.c | 2 +- lib/efi_loader/efi_runtime.c | 29 lib/efi_selftest/Makefile | 6 +- 16 files changed, 453 insertions(+), 313 deletions(-) create mode 100644 doc/README.u-boot_on_efi create mode 100644 include/asm-generic/pe.h ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] buildman: support newer gcc versions from kernel.org
On Fri, Feb 09, 2018 at 10:53:44PM +0100, Daniel Schwierzeck wrote: > > > On 09.02.2018 22:43, Tom Rini wrote: > > On Fri, Feb 09, 2018 at 10:37:47PM +0100, Daniel Schwierzeck wrote: > >> Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4. > >> > >> Also use a regex for matching the tarball names. Some gcc versions > >> use '-ARCH-' instead of '_ARCH-'. > >> > >> Signed-off-by: Daniel Schwierzeck > >> > >> --- > >> > >> tools/buildman/toolchain.py | 6 +++--- > >> 1 file changed, 3 insertions(+), 3 deletions(-) > >> > >> diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py > >> index 2076323d5d..76dcb67614 100644 > >> --- a/tools/buildman/toolchain.py > >> +++ b/tools/buildman/toolchain.py > >> @@ -33,7 +33,7 @@ class MyHTMLParser(HTMLParser): > >> HTMLParser.__init__(self) > >> self.arch_link = None > >> self.links = [] > >> -self._match = '_%s-' % arch > >> +self.re_arch = re.compile('[-_]%s-' % arch) > >> > >> def handle_starttag(self, tag, attrs): > >> if tag == 'a': > >> @@ -41,7 +41,7 @@ class MyHTMLParser(HTMLParser): > >> if tag == 'href': > >> if value and value.endswith('.xz'): > >> self.links.append(value) > >> -if self._match in value: > >> +if self.re_arch.search(value): > >> self.arch_link = value > >> > >> > >> @@ -431,7 +431,7 @@ class Toolchains: > >> """ > >> arch = command.OutputOneLine('uname', '-m') > >> base = 'https://www.kernel.org/pub/tools/crosstool/files/bin' > >> -versions = ['4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4'] > >> +versions = ['7.3.0', '6.4.0', '5.5.0', '4.9.4', '4.9.0', '4.6.3', > >> '4.6.2', '4.5.1', '4.2.4'] > > > > Thanks for doing this. I think we should trim out the toolchain > > versions a bit. We shouldn't need anything older than 4.9.0, or maybe > > even 4.9.4 now. > > yes, that makes sense > > > > > I also worry about making 7.x or 6.x be the default fetched versions > > now. I know gcc-6.x adds more warnings as I use the Debian toolchains > > in my test builds. So travis is going to go right to erroring out. > > Since your patch is going to start with 7.3, can you please push this to > > travis and see what fails, so we have an idea on how hard it will be to > > move CI to 7.3? Thanks! > > > > I've scheduled builds for 7.3.0 [1] and 6.4.0 [2] > > [1] https://travis-ci.org/danielschwierzeck/u-boot/builds/339663802 > [2] https://travis-ci.org/danielschwierzeck/u-boot/builds/339664291 x86 broke, but I submitted a patch for the new warning gcc-6.x and later shows yesterday. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot,v3,1/2] bcm283x: Add pinctrl driver
On Sat, Feb 03, 2018 at 12:47:48PM +1100, Jonathan Gray wrote: > On Sun, Jan 28, 2018 at 01:54:25PM -0500, Tom Rini wrote: > > On Tue, Jan 23, 2018 at 06:05:21PM +0100, Alexander Graf wrote: > > > > > The bcm283x family of SoCs have a GPIO controller that also acts as > > > pinctrl controller. > > > > > > This patch introduces a new pinctrl driver that can actually properly mux > > > devices into their device tree defined pin states and is now the primary > > > owner of the gpio device. The previous GPIO driver gets moved into a > > > subdevice of the pinctrl driver, bound to the same OF node. > > > > > > That way whenever a device asks for pinctrl support, it gets it > > > automatically from the pinctrl driver and GPIO support is still available > > > in the normal command line phase. > > > > > > Signed-off-by: Alexander Graf > > > > Applied to u-boot/master, thanks! > > It seems one of the recent commits here has broken booting on rpi_3 with > the vendor supplied device tree via efi_loader. > > last working commit seems to be: > > 8996975ff8422e07f43eb8b3b0c7ed8c2b35442f > powerpc: Drop CONFIG_WALNUT and other related dead code > > After that were > > caf2233b281c03e3e359061a3dfa537d8a25c273 > bcm283x: Add pinctrl driver > > c8a73a26d6dd9b7d489e66529fe1412425d8f2d1 > mmc: Add bcm2835 sdhost controller > > These can't easily be reverted due to other changes. This turns out to have been efi loader changes, and is resolved by 'efi_loader: correct efi_disk_register' https://lists.denx.de/pipermail/u-boot/2018-February/320043.html Still not clear on why git bisect kept pointing at these pinctrl changes on rpi_3. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/2] Convert CONFIG_SYS_BOOTCOUNT_SINGLEWORD to Kconfig
This converts the following to Kconfig: CONFIG_SYS_BOOTCOUNT_SINGLEWORD Signed-off-by: Lukasz Majewski --- configs/highbank_defconfig | 1 + drivers/bootcount/Kconfig | 6 ++ include/configs/highbank.h | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configs/highbank_defconfig b/configs/highbank_defconfig index 41f4ef5f78..60a43db197 100644 --- a/configs/highbank_defconfig +++ b/configs/highbank_defconfig @@ -25,6 +25,7 @@ CONFIG_EFI_PARTITION=y CONFIG_ENV_IS_IN_NVRAM=y CONFIG_SCSI_AHCI=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y # CONFIG_MMC is not set CONFIG_SCSI=y CONFIG_OF_LIBFDT=y diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig index cb6be73d52..d82289f57b 100644 --- a/drivers/bootcount/Kconfig +++ b/drivers/bootcount/Kconfig @@ -17,6 +17,12 @@ config BOOTCOUNT_LIMIT Enable checking for exceeding the boot count limit. More information: http://www.denx.de/wiki/DULG/UBootBootCountLimit +config SYS_BOOTCOUNT_SINGLEWORD + bool "Use single word to pack boot count and magic value" + help + This option enables packing boot count magic value and boot count + into single word (32 bits). + if BOOTCOUNT config BOOTCOUNT_EXT diff --git a/include/configs/highbank.h b/include/configs/highbank.h index 2831aa3875..6c5d3ae3ac 100644 --- a/include/configs/highbank.h +++ b/include/configs/highbank.h @@ -26,7 +26,6 @@ #define CONFIG_PL01x_PORTS { (void *)(0xFFF36000) } #define CONFIG_CONS_INDEX 0 -#define CONFIG_SYS_BOOTCOUNT_SINGLEWORD #define CONFIG_SYS_BOOTCOUNT_LE/* Use little-endian accessors */ #define CONFIG_SYS_BOOTCOUNT_ADDR 0xfff3cf0c -- 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/2] mmc: Fix bug in sd_set_card_speed()
On Fri, Feb 09, 2018 at 12:09:27PM +0100, Jean-Jacques Hiblot wrote: > After settings the speed of the sd with the switch command, a check is > done to make sure that the new speed has been set. The current check has a > masking error: speed are encoded on 4 bits only. > Fix it by masking the upper bits. > > This fixes a problem seen with QEmu emulating a vexpress-a15. > > Reported-by: Jonathan Gray > Signed-off-by: Jean-Jacques Hiblot With this change the emulated mmc controller can be accessed again here. Tested-by: Jonathan Gray > > --- > > drivers/mmc/mmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 255310a..31614dd 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -1333,7 +1333,7 @@ static int sd_set_card_speed(struct mmc *mmc, enum > bus_mode mode) > if (err) > return err; > > - if ((__be32_to_cpu(switch_status[4]) >> 24) != speed) > + if (((__be32_to_cpu(switch_status[4]) >> 24) & 0xF) != speed) > return -ENOTSUPP; > > return 0; > -- > 1.9.1 > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/2] Convert CONFIG_BOOTCOUNT_LIMIT to Kconfig
This converts the following to Kconfig: CONFIG_BOOTCOUNT_LIMIT Signed-off-by: Lukasz Majewski --- README | 10 -- configs/am335x_baltos_defconfig | 1 + configs/am335x_boneblack_defconfig | 1 + configs/am335x_boneblack_vboot_defconfig | 1 + configs/am335x_evm_defconfig | 1 + configs/am335x_evm_nor_defconfig | 1 + configs/am335x_evm_spiboot_defconfig | 1 + configs/am335x_evm_usbspl_defconfig | 1 + configs/am335x_hs_evm_defconfig | 1 + configs/am335x_hs_evm_uart_defconfig | 1 + configs/am335x_sl50_defconfig| 1 + configs/birdland_bav335a_defconfig | 1 + configs/birdland_bav335b_defconfig | 1 + configs/brppt1_mmc_defconfig | 1 + configs/brppt1_nand_defconfig| 1 + configs/brppt1_spi_defconfig | 1 + configs/calimain_defconfig | 1 + configs/chiliboard_defconfig | 1 + configs/dh_imx6_defconfig| 1 + configs/draco_defconfig | 1 + configs/etamin_defconfig | 1 + configs/ge_b450v3_defconfig | 1 + configs/ge_b650v3_defconfig | 1 + configs/ge_b850v3_defconfig | 1 + configs/highbank_defconfig | 1 + configs/ids8313_defconfig| 1 + configs/km_kirkwood_128m16_defconfig | 1 + configs/km_kirkwood_defconfig| 1 + configs/km_kirkwood_pci_defconfig| 1 + configs/kmcoge4_defconfig| 1 + configs/kmcoge5ne_defconfig | 1 + configs/kmcoge5un_defconfig | 1 + configs/kmeter1_defconfig| 1 + configs/kmlion1_defconfig| 1 + configs/kmnusa_defconfig | 1 + configs/kmopti2_defconfig| 1 + configs/kmsugp1_defconfig| 1 + configs/kmsupx5_defconfig| 1 + configs/kmsuv31_defconfig| 1 + configs/kmtegr1_defconfig| 1 + configs/kmtepr2_defconfig| 1 + configs/kmvect1_defconfig| 1 + configs/mgcoge3un_defconfig | 1 + configs/mx53ppd_defconfig| 1 + configs/portl2_defconfig | 1 + configs/pxm2_defconfig | 1 + configs/rastaban_defconfig | 1 + configs/rut_defconfig| 1 + configs/socfpga_is1_defconfig| 1 + configs/socfpga_sr1500_defconfig | 1 + configs/suvd3_defconfig | 1 + configs/theadorable_debug_defconfig | 1 + configs/thuban_defconfig | 1 + configs/tqma6s_wru4_mmc_defconfig| 1 + configs/tuge1_defconfig | 1 + configs/tuxx1_defconfig | 1 + configs/x600_defconfig | 1 + drivers/bootcount/Kconfig| 6 ++ include/configs/am335x_evm.h | 1 - include/configs/am335x_sl50.h| 1 - include/configs/baltos.h | 1 - include/configs/bav335x.h| 1 - include/configs/brppt1.h | 1 - include/configs/calimain.h | 1 - include/configs/chiliboard.h | 1 - include/configs/cm_t335.h| 1 - include/configs/dh_imx6.h| 1 - include/configs/ge_bx50v3.h | 1 - include/configs/highbank.h | 1 - include/configs/ids8313.h| 1 - include/configs/km/keymile-common.h | 2 -- include/configs/km/km-powerpc.h | 2 -- include/configs/km/kmp204x-common.h | 1 - include/configs/mx53ppd.h| 2 -- include/configs/siemens-am33x-common.h | 1 - include/configs/socfpga_is1.h| 1 - include/configs/socfpga_sr1500.h | 1 - include/configs/theadorable.h| 1 - include/configs/tqma6_wru4.h | 1 - include/configs/x600.h | 1 - 80 files changed, 62 insertions(+), 35 deletions(-) diff --git a/README b/README index 81b7ee1ce8..f51f6709c2 100644 --- a/README +++ b/README @@ -714,11 +714,6 @@ The following options need to be configured: RAM and NFS. - Bootcount: - CONFIG_BOOTCOUNT_LIMIT - Implements a mechanism for detecting a repeating reboot - cycle, see: - http://www.denx.de/wiki/view/DULG/UBootBootCountLimit - CONFIG_BOOTCOUNT_ENV If no softreset save registers are found on the hardware "bootcount" is stored in the environment. To prevent a @@ -2333,11 +2328,6 @@ The following options need to be configured: but sometimes that is not allowed. - bootcount support: - CONFIG_BOOTCOUNT_LIMIT - - This enables the bootcounter support, see: - http://www.denx.de/wiki/DULG/UBootBootCountLimit -
Re: [U-Boot] [PATCH v2 1/1] efi_loader: correct efi_disk_register
On Fri, Feb 09, 2018 at 08:55:47PM +0100, Heinrich Schuchardt wrote: > efi_disk_register should return as status code (efi_status_t). > > Disks with zero blocks should be reported as 'not ready' without throwing > an error. > > This patch solves a problem running OpenBSD on system configured with > CONFIG_BLK=n (e.g. i.MX6). > > Reported-by: Jonathan Gray > Signed-off-by: Heinrich Schuchardt Thanks, this change resolves the problems I was seeing with master as of e24bd1e79e223aa89854c0be95a53e2d538144a5 on both mx6cuboxi and rpi_3. Tested-by: Jonathan Gray > --- > v2 > remove superfluous check > --- > include/efi_loader.h | 2 +- > lib/efi_loader/efi_disk.c | 71 > +-- > 2 files changed, 45 insertions(+), 28 deletions(-) > > diff --git a/include/efi_loader.h b/include/efi_loader.h > index a2d82e1db73..07730c3f394 100644 > --- a/include/efi_loader.h > +++ b/include/efi_loader.h > @@ -173,7 +173,7 @@ extern struct list_head efi_obj_list; > /* Called by bootefi to make console interface available */ > int efi_console_register(void); > /* Called by bootefi to make all disk storage accessible as EFI objects */ > -int efi_disk_register(void); > +efi_status_t efi_disk_register(void); > /* Create handles and protocols for the partitions of a block device */ > int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, > const char *if_typename, int diskid, > diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c > index ac39a65ee89..825a6d86de8 100644 > --- a/lib/efi_loader/efi_disk.c > +++ b/lib/efi_loader/efi_disk.c > @@ -226,25 +226,26 @@ efi_fs_from_path(struct efi_device_path *full_path) > * @offset offset into disk for simple partitions > * @return disk object > */ > -static struct efi_disk_obj *efi_disk_add_dev( > +static efi_status_t efi_disk_add_dev( > efi_handle_t parent, > struct efi_device_path *dp_parent, > const char *if_typename, > struct blk_desc *desc, > int dev_index, > lbaint_t offset, > - unsigned int part) > + unsigned int part, > + struct efi_disk_obj **disk) > { > struct efi_disk_obj *diskobj; > efi_status_t ret; > > /* Don't add empty devices */ > if (!desc->lba) > - return NULL; > + return EFI_NOT_READY; > > diskobj = calloc(1, sizeof(*diskobj)); > if (!diskobj) > - goto out_of_memory; > + return EFI_OUT_OF_RESOURCES; > > /* Hook up to the device list */ > efi_add_handle(&diskobj->parent); > @@ -262,11 +263,11 @@ static struct efi_disk_obj *efi_disk_add_dev( > ret = efi_add_protocol(diskobj->parent.handle, &efi_block_io_guid, > &diskobj->ops); > if (ret != EFI_SUCCESS) > - goto out_of_memory; > + return ret; > ret = efi_add_protocol(diskobj->parent.handle, &efi_guid_device_path, > diskobj->dp); > if (ret != EFI_SUCCESS) > - goto out_of_memory; > + return ret; > if (part >= 1) { > diskobj->volume = efi_simple_file_system(desc, part, >diskobj->dp); > @@ -274,7 +275,7 @@ static struct efi_disk_obj *efi_disk_add_dev( > &efi_simple_file_system_protocol_guid, > diskobj->volume); > if (ret != EFI_SUCCESS) > - goto out_of_memory; > + return ret; > } > diskobj->ops = block_io_disk_template; > diskobj->ifname = if_typename; > @@ -291,10 +292,9 @@ static struct efi_disk_obj *efi_disk_add_dev( > if (part != 0) > diskobj->media.logical_partition = 1; > diskobj->ops.media = &diskobj->media; > - return diskobj; > -out_of_memory: > - printf("ERROR: Out of memory\n"); > - return NULL; > + if (disk) > + *disk = diskobj; > + return EFI_SUCCESS; > } > > /* > @@ -330,8 +330,12 @@ int efi_disk_create_partitions(efi_handle_t parent, > struct blk_desc *desc, > continue; > snprintf(devname, sizeof(devname), "%s:%d", pdevname, >part); > - efi_disk_add_dev(parent, dp, if_typename, desc, diskid, > - info.start, part); > + ret = efi_disk_add_dev(parent, dp, if_typename, desc, diskid, > +info.start, part, NULL); > + if (ret != EFI_SUCCESS) { > + printf("Adding partition %s failed\n", pdevname); > + continue; > +
[U-Boot] [PATCH v2 2/4] Convert CONFIG_WATCHDOG_TIMEOUT_MSECS to Kconfig
This converts the following to Kconfig: CONFIG_WATCHDOG_TIMEOUT_MSECS The CONFIG_WATCHDOG_TIMEOUT_MSECS default value has been set to 10s. Signed-off-by: Lukasz Majewski --- Changes in v2: - Correct "mili" to "milli" seconds configs/dh_imx6_defconfig | 1 + configs/mx53ppd_defconfig | 1 + configs/tqma6s_wru4_mmc_defconfig | 1 + configs/warp_defconfig| 1 + drivers/watchdog/Kconfig | 8 include/configs/dh_imx6.h | 3 --- include/configs/mx53ppd.h | 2 -- include/configs/socfpga_common.h | 1 - include/configs/tqma6_wru4.h | 3 --- include/configs/warp.h| 3 --- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig index 48c5c7027a..0e7df6b10a 100644 --- a/configs/dh_imx6_defconfig +++ b/configs/dh_imx6_defconfig @@ -58,3 +58,4 @@ CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=6 diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig index 1458b93144..64dee33045 100644 --- a/configs/mx53ppd_defconfig +++ b/configs/mx53ppd_defconfig @@ -31,3 +31,4 @@ CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=8000 diff --git a/configs/tqma6s_wru4_mmc_defconfig b/configs/tqma6s_wru4_mmc_defconfig index e30b7c5970..4e1be700e8 100644 --- a/configs/tqma6s_wru4_mmc_defconfig +++ b/configs/tqma6s_wru4_mmc_defconfig @@ -59,3 +59,4 @@ CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=6 diff --git a/configs/warp_defconfig b/configs/warp_defconfig index 0aa7aeb57d..891d00e7e3 100644 --- a/configs/warp_defconfig +++ b/configs/warp_defconfig @@ -36,3 +36,4 @@ CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=3 diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 067d3915ae..b223bef29c 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -40,6 +40,14 @@ config ULP_WATCHDOG help Say Y here to enable i.MX7ULP watchdog driver. +config WATCHDOG_TIMEOUT_MSECS + int "Specify watchdog timeout in milli seconds" + default 3 if ARCH_SOCFPGA + default 1 + depends on HW_WATCHDOG + help + Set watchdog trigger timeout (in [ms]). + config WDT bool "Enable driver model for watchdog timer drivers" depends on DM diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index 45cb030c50..00d83384da 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -122,9 +122,6 @@ #endif #endif -/* Watchdog */ -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6 - /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h index 034c92b373..1fc9e15cf0 100644 --- a/include/configs/mx53ppd.h +++ b/include/configs/mx53ppd.h @@ -23,8 +23,6 @@ /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000 - #define CONFIG_MISC_INIT_R #define CONFIG_BOARD_LATE_INIT #define CONFIG_REVISION_TAG diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index bbc1f3de9b..7cde63e4ad 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -120,7 +120,6 @@ #define CONFIG_DESIGNWARE_WATCHDOG #define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS #define CONFIG_DW_WDT_CLOCK_KHZ25000 -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 3 #endif /* diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h index f35a048209..41dd192e5d 100644 --- a/include/configs/tqma6_wru4.h +++ b/include/configs/tqma6_wru4.h @@ -19,9 +19,6 @@ #define CONFIG_MISC_INIT_R -/* Watchdog */ -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6 - /* Config on-board RTC */ #define CONFIG_RTC_DS1337 #define CONFIG_SYS_RTC_BUS_NUM 2 diff --git a/include/configs/warp.h b/include/configs/warp.h index e5421d1930..dc0ee391bf 100644 --- a/include/configs/warp.h +++ b/include/configs/warp.h @@ -26,9 +26,6 @@ #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE #define CONFIG_SUPPORT_EMMC_BOOT -/* Watchdog */ -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 3 /* 30s */ - #define CONFIG_SYS_MEMTEST_START 0x8000 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_256M) -- 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/4] Convert CONFIG_IMX_WATCHDOG to Kconfig and remove HW_WATCHDOG
This converts the following to Kconfig: CONFIG_IMX_WATCHDOG It also removes the CONFIG_HW_WATCHDOG, which is selected by IMX_WATCHDOG. Signed-off-by: Lukasz Majewski --- Changes in v2: - None configs/aristainetos2_defconfig | 1 + configs/aristainetos2b_defconfig | 1 + configs/aristainetos_defconfig| 1 + configs/dh_imx6_defconfig | 1 + configs/mx53ppd_defconfig | 1 + configs/tqma6s_wru4_mmc_defconfig | 1 + configs/warp_defconfig| 1 + drivers/watchdog/Kconfig | 6 ++ include/configs/aristainetos-common.h | 3 --- include/configs/dh_imx6.h | 2 -- include/configs/mx53ppd.h | 2 -- include/configs/tqma6_wru4.h | 2 -- include/configs/warp.h| 2 -- 13 files changed, 13 insertions(+), 11 deletions(-) diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig index c0daed6b22..f9ce68cbb2 100644 --- a/configs/aristainetos2_defconfig +++ b/configs/aristainetos2_defconfig @@ -44,4 +44,5 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/configs/aristainetos2b_defconfig b/configs/aristainetos2b_defconfig index fbb2c1c38d..6eb9eb030f 100644 --- a/configs/aristainetos2b_defconfig +++ b/configs/aristainetos2b_defconfig @@ -44,4 +44,5 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/configs/aristainetos_defconfig b/configs/aristainetos_defconfig index 13f4d6eb52..c7f1779763 100644 --- a/configs/aristainetos_defconfig +++ b/configs/aristainetos_defconfig @@ -42,4 +42,5 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig index 1fd7c50e31..48c5c7027a 100644 --- a/configs/dh_imx6_defconfig +++ b/configs/dh_imx6_defconfig @@ -56,4 +56,5 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig index 3fbca2a08c..1458b93144 100644 --- a/configs/mx53ppd_defconfig +++ b/configs/mx53ppd_defconfig @@ -29,4 +29,5 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/configs/tqma6s_wru4_mmc_defconfig b/configs/tqma6s_wru4_mmc_defconfig index 4cf6693f5c..e30b7c5970 100644 --- a/configs/tqma6s_wru4_mmc_defconfig +++ b/configs/tqma6s_wru4_mmc_defconfig @@ -57,4 +57,5 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/configs/warp_defconfig b/configs/warp_defconfig index 2ac1c6cef7..0aa7aeb57d 100644 --- a/configs/warp_defconfig +++ b/configs/warp_defconfig @@ -34,4 +34,5 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index fc46b6774d..067d3915ae 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -12,6 +12,12 @@ config BCM2835_WDT This provides basic infrastructure to support BCM2835/2836 watchdog hardware, with a max timeout of ~15secs. +config IMX_WATCHDOG + bool "IMX watchdog driver" + select HW_WATCHDOG + help + Say Y here to enable the IMX watchdog driver. + config OMAP_WATCHDOG bool "TI OMAP watchdog driver" depends on ARCH_OMAP2PLUS diff --git a/include/configs/aristainetos-common.h b/include/configs/aristainetos-common.h index 69de44a1df..cf60eebd5f 100644 --- a/include/configs/aristainetos-common.h +++ b/include/configs/aristainetos-common.h @@ -198,9 +198,6 @@ #define CONFIG_MTD_PARTITIONS #define CONFIG_MTD_DEVICE -#define CONFIG_HW_WATCHDOG -#define CONFIG_IMX_WATCHDOG - /* Framebuffer */ #define CONFIG_VIDEO_IPUV3 /* check this console not needed, after test remove it */ diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index 7cda878ac7..45cb030c50 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -123,8 +123,6 @@ #endif /* Watchdog */ -#define CONFIG_HW_WATCHDOG -#define CONFIG_IMX_WATCHDOG #define CONFIG_WATCHDOG_TIMEOUT_MSECS 6 /* allow to overwrite serial and ethaddr */ diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h index 05c3d529af..034c92b373 100644 --- a/include/configs/mx53ppd.h +++ b/include/configs/mx53ppd.h @@ -23,8 +23,6 @@ /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) -#define CONFIG_HW_WATCHDOG -#define CONFIG_IMX_WATCHDOG #define CONFIG_WATCHDOG_TIMEOUT_MSECS 8
[U-Boot] [PATCH v2 4/4] Convert CONFIG_HW_WATCHDOG to Kconfig
The CONFIG_HW_WATCHDOG declaration has been converted to Kconfig Signed-off-by: Lukasz Majewski --- Changes in v2: - None configs/axm_defconfig| 1 + configs/calimain_defconfig | 1 + configs/microblaze-generic_defconfig | 1 + configs/nokia_rx51_defconfig | 1 + configs/picosam9g45_defconfig| 1 + configs/smartweb_defconfig | 1 + configs/taurus_defconfig | 1 + configs/ts4800_defconfig | 1 + include/configs/M5475EVB.h | 1 - include/configs/M5485EVB.h | 1 - include/configs/calimain.h | 1 - include/configs/controlcenterd.h | 1 - include/configs/eb_cpu5282.h | 2 -- include/configs/microblaze-generic.h | 1 - include/configs/nokia_rx51.h | 1 - include/configs/picosam9g45.h| 1 - include/configs/smartweb.h | 3 --- include/configs/taurus.h | 1 - include/configs/ts4800.h | 2 -- 19 files changed, 8 insertions(+), 15 deletions(-) diff --git a/configs/axm_defconfig b/configs/axm_defconfig index a08c62ff34..8c01a5c101 100644 --- a/configs/axm_defconfig +++ b/configs/axm_defconfig @@ -39,3 +39,4 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_USE_TINY_PRINTF=y +CONFIG_HW_WATCHDOG=y diff --git a/configs/calimain_defconfig b/configs/calimain_defconfig index d8ab012211..0f9bc9ed32 100644 --- a/configs/calimain_defconfig +++ b/configs/calimain_defconfig @@ -23,3 +23,4 @@ CONFIG_ENV_IS_IN_FLASH=y # CONFIG_MMC is not set CONFIG_MTD_NOR_FLASH=y CONFIG_SYS_NS16550=y +CONFIG_HW_WATCHDOG=y diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig index ca68a81a5b..b12bf30785 100644 --- a/configs/microblaze-generic_defconfig +++ b/configs/microblaze-generic_defconfig @@ -58,3 +58,4 @@ CONFIG_XILINX_AXIEMAC=y CONFIG_XILINX_EMACLITE=y CONFIG_SYS_NS16550=y CONFIG_XILINX_UARTLITE=y +CONFIG_HW_WATCHDOG=y diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig index 7b6e6ce730..f294e24f1b 100644 --- a/configs/nokia_rx51_defconfig +++ b/configs/nokia_rx51_defconfig @@ -33,3 +33,4 @@ CONFIG_TWL4030_USB=y CONFIG_VIDEO=y CONFIG_CFB_CONSOLE_ANSI=y # CONFIG_VGA_AS_SINGLE_DEVICE is not set +CONFIG_HW_WATCHDOG=y diff --git a/configs/picosam9g45_defconfig b/configs/picosam9g45_defconfig index 873776d1ad..70aed83f81 100644 --- a/configs/picosam9g45_defconfig +++ b/configs/picosam9g45_defconfig @@ -37,3 +37,4 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y CONFIG_LCD=y CONFIG_OF_LIBFDT=y +CONFIG_HW_WATCHDOG=y diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig index 246003fbfc..28bd3acc45 100644 --- a/configs/smartweb_defconfig +++ b/configs/smartweb_defconfig @@ -54,3 +54,4 @@ CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y # CONFIG_EFI_LOADER is not set +CONFIG_HW_WATCHDOG=y diff --git a/configs/taurus_defconfig b/configs/taurus_defconfig index 1f47241021..e7e26adf9e 100644 --- a/configs/taurus_defconfig +++ b/configs/taurus_defconfig @@ -56,3 +56,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0908 CONFIG_USB_GADGET_PRODUCT_NUM=0x02d2 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USE_TINY_PRINTF=y +CONFIG_HW_WATCHDOG=y diff --git a/configs/ts4800_defconfig b/configs/ts4800_defconfig index 17497ca52f..8007f9565a 100644 --- a/configs/ts4800_defconfig +++ b/configs/ts4800_defconfig @@ -15,3 +15,4 @@ CONFIG_CMD_FAT=y CONFIG_ENV_IS_IN_MMC=y CONFIG_PHYLIB=y CONFIG_OF_LIBFDT=y +CONFIG_HW_WATCHDOG=y diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h index 3da7e2a410..e8d2b3aacd 100644 --- a/include/configs/M5475EVB.h +++ b/include/configs/M5475EVB.h @@ -22,7 +22,6 @@ #define CONFIG_MCFUART #define CONFIG_SYS_UART_PORT (0) -#undef CONFIG_HW_WATCHDOG #define CONFIG_WATCHDOG_TIMEOUT5000/* timeout in milliseconds, max timeout is 6.71sec */ #define CONFIG_SLTTMR diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h index 2b26f0fe85..f428a20d82 100644 --- a/include/configs/M5485EVB.h +++ b/include/configs/M5485EVB.h @@ -22,7 +22,6 @@ #define CONFIG_MCFUART #define CONFIG_SYS_UART_PORT (0) -#undef CONFIG_HW_WATCHDOG #define CONFIG_WATCHDOG_TIMEOUT5000/* timeout in milliseconds, max timeout is 6.71sec */ #define CONFIG_SLTTMR diff --git a/include/configs/calimain.h b/include/configs/calimain.h index 4c2f6ba2d5..524d784811 100644 --- a/include/configs/calimain.h +++ b/include/configs/calimain.h @@ -29,7 +29,6 @@ #define CONFIG_SYS_TEXT_BASE 0x6000 #define CONFIG_ARCH_CPU_INIT #define CONFIG_DA8XX_GPIO -#define CONFIG_HW_WATCHDOG #define CONFIG_SYS_WDTTIMERBASEDAVINCI_TIMER1_BASE #define CONFIG_SYS_WDT_PERIOD_LOW \ (60 * CONFIG_SYS_OSCIN_FREQ) /* 60 s heartbeat */ diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h index 4312ddd4fc..9eafcd01ab 100644 --- a/include/configs/controlcenterd.h +++ b/include/con
[U-Boot] [PATCH v2 3/4] Convert socfpga: select CONFIG_HW_WATCHDOG support for ARCH_SOCFPGA
All Socfpga boards from ./include/configs/socfpga_* define CONFIG_HW_WATCHDOG. To ease CONFIG_HW_WATCHDOG conversion to Kconfig select it in config ARCH_SOCFPGA (arch/arm/Kconfig) section. Signed-off-by: Lukasz Majewski --- Changes in v2: - None arch/arm/Kconfig | 1 + include/configs/socfpga_arria10_socdk.h | 2 -- include/configs/socfpga_arria5_socdk.h | 2 -- include/configs/socfpga_cyclone5_socdk.h | 2 -- include/configs/socfpga_de0_nano_soc.h | 2 -- include/configs/socfpga_de10_nano.h | 2 -- include/configs/socfpga_de1_soc.h| 2 -- include/configs/socfpga_is1.h| 2 -- include/configs/socfpga_mcvevk.h | 2 -- include/configs/socfpga_sockit.h | 2 -- include/configs/socfpga_socrates.h | 2 -- include/configs/socfpga_sr1500.h | 2 -- include/configs/socfpga_vining_fpga.h| 2 -- 13 files changed, 1 insertion(+), 24 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 225f57e847..b4c79d6499 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -702,6 +702,7 @@ config ARCH_SOCFPGA select DM_SPI_FLASH select DM_SPI select ENABLE_ARM_SOC_BOOT0_HOOK + select HW_WATCHDOG select ARCH_EARLY_INIT_R select ARCH_MISC_INIT select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION diff --git a/include/configs/socfpga_arria10_socdk.h b/include/configs/socfpga_arria10_socdk.h index 83718dd2c9..82bb48b277 100644 --- a/include/configs/socfpga_arria10_socdk.h +++ b/include/configs/socfpga_arria10_socdk.h @@ -9,8 +9,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Booting Linux */ #define CONFIG_LOADADDR0x0100 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h index 6b6d54b97b..cd5aac65e9 100644 --- a/include/configs/socfpga_arria5_socdk.h +++ b/include/configs/socfpga_arria5_socdk.h @@ -8,8 +8,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x4000 /* 1GiB on SoCDK */ diff --git a/include/configs/socfpga_cyclone5_socdk.h b/include/configs/socfpga_cyclone5_socdk.h index 018a0c3bb4..9c5bd648e3 100644 --- a/include/configs/socfpga_cyclone5_socdk.h +++ b/include/configs/socfpga_cyclone5_socdk.h @@ -8,8 +8,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x4000 /* 1GiB on SoCDK */ diff --git a/include/configs/socfpga_de0_nano_soc.h b/include/configs/socfpga_de0_nano_soc.h index 275ed7ffeb..e5db00e366 100644 --- a/include/configs/socfpga_de0_nano_soc.h +++ b/include/configs/socfpga_de0_nano_soc.h @@ -8,8 +8,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x4000 /* 1GiB */ diff --git a/include/configs/socfpga_de10_nano.h b/include/configs/socfpga_de10_nano.h index bb50fcf1ff..656af1104d 100644 --- a/include/configs/socfpga_de10_nano.h +++ b/include/configs/socfpga_de10_nano.h @@ -8,8 +8,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x4000 /* 1GiB */ diff --git a/include/configs/socfpga_de1_soc.h b/include/configs/socfpga_de1_soc.h index 05975c9bde..f57b950425 100644 --- a/include/configs/socfpga_de1_soc.h +++ b/include/configs/socfpga_de1_soc.h @@ -8,8 +8,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x4000 /* 1GiB */ diff --git a/include/configs/socfpga_is1.h b/include/configs/socfpga_is1.h index 46f5f135dd..dc318e50dc 100644 --- a/include/configs/socfpga_is1.h +++ b/include/configs/socfpga_is1.h @@ -9,8 +9,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x1000 diff --git a/include/configs/socfpga_mcvevk.h b/include/configs/socfpga_mcvevk.h index 404f064e94..f13463b8b0 100644 --- a/include/configs/socfpga_mcvevk.h +++ b/include/configs/socfpga_mcvevk.h @@ -8,8 +8,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x4000 /* 1GiB on MCV */ diff --git a/include/configs/socfpga_sockit.h b/include/configs/socfpga_sockit.h index b4f31c42c5..0bbc7e0105 100644 --- a/include/configs/socfpga_sockit.h +++ b/include/configs/socfpga_sockit.h @@ -8,8 +8,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x4000 /* 1GiB on SoCDK */ diff --git a/include/configs/socfpga_socrates.h b/include/configs/socfpga_socrates.h index ebb9ac588d..b66108d0cc 100644 --- a/include/configs/socfpga_socrates.h +++ b/include/configs/socfpga_socrates.h @@ -8,8 +8,6 @@ #include -#define CONFIG_HW_WATCHDOG - /* Memory configurations */ #define PHYS_SD
[U-Boot] [PATCH v2 0/4] Convert Watchdog related defines to Kconfig
This patch series converts watchdog related configs: CONFIG_HW_WATCHDOG, CONFIG_IMX_WATCHDOG and CONFIG_WATCHDOG_TIMEOUT_MSECS to Kconfig. This is the first step to move iMX Watchdog driver to DM. Comments and tests are welcome. "Green" travis CI build: https://travis-ci.org/lmajewski/u-boot-dfu/builds/338077474 This patch has been applied on top of u-boot/master: SHA1: a43aebee89acf57b4e22018f401cffc9fef4fd85 Changes in v2: - None - Correct "mili" to "milli" seconds - None - None Lukasz Majewski (4): Convert CONFIG_IMX_WATCHDOG to Kconfig and remove HW_WATCHDOG Convert CONFIG_WATCHDOG_TIMEOUT_MSECS to Kconfig Convert socfpga: select CONFIG_HW_WATCHDOG support for ARCH_SOCFPGA Convert CONFIG_HW_WATCHDOG to Kconfig arch/arm/Kconfig | 1 + configs/aristainetos2_defconfig | 1 + configs/aristainetos2b_defconfig | 1 + configs/aristainetos_defconfig | 1 + configs/axm_defconfig| 1 + configs/calimain_defconfig | 1 + configs/dh_imx6_defconfig| 2 ++ configs/microblaze-generic_defconfig | 1 + configs/mx53ppd_defconfig| 2 ++ configs/nokia_rx51_defconfig | 1 + configs/picosam9g45_defconfig| 1 + configs/smartweb_defconfig | 1 + configs/taurus_defconfig | 1 + configs/tqma6s_wru4_mmc_defconfig| 2 ++ configs/ts4800_defconfig | 1 + configs/warp_defconfig | 2 ++ drivers/watchdog/Kconfig | 14 ++ include/configs/M5475EVB.h | 1 - include/configs/M5485EVB.h | 1 - include/configs/aristainetos-common.h| 3 --- include/configs/calimain.h | 1 - include/configs/controlcenterd.h | 1 - include/configs/dh_imx6.h| 5 - include/configs/eb_cpu5282.h | 2 -- include/configs/microblaze-generic.h | 1 - include/configs/mx53ppd.h| 4 include/configs/nokia_rx51.h | 1 - include/configs/picosam9g45.h| 1 - include/configs/smartweb.h | 3 --- include/configs/socfpga_arria10_socdk.h | 2 -- include/configs/socfpga_arria5_socdk.h | 2 -- include/configs/socfpga_common.h | 1 - include/configs/socfpga_cyclone5_socdk.h | 2 -- include/configs/socfpga_de0_nano_soc.h | 2 -- include/configs/socfpga_de10_nano.h | 2 -- include/configs/socfpga_de1_soc.h| 2 -- include/configs/socfpga_is1.h| 2 -- include/configs/socfpga_mcvevk.h | 2 -- include/configs/socfpga_sockit.h | 2 -- include/configs/socfpga_socrates.h | 2 -- include/configs/socfpga_sr1500.h | 2 -- include/configs/socfpga_vining_fpga.h| 2 -- include/configs/taurus.h | 1 - include/configs/tqma6_wru4.h | 5 - include/configs/ts4800.h | 2 -- include/configs/warp.h | 5 - 46 files changed, 34 insertions(+), 62 deletions(-) -- 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] buildman: support newer gcc versions from kernel.org
On 09.02.2018 22:43, Tom Rini wrote: > On Fri, Feb 09, 2018 at 10:37:47PM +0100, Daniel Schwierzeck wrote: >> Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4. >> >> Also use a regex for matching the tarball names. Some gcc versions >> use '-ARCH-' instead of '_ARCH-'. >> >> Signed-off-by: Daniel Schwierzeck >> >> --- >> >> tools/buildman/toolchain.py | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py >> index 2076323d5d..76dcb67614 100644 >> --- a/tools/buildman/toolchain.py >> +++ b/tools/buildman/toolchain.py >> @@ -33,7 +33,7 @@ class MyHTMLParser(HTMLParser): >> HTMLParser.__init__(self) >> self.arch_link = None >> self.links = [] >> -self._match = '_%s-' % arch >> +self.re_arch = re.compile('[-_]%s-' % arch) >> >> def handle_starttag(self, tag, attrs): >> if tag == 'a': >> @@ -41,7 +41,7 @@ class MyHTMLParser(HTMLParser): >> if tag == 'href': >> if value and value.endswith('.xz'): >> self.links.append(value) >> -if self._match in value: >> +if self.re_arch.search(value): >> self.arch_link = value >> >> >> @@ -431,7 +431,7 @@ class Toolchains: >> """ >> arch = command.OutputOneLine('uname', '-m') >> base = 'https://www.kernel.org/pub/tools/crosstool/files/bin' >> -versions = ['4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4'] >> +versions = ['7.3.0', '6.4.0', '5.5.0', '4.9.4', '4.9.0', '4.6.3', >> '4.6.2', '4.5.1', '4.2.4'] > > Thanks for doing this. I think we should trim out the toolchain > versions a bit. We shouldn't need anything older than 4.9.0, or maybe > even 4.9.4 now. yes, that makes sense > > I also worry about making 7.x or 6.x be the default fetched versions > now. I know gcc-6.x adds more warnings as I use the Debian toolchains > in my test builds. So travis is going to go right to erroring out. > Since your patch is going to start with 7.3, can you please push this to > travis and see what fails, so we have an idea on how hard it will be to > move CI to 7.3? Thanks! > I've scheduled builds for 7.3.0 [1] and 6.4.0 [2] [1] https://travis-ci.org/danielschwierzeck/u-boot/builds/339663802 [2] https://travis-ci.org/danielschwierzeck/u-boot/builds/339664291 -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] buildman: support newer gcc versions from kernel.org
On Fri, Feb 09, 2018 at 10:37:47PM +0100, Daniel Schwierzeck wrote: > Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4. > > Also use a regex for matching the tarball names. Some gcc versions > use '-ARCH-' instead of '_ARCH-'. > > Signed-off-by: Daniel Schwierzeck > > --- > > tools/buildman/toolchain.py | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py > index 2076323d5d..76dcb67614 100644 > --- a/tools/buildman/toolchain.py > +++ b/tools/buildman/toolchain.py > @@ -33,7 +33,7 @@ class MyHTMLParser(HTMLParser): > HTMLParser.__init__(self) > self.arch_link = None > self.links = [] > -self._match = '_%s-' % arch > +self.re_arch = re.compile('[-_]%s-' % arch) > > def handle_starttag(self, tag, attrs): > if tag == 'a': > @@ -41,7 +41,7 @@ class MyHTMLParser(HTMLParser): > if tag == 'href': > if value and value.endswith('.xz'): > self.links.append(value) > -if self._match in value: > +if self.re_arch.search(value): > self.arch_link = value > > > @@ -431,7 +431,7 @@ class Toolchains: > """ > arch = command.OutputOneLine('uname', '-m') > base = 'https://www.kernel.org/pub/tools/crosstool/files/bin' > -versions = ['4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4'] > +versions = ['7.3.0', '6.4.0', '5.5.0', '4.9.4', '4.9.0', '4.6.3', > '4.6.2', '4.5.1', '4.2.4'] Thanks for doing this. I think we should trim out the toolchain versions a bit. We shouldn't need anything older than 4.9.0, or maybe even 4.9.4 now. I also worry about making 7.x or 6.x be the default fetched versions now. I know gcc-6.x adds more warnings as I use the Debian toolchains in my test builds. So travis is going to go right to erroring out. Since your patch is going to start with 7.3, can you please push this to travis and see what fails, so we have an idea on how hard it will be to move CI to 7.3? Thanks! -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] buildman: support newer gcc versions from kernel.org
Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4. Also use a regex for matching the tarball names. Some gcc versions use '-ARCH-' instead of '_ARCH-'. Signed-off-by: Daniel Schwierzeck --- tools/buildman/toolchain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 2076323d5d..76dcb67614 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -33,7 +33,7 @@ class MyHTMLParser(HTMLParser): HTMLParser.__init__(self) self.arch_link = None self.links = [] -self._match = '_%s-' % arch +self.re_arch = re.compile('[-_]%s-' % arch) def handle_starttag(self, tag, attrs): if tag == 'a': @@ -41,7 +41,7 @@ class MyHTMLParser(HTMLParser): if tag == 'href': if value and value.endswith('.xz'): self.links.append(value) -if self._match in value: +if self.re_arch.search(value): self.arch_link = value @@ -431,7 +431,7 @@ class Toolchains: """ arch = command.OutputOneLine('uname', '-m') base = 'https://www.kernel.org/pub/tools/crosstool/files/bin' -versions = ['4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4'] +versions = ['7.3.0', '6.4.0', '5.5.0', '4.9.4', '4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4'] links = [] for version in versions: url = '%s/%s/%s/' % (base, arch, version) -- 2.16.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] TCP & Overrrun
On Thu, Feb 8, 2018 at 8:41 PM, Duncan Hare wrote: > On Thu, 8 Feb 2018 22:15:44 + (UTC) > Duncan Hare wrote: > >> Duncan Hare >> >> 714 931 7952 >> >> >> - Forwarded Message - >> From: Joe Hershberger >> To: Duncan Hare >> Cc: u-boot ; Joe Hershberger >> Sent: Thursday, February 8, 2018 11:40 AM >> Subject: Re: [U-Boot] TCP & Overrrun >> >> Hi Duncan, >> >> On Wed, Feb 7, 2018 at 8:40 PM, Duncan Hare wrote: >> > I'm gettin overrun on the raspberry pi. >> > >> > Which ethernet drived does it use? >> >> You didn't specify which one you are talking about, but here's how to >> find out... >> >> Assuming rpi3, find the config first... >> >> configs/rpi_3_defconfig says: >> CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" >> arch/arm/dts/bcm2837-rpi-3-b.dts says: #include >> "bcm283x-rpi-smsc9514.dtsi" arch/arm/dts/bcm283x-rpi-smsc9514.dtsi >> says:ethernet: usbether@1 { >> compatible = "usb424,ec00"; grep -rn ec00 drivers/ says: >> drivers/usb/eth/smsc95xx.c >> >> Cheers, >> -Joe >> >> > I need to determine if it >> > uses CONFIG_SYS_RX_ETH_BUFFER" from net.h and the "net_rx_packets" >> > buffer pool defined in net/net.c >> > >> > grep suggests it is not using net_rx_packets. >> > >> > Thanks >> > >> > Duncan Hare >> > ___ >> > U-Boot mailing list >> > U-Boot@lists.denx.de >> > https://lists.denx.de/listinfo/u-boot > ___ > Joe > > Two solutions: > > Option 1. > > drivers/usb/eth/smsc95xx.c pulls packet in from the device, single rx buffer, > and runs the packet > rx code in net.c. Assumption is packets are polled for, thus single > rx buffer is acceptable. > > net_rx_packets exists, and can be use, if looking for rx packet call > is called frequently though system. > > This would work for all existing drivers. > > net.c fills net_rx_packets and calls a routine to process packets, and > and the tcp system system polls via smsc95xx_recv through the interface > structure at places in the code to process fill net_rx_packets as a > packet queue. > > A TCP window limits the number of packets in process. > > Option 2. > > The driver is changed to set an interrupt and the interrupt > preempts the packet processing, as interrupts do. In general, we don't enable interrupts in U-Boot. There have been exceptions, but not when there is a reasonable alternative. > But, this requires driver changes to use TCP. > > And good hardware documentation. > I think option 1 is the way to go. Thanks, -Joe ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] env: Add back default action of get_char in env_get_char()
Maxime, York, I've just sent a patch that removes 'get_char' callback from the env drivers. This should restore the old behaviour we had before supporting multiple environment drivers (for all but eeprom, of course). Simon On 08.02.2018 23:10, Maxime Ripard wrote: On Thu, Feb 08, 2018 at 10:52:20AM +0100, Simon Goldschmidt wrote: On 08.02.2018 09:47, Maxime Ripard wrote: On Wed, Feb 07, 2018 at 02:17:12PM -0800, York Sun wrote: Commit 8a3a7e2270b3 ("env: Pass additional parameters to the env lookup function") dropped the default action if driver doesn't have get_char() defined. This causes failure to get environmental variables from NOR flash. Add back this default action for now. Signed-off-by: York Sun CC: Maxime Ripard --- Limited test on LS1043ARDB. env/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/env.c b/env/env.c index edfb575..210bae2 100644 --- a/env/env.c +++ b/env/env.c @@ -159,7 +159,7 @@ int env_get_char(int index) int ret; if (!drv->get_char) - continue; + return *(uchar *)(gd->env_addr + index); Thinking more about this, I think this would break the case where the first environment in your list has no get_char method, but the second might. How can we decide which way is wanted? With your patch below, we might end up loading chars from a low-prio environment (which is not CRC checked) in the early boot stage. Later, we load the environment from another env driver with higher priority. Ah, right. That's why I suggested removing the 'get_char' callback from the env drivers :-) Early boot stage environment lookups would still work the old way reading from 'gd->env_addr + index'. If that works on York's board, I'm all in. Maxime ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] env: restore old env_get_char() behaviour
With multiple environments, the 'get_char' callback for env drivers does not really make sense any more because it is only supported by two drivers (eeprom and nvram). To restore single character loading for these drivers, override 'env_get_char_spec'. Signed-off-by: Simon Goldschmidt --- env/eeprom.c | 6 -- env/env.c | 29 +++-- env/nvram.c | 8 include/environment.h | 11 --- 4 files changed, 15 insertions(+), 39 deletions(-) diff --git a/env/eeprom.c b/env/eeprom.c index 55d19d9d99..63842d6ff3 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -61,7 +61,10 @@ static int eeprom_bus_write(unsigned dev_addr, unsigned offset, return rcode; } -static int env_eeprom_get_char(int index) +/** Call this function from overridden env_get_char_spec() if you need + * this functionality. + */ +int env_eeprom_get_char(int index) { uchar c; unsigned int off = CONFIG_ENV_OFFSET; @@ -228,7 +231,6 @@ static int env_eeprom_save(void) U_BOOT_ENV_LOCATION(eeprom) = { .location = ENVL_EEPROM, ENV_NAME("EEPROM") - .get_char = env_eeprom_get_char, .load = env_eeprom_load, .save = env_save_ptr(env_eeprom_save), }; diff --git a/env/env.c b/env/env.c index 9a89832c1a..ab12606207 100644 --- a/env/env.c +++ b/env/env.c @@ -149,32 +149,17 @@ static struct env_driver *env_driver_lookup(enum env_operation op, int prio) return drv; } -int env_get_char(int index) +__weak int env_get_char_spec(int index) { - struct env_driver *drv; - int prio; + return *(uchar *)(gd->env_addr + index); +} +int env_get_char(int index) +{ if (gd->env_valid == ENV_INVALID) return default_environment[index]; - - for (prio = 0; (drv = env_driver_lookup(ENVOP_GET_CHAR, prio)); prio++) { - int ret; - - if (!drv->get_char) - continue; - - if (!env_has_inited(drv->location)) - continue; - - ret = drv->get_char(index); - if (!ret) - return 0; - - debug("%s: Environment %s failed to load (err=%d)\n", __func__, - drv->name, ret); - } - - return -ENODEV; + else + return env_get_char_spec(index); } int env_load(void) diff --git a/env/nvram.c b/env/nvram.c index 6f76fe4b8d..7cc62b631e 100644 --- a/env/nvram.c +++ b/env/nvram.c @@ -41,7 +41,10 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; #endif #ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE -static int env_nvram_get_char(int index) +/** Call this function from overridden env_get_char_spec() if you need + * this functionality. + */ +int env_nvram_get_char(int index) { uchar c; @@ -113,9 +116,6 @@ static int env_nvram_init(void) U_BOOT_ENV_LOCATION(nvram) = { .location = ENVL_NVRAM, ENV_NAME("NVRAM") -#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE - .get_char = env_nvram_get_char, -#endif .load = env_nvram_load, .save = env_save_ptr(env_nvram_save), .init = env_nvram_init, diff --git a/include/environment.h b/include/environment.h index 6044b9e1b4..8696573d0d 100644 --- a/include/environment.h +++ b/include/environment.h @@ -217,17 +217,6 @@ struct env_driver { const char *name; enum env_location location; - /** -* get_char() - Read a character from the environment -* -* This method is optional. If not provided, a default implementation -* will read from gd->env_addr. -* -* @index: Index of character to read (0=first) -* @return character read, or -ve on error -*/ - int (*get_char)(int index); - /** * load() - Load the environment from storage * -- 2.14.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/1] efi_loader: correct efi_disk_register
efi_disk_register should return as status code (efi_status_t). Disks with zero blocks should be reported as 'not ready' without throwing an error. This patch solves a problem running OpenBSD on system configured with CONFIG_BLK=n (e.g. i.MX6). Reported-by: Jonathan Gray Signed-off-by: Heinrich Schuchardt --- v2 remove superfluous check --- include/efi_loader.h | 2 +- lib/efi_loader/efi_disk.c | 71 +-- 2 files changed, 45 insertions(+), 28 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index a2d82e1db73..07730c3f394 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -173,7 +173,7 @@ extern struct list_head efi_obj_list; /* Called by bootefi to make console interface available */ int efi_console_register(void); /* Called by bootefi to make all disk storage accessible as EFI objects */ -int efi_disk_register(void); +efi_status_t efi_disk_register(void); /* Create handles and protocols for the partitions of a block device */ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, const char *if_typename, int diskid, diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index ac39a65ee89..825a6d86de8 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -226,25 +226,26 @@ efi_fs_from_path(struct efi_device_path *full_path) * @offset offset into disk for simple partitions * @return disk object */ -static struct efi_disk_obj *efi_disk_add_dev( +static efi_status_t efi_disk_add_dev( efi_handle_t parent, struct efi_device_path *dp_parent, const char *if_typename, struct blk_desc *desc, int dev_index, lbaint_t offset, - unsigned int part) + unsigned int part, + struct efi_disk_obj **disk) { struct efi_disk_obj *diskobj; efi_status_t ret; /* Don't add empty devices */ if (!desc->lba) - return NULL; + return EFI_NOT_READY; diskobj = calloc(1, sizeof(*diskobj)); if (!diskobj) - goto out_of_memory; + return EFI_OUT_OF_RESOURCES; /* Hook up to the device list */ efi_add_handle(&diskobj->parent); @@ -262,11 +263,11 @@ static struct efi_disk_obj *efi_disk_add_dev( ret = efi_add_protocol(diskobj->parent.handle, &efi_block_io_guid, &diskobj->ops); if (ret != EFI_SUCCESS) - goto out_of_memory; + return ret; ret = efi_add_protocol(diskobj->parent.handle, &efi_guid_device_path, diskobj->dp); if (ret != EFI_SUCCESS) - goto out_of_memory; + return ret; if (part >= 1) { diskobj->volume = efi_simple_file_system(desc, part, diskobj->dp); @@ -274,7 +275,7 @@ static struct efi_disk_obj *efi_disk_add_dev( &efi_simple_file_system_protocol_guid, diskobj->volume); if (ret != EFI_SUCCESS) - goto out_of_memory; + return ret; } diskobj->ops = block_io_disk_template; diskobj->ifname = if_typename; @@ -291,10 +292,9 @@ static struct efi_disk_obj *efi_disk_add_dev( if (part != 0) diskobj->media.logical_partition = 1; diskobj->ops.media = &diskobj->media; - return diskobj; -out_of_memory: - printf("ERROR: Out of memory\n"); - return NULL; + if (disk) + *disk = diskobj; + return EFI_SUCCESS; } /* @@ -330,8 +330,12 @@ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, continue; snprintf(devname, sizeof(devname), "%s:%d", pdevname, part); - efi_disk_add_dev(parent, dp, if_typename, desc, diskid, -info.start, part); + ret = efi_disk_add_dev(parent, dp, if_typename, desc, diskid, + info.start, part, NULL); + if (ret != EFI_SUCCESS) { + printf("Adding partition %s failed\n", pdevname); + continue; + } disks++; } @@ -349,26 +353,32 @@ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, * * This gets called from do_bootefi_exec(). */ -int efi_disk_register(void) +efi_status_t efi_disk_register(void) { struct efi_disk_obj *disk; int disks = 0; + efi_status_
[U-Boot] [PATCH v2 1/1] efi_loader: add missing runtime services stubs
Add stubs for UpdateCapsule, QueryCapsuleCapabilities, and QueryVariableInfo. Signed-off-by: Heinrich Schuchardt --- v2 add __efi_runtime --- include/efi_api.h| 28 +--- lib/efi_loader/efi_runtime.c | 29 + 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index 205f8f1f700..bc5bcd4a2b8 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -180,6 +180,17 @@ enum efi_reset_type { #define EFI_RUNTIME_SERVICES_SIGNATURE 0x5652453544e5552ULL #define EFI_RUNTIME_SERVICES_REVISION 0x0001 +#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x0001 +#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE0x0002 +#define CAPSULE_FLAGS_INITIATE_RESET 0x0004 + +struct efi_capsule_header { + efi_guid_t *capsule_guid; + u32 header_size; + u32 flags; + u32 capsule_image_size; +}; + struct efi_runtime_services { struct efi_table_hdr hdr; efi_status_t (EFIAPI *get_time)(struct efi_time *time, @@ -209,9 +220,20 @@ struct efi_runtime_services { void (EFIAPI *reset_system)(enum efi_reset_type reset_type, efi_status_t reset_status, unsigned long data_size, void *reset_data); - void *update_capsule; - void *query_capsule_caps; - void *query_variable_info; + efi_status_t (EFIAPI *update_capsule)( + struct efi_capsule_header **capsule_header_array, + efi_uintn_t capsule_count, + u64 scatter_gather_list); + efi_status_t (EFIAPI *query_capsule_caps)( + struct efi_capsule_header **capsule_header_array, + efi_uintn_t capsule_count, + u64 maximum_capsule_size, + u32 reset_type); + efi_status_t (EFIAPI *query_variable_info)( + u32 attributes, + u64 maximum_variable_storage_size, + u64 remaining_variable_storage_size, + u64 maximum_variable_size); }; /* EFI Configuration Table and GUID definitions */ diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index 8104e08c466..ccb4fc6141b 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -381,6 +381,32 @@ static efi_status_t __efi_runtime EFIAPI efi_invalid_parameter(void) return EFI_INVALID_PARAMETER; } +efi_status_t __efi_runtime EFIAPI efi_update_capsule( + struct efi_capsule_header **capsule_header_array, + efi_uintn_t capsule_count, + u64 scatter_gather_list) +{ + return EFI_UNSUPPORTED; +} + +efi_status_t __efi_runtime EFIAPI efi_query_capsule_caps( + struct efi_capsule_header **capsule_header_array, + efi_uintn_t capsule_count, + u64 maximum_capsule_size, + u32 reset_type) +{ + return EFI_UNSUPPORTED; +} + +efi_status_t __efi_runtime EFIAPI efi_query_variable_info( + u32 attributes, + u64 maximum_variable_storage_size, + u64 remaining_variable_storage_size, + u64 maximum_variable_size) +{ + return EFI_UNSUPPORTED; +} + struct efi_runtime_services __efi_runtime_data efi_runtime_services = { .hdr = { .signature = EFI_RUNTIME_SERVICES_SIGNATURE, @@ -398,4 +424,7 @@ struct efi_runtime_services __efi_runtime_data efi_runtime_services = { .set_variable = efi_set_variable, .get_next_high_mono_count = (void *)&efi_device_error, .reset_system = &efi_reset_system_boottime, + .update_capsule = efi_update_capsule, + .query_capsule_caps = efi_query_capsule_caps, + .query_variable_info = efi_query_variable_info, }; -- 2.14.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] efi_loader: rewrite README.efi
On 30.01.18 20:03, Heinrich Schuchardt wrote: > Provide information about > > - usage of the bootefi command > - overview of UEFI > - interaction between U-Boot and EFI drivers > > Signed-off-by: Heinrich Schuchardt > --- > v2 > new file The patch is very hard to read. Please just make this 2 patches. One that removes the old file, one that adds the rewrite. > --- > doc/README.efi | 322 > ++--- > 1 file changed, 264 insertions(+), 58 deletions(-) > > diff --git a/doc/README.efi b/doc/README.efi > index 956f5bfa0c..ea1facc431 100644 > --- a/doc/README.efi > +++ b/doc/README.efi > @@ -1,86 +1,292 @@ > -# > -# Copyright (C) 2015 Google, Inc > -# > -# SPDX-License-Identifier: GPL-2.0+ > -# > + > > +# EFI on U-Boot > > -=== Table of Contents === > +## Motivation Just remove the "Motivation" line. The text below is just the starting paragraph for "EFI on U-Boot". > > -Motivation > -How do I get it? > -Status > -Future work > +The Unified Extensible Firmware Interface Specification (UEFI) has become the > +default for booting on AArch64 and x86 systems. It provides a stable API for > the > +interaction between the firmware and the drivers and applications loaded by > the firmware, drivers and applications > +firmware. The API provides access to block storage, network, and console to > name > +a few. The Linux kernel and boot loaders like Grub or the FreeBSD loader can > be > +executed. > > +## Building for EFI > > -Motivation > --- > +The UEFI standard supports only little endian systems. The EFI support can be > +activated for ARM and x86 by specifying > > -With this API support in place, you can run any UEFI payload (such as the > Linux > -kernel, grub2 or gummiboot) on U-Boot. This dramatically simplifies boot > loader > -configuration, as U-Boot based systems now look and feel (almost) the same > way > -as TianoCore based systems. > +CONFIG_CMD_BOOTEFI=y > +CONFIG_EFI_LOADER=y > > -How do I get it? > - > +in the .config file. > > -EFI support for 32bit ARM and AArch64 is already included in U-Boot. All you > -need to do is enable > +Support for attaching virtual block devices, e.g. iSCSI drives connected by > the > +loaded EFI application, requires Please provide a link to the README.iscsi file here. > > - CONFIG_CMD_BOOTEFI=y > - CONFIG_EFI_LOADER=y > +CONFIG_BLK=y > +CONFIG_PARTITIONS=y > > -in your .config file and you will automatically get a bootefi command to run > -an efi application as well as snippet in the default distro boot script that > -scans for removable media efi binaries as fallback. > +A hello world EFI application can be built with All those hello world and selftest etc. things should be covered in their own section IMHO. So you want to have a section on selftest (which you have) and shortly mention the CONFIG option to enable it in there. > > -Status > --- > +CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y > > -I am successfully able to run grub2 and Linux EFI binaries with this code on > -ARMv7 as well as AArch64 systems. > +It can be embedded into the U-Boot binary for starting with command > +'bootefi hello' with > > -When enabled, the resulting U-Boot binary only grows by ~10KB, so it's very > -light weight. > +CONFIG_CMD_BOOTEFI_HELLO=y > > -All storage devices are directly accessible from the uEFI payload > +A test suite that can be executed with command 'bootefi selftest' is provided > +by > > -Removable media booting (search for /efi/boot/boota{a64,arm}.efi) is > supported. > +CONFIG_SELFTEST=y > > -Simple use cases like "Plug this SD card into my ARM device and it just > -boots into grub which boots into Linux", work very well. > +## The bootefi command > > +### Executing an EFI binary > > -Running HelloWord.efi > -- > +The bootefi command is used to start EFI applications or to install EFI > drivers. > +It takes two parameters > > -You can run a simple 'hello world' EFI program in U-Boot. > -Enable the option CONFIG_CMD_BOOTEFI_HELLO. > +bootefi [fdt address] > > -Then you can boot into U-Boot and type: > +* image address - the memory address of the EFI binary > +* fdt address - the memory address of the flattened device tree > > - > bootefi hello > +Below you find the output of an example session starting Grub. > > -The 'hello world EFI' program will then run, print a message and exit. > +=> load mmc 0:2 ${fdt_addr_r} boot/dtb > +29830 bytes read in 14 ms (2 MiB/s) > +=> load mmc 0:1 ${kernel_addr_r} efi/debian/grubaa64.efi > +reading efi/debian/grubaa64.efi > +120832 bytes read in 7 ms (16.5 MiB/s) > +=> bootefi ${kernel_addr_r} ${fdt_addr_r} > > +The environment variable 'bootargs' is passed as load options in the EFI > system > +table. The Linux kernel EFI stub uses the load options as command line > +arguments. > > -Future work
Re: [U-Boot] [PATCH 1/1][for v2018.03] efi_loader: correct efi_disk_register
On 09.02.18 17:39, Heinrich Schuchardt wrote: > efi_disk_register should return as status code (efi_status_t). > > Disks with zero blocks should be reported as 'not ready' without throwing > an error. > > This patch solves a problem running OpenBSD on system configured with > CONFIG_BLK=n (e.g. i.MX6). > > Signed-off-by: Heinrich Schuchardt > --- > include/efi_loader.h | 2 +- > lib/efi_loader/efi_disk.c | 71 > ++- > 2 files changed, 46 insertions(+), 27 deletions(-) > > diff --git a/include/efi_loader.h b/include/efi_loader.h > index 7caae97ea70..c70706955e6 100644 > --- a/include/efi_loader.h > +++ b/include/efi_loader.h > @@ -173,7 +173,7 @@ extern struct list_head efi_obj_list; > /* Called by bootefi to make console interface available */ > int efi_console_register(void); > /* Called by bootefi to make all disk storage accessible as EFI objects */ > -int efi_disk_register(void); > +efi_status_t efi_disk_register(void); > /* Create handles and protocols for the partitions of a block device */ > int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, > const char *if_typename, int diskid, > diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c > index ac39a65ee89..a33c819a8cc 100644 > --- a/lib/efi_loader/efi_disk.c > +++ b/lib/efi_loader/efi_disk.c > @@ -226,25 +226,26 @@ efi_fs_from_path(struct efi_device_path *full_path) > * @offset offset into disk for simple partitions > * @return disk object > */ > -static struct efi_disk_obj *efi_disk_add_dev( > +static efi_status_t efi_disk_add_dev( > efi_handle_t parent, > struct efi_device_path *dp_parent, > const char *if_typename, > struct blk_desc *desc, > int dev_index, > lbaint_t offset, > - unsigned int part) > + unsigned int part, > + struct efi_disk_obj **disk) > { > struct efi_disk_obj *diskobj; > efi_status_t ret; > > /* Don't add empty devices */ > if (!desc->lba) > - return NULL; > + return EFI_NOT_READY; > > diskobj = calloc(1, sizeof(*diskobj)); > if (!diskobj) > - goto out_of_memory; > + return EFI_OUT_OF_RESOURCES; > > /* Hook up to the device list */ > efi_add_handle(&diskobj->parent); > @@ -262,11 +263,11 @@ static struct efi_disk_obj *efi_disk_add_dev( > ret = efi_add_protocol(diskobj->parent.handle, &efi_block_io_guid, > &diskobj->ops); > if (ret != EFI_SUCCESS) > - goto out_of_memory; > + return ret; > ret = efi_add_protocol(diskobj->parent.handle, &efi_guid_device_path, > diskobj->dp); > if (ret != EFI_SUCCESS) > - goto out_of_memory; > + return ret; > if (part >= 1) { > diskobj->volume = efi_simple_file_system(desc, part, >diskobj->dp); > @@ -274,7 +275,7 @@ static struct efi_disk_obj *efi_disk_add_dev( > &efi_simple_file_system_protocol_guid, > diskobj->volume); > if (ret != EFI_SUCCESS) > - goto out_of_memory; > + return ret; > } > diskobj->ops = block_io_disk_template; > diskobj->ifname = if_typename; > @@ -291,10 +292,9 @@ static struct efi_disk_obj *efi_disk_add_dev( > if (part != 0) > diskobj->media.logical_partition = 1; > diskobj->ops.media = &diskobj->media; > - return diskobj; > -out_of_memory: > - printf("ERROR: Out of memory\n"); > - return NULL; > + if (disk) > + *disk = diskobj; > + return EFI_SUCCESS; > } > > /* > @@ -330,8 +330,12 @@ int efi_disk_create_partitions(efi_handle_t parent, > struct blk_desc *desc, > continue; > snprintf(devname, sizeof(devname), "%s:%d", pdevname, >part); > - efi_disk_add_dev(parent, dp, if_typename, desc, diskid, > - info.start, part); > + ret = efi_disk_add_dev(parent, dp, if_typename, desc, diskid, > +info.start, part, NULL); > + if (ret != EFI_SUCCESS) { > + printf("Adding partition %s failed\n", pdevname); > + continue; > + } > disks++; > } > > @@ -349,26 +353,32 @@ int efi_disk_create_partitions(efi_handle_t parent, > struct blk_desc *desc, > * > * This gets called from do_bootefi_exec(). > */ > -int efi_disk_register(void) > +efi_status_t efi_disk_re
Re: [U-Boot] [PATCH 1/1] efi_loader: add missing runtime services stubs
On 02.02.18 13:56, Heinrich Schuchardt wrote: > Add stubs for UpdateCapsule, QueryCapsuleCapabilities, and > QueryVariableInfo. > > Signed-off-by: Heinrich Schuchardt > --- > include/efi_api.h| 28 +--- > lib/efi_loader/efi_runtime.c | 29 + > 2 files changed, 54 insertions(+), 3 deletions(-) > > diff --git a/include/efi_api.h b/include/efi_api.h > index 81e2fd204e..ec4ce8bd3a 100644 > --- a/include/efi_api.h > +++ b/include/efi_api.h > @@ -181,6 +181,17 @@ enum efi_reset_type { > #define EFI_RUNTIME_SERVICES_SIGNATURE 0x5652453544e5552ULL > #define EFI_RUNTIME_SERVICES_REVISION0x0001 > > +#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x0001 > +#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x0002 > +#define CAPSULE_FLAGS_INITIATE_RESET 0x0004 > + > +struct efi_capsule_header { > + efi_guid_t *capsule_guid; > + u32 header_size; > + u32 flags; > + u32 capsule_image_size; > +}; > + > struct efi_runtime_services { > struct efi_table_hdr hdr; > efi_status_t (EFIAPI *get_time)(struct efi_time *time, > @@ -210,9 +221,20 @@ struct efi_runtime_services { > void (EFIAPI *reset_system)(enum efi_reset_type reset_type, > efi_status_t reset_status, > unsigned long data_size, void *reset_data); > - void *update_capsule; > - void *query_capsule_caps; > - void *query_variable_info; > + efi_status_t (EFIAPI *update_capsule)( > + struct efi_capsule_header **capsule_header_array, > + efi_uintn_t capsule_count, > + u64 scatter_gather_list); > + efi_status_t (EFIAPI *query_capsule_caps)( > + struct efi_capsule_header **capsule_header_array, > + efi_uintn_t capsule_count, > + u64 maximum_capsule_size, > + u32 reset_type); > + efi_status_t (EFIAPI *query_variable_info)( > + u32 attributes, > + u64 maximum_variable_storage_size, > + u64 remaining_variable_storage_size, > + u64 maximum_variable_size); > }; > > /* EFI Configuration Table and GUID definitions */ > diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c > index 471ac29d60..d7c2c1e430 100644 > --- a/lib/efi_loader/efi_runtime.c > +++ b/lib/efi_loader/efi_runtime.c > @@ -382,6 +382,32 @@ static efi_status_t __efi_runtime EFIAPI > efi_invalid_parameter(void) > return EFI_INVALID_PARAMETER; > } > > +efi_status_t EFIAPI efi_update_capsule( These need to be __efi_runtime, no? Alex > + struct efi_capsule_header **capsule_header_array, > + efi_uintn_t capsule_count, > + u64 scatter_gather_list) > +{ > + return EFI_UNSUPPORTED; > +} > + > +efi_status_t EFIAPI efi_query_capsule_caps( > + struct efi_capsule_header **capsule_header_array, > + efi_uintn_t capsule_count, > + u64 maximum_capsule_size, > + u32 reset_type) > +{ > + return EFI_UNSUPPORTED; > +} > + > +efi_status_t EFIAPI efi_query_variable_info( > + u32 attributes, > + u64 maximum_variable_storage_size, > + u64 remaining_variable_storage_size, > + u64 maximum_variable_size) > +{ > + return EFI_UNSUPPORTED; > +} > + > struct efi_runtime_services __efi_runtime_data efi_runtime_services = { > .hdr = { > .signature = EFI_RUNTIME_SERVICES_SIGNATURE, > @@ -399,4 +425,7 @@ struct efi_runtime_services __efi_runtime_data > efi_runtime_services = { > .set_variable = efi_set_variable, > .get_next_high_mono_count = (void *)&efi_device_error, > .reset_system = &efi_reset_system_boottime, > + .update_capsule = efi_update_capsule, > + .query_capsule_caps = efi_query_capsule_caps, > + .query_variable_info = efi_query_variable_info, > }; > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 10/10] mmc: uniphier-sd: Add Renesas SDR104/HS200 tuning support
Jaehoon, 2018-02-01 0:21 GMT+09:00 Marek Vasut : > Add code for PHY tuning required for SDR104/HS200 support on Renesas RCar. > > Signed-off-by: Marek Vasut > Cc: Jaehoon Chung > Cc: Masahiro Yamada > --- Please apply whole of the series. This patch introduces warnings for configs/uniphier_v7_defconfig, but it is trivial to fix it up. (Please replace 'static' with 'static inline') CC spl/drivers/core/ofnode.o CC spl/drivers/core/read_extra.o LD spl/drivers/core/built-in.o CC spl/drivers/mmc/mmc.o CC spl/drivers/mmc/mmc-uclass.o CC spl/drivers/mmc/mmc_boot.o CC spl/drivers/mmc/uniphier-sd.o In file included from drivers/mmc/uniphier-sd.c:21:0: drivers/mmc/uniphier-sd.h:149:12: warning: ‘rcar_gen3_sd_execute_tuning’ defined but not used [-Wunused-function] static int rcar_gen3_sd_execute_tuning(struct udevice *dev, uint opcode) ^~~ drivers/mmc/uniphier-sd.h:145:13: warning: ‘rcar_gen3_sd_reset_tuning’ defined but not used [-Wunused-function] static void rcar_gen3_sd_reset_tuning(struct uniphier_sd_priv *priv) ^ LD spl/drivers/mmc/built-in.o CC spl/drivers/mtd/nand/denali_spl.o LD spl/drivers/mtd/nand/built-in.o CC spl/drivers/pinctrl/pinctrl-uclass.o CC spl/drivers/pinctrl/pinctrl-generic.o > drivers/mmc/Kconfig| 9 ++ > drivers/mmc/Makefile | 1 + > drivers/mmc/uniphier-sd-rcar.c | 288 > + > drivers/mmc/uniphier-sd.c | 7 + > drivers/mmc/uniphier-sd.h | 15 +++ > 5 files changed, 320 insertions(+) > create mode 100644 drivers/mmc/uniphier-sd-rcar.c > > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig > index a1b21fd1bd..51b268bf3d 100644 > --- a/drivers/mmc/Kconfig > +++ b/drivers/mmc/Kconfig > @@ -261,6 +261,15 @@ config MMC_UNIPHIER > This selects support for the Matsushita SD/MMC Host Controller on > SocioNext UniPhier and Renesas RCar SoCs. > > +config MMC_RENESAS_TUNING > + bool "RCar SDHI Host Controller SDR104/HS200 support" > + depends on RCAR_GEN3 > + depends on MMC_UNIPHIER > + depends on MMC_HS200_SUPPORT > + help > + This selects support for the SDR104/HS200 tuning on > + Renesas RCar Gen3 SoCs. > + > config MMC_BCM2835 > bool "BCM2835 family custom SD/MMC Host Controller support" > depends on ARCH_BCM283X > diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile > index 42113e2603..16cdd970c3 100644 > --- a/drivers/mmc/Makefile > +++ b/drivers/mmc/Makefile > @@ -64,4 +64,5 @@ obj-$(CONFIG_MMC_SDHCI_ZYNQ) += zynq_sdhci.o > > obj-$(CONFIG_MMC_SUNXI)+= sunxi_mmc.o > obj-$(CONFIG_MMC_UNIPHIER) += uniphier-sd.o > +obj-$(CONFIG_MMC_RENESAS_TUNING) += uniphier-sd-rcar.o > obj-$(CONFIG_MMC_BCM2835) += bcm2835_sdhost.o > diff --git a/drivers/mmc/uniphier-sd-rcar.c b/drivers/mmc/uniphier-sd-rcar.c > new file mode 100644 > index 00..8baa2a9b46 > --- /dev/null > +++ b/drivers/mmc/uniphier-sd-rcar.c > @@ -0,0 +1,288 @@ > +/* > + * Renesas RCar Gen3 SDHI SDR104/HS200 tuning routine > + * > + * Copyright (C) 2018 Marek Vasut > + * > + * SPDX-License-Identifier:GPL-2.0+ > + */ > + > +#include > +#include > +#include > +#include > + > +/* > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +*/ > +#include "uniphier-sd.h" > + > +/* SCC registers */ > +#define SH_MOBILE_SDHI_SCC_DTCNTL 0x800 > +#define SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN BIT(0) > +#define SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT 16 > +#define SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_MASK0xff > +#define SH_MOBILE_SDHI_SCC_TAPSET 0x804 > +#define SH_MOBILE_SDHI_SCC_DT2FF 0x808 > +#define SH_MOBILE_SDHI_SCC_CKSEL 0x80c > +#define SH_MOBILE_SDHI_SCC_CKSEL_DTSEL BIT(0) > +#define SH_MOBILE_SDHI_SCC_RVSCNTL 0x810 > +#define SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN BIT(0) > +#define SH_MOBILE_SDHI_SCC_RVSREQ 0x814 > +#define SH_MOBILE_SDHI_SCC_RVSREQ_RVSERR BIT(2) > +#define SH_MOBILE_SDHI_SCC_SMPCMP 0x818 > +#define SH_MOBILE_SDHI_SCC_TMPPORT20x81c > + > +#define SH_MOBILE_SDHI_MAX_TAP 3 > + > +static unsigned int uniphier_sd_init_tuning(struct uniphier_sd_priv *priv) > +{ > + u32 reg; > + > + /* Initialize SCC */ > + uniphier_sd_writel(priv, 0, UNIPHIER_SD_INFO1); > + > + reg = uniphier_sd_readl(priv, UNIPHIER_SD_CLKCTL); > + reg &= ~UNIPHIER_SD_CLKCTL_SCLKEN; > + uniphier_sd_writel(priv, reg, UNIPHIER_SD_CLKCTL); > + > + /* Set sampling clock selection range */ > + uniphier_sd_writel(priv, 0x8 << > SH_M
Re: [U-Boot] [U-Boot,v3,1/2] bcm283x: Add pinctrl driver
On 02/09/2018 05:41 AM, Heinrich Schuchardt wrote: > On 02/09/2018 05:12 AM, Jonathan Gray wrote: >> On Fri, Feb 09, 2018 at 04:43:09AM +0100, Heinrich Schuchardt wrote: >>> On 02/09/2018 12:55 AM, Jonathan Gray wrote: On Thu, Feb 08, 2018 at 03:44:32PM +0100, Heinrich Schuchardt wrote: > On 02/08/2018 10:49 AM, Jonathan Gray wrote: >> On Thu, Feb 08, 2018 at 08:10:47PM +1100, Jonathan Gray wrote: >>> On Thu, Feb 08, 2018 at 09:11:20AM +0100, Alexander Graf wrote: > Am 08.02.2018 um 06:49 schrieb Jonathan Gray : > > On Mon, Feb 05, 2018 at 11:31:42AM +0100, Mark Kettenis wrote: >>> Date: Mon, 5 Feb 2018 21:06:59 +1100 >>> From: Jonathan Gray >>> > booting sd0a:/bsd: open sd0a:/bsd: Device not configured > failed(6). will try /bsd How do you find out that it's sd0a instead of sd1a? >>> >>> The loaded image protocol I believe. >> >> Actually the OpenBSD bootloader currently only supports >> loading the >> bsd kernel from the same device as the bootloader. It will >> always >> call that device sd0. It invokes the device path protocol on the >> loaded image handle and then matches that path to a device that >> supports the block io protocol. > > Perhaps the problem is elsewhere as U-Boot master also broke > vexpress_ca15_tc2 and mx6cuboxi targets: Perfect, so can you quickly bisect it now that the bisect doesn???t end at the pinctrl driver? >>> >>> On cubox a bisect points to >>> >>> commit 64e4db0f119151a1345e1da19d152eda550394e7 >>> Author: Heinrich Schuchardt >>> Date: Fri Jan 19 20:24:47 2018 +0100 >>> >>> efi_loader: make efi_disk_create_partitions a global symbol >>> Up to now we have been using efi_disk_create_partitions() >>> to create >>> partitions for block devices that existed before starting >>> an EFI >>> application. >>> We need to call it for block devices created by EFI >>> applications at run time. The EFI application will define the >>> handle for the block device and install a device path protocol >>> on it. We have to use this device path as stem for the >>> partition >>> device paths. >>> Signed-off-by: Heinrich Schuchardt >>> Signed-off-by: Alexander Graf >>> >>> include/efi_loader.h | 4 +++ >>> lib/efi_loader/efi_disk.c | 84 >>> +++ >>> 2 files changed, 64 insertions(+), 24 deletions(-) >>> >>> If I revert this commit a image built from master works. >> >> Actually master doesn't build with just that reverted, seems I had >> stale >> object files. > > When bisecting running > 'make mrproper && make foo_defconfig && make' > in each round is recommendable. > > Do you still assume a problem that requires a change in U-Boot? > Or can we close the topic? > > Best regards > > Heinrich There are multiple regressions with U-Boot master compared to 2018.01. >>> >>> U-Boot master is a moving target. Please, state the commit. >> >> The commit was mentioned three times in the mail but you seem >> to have missed that. >> >> again e24bd1e79e223aa89854c0be95a53e2d538144a5 >> >>> sopine_baseboard (pinebook), reported to me I don't have hardware rpi_3 mx6cuboxi vexpress_ca15_tc2 >>> >>> It is unclear what this sentence means. >>> >>> Do you expect to that a pinebook can boot from a U-Boot that is compiled >>> with rpi_3_defconfig? >>> >>> Wouldn't you use a U-Boot image compiled with >>> sopine_baseboard_defconfig for >>> your pinebook? >> >> Please read the above. A sopine_baseboard image was used on the pinebook >> and not by me. >> >>> While qemu_arm64 works. Bisecting rpi_3 again, removing obj dir between runs and skipping >>> >>> What do you mean by obj dir? >> >> build directory, dir used with O= on make calls >> >>> commits where nothing shows up on serial again gives the same: commit caf2233b281c03e3e359061a3dfa537d8a25c273 Author: Alexander Graf AuthorDate: Tue Jan 23 18:05:21 2018 +0100 Commit: Tom Rini CommitDate: Sun Jan 28 12:27:32 2018 -0500 bcm283x: Add pinctrl driver The bcm283x family of SoCs have a GPIO controller that also acts as pinctrl controller. This patch introduces a new pinctrl driver that can actually properly mux devices into their device tree defined pin states and is now the primary owner of the gpio device. The previous GPIO driver gets moved into a subdevice of the pinctrl driver, bound to the same OF node
Re: [U-Boot] [PATCH v3 11/18] efi_loader: make efi_disk_create_partitions a global symbol
On 02/09/2018 10:44 AM, Artturi Alm wrote: > On Fri, Feb 09, 2018 at 05:07:52AM +0100, Heinrich Schuchardt wrote: >> On 02/09/2018 01:15 AM, Jonathan Gray wrote: >>> On Fri, Jan 19, 2018 at 08:24:47PM +0100, Heinrich Schuchardt wrote: Up to now we have been using efi_disk_create_partitions() to create partitions for block devices that existed before starting an EFI application. We need to call it for block devices created by EFI applications at run time. The EFI application will define the handle for the block device and install a device path protocol on it. We have to use this device path as stem for the partition device paths. Signed-off-by: Heinrich Schuchardt --- v3 fix typos in comments v2 no change >>> >>> breakage on mx6cuboxi with OpenBSD bootarm.efi, bisects to >>> >>> commit 64e4db0f119151a1345e1da19d152eda550394e7 >>> Author: Heinrich Schuchardt >>> AuthorDate: Fri Jan 19 20:24:47 2018 +0100 >>> Commit: Alexander Graf >>> CommitDate: Mon Jan 22 23:09:14 2018 +0100 >>> >>> efi_loader: make efi_disk_create_partitions a global symbol >>> Up to now we have been using efi_disk_create_partitions() to create >>> partitions for block devices that existed before starting an EFI >>> application. >>> We need to call it for block devices created by EFI >>> applications at run time. The EFI application will define the >>> handle for the block device and install a device path protocol >>> on it. We have to use this device path as stem for the partition >>> device paths. >>> Signed-off-by: Heinrich Schuchardt >>> Signed-off-by: Alexander Graf >>> >>> with master as of e24bd1e79e223aa89854c0be95a53e2d538144a5 Resolved with patch efi_loader: correct efi_disk_register https://lists.denx.de/pipermail/u-boot/2018-February/320035.html Thanks for reporting the problem. Could you, please, confirm the fix works for you. Best regards Heinrich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1][for v2018.03] efi_loader: correct efi_disk_register
efi_disk_register should return as status code (efi_status_t). Disks with zero blocks should be reported as 'not ready' without throwing an error. This patch solves a problem running OpenBSD on system configured with CONFIG_BLK=n (e.g. i.MX6). Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 2 +- lib/efi_loader/efi_disk.c | 71 ++- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 7caae97ea70..c70706955e6 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -173,7 +173,7 @@ extern struct list_head efi_obj_list; /* Called by bootefi to make console interface available */ int efi_console_register(void); /* Called by bootefi to make all disk storage accessible as EFI objects */ -int efi_disk_register(void); +efi_status_t efi_disk_register(void); /* Create handles and protocols for the partitions of a block device */ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, const char *if_typename, int diskid, diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index ac39a65ee89..a33c819a8cc 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -226,25 +226,26 @@ efi_fs_from_path(struct efi_device_path *full_path) * @offset offset into disk for simple partitions * @return disk object */ -static struct efi_disk_obj *efi_disk_add_dev( +static efi_status_t efi_disk_add_dev( efi_handle_t parent, struct efi_device_path *dp_parent, const char *if_typename, struct blk_desc *desc, int dev_index, lbaint_t offset, - unsigned int part) + unsigned int part, + struct efi_disk_obj **disk) { struct efi_disk_obj *diskobj; efi_status_t ret; /* Don't add empty devices */ if (!desc->lba) - return NULL; + return EFI_NOT_READY; diskobj = calloc(1, sizeof(*diskobj)); if (!diskobj) - goto out_of_memory; + return EFI_OUT_OF_RESOURCES; /* Hook up to the device list */ efi_add_handle(&diskobj->parent); @@ -262,11 +263,11 @@ static struct efi_disk_obj *efi_disk_add_dev( ret = efi_add_protocol(diskobj->parent.handle, &efi_block_io_guid, &diskobj->ops); if (ret != EFI_SUCCESS) - goto out_of_memory; + return ret; ret = efi_add_protocol(diskobj->parent.handle, &efi_guid_device_path, diskobj->dp); if (ret != EFI_SUCCESS) - goto out_of_memory; + return ret; if (part >= 1) { diskobj->volume = efi_simple_file_system(desc, part, diskobj->dp); @@ -274,7 +275,7 @@ static struct efi_disk_obj *efi_disk_add_dev( &efi_simple_file_system_protocol_guid, diskobj->volume); if (ret != EFI_SUCCESS) - goto out_of_memory; + return ret; } diskobj->ops = block_io_disk_template; diskobj->ifname = if_typename; @@ -291,10 +292,9 @@ static struct efi_disk_obj *efi_disk_add_dev( if (part != 0) diskobj->media.logical_partition = 1; diskobj->ops.media = &diskobj->media; - return diskobj; -out_of_memory: - printf("ERROR: Out of memory\n"); - return NULL; + if (disk) + *disk = diskobj; + return EFI_SUCCESS; } /* @@ -330,8 +330,12 @@ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, continue; snprintf(devname, sizeof(devname), "%s:%d", pdevname, part); - efi_disk_add_dev(parent, dp, if_typename, desc, diskid, -info.start, part); + ret = efi_disk_add_dev(parent, dp, if_typename, desc, diskid, + info.start, part, NULL); + if (ret != EFI_SUCCESS) { + printf("Adding partition %s failed\n", pdevname); + continue; + } disks++; } @@ -349,26 +353,32 @@ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, * * This gets called from do_bootefi_exec(). */ -int efi_disk_register(void) +efi_status_t efi_disk_register(void) { struct efi_disk_obj *disk; int disks = 0; + efi_status_t ret; #ifdef CONFIG_BLK struct udevice *dev; - for
Re: [U-Boot] [PATCH v2 4/7] arm: dts: sunxi: update A64 to new EMAC binding
On 09/02/18 15:58, Samuel Holland wrote: > On 02/08/18 19:30, Andre Przywara wrote: >> The U-Boot driver for the sun8i-emac was using some preliminary DT >> binding. Now since Linux got its own driver in v4.15 and our driver >> can now cope with both bindings, let's convert the DT nodes used for the >> Pine64+ board over to the new bindings used by the kernel. >> >> Signed-off-by: Andre Przywara >> --- >> arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi | 51 >> +++-- >> 1 file changed, 30 insertions(+), 21 deletions(-) > > Since this is now the same binding as used in Linux, can this file be merged > into the A64 dtsi? This file isn't pine64-specific, and it looks like it's not > currently included from either dts file anyway. I ask because I'd like to get > Ethernet working on the Orange Pi Win. Yeah, I was thinking about this as well, but wanted to keep the diff small for this series. I have patches ready that copy all of the Linux .dts file into U-Boot, so these patches here are somewhat preliminary anyway. But if people don't mind, I could merge this into sun50i-a64.dtsi as well. Cheers, Andre. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 4/4] dm: video: support increased intensity (bold)
On 8 February 2018 at 13:47, Heinrich Schuchardt wrote: > > Support special rendition code 0 - reset attributes. > Support special rendition code 1 - increased intensity (bold). > > Signed-off-by: Heinrich Schuchardt > --- > v4 > Rename priv->fg to priv->fg_col_idx. > v3 > Add color constants. > v2 > SGR 0 should reset the colors and the attributes. > --- > drivers/video/vidconsole-uclass.c | 32 ++-- > drivers/video/video-uclass.c | 5 - > include/video.h | 2 ++ > include/video_console.h | 12 ++-- > test/dm/video.c | 2 +- > 5 files changed, 43 insertions(+), 10 deletions(-) Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/7] arm: dts: sunxi: update A64 to new EMAC binding
On 02/08/18 19:30, Andre Przywara wrote: > The U-Boot driver for the sun8i-emac was using some preliminary DT > binding. Now since Linux got its own driver in v4.15 and our driver > can now cope with both bindings, let's convert the DT nodes used for the > Pine64+ board over to the new bindings used by the kernel. > > Signed-off-by: Andre Przywara > --- > arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi | 51 > +++-- > 1 file changed, 30 insertions(+), 21 deletions(-) Since this is now the same binding as used in Linux, can this file be merged into the A64 dtsi? This file isn't pine64-specific, and it looks like it's not currently included from either dts file anyway. I ask because I'd like to get Ethernet working on the Orange Pi Win. Thanks, Samuel ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] mmc: Fix uninitialised priv member
When using omap_hsmmc without the device model then the allocation of mmc->priv ends up uninitialised. Signed-off-by: Alex Kiernan --- I've a board (AM335xx based) which boots fine with 2018-01, with 2018-03-rc1 (actually 1811a92) it fails in the MLO: U-Boot SPL 2018.03-rc1-00222-g128a503-dirty (Feb 09 2018 - 11:51:50 +) Trying to boot from MMC2 omap_hsmmc_send_cmd : DMA timeout: No status update mmc_init: -110, time 1026 spl: mmc init failed with error: -110 SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### Bisecting it out, it's this commit: f0d53e8 mmc: omap_hsmmc: Add support for DMA (ADMA2) drivers/mmc/omap_hsmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index b12d6d9..c6b3f25 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -918,7 +918,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio, struct mmc_config *cfg; uint host_caps_val; - priv = malloc(sizeof(*priv)); + priv = calloc(1, sizeof(*priv)); if (priv == NULL) return -1; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 3/5] arch-stm32: Factorize stm32.h for STM32F4 and F7
From: Patrice Chotard For STM32F4 and F7 SoCx family, a specific stm32.h file exists. Some common defines are duplicated or even unused in each of these stm32.h. Factorize all common definition in arch/arm/include/asm/stm32f.h and keep specific definitions in each arch/arm/include/asm/arch-stm32fx/stm32.h. Signed-off-by: Patrice Chotard --- v2: _ create arch/arm/include/asm/arch-stm32 directory and move stm32f.h in it. arch/arm/include/asm/arch-stm32/stm32f.h | 22 +++ arch/arm/include/asm/arch-stm32f4/stm32.h | 14 ++ arch/arm/include/asm/arch-stm32f7/stm32.h | 45 +-- drivers/mtd/stm32_flash.c | 2 +- 4 files changed, 26 insertions(+), 57 deletions(-) create mode 100644 arch/arm/include/asm/arch-stm32/stm32f.h diff --git a/arch/arm/include/asm/arch-stm32/stm32f.h b/arch/arm/include/asm/arch-stm32/stm32f.h new file mode 100644 index ..7bea20b4d06a --- /dev/null +++ b/arch/arm/include/asm/arch-stm32/stm32f.h @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2018, STMicroelectronics - All Rights Reserved + * Author(s): Patrice Chotard, for STMicroelectronics. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef _ASM_ARCH_STM32F_H +#define _ASM_ARCH_STM32F_H + +#define STM32_PERIPH_BASE 0x4000UL + +#define STM32_APB2_PERIPH_BASE (STM32_PERIPH_BASE + 0x0001) +#define STM32_AHB1_PERIPH_BASE (STM32_PERIPH_BASE + 0x0002) + +#define STM32_SYSCFG_BASE (STM32_APB2_PERIPH_BASE + 0x3800) +#define STM32_FLASH_CNTL_BASE (STM32_AHB1_PERIPH_BASE + 0x3C00) + +void stm32_flash_latency_cfg(int latency); + +#endif /* _ASM_ARCH_STM32F_H */ + diff --git a/arch/arm/include/asm/arch-stm32f4/stm32.h b/arch/arm/include/asm/arch-stm32f4/stm32.h index 763b18cb5412..903931243c2c 100644 --- a/arch/arm/include/asm/arch-stm32f4/stm32.h +++ b/arch/arm/include/asm/arch-stm32f4/stm32.h @@ -11,17 +11,12 @@ #ifndef _MACH_STM32_H_ #define _MACH_STM32_H_ +#include + /* * Peripheral memory map */ #define STM32_SYSMEM_BASE 0x1FFF -#define STM32_PERIPH_BASE 0x4000 -#define STM32_APB1PERIPH_BASE (STM32_PERIPH_BASE + 0x) -#define STM32_APB2PERIPH_BASE (STM32_PERIPH_BASE + 0x0001) -#define STM32_AHB1PERIPH_BASE (STM32_PERIPH_BASE + 0x0002) -#define STM32_AHB2PERIPH_BASE (STM32_PERIPH_BASE + 0x1000) - -#define STM32_BUS_MASK 0x /* * Register maps @@ -37,15 +32,10 @@ struct stm32_u_id_regs { */ #define STM32_U_ID_BASE(STM32_SYSMEM_BASE + 0x7A10) #define STM32_U_ID ((struct stm32_u_id_regs *)STM32_U_ID_BASE) - -#define FLASH_CNTL_BASE(STM32_AHB1PERIPH_BASE + 0x3C00) - static const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = { [0 ... 3] = 16 * 1024, [4] = 64 * 1024, [5 ... 11] =128 * 1024 }; -void stm32_flash_latency_cfg(int latency); - #endif /* _MACH_STM32_H_ */ diff --git a/arch/arm/include/asm/arch-stm32f7/stm32.h b/arch/arm/include/asm/arch-stm32f7/stm32.h index 40df89142608..c1f1ba2175e3 100644 --- a/arch/arm/include/asm/arch-stm32f7/stm32.h +++ b/arch/arm/include/asm/arch-stm32f7/stm32.h @@ -8,46 +8,7 @@ #ifndef _ASM_ARCH_HARDWARE_H #define _ASM_ARCH_HARDWARE_H -/* STM32F746 */ -#define ITCM_FLASH_BASE0x0020UL -#define AXIM_FLASH_BASE0x0800UL - -#define ITCM_SRAM_BASE 0xUL -#define DTCM_SRAM_BASE 0x2000UL -#define SRAM1_BASE 0x2001UL -#define SRAM2_BASE 0x2004C000UL - -#define PERIPH_BASE0x4000UL - -#define APB1_PERIPH_BASE (PERIPH_BASE + 0x) -#define APB2_PERIPH_BASE (PERIPH_BASE + 0x0001) -#define AHB1_PERIPH_BASE (PERIPH_BASE + 0x0002) -#define AHB2_PERIPH_BASE (PERIPH_BASE + 0x1000) -#define AHB3_PERIPH_BASE (PERIPH_BASE + 0x2000) - -#define USART2_BASE(APB1_PERIPH_BASE + 0x4400) -#define USART3_BASE(APB1_PERIPH_BASE + 0x4800) -#define PWR_BASE (APB1_PERIPH_BASE + 0x7000) - -#define USART1_BASE(APB2_PERIPH_BASE + 0x1000) -#define USART6_BASE(APB2_PERIPH_BASE + 0x1400) -#define STM32_SYSCFG_BASE (APB2_PERIPH_BASE + 0x3800) - -#define STM32_GPIOA_BASE (AHB1_PERIPH_BASE + 0x) -#define STM32_GPIOB_BASE (AHB1_PERIPH_BASE + 0x0400) -#define STM32_GPIOC_BASE (AHB1_PERIPH_BASE + 0x0800) -#define STM32_GPIOD_BASE (AHB1_PERIPH_BASE + 0x0C00) -#define STM32_GPIOE_BASE (AHB1_PERIPH_BASE + 0x1000) -#define STM32_GPIOF_BASE (AHB1_PERIPH_BASE + 0x1400) -#define STM32_GPIOG_BASE (AHB1_PERIPH_BASE + 0x1800) -#define STM32_GPIOH_BASE (AHB1_PERIPH_BASE + 0x1C00) -#define STM32_GPIOI_BASE (AHB1_PERIPH_BASE + 0x2000) -#define STM32_GPIOJ_BASE (AHB1_PERIPH_BASE + 0x2400) -#define STM32_GPIOK_BASE (AHB1_PERIPH_BASE + 0x2800) -#define FLASH_CNTL_BASE(AHB1_PERIPH_BAS
[U-Boot] [PATCH v2 4/5] arch-stm32: Remove stm32_periph.h
From: Patrice Chotard Remove arch/arm/include/asm/arch-stm32fx/stm32_periph.h as all defines or enums are no more used. Signed-off-by: Patrice Chotard --- v2: _ none arch/arm/include/asm/arch-stm32f4/stm32_periph.h | 38 arch/arm/include/asm/arch-stm32f7/stm32_periph.h | 23 -- board/st/stm32f746-disco/stm32f746-disco.c | 1 - 3 files changed, 62 deletions(-) delete mode 100644 arch/arm/include/asm/arch-stm32f4/stm32_periph.h delete mode 100644 arch/arm/include/asm/arch-stm32f7/stm32_periph.h diff --git a/arch/arm/include/asm/arch-stm32f4/stm32_periph.h b/arch/arm/include/asm/arch-stm32f4/stm32_periph.h deleted file mode 100644 index fa45a5c0f1cb.. --- a/arch/arm/include/asm/arch-stm32f4/stm32_periph.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2016, STMicroelectronics - All Rights Reserved - * Author(s): Vikas Manocha, for STMicroelectronics. - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#ifndef __ASM_ARM_ARCH_PERIPH_H -#define __ASM_ARM_ARCH_PERIPH_H - -/* - * Peripherals required for pinmux configuration. List will - * grow with support for more devices getting added. - * Numbering based on interrupt table. - * - */ -enum periph_id { - UART1_GPIOA_9_10 = 0, - UART2_GPIOD_5_6, -}; - -enum periph_clock { - USART1_CLOCK_CFG = 0, - USART2_CLOCK_CFG, - GPIO_A_CLOCK_CFG, - GPIO_B_CLOCK_CFG, - GPIO_C_CLOCK_CFG, - GPIO_D_CLOCK_CFG, - GPIO_E_CLOCK_CFG, - GPIO_F_CLOCK_CFG, - GPIO_G_CLOCK_CFG, - GPIO_H_CLOCK_CFG, - GPIO_I_CLOCK_CFG, - GPIO_J_CLOCK_CFG, - GPIO_K_CLOCK_CFG, -}; - -#endif /* __ASM_ARM_ARCH_PERIPH_H */ diff --git a/arch/arm/include/asm/arch-stm32f7/stm32_periph.h b/arch/arm/include/asm/arch-stm32f7/stm32_periph.h deleted file mode 100644 index 38d4ade13d2f.. --- a/arch/arm/include/asm/arch-stm32f7/stm32_periph.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2016, STMicroelectronics - All Rights Reserved - * Author(s): Vikas Manocha, for STMicroelectronics. - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#ifndef __ASM_ARM_ARCH_PERIPH_H -#define __ASM_ARM_ARCH_PERIPH_H - -/* - * Peripherals required for pinmux configuration. List will - * grow with support for more devices getting added. - * Numbering based on interrupt table. - * - */ -enum periph_id { - PERIPH_ID_USART1 = 37, - - PERIPH_ID_QUADSPI = 92, -}; - -#endif /* __ASM_ARM_ARCH_PERIPH_H */ diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c index ec39468fb8a2..05b316fe90a4 100644 --- a/board/st/stm32f746-disco/stm32f746-disco.c +++ b/board/st/stm32f746-disco/stm32f746-disco.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 5/5] arch-stm32: Clean arch-stm32f7/syscfg.h
From: Patrice Chotard Remove all unused defines Signed-off-by: Patrice Chotard --- v2: _none arch/arm/include/asm/arch-stm32f7/syscfg.h | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/arm/include/asm/arch-stm32f7/syscfg.h b/arch/arm/include/asm/arch-stm32f7/syscfg.h index 49e78f203dcd..310eec584f20 100644 --- a/arch/arm/include/asm/arch-stm32f7/syscfg.h +++ b/arch/arm/include/asm/arch-stm32f7/syscfg.h @@ -23,16 +23,7 @@ struct stm32_syscfg_regs { */ #define STM32_SYSCFG ((struct stm32_syscfg_regs *)STM32_SYSCFG_BASE) -/* SYSCFG memory remap register */ -#define SYSCFG_MEMRMP_MEM_BOOT BIT(0) -#define SYSCFG_MEMRMP_SWP_FMC BIT(10) - /* SYSCFG peripheral mode configuration register */ -#define SYSCFG_PMC_ADCXDC2 BIT(16) #define SYSCFG_PMC_MII_RMII_SELBIT(23) -/* Compensation cell control register */ -#define SYSCFG_CMPCR_CMP_PDBIT(0) -#define SYSCFG_CMPCR_READY BIT(8) - #endif -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/5] arch-stm32f4: Remove fmc.h file
From: Patrice Chotard fmc.h file is no more used, remove it. All FMC related defines are declared in drivers/ram/stm32_sdram.c which is common to all STM32 SoCs. Signed-off-by: Patrice Chotard --- v2: _ none arch/arm/include/asm/arch-stm32f4/fmc.h | 75 - 1 file changed, 75 deletions(-) delete mode 100644 arch/arm/include/asm/arch-stm32f4/fmc.h diff --git a/arch/arm/include/asm/arch-stm32f4/fmc.h b/arch/arm/include/asm/arch-stm32f4/fmc.h deleted file mode 100644 index 7dd5077d0c34.. --- a/arch/arm/include/asm/arch-stm32f4/fmc.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * (C) Copyright 2013 - * Pavel Boldin, Emcraft Systems, pabol...@emcraft.com - * - * (C) Copyright 2015 - * Kamil Lulko, - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#ifndef _MACH_FMC_H_ -#define _MACH_FMC_H_ - -struct stm32_fmc_regs { - u32 sdcr1; /* Control register 1 */ - u32 sdcr2; /* Control register 2 */ - u32 sdtr1; /* Timing register 1 */ - u32 sdtr2; /* Timing register 2 */ - u32 sdcmr; /* Mode register */ - u32 sdrtr; /* Refresh timing register */ - u32 sdsr; /* Status register */ -}; - -/* - * FMC registers base - */ -#define STM32_SDRAM_FMC_BASE 0xA140 -#define STM32_SDRAM_FMC((struct stm32_fmc_regs *)STM32_SDRAM_FMC_BASE) - -/* Control register SDCR */ -#define FMC_SDCR_RPIPE_SHIFT 13 /* RPIPE bit shift */ -#define FMC_SDCR_RBURST_SHIFT 12 /* RBURST bit shift */ -#define FMC_SDCR_SDCLK_SHIFT 10 /* SDRAM clock divisor shift */ -#define FMC_SDCR_WP_SHIFT 9 /* Write protection shift */ -#define FMC_SDCR_CAS_SHIFT 7 /* CAS latency shift */ -#define FMC_SDCR_NB_SHIFT 6 /* Number of banks shift */ -#define FMC_SDCR_MWID_SHIFT4 /* Memory width shift */ -#define FMC_SDCR_NR_SHIFT 2 /* Number of row address bits shift */ -#define FMC_SDCR_NC_SHIFT 0 /* Number of col address bits shift */ - -/* Timings register SDTR */ -#define FMC_SDTR_TMRD_SHIFT0 /* Load mode register to active */ -#define FMC_SDTR_TXSR_SHIFT4 /* Exit self-refresh time */ -#define FMC_SDTR_TRAS_SHIFT8 /* Self-refresh time */ -#define FMC_SDTR_TRC_SHIFT 12 /* Row cycle delay */ -#define FMC_SDTR_TWR_SHIFT 16 /* Recovery delay */ -#define FMC_SDTR_TRP_SHIFT 20 /* Row precharge delay */ -#define FMC_SDTR_TRCD_SHIFT24 /* Row-to-column delay */ - - -#define FMC_SDCMR_NRFS_SHIFT 5 - -#define FMC_SDCMR_MODE_NORMAL 0 -#define FMC_SDCMR_MODE_START_CLOCK 1 -#define FMC_SDCMR_MODE_PRECHARGE 2 -#define FMC_SDCMR_MODE_AUTOREFRESH 3 -#define FMC_SDCMR_MODE_WRITE_MODE 4 -#define FMC_SDCMR_MODE_SELFREFRESH 5 -#define FMC_SDCMR_MODE_POWERDOWN 6 - -#define FMC_SDCMR_BANK_1 (1 << 4) -#define FMC_SDCMR_BANK_2 (1 << 3) - -#define FMC_SDCMR_MODE_REGISTER_SHIFT 9 - -#define FMC_SDSR_BUSY (1 << 5) - -#define FMC_BUSY_WAIT()do { \ - __asm__ __volatile__ ("dsb" : : : "memory"); \ - while (STM32_SDRAM_FMC->sdsr & FMC_SDSR_BUSY) \ - ; \ - } while (0) - - -#endif /* _MACH_FMC_H_ */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 2/5] arch-stm32: Move gpio.h for STM32 SoCs in include/asm/
From: Patrice Chotard Instead to have 3 identical gpio.h for all STM32 SoCs, migrate them in one file in include/asm. Signed-off-by: Patrice Chotard --- v2: _ create arch/arm/include/asm/arch-stm32 directory and move gpio.h in it. arch/arm/include/asm/arch-stm32/gpio.h | 115 arch/arm/include/asm/arch-stm32f4/gpio.h | 146 +-- arch/arm/include/asm/arch-stm32f7/gpio.h | 115 +--- arch/arm/include/asm/arch-stm32h7/gpio.h | 115 +--- 4 files changed, 118 insertions(+), 373 deletions(-) create mode 100644 arch/arm/include/asm/arch-stm32/gpio.h diff --git a/arch/arm/include/asm/arch-stm32/gpio.h b/arch/arm/include/asm/arch-stm32/gpio.h new file mode 100644 index ..d24e8096acfe --- /dev/null +++ b/arch/arm/include/asm/arch-stm32/gpio.h @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2016, STMicroelectronics - All Rights Reserved + * Author(s): Vikas Manocha, for STMicroelectronics. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef _GPIO_H_ +#define _GPIO_H_ + +enum stm32_gpio_port { + STM32_GPIO_PORT_A = 0, + STM32_GPIO_PORT_B, + STM32_GPIO_PORT_C, + STM32_GPIO_PORT_D, + STM32_GPIO_PORT_E, + STM32_GPIO_PORT_F, + STM32_GPIO_PORT_G, + STM32_GPIO_PORT_H, + STM32_GPIO_PORT_I +}; + +enum stm32_gpio_pin { + STM32_GPIO_PIN_0 = 0, + STM32_GPIO_PIN_1, + STM32_GPIO_PIN_2, + STM32_GPIO_PIN_3, + STM32_GPIO_PIN_4, + STM32_GPIO_PIN_5, + STM32_GPIO_PIN_6, + STM32_GPIO_PIN_7, + STM32_GPIO_PIN_8, + STM32_GPIO_PIN_9, + STM32_GPIO_PIN_10, + STM32_GPIO_PIN_11, + STM32_GPIO_PIN_12, + STM32_GPIO_PIN_13, + STM32_GPIO_PIN_14, + STM32_GPIO_PIN_15 +}; + +enum stm32_gpio_mode { + STM32_GPIO_MODE_IN = 0, + STM32_GPIO_MODE_OUT, + STM32_GPIO_MODE_AF, + STM32_GPIO_MODE_AN +}; + +enum stm32_gpio_otype { + STM32_GPIO_OTYPE_PP = 0, + STM32_GPIO_OTYPE_OD +}; + +enum stm32_gpio_speed { + STM32_GPIO_SPEED_2M = 0, + STM32_GPIO_SPEED_25M, + STM32_GPIO_SPEED_50M, + STM32_GPIO_SPEED_100M +}; + +enum stm32_gpio_pupd { + STM32_GPIO_PUPD_NO = 0, + STM32_GPIO_PUPD_UP, + STM32_GPIO_PUPD_DOWN +}; + +enum stm32_gpio_af { + STM32_GPIO_AF0 = 0, + STM32_GPIO_AF1, + STM32_GPIO_AF2, + STM32_GPIO_AF3, + STM32_GPIO_AF4, + STM32_GPIO_AF5, + STM32_GPIO_AF6, + STM32_GPIO_AF7, + STM32_GPIO_AF8, + STM32_GPIO_AF9, + STM32_GPIO_AF10, + STM32_GPIO_AF11, + STM32_GPIO_AF12, + STM32_GPIO_AF13, + STM32_GPIO_AF14, + STM32_GPIO_AF15 +}; + +struct stm32_gpio_dsc { + enum stm32_gpio_portport; + enum stm32_gpio_pin pin; +}; + +struct stm32_gpio_ctl { + enum stm32_gpio_modemode; + enum stm32_gpio_otype otype; + enum stm32_gpio_speed speed; + enum stm32_gpio_pupdpupd; + enum stm32_gpio_af af; +}; + +struct stm32_gpio_regs { + u32 moder; /* GPIO port mode */ + u32 otyper; /* GPIO port output type */ + u32 ospeedr;/* GPIO port output speed */ + u32 pupdr; /* GPIO port pull-up/pull-down */ + u32 idr;/* GPIO port input data */ + u32 odr;/* GPIO port output data */ + u32 bsrr; /* GPIO port bit set/reset */ + u32 lckr; /* GPIO port configuration lock */ + u32 afr[2]; /* GPIO alternate function */ +}; + +struct stm32_gpio_priv { + struct stm32_gpio_regs *regs; +}; + +#endif /* _GPIO_H_ */ diff --git a/arch/arm/include/asm/arch-stm32f4/gpio.h b/arch/arm/include/asm/arch-stm32f4/gpio.h index 6173fa13..16cdf25a83f9 100644 --- a/arch/arm/include/asm/arch-stm32f4/gpio.h +++ b/arch/arm/include/asm/arch-stm32f4/gpio.h @@ -11,150 +11,6 @@ #ifndef _STM32_GPIO_H_ #define _STM32_GPIO_H_ -#if (CONFIG_STM32_USART == 1) -#define STM32_GPIO_PORT_X STM32_GPIO_PORT_A -#define STM32_GPIO_PIN_TX STM32_GPIO_PIN_9 -#define STM32_GPIO_PIN_RX STM32_GPIO_PIN_10 -#define STM32_GPIO_USARTSTM32_GPIO_AF7 - -#elif (CONFIG_STM32_USART == 2) -#define STM32_GPIO_PORT_X STM32_GPIO_PORT_D -#define STM32_GPIO_PIN_TX STM32_GPIO_PIN_5 -#define STM32_GPIO_PIN_RX STM32_GPIO_PIN_6 -#define STM32_GPIO_USARTSTM32_GPIO_AF7 - -#elif (CONFIG_STM32_USART == 3) -#define STM32_GPIO_PORT_X STM32_GPIO_PORT_C -#define STM32_GPIO_PIN_TX STM32_GPIO_PIN_10 -#define STM32_GPIO_PIN_RX STM32_GPIO_PIN_11 -#define STM32_GPIO_USARTSTM32_GPIO_AF7 - -#elif (CONFIG_STM32_USART == 6) -#define STM32_GPIO_PORT_X STM32_GPIO_PORT_G -#define STM32_GPIO_PIN_TX STM32_GPIO_PIN_14 -#define STM32_GPIO_PIN_RX STM32_GPIO_PIN_9 -#define STM32_GPIO_USARTSTM32_GPIO_AF8 - -#else -#define STM32_GPIO_PORT_X STM32_GPIO_PORT_A -#define STM32_GPIO_PIN_TX STM32_GPIO_PIN_9 -#define STM32_GPIO_PIN_RX STM32_
[U-Boot] [PATCH v2 0/5] STM32: Clean unused and factorize .h files in arch-stm32
From: Patrice Chotard Removes unused .h files in arch/arm/include/asm/arch-stm32xx Factorize and clean some .h files to avoid to duplicate defines in separate .h files V2: _ create arch/arm/include/asm/arch-stm32 directory and move gpio.h and stm32f.h in it. Patrice Chotard (5): arch-stm32f4: Remove fmc.h file arch-stm32: Move gpio.h for STM32 SoCs in include/asm/ arch-stm32: Factorize stm32.h for STM32F4 and F7 arch-stm32: Remove stm32_periph.h arch-stm32: Clean arch-stm32f7/syscfg.h arch/arm/include/asm/arch-stm32/gpio.h | 115 ++ arch/arm/include/asm/arch-stm32/stm32f.h | 22 arch/arm/include/asm/arch-stm32f4/fmc.h | 75 arch/arm/include/asm/arch-stm32f4/gpio.h | 146 +-- arch/arm/include/asm/arch-stm32f4/stm32.h| 14 +-- arch/arm/include/asm/arch-stm32f4/stm32_periph.h | 38 -- arch/arm/include/asm/arch-stm32f7/gpio.h | 115 +- arch/arm/include/asm/arch-stm32f7/stm32.h| 45 +-- arch/arm/include/asm/arch-stm32f7/stm32_periph.h | 23 arch/arm/include/asm/arch-stm32f7/syscfg.h | 9 -- arch/arm/include/asm/arch-stm32h7/gpio.h | 115 +- board/st/stm32f746-disco/stm32f746-disco.c | 1 - drivers/mtd/stm32_flash.c| 2 +- 13 files changed, 144 insertions(+), 576 deletions(-) create mode 100644 arch/arm/include/asm/arch-stm32/gpio.h create mode 100644 arch/arm/include/asm/arch-stm32/stm32f.h delete mode 100644 arch/arm/include/asm/arch-stm32f4/fmc.h delete mode 100644 arch/arm/include/asm/arch-stm32f4/stm32_periph.h delete mode 100644 arch/arm/include/asm/arch-stm32f7/stm32_periph.h -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/7] sunxi: sun8i-emac: Update DT bindings
On Fri, Feb 9, 2018 at 7:00 AM, Andre Przywara wrote: > Compared to the last post, this converts U-Boot's DTs over to use the > new binding, so that the final patch can remove support for the old > binding from U-Boot EMAC driver. > The Linux DTs can be synced in later once we solved the size problem. > > > The existing sun8i-emac driver in U-Boot uses some preliminary bindings, > which matched our own DTs. Now that the Linux kernel got a driver, lets > update our probe code to handle those Linux DTs as well. > The first patch adds the missing compatible strings for the pinctrl drivers, > which is needed for using the sunxi_name_to_gpio() lookup function. > Patch 2/7 updates the pinctrl parser used in the sun8i-emac driver, to cope > with the new, generic Allwinner pinctrl bindings. > Patch 3/7 extends the probe routine in the Ethernet driver to deal > with both the old and the new bindings. > Patches 4, 5 and 6 update U-Boot's DTs for boards using the A64, H3 and H5 > SoC, respectively, to actually use the new binding in their EMAC nodes. > This allows the final patch 7/7 to remove the support for the old binding > in the EMAC driver, so we use the proper binding only. > This series allows to copy in the DTs from the latest kernel. Unfortunately > right now updating the DTs for the H5 and A64 breaks the build, as the > resulting binary (which embeds the DT) gets to large and triggers our new > image size check. As the H5 and H3 share most of the DT, we can't just > update the H3 DTs either. Same case with me with USB PHY changes, better to check size by disabling dts changes on H5/A64 if OK, then will move this to next. Once FAT transition done we can take them back - this is what I'm thinking as of now. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Allwinner H5 builds broken in master
On Fri, Feb 9, 2018 at 5:07 PM, Andre Przywara wrote: > Hi, > > while testing the EMAC DT series yesterday, I realised that the current > HEAD fails to build some H5 boards, due to breaking our infamous size limit: > nanopi_neo_plus2: > u-boot.itb exceeds file size limit: > limit: 516096 bytes > actual: 516188 bytes > excess: 92 bytes > orangepi_pc2: > u-boot.itb exceeds file size limit: > limit: 516096 bytes > actual: 516120 bytes > excess: 24 bytes > orangepi_zero_plus2: > u-boot.itb exceeds file size limit: > limit: 516096 bytes > actual: 516560 bytes > excess: 464 bytes Aha, Look like MMC Fat transition increasing the limit, not exactly sure. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Allwinner H5 builds broken in master
Hi, while testing the EMAC DT series yesterday, I realised that the current HEAD fails to build some H5 boards, due to breaking our infamous size limit: nanopi_neo_plus2: u-boot.itb exceeds file size limit: limit: 516096 bytes actual: 516188 bytes excess: 92 bytes orangepi_pc2: u-boot.itb exceeds file size limit: limit: 516096 bytes actual: 516120 bytes excess: 24 bytes orangepi_zero_plus2: u-boot.itb exceeds file size limit: limit: 516096 bytes actual: 516560 bytes excess: 464 bytes As you can see it's not much, but it gets slightly worse with the new EMAC bindings. I will try to shave a KB or so off tonight, but if anyone has ideas meanwhile, I am all ears. Cheers, Andre ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/7] sunxi: gpio: add missing compatible strings
Hi, On 09/02/18 11:21, Jagan Teki wrote: > On Fri, Feb 9, 2018 at 7:00 AM, Andre Przywara wrote: >> The sunxi GPIO driver is missing some compatible strings for recent >> SoCs. While most of the sunxi GPIO code seems to not rely on this (and >> so works anyway), the sunxi_name_to_gpio() function does and fails at >> the moment (for instance when resolving the MMC CD pin name). >> Add the compatible strings for the A64, H5 and V3s, which were missing >> from the list. This now covers all pinctrl nodes in our own DTs. >> >> Signed-off-by: Andre Przywara >> --- >> drivers/gpio/sunxi_gpio.c | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c >> index 3cf01b6e36..90fd7c1596 100644 >> --- a/drivers/gpio/sunxi_gpio.c >> +++ b/drivers/gpio/sunxi_gpio.c >> @@ -354,12 +354,16 @@ static const struct udevice_id sunxi_gpio_ids[] = { >> ID("allwinner,sun8i-a83t-pinctrl", a_all), >> ID("allwinner,sun8i-h3-pinctrl",a_all), >> ID("allwinner,sun8i-r40-pinctrl", a_all), >> + ID("allwinner,sun8i-v3s-pinctrl", a_all), >> ID("allwinner,sun9i-a80-pinctrl", a_all), >> + ID("allwinner,sun50i-a64-pinctrl", a_all), >> + ID("allwinner,sun50i-h5-pinctrl", a_all), > > h5 is already added after sun5i-a13 Ah, indeed, good catch. Thanks for having a look. Cheers, Andre. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/7] sunxi: gpio: add missing compatible strings
On Fri, Feb 9, 2018 at 7:00 AM, Andre Przywara wrote: > The sunxi GPIO driver is missing some compatible strings for recent > SoCs. While most of the sunxi GPIO code seems to not rely on this (and > so works anyway), the sunxi_name_to_gpio() function does and fails at > the moment (for instance when resolving the MMC CD pin name). > Add the compatible strings for the A64, H5 and V3s, which were missing > from the list. This now covers all pinctrl nodes in our own DTs. > > Signed-off-by: Andre Przywara > --- > drivers/gpio/sunxi_gpio.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c > index 3cf01b6e36..90fd7c1596 100644 > --- a/drivers/gpio/sunxi_gpio.c > +++ b/drivers/gpio/sunxi_gpio.c > @@ -354,12 +354,16 @@ static const struct udevice_id sunxi_gpio_ids[] = { > ID("allwinner,sun8i-a83t-pinctrl", a_all), > ID("allwinner,sun8i-h3-pinctrl",a_all), > ID("allwinner,sun8i-r40-pinctrl", a_all), > + ID("allwinner,sun8i-v3s-pinctrl", a_all), > ID("allwinner,sun9i-a80-pinctrl", a_all), > + ID("allwinner,sun50i-a64-pinctrl", a_all), > + ID("allwinner,sun50i-h5-pinctrl", a_all), h5 is already added after sun5i-a13 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 1/2] mmc: Fix bug in sd_set_card_speed()
After settings the speed of the sd with the switch command, a check is done to make sure that the new speed has been set. The current check has a masking error: speed are encoded on 4 bits only. Fix it by masking the upper bits. This fixes a problem seen with QEmu emulating a vexpress-a15. Reported-by: Jonathan Gray Signed-off-by: Jean-Jacques Hiblot --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 255310a..31614dd 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1333,7 +1333,7 @@ static int sd_set_card_speed(struct mmc *mmc, enum bus_mode mode) if (err) return err; - if ((__be32_to_cpu(switch_status[4]) >> 24) != speed) + if (((__be32_to_cpu(switch_status[4]) >> 24) & 0xF) != speed) return -ENOTSUPP; return 0; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 0/2]
This series is about fixing 2 issues: - SD breakage with QEmu / vexpress-a15 - incorrect version identification for MMC above version 4.41 (included) Thanks to Jonathan Gray and eil Eilmsteiner Heribert for reporting them. Jean-Jacques Hiblot (2): mmc: Fix bug in sd_set_card_speed() mmc: fix bug in mmc_startup_v4() drivers/mmc/mmc.c | 3 ++- include/mmc.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 2/2] mmc: fix bug in mmc_startup_v4()
The correspondence between mmc versions as used in u-boot and the version numbers reported in register EXT_CSD_REV is wrong for versions above and including MMC_VERSION_4_41. All those versions were shifted by one: real 4.5 hardware appeared to be MMC_VERSION_5_0. Fix this by adding the missing version in the correspondence table. Reported-by: eil Eilmsteiner Heribert Signed-off-by: Jean-Jacques Hiblot --- drivers/mmc/mmc.c | 1 + include/mmc.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 31614dd..99e2a75 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1950,6 +1950,7 @@ static int mmc_startup_v4(struct mmc *mmc) MMC_VERSION_4_1, MMC_VERSION_4_2, MMC_VERSION_4_3, + MMC_VERSION_4_4, MMC_VERSION_4_41, MMC_VERSION_4_5, MMC_VERSION_5_0, diff --git a/include/mmc.h b/include/mmc.h index a46eaed..86f885b 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -54,6 +54,7 @@ #define MMC_VERSION_4_1MAKE_MMC_VERSION(4, 1, 0) #define MMC_VERSION_4_2MAKE_MMC_VERSION(4, 2, 0) #define MMC_VERSION_4_3MAKE_MMC_VERSION(4, 3, 0) +#define MMC_VERSION_4_4MAKE_MMC_VERSION(4, 4, 0) #define MMC_VERSION_4_41 MAKE_MMC_VERSION(4, 4, 1) #define MMC_VERSION_4_5MAKE_MMC_VERSION(4, 5, 0) #define MMC_VERSION_5_0MAKE_MMC_VERSION(5, 0, 0) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 04/11] sunxi: Add SUNXI_RSB kconfig entry
On Tue, Feb 6, 2018 at 9:19 PM, Maxime Ripard wrote: > Hi, > > On Tue, Feb 06, 2018 at 08:45:21PM +0530, Jagan Teki wrote: >> Add simple and meaningful kconfig option for rsb.c >> instead of using MACH type on Makefile. >> >> Signed-off-by: Jagan Teki >> --- >> arch/arm/mach-sunxi/Kconfig | 10 ++ >> arch/arm/mach-sunxi/Makefile | 3 +-- >> 2 files changed, 11 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig >> index cf999ab..7ab1990 100644 >> --- a/arch/arm/mach-sunxi/Kconfig >> +++ b/arch/arm/mach-sunxi/Kconfig >> @@ -23,6 +23,14 @@ config MFD_SUN6I_PRCM >> Support for the PRCM (Power/Reset/Clock Management) unit available >> in A31 SoC. >> >> +config SUNXI_RSB > > Following the rest of the convention we have, that would be SUN8I_RSB. Followed Linux notation to sync with, where the driver will also have support AC100. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 2/2] pinctrl-uclass: convert to use live dt
> Use live dt interface for pinctrl_select_state_full() > > Signed-off-by: Kever Yang > --- > > Changes in v2: None > > drivers/pinctrl/pinctrl-uclass.c | 20 +--- > 1 file changed, 5 insertions(+), 15 deletions(-) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 4/9] ARM: rockchip: Remove the pinctrl request at rk3288-board-spl
> If we use the new pinctrl driver, the pinctrl setup will be done > by device probe. Remove the pinctrl setup at rk3288-board-spl. > > Signed-off-by: David Wu > --- > > arch/arm/mach-rockchip/rk3288-board-spl.c | 79 > --- > 1 file changed, 79 deletions(-) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 8/9] pinctrl: rockchip: Clean the unused rockchip pinctrl drivers
> If we used the pinctrl-rockchip driver, these code is not needed, > so remove them. > > Signed-off-by: David Wu > --- > > drivers/pinctrl/rockchip/Makefile | 15 - > drivers/pinctrl/rockchip/pinctrl_rk3036.c | 264 - > drivers/pinctrl/rockchip/pinctrl_rk3128.c | 187 --- > drivers/pinctrl/rockchip/pinctrl_rk3188.c | 610 > drivers/pinctrl/rockchip/pinctrl_rk322x.c | 895 > -- > drivers/pinctrl/rockchip/pinctrl_rk3288.c | 870 - > drivers/pinctrl/rockchip/pinctrl_rk3328.c | 708 --- > drivers/pinctrl/rockchip/pinctrl_rk3368.c | 742 - > drivers/pinctrl/rockchip/pinctrl_rk3399.c | 457 --- > drivers/pinctrl/rockchip/pinctrl_rv1108.c | 582 --- > 10 files changed, 5330 deletions(-) > delete mode 100644 drivers/pinctrl/rockchip/Makefile > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3036.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3128.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3188.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk322x.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3288.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3328.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3368.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3399.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rv1108.c > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 9/9] ARM: dts: rk322x: Correct the uart2 default pin configuration
> To match the iomux setting of uart2 at SPL, correct the uart2 > default pin configuration, if not changed, the evb-rk3229 can't > output the log message. > > Signed-off-by: David Wu > --- > > arch/arm/dts/rk322x.dtsi | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 7/9] rockchip: defconfig: Clean the unused pinctrl config
> If we used the pinctrl-rockchip driver, these config is not needed, > so remove them. > > Signed-off-by: David Wu > --- > > configs/chromebit_mickey_defconfig | 2 -- > configs/chromebook_jerry_defconfig | 2 -- > configs/chromebook_minnie_defconfig | 2 -- > configs/evb-px5_defconfig | 1 - > configs/evb-rk3128_defconfig| 1 - > configs/evb-rk3229_defconfig| 1 - > configs/evb-rk3288_defconfig| 2 -- > configs/evb-rk3399_defconfig| 1 - > configs/evb-rv1108_defconfig| 1 - > configs/fennec-rk3288_defconfig | 2 -- > configs/firefly-rk3288_defconfig| 2 -- > configs/firefly-rk3399_defconfig| 1 - > configs/geekbox_defconfig | 1 - > configs/kylin-rk3036_defconfig | 1 - > configs/lion-rk3368_defconfig | 1 - > configs/miqi-rk3288_defconfig | 2 -- > configs/phycore-rk3288_defconfig| 2 -- > configs/popmetal-rk3288_defconfig | 2 -- > configs/puma-rk3399_defconfig | 1 - > configs/rock2_defconfig | 2 -- > configs/rock_defconfig | 1 - > configs/sandbox_defconfig | 2 -- > configs/sandbox_flattree_defconfig | 2 -- > configs/sandbox_noblk_defconfig | 2 -- > configs/sheep-rk3368_defconfig | 1 - > configs/tinker-rk3288_defconfig | 2 -- > configs/vyasa-rk3288_defconfig | 2 -- > 27 files changed, 42 deletions(-) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 3/9] ARM: rockchip: Kconfig: Remove the SPL_PINCTRL for rk3188
> It seems that pinctrl is not requested for rk3188 SPL, remove it so > that can save more space for SPL image size. > > Signed-off-by: David Wu > --- > > arch/arm/mach-rockchip/Kconfig | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 4/9] ARM: rockchip: Remove the pinctrl request at rk3288-board-spl
> If we use the new pinctrl driver, the pinctrl setup will be done > by device probe. Remove the pinctrl setup at rk3288-board-spl. > > Signed-off-by: David Wu > --- > > arch/arm/mach-rockchip/rk3288-board-spl.c | 79 > --- > 1 file changed, 79 deletions(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 1/2] core: add uclass_get_device_by_phandle_id() api
> Add api for who can not get phandle from a device property. > > Signed-off-by: Kever Yang > --- > > Changes in v2: > - use uint instead of int for phandle > - address comment from Philipp > > drivers/core/uclass.c | 26 ++ > include/dm/uclass.h | 16 > 2 files changed, 42 insertions(+) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 8/9] pinctrl: rockchip: Clean the unused rockchip pinctrl drivers
> If we used the pinctrl-rockchip driver, these code is not needed, > so remove them. > > Signed-off-by: David Wu > --- > > drivers/pinctrl/rockchip/Makefile | 15 - > drivers/pinctrl/rockchip/pinctrl_rk3036.c | 264 - > drivers/pinctrl/rockchip/pinctrl_rk3128.c | 187 --- > drivers/pinctrl/rockchip/pinctrl_rk3188.c | 610 > drivers/pinctrl/rockchip/pinctrl_rk322x.c | 895 > -- > drivers/pinctrl/rockchip/pinctrl_rk3288.c | 870 - > drivers/pinctrl/rockchip/pinctrl_rk3328.c | 708 --- > drivers/pinctrl/rockchip/pinctrl_rk3368.c | 742 - > drivers/pinctrl/rockchip/pinctrl_rk3399.c | 457 --- > drivers/pinctrl/rockchip/pinctrl_rv1108.c | 582 --- > 10 files changed, 5330 deletions(-) > delete mode 100644 drivers/pinctrl/rockchip/Makefile > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3036.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3128.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3188.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk322x.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3288.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3328.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3368.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3399.c > delete mode 100644 drivers/pinctrl/rockchip/pinctrl_rv1108.c > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] pwm-backlight: make power-supply as option
> Some pwm backlight may not need 'power-supply', let's make it as option > in pwm-backlight driver. > > Signed-off-by: Kever Yang > --- > > drivers/video/pwm_backlight.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 7/9] rockchip: defconfig: Clean the unused pinctrl config
> If we used the pinctrl-rockchip driver, these config is not needed, > so remove them. > > Signed-off-by: David Wu > --- > > configs/chromebit_mickey_defconfig | 2 -- > configs/chromebook_jerry_defconfig | 2 -- > configs/chromebook_minnie_defconfig | 2 -- > configs/evb-px5_defconfig | 1 - > configs/evb-rk3128_defconfig| 1 - > configs/evb-rk3229_defconfig| 1 - > configs/evb-rk3288_defconfig| 2 -- > configs/evb-rk3399_defconfig| 1 - > configs/evb-rv1108_defconfig| 1 - > configs/fennec-rk3288_defconfig | 2 -- > configs/firefly-rk3288_defconfig| 2 -- > configs/firefly-rk3399_defconfig| 1 - > configs/geekbox_defconfig | 1 - > configs/kylin-rk3036_defconfig | 1 - > configs/lion-rk3368_defconfig | 1 - > configs/miqi-rk3288_defconfig | 2 -- > configs/phycore-rk3288_defconfig| 2 -- > configs/popmetal-rk3288_defconfig | 2 -- > configs/puma-rk3399_defconfig | 1 - > configs/rock2_defconfig | 2 -- > configs/rock_defconfig | 1 - > configs/sandbox_defconfig | 2 -- > configs/sandbox_flattree_defconfig | 2 -- > configs/sandbox_noblk_defconfig | 2 -- > configs/sheep-rk3368_defconfig | 1 - > configs/tinker-rk3288_defconfig | 2 -- > configs/vyasa-rk3288_defconfig | 2 -- > 27 files changed, 42 deletions(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 6/9] pinctrl: rockchip: Add common rockchip pinctrl driver
> Use this driver to fit all Rockchip SOCs and to support > the desired pinctrl configuration via DTS. > > Signed-off-by: David Wu > Reviewed-by: Kever Yang > Tested-by: Kever Yang > --- > > drivers/pinctrl/Kconfig| 98 +- > drivers/pinctrl/Makefile |2 +- > drivers/pinctrl/pinctrl-rockchip.c | 2440 > > 3 files changed, 2454 insertions(+), 86 deletions(-) > create mode 100644 drivers/pinctrl/pinctrl-rockchip.c > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 3/9] ARM: rockchip: Kconfig: Remove the SPL_PINCTRL for rk3188
> It seems that pinctrl is not requested for rk3188 SPL, remove it so > that can save more space for SPL image size. > > Signed-off-by: David Wu > --- > > arch/arm/mach-rockchip/Kconfig | 1 - > 1 file changed, 1 deletion(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 9/9] ARM: dts: rk322x: Correct the uart2 default pin configuration
> To match the iomux setting of uart2 at SPL, correct the uart2 > default pin configuration, if not changed, the evb-rk3229 can't > output the log message. > > Signed-off-by: David Wu > --- > > arch/arm/dts/rk322x.dtsi | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 5/9] rk3288: chrome: defconfig: Disable SPL_OF_PLATDATA for new pinctrl driver
> The fdedesc is requested for new pinctrl driver, disable SPL_OF_PLATDATA > to make fdedesc be built in. > > Signed-off-by: David Wu > --- > > configs/chromebit_mickey_defconfig | 2 -- > configs/chromebook_jerry_defconfig | 2 -- > configs/chromebook_minnie_defconfig | 2 -- > 3 files changed, 6 deletions(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 2/9] ARM: rockchip: rk3188: Remove the pinctrl setup and enable uart at SPL
> When the boot ROM sets up MMC we don't need to do it again. Remove the > MMC setup code entirely, but we also need to enable uart for debug message. > > Signed-off-by: David Wu > --- > > arch/arm/mach-rockchip/rk3188-board-spl.c | 42 > +++ > 1 file changed, 3 insertions(+), 39 deletions(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/9] rockchip: rk3399-evb: defconfig: Disable SPL_OF_PLATDATA for new pinctrl driver
> The fdedesc is requested for new pinctrl driver, disable SPL_OF_PLATDATA > to make fdedesc be built in. > > Signed-off-by: David Wu > --- > > configs/evb-rk3399_defconfig | 1 - > 1 file changed, 1 deletion(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/9] mmc: reworked version lookup in mmc_startup_v4
On 02/09/2018 07:00 PM, Jean-Jacques Hiblot wrote: > Hi Heribert, > > you're right I messed up with the indexes. Thanks for catching it. > > Next time you find something, please reply to all. It will help the > maintainer, in this case Jaehoon. > > > Jaheoon, > > The problem is that a version is missing in the table mmc_versions[] and it > results in a shift of the indexes for all versions above or equal to > MMC_VERSION_4_41. > > I'll send a patch that fixes it this way: If you send a patch, then i will apply it. Best Regards, Jaehoon Chung > > static const u32 mmc_versions[] = { > MMC_VERSION_4, > MMC_VERSION_4_1, > MMC_VERSION_4_2, > MMC_VERSION_4_3, > > + MMC_VERSION_4_4, > > MMC_VERSION_4_41, > MMC_VERSION_4_5, > MMC_VERSION_5_0, > MMC_VERSION_5_1 > }; > > JJ > > > > > On 09/02/2018 08:06, eil Eilmsteiner Heribert wrote: >> Hello Jean-Jacques >> >> I have problems with your patch for u-boot. I lacks a table-entry for "4", >> so every mmc higher than version 4.3 report a version "off by 1" >> The range check is also "off by 1", (it should be a >=), so (as in my case) >> MMC version 5.1 reports OK and complete nonsense (in my case this was lower >> than version 4.0 so it didn't work). >> >> if (ext_csd[EXT_CSD_REV] >= ARRAY_SIZE(mmc_versions)) >> return -EINVAL; >> >> Freundliche Grüße/Best regards >> Heribert Eilmsteiner >> Senior Software Engineer >> Development Center >> >> KEBA AG >> A-4041 Linz, Austria >> Gewerbepark Urfahr >> Phone: +43 732 7090-27423 >> Fax: +43 732 7090-61711 >> Firmenbuchgericht Linz FN 184376 t >> mailto:e...@keba.com >> http://www.keba.com >> >> >> >> >> > > > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/25] Fix and extend i.MX HAB layer
On 09/02/18 07:27, Jagan Teki wrote: On Thu, Feb 8, 2018 at 9:47 PM, Bryan O'Donoghue wrote: I'm observing authentication issue while loading U-Boot proper, U-Boot proper now have features like SPL DM and SPL FIT etc U-Boot SPL 2018.03-rc1-00182-gb81f7c9 (Feb 08 2018 - 17:19:03 +0530) Trying to boot from MMC1 Expected Linux image is not found. Trying to start U-boot Authenticate image from DDR location 0x1780... bad magic magic=0xb8 length=0x841b version=0x17 bad length magic=0xb8 length=0x841b version=0x17 bad version magic=0xb8 length=0x841b version=0x17 spl: ERROR: image authentication unsuccessful ### ERROR ### Please RESET the board ### Please let me know where I missed, I'm authenticating SPL and u-boot-dtb.img now. Can you please check if the generated u-boot-dtb.img contains a IVT table appended in the end of the image? The mx6slevk_spl_defconfig target also generates SPL + u-boot-dtb.img but I have to use the u-boot-ivt.img binary instead. In my case u-boot-dtb.img does not includes a IVT table. Best Regards, Breno Lima At a guess I'd say it's the fix we did for hab_auth_img - I guess Jagan you have an out-of-tree implementation here ? Basically I'm trying to compare this with implementation before, look like issue is IVT image signature is missing for when CONFIG_SPL_LOAD_FIT defined. It's working without SPL_LOAD_FIT. If you have a command in your environment that looks like this hab_auth_img 0x1780 0x1 that should now be hab_auth_img 0x1780 0x1 0xF400 assuming the CSF footer is aprox 0xC00 bytes padded. git show c5800b2 arm: imx: hab: Fix authenticate_image input parameters 1: Adding a new parameter to hab_auth_img - addr : image hex address - length : total length of the image - offset : offset of IVT from addr I've created u-boot-ivt.image which we did in previous releases[2] and padded 0x2000 to CSF to align the size of CONFIG_CSF_SIZE Image Name: U-Boot 2018.03-rc1-00182-gb81f7c Created: Fri Feb 9 11:00:05 2018 Image Type: ARM U-Boot Firmware with HABv4 IVT (uncompressed) Data Size:360384 Bytes = 351.94 KiB = 0.34 MiB Load Address: 1780 Entry Point: HAB Blocks: 0x177fffc0 0x 0x00056020 icorem6qdl-rqs> hab_auth_img 0x177fffc0 0x58020 0x56020 Authenticate image from DDR location 0x177fffc0... bad magic magic=0xd4 length=0x5000 version=0x41 bad length magic=0xd4 length=0x5000 version=0x41 [2] https://openedev.amarulasolutions.com/display/ODUBOOT/i.MX6+HABv4#i.MX6HABv4-SignedBoot-Usage Ah... is that diagram accurate ? You are perpending the IVT to your image header In which case your command should be icorem6qdl-rqs> hab_auth_img 0x177fffc0 0x58020 0 Incidentially you are pointed at the CSF there not the IVT. High Assurance Boot Version 4 Application Programming Interface Reference Manual section 6.2 tag = 0xD4 => CSF tag = 0xD1 => IVT --- bod ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/9] mmc: reworked version lookup in mmc_startup_v4
Hi Heribert, you're right I messed up with the indexes. Thanks for catching it. Next time you find something, please reply to all. It will help the maintainer, in this case Jaehoon. Jaheoon, The problem is that a version is missing in the table mmc_versions[] and it results in a shift of the indexes for all versions above or equal to MMC_VERSION_4_41. I'll send a patch that fixes it this way: static const u32 mmc_versions[] = { MMC_VERSION_4, MMC_VERSION_4_1, MMC_VERSION_4_2, MMC_VERSION_4_3, + MMC_VERSION_4_4, MMC_VERSION_4_41, MMC_VERSION_4_5, MMC_VERSION_5_0, MMC_VERSION_5_1 }; JJ On 09/02/2018 08:06, eil Eilmsteiner Heribert wrote: Hello Jean-Jacques I have problems with your patch for u-boot. I lacks a table-entry for "4", so every mmc higher than version 4.3 report a version "off by 1" The range check is also "off by 1", (it should be a >=), so (as in my case) MMC version 5.1 reports OK and complete nonsense (in my case this was lower than version 4.0 so it didn't work). if (ext_csd[EXT_CSD_REV] >= ARRAY_SIZE(mmc_versions)) return -EINVAL; Freundliche Grüße/Best regards Heribert Eilmsteiner Senior Software Engineer Development Center KEBA AG A-4041 Linz, Austria Gewerbepark Urfahr Phone: +43 732 7090-27423 Fax:+43 732 7090-61711 Firmenbuchgericht Linz FN 184376 t mailto:e...@keba.com http://www.keba.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/5] arch-stm32: Move gpio.h for STM32 SoCs in include/asm/
Hi Vikas On 02/08/2018 11:19 PM, Vikas Manocha wrote: > Hi Patrice, > > On 02/08/2018 05:35 AM, Patrice CHOTARD wrote: >> Hi Vikas >> >> On 02/07/2018 08:28 PM, Vikas Manocha wrote: >>> Hi Patrice, >>> >>> On 02/07/2018 07:50 AM, patrice.chot...@st.com wrote: From: Patrice Chotard Instead to have 3 identical gpio.h for all STM32 SoCs, migrate them in one file in include/asm. >>> >>> good move to consolidate these headers. >>> One comment below. >>> Signed-off-by: Patrice Chotard >> >> [...] >> -static inline unsigned stm32_gpio_to_pin(unsigned gpio) -{ - return gpio % 16; -} +#include >>> >>> Hmm.. this header seems like dummy header(in all architectures f4/f7/h7) >>> only to include gpio header here. >>> Also arch/arm/include/asm/ does not seems like good place for soc specific >>> header files. >> >> Agree, but omap have put several omap_.h files too. > > I see omap files, they might be first ones to use this structure, i am not > sure. But in any case, it does not look clean today. > How about creating asm/arch-stm32 to put common stuff like this gpio header. > > -#include > +#include > > It can be done with no modification required in SYS_SOC, the point you > mentioned below. > It does not remove the arch-stm32f7/f7/h7/ gpio headers but avoids > include/asm cluttering with SOC files. Yes agree, i will send a v2 with this update Thanks Vikas ;-) Patrice > > Cheers, > Vikas > >> >>> >>> how about creating one level like arch/arm/include/asm/arch-stm32/ to >>> include common gpio.h here. It would fix both of above points. >>> The same location can be used to move other commonalities in future. >> >> It's possible to create an additionnal level >> arch/arm/include/asm/arch-stm32/ and put specificities to each SoCs into : >> >> arch/arm/include/asm/arch-stm32/stm32f4 >> arch/arm/include/asm/arch-stm32/stm32f7 >> arch/arm/include/asm/arch-stm32/stm32h7 >> >> If we focus on stm32f7, this implies to modify the content of >> CONFIG_SYS_SOC from "stm32f7" to "stm32/stm32f7" in >> board/st/stm32f746-disco/Kconfig but: >> >> 1) In any case, we can't include directly files located in >> arch/arm/include/asm/arch-stm32 because SYS_SOC is used to build include >> path. >> >> For example in drivers/gpio/gpio-uclass.c, >> #include is in fact #include /gpio.h >> >> so equal to #include > >> 2) Other effect, now in "soc" environment variable, we will obtain >> "stm32/stm32f7" instead of "stm32f7". This is not a big deal, but we >> must add some code to extract the soc name from "soc" environment variable. >> >> Both solution are not perfect. >> >> Thanks >> >> Patrice >> >> >>> >>> Cheers, >>> Vikas ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 11/18] efi_loader: make efi_disk_create_partitions a global symbol
On Fri, Feb 09, 2018 at 05:07:52AM +0100, Heinrich Schuchardt wrote: > On 02/09/2018 01:15 AM, Jonathan Gray wrote: > > On Fri, Jan 19, 2018 at 08:24:47PM +0100, Heinrich Schuchardt wrote: > > > Up to now we have been using efi_disk_create_partitions() to create > > > partitions for block devices that existed before starting an EFI > > > application. > > > > > > We need to call it for block devices created by EFI > > > applications at run time. The EFI application will define the > > > handle for the block device and install a device path protocol > > > on it. We have to use this device path as stem for the partition > > > device paths. > > > > > > Signed-off-by: Heinrich Schuchardt > > > --- > > > v3 > > > fix typos in comments > > > v2 > > > no change > > > > breakage on mx6cuboxi with OpenBSD bootarm.efi, bisects to > > > > commit 64e4db0f119151a1345e1da19d152eda550394e7 > > Author: Heinrich Schuchardt > > AuthorDate: Fri Jan 19 20:24:47 2018 +0100 > > Commit: Alexander Graf > > CommitDate: Mon Jan 22 23:09:14 2018 +0100 > > > > efi_loader: make efi_disk_create_partitions a global symbol > > Up to now we have been using efi_disk_create_partitions() to create > > partitions for block devices that existed before starting an EFI > > application. > > We need to call it for block devices created by EFI > > applications at run time. The EFI application will define the > > handle for the block device and install a device path protocol > > on it. We have to use this device path as stem for the partition > > device paths. > > Signed-off-by: Heinrich Schuchardt > > Signed-off-by: Alexander Graf > > > > with master as of e24bd1e79e223aa89854c0be95a53e2d538144a5 > > > > U-Boot SPL 2018.03-rc1-00185-g1e19c70639 (Feb 09 2018 - 11:43:18 +1300) > > Trying to boot from MMC1 > > > > > > U-Boot 2018.03-rc1-00185-g1e19c70639 (Feb 09 2018 - 11:43:18 +1300) > > > > CPU: Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz) > > CPU: Extended Commercial temperature grade (-20C to 105C) at 24C > > Reset cause: POR > > Board: MX6 Cubox-i > > DRAM: 2 GiB > > MMC: FSL_SDHC: 0 > > Loading Environment from MMC... OK > > No panel detected: default to HDMI > > Display: HDMI (1024x768) > > In:serial > > Out: serial > > Err: serial > > Net: FEC > > Hit any key to stop autoboot: 0 > > switch to partitions #0, OK > > mmc0 is current device > > Scanning mmc 0:1... > > 37503 bytes read in 17 ms (2.1 MiB/s) > > Found EFI removable media binary efi/boot/bootarm.efi > > Scanning disks on usb... > > 76528 bytes read in 31 ms (2.4 MiB/s) > > ## Starting EFI application at 1200 ... > > BS->LocateHandle() returns -2147483634 > > -2147483634 == EFI_NOT_FOUND > > Without debug output it is impossible to understand what is going wrong. > Please, insert > > #define DEBUG 1 > > at the top of lib/efi_loader/efi_boottime.c > > I assume you are again trying to boot OpenBSD. > > Does this image reproduce the error: > https://ftp.eu.openbsd.org/pub/OpenBSD/6.2/armv7/miniroot-cubox-62.fs > > Otherwise provide a disk image that can be used for testing. > > I only have a Wandboard Quad. But that has the same i.MX6Q processor. So > once I know which image to use I could run a test. > > Best regards > > Heinrich > Hi, you could try this: http://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/armv7/miniroot-wandboard-62.fs -Artturi > > undefined instruction > > pc : [<8e560348>] lr : [<8e56444c>] > > reloc pc : [<15de4348>]lr : [<15de844c>] > > sp : 8f57af10 ip : 8ffc2474 fp : 8f57af1c > > r10: b000 r9 : 8f57bee0 r8 : 000b > > r7 : 8ffa1a9d r6 : 8ffa16ad r5 : 8e56f0d0 r4 : 8e56e88a > > r3 : 8e56dac8 r2 : 0001 r1 : r0 : > > Flags: nZCv IRQs off FIQs off Mode SVC_32 > > Resetting CPU ... > > > > resetting ... > > > > (undefined instruction is used to reset as efi reset was not > > present in earlier U-Boot versions). > > > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] armv8: sec_firmware: Remove JR3 from device tree node in all cases
JR3 was getting removed from device tree only if random number generation was successful. However, if SEC firmware is present,JR3 should be removed from device tree node irrespective of the random seed generation as SEC firmware reserves it for it's use. Not removing it in case of random number generation failure causes the kernel to crash. Random number generation was being called twice. This is not required. If SEC firmware is running, SIP call can be made to the SEC firmware to get the random number. This call itself would return failure if function is not supported. Duplicate calling of random number generation function has been removed Signed-off-by: Ruchika Gupta --- arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 4 ++-- arch/arm/cpu/armv8/sec_firmware.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c index 80af318..6a19f4d 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c @@ -415,8 +415,8 @@ void ft_cpu_setup(void *blob, bd_t *bd) ccsr_sec_t __iomem *sec; #ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT - if (fdt_fixup_kaslr(blob)) - fdt_fixup_remove_jr(blob); + fdt_fixup_remove_jr(blob); + fdt_fixup_kaslr(blob); #endif sec = (void __iomem *)CONFIG_SYS_FSL_SEC_ADDR; diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c index b56ea78..ebf41b5 100644 --- a/arch/arm/cpu/armv8/sec_firmware.c +++ b/arch/arm/cpu/armv8/sec_firmware.c @@ -320,7 +320,6 @@ bool sec_firmware_support_hwrng(void) { uint8_t rand[8]; if (sec_firmware_addr & SEC_FIRMWARE_RUNNING) { - if (!sec_firmware_get_random(rand, 8)) return true; } @@ -429,8 +428,10 @@ int fdt_fixup_kaslr(void *fdt) #if defined(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) /* Check if random seed generation is supported */ - if (sec_firmware_support_hwrng() == false) + if (sec_firmware_support_hwrng() == false) { + printf("WARNING: SEC firmware not running, no kaslr-seed\n"); return 0; + } ret = sec_firmware_get_random(rand, 8); if (ret < 0) { -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot