Re: [U-Boot] [RFC PATCH] net: gem: Add support for more PHYs on MDIO bus
On 6.2.2018 22:11, Joe Hershberger wrote: > On Mon, Feb 5, 2018 at 1:17 AM, Michal Simekwrote: >> Hi Joe, >> >> On 2.2.2018 20:35, Joe Hershberger wrote: >>> Hi Michal, >>> >>> On Thu, Feb 1, 2018 at 6:42 AM, Michal Simek >>> wrote: Find out MDIO bus and enable MDIO access to it if this is done via different controller. Signed-off-by: Michal Simek --- Hi Joe, this is the code I have hacked a year ago for ZynqMP where we can have configuration that 4 gems are enabled but they share the same MDIO bus which can be assigned to only gem. Normally recommendation is that you should assign it to IP which is required for boot and this is suitable I would say for almost everybody. But for testing purpose it will be good to support sharing mdio bus between others IPs. This hack is "enabling" this for others gem but not across different ethernet drivers. >>> >>> Seems practical. >>> And my question is if there is any solution which can be used now for handling it. Or even this should work even now but we do something wrong. >>> >>> I would envision some DM way to model the NIC, the MDIO bus, and the >>> PHY separately. The big roadblock is that the DTS format is different >>> for every NIC. >> >> Is it really that different? There should be phy handle which is >> pointing to actual phy and that should be enough to recognize parents >> and IP responsible for MDIO bus. > > The point is different drivers express the relationship with varying > levels of implication, so there are a number of ways people describe > it. ok. > I am refreshing this topic based on communication with Tomasz Gorochowik when he wanted to separate mdio part but it is not compatible with solution used in Linux which is pattern we should follow. >>> >>> We do the same thing on our 7020 products. >> >> What exactly are you doing on 7020? > > We are using a single MDIO interface to connect the PHYs for 2 GEMs. And I expect you are using only one interface for boot right? M ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Kconfig: Select networking commands only when NET is enabled
Hi Lokesh, On 6.2.2018 13:28, Michal Simek wrote: > There is no reason to unconditially select network commands as distro > defaults without networking enable. > > Signed-off-by: Michal Simek> --- > > Changes in v2: > - Use if NET instead of imply (suggested by Tom) > - Change patch subject and description > > Kconfig | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/Kconfig b/Kconfig > index f713c6a9b188..166e7841b11f 100644 > --- a/Kconfig > +++ b/Kconfig > @@ -69,14 +69,14 @@ config DISTRO_DEFAULTS > imply USE_BOOTCOMMAND > select CMD_BOOTZ if ARM && !ARM64 > select CMD_BOOTI if ARM64 > - select CMD_DHCP > - select CMD_PXE > + select CMD_DHCP if NET > + select CMD_PXE if NET > select CMD_EXT2 > select CMD_EXT4 > select CMD_FAT > select CMD_FS_GENERIC > - select CMD_MII > - select CMD_PING > + select CMD_MII if NET > + select CMD_PING if NET > select CMD_PART > select HUSH_PARSER > help > Based on https://travis-ci.org/michalsimek/u-boot/jobs/338051973 Lokesh: There is an issue with omap4_sdp4430_defconfig where CONFIG_NET is not enabled but PXE and DHCP configs are present. This is quite weird and IMHO CONFIG_NET should be enabled for this target. This can be one resolution. diff --git a/configs/omap4_sdp4430_defconfig b/configs/omap4_sdp4430_defconfig index ac495710633c..59526fd1dc35 100644 --- a/configs/omap4_sdp4430_defconfig +++ b/configs/omap4_sdp4430_defconfig @@ -23,7 +23,10 @@ CONFIG_CMD_SPI=y # CONFIG_CMD_NET is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_EXT4_WRITE=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SPL_PARTITION_UUIDS=y CONFIG_ENV_IS_IN_MMC=y +CONFIG_NET=y CONFIG_MMC_OMAP_HS=y CONFIG_SYS_NS16550=y CONFIG_OMAP3_SPI=y @@ -31,4 +34,6 @@ CONFIG_USB=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y CONFIG_FAT_WRITE=y +# CONFIG_REGEX is not set CONFIG_OF_LIBFDT=y +# CONFIG_EFI_LOADER is not set Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/2] Enable test case with A20-OLinuXino-Lime2
On Wed, Feb 7, 2018 at 12:35 PM, Stefan Mavrodievwrote: > On 02/07/2018 08:39 AM, Jagan Teki wrote: >> >> On Wed, Feb 7, 2018 at 12:00 PM, Stefan Mavrodiev >> wrote: >>> >>> On 02/06/2018 06:48 PM, Jagan Teki wrote: On Tue, Feb 6, 2018 at 6:44 PM, Stefan Mavrodiev wrote: > > Driver testing is done with A20-OLinuXino-Lime2. Testing > requirements are: > - Exposing spi0 alternative pins in the dts file > - Add alias node, enabling driver probing > - Add flash sub-node of spi > - Enable spi flash related options in the defconfig file > > The testing log is: > > U-Boot SPL 2018.03-rc1-00075-g35a689a-dirty (Feb 06 2018 - 14:40:07 > +0200) > DRAM: 1024 MiB > CPU: 91200Hz, AXI/AHB/APB: 3/2/2 > Trying to boot from FEL Why FEL? can't it boot from SPI-FLASH? >>> >>> Because I previously erased the flash during testing. Here is same, >>> booting >>> from SPI: >>> >>>U-Boot SPL 2018.03-rc1-00075-g61ce225 (Feb 07 2018 - 08:21:07 +0200) >>>DRAM: 1024 MiB >>>CPU: 91200Hz, AXI/AHB/APB: 3/2/2 >>>Trying to boot from sunxi SPI >>> >>> >>>U-Boot 2018.03-rc1-00075-g61ce225 (Feb 07 2018 - 08:21:07 +0200) >>> Allwinner >>> Technology >>> >>> >>>CPU: Allwinner A20 (SUN7I) >>>Model: Olimex A20-OLinuXino-LIME2 >>>I2C: ready >>>DRAM: 1 GiB >>>MMC: SUNXI SD/MMC: 0 >>>Loading Environment from SPI Flash... SF: Detected w25q128bv with page >>> size 256 Bytes, erase size 4 KiB, total 16 MiB >>>OK >>>In:serial >>>Out: serial >>>Err: serial >>>Allwinner mUSB OTG (Peripheral) >>>SCSI: SATA link 0 timeout. >>>AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode >>>flags: ncq stag pm led clo only pmp pio slum part ccc apst >>>Net: No ethernet found. >>>starting USB... >>>USB0: USB EHCI 1.00 >>>USB1: USB OHCI 1.0 >>>USB2: USB EHCI 1.00 >>>USB3: USB OHCI 1.0 >>>scanning bus 0 for devices... 1 USB Device(s) found >>>scanning bus 2 for devices... 1 USB Device(s) found >>> scanning usb for storage devices... 0 Storage Device(s) found >>>Hit any key to stop autoboot: > U-Boot 2018.03-rc1-00075-g35a689a-dirty (Feb 06 2018 - 14:40:07 > +0200) > Allwinner Technology > > CPU: Allwinner A20 (SUN7I) > Model: Olimex A20-OLinuXino-LIME2 > I2C: ready > DRAM: 1 GiB > MMC: SUNXI SD/MMC: 0 > Loading Environment from SPI Flash... SF: Detected w25q128bv with > page > size 256 Bytes, erase size 4 KiB, total 16 MiB > OK > In:serial > Out: serial > Err: serial > Allwinner mUSB OTG (Peripheral) > SCSI: SATA link 0 timeout. > AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode > flags: ncq stag pm led clo only pmp pio slum part ccc apst > Net: No ethernet found. > starting USB... > USB0: USB EHCI 1.00 > USB1: USB OHCI 1.0 > USB2: USB EHCI 1.00 > USB3: USB OHCI 1.0 > scanning bus 0 for devices... 1 USB Device(s) found > scanning bus 2 for devices... 1 USB Device(s) found >scanning usb for storage devices... 0 Storage Device(s) > found > Hit any key to stop autoboot: 0 > > # Probe device > => sf probe > SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, > total 16 MiB How did this resolved w/o sspi? >>> >>> I enabled both CONFIG_SPI_FLASH and CONFIG_DM_SPI_FLASH. The driver-model >>> search for >>> "spi-flash" compatible string, probe it and bind it to the spi driver. > # Erase > => sf erase 0x1000 0x100 > SF: 256 bytes @ 0x1000 Erased: ERROR > => sf erase 0x1000 0x1000 > SF: 4096 bytes @ 0x1000 Erased: OK > > # Test > => sf test 0 10 > SPI flash test: > 0 erase: 12104 ticks, 84 KiB/s 0.672 Mbps > 1 check: 8881 ticks, 115 KiB/s 0.920 Mbps > 2 write: 10824 ticks, 94 KiB/s 0.752 Mbps > 3 read: 8872 ticks, 115 KiB/s 0.920 Mbps > Test passed > 0 erase: 12104 ticks, 84 KiB/s 0.672 Mbps > 1 check: 8881 ticks, 115 KiB/s 0.920 Mbps > 2 write: 10824 ticks, 94 KiB/s 0.752 Mbps > 3 read: 8872 ticks, 115 KiB/s 0.920 Mbps > > # Try write/read > => sf erase 0x1000 0x1000 > SF: 4096 bytes @ 0x1000 Erased: OK > > => md.b 0x5000 0x100 > 5000: a9 4d b7 68 d2 48 69 c3 09 78 fa d3 33 66 e9 53 > .M.h.Hi..x..3f.S > 5010: b0 53 af 79 ad 33 79 b1 f1 e3 1d 09 2e ba dd dc > .S.y.3y. > 5020: 8c eb eb 53 f4 ef 66 89 b5 e9 f6 fb af 73 7f cb > ...S..f..s.. >
Re: [U-Boot] [PATCH v3 3/4] dm: video: use constants to refer to colors
On 02/07/2018 05:38 AM, Simon Glass wrote: Hi Heinrich, On 4 February 2018 at 15:55, Heinrich Schuchardt> wrote: > On 02/04/2018 02:40 PM, Simon Glass wrote: >> Hi Heinrich, >> >> On 29 January 2018 at 00:19, Heinrich Schuchardt > wrote: >>> Use constants to refer to colors. >>> Adjust initialization of foreground and background color to avoid >>> setting reserved bits. >>> Consistently u32 instead of unsigned for color bit mask. >>> >>> Signed-off-by: Heinrich Schuchardt > >>> --- >>> v3 >>> Use color constants for initalizing the console. >>> v2 >>> no change >>> --- >>> drivers/video/vidconsole-uclass.c | 55 +++ >>> drivers/video/video-uclass.c | 19 +- >>> include/video.h | 11 ++-- >>> include/video_console.h | 31 ++ >>> 4 files changed, 85 insertions(+), 31 deletions(-) >> >> Reviewed-by: Simon Glass > >> >> Regarding my point about using u32 in function return values and args, >> I don't think I explained it very well. >> >> IMO is makes no sense to structure all the intermediate code which >> generates pixel values to use u32, when an unsigned int is enough on >> all machines that U-Boot supports. The packing / unpacking into a >> 32-bit word in memory is something that is done once when the pixel is >> accessed. Thereafter I don't see a need to push things around in a >> particular format. > > The definition I found was > typedef unsigned int u32; > > What makes you believe there is any packing and unpacking or masking > overhead avoided by using unsigned int or any other 32bit integer type? A machine with a 32-bit register has to mask its argument on entry to the function to ensure that the caller does not pass an invalid value. If this were true it would also hold true for unsigned int. See above typedef. C does not check if a value is negative when copying int to unsigned int. > > For struct vid_rgb other integer types could be used. I not sure if > accessing a char is any faster in this context than using 32bit integers. In general the natural word size is best for arguments and return values I think (int or unsigned int). So I leave it as it is. By the way: natural word size is size_t and not int. > > Regards > > Heinrich > >> >> I have an aversion to code which forces the compiler to mask every >> variable access just to pass the data around. >> >> So I would prefer to use u32 only when accessing the hardware, or for >> pointers which do that. >> >> Reards, >> Simon >> > Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 2/4] Convert CONFIG_WATCHDOG_TIMEOUT_MSECS to Kconfig
Hi, > -Original Message- > From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Lukasz > Majewski > Sent: Wednesday, February 7, 2018 1:30 AM > +config WATCHDOG_TIMEOUT_MSECS > + int "Specify watchdog timeout in mili seconds" s/mili/milli Regards Calvin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/2] Enable test case with A20-OLinuXino-Lime2
On Wed, Feb 7, 2018 at 12:00 PM, Stefan Mavrodievwrote: > On 02/06/2018 06:48 PM, Jagan Teki wrote: >> >> On Tue, Feb 6, 2018 at 6:44 PM, Stefan Mavrodiev >> wrote: >>> >>> Driver testing is done with A20-OLinuXino-Lime2. Testing >>> requirements are: >>>- Exposing spi0 alternative pins in the dts file >>>- Add alias node, enabling driver probing >>>- Add flash sub-node of spi >>>- Enable spi flash related options in the defconfig file >>> >>> The testing log is: >>> >>>U-Boot SPL 2018.03-rc1-00075-g35a689a-dirty (Feb 06 2018 - 14:40:07 >>> +0200) >>>DRAM: 1024 MiB >>>CPU: 91200Hz, AXI/AHB/APB: 3/2/2 >>>Trying to boot from FEL >> >> Why FEL? can't it boot from SPI-FLASH? > > Because I previously erased the flash during testing. Here is same, booting > from SPI: > > U-Boot SPL 2018.03-rc1-00075-g61ce225 (Feb 07 2018 - 08:21:07 +0200) > DRAM: 1024 MiB > CPU: 91200Hz, AXI/AHB/APB: 3/2/2 > Trying to boot from sunxi SPI > > > U-Boot 2018.03-rc1-00075-g61ce225 (Feb 07 2018 - 08:21:07 +0200) Allwinner > Technology > > > CPU: Allwinner A20 (SUN7I) > Model: Olimex A20-OLinuXino-LIME2 > I2C: ready > DRAM: 1 GiB > MMC: SUNXI SD/MMC: 0 > Loading Environment from SPI Flash... SF: Detected w25q128bv with page > size 256 Bytes, erase size 4 KiB, total 16 MiB > OK > In:serial > Out: serial > Err: serial > Allwinner mUSB OTG (Peripheral) > SCSI: SATA link 0 timeout. > AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode > flags: ncq stag pm led clo only pmp pio slum part ccc apst > Net: No ethernet found. > starting USB... > USB0: USB EHCI 1.00 > USB1: USB OHCI 1.0 > USB2: USB EHCI 1.00 > USB3: USB OHCI 1.0 > scanning bus 0 for devices... 1 USB Device(s) found > scanning bus 2 for devices... 1 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found > Hit any key to stop autoboot: >> >> >>>U-Boot 2018.03-rc1-00075-g35a689a-dirty (Feb 06 2018 - 14:40:07 +0200) >>> Allwinner Technology >>> >>>CPU: Allwinner A20 (SUN7I) >>>Model: Olimex A20-OLinuXino-LIME2 >>>I2C: ready >>>DRAM: 1 GiB >>>MMC: SUNXI SD/MMC: 0 >>>Loading Environment from SPI Flash... SF: Detected w25q128bv with page >>> size 256 Bytes, erase size 4 KiB, total 16 MiB >>>OK >>>In:serial >>>Out: serial >>>Err: serial >>>Allwinner mUSB OTG (Peripheral) >>>SCSI: SATA link 0 timeout. >>>AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode >>>flags: ncq stag pm led clo only pmp pio slum part ccc apst >>>Net: No ethernet found. >>>starting USB... >>>USB0: USB EHCI 1.00 >>>USB1: USB OHCI 1.0 >>>USB2: USB EHCI 1.00 >>>USB3: USB OHCI 1.0 >>>scanning bus 0 for devices... 1 USB Device(s) found >>>scanning bus 2 for devices... 1 USB Device(s) found >>> scanning usb for storage devices... 0 Storage Device(s) found >>>Hit any key to stop autoboot: 0 >>> >>># Probe device >>>=> sf probe >>>SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, >>> total 16 MiB >> >> How did this resolved w/o sspi? > > I enabled both CONFIG_SPI_FLASH and CONFIG_DM_SPI_FLASH. The driver-model > search for > "spi-flash" compatible string, probe it and bind it to the spi driver. >> >> >>># Erase >>>=> sf erase 0x1000 0x100 >>>SF: 256 bytes @ 0x1000 Erased: ERROR >>>=> sf erase 0x1000 0x1000 >>>SF: 4096 bytes @ 0x1000 Erased: OK >>> >>># Test >>>=> sf test 0 10 >>>SPI flash test: >>>0 erase: 12104 ticks, 84 KiB/s 0.672 Mbps >>>1 check: 8881 ticks, 115 KiB/s 0.920 Mbps >>>2 write: 10824 ticks, 94 KiB/s 0.752 Mbps >>>3 read: 8872 ticks, 115 KiB/s 0.920 Mbps >>>Test passed >>>0 erase: 12104 ticks, 84 KiB/s 0.672 Mbps >>>1 check: 8881 ticks, 115 KiB/s 0.920 Mbps >>>2 write: 10824 ticks, 94 KiB/s 0.752 Mbps >>>3 read: 8872 ticks, 115 KiB/s 0.920 Mbps >>> >>># Try write/read >>>=> sf erase 0x1000 0x1000 >>>SF: 4096 bytes @ 0x1000 Erased: OK >>> >>>=> md.b 0x5000 0x100 >>>5000: a9 4d b7 68 d2 48 69 c3 09 78 fa d3 33 66 e9 53 >>> .M.h.Hi..x..3f.S >>>5010: b0 53 af 79 ad 33 79 b1 f1 e3 1d 09 2e ba dd dc >>> .S.y.3y. >>>5020: 8c eb eb 53 f4 ef 66 89 b5 e9 f6 fb af 73 7f cb >>> ...S..f..s.. >>>5030: b6 4b bf de c3 fd de bb 9a 53 ad 7d ef 38 6f bf >>> .K...S.}.8o. >>>5040: fd fb e7 5e e9 db fc 0c fc f7 be 76 ad b9 fd eb >>> ...^...v >>>5050: f3 ed 5f b5 bb bd ba 8f ff df 1f bf f3 ff fb d7 >>> .._. >>>5060: b7 6e 9e 5f af 7a 62 ed 7f 66 1b 6d fd fb 47 f7 >>> .n._.zb..f.m..G. >>>5070: b7 fa f4 db d5 b6 d5 ff 81 e6 f5 d9 8f ef ff db >>> >>>5080: b7 dd bd fb f3 1d 9d 2f f6 db c8 7f fb cf b9 f3 >>> .../ >>>5090: 3c
Re: [U-Boot] [PATCH v4 2/2] efi_selftest: provide a test for block io
Hi Heinrich, On 4 February 2018 at 15:35, Heinrich Schuchardtwrote: > On 02/04/2018 01:39 PM, Simon Glass wrote: >> On 21 January 2018 at 11:29, Heinrich Schuchardt wrote: >>> This test checks the driver for block IO devices. >>> A disk image is created in memory. >>> A handle is created for the new block IO device. >>> The block I/O protocol is installed on the handle. >>> ConnectController is used to setup partitions and to install the simple >>> file protocol. >>> A known file is read from the file system and verified. >>> >>> Signed-off-by: Heinrich Schuchardt >>> --- >>> v4 >>> Provide a commit message. >>> v3 >>> no change >>> v2 >>> no change >>> --- >>> lib/efi_selftest/Makefile| 3 + >>> lib/efi_selftest/efi_selftest_block_device.c | 395 +++ >>> lib/efi_selftest/efi_selftest_disk_image.h | 69 + >>> 3 files changed, 467 insertions(+) >>> create mode 100644 lib/efi_selftest/efi_selftest_block_device.c >>> create mode 100644 lib/efi_selftest/efi_selftest_disk_image.h >> >> Reviewed-by: Simon Glass >> >> A few general comments: >> >> - I'm not very keen on using 'this' in the code. This is not C++. Can >> you use blkio or something, instead? > > The UEFI spec uses the variable name 'this' in the definition of the > EFI_DRIVER_BINDING_PROTOCOL and as already discussed I prefer to stick > to the commonly known variable names. I don't see why the EFI spec has to bleed into its code implementation. We are talking about a parameter name, not a method or struct name. > > 'this' refers to the EFI_DRIVER_BINDING_PROTOCOL object itself and not > to "blkio or something". > >> - How about declaring all the static vars at the top of the file? > > Did you mean put all struct definitions above all static vars? > Putting vars above the definition of their types wouldn't make sense. Yes I think decls should normally got at the top of a file so they are easy to find. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 3/4] dm: video: use constants to refer to colors
Hi Heinrich, On 4 February 2018 at 15:55, Heinrich Schuchardtwrote: > On 02/04/2018 02:40 PM, Simon Glass wrote: >> Hi Heinrich, >> >> On 29 January 2018 at 00:19, Heinrich Schuchardt wrote: >>> Use constants to refer to colors. >>> Adjust initialization of foreground and background color to avoid >>> setting reserved bits. >>> Consistently u32 instead of unsigned for color bit mask. >>> >>> Signed-off-by: Heinrich Schuchardt >>> --- >>> v3 >>> Use color constants for initalizing the console. >>> v2 >>> no change >>> --- >>> drivers/video/vidconsole-uclass.c | 55 +++ >>> drivers/video/video-uclass.c | 19 +- >>> include/video.h | 11 ++-- >>> include/video_console.h | 31 ++ >>> 4 files changed, 85 insertions(+), 31 deletions(-) >> >> Reviewed-by: Simon Glass >> >> Regarding my point about using u32 in function return values and args, >> I don't think I explained it very well. >> >> IMO is makes no sense to structure all the intermediate code which >> generates pixel values to use u32, when an unsigned int is enough on >> all machines that U-Boot supports. The packing / unpacking into a >> 32-bit word in memory is something that is done once when the pixel is >> accessed. Thereafter I don't see a need to push things around in a >> particular format. > > The definition I found was > typedef unsigned int u32; > > What makes you believe there is any packing and unpacking or masking > overhead avoided by using unsigned int or any other 32bit integer type? A machine with a 32-bit register has to mask its argument on entry to the function to ensure that the caller does not pass an invalid value. > > For struct vid_rgb other integer types could be used. I not sure if > accessing a char is any faster in this context than using 32bit integers. In general the natural word size is best for arguments and return values I think (int or unsigned int). > > Regards > > Heinrich > >> >> I have an aversion to code which forces the compiler to mask every >> variable access just to pass the data around. >> >> So I would prefer to use u32 only when accessing the hardware, or for >> pointers which do that. >> >> Reards, >> Simon >> > Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] PowerPC: phy: enable all phylib drivers when use phylib and tsec enet
should be included when CONFIG_PHYLIB and CONFIG_TSEC_ENET are defined. Fixes: 3146f0c017 ("Move PHYLIB to Kconfig") Signed-off-by: Zhao Qiang--- arch/powerpc/include/asm/config.h |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h index 6aec815..8dd53f2 100644 --- a/arch/powerpc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h @@ -72,11 +72,9 @@ #endif /* The TSEC driver uses the PHYLIB infrastructure */ -#ifndef CONFIG_PHYLIB -#if defined(CONFIG_TSEC_ENET) +#if defined(CONFIG_TSEC_ENET) && defined(CONFIG_PHYLIB) #include #endif /* TSEC_ENET */ -#endif /* !CONFIG_PHYLIB */ /* The FMAN driver uses the PHYLIB infrastructure */ -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-ubi/master
On Tue, Feb 06, 2018 at 03:03:55PM +0100, Heiko Schocher wrote: > Hello Tom, > > please pull from u-boot-ubi master > > The following changes since commit a43aebee89acf57b4e22018f401cffc9fef4fd85: > > usb: ulpi: kconfig: Remove meaningless choice default (2018-02-05 20:58:12 > -0500) > > are available in the Git repository at: > > git://git.denx.de/u-boot-ubi.git master > > for you to fetch changes up to 2d2d306f79e5ae090790fd380662f5407ccace11: > > ubi: Ensure no fastmap flush after uif_close (2018-02-06 07:05:57 +0100) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull from u-boot-i2c
On Tue, Feb 06, 2018 at 01:45:49PM +0100, Heiko Schocher wrote: > Hello Tom, > > please pull from u-boot-i2c master > > The following changes since commit a43aebee89acf57b4e22018f401cffc9fef4fd85: > > usb: ulpi: kconfig: Remove meaningless choice default (2018-02-05 20:58:12 > -0500) > > are available in the Git repository at: > > git://git.denx.de/u-boot-i2c.git master > > for you to fetch changes up to 8bcf12ccce89ef9c77d9322930445b4f4ca3b822: > > i2c: mvtwsi.c: Avoid NULL dereference (2018-02-06 07:02:32 +0100) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 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 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
[U-Boot] [PATCH v1 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--- 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..bc4e9a6e84 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 mili 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 7b47fc6887..6c945979fb 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -125,9 +125,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 4fa850d211..1c7f066354 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_MXC_GPIO 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 2/2] Remove config_distro_defaults.h
With the contents of config_distro_defaults.h migrated to Kconfig, we can remove this header file completely Signed-off-by: Adam Ford--- include/config_distro_defaults.h| 16 include/configs/am335x_sl50.h | 2 +- include/configs/clearfog.h | 2 +- include/configs/cm_fx6.h| 2 +- include/configs/dh_imx6.h | 2 +- include/configs/dragonboard410c.h | 2 +- include/configs/dragonboard820c.h | 2 +- include/configs/el6x_common.h | 2 +- include/configs/embestmx6boards.h | 2 +- include/configs/exynos-common.h | 2 +- include/configs/highbank.h | 2 +- include/configs/hikey.h | 2 +- include/configs/imx6_logic.h| 2 +- include/configs/kc1.h | 2 +- include/configs/ls1012a_common.h| 2 +- include/configs/ls1021atwr.h| 2 +- include/configs/ls1043a_common.h| 2 +- include/configs/ls1046a_common.h| 2 +- include/configs/ls1088aqds.h| 2 +- include/configs/ls1088ardb.h| 2 +- include/configs/ls2080ardb.h| 2 +- include/configs/mccmon6.h | 2 +- include/configs/meson-gxbb-common.h | 2 +- include/configs/mvebu_armada-37xx.h | 2 +- include/configs/mx6cuboxi.h | 2 +- include/configs/novena.h| 2 +- include/configs/omap3_evm.h | 2 +- include/configs/pcm058.h| 2 +- include/configs/pfla02.h| 2 +- include/configs/poplar.h| 2 +- include/configs/qemu-arm.h | 2 +- include/configs/rockchip-common.h | 2 +- include/configs/rpi.h | 2 +- include/configs/s32v234evb.h| 2 +- include/configs/sandbox.h | 2 +- include/configs/sksimx6.h | 2 +- include/configs/sniper.h| 2 +- include/configs/socfpga_common.h| 2 +- include/configs/stih410-b2260.h | 2 +- include/configs/sunxi-common.h | 2 +- include/configs/tegra-common.h | 2 +- include/configs/ti_armv7_common.h | 2 +- include/configs/turris_omnia.h | 2 +- include/configs/udoo_neo.h | 2 +- include/configs/usbarmory.h | 2 +- include/configs/vexpress_common.h | 2 +- include/configs/wandboard.h | 2 +- include/configs/zynq-common.h | 2 +- 48 files changed, 47 insertions(+), 63 deletions(-) diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h deleted file mode 100644 index 35e704e..000 --- a/include/config_distro_defaults.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2013-2014 Red Hat, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef _CONFIG_CMD_DISTRO_DEFAULTS_H -#define _CONFIG_CMD_DISTRO_DEFAULTS_H - -/* - * List of all commands and options that when defined enables support for - * features required by distros to support boards in a standardised and - * consistent manner. - */ - -#endif /* _CONFIG_CMD_DISTRO_DEFAULTS_H */ diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h index b1c7ede..24406c1 100644 --- a/include/configs/am335x_sl50.h +++ b/include/configs/am335x_sl50.h @@ -30,7 +30,7 @@ #ifndef CONFIG_SPL_BUILD -#include + #define MEM_LAYOUT_ENV_SETTINGS \ "scriptaddr=0x8000\0" \ diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h index 512c463..ba6f025 100644 --- a/include/configs/clearfog.h +++ b/include/configs/clearfog.h @@ -126,7 +126,7 @@ /* Include the common distro boot environment */ #ifndef CONFIG_SPL_BUILD -#include + #ifdef CONFIG_MMC #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index da870b9..377732c 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -14,7 +14,7 @@ #include "mx6_common.h" #ifndef CONFIG_SPL_BUILD -#include + #endif /* Machine config */ diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index 7a9b0f7..fcf754e 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -11,7 +11,7 @@ #include -#include + #include "mx6_common.h" /* diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h index 6b5a295..0cabe42 100644 --- a/include/configs/dragonboard410c.h +++ b/include/configs/dragonboard410c.h @@ -46,7 +46,7 @@ /* Partition table support */ #define HAVE_BLOCK_DEVICE /* Needed for partition commands */ -#include + /* BOOTP options */ #define CONFIG_BOOTP_BOOTFILESIZE diff --git a/include/configs/dragonboard820c.h b/include/configs/dragonboard820c.h index 4bc36b7..f3929ae 100644 --- a/include/configs/dragonboard820c.h +++ b/include/configs/dragonboard820c.h @@ -40,7 +40,7 @@ #define CONFIG_BOOTP_BOOTFILESIZE #ifndef CONFIG_SPL_BUILD -#include + #include #endif diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h index 909981c..cccfd83 100644 --- a/include/configs/el6x_common.h +++
Re: [U-Boot] CONFIG_RANDOM_UUID and CONFIG_CMD_UUID unused?
On Tue, Feb 06, 2018 at 08:55:26AM -0600, Adam Ford wrote: > config_fallbacks.h both check to see if CONFIG_RANDOM_UUID or > CONFIG_CMD_UUID are defined, but I don't ever see either of these > options defined. > > Can this go away: > > #if (defined(CONFIG_RANDOM_UUID) || \ > defined(CONFIG_CMD_UUID)) && \ > (!defined(CONFIG_LIB_RAND) && \ > !defined(CONFIG_LIB_HW_RAND)) > #define CONFIG_LIB_RAND > #endif As LIB_RAND is in Kconfig, this information should be done via Kconfig and that section dropped, yes. -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] CONFIG_CMD_KGDB unused?
On Tue, Feb 06, 2018 at 08:50:38AM -0600, Adam Ford wrote: > I see lots of places where the check for CONFIG_CMD_KGDB is done, but > I see no place where it is ever defined and I don't see a description > in README. > > Is this still needed? I'm not at all sure it builds nor functions. A patch to rip it all out would be appreciated, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 8/8] spi: Migrate CONFIG_CF_SPI to Kconfig
Signed-off-by: Tuomas Tynkkynen--- configs/M52277EVB_defconfig | 1 + configs/M52277EVB_stmicro_defconfig | 1 + configs/M54418TWR_defconfig | 1 + configs/M54418TWR_nand_mii_defconfig | 1 + configs/M54418TWR_nand_rmii_defconfig | 1 + configs/M54418TWR_nand_rmii_lowfreq_defconfig | 1 + configs/M54418TWR_serial_mii_defconfig| 1 + configs/M54418TWR_serial_rmii_defconfig | 1 + configs/M54451EVB_defconfig | 1 + configs/M54451EVB_stmicro_defconfig | 1 + configs/M54455EVB_a66_defconfig | 1 + configs/M54455EVB_defconfig | 1 + configs/M54455EVB_i66_defconfig | 1 + configs/M54455EVB_intel_defconfig | 1 + configs/M54455EVB_stm33_defconfig | 1 + configs/stmark2_defconfig | 1 + drivers/spi/Kconfig | 6 ++ include/configs/M52277EVB.h | 1 - include/configs/M54418TWR.h | 1 - include/configs/M54451EVB.h | 1 - include/configs/M54455EVB.h | 1 - include/configs/stmark2.h | 1 - scripts/config_whitelist.txt | 1 - 23 files changed, 22 insertions(+), 6 deletions(-) diff --git a/configs/M52277EVB_defconfig b/configs/M52277EVB_defconfig index 74ea619008..2c08494e85 100644 --- a/configs/M52277EVB_defconfig +++ b/configs/M52277EVB_defconfig @@ -19,3 +19,4 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_MTD_NOR_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_CF_SPI=y diff --git a/configs/M52277EVB_stmicro_defconfig b/configs/M52277EVB_stmicro_defconfig index 13055c52f5..497902ae3c 100644 --- a/configs/M52277EVB_stmicro_defconfig +++ b/configs/M52277EVB_stmicro_defconfig @@ -18,3 +18,4 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_MTD_NOR_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_CF_SPI=y diff --git a/configs/M54418TWR_defconfig b/configs/M54418TWR_defconfig index b26c94e060..eaea5d6656 100644 --- a/configs/M54418TWR_defconfig +++ b/configs/M54418TWR_defconfig @@ -20,3 +20,4 @@ CONFIG_CMD_CACHE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y +CONFIG_CF_SPI=y diff --git a/configs/M54418TWR_nand_mii_defconfig b/configs/M54418TWR_nand_mii_defconfig index cf015333cd..5b54de34a4 100644 --- a/configs/M54418TWR_nand_mii_defconfig +++ b/configs/M54418TWR_nand_mii_defconfig @@ -19,3 +19,4 @@ CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y +CONFIG_CF_SPI=y diff --git a/configs/M54418TWR_nand_rmii_defconfig b/configs/M54418TWR_nand_rmii_defconfig index bd36aaabe3..01c06e4c86 100644 --- a/configs/M54418TWR_nand_rmii_defconfig +++ b/configs/M54418TWR_nand_rmii_defconfig @@ -19,3 +19,4 @@ CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y +CONFIG_CF_SPI=y diff --git a/configs/M54418TWR_nand_rmii_lowfreq_defconfig b/configs/M54418TWR_nand_rmii_lowfreq_defconfig index 2b9e539e71..1629f90499 100644 --- a/configs/M54418TWR_nand_rmii_lowfreq_defconfig +++ b/configs/M54418TWR_nand_rmii_lowfreq_defconfig @@ -19,3 +19,4 @@ CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y +CONFIG_CF_SPI=y diff --git a/configs/M54418TWR_serial_mii_defconfig b/configs/M54418TWR_serial_mii_defconfig index aa21072703..ad40f1de32 100644 --- a/configs/M54418TWR_serial_mii_defconfig +++ b/configs/M54418TWR_serial_mii_defconfig @@ -20,3 +20,4 @@ CONFIG_CMD_CACHE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y +CONFIG_CF_SPI=y diff --git a/configs/M54418TWR_serial_rmii_defconfig b/configs/M54418TWR_serial_rmii_defconfig index b26c94e060..eaea5d6656 100644 --- a/configs/M54418TWR_serial_rmii_defconfig +++ b/configs/M54418TWR_serial_rmii_defconfig @@ -20,3 +20,4 @@ CONFIG_CMD_CACHE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y +CONFIG_CF_SPI=y diff --git a/configs/M54451EVB_defconfig b/configs/M54451EVB_defconfig index d184bca011..00cfecd4e5 100644 --- a/configs/M54451EVB_defconfig +++ b/configs/M54451EVB_defconfig @@ -22,3 +22,4 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_MTD_NOR_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_CF_SPI=y diff --git a/configs/M54451EVB_stmicro_defconfig b/configs/M54451EVB_stmicro_defconfig index 715b2c32a2..06a7e6ac08 100644 --- a/configs/M54451EVB_stmicro_defconfig +++ b/configs/M54451EVB_stmicro_defconfig @@ -21,3 +21,4 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_MTD_NOR_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_CF_SPI=y diff --git a/configs/M54455EVB_a66_defconfig b/configs/M54455EVB_a66_defconfig index 2027481a2b..06b9e8c56d 100644 --- a/configs/M54455EVB_a66_defconfig +++ b/configs/M54455EVB_a66_defconfig @@ -26,3 +26,4 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_MTD_NOR_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y
[U-Boot] [PATCH 6/8] spi: Migrate CONFIG_LPC32XX_SSP to Kconfig
Signed-off-by: Tuomas Tynkkynen--- configs/devkit3250_defconfig | 1 + configs/work_92105_defconfig | 1 + drivers/spi/Kconfig | 5 + include/configs/devkit3250.h | 1 - include/configs/work_92105.h | 1 - scripts/config_whitelist.txt | 1 - 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configs/devkit3250_defconfig b/configs/devkit3250_defconfig index 854ea32105..99e7cb1409 100644 --- a/configs/devkit3250_defconfig +++ b/configs/devkit3250_defconfig @@ -37,6 +37,7 @@ CONFIG_SPL_NAND_SIMPLE=y CONFIG_PHYLIB=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y +CONFIG_LPC32XX_SSP=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT=y diff --git a/configs/work_92105_defconfig b/configs/work_92105_defconfig index 1fccaacd82..e4d0fd017f 100644 --- a/configs/work_92105_defconfig +++ b/configs/work_92105_defconfig @@ -36,3 +36,4 @@ CONFIG_DM_GPIO=y CONFIG_PHYLIB=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y +CONFIG_LPC32XX_SSP=y diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index a16faa6dfb..79cd54e10c 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -257,6 +257,11 @@ config TI_QSPI Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms. This driver support spi flash single, quad and memory reads. +config LPC32XX_SSP + bool "LPC32XX SPI Driver" + help + Enable support for SPI on LPC32xx + config MPC8XX_SPI bool "MPC8XX SPI Driver" depends on 8xx diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h index 526a81a382..af16cbd7a5 100644 --- a/include/configs/devkit3250.h +++ b/include/configs/devkit3250.h @@ -64,7 +64,6 @@ /* * SSP/SPI */ -#define CONFIG_LPC32XX_SSP #define CONFIG_LPC32XX_SSP_TIMEOUT 10 /* diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h index 7faab4e073..2e407cc2b6 100644 --- a/include/configs/work_92105.h +++ b/include/configs/work_92105.h @@ -125,7 +125,6 @@ * SSP/SPI/DISPLAY */ -#define CONFIG_LPC32XX_SSP #define CONFIG_LPC32XX_SSP_TIMEOUT 10 /* * Environment diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index daff47b92b..2fa4cf13e4 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1253,7 +1253,6 @@ CONFIG_LPC32XX_NAND_SLC_WSETUP CONFIG_LPC32XX_NAND_SLC_WWIDTH CONFIG_LPC32XX_SDRAM_ CONFIG_LPC32XX_SPL -CONFIG_LPC32XX_SSP CONFIG_LPC32XX_SSP_TIMEOUT CONFIG_LPC_BASE CONFIG_LPC_IO_BASE -- 2.16.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 4/8] spi: Migrate CONFIG_MXC_SPI to Kconfig
Signed-off-by: Tuomas Tynkkynen--- README| 5 - configs/aristainetos2_defconfig | 1 + configs/aristainetos2b_defconfig | 1 + configs/aristainetos_defconfig| 1 + configs/cgtqmx6eval_defconfig | 1 + configs/cl-som-imx7_defconfig | 1 + configs/cm_fx6_defconfig | 1 + configs/dh_imx6_defconfig | 1 + configs/display5_defconfig| 1 + configs/display5_factory_defconfig| 1 + configs/dms-ba16-1g_defconfig | 1 + configs/dms-ba16_defconfig| 1 + configs/flea3_defconfig | 1 + configs/ge_b450v3_defconfig | 1 + configs/ge_b650v3_defconfig | 1 + configs/ge_b850v3_defconfig | 1 + configs/imx31_phycore_eet_defconfig | 1 + configs/marsboard_defconfig | 1 + configs/mccmon6_nor_defconfig | 1 + configs/mccmon6_sd_defconfig | 1 + configs/mx31ads_defconfig | 1 + configs/mx31pdk_defconfig | 1 + configs/mx35pdk_defconfig | 1 + configs/mx51evk_defconfig | 1 + configs/mx6qsabrelite_defconfig | 1 + configs/mx6sabreauto_defconfig| 1 + configs/mx6sabresd_defconfig | 1 + configs/mx6slevk_defconfig| 1 + configs/mx6slevk_spinor_defconfig | 1 + configs/mx6slevk_spl_defconfig| 1 + configs/nitrogen6dl2g_defconfig | 1 + configs/nitrogen6dl_defconfig | 1 + configs/nitrogen6q2g_defconfig| 1 + configs/nitrogen6q_defconfig | 1 + configs/nitrogen6s1g_defconfig| 1 + configs/nitrogen6s_defconfig | 1 + configs/ot1200_defconfig | 1 + configs/ot1200_spl_defconfig | 1 + configs/pcm058_defconfig | 1 + configs/pfla02_defconfig | 1 + configs/riotboard_defconfig | 1 + configs/tqma6dl_mba6_mmc_defconfig| 1 + configs/tqma6dl_mba6_spi_defconfig| 1 + configs/tqma6q_mba6_mmc_defconfig | 1 + configs/tqma6q_mba6_spi_defconfig | 1 + configs/tqma6s_mba6_mmc_defconfig | 1 + configs/tqma6s_mba6_spi_defconfig | 1 + configs/ts4800_defconfig | 1 + configs/woodburn_defconfig| 1 + configs/woodburn_sd_defconfig | 1 + configs/zc5202_defconfig | 1 + configs/zc5601_defconfig | 1 + drivers/spi/Kconfig | 6 ++ include/configs/advantech_dms-ba16.h | 1 - include/configs/aristainetos-common.h | 1 - include/configs/cgtqmx6eval.h | 1 - include/configs/cl-som-imx7.h | 1 - include/configs/cm_fx6.h | 1 - include/configs/dh_imx6.h | 1 - include/configs/display5.h| 1 - include/configs/el6x_common.h | 1 - include/configs/embestmx6boards.h | 1 - include/configs/flea3.h | 1 - include/configs/ge_bx50v3.h | 1 - include/configs/gw_ventana.h | 1 - include/configs/imx31_phycore.h | 1 - include/configs/mccmon6.h | 1 - include/configs/mx31ads.h | 1 - include/configs/mx31pdk.h | 1 - include/configs/mx35pdk.h | 1 - include/configs/mx51evk.h | 6 -- include/configs/mx6sabre_common.h | 1 - include/configs/mx6slevk.h| 1 - include/configs/nitrogen6x.h | 1 - include/configs/ot1200.h | 1 - include/configs/pcm058.h | 1 - include/configs/pfla02.h | 1 - include/configs/tqma6.h | 3 --- include/configs/tqma6_wru4.h | 6 -- include/configs/ts4800.h | 1 - include/configs/woodburn_common.h | 1 - scripts/config_whitelist.txt | 1 - 82 files changed, 57 insertions(+), 46 deletions(-) diff --git a/README b/README index 4044e8575f..0cec47dadf 100644 --- a/README +++ b/README @@ -2019,11 +2019,6 @@ The following options need to be configured: Currently supported on some MPC8xxx processors. For an example, see include/configs/mpc8349emds.h. - CONFIG_MXC_SPI - - Enables the driver for the SPI controllers on i.MX and MXC - SoCs. Currently i.MX31/35/51 are supported. - CONFIG_SYS_SPI_MXC_WAIT Timeout for waiting until spi transfer completed. default: (CONFIG_SYS_HZ/100) /* 10 ms */ diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig index 288dab0d3c..12fbc61dd1 100644 --- a/configs/aristainetos2_defconfig +++ b/configs/aristainetos2_defconfig @@ -39,6 +39,7 @@ CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_PHY_MICREL_KSZ90X1=y CONFIG_NETDEVICES=y +CONFIG_MXC_SPI=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y diff --git a/configs/aristainetos2b_defconfig b/configs/aristainetos2b_defconfig index 115ae07ad6..d14edd8372 100644 --- a/configs/aristainetos2b_defconfig +++
[U-Boot] [PATCH 7/8] spi: Migrate CONFIG_KIRKWOOD_SPI to Kconfig
Signed-off-by: Tuomas Tynkkynen--- arch/arm/mach-kirkwood/include/mach/config.h | 1 - arch/arm/mach-mvebu/include/mach/config.h| 1 - configs/clearfog_defconfig | 1 + configs/controlcenterdc_defconfig| 1 + configs/d2net_v2_defconfig | 1 + configs/db-88f6720_defconfig | 1 + configs/db-88f6820-amc_defconfig | 1 + configs/db-88f6820-gp_defconfig | 1 + configs/db-mv784mp-gp_defconfig | 1 + configs/dreamplug_defconfig | 1 + configs/ds109_defconfig | 1 + configs/ds414_defconfig | 1 + configs/inetspace_v2_defconfig | 1 + configs/km_kirkwood_128m16_defconfig | 1 + configs/km_kirkwood_defconfig| 1 + configs/km_kirkwood_pci_defconfig| 1 + configs/kmcoge5un_defconfig | 1 + configs/kmnusa_defconfig | 1 + configs/kmsugp1_defconfig| 1 + configs/kmsuv31_defconfig| 1 + configs/lschlv2_defconfig| 1 + configs/lsxhl_defconfig | 1 + configs/maxbcm_defconfig | 1 + configs/mgcoge3un_defconfig | 1 + configs/mvebu_db_armada8k_defconfig | 1 + configs/mvebu_mcbin-88f8040_defconfig| 1 + configs/net2big_v2_defconfig | 1 + configs/netspace_lite_v2_defconfig | 1 + configs/netspace_max_v2_defconfig| 1 + configs/netspace_mini_v2_defconfig | 1 + configs/netspace_v2_defconfig| 1 + configs/portl2_defconfig | 1 + configs/theadorable_debug_defconfig | 1 + configs/turris_omnia_defconfig | 1 + drivers/spi/Kconfig | 6 ++ include/configs/dreamplug.h | 1 - include/configs/ds109.h | 1 - include/configs/mvebu_armada-8k.h| 1 - scripts/config_whitelist.txt | 1 - 39 files changed, 38 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h index efa4e7b6e2..9d6ad5387c 100644 --- a/arch/arm/mach-kirkwood/include/mach/config.h +++ b/arch/arm/mach-kirkwood/include/mach/config.h @@ -61,7 +61,6 @@ */ #ifdef CONFIG_CMD_SF #define CONFIG_HARD_SPI1 -#define CONFIG_KIRKWOOD_SPI1 #ifndef CONFIG_ENV_SPI_BUS # define CONFIG_ENV_SPI_BUS0 #endif diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h index cfd0952470..a3b12eaa00 100644 --- a/arch/arm/mach-mvebu/include/mach/config.h +++ b/arch/arm/mach-mvebu/include/mach/config.h @@ -56,7 +56,6 @@ * SPI Flash configuration */ #ifdef CONFIG_CMD_SF -#define CONFIG_KIRKWOOD_SPI #ifndef CONFIG_ENV_SPI_BUS # define CONFIG_ENV_SPI_BUS0 #endif diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig index 7161518715..6fb4d07935 100644 --- a/configs/clearfog_defconfig +++ b/configs/clearfog_defconfig @@ -44,6 +44,7 @@ CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=25000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y +CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_XHCI_HCD=y diff --git a/configs/controlcenterdc_defconfig b/configs/controlcenterdc_defconfig index 856591e2c8..786f1a21eb 100644 --- a/configs/controlcenterdc_defconfig +++ b/configs/controlcenterdc_defconfig @@ -53,6 +53,7 @@ CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=25000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y +CONFIG_KIRKWOOD_SPI=y CONFIG_TPM_ATMEL_TWI=y CONFIG_TPM_AUTH_SESSIONS=y CONFIG_TPM_FLUSH_RESOURCES=y diff --git a/configs/d2net_v2_defconfig b/configs/d2net_v2_defconfig index 61fd892005..ca377cf631 100644 --- a/configs/d2net_v2_defconfig +++ b/configs/d2net_v2_defconfig @@ -31,6 +31,7 @@ CONFIG_MVSATA_IDE=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SYS_NS16550=y +CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/db-88f6720_defconfig b/configs/db-88f6720_defconfig index 0dbbe77aed..8a0c0ec25d 100644 --- a/configs/db-88f6720_defconfig +++ b/configs/db-88f6720_defconfig @@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_BASE=0xf1012000 CONFIG_DEBUG_UART_CLOCK=25000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y +CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/db-88f6820-amc_defconfig b/configs/db-88f6820-amc_defconfig index abd793c2c1..e361cebd1e 100644 --- a/configs/db-88f6820-amc_defconfig +++ b/configs/db-88f6820-amc_defconfig @@ -53,6 +53,7 @@ CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=2 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y +CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_DM_USB=y
[U-Boot] [PATCH 5/8] spi: Migrate CONFIG_MPC8XXX_SPI to Kconfig
Signed-off-by: Tuomas Tynkkynen--- configs/MPC8349EMDS_defconfig | 1 + configs/ids8313_defconfig | 1 + drivers/spi/Kconfig | 5 + include/configs/MPC8349EMDS.h | 1 - include/configs/ids8313.h | 1 - scripts/config_whitelist.txt | 1 - 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configs/MPC8349EMDS_defconfig b/configs/MPC8349EMDS_defconfig index 49542ca59c..9404d41552 100644 --- a/configs/MPC8349EMDS_defconfig +++ b/configs/MPC8349EMDS_defconfig @@ -16,4 +16,5 @@ CONFIG_MTD_NOR_FLASH=y CONFIG_PHYLIB=y # CONFIG_PCI is not set CONFIG_SYS_NS16550=y +CONFIG_MPC8XXX_SPI=y CONFIG_OF_LIBFDT=y diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig index 839dfbac8f..362aee2e80 100644 --- a/configs/ids8313_defconfig +++ b/configs/ids8313_defconfig @@ -34,4 +34,5 @@ CONFIG_MTD_NOR_FLASH=y CONFIG_PHYLIB=y # CONFIG_PCI is not set CONFIG_SYS_NS16550=y +CONFIG_MPC8XXX_SPI=y CONFIG_OF_LIBFDT=y diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index e7e1ccd73a..a16faa6dfb 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -263,6 +263,11 @@ config MPC8XX_SPI help Enable support for SPI on MPC8XX +config MPC8XXX_SPI + bool "MPC8XXX SPI Driver" + help + Enable support for SPI on the MPC8XXX PowerPC SoCs. + config MXC_SPI bool "MXC SPI Driver" help diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h index c7a5ee0aaf..411fdcc19d 100644 --- a/include/configs/MPC8349EMDS.h +++ b/include/configs/MPC8349EMDS.h @@ -332,7 +332,6 @@ #define CONFIG_SYS_I2C_NOPROBES{ {0, 0x69} } /* SPI */ -#define CONFIG_MPC8XXX_SPI #undef CONFIG_SOFT_SPI /* SPI bit-banged */ /* GPIOs. Used as SPI chip selects */ diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h index 12eb07d1f7..0b5b4a5c75 100644 --- a/include/configs/ids8313.h +++ b/include/configs/ids8313.h @@ -285,7 +285,6 @@ * SPI setup */ #ifdef CONFIG_HARD_SPI -#define CONFIG_MPC8XXX_SPI #define CONFIG_SYS_GPIO1_PRELIM #define CONFIG_SYS_GPIO1_DIR 0x0001 #define CONFIG_SYS_GPIO1_DAT 0x0001 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 125634e245..daff47b92b 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1372,7 +1372,6 @@ CONFIG_MPC83XX_PCI2 CONFIG_MPC85XX_FEC CONFIG_MPC85XX_FEC_NAME CONFIG_MPC85XX_PCI2 -CONFIG_MPC8XXX_SPI CONFIG_MPC8xxx_DISABLE_BPTR CONFIG_MPLL_FREQ CONFIG_MP_CLK_FREQ -- 2.16.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/8] spi: Migrate CONFIG_MXS_SPI to Kconfig
Signed-off-by: Tuomas Tynkkynen--- configs/bg0900_defconfig| 1 + configs/m28evk_defconfig| 1 + configs/mx28evk_auart_console_defconfig | 1 + configs/mx28evk_defconfig | 1 + configs/mx28evk_nand_defconfig | 1 + configs/mx28evk_spi_defconfig | 1 + drivers/spi/Kconfig | 6 ++ include/configs/mxs.h | 1 - scripts/config_whitelist.txt| 1 - 9 files changed, 12 insertions(+), 2 deletions(-) diff --git a/configs/bg0900_defconfig b/configs/bg0900_defconfig index 72616ae5e5..cf2abc6b4c 100644 --- a/configs/bg0900_defconfig +++ b/configs/bg0900_defconfig @@ -29,4 +29,5 @@ CONFIG_DOS_PARTITION=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_BAR=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_MXS_SPI=y CONFIG_OF_LIBFDT=y diff --git a/configs/m28evk_defconfig b/configs/m28evk_defconfig index 3bc6b1835f..dd2d25d251 100644 --- a/configs/m28evk_defconfig +++ b/configs/m28evk_defconfig @@ -43,6 +43,7 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_MMC_MXS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_MXS_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/mx28evk_auart_console_defconfig b/configs/mx28evk_auart_console_defconfig index c4977564e4..c1360f1a50 100644 --- a/configs/mx28evk_auart_console_defconfig +++ b/configs/mx28evk_auart_console_defconfig @@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_MMC_MXS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SST=y +CONFIG_MXS_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig index 40c9df2809..de739e0c37 100644 --- a/configs/mx28evk_defconfig +++ b/configs/mx28evk_defconfig @@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_MMC_MXS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SST=y +CONFIG_MXS_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig index ea97f401d1..103cc8c0c7 100644 --- a/configs/mx28evk_nand_defconfig +++ b/configs/mx28evk_nand_defconfig @@ -37,6 +37,7 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_MMC_MXS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SST=y +CONFIG_MXS_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/mx28evk_spi_defconfig b/configs/mx28evk_spi_defconfig index 34e9927c0f..17bc73030c 100644 --- a/configs/mx28evk_spi_defconfig +++ b/configs/mx28evk_spi_defconfig @@ -37,6 +37,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_MMC_MXS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SST=y +CONFIG_MXS_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index a1f9373af1..686105c0e2 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -263,6 +263,12 @@ config MPC8XX_SPI help Enable support for SPI on MPC8XX +config MXS_SPI + bool "MXS SPI Driver" + help + Enable the MXS SPI controller driver. This driver can be used + on the i.MX23 and i.MX28 SoCs. + config OMAP3_SPI bool "McSPI driver for OMAP" help diff --git a/include/configs/mxs.h b/include/configs/mxs.h index 3a27c15060..5beea7fcea 100644 --- a/include/configs/mxs.h +++ b/include/configs/mxs.h @@ -150,7 +150,6 @@ /* SPI */ #ifdef CONFIG_CMD_SPI #define CONFIG_HARD_SPI -#define CONFIG_MXS_SPI #define CONFIG_SPI_HALF_DUPLEX #endif diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 052031e1be..1b43512bc8 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1444,7 +1444,6 @@ CONFIG_MXS_AUART CONFIG_MXS_AUART_BASE CONFIG_MXS_GPIO CONFIG_MXS_OCOTP -CONFIG_MXS_SPI CONFIG_MX_CYCLIC CONFIG_MY_OPTION CONFIG_NANDFLASH_SIZE -- 2.16.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/8] spi: Migrate CONFIG_SH_QSPI to Kconfig
Signed-off-by: Tuomas Tynkkynen--- configs/alt_defconfig| 1 + configs/gose_defconfig | 1 + configs/koelsch_defconfig| 1 + configs/lager_defconfig | 1 + configs/porter_defconfig | 1 + configs/silk_defconfig | 1 + configs/stout_defconfig | 1 + drivers/spi/Kconfig | 6 ++ include/configs/alt.h| 1 - include/configs/blanche.h| 1 - include/configs/gose.h | 1 - include/configs/koelsch.h| 1 - include/configs/lager.h | 1 - include/configs/porter.h | 1 - include/configs/silk.h | 1 - include/configs/stout.h | 1 - scripts/config_whitelist.txt | 1 - 17 files changed, 13 insertions(+), 9 deletions(-) diff --git a/configs/alt_defconfig b/configs/alt_defconfig index 49f838e01a..58d849073a 100644 --- a/configs/alt_defconfig +++ b/configs/alt_defconfig @@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y CONFIG_SH_ETHER=y CONFIG_BAUDRATE=38400 CONFIG_SCIF_CONSOLE=y +CONFIG_SH_QSPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/gose_defconfig b/configs/gose_defconfig index 2c0fd0bee5..ea68887249 100644 --- a/configs/gose_defconfig +++ b/configs/gose_defconfig @@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y CONFIG_SH_ETHER=y CONFIG_BAUDRATE=38400 CONFIG_SCIF_CONSOLE=y +CONFIG_SH_QSPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/koelsch_defconfig b/configs/koelsch_defconfig index 65e96e69de..31993b0824 100644 --- a/configs/koelsch_defconfig +++ b/configs/koelsch_defconfig @@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y CONFIG_SH_ETHER=y CONFIG_BAUDRATE=38400 CONFIG_SCIF_CONSOLE=y +CONFIG_SH_QSPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/lager_defconfig b/configs/lager_defconfig index e5a6244512..3acca7a5ab 100644 --- a/configs/lager_defconfig +++ b/configs/lager_defconfig @@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y CONFIG_SH_ETHER=y CONFIG_BAUDRATE=38400 CONFIG_SCIF_CONSOLE=y +CONFIG_SH_QSPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/porter_defconfig b/configs/porter_defconfig index 614ee608e7..13dd65d040 100644 --- a/configs/porter_defconfig +++ b/configs/porter_defconfig @@ -48,6 +48,7 @@ CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_SCIF_CONSOLE=y +CONFIG_SH_QSPI=y CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/silk_defconfig b/configs/silk_defconfig index 81d449cb98..dc898eb370 100644 --- a/configs/silk_defconfig +++ b/configs/silk_defconfig @@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y CONFIG_SH_ETHER=y CONFIG_BAUDRATE=38400 CONFIG_SCIF_CONSOLE=y +CONFIG_SH_QSPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/stout_defconfig b/configs/stout_defconfig index 99574c3134..fc5f3a24c3 100644 --- a/configs/stout_defconfig +++ b/configs/stout_defconfig @@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y CONFIG_SH_ETHER=y CONFIG_BAUDRATE=38400 CONFIG_SCIF_CONSOLE=y +CONFIG_SH_QSPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 3d2cd2db00..a1f9373af1 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -245,6 +245,12 @@ config SH_SPI Enable the SuperH SPI controller driver. This driver can be used on various SuperH SoCs, such as SH7757. +config SH_QSPI + bool "Renesas Quad SPI driver" + help + Enable the Renesas Quad SPI controller driver. This driver can be + used on Renesas SoCs. + config TI_QSPI bool "TI QSPI driver" help diff --git a/include/configs/alt.h b/include/configs/alt.h index 84fc705a04..f9926b01a3 100644 --- a/include/configs/alt.h +++ b/include/configs/alt.h @@ -39,7 +39,6 @@ /* FLASH */ #define CONFIG_SPI -#define CONFIG_SH_QSPI #define CONFIG_SPI_FLASH_QUAD /* SH Ether */ diff --git a/include/configs/blanche.h b/include/configs/blanche.h index 4948bbb063..f2bbfca8b8 100755 --- a/include/configs/blanche.h +++ b/include/configs/blanche.h @@ -40,7 +40,6 @@ #if !defined(CONFIG_MTD_NOR_FLASH) #define CONFIG_SYS_TEXT_BASE 0x4000 #define CONFIG_SPI -#define CONFIG_SH_QSPI #define CONFIG_SH_QSPI_BASE0xE6B1 #else #define CONFIG_SYS_TEXT_BASE 0x diff --git a/include/configs/gose.h b/include/configs/gose.h index dcd2130080..dccea0962f 100644 --- a/include/configs/gose.h +++ b/include/configs/gose.h @@ -40,7 +40,6 @@ /* FLASH */ #define CONFIG_SPI -#define CONFIG_SH_QSPI /* SH Ether */ #define CONFIG_SH_ETHER_USE_PORT 0 diff --git a/include/configs/koelsch.h b/include/configs/koelsch.h index f1571a4576..ca644395f9 100644 --- a/include/configs/koelsch.h +++ b/include/configs/koelsch.h @@ -40,7 +40,6 @@ /* FLASH */ #define CONFIG_SPI -#define CONFIG_SH_QSPI /* SH Ether */ #define CONFIG_SH_ETHER_USE_PORT 0 diff --git a/include/configs/lager.h b/include/configs/lager.h
[U-Boot] [PATCH 0/8] Migrate SPI drivers to Kconfig
Hi all, This series migrates all the SPI drivers listed in drivers/spi/Makefile to Kconfig. Nothing else besides the usual moveconfig.py has been done, so please let me know if there's something to improve on. Tuomas Tynkkynen (8): spi: Migrate CONFIG_SH_SPI to Kconfig spi: Migrate CONFIG_SH_QSPI to Kconfig spi: Migrate CONFIG_MXS_SPI to Kconfig spi: Migrate CONFIG_MXC_SPI to Kconfig spi: Migrate CONFIG_MPC8XXX_SPI to Kconfig spi: Migrate CONFIG_LPC32XX_SSP to Kconfig spi: Migrate CONFIG_KIRKWOOD_SPI to Kconfig spi: Migrate CONFIG_CF_SPI to Kconfig README| 10 -- arch/arm/mach-kirkwood/include/mach/config.h | 1 - arch/arm/mach-mvebu/include/mach/config.h | 1 - configs/M52277EVB_defconfig | 1 + configs/M52277EVB_stmicro_defconfig | 1 + configs/M54418TWR_defconfig | 1 + configs/M54418TWR_nand_mii_defconfig | 1 + configs/M54418TWR_nand_rmii_defconfig | 1 + configs/M54418TWR_nand_rmii_lowfreq_defconfig | 1 + configs/M54418TWR_serial_mii_defconfig| 1 + configs/M54418TWR_serial_rmii_defconfig | 1 + configs/M54451EVB_defconfig | 1 + configs/M54451EVB_stmicro_defconfig | 1 + configs/M54455EVB_a66_defconfig | 1 + configs/M54455EVB_defconfig | 1 + configs/M54455EVB_i66_defconfig | 1 + configs/M54455EVB_intel_defconfig | 1 + configs/M54455EVB_stm33_defconfig | 1 + configs/MPC8349EMDS_defconfig | 1 + configs/alt_defconfig | 1 + configs/aristainetos2_defconfig | 1 + configs/aristainetos2b_defconfig | 1 + configs/aristainetos_defconfig| 1 + configs/bg0900_defconfig | 1 + configs/cgtqmx6eval_defconfig | 1 + configs/cl-som-imx7_defconfig | 1 + configs/clearfog_defconfig| 1 + configs/cm_fx6_defconfig | 1 + configs/controlcenterdc_defconfig | 1 + configs/d2net_v2_defconfig| 1 + configs/db-88f6720_defconfig | 1 + configs/db-88f6820-amc_defconfig | 1 + configs/db-88f6820-gp_defconfig | 1 + configs/db-mv784mp-gp_defconfig | 1 + configs/devkit3250_defconfig | 1 + configs/dh_imx6_defconfig | 1 + configs/display5_defconfig| 1 + configs/display5_factory_defconfig| 1 + configs/dms-ba16-1g_defconfig | 1 + configs/dms-ba16_defconfig| 1 + configs/dreamplug_defconfig | 1 + configs/ds109_defconfig | 1 + configs/ds414_defconfig | 1 + configs/flea3_defconfig | 1 + configs/ge_b450v3_defconfig | 1 + configs/ge_b650v3_defconfig | 1 + configs/ge_b850v3_defconfig | 1 + configs/gose_defconfig| 1 + configs/ids8313_defconfig | 1 + configs/imx31_phycore_eet_defconfig | 1 + configs/inetspace_v2_defconfig| 1 + configs/km_kirkwood_128m16_defconfig | 1 + configs/km_kirkwood_defconfig | 1 + configs/km_kirkwood_pci_defconfig | 1 + configs/kmcoge5un_defconfig | 1 + configs/kmnusa_defconfig | 1 + configs/kmsugp1_defconfig | 1 + configs/kmsuv31_defconfig | 1 + configs/koelsch_defconfig | 1 + configs/lager_defconfig | 1 + configs/lschlv2_defconfig | 1 + configs/lsxhl_defconfig | 1 + configs/m28evk_defconfig | 1 + configs/marsboard_defconfig | 1 + configs/maxbcm_defconfig | 1 + configs/mccmon6_nor_defconfig | 1 + configs/mccmon6_sd_defconfig | 1 + configs/mgcoge3un_defconfig | 1 + configs/mvebu_db_armada8k_defconfig | 1 + configs/mvebu_mcbin-88f8040_defconfig | 1 + configs/mx28evk_auart_console_defconfig | 1 + configs/mx28evk_defconfig | 1 + configs/mx28evk_nand_defconfig| 1 + configs/mx28evk_spi_defconfig | 1 + configs/mx31ads_defconfig | 1 + configs/mx31pdk_defconfig | 1 + configs/mx35pdk_defconfig | 1 + configs/mx51evk_defconfig | 1 + configs/mx6qsabrelite_defconfig | 1 + configs/mx6sabreauto_defconfig| 1 + configs/mx6sabresd_defconfig | 1 + configs/mx6slevk_defconfig
[U-Boot] [PATCH 1/8] spi: Migrate CONFIG_SH_SPI to Kconfig
Signed-off-by: Tuomas Tynkkynen--- README | 5 - configs/sh7752evb_defconfig | 1 + configs/sh7753evb_defconfig | 1 + configs/sh7757lcr_defconfig | 1 + drivers/spi/Kconfig | 6 ++ include/configs/sh7752evb.h | 1 - include/configs/sh7753evb.h | 1 - include/configs/sh7757lcr.h | 1 - scripts/config_whitelist.txt | 1 - 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README b/README index b055ae7ef2..4044e8575f 100644 --- a/README +++ b/README @@ -2001,11 +2001,6 @@ The following options need to be configured: SPI EEPROM, also an instance works with Crystal A/D and D/As on the SACSng board) - CONFIG_SH_SPI - - Enables the driver for SPI controller on SuperH. Currently - only SH7757 is supported. - CONFIG_SOFT_SPI Enables a software (bit-bang) SPI driver rather than diff --git a/configs/sh7752evb_defconfig b/configs/sh7752evb_defconfig index bbab9c06f3..d56992dc0a 100644 --- a/configs/sh7752evb_defconfig +++ b/configs/sh7752evb_defconfig @@ -36,4 +36,5 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_NETDEVICES=y CONFIG_SH_ETHER=y CONFIG_SCIF_CONSOLE=y +CONFIG_SH_SPI=y CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/configs/sh7753evb_defconfig b/configs/sh7753evb_defconfig index 919e00d5a4..c50285a146 100644 --- a/configs/sh7753evb_defconfig +++ b/configs/sh7753evb_defconfig @@ -35,4 +35,5 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_NETDEVICES=y CONFIG_SH_ETHER=y CONFIG_SCIF_CONSOLE=y +CONFIG_SH_SPI=y CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/configs/sh7757lcr_defconfig b/configs/sh7757lcr_defconfig index e47bbcf175..3a3a8c9e63 100644 --- a/configs/sh7757lcr_defconfig +++ b/configs/sh7757lcr_defconfig @@ -35,4 +35,5 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_NETDEVICES=y CONFIG_SH_ETHER=y CONFIG_SCIF_CONSOLE=y +CONFIG_SH_SPI=y CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 1e95dc4559..3d2cd2db00 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -239,6 +239,12 @@ config DAVINCI_SPI help Enable the Davinci SPI driver +config SH_SPI + bool "SuperH SPI driver" + help + Enable the SuperH SPI controller driver. This driver can be used + on various SuperH SoCs, such as SH7757. + config TI_QSPI bool "TI QSPI driver" help diff --git a/include/configs/sh7752evb.h b/include/configs/sh7752evb.h index ee57eb2fd1..401c2e550a 100644 --- a/include/configs/sh7752evb.h +++ b/include/configs/sh7752evb.h @@ -63,7 +63,6 @@ #define SH7752EVB_ETHERNET_NUM_CH 2 /* SPI */ -#define CONFIG_SH_SPI 1 #define CONFIG_SH_SPI_BASE 0xfe002000 /* MMCIF */ diff --git a/include/configs/sh7753evb.h b/include/configs/sh7753evb.h index e7f9f61974..6db33ed41d 100644 --- a/include/configs/sh7753evb.h +++ b/include/configs/sh7753evb.h @@ -63,7 +63,6 @@ #define SH7753EVB_ETHERNET_NUM_CH 2 /* SPI */ -#define CONFIG_SH_SPI 1 #define CONFIG_SH_SPI_BASE 0xfe002000 /* MMCIF */ diff --git a/include/configs/sh7757lcr.h b/include/configs/sh7757lcr.h index a2b3307804..5f720c20e2 100644 --- a/include/configs/sh7757lcr.h +++ b/include/configs/sh7757lcr.h @@ -65,7 +65,6 @@ #define SH7757LCR_GIGA_ETHERNET_NUM_CH 2 /* SPI */ -#define CONFIG_SH_SPI 1 #define CONFIG_SH_SPI_BASE 0xfe002000 /* MMCIF */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index ef83c00c1b..dabc171f1e 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1909,7 +1909,6 @@ CONFIG_SH_QSPI_BASE CONFIG_SH_SCIF_CLK_FREQ CONFIG_SH_SDHI_FREQ CONFIG_SH_SDRAM_OFFSET -CONFIG_SH_SPI CONFIG_SH_SPI_BASE CONFIG_SH_TMU_CLK_FREQ CONFIG_SIEMENS_DRACO -- 2.16.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] configs: Migrate CONFIG_SYS_TEXT_BASE
On Sat, Feb 3, 2018 at 11:10 AM, Tom Riniwrote: > On the NIOS2 and Xtensa architectures, we do not have > CONFIG_SYS_TEXT_BASE set. This is a strict migration of the current > values into the defconfig and removing them from the headers. > > I did not attempt to add more default values in and for now will leave > that to maintainers. > > Signed-off-by: Tom Rini > --- > What I wonder about, at this point, would be how hard it would be to add > imply FOO hex/int/str/etc value to the imply keyword. I don't want to > see 100 lines worth of default 0xX if Y || Z for CONFIG_SYS_TEXT_BASE as > that will be unmaintainable. > --- [snip] > new boards should not use this option. > > config SYS_TEXT_BASE > - depends on ARC || X86 || ARCH_UNIPHIER || ARCH_ZYNQMP || \ > - (M68K && !TARGET_ASTRO_MCF5373L) || MICROBLAZE || MIPS || \ > - ARCH_ZYNQ || ARCH_KEYSTONE || ARCH_OMAP2PLUS > + depends on !NIOS2 && !XTENSA > depends on !EFI_APP > + default 0x8080 if ARCH_OMAP2PLUS > hex "Text Base" > help > - TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture > + The address in memory that U-Boot will be running from, initially. > > - default 0x8080 if ARCH_OMAP2PLUS > I have a question. I don't think anything is wrong, but doc/SPL/README.omap3 shows two different options for CONFIG_SYS_TEXT_BASE and neither of them are 0x8080 Option 1 (SPL only): 0x8010: CONFIG_SYS_TEXT_BASE of U-Boot Option 2 (SPL or X-Loader): 0x80008000: CONFIG_SYS_TEXT_BASE of U-Boot I'm sure it's probably been this way for a while, but when reviewing the omap3_logic board (am/dm37), I noticed it's currenly using 0x8080, but I am not sure how the rest of the memory map from the readme applies. Does this README file need to be updated or deleted? Will we have any memory conflicts or overlap? adam [snip] ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [RFC PATCH] net: gem: Add support for more PHYs on MDIO bus
On Mon, Feb 5, 2018 at 1:17 AM, Michal Simekwrote: > Hi Joe, > > On 2.2.2018 20:35, Joe Hershberger wrote: >> Hi Michal, >> >> On Thu, Feb 1, 2018 at 6:42 AM, Michal Simek wrote: >>> Find out MDIO bus and enable MDIO access to it if this is done via >>> different controller. >>> >>> Signed-off-by: Michal Simek >>> --- >>> >>> Hi Joe, >>> >>> this is the code I have hacked a year ago for ZynqMP where we can have >>> configuration that 4 gems are enabled but they share the same MDIO bus >>> which can be assigned to only gem. Normally recommendation is that you >>> should assign it to IP which is required for boot and this is suitable I >>> would say for almost everybody. >>> But for testing purpose it will be good to support sharing mdio bus >>> between others IPs. This hack is "enabling" this for others gem but not >>> across different ethernet drivers. >> >> Seems practical. >> >>> And my question is if there is any solution which can be used now for >>> handling it. Or even this should work even now but we do something >>> wrong. >> >> I would envision some DM way to model the NIC, the MDIO bus, and the >> PHY separately. The big roadblock is that the DTS format is different >> for every NIC. > > Is it really that different? There should be phy handle which is > pointing to actual phy and that should be enough to recognize parents > and IP responsible for MDIO bus. The point is different drivers express the relationship with varying levels of implication, so there are a number of ways people describe it. >>> I am refreshing this topic based on communication with Tomasz >>> Gorochowik when he wanted to separate mdio part but it is not compatible >>> with solution used in Linux which is pattern we should follow. >> >> We do the same thing on our 7020 products. > > What exactly are you doing on 7020? We are using a single MDIO interface to connect the PHYs for 2 GEMs. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/1] efi_loader: add missing EFI_RESET_PLATFORM_SPECIFIC
EFI_RESET_PLATFORM_SPECIFIC is one of the values that can be used for the EFI service ResetSystem. The missing definition is added. The value has to handled in efi_reset_system(). Signed-off-by: Heinrich Schuchardt--- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + arch/arm/cpu/armv8/fwcall.c | 1 + arch/arm/mach-bcm283x/reset.c | 1 + include/efi_api.h | 3 ++- lib/efi_loader/efi_runtime.c| 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 70a6070935..ba4c4bbbc9 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -644,6 +644,7 @@ void __efi_runtime EFIAPI efi_reset_system( switch (reset_type) { case EFI_RESET_COLD: case EFI_RESET_WARM: + case EFI_RESET_PLATFORM_SPECIFIC: reset_cpu(0); break; case EFI_RESET_SHUTDOWN: diff --git a/arch/arm/cpu/armv8/fwcall.c b/arch/arm/cpu/armv8/fwcall.c index c220267536..ff0712bf65 100644 --- a/arch/arm/cpu/armv8/fwcall.c +++ b/arch/arm/cpu/armv8/fwcall.c @@ -146,6 +146,7 @@ void __efi_runtime EFIAPI efi_reset_system( switch (reset_type) { case EFI_RESET_COLD: case EFI_RESET_WARM: + case EFI_RESET_PLATFORM_SPECIFIC: psci_system_reset(); break; case EFI_RESET_SHUTDOWN: diff --git a/arch/arm/mach-bcm283x/reset.c b/arch/arm/mach-bcm283x/reset.c index b62cb8a51e..88ca165773 100644 --- a/arch/arm/mach-bcm283x/reset.c +++ b/arch/arm/mach-bcm283x/reset.c @@ -63,6 +63,7 @@ void __efi_runtime EFIAPI efi_reset_system( switch (reset_type) { case EFI_RESET_COLD: case EFI_RESET_WARM: + case EFI_RESET_PLATFORM_SPECIFIC: reset_cpu(0); break; case EFI_RESET_SHUTDOWN: diff --git a/include/efi_api.h b/include/efi_api.h index 3ba650e57e..abab3a8b3a 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -180,7 +180,8 @@ struct efi_boot_services { enum efi_reset_type { EFI_RESET_COLD = 0, EFI_RESET_WARM = 1, - EFI_RESET_SHUTDOWN = 2 + EFI_RESET_SHUTDOWN = 2, + EFI_RESET_PLATFORM_SPECIFIC = 3, }; /* EFI Runtime Services table */ diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index efe2ba4814..d7c2c1e430 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -80,6 +80,7 @@ static void EFIAPI efi_reset_system_boottime( switch (reset_type) { case EFI_RESET_COLD: case EFI_RESET_WARM: + case EFI_RESET_PLATFORM_SPECIFIC: do_reset(NULL, 0, 0, NULL); break; case EFI_RESET_SHUTDOWN: -- 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] arm: i.MX: Add CMD_NANDBCB Kconfig entry
On Wed, 7 Feb 2018, Jagan Teki wrote: Add Kconfig entry for CMD_NANDBCB, and default y on i.MX6 platform with NAND_MXS defined. Signed-off-by: Jagan Teki--- Changes for v2: - New patch arch/arm/mach-imx/Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 3aec89d..a8c1239 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -71,6 +71,17 @@ config CMD_HDMIDETECT This enables the 'hdmidet' command which detects if an HDMI monitor is connected. +config CMD_NANDBCB + bool "i.MX6 NAND Boot Control Block(BCB) command" + depends on NAND && CMD_MTDPARTS + default y if ARCH_MX6 && NAND_MXS + help + Unlike normal 'nand write/erase' commands, this command update + Boot Control Block(BCB) for i.MX6 platform NAND IP's. + + This is similar to kobs-ng, which is used in Linux as seprate ^^^ Typo here + rootfs package. + config NXP_BOARD_REVISION bool "Read NXP board revision from fuses" depends on ARCH_MX6 || ARCH_MX7 -- 2.7.4 --- ** * KSI@homeKOI8 Net < > The impossible we do immediately. * * Las Vegas NV, USA < > Miracles require 24-hour notice. * ** ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1 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--- 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 880a56ba90..9c5cde1b9e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -742,6 +742,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
[U-Boot] [PATCH v1 4/4] Convert CONFIG_HW_WATCHDOG to Kconfig
The CONFIG_HW_WATCHDOG declaration has been converted to Kconfig Signed-off-by: Lukasz Majewski--- 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 +++
[U-Boot] [PATCH v1 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--- 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 288dab0d3c..a3aa71ad13 100644 --- a/configs/aristainetos2_defconfig +++ b/configs/aristainetos2_defconfig @@ -43,4 +43,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 115ae07ad6..8128ffc957 100644 --- a/configs/aristainetos2b_defconfig +++ b/configs/aristainetos2b_defconfig @@ -43,4 +43,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 cad8b4af8a..153cd54b8e 100644 --- a/configs/aristainetos_defconfig +++ b/configs/aristainetos_defconfig @@ -41,4 +41,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 397afbb408..733563cc73 100644 --- a/include/configs/aristainetos-common.h +++ b/include/configs/aristainetos-common.h @@ -202,9 +202,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 1f26ef4f8f..7b47fc6887 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -126,8 +126,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 92dd845c70..4fa850d211 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 8000
[U-Boot] [PATCH v2 2/2] arm: i.MX: Add CMD_NANDBCB Kconfig entry
Add Kconfig entry for CMD_NANDBCB, and default y on i.MX6 platform with NAND_MXS defined. Signed-off-by: Jagan Teki--- Changes for v2: - New patch arch/arm/mach-imx/Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 3aec89d..a8c1239 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -71,6 +71,17 @@ config CMD_HDMIDETECT This enables the 'hdmidet' command which detects if an HDMI monitor is connected. +config CMD_NANDBCB + bool "i.MX6 NAND Boot Control Block(BCB) command" + depends on NAND && CMD_MTDPARTS + default y if ARCH_MX6 && NAND_MXS + help + Unlike normal 'nand write/erase' commands, this command update + Boot Control Block(BCB) for i.MX6 platform NAND IP's. + + This is similar to kobs-ng, which is used in Linux as seprate + rootfs package. + config NXP_BOARD_REVISION bool "Read NXP board revision from fuses" depends on ARCH_MX6 || ARCH_MX7 -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/2] i.MX6: nand: add nandbcb update command
Writing/updating boot image in nand device is not straight forward in i.MX6 platform and it requires boot control block(BCB) to be configured. It becomes difficult to use uboot 'nand' command to write BCB since it requires platform specific attributes need to be taken care of. It is even difficult to use existing msx-nand.c driver by incorporating BCB attributes like mxs_dma_desc does because it requires change in mtd and nand command. So, cmd_nandbcb implemented in arch/arm/mach-imx BCB contains two data structures, Firmware Configuration Block(FCB) and Discovered Bad Block Table(DBBT). FCB has nand timings, DBBT search area, page address of primary and secondary firmware. On summary, nandbcb update will - erase the entire partition - create BCB by creating 4 FCB/BDDT block followed by 2 FW blocks based on partition size and erasesize. - fill FCB/DBBT structures - write FW/SPL in FW0 and FW1(same image in two times) - write FCB/DBBT in first 4 blocks for nand boot, up on reset bootrom look for FCB structure in first block's if FCB found the nand timings are loaded for further reads. once FCB read done, DTTB will load and finally primary or secondary firmware will load which is boot image. See Section 4 from doc/README.imx6 for more usage information. Signed-off-by: Sergey KubushynSigned-off-by: Jagan Teki --- Changes for v2: - Fixed commit message notes - Updated proper commit message - Update doc/README.imx6 with NAND boot details - Fixed long length variable names. - Fixed Gigantic variable name. - NULL checks for kzalloc - Move Kconfig option in separate patch - Fixed checkpatch warninigs arch/arm/include/asm/mach-imx/imx-nandbcb.h | 107 arch/arm/include/asm/mach-imx/mxs-nand.h| 15 ++ arch/arm/mach-imx/Makefile | 1 + arch/arm/mach-imx/cmd_nandbcb.c | 371 doc/README.imx6 | 77 ++ drivers/mtd/nand/mxs_nand.c | 8 +- 6 files changed, 575 insertions(+), 4 deletions(-) create mode 100644 arch/arm/include/asm/mach-imx/imx-nandbcb.h create mode 100644 arch/arm/include/asm/mach-imx/mxs-nand.h create mode 100644 arch/arm/mach-imx/cmd_nandbcb.c diff --git a/arch/arm/include/asm/mach-imx/imx-nandbcb.h b/arch/arm/include/asm/mach-imx/imx-nandbcb.h new file mode 100644 index 000..807b16b --- /dev/null +++ b/arch/arm/include/asm/mach-imx/imx-nandbcb.h @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2017 Jagan Teki + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef _IMX_NAND_BCB_H_ +#define _IMX_NAND_BCB_H_ + +#define FCB_FINGERPRINT0x20424346 /* 'FCB' */ +#define FCB_VERSION_1 0x0100 + +#define DBBT_FINGERPRINT2 0x54424244 /* 'DBBT' */ +#define DBBT_VERSION_1 0x0100 + +struct dbbt_block { + u32 checksum; /* reserved on i.MX6 */ + u32 fingerprint; + u32 version; + u32 numberbb; /* reserved on i.MX6 */ + u32 dbbtnumofpages; +}; + +struct fcb_block { + u32 checksum; /* First fingerprint in first byte */ + u32 fingerprint;/* 2nd fingerprint at byte 4 */ + u32 version;/* 3rd fingerprint at byte 8 */ + u8 datasetup; + u8 datahold; + u8 addresssetup; + u8 dsample_time; + + /* These are for application use only and not for ROM. */ + u8 nandtiming; + u8 rea; + u8 rloh; + u8 rhoh; + u32 pagesize; /* 2048 for 2K pages, 4096 for 4K pages */ + u32 oob_pagesize; /* 2112 for 2K pages, 4314 for 4K pages */ + u32 sectors;/* Number of 2K sections per block */ + u32 nr_nand;/* Total Number of NANDs - not used by ROM */ + u32 nr_die; /* Number of separate chips in this NAND */ + u32 celltype; /* MLC or SLC */ + u32 ecc_type; /* Type of ECC, can be one of BCH-0-20 */ + u32 ecc_nr; /* Number of bytes for Block0 - BCH */ + + /* Block size in bytes for all blocks other than Block0 - BCH */ + u32 ecc_size; + u32 ecc_level; /* Ecc level for Block 0 - BCH */ + u32 meta_size; /* Metadata size - BCH */ + /* Number of blocks per page for ROM use - BCH */ + u32 nr_blocks; + u32 ecc_type_sdk; /* Type of ECC, can be one of BCH-0-20 */ + u32 ecc_nr_sdk; /* Number of bytes for Block0 - BCH */ + /* Block size in bytes for all blocks other than Block0 - BCH */ + u32 ecc_size_sdk; + u32 ecc_level_sdk; /* Ecc level for Block 0 - BCH */ + /* Number of blocks per page for SDK use - BCH */ + u32 nr_blocks_sdk; + u32 meta_size_sdk; /* Metadata size - BCH */ + u32 erase_th; /* To set into BCH_MODE register */ + + /* 0: normal boot +* 1: to load patch starting next
Re: [U-Boot] [PATCH] Kconfig: net: phylib: Phylib should depends on NET
On Tue, Feb 6, 2018 at 6:23 AM, Michal Simekwrote: > There is no value to enable phylib without networking support. > > Signed-off-by: Michal Simek Acked-by: Joe Hershberger ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] Move most CONFIG_HAVE_BLOCK_DEVICE to Kconfig
config_fallbacks.h has some logic that sets HAVE_BLOCK_DEVICE based on a list of enabled options. Moving HAVE_BLOCK_DEIVCE to Kconfig allows us to drastically shrink the logic in config_fallbacks.h Signed-off-by: Adam Ford--- arch/Kconfig | 1 + cmd/Kconfig| 3 +++ drivers/ata/Kconfig| 1 + drivers/block/Kconfig | 6 ++ drivers/mmc/Kconfig| 1 + drivers/nvme/Kconfig | 1 + drivers/scsi/Kconfig | 1 + include/config_fallbacks.h | 10 +- 8 files changed, 15 insertions(+), 9 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 5d57d6d..3079f0d 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -74,6 +74,7 @@ config SANDBOX select DM_SPI select DM_GPIO select DM_MMC + select CONFIG_SANDBOX select LZO imply CMD_GETTIME imply CMD_HASH diff --git a/cmd/Kconfig b/cmd/Kconfig index 4d9ef87..26de43f 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -672,6 +672,7 @@ config CMD_GPT bool "GPT (GUID Partition Table) command" select PARTITION_UUIDS select EFI_PARTITION + select CONFIG_HAVE_BLOCK_DEVICE imply RANDOM_UUID help Enable the 'gpt' command to ready and write GPT style partition @@ -819,6 +820,7 @@ config CMD_ONENAND config CMD_PART bool "part" select PARTITION_UUIDS + select CONFIG_HAVE_BLOCK_DEVICE help Read and display information about the partition table on various media. @@ -911,6 +913,7 @@ config CMD_UNIVERSE config CMD_USB bool "usb" + select CONFIG_HAVE_BLOCK_DEVICE help USB support. diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 990de72..86ec628 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -9,6 +9,7 @@ config AHCI config SATA bool "Support SATA controllers" + select HAVE_BLOCK_DEVICE help This enables support for SATA (Serial Advanced Technology Attachment), a serial bus standard for connecting to hard drives and diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 2676089..81a4085 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -10,6 +10,11 @@ config BLK be partitioned into several areas, called 'partitions' in U-Boot. A filesystem can be placed in each partition. +config HAVE_BLOCK_DEVICE + bool "Enable Legacy Block Device" + help + Some devices require block support whether or not DM is enabled + config SPL_BLK bool "Support block devices in SPL" depends on SPL_DM && BLK @@ -33,6 +38,7 @@ config BLOCK_CACHE config IDE bool "Support IDE controllers" + select HAVE_BLOCK_DEVICE help Enables support for IDE (Integrated Drive Electronics) hard drives. This allows access to raw blocks and filesystems on an IDE drive diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index a1b21fd..d12a166 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -3,6 +3,7 @@ menu "MMC Host controller Support" config MMC bool "MMC/SD/SDIO card support" default ARM || PPC || SANDBOX + select CONFIG_HAVE_BLOCK_DEVICE help This selects MultiMediaCard, Secure Digital and Secure Digital I/O support. diff --git a/drivers/nvme/Kconfig b/drivers/nvme/Kconfig index cad8dbc..67d9171 100644 --- a/drivers/nvme/Kconfig +++ b/drivers/nvme/Kconfig @@ -7,6 +7,7 @@ config NVME bool "NVM Express device support" depends on BLK && PCI + select CONFIG_HAVE_BLOCK_DEVICE help This option enables support for NVM Express devices. It supports basic functions of NVMe (read/write). diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index db1606e..c061620 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1,5 +1,6 @@ config SCSI bool "Support SCSI controllers" + select CONFIG_HAVE_BLOCK_DEVICE help This enables support for SCSI (Small Computer System Interface), a parallel interface widely used with storage peripherals such as diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h index c0f23e0..99b50d1 100644 --- a/include/config_fallbacks.h +++ b/include/config_fallbacks.h @@ -30,15 +30,7 @@ #endif /* Rather than repeat this expression each time, add a define for it */ -#if defined(CONFIG_IDE) || \ - defined(CONFIG_SATA) || \ - defined(CONFIG_SCSI) || \ - defined(CONFIG_CMD_USB) || \ - defined(CONFIG_CMD_PART) || \ - defined(CONFIG_CMD_GPT) || \ - defined(CONFIG_MMC) || \ - defined(CONFIG_NVME) || \ - defined(CONFIG_SYSTEMACE) || \ +#ifdefined(CONFIG_SYSTEMACE) || \ (defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD)) || \ defined(CONFIG_SANDBOX) #define
Re: [U-Boot] [PATCH] NET: designware: fix clock enable
On Tue, Feb 6, 2018 at 8:12 AM, Eugeniy Paltsevwrote: > After commit ba1f966725223 "net: designware: add clock support" > we got NET broken on axs101 and axs103 platforms. > > Some clock don't support gating so their clock drivers don't > implement .enable/.disable callbacks. In such case clk_enable > returns -ENOSYS. > Also some clock drivers implement .enable/.disable callbacks not for all > clock IDs and return -ENOSYS (or -ENOTSUPP) for others. > > If we have such clock in 'clocks' list of designware ethernet controller > node we fail to probe designware ethernet. > > Fix it. > > Signed-off-by: Eugeniy Paltsev Acked-by: Joe Hershberger ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] Convert LIB_UUID to Kconfig
config_fallback.h has some logic that checks a variety of options and selects LIB_UUID if it hasn't already been selected. This will all LIB_UUID in Kconfig and select this option for the list of options to allow us to remove the logic from fallbacks Signed-off-by: Adam Ford--- Based on [PATCH V2 1/2] Convert CONFIG_BOOTP_BOOTPATH et al to Kconfig cmd/Kconfig| 2 ++ disk/Kconfig | 2 ++ include/config_fallbacks.h | 10 -- lib/Kconfig| 3 +++ lib/efi_loader/Kconfig | 1 + net/Kconfig| 1 + 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 790c404..4d9ef87 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -679,6 +679,7 @@ config CMD_GPT config RANDOM_UUID bool "GPT Random UUID generation" + select LIB_UUID help Enable the generation of partitions with random UUIDs if none are provided. @@ -1180,6 +1181,7 @@ config CMD_TERMINAL config CMD_UUID bool "uuid, guid - generation of unique IDs" + select LIB_UUID help This enables two commands: diff --git a/disk/Kconfig b/disk/Kconfig index 0446bb6..f3050cf 100644 --- a/disk/Kconfig +++ b/disk/Kconfig @@ -72,6 +72,7 @@ config EFI_PARTITION depends on PARTITIONS default y if DISTRO_DEFAULTS default y if TEGRA + select LIB_UUID help Say Y here if you would like to use device under U-Boot which were partitioned using EFI GPT. @@ -115,6 +116,7 @@ config PARTITION_UUIDS depends on PARTITIONS default y if DISTRO_DEFAULTS default y if EFI_PARTITION + select LIB_UUID help Activate the configuration of UUID for partition diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h index c11abe6..70013fe 100644 --- a/include/config_fallbacks.h +++ b/include/config_fallbacks.h @@ -44,16 +44,6 @@ #define HAVE_BLOCK_DEVICE #endif -#if (CONFIG_IS_ENABLED(PARTITION_UUIDS) || \ - CONFIG_IS_ENABLED(EFI_PARTITION) || \ - CONFIG_IS_ENABLED(EFI_LOADER) || \ - defined(CONFIG_RANDOM_UUID) || \ - defined(CONFIG_CMD_UUID) || \ - defined(CONFIG_BOOTP_PXE)) && \ - !defined(CONFIG_LIB_UUID) -#define CONFIG_LIB_UUID -#endif - /* Console I/O Buffer Size */ #ifndef CONFIG_SYS_CBSIZE #if defined(CONFIG_CMD_KGDB) diff --git a/lib/Kconfig b/lib/Kconfig index 8b8d5b8..625692c 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -18,6 +18,9 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED config HAVE_PRIVATE_LIBGCC bool +config LIB_UUID + bool + config USE_PRIVATE_LIBGCC bool "Use private libgcc" depends on HAVE_PRIVATE_LIBGCC diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index 827c267..5461833 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -6,6 +6,7 @@ config EFI_LOADER # We need EFI_STUB_32BIT to be set on x86_32 with EFI_STUB depends on !EFI_STUB || !X86 || X86_64 || EFI_STUB_32BIT default y + select LIB_UUID help Select this option if you want to run EFI applications (like grub2) on top of U-Boot. If this option is enabled, U-Boot will expose EFI diff --git a/net/Kconfig b/net/Kconfig index f05c0f9..94536fc 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -51,6 +51,7 @@ config BOOTP_HOSTNAME config BOOTP_PXE bool "Enable BOOTP PXE" default y + select LIB_UUID config BOOTP_SUBNETMASK bool "Enable BOOTP subnetmask" -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] arm: sunxi: Move spl spi sunxi code to mach-sunxi
This SUNXI variant SPL SPI code doesn't use either SPI or SPL_FLASG subsystems due to size constraints and also placing this code in drivers/mtd/spi will unnecessary build SPI_FLASH code(if defined) which never required, hence moved to arch area. And also renamed the file according to kconfig which resembles proper name. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 8 arch/arm/mach-sunxi/Makefile| 1 + .../sunxi_spi_spl.c => arch/arm/mach-sunxi/spl_spi_sunxi.c | 0 drivers/mtd/spi/Kconfig | 13 - drivers/mtd/spi/Makefile| 1 - 5 files changed, 9 insertions(+), 14 deletions(-) rename drivers/mtd/spi/sunxi_spi_spl.c => arch/arm/mach-sunxi/spl_spi_sunxi.c (100%) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 1fededd..dc48eef 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -847,4 +847,12 @@ config SPL_STACK_R_ADDR default 0x2fe0 if MACH_SUN9I default 0x4fe0 if MACH_SUN50I +config SPL_SPI_SUNXI + bool "Support for SPI Flash on Allwinner SoCs in SPL" + depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I + help + Enable support for SPI Flash. This option allows SPL to read from + sunxi SPI Flash. It uses the same method as the boot ROM, so does + not need any extra configuration. + endif diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 2a3c379..6ddf682 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_MACH_SUN7I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o +obj-$(CONFIG_SPL_SPI_SUNXI)+= spl_spi_sunxi.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_sunxi_dw.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_timings/ obj-$(CONFIG_MACH_SUN9I) += dram_sun9i.o diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c similarity index 100% rename from drivers/mtd/spi/sunxi_spi_spl.c rename to arch/arm/mach-sunxi/spl_spi_sunxi.c diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index 6ba255d..4484cf8 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -135,17 +135,4 @@ config SPI_FLASH_MTD If unsure, say N -if SPL - -config SPL_SPI_SUNXI - bool "Support for SPI Flash on Allwinner SoCs in SPL" - depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I - select SPL_SPI_FLASH_SUPPORT - ---help--- - Enable support for SPI Flash. This option allows SPL to read from - sunxi SPI Flash. It uses the same method as the boot ROM, so does - not need any extra configuration. - -endif - endmenu # menu "SPI Flash Support" diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index fcda023..4be6e9b 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -9,7 +9,6 @@ obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o -obj-$(CONFIG_SPL_SPI_SUNXI)+= sunxi_spi_spl.o endif obj-$(CONFIG_SPI_FLASH) += sf_probe.o spi_flash.o spi_flash_ids.o sf.o -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/2] configs: Migrate CONFIG_SPL_FRAMEWORK
Migrate the option CONFIG_SPL_FRAMEWORK and make this gate most of the current set of options we have in Kconfig. We will need to have some options available for SPL and !SPL_FRAMEWORK so this is important. In a few cases we re-order existing options so that we have less escapes from the SPL_FRAMEWORK guard. Signed-off-by: Tom Rini--- README | 5 - common/spl/Kconfig | 10 +- configs/B4420QDS_NAND_defconfig| 1 + configs/B4860QDS_NAND_defconfig| 1 + configs/BSC9131RDB_NAND_SYSCLK100_defconfig| 1 + configs/BSC9131RDB_NAND_defconfig | 1 + configs/BSC9132QDS_NAND_DDRCLK100_defconfig| 1 + configs/BSC9132QDS_NAND_DDRCLK133_defconfig| 1 + configs/C29XPCIE_NAND_defconfig| 1 + configs/MPC8313ERDB_NAND_33_defconfig | 1 + configs/MPC8313ERDB_NAND_66_defconfig | 1 + configs/P1010RDB-PA_36BIT_NAND_defconfig | 1 + configs/P1010RDB-PA_36BIT_SDCARD_defconfig | 1 + configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig | 1 + configs/P1010RDB-PA_NAND_defconfig | 1 + configs/P1010RDB-PA_SDCARD_defconfig | 1 + configs/P1010RDB-PA_SPIFLASH_defconfig | 1 + configs/P1010RDB-PB_36BIT_NAND_defconfig | 1 + configs/P1010RDB-PB_36BIT_SDCARD_defconfig | 1 + configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig | 1 + configs/P1010RDB-PB_NAND_defconfig | 1 + configs/P1010RDB-PB_SDCARD_defconfig | 1 + configs/P1010RDB-PB_SPIFLASH_defconfig | 1 + configs/P1020MBG-PC_36BIT_SDCARD_defconfig | 1 + configs/P1020MBG-PC_SDCARD_defconfig | 1 + configs/P1020RDB-PC_36BIT_NAND_defconfig | 1 + configs/P1020RDB-PC_36BIT_SDCARD_defconfig | 1 + configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig | 1 + configs/P1020RDB-PC_NAND_defconfig | 1 + configs/P1020RDB-PC_SDCARD_defconfig | 1 + configs/P1020RDB-PC_SPIFLASH_defconfig | 1 + configs/P1020RDB-PD_NAND_defconfig | 1 + configs/P1020RDB-PD_SDCARD_defconfig | 1 + configs/P1020RDB-PD_SPIFLASH_defconfig | 1 + configs/P1020UTM-PC_36BIT_SDCARD_defconfig | 1 + configs/P1020UTM-PC_SDCARD_defconfig | 1 + configs/P1021RDB-PC_36BIT_NAND_defconfig | 1 + configs/P1021RDB-PC_36BIT_SDCARD_defconfig | 1 + configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig | 1 + configs/P1021RDB-PC_NAND_defconfig | 1 + configs/P1021RDB-PC_SDCARD_defconfig | 1 + configs/P1021RDB-PC_SPIFLASH_defconfig | 1 + configs/P1022DS_36BIT_NAND_defconfig | 1 + configs/P1022DS_36BIT_SDCARD_defconfig | 1 + configs/P1022DS_36BIT_SPIFLASH_defconfig | 1 + configs/P1022DS_NAND_defconfig | 1 + configs/P1022DS_SDCARD_defconfig | 1 + configs/P1022DS_SPIFLASH_defconfig | 1 + configs/P1024RDB_NAND_defconfig| 1 + configs/P1024RDB_SDCARD_defconfig | 1 + configs/P1024RDB_SPIFLASH_defconfig| 1 + configs/P1025RDB_NAND_defconfig| 1 + configs/P1025RDB_SDCARD_defconfig | 1 + configs/P1025RDB_SPIFLASH_defconfig| 1 + configs/P2020RDB-PC_36BIT_NAND_defconfig | 1 + configs/P2020RDB-PC_36BIT_SDCARD_defconfig | 1 + configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig | 1 + configs/P2020RDB-PC_NAND_defconfig | 1 + configs/P2020RDB-PC_SDCARD_defconfig | 1 + configs/P2020RDB-PC_SPIFLASH_defconfig | 1 + configs/T1023RDB_NAND_defconfig| 1 + configs/T1023RDB_SDCARD_defconfig | 1 + configs/T1023RDB_SPIFLASH_defconfig| 1 + configs/T1024QDS_NAND_defconfig| 1 + configs/T1024QDS_SDCARD_defconfig | 1 + configs/T1024QDS_SPIFLASH_defconfig| 1 + configs/T1024RDB_NAND_defconfig| 1 + configs/T1024RDB_SDCARD_defconfig | 1 + configs/T1024RDB_SPIFLASH_defconfig| 1 + configs/T1040D4RDB_NAND_defconfig | 1 + configs/T1040D4RDB_SDCARD_defconfig| 1 + configs/T1040D4RDB_SPIFLASH_defconfig | 1 + configs/T1040RDB_NAND_defconfig| 1 + configs/T1040RDB_SDCARD_defconfig | 1 + configs/T1040RDB_SPIFLASH_defconfig| 1 + configs/T1042D4RDB_NAND_defconfig | 1 + configs/T1042D4RDB_SDCARD_defconfig| 1 + configs/T1042D4RDB_SPIFLASH_defconfig | 1 + configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig | 1 + configs/T1042RDB_PI_NAND_defconfig | 1 + configs/T1042RDB_PI_SDCARD_defconfig | 1 + configs/T1042RDB_PI_SPIFLASH_defconfig | 1 + configs/T2080QDS_NAND_defconfig| 1 + configs/T2080QDS_SDCARD_defconfig | 1 +
[U-Boot] [PATCH 1/2] configs: Drop unused CONFIG_SPL_MMC_MINIMAL
The option CONFIG_SPL_MMC_MINIMAL is unused in code, drop it. Signed-off-by: Tom Rini--- include/configs/P1010RDB.h | 1 - include/configs/P1022DS.h | 1 - include/configs/T102xQDS.h | 1 - include/configs/T102xRDB.h | 1 - include/configs/T104xRDB.h | 1 - include/configs/T208xQDS.h | 1 - include/configs/T208xRDB.h | 1 - include/configs/T4240QDS.h | 1 - include/configs/T4240RDB.h | 1 - include/configs/p1_p2_rdb_pc.h | 1 - scripts/config_whitelist.txt | 1 - 11 files changed, 11 deletions(-) diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h index 6a444aea61a5..a55f170f4042 100644 --- a/include/configs/P1010RDB.h +++ b/include/configs/P1010RDB.h @@ -15,7 +15,6 @@ #define CONFIG_NAND_FSL_IFC #ifdef CONFIG_SDCARD -#define CONFIG_SPL_MMC_MINIMAL #define CONFIG_SPL_FLUSH_IMAGE #define CONFIG_SPL_TARGET "u-boot-with-spl.bin" #define CONFIG_SYS_TEXT_BASE 0x11001000 diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h index 30e20bc6e48a..3bf7e01e 100644 --- a/include/configs/P1022DS.h +++ b/include/configs/P1022DS.h @@ -12,7 +12,6 @@ #include "../board/freescale/common/ics307_clk.h" #ifdef CONFIG_SDCARD -#define CONFIG_SPL_MMC_MINIMAL #define CONFIG_SPL_FLUSH_IMAGE #define CONFIG_SPL_TARGET "u-boot-with-spl.bin" #define CONFIG_SYS_TEXT_BASE 0x11001000 diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h index 2354dc852753..104230573d49 100644 --- a/include/configs/T102xQDS.h +++ b/include/configs/T102xQDS.h @@ -71,7 +71,6 @@ #ifdef CONFIG_SDCARD #define CONFIG_RESET_VECTOR_ADDRESS0x200FFC -#define CONFIG_SPL_MMC_MINIMAL #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) #define CONFIG_SYS_MMC_U_BOOT_DST (0x0020) #define CONFIG_SYS_MMC_U_BOOT_START(0x0020) diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index 733e44f75c7b..cbd47016fd89 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -82,7 +82,6 @@ #ifdef CONFIG_SDCARD #define CONFIG_RESET_VECTOR_ADDRESS0x3FFC -#define CONFIG_SPL_MMC_MINIMAL #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) #define CONFIG_SYS_MMC_U_BOOT_DST (0x3000) #define CONFIG_SYS_MMC_U_BOOT_START(0x3000) diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index 1231c1a6a571..02a00e1d103c 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -110,7 +110,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_spi_rcw.cfg #ifdef CONFIG_SDCARD #defineCONFIG_RESET_VECTOR_ADDRESS 0x3FFC -#define CONFIG_SPL_MMC_MINIMAL #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) #define CONFIG_SYS_MMC_U_BOOT_DST (0x3000) #define CONFIG_SYS_MMC_U_BOOT_START(0x3000) diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h index 6fbac5f9f658..718d8c9eb4d7 100644 --- a/include/configs/T208xQDS.h +++ b/include/configs/T208xQDS.h @@ -86,7 +86,6 @@ #ifdef CONFIG_SDCARD #defineCONFIG_RESET_VECTOR_ADDRESS 0x200FFC -#define CONFIG_SPL_MMC_MINIMAL #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) #define CONFIG_SYS_MMC_U_BOOT_DST (0x0020) #define CONFIG_SYS_MMC_U_BOOT_START(0x0020) diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index 85bda94b57d6..fe68ac21af22 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -72,7 +72,6 @@ #ifdef CONFIG_SDCARD #defineCONFIG_RESET_VECTOR_ADDRESS 0x200FFC -#define CONFIG_SPL_MMC_MINIMAL #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) #define CONFIG_SYS_MMC_U_BOOT_DST (0x0020) #define CONFIG_SYS_MMC_U_BOOT_START(0x0020) diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h index 73e91bc9fa54..9e5db87015fe 100644 --- a/include/configs/T4240QDS.h +++ b/include/configs/T4240QDS.h @@ -42,7 +42,6 @@ #ifdef CONFIG_SDCARD #defineCONFIG_RESET_VECTOR_ADDRESS 0x200FFC -#define CONFIG_SPL_MMC_MINIMAL #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) #define CONFIG_SYS_MMC_U_BOOT_DST 0x0020 #define CONFIG_SYS_MMC_U_BOOT_START0x0020 diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h index b63c38c8b5eb..b477f52187d1 100644 --- a/include/configs/T4240RDB.h +++ b/include/configs/T4240RDB.h @@ -32,7 +32,6 @@ #ifdef CONFIG_SDCARD #define CONFIG_RESET_VECTOR_ADDRESS0x200FFC -#define CONFIG_SPL_MMC_MINIMAL #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) #define CONFIG_SYS_MMC_U_BOOT_DST 0x0020 #define CONFIG_SYS_MMC_U_BOOT_START0x0020 diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index 4522569c2995..f0cb59be70a1 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -145,7 +145,6 @@ #endif #ifdef CONFIG_SDCARD -#define
Re: [U-Boot] [PATCH] ls1088a: qspi: Enable XIP mode above 16 MB addresses
On 02/06/2018 02:59 AM, Rajat Srivastava wrote: > > >> How do you put the image into it to begin with? Don't tell me you were using >> an >> external tool or a hacked version of older U-Boot. >> > This patch enables data read above 16MB using AHB (on Uboot prompt) and does > not involve our QSPI driver. It is equivalent to reading from DDR via cp or > md commands. > Whereas writing to flash is possible via IPS mode which involves our driver > (using sf > commands). > OK. So we are still far away to have the full flash supported. York ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] mach-stm32: Add set_env_soc_name support
On 02/06/2018 12:52 AM, Patrick DELAUNAY wrote: > Hi Patrice, > >> From: Patrice CHOTARD >> >> Sure, i will send a v3 >> >> Thanks >> >> Patrice >> > > You can also activate CONFIG_ENV_VARS_UBOOT_CONFIG Great ! Thanks Patrick. Cheers, Vikas > > Then the variables are defined in ./include/env_default.h : > > arch=CONFIG_SYS_ARCH > cpu=CONFIG_SYS_CPU > board=CONFIG_SYS_BOARD > board_name=CONFIG_SYS_BOARD > vendor=CONFIG_SYS_VENDOR > soc=CONFIG_SYS_SOC > > It is perhaps more simple. > > Regards > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] configs: stm32: Enable CONFIG_ENV_VARS_UBOOT_CONFIG
Hi, On 02/06/2018 01:47 AM, patrice.chot...@st.com wrote: > From: Patrice Chotard> > Enable CONFIG_ENV_VARS_UBOOT_CONFIG for all STM32 boards > It allows to retrieve the SoC name into the "soc" environment > variable. > > Signed-off-by: Christophe Priouzeau > Signed-off-by: Patrice Chotard Reviewed-by: Vikas Manocha Cheers, Vikas > --- > include/configs/stm32f429-discovery.h | 1 + > include/configs/stm32f429-evaluation.h | 1 + > include/configs/stm32f469-discovery.h | 1 + > include/configs/stm32f746-disco.h | 1 + > include/configs/stm32h743-disco.h | 2 ++ > include/configs/stm32h743-eval.h | 2 ++ > 6 files changed, 8 insertions(+) > > diff --git a/include/configs/stm32f429-discovery.h > b/include/configs/stm32f429-discovery.h > index af9daad32072..92166a489496 100644 > --- a/include/configs/stm32f429-discovery.h > +++ b/include/configs/stm32f429-discovery.h > @@ -59,6 +59,7 @@ > #define CONFIG_BOOTCOMMAND \ > "run bootcmd_romfs" > > +#define CONFIG_ENV_VARS_UBOOT_CONFIG > #define CONFIG_EXTRA_ENV_SETTINGS \ > "bootargs_romfs=uclinux.physaddr=0x0818 root=/dev/mtdblock0\0" \ > "bootcmd_romfs=setenv bootargs ${bootargs} ${bootargs_romfs};" \ > diff --git a/include/configs/stm32f429-evaluation.h > b/include/configs/stm32f429-evaluation.h > index ab33d0f3d2a2..79b77bd3781a 100644 > --- a/include/configs/stm32f429-evaluation.h > +++ b/include/configs/stm32f429-evaluation.h > @@ -52,6 +52,7 @@ > #define CONFIG_BOOTCOMMAND \ > "run boot_sd" > > +#define CONFIG_ENV_VARS_UBOOT_CONFIG > #define CONFIG_EXTRA_ENV_SETTINGS \ > "boot_sd=mmc dev 0;fatload mmc 0 0x0070 stm32429i-eval.dtb; fatload > mmc 0 0x8000 zImage; icache off; bootz 0x8000 - 0x0070" > > diff --git a/include/configs/stm32f469-discovery.h > b/include/configs/stm32f469-discovery.h > index c290a66fddd3..99c3e08d330e 100644 > --- a/include/configs/stm32f469-discovery.h > +++ b/include/configs/stm32f469-discovery.h > @@ -54,6 +54,7 @@ > #define CONFIG_BOOTCOMMAND \ > "run boot_sd" > > +#define CONFIG_ENV_VARS_UBOOT_CONFIG > #define CONFIG_EXTRA_ENV_SETTINGS \ > "boot_sd=mmc dev 0;fatload mmc 0 0x0070 stm32f469-disco.dtb; > fatload mmc 0 0x8000 zImage; icache off; bootz 0x8000 - 0x0070" > > diff --git a/include/configs/stm32f746-disco.h > b/include/configs/stm32f746-disco.h > index 3e952c2acd82..b99eb71b48c6 100644 > --- a/include/configs/stm32f746-disco.h > +++ b/include/configs/stm32f746-disco.h > @@ -52,6 +52,7 @@ > #define CONFIG_BOOTCOMMAND \ > "run bootcmd_romfs" > > +#define CONFIG_ENV_VARS_UBOOT_CONFIG > #define CONFIG_EXTRA_ENV_SETTINGS \ > "bootargs_romfs=uclinux.physaddr=0x0818 root=/dev/mtdblock0\0" \ > "bootcmd_romfs=setenv bootargs ${bootargs} ${bootargs_romfs};" \ > diff --git a/include/configs/stm32h743-disco.h > b/include/configs/stm32h743-disco.h > index 531de701492a..1494203e83b2 100644 > --- a/include/configs/stm32h743-disco.h > +++ b/include/configs/stm32h743-disco.h > @@ -39,6 +39,8 @@ > #define CONFIG_BOOTARGS > \ > "console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel" > > +#define CONFIG_ENV_VARS_UBOOT_CONFIG > + > /* > * Command line configuration. > */ > diff --git a/include/configs/stm32h743-eval.h > b/include/configs/stm32h743-eval.h > index 531de701492a..1494203e83b2 100644 > --- a/include/configs/stm32h743-eval.h > +++ b/include/configs/stm32h743-eval.h > @@ -39,6 +39,8 @@ > #define CONFIG_BOOTARGS > \ > "console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel" > > +#define CONFIG_ENV_VARS_UBOOT_CONFIG > + > /* > * Command line configuration. > */ > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/2] Enable test case with A20-OLinuXino-Lime2
On Tue, Feb 6, 2018 at 6:44 PM, Stefan Mavrodievwrote: > Driver testing is done with A20-OLinuXino-Lime2. Testing > requirements are: > - Exposing spi0 alternative pins in the dts file > - Add alias node, enabling driver probing > - Add flash sub-node of spi > - Enable spi flash related options in the defconfig file > > The testing log is: > > U-Boot SPL 2018.03-rc1-00075-g35a689a-dirty (Feb 06 2018 - 14:40:07 +0200) > DRAM: 1024 MiB > CPU: 91200Hz, AXI/AHB/APB: 3/2/2 > Trying to boot from FEL Why FEL? can't it boot from SPI-FLASH? > > U-Boot 2018.03-rc1-00075-g35a689a-dirty (Feb 06 2018 - 14:40:07 +0200) > Allwinner Technology > > CPU: Allwinner A20 (SUN7I) > Model: Olimex A20-OLinuXino-LIME2 > I2C: ready > DRAM: 1 GiB > MMC: SUNXI SD/MMC: 0 > Loading Environment from SPI Flash... SF: Detected w25q128bv with page size > 256 Bytes, erase size 4 KiB, total 16 MiB > OK > In:serial > Out: serial > Err: serial > Allwinner mUSB OTG (Peripheral) > SCSI: SATA link 0 timeout. > AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode > flags: ncq stag pm led clo only pmp pio slum part ccc apst > Net: No ethernet found. > starting USB... > USB0: USB EHCI 1.00 > USB1: USB OHCI 1.0 > USB2: USB EHCI 1.00 > USB3: USB OHCI 1.0 > scanning bus 0 for devices... 1 USB Device(s) found > scanning bus 2 for devices... 1 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found > Hit any key to stop autoboot: 0 > > # Probe device > => sf probe > SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 > MiB How did this resolved w/o sspi? > > # Erase > => sf erase 0x1000 0x100 > SF: 256 bytes @ 0x1000 Erased: ERROR > => sf erase 0x1000 0x1000 > SF: 4096 bytes @ 0x1000 Erased: OK > > # Test > => sf test 0 10 > SPI flash test: > 0 erase: 12104 ticks, 84 KiB/s 0.672 Mbps > 1 check: 8881 ticks, 115 KiB/s 0.920 Mbps > 2 write: 10824 ticks, 94 KiB/s 0.752 Mbps > 3 read: 8872 ticks, 115 KiB/s 0.920 Mbps > Test passed > 0 erase: 12104 ticks, 84 KiB/s 0.672 Mbps > 1 check: 8881 ticks, 115 KiB/s 0.920 Mbps > 2 write: 10824 ticks, 94 KiB/s 0.752 Mbps > 3 read: 8872 ticks, 115 KiB/s 0.920 Mbps > > # Try write/read > => sf erase 0x1000 0x1000 > SF: 4096 bytes @ 0x1000 Erased: OK > > => md.b 0x5000 0x100 > 5000: a9 4d b7 68 d2 48 69 c3 09 78 fa d3 33 66 e9 53 > .M.h.Hi..x..3f.S > 5010: b0 53 af 79 ad 33 79 b1 f1 e3 1d 09 2e ba dd dc > .S.y.3y. > 5020: 8c eb eb 53 f4 ef 66 89 b5 e9 f6 fb af 73 7f cb > ...S..f..s.. > 5030: b6 4b bf de c3 fd de bb 9a 53 ad 7d ef 38 6f bf > .K...S.}.8o. > 5040: fd fb e7 5e e9 db fc 0c fc f7 be 76 ad b9 fd eb > ...^...v > 5050: f3 ed 5f b5 bb bd ba 8f ff df 1f bf f3 ff fb d7 > .._. > 5060: b7 6e 9e 5f af 7a 62 ed 7f 66 1b 6d fd fb 47 f7 > .n._.zb..f.m..G. > 5070: b7 fa f4 db d5 b6 d5 ff 81 e6 f5 d9 8f ef ff db > > 5080: b7 dd bd fb f3 1d 9d 2f f6 db c8 7f fb cf b9 f3 > .../ > 5090: 3c ee da 2f b7 5e 6f bc f1 2f 2b cf 3f f2 fb ee > <../.^o../+.?... > 50a0: 6f 5e 99 c3 3b 51 bd d4 be 40 4e db ab ed f9 77 > o^..;Q...@Nw > 50b0: 9f f6 7d ed 54 4a 68 f8 7d ee 53 9b ff ae ef e4 > ..}.TJh.}.S. > 50c0: 73 ff 3c c7 f7 df f6 be bf 0f 97 96 3d 9b 9e 9f > s.<.=... > 50d0: e4 49 ca ff be fa ff df f7 7a cf ab 7f 7a 7b cf > .I...z...z{. > 50e0: bb c7 9f 3f c1 99 f2 f2 bf ee cf fb d5 b9 e2 e8 > ...? > 50f0: ec e8 b2 bd 21 1f 5a ef 7a 7d 9d ad 31 89 3f 6f > !.Z.z}..1.?o > > => sf write 0x5000 0x1000 0x100 > device 0 offset 0x1000, size 0x100 > SF: 256 bytes @ 0x1000 Written: OK > => sf read 0x5100 0x1000 0x100 > device 0 offset 0x1000, size 0x100 > SF: 256 bytes @ 0x1000 Read: OK > > => cmp.b 0x5000 0x5100 0x100 > Total of 256 byte(s) were the same > > Signed-off-by: Stefan Mavrodiev > --- > arch/arm/dts/sun7i-a20-olinuxino-lime2.dts | 30 > ++ > configs/A20-OLinuXino-Lime2_defconfig | 11 +++ > drivers/mtd/spi/Makefile | 4 +++- > include/configs/sunxi-common.h | 2 ++ > 4 files changed, 46 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts > b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts > index d5c796c..a6ee87c 100644 > --- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts > +++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts > @@ -54,6 +54,7 @@ > > aliases { > serial0 = > + spi0 = > }; > > chosen { > @@ -215,6 +216,20 @@ > allwinner,pull = ; > }; > > + spi0_pins_b: spi0@1 { > +
Re: [U-Boot] [PATCH] Convert CONFIG LIB_HW_RAND to Kconfig
On Tue, 6 Feb 2018 10:18:18 -0600 Adam Fordwrote: > config_fallbacks.h had some logic to automatically select > LIB_RAND if RANDOM_UUID or CMD_UUID were set if LIB_HW_RAND wasn't > already selected. By migrating LIB_HW_RAND to Kconfig, we can > remove this check from config_fallbacks.h and put it into Kconfig > > Signed-off-by: Adam Ford > --- > configs/ds414_defconfig | 1 + > configs/odroid_defconfig| 2 ++ > configs/trats2_defconfig| 2 ++ > configs/trats_defconfig | 2 ++ > include/config_fallbacks.h | 7 --- > include/configs/ds414.h | 1 - > include/configs/odroid.h| 1 - > include/configs/thunderx_88xx.h | 1 - > include/configs/trats.h | 1 - > include/configs/trats2.h| 1 - > lib/Kconfig | 8 +++- > scripts/config_whitelist.txt| 1 - > 12 files changed, 14 insertions(+), 14 deletions(-) > > diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig > index eb3fe75..47d0377 100644 > --- a/configs/ds414_defconfig > +++ b/configs/ds414_defconfig > @@ -48,3 +48,4 @@ CONFIG_USB=y > CONFIG_DM_USB=y > CONFIG_USB_EHCI_HCD=y > CONFIG_USB_STORAGE=y > +CONFIG_LIB_RAND=y > diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig > index 30889c0..14e9283 100644 > --- a/configs/odroid_defconfig > +++ b/configs/odroid_defconfig > @@ -62,4 +62,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y > CONFIG_USB_FUNCTION_THOR=y > CONFIG_USB_HOST_ETHER=y > CONFIG_USB_ETHER_SMSC95XX=y > +CONFIG_LIB_RAND=y > +CONFIG_LIB_HW_RAND=y > CONFIG_ERRNO_STR=y > diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig > index e28cad5..2cc7c9b 100644 > --- a/configs/trats2_defconfig > +++ b/configs/trats2_defconfig > @@ -54,3 +54,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6601 > CONFIG_USB_GADGET_DWC2_OTG=y > CONFIG_USB_GADGET_DOWNLOAD=y > CONFIG_USB_FUNCTION_THOR=y > +CONFIG_LIB_RAND=y > +CONFIG_LIB_HW_RAND=y > diff --git a/configs/trats_defconfig b/configs/trats_defconfig > index 6ae39c1..f26e8ef 100644 > --- a/configs/trats_defconfig > +++ b/configs/trats_defconfig > @@ -53,3 +53,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6601 > CONFIG_USB_GADGET_DWC2_OTG=y > CONFIG_USB_GADGET_DOWNLOAD=y > CONFIG_USB_FUNCTION_THOR=y > +CONFIG_LIB_RAND=y > +CONFIG_LIB_HW_RAND=y > diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h > index 9695ee7..c11abe6 100644 > --- a/include/config_fallbacks.h > +++ b/include/config_fallbacks.h > @@ -54,13 +54,6 @@ > #define CONFIG_LIB_UUID > #endif > > -#if (defined(CONFIG_RANDOM_UUID) || \ > - defined(CONFIG_CMD_UUID)) && \ > - (!defined(CONFIG_LIB_RAND) && \ > - !defined(CONFIG_LIB_HW_RAND)) > -#define CONFIG_LIB_RAND > -#endif > - > /* Console I/O Buffer Size */ > #ifndef CONFIG_SYS_CBSIZE > #if defined(CONFIG_CMD_KGDB) > diff --git a/include/configs/ds414.h b/include/configs/ds414.h > index c840c93..b795189 100644 > --- a/include/configs/ds414.h > +++ b/include/configs/ds414.h > @@ -113,7 +113,6 @@ > #define CONFIG_DDR_32BIT > > /* Use random ethernet address if not configured */ > -#define CONFIG_LIB_RAND > #define CONFIG_NET_RANDOM_ETHADDR > > /* Default Environment */ > diff --git a/include/configs/odroid.h b/include/configs/odroid.h > index 60ed013..697e798 100644 > --- a/include/configs/odroid.h > +++ b/include/configs/odroid.h > @@ -177,7 +177,6 @@ > > /* Security subsystem - enable hw_rand() */ > #define CONFIG_EXYNOS_ACE_SHA > -#define CONFIG_LIB_HW_RAND > > /* USB */ > #define CONFIG_USB_EHCI_EXYNOS > diff --git a/include/configs/thunderx_88xx.h > b/include/configs/thunderx_88xx.h index 34940ef..1f0b9d4 100644 > --- a/include/configs/thunderx_88xx.h > +++ b/include/configs/thunderx_88xx.h > @@ -77,7 +77,6 @@ > #define CONFIG_CMDLINE_EDITING 1 > #define CONFIG_SYS_MAXARGS 64 /* max > command args */ #define CONFIG_NO_RELOCATION 1 > -#define CONFIG_LIB_RAND > #define PLL_REF_CLK 5000/* 50 MHz > */ #define NS_PER_REF_CLK_TICK(10/PLL_REF_CLK) > > diff --git a/include/configs/trats.h b/include/configs/trats.h > index b97efc2..465eed0 100644 > --- a/include/configs/trats.h > +++ b/include/configs/trats.h > @@ -171,7 +171,6 @@ > > /* Security subsystem - enable hw_rand() */ > #define CONFIG_EXYNOS_ACE_SHA > -#define CONFIG_LIB_HW_RAND > > /* Common misc for Samsung */ > #define CONFIG_MISC_COMMON > diff --git a/include/configs/trats2.h b/include/configs/trats2.h > index 871accf..b9bf918 100644 > --- a/include/configs/trats2.h > +++ b/include/configs/trats2.h > @@ -153,7 +153,6 @@ > > /* Security subsystem - enable hw_rand() */ > #define CONFIG_EXYNOS_ACE_SHA > -#define CONFIG_LIB_HW_RAND > > /* Common misc for Samsung */ > #define CONFIG_MISC_COMMON > diff --git a/lib/Kconfig b/lib/Kconfig > index 710deb7..8b8d5b8 100644 > --- a/lib/Kconfig > +++ b/lib/Kconfig > @@ -66,10 +66,16 @@
[U-Boot] [PATCH] Convert CONFIG LIB_HW_RAND to Kconfig
config_fallbacks.h had some logic to automatically select LIB_RAND if RANDOM_UUID or CMD_UUID were set if LIB_HW_RAND wasn't already selected. By migrating LIB_HW_RAND to Kconfig, we can remove this check from config_fallbacks.h and put it into Kconfig Signed-off-by: Adam Ford--- configs/ds414_defconfig | 1 + configs/odroid_defconfig| 2 ++ configs/trats2_defconfig| 2 ++ configs/trats_defconfig | 2 ++ include/config_fallbacks.h | 7 --- include/configs/ds414.h | 1 - include/configs/odroid.h| 1 - include/configs/thunderx_88xx.h | 1 - include/configs/trats.h | 1 - include/configs/trats2.h| 1 - lib/Kconfig | 8 +++- scripts/config_whitelist.txt| 1 - 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig index eb3fe75..47d0377 100644 --- a/configs/ds414_defconfig +++ b/configs/ds414_defconfig @@ -48,3 +48,4 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_LIB_RAND=y diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig index 30889c0..14e9283 100644 --- a/configs/odroid_defconfig +++ b/configs/odroid_defconfig @@ -62,4 +62,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_FUNCTION_THOR=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_LIB_RAND=y +CONFIG_LIB_HW_RAND=y CONFIG_ERRNO_STR=y diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig index e28cad5..2cc7c9b 100644 --- a/configs/trats2_defconfig +++ b/configs/trats2_defconfig @@ -54,3 +54,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6601 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_FUNCTION_THOR=y +CONFIG_LIB_RAND=y +CONFIG_LIB_HW_RAND=y diff --git a/configs/trats_defconfig b/configs/trats_defconfig index 6ae39c1..f26e8ef 100644 --- a/configs/trats_defconfig +++ b/configs/trats_defconfig @@ -53,3 +53,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6601 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_FUNCTION_THOR=y +CONFIG_LIB_RAND=y +CONFIG_LIB_HW_RAND=y diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h index 9695ee7..c11abe6 100644 --- a/include/config_fallbacks.h +++ b/include/config_fallbacks.h @@ -54,13 +54,6 @@ #define CONFIG_LIB_UUID #endif -#if (defined(CONFIG_RANDOM_UUID) || \ - defined(CONFIG_CMD_UUID)) && \ - (!defined(CONFIG_LIB_RAND) && \ - !defined(CONFIG_LIB_HW_RAND)) -#define CONFIG_LIB_RAND -#endif - /* Console I/O Buffer Size */ #ifndef CONFIG_SYS_CBSIZE #if defined(CONFIG_CMD_KGDB) diff --git a/include/configs/ds414.h b/include/configs/ds414.h index c840c93..b795189 100644 --- a/include/configs/ds414.h +++ b/include/configs/ds414.h @@ -113,7 +113,6 @@ #define CONFIG_DDR_32BIT /* Use random ethernet address if not configured */ -#define CONFIG_LIB_RAND #define CONFIG_NET_RANDOM_ETHADDR /* Default Environment */ diff --git a/include/configs/odroid.h b/include/configs/odroid.h index 60ed013..697e798 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -177,7 +177,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA -#define CONFIG_LIB_HW_RAND /* USB */ #define CONFIG_USB_EHCI_EXYNOS diff --git a/include/configs/thunderx_88xx.h b/include/configs/thunderx_88xx.h index 34940ef..1f0b9d4 100644 --- a/include/configs/thunderx_88xx.h +++ b/include/configs/thunderx_88xx.h @@ -77,7 +77,6 @@ #define CONFIG_CMDLINE_EDITING 1 #define CONFIG_SYS_MAXARGS 64 /* max command args */ #define CONFIG_NO_RELOCATION 1 -#define CONFIG_LIB_RAND #define PLL_REF_CLK5000/* 50 MHz */ #define NS_PER_REF_CLK_TICK(10/PLL_REF_CLK) diff --git a/include/configs/trats.h b/include/configs/trats.h index b97efc2..465eed0 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -171,7 +171,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA -#define CONFIG_LIB_HW_RAND /* Common misc for Samsung */ #define CONFIG_MISC_COMMON diff --git a/include/configs/trats2.h b/include/configs/trats2.h index 871accf..b9bf918 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -153,7 +153,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA -#define CONFIG_LIB_HW_RAND /* Common misc for Samsung */ #define CONFIG_MISC_COMMON diff --git a/lib/Kconfig b/lib/Kconfig index 710deb7..8b8d5b8 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -66,10 +66,16 @@ config REGEX "setexpr". config LIB_RAND - bool "Pseudo-random library support " + bool "Pseudo-random library support" + default y if (RANDOM_UUID || CMD_UUID) && !LIB_HW_RAND help This library provides pseudo-random number generator functions. +config LIB_HW_RAND + bool "HW Engine for random libray
Re: [U-Boot] [PATCH 05/11] sunxi: Add PMIC_SUNXI kconfig entry
On Tue, Feb 06, 2018 at 08:45:22PM +0530, Jagan Teki wrote: > Add simple and meaningful kconfig option for pmic_bus.c > instead of using MACH type on Makefile. > > Signed-off-by: Jagan Teki> --- > arch/arm/mach-sunxi/Kconfig | 6 ++ > arch/arm/mach-sunxi/Makefile | 7 +-- > drivers/power/Kconfig| 5 + > 3 files changed, 12 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig > index 7ab1990..470ef92 100644 > --- a/arch/arm/mach-sunxi/Kconfig > +++ b/arch/arm/mach-sunxi/Kconfig > @@ -23,6 +23,12 @@ config MFD_SUN6I_PRCM > Support for the PRCM (Power/Reset/Clock Management) unit available > in A31 SoC. > > +config PMIC_SUNXI > + bool "Sunxi PMIC bus access helpers" > + help > + Select this PMIC bus access helpers for Sunxi platform PRCM or other > + AXP family PMIC devices. > + This is only meant for AXP* PMIC, which Allwinner boards might or might not have. AXP_PMIC or some variation of it would be a better choice. Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 04/11] sunxi: Add SUNXI_RSB kconfig entry
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. Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 25/34] configs: bananapi-m64: Enable USB OTG peripheral mode
On Tue, Feb 06, 2018 at 07:55:55PM +0530, Jagan Teki wrote: > Enable USB_MUSB_GADGET which operate OTG in peripheral mode > > Signed-off-by: Jagan TekiThis can be squashed with the previous patch, just like all your patches with one change to the DT and one to the defconfig. Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 17/30] sunxi: arm64: Increase u-boot size on MMC environment
On Tue, Feb 06, 2018 at 03:49:28PM +0530, Jagan Teki wrote: > On Wed, Jan 31, 2018 at 9:25 PM, Maxime Ripard >wrote: > > On Tue, Jan 30, 2018 at 02:29:27PM +0530, Jagan Teki wrote: > >> On Tue, Jan 30, 2018 at 1:54 PM, Maxime Ripard > >> wrote: > >> > On Mon, Jan 29, 2018 at 01:49:14PM +0530, Jagan Teki wrote: > >> >> On Mon, Jan 29, 2018 at 1:32 PM, Maxime Ripard > >> >> wrote: > >> >> > On Sun, Jan 28, 2018 at 09:49:38PM +0530, Jagan Teki wrote: > >> >> >> U-Boot size is crossing MMC environment offset due to adding > >> >> >> new features on arm64 boards. So update the ENV_OFFSET to > >> >> >> 0x10 so the u-boot size limit increased to 0xf6000 > >> >> >> > >> >> >> MMC layout(updated): > >> >> >> === > >> >> >> part: sector: size > >> >> >> unused: 0: 8KiB > >> >> >>SPL: 16: 32KiB > >> >> >> U-Boot: 80: 984KiB > >> >> >> uENV: 2048: 128KiB > >> >> >> > >> >> >> Signed-off-by: Jagan Teki > >> >> >> --- > >> >> >> env/Kconfig| 3 ++- > >> >> >> include/configs/sunxi-common.h | 2 +- > >> >> >> 2 files changed, 3 insertions(+), 2 deletions(-) > >> >> >> > >> >> >> diff --git a/env/Kconfig b/env/Kconfig > >> >> >> index 692f863..e2b32c2 100644 > >> >> >> --- a/env/Kconfig > >> >> >> +++ b/env/Kconfig > >> >> >> @@ -441,7 +441,8 @@ config ENV_OFFSET > >> >> >> hex "Environment Offset" > >> >> >> depends on !ENV_IS_IN_UBI > >> >> >> depends on !ENV_IS_NOWHERE > >> >> >> - default 0x88000 if ARCH_SUNXI > >> >> >> + default 0x88000 if ARCH_SUNXI && !ARM64 > >> >> >> + default 0x10 if ARCH_SUNXI && ARM64 > >> >> > > >> >> > This breaks all existing platforms. NAK. > >> >> > >> >> Can you elaborate, what it breaks. 32 bit sunxi start with 0x88000 and > >> >> 64-sun start with 0x10 this is what I expecting here. > >> > > >> > If you have an environment already flashed, flashing the new u-boot > >> > will overwrite it, and might break any partition layout you have set. > >> > >> True, but we can't control this adding new stuff ultimately increasing > >> size. either we can stop working new features or increasing partition > >> size, do you have any other suggestions? > > > > https://lists.denx.de/pipermail/u-boot/2017-December/314940.html > > > >> >> > Why do you think we went into so great troubles recently? > >> >> > >> >> Certainly yes, MUSB_GADGET increasing u-boot.itb 548K > >> >> > >> >> u-boot.itb exceeds file size limit: > >> >> limit: 516096 bytes > >> >> actual: 560088 bytes > >> >> excess: 43992 bytes > >> >> make: *** [u-boot.itb] Error 1 > >> >> make: *** Waiting for unfinished jobs.. > >> > > >> > That's not my question. Why do you think we had some many discussions, > >> > debates and patches if we could have done so from the beginning? > >> > >> Sorry, can't understand please explain it little bit. > > > > We've had: > > https://patchwork.ozlabs.org/cover/828100/ > > https://patchwork.ozlabs.org/cover/851904/ > > https://patchwork.ozlabs.org/cover/864994/ > > Now we have transition IN, and we can able to change the SIZE check right? Not until the transition is over. Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 09/11] sunxi: Add DRAM_SUN8I_A23 kconfig entry
Add proper and simple kconfig option for dram_sun8i_a23.c instead of using MACH type on Makefile. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index b6115da..f3a0c49 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -18,6 +18,12 @@ config DRAM_SUN6I Select this dram controller driver for Sun6i platforms, like A31/A31s. +config DRAM_SUN8I_A23 + bool "Sun8i A23 platform dram controller driver" + help + Select this dram controller driver for Sun8i platforms, + for A23 SOC. + config DRAM_SUN9I bool "Sun9i platform dram controller driver" help @@ -162,6 +168,7 @@ config MACH_SUN8I_A23 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DRAM_SUN8I_A23 select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 66ed2ee..cfada67 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -35,8 +35,8 @@ obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o +obj-$(CONFIG_DRAM_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o -obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_sunxi_dw.o -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 11/11] sunxi: Add DRAM_SUN8I_A83T kconfig entry
Add proper and simple kconfig option for dram_sun8i_a83t.c instead of using MACH type on Makefile. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 7b06e0d..27b957e 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -30,6 +30,12 @@ config DRAM_SUN8I_A33 Select this dram controller driver for Sun8i platforms, for A33 SOC. +config DRAM_SUN8I_A83T + bool "Sun8i A83T platform dram controller driver" + help + Select this dram controller driver for Sun8i platforms, + for A83T SOC. + config DRAM_SUN9I bool "Sun9i platform dram controller driver" help @@ -193,6 +199,7 @@ config MACH_SUN8I_A33 config MACH_SUN8I_A83T bool "sun8i (Allwinner A83T)" select CPU_V7 + select DRAM_SUN8I_A83T select SUNXI_GEN_SUN6I select MMC_SUNXI_HAS_NEW_MODE select SUPPORT_SPL diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 034e434..b1d99e9 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -37,8 +37,8 @@ obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o obj-$(CONFIG_DRAM_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_DRAM_SUN8I_A33) += dram_sun8i_a33.o +obj-$(CONFIG_DRAM_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o -obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_sunxi_dw.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_timings/ endif -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 04/11] sunxi: Add SUNXI_RSB kconfig entry
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 + bool "Allwinner sunXi Reduced Serial Bus Driver" + help + Say y here to enable support for Allwinner's Reduced Serial Bus + (RSB) support. This controller is responsible for communicating + with various RSB based devices, such as AXP223, AXP8XX PMICs, + and AC100/AC200 ICs. + config SUNXI_HIGH_SRAM bool default n @@ -185,6 +193,7 @@ config MACH_SUN9I select MFD_SUN6I_PRCM select SUNXI_HIGH_SRAM select SUNXI_GEN_SUN6I + select SUNXI_RSB select SUPPORT_SPL config MACH_SUN50I @@ -213,6 +222,7 @@ endchoice # The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33" config MACH_SUN8I bool + select SUNXI_RSB select MFD_SUN6I_PRCM default y if MACH_SUN8I_A23 default y if MACH_SUN8I_A33 diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index a6721ad..8f30979 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -18,8 +18,7 @@ obj-y += usb_phy.o endif obj-$(CONFIG_I2C_SUN6I_P2WI) += p2wi.o obj-$(CONFIG_MFD_SUN6I_PRCM) += prcm.o -obj-$(CONFIG_MACH_SUN8I) += rsb.o -obj-$(CONFIG_MACH_SUN9I) += rsb.o +obj-$(CONFIG_SUNXI_RSB)+= rsb.o obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o obj-$(CONFIG_MACH_SUN5I) += clock_sun4i.o obj-$(CONFIG_MACH_SUN6I) += clock_sun6i.o -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 08/11] sunxi: Add DRAM_SUN9I kconfig entry
Add proper and simple kconfig option for dram_sun9i.c instead of using MACH type on Makefile. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 8207f0b..b6115da 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -18,6 +18,12 @@ config DRAM_SUN6I Select this dram controller driver for Sun6i platforms, like A31/A31s. +config DRAM_SUN9I + bool "Sun9i platform dram controller driver" + help + Select this dram controller driver for Sun9i platforms, + like A80. + config I2C_SUN6I_P2WI bool "Allwinner sun6i internal P2WI controller" help @@ -212,6 +218,7 @@ config MACH_SUN8I_V3S config MACH_SUN9I bool "sun9i (Allwinner A80)" select CPU_V7 + select DRAM_SUN9I select MFD_SUN6I_PRCM select SUNXI_HIGH_SRAM select SUNXI_GEN_SUN6I diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 6f5fa18..66ed2ee 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -35,10 +35,10 @@ obj-$(CONFIG_MACH_SUN9I)+= clock_sun9i.o gtbus_sun9i.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o +obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_sunxi_dw.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_timings/ -obj-$(CONFIG_MACH_SUN9I) += dram_sun9i.o endif -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 07/11] sunxi: Add DRAM_SUN4I kconfig entry
Add proper and simple kconfig option for dram_sun4i.c instead of using MACH type on Makefile. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 9 + arch/arm/mach-sunxi/Makefile | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index c86f5a7..8207f0b 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -6,6 +6,12 @@ config SPL_LDSCRIPT config IDENT_STRING default " Allwinner Technology" +config DRAM_SUN4I + bool "Sun4/5/7i platform dram controller driver" + help + Select this dram controller driver for Sun4/5/7i platforms, + like A10/A13/A20. + config DRAM_SUN6I bool "Sun6i platform dram controller driver" help @@ -108,6 +114,7 @@ config MACH_SUN4I bool "sun4i (Allwinner A10)" select CPU_V7 select ARM_CORTEX_CPU_IS_UP + select DRAM_SUN4I select SUNXI_GEN_SUN4I select SUPPORT_SPL @@ -115,6 +122,7 @@ config MACH_SUN5I bool "sun5i (Allwinner A13)" select CPU_V7 select ARM_CORTEX_CPU_IS_UP + select DRAM_SUN4I select SUNXI_GEN_SUN4I select SUPPORT_SPL @@ -137,6 +145,7 @@ config MACH_SUN7I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DRAM_SUN4I select SUNXI_GEN_SUN4I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 4f7d8f4..6f5fa18 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -33,10 +33,8 @@ endif obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o -obj-$(CONFIG_MACH_SUN4I) += dram_sun4i.o -obj-$(CONFIG_MACH_SUN5I) += dram_sun4i.o -obj-$(CONFIG_MACH_SUN7I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 05/11] sunxi: Add PMIC_SUNXI kconfig entry
Add simple and meaningful kconfig option for pmic_bus.c instead of using MACH type on Makefile. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 6 ++ arch/arm/mach-sunxi/Makefile | 7 +-- drivers/power/Kconfig| 5 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 7ab1990..470ef92 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -23,6 +23,12 @@ config MFD_SUN6I_PRCM Support for the PRCM (Power/Reset/Clock Management) unit available in A31 SoC. +config PMIC_SUNXI + bool "Sunxi PMIC bus access helpers" + help + Select this PMIC bus access helpers for Sunxi platform PRCM or other + AXP family PMIC devices. + config SUNXI_RSB bool "Allwinner sunXi Reduced Serial Bus Driver" help diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 8f30979..921273b 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -18,6 +18,7 @@ obj-y += usb_phy.o endif obj-$(CONFIG_I2C_SUN6I_P2WI) += p2wi.o obj-$(CONFIG_MFD_SUN6I_PRCM) += prcm.o +obj-$(CONFIG_PMIC_SUNXI) += pmic_bus.o obj-$(CONFIG_SUNXI_RSB)+= rsb.o obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o obj-$(CONFIG_MACH_SUN5I) += clock_sun4i.o @@ -31,12 +32,6 @@ obj-$(CONFIG_MACH_SUN8I) += clock_sun6i.o endif obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o -obj-$(CONFIG_AXP152_POWER) += pmic_bus.o -obj-$(CONFIG_AXP209_POWER) += pmic_bus.o -obj-$(CONFIG_AXP221_POWER) += pmic_bus.o -obj-$(CONFIG_AXP809_POWER) += pmic_bus.o -obj-$(CONFIG_AXP818_POWER) += pmic_bus.o - ifdef CONFIG_SPL_BUILD obj-$(CONFIG_MACH_SUN4I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN5I) += dram_sun4i.o diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index d8c107e..ec453b6 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -22,6 +22,7 @@ config SUNXI_NO_PMIC config AXP152_POWER bool "axp152 pmic support" depends on MACH_SUN5I + select PMIC_SUNXI select CMD_POWEROFF ---help--- Select this to enable support for the axp152 pmic found on most @@ -30,6 +31,7 @@ config AXP152_POWER config AXP209_POWER bool "axp209 pmic support" depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I + select PMIC_SUNXI select CMD_POWEROFF ---help--- Select this to enable support for the axp209 pmic found on most @@ -38,6 +40,7 @@ config AXP209_POWER config AXP221_POWER bool "axp221 / axp223 pmic support" depends on MACH_SUN6I || MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_R40 + select PMIC_SUNXI select CMD_POWEROFF ---help--- Select this to enable support for the axp221/axp223 pmic found on most @@ -46,6 +49,7 @@ config AXP221_POWER config AXP809_POWER bool "axp809 pmic support" depends on MACH_SUN9I + select PMIC_SUNXI select CMD_POWEROFF ---help--- Say y here to enable support for the axp809 pmic found on A80 boards. @@ -53,6 +57,7 @@ config AXP809_POWER config AXP818_POWER bool "axp818 pmic support" depends on MACH_SUN8I_A83T + select PMIC_SUNXI select CMD_POWEROFF ---help--- Say y here to enable support for the axp818 pmic found on -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 10/11] sunxi: Add DRAM_SUN8I_A33 kconfig entry
Add proper and simple kconfig option for dram_sun8i_a33.c instead of using MACH type on Makefile. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index f3a0c49..7b06e0d 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -24,6 +24,12 @@ config DRAM_SUN8I_A23 Select this dram controller driver for Sun8i platforms, for A23 SOC. +config DRAM_SUN8I_A33 + bool "Sun8i A33 platform dram controller driver" + help + Select this dram controller driver for Sun8i platforms, + for A33 SOC. + config DRAM_SUN9I bool "Sun9i platform dram controller driver" help @@ -179,6 +185,7 @@ config MACH_SUN8I_A33 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DRAM_SUN8I_A33 select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index cfada67..034e434 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -36,8 +36,8 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o obj-$(CONFIG_DRAM_SUN8I_A23) += dram_sun8i_a23.o +obj-$(CONFIG_DRAM_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o -obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_sunxi_dw.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_timings/ -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] NET: designware: fix clock enable
Hi Eugeniy On 02/06/2018 03:12 PM, Eugeniy Paltsev wrote: > After commit ba1f966725223 "net: designware: add clock support" > we got NET broken on axs101 and axs103 platforms. > > Some clock don't support gating so their clock drivers don't > implement .enable/.disable callbacks. In such case clk_enable > returns -ENOSYS. > Also some clock drivers implement .enable/.disable callbacks not for all > clock IDs and return -ENOSYS (or -ENOTSUPP) for others. > > If we have such clock in 'clocks' list of designware ethernet controller > node we fail to probe designware ethernet. > > Fix it. > > Signed-off-by: Eugeniy Paltsev> --- > drivers/net/designware.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/designware.c b/drivers/net/designware.c > index 6d53071..43670a7 100644 > --- a/drivers/net/designware.c > +++ b/drivers/net/designware.c > @@ -684,7 +684,7 @@ int designware_eth_probe(struct udevice *dev) > break; > > err = clk_enable(>clocks[i]); > - if (err) { > + if (err && err != -ENOSYS && err != -ENOTSUPP) { > pr_err("failed to enable clock %d\n", i); > clk_free(>clocks[i]); > goto clk_err; > Reviewed-by: Patrice Chotard Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 03/11] sunxi: Use MFD_SUN6I_PRCM if used
MFD_SUN6I_PRCM is also used for SUN8I and SUN9I, so select the same on respective MACH types. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 2 ++ arch/arm/mach-sunxi/Makefile | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 319bee1..cf999ab 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -182,6 +182,7 @@ config MACH_SUN8I_V3S config MACH_SUN9I bool "sun9i (Allwinner A80)" select CPU_V7 + select MFD_SUN6I_PRCM select SUNXI_HIGH_SRAM select SUNXI_GEN_SUN6I select SUPPORT_SPL @@ -212,6 +213,7 @@ endchoice # The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33" config MACH_SUN8I bool + select MFD_SUN6I_PRCM default y if MACH_SUN8I_A23 default y if MACH_SUN8I_A33 default y if MACH_SUN8I_A83T diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 22e73d7..a6721ad 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -18,8 +18,6 @@ obj-y += usb_phy.o endif obj-$(CONFIG_I2C_SUN6I_P2WI) += p2wi.o obj-$(CONFIG_MFD_SUN6I_PRCM) += prcm.o -obj-$(CONFIG_MACH_SUN8I) += prcm.o -obj-$(CONFIG_MACH_SUN9I) += prcm.o obj-$(CONFIG_MACH_SUN8I) += rsb.o obj-$(CONFIG_MACH_SUN9I) += rsb.o obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 01/11] sunxi: Add MFD_SUN6I_PRCM kconfig entry
Add simple and meaningful kconfig option for prcm.c instead of using MACH type on Makefile. PRCM (Power/Reset/Clock Management) is considered as a Multi-Functional Device, so used the same on Kconfig definition. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 1fededd..2b9f48b 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -6,6 +6,12 @@ config SPL_LDSCRIPT config IDENT_STRING default " Allwinner Technology" +config MFD_SUN6I_PRCM + bool "Allwinner A31 PRCM controller" + help + Support for the PRCM (Power/Reset/Clock Management) unit available + in A31 SoC. + config SUNXI_HIGH_SRAM bool default n @@ -87,6 +93,7 @@ config MACH_SUN6I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select MFD_SUN6I_PRCM select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 2a3c379..3c1c660 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -16,7 +16,7 @@ obj-y += pinmux.o ifndef CONFIG_MACH_SUN9I obj-y += usb_phy.o endif -obj-$(CONFIG_MACH_SUN6I) += prcm.o +obj-$(CONFIG_MFD_SUN6I_PRCM) += prcm.o obj-$(CONFIG_MACH_SUN8I) += prcm.o obj-$(CONFIG_MACH_SUN9I) += prcm.o obj-$(CONFIG_MACH_SUN6I) += p2wi.o -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 02/11] sunxi: Add I2C_SUN6I_P2WI kconfig entry
Add simple and meaningful kconfig option for p2wi.c instead of using MACH type on Makefile. p2wi is an I2C controller, so used the same on kconfig definition. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 12 arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 2b9f48b..319bee1 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -6,6 +6,17 @@ config SPL_LDSCRIPT config IDENT_STRING default " Allwinner Technology" +config I2C_SUN6I_P2WI + bool "Allwinner sun6i internal P2WI controller" + help + If you say yes to this option, support will be included for the + P2WI (Push/Pull 2 Wire Interface) controller embedded in some sunxi + SOCs. + The P2WI looks like an SMBus controller (which supports only byte + accesses), except that it only supports one slave device. + This interface is used to connect to specific PMIC devices (like the + AXP221). + config MFD_SUN6I_PRCM bool "Allwinner A31 PRCM controller" help @@ -93,6 +104,7 @@ config MACH_SUN6I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select I2C_SUN6I_P2WI select MFD_SUN6I_PRCM select SUNXI_GEN_SUN6I select SUPPORT_SPL diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 3c1c660..22e73d7 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -16,10 +16,10 @@ obj-y += pinmux.o ifndef CONFIG_MACH_SUN9I obj-y += usb_phy.o endif +obj-$(CONFIG_I2C_SUN6I_P2WI) += p2wi.o obj-$(CONFIG_MFD_SUN6I_PRCM) += prcm.o obj-$(CONFIG_MACH_SUN8I) += prcm.o obj-$(CONFIG_MACH_SUN9I) += prcm.o -obj-$(CONFIG_MACH_SUN6I) += p2wi.o obj-$(CONFIG_MACH_SUN8I) += rsb.o obj-$(CONFIG_MACH_SUN9I) += rsb.o obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 06/11] sunxi: add DRAM_SUN6I kconfig
Add proper and simple kconfig option for dram_sun6i.c instead of using MACH type on Makefile. Signed-off-by: Jagan Teki--- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 470ef92..c86f5a7 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -6,6 +6,12 @@ config SPL_LDSCRIPT config IDENT_STRING default " Allwinner Technology" +config DRAM_SUN6I + bool "Sun6i platform dram controller driver" + help + Select this dram controller driver for Sun6i platforms, + like A31/A31s. + config I2C_SUN6I_P2WI bool "Allwinner sun6i internal P2WI controller" help @@ -118,6 +124,7 @@ config MACH_SUN6I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DRAM_SUN6I select I2C_SUN6I_P2WI select MFD_SUN6I_PRCM select SUNXI_GEN_SUN6I diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 921273b..4f7d8f4 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -33,9 +33,9 @@ endif obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o obj-$(CONFIG_MACH_SUN4I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN5I) += dram_sun4i.o -obj-$(CONFIG_MACH_SUN6I) += dram_sun6i.o obj-$(CONFIG_MACH_SUN7I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 00/11] arm: sunxi: Use proper and meaningful Kconfig entries
Current arch/arm/mach-sunxi/Makefile has improper build options which relies mostly on MACH_ options. This series get rid of those and added proper Kconfig options. All Kconfig entry name are re-used from Linux so-that future dm conversion on these can be meaningful. Jagan Teki (11): sunxi: Add MFD_SUN6I_PRCM kconfig entry sunxi: Add I2C_SUN6I_P2WI kconfig entry sunxi: Use MFD_SUN6I_PRCM if used sunxi: Add SUNXI_RSB kconfig entry sunxi: Add PMIC_SUNXI kconfig entry sunxi: add DRAM_SUN6I kconfig sunxi: Add DRAM_SUN4I kconfig entry sunxi: Add DRAM_SUN9I kconfig entry sunxi: Add DRAM_SUN8I_A23 kconfig entry sunxi: Add DRAM_SUN8I_A33 kconfig entry sunxi: Add DRAM_SUN8I_A83T kconfig entry arch/arm/mach-sunxi/Kconfig | 81 arch/arm/mach-sunxi/Makefile | 30 ++-- drivers/power/Kconfig| 5 +++ 3 files changed, 96 insertions(+), 20 deletions(-) -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/2] SPI Flash: add support of sst26wf* flash series
sst26wf flash series block protection implementation differs from other SST series, so add implementation for sst26wf lock/unlock/is_locked functions. Signed-off-by: Eugeniy Paltsev--- drivers/mtd/spi/spi_flash.c | 188 1 file changed, 188 insertions(+) diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 294d9f9..ec3f5bc 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -842,6 +842,184 @@ int stm_unlock(struct spi_flash *flash, u32 ofs, size_t len) } #endif +#if defined(CONFIG_SPI_FLASH_SST) +#define SST26_CMD_READ_BPR 0x72 +#define SST26_CMD_WRITE_BPR0x42 + +#define BLOCK_64K_SZ 0x1 +#define MAX_BPR_REG_LEN(18 + 1) +#define SST26WF_BOUND_REG_SIZE ((32 + 4 * 8) * 1024) + +bool sst26_check_bpr(u32 bpr_size, u8 *cmd, u32 bit) +{ + return !!(cmd[bpr_size - (bit / 8) - 1] & BIT(bit % 8)); +} + +bool sst26_clear_bpr(u32 bpr_size, u8 *cmd, u32 bit) +{ + cmd[bpr_size - (bit / 8) - 1] &= ~BIT(bit % 8); + return false; +} + +bool sst26_set_bpr(u32 bpr_size, u8 *cmd, u32 bit) +{ + cmd[bpr_size - (bit / 8) - 1] |= BIT(bit % 8); + return false; +} + +enum lock_ctl { + CTL_LOCK, + CTL_UNLOCK, + CTL_CHECK +}; + +/* + * sst26wf016/sst26wf032/sst26wf064 have next block protection: + * 4x - 8 KByte blocks - read & write protection bits - upper addresses + * 1x - 32 KByte blocks - write protection bits + * rest - 64 KByte blocks - write protection bits + * 1x - 32 KByte blocks - write protection bits + * 4x - 8 KByte blocks - read & write protection bits - lower addresses + * + * We'll support only per 64k lock/unlock so lower and upper 64 KByte region + * will be treated as single block. + */ + +/* + * Lock, unlock or check lock status of the flash region of the flash (depending + * on the lock_ctl value) + */ +int sst26_lock_ctl(struct spi_flash *flash, u32 ofs, size_t len, enum lock_ctl ctl) +{ + u32 i, bpr_ptr, rptr_64k, lptr_64k, bpr_size; + bool lower_64k = false, upper_64k = false; + u8 cmd, bpr_buff[MAX_BPR_REG_LEN] = {}; + int ret; + + bool (* bpr_bit_process) (u32 bpr_size, u8 *, u32); + + /* Check length and offset for 64k alignment */ + if ((ofs & 0x) || (len & 0x)) + return -EINVAL; + + if (ofs + len > flash->size) + return -EINVAL; + + /* SST26 family has only 16 Mbit, 32 Mbit and 64 Mbit IC */ + if (flash->size != 0x20 && + flash->size != 0x40 && + flash->size != 0x80) + return -EINVAL; + + bpr_size = 2 + (flash->size / BLOCK_64K_SZ / 8); + + cmd = SST26_CMD_READ_BPR; + ret = spi_flash_read_common(flash, , 1, bpr_buff, bpr_size); + if (ret < 0) { + printf("SF: fail to read block-protection register\n"); + return ret; + } + + if (ctl == CTL_LOCK) + bpr_bit_process = sst26_set_bpr; + else if (ctl == CTL_UNLOCK) + bpr_bit_process = sst26_clear_bpr; + else + bpr_bit_process = sst26_check_bpr; + + rptr_64k = min_t(u32, ofs + len , flash->size - SST26WF_BOUND_REG_SIZE); + lptr_64k = max_t(u32, ofs, SST26WF_BOUND_REG_SIZE); + + upper_64k = ((ofs + len) > (flash->size - SST26WF_BOUND_REG_SIZE)); + lower_64k = (ofs < SST26WF_BOUND_REG_SIZE); + + /* Lower bits in block-protection register are about 64k region */ + bpr_ptr = lptr_64k / BLOCK_64K_SZ - 1; + + /* Process 64K blocks region */ + while (lptr_64k < rptr_64k) { + if (bpr_bit_process(bpr_size, bpr_buff, bpr_ptr)) + return 1; + + bpr_ptr++; + lptr_64k += BLOCK_64K_SZ; + } + + /* 32K and 8K region bits in BPR are after 64k region bits */ + bpr_ptr = (flash->size - 2 * SST26WF_BOUND_REG_SIZE) / BLOCK_64K_SZ; + + /* Process lower 32K block region */ + if (lower_64k) + if (bpr_bit_process(bpr_size, bpr_buff, bpr_ptr)) + return 1; + + bpr_ptr++; + + /* Process upper 32K block region */ + if (upper_64k) + if (bpr_bit_process(bpr_size, bpr_buff, bpr_ptr)) + return 1; + + bpr_ptr++; + + /* Process lower 8K block region */ + for (i = 0; i < 4; i++) { + if (lower_64k) + if (bpr_bit_process(bpr_size, bpr_buff, bpr_ptr)) + return 1; + + /* In 8K area BPR has both read and write protection bits */ + bpr_ptr += 2; + } + + /* Process upper 8K block region */ + for (i = 0; i < 4; i++) { + if (upper_64k) + if (bpr_bit_process(bpr_size, bpr_buff, bpr_ptr)) +
[U-Boot] [PATCH 2/2] SF: add support for sst26wf016, sst26wf032, sst26wf064
This commit adds support for the SST sst26wf016, sst26wf032 and sst26wf064 flash IC. Signed-off-by: Eugeniy Paltsev--- drivers/mtd/spi/spi_flash_ids.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/spi/spi_flash_ids.c b/drivers/mtd/spi/spi_flash_ids.c index 262d81e..dedc232 100644 --- a/drivers/mtd/spi/spi_flash_ids.c +++ b/drivers/mtd/spi/spi_flash_ids.c @@ -150,6 +150,9 @@ const struct spi_flash_info spi_flash_ids[] = { {"sst25wf040", INFO(0xbf2504, 0x0, 64 * 1024, 8, SECT_4K | SST_WR) }, {"sst25wf040b",INFO(0x621613, 0x0, 64 * 1024, 8, SECT_4K) }, {"sst25wf080", INFO(0xbf2505, 0x0, 64 * 1024,16, SECT_4K | SST_WR) }, + {"sst26wf016", INFO(0xbf2651, 0x0, 64 * 1024,32, SECT_4K) }, + {"sst26wf032", INFO(0xbf2622, 0x0, 64 * 1024,64, SECT_4K) }, + {"sst26wf064", INFO(0xbf2643, 0x0, 64 * 1024, 128, SECT_4K) }, #endif #ifdef CONFIG_SPI_FLASH_WINBOND/* WINBOND */ {"w25p80", INFO(0xef2014, 0x0, 64 * 1024,16, 0) }, -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 0/2] SF: add support for sst26wf016, sst26wf032, sst26wf064
Add support for the SST sst26wf016, sst26wf032 and sst26wf064 flash IC: sst26wf*** flash series block protection implementation differs from other SST series, so we add implementation for sst26wf*** lock/unlock/is_locked functions. Add sst26wf016, sst26wf032 and sst26wf064 flash IC info to spi_flash_ids list. Eugeniy Paltsev (2): SPI Flash: add support of sst26wf* flash series SF: add support for sst26wf016, sst26wf032, sst26wf064 drivers/mtd/spi/spi_flash.c | 188 drivers/mtd/spi/spi_flash_ids.c | 3 + 2 files changed, 191 insertions(+) -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 09/34] phy: Add Allwinner A64 USB PHY driver
On 02/06/2018 03:25 PM, Jagan Teki wrote: > USB PHY implementation for Allwinner SOC's can be handling > in to single driver with different phy configs. > > This driver handle all Allwinner USB PHY's start from 4I to > 50I(except 9I). Currently added A64 compatibility more will > add in next coming patches. > > Current implementation is unable to get pinctrl, clock and reset > details from DT since the dm code on these will add it future. > > Driver named as phy-sun4i-usb.c since the same PHY logic > work for all Allwinner SOC's start from 4I to A64 except 9I > with different phy configurations. > > Signed-off-by: Jagan Teki[...] > +#define MAX_PHYS 4 There should be one PHY per controller , so why do you need this ? > +enum sun4i_usb_phy_type { > + sun50i_a64_phy, > +}; > + > +struct sun4i_usb_phy_cfg { > + int num_phys; > + enum sun4i_usb_phy_type type; > + u32 disc_thresh; > + u8 phyctl_offset; > + bool enable_pmu_unk1; > + bool phy0_dual_route; > +}; > + > +struct sun4i_usb_phy_info { > + const char *gpio_vbus; > + const char *gpio_vbus_det; > + const char *gpio_id_det; > + int rst_mask; > +} phy_info[] = { > + { > + .gpio_vbus = CONFIG_USB0_VBUS_PIN, > + .gpio_vbus_det = CONFIG_USB0_VBUS_DET, > + .gpio_id_det = CONFIG_USB0_ID_DET, > + .rst_mask = (CCM_USB_CTRL_PHY0_RST | CCM_USB_CTRL_PHY0_CLK), > + }, > + { > + .gpio_vbus = CONFIG_USB1_VBUS_PIN, > + .gpio_vbus_det = NULL, > + .gpio_id_det = NULL, > + .rst_mask = (CCM_USB_CTRL_PHY1_RST | CCM_USB_CTRL_PHY1_CLK), > + }, > + { > + .gpio_vbus = CONFIG_USB2_VBUS_PIN, > + .gpio_vbus_det = NULL, > + .gpio_id_det = NULL, > + .rst_mask = (CCM_USB_CTRL_PHY2_RST | CCM_USB_CTRL_PHY2_CLK), > + }, > + { > + .gpio_vbus = CONFIG_USB3_VBUS_PIN, > + .gpio_vbus_det = NULL, > + .gpio_id_det = NULL, > + .rst_mask = (CCM_USB_CTRL_PHY3_RST | CCM_USB_CTRL_PHY3_CLK), > + }, > +}; > + > +struct sun4i_usb_phy_plat { > + void __iomem *pmu; > + int power_on_count; > + int gpio_vbus; > + int gpio_vbus_det; > + int gpio_id_det; > + int rst_mask; > + int id; > +}; > + > +struct sun4i_usb_phy_data { > + void __iomem *base; > + struct sunxi_ccm_reg *ccm; > + const struct sun4i_usb_phy_cfg *cfg; > + struct sun4i_usb_phy_plat *usb_phy; > +}; > + > +static int initial_usb_scan_delay = CONFIG_INITIAL_USB_SCAN_DELAY; Get rid of any static variables in this driver. And the delay should come from DT . > +static void sun4i_usb_phy_write(struct phy *phy, u32 addr, u32 data, int len) > +{ > + struct sun4i_usb_phy_data *phy_data = dev_get_priv(phy->dev); > + struct sun4i_usb_phy_plat *usb_phy = _data->usb_phy[phy->id]; > + u32 temp, usbc_bit = BIT(usb_phy->id * 2); > + void __iomem *phyctl = phy_data->base + phy_data->cfg->phyctl_offset; > + int i; > + > + if (phy_data->cfg->phyctl_offset == REG_PHYCTL_A33) { You should probably match on some type of the block here, not register offset, to identify the SoC . > + /* SoCs newer than A33 need us to set phyctl to 0 explicitly */ > + writel(0, phyctl); > + } > + > + for (i = 0; i < len; i++) { > + temp = readl(phyctl); > + > + /* clear the address portion */ > + temp &= ~(0xff << 8); > + > + /* set the address */ > + temp |= ((addr + i) << 8); > + writel(temp, phyctl); clrsetbits(), fix globally > + /* set the data bit and clear usbc bit*/ > + temp = readb(phyctl); > + if (data & 0x1) > + temp |= PHYCTL_DATA; > + else > + temp &= ~PHYCTL_DATA; > + temp &= ~usbc_bit; > + writeb(temp, phyctl); > + > + /* pulse usbc_bit */ > + temp = readb(phyctl); > + temp |= usbc_bit; > + writeb(temp, phyctl); > + > + temp = readb(phyctl); > + temp &= ~usbc_bit; > + writeb(temp, phyctl); > + > + data >>= 1; > + } > +} [...] -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 18/34] device-tree-bindings: phy: Sync sun4i-usb-phy bindings
On 02/06/2018 03:25 PM, Jagan Teki wrote: > Sync sun4i-usb-phy bindings from Linux, since the > drivers/phy/allwinner/phy-sun4i-usb.c follw similar. Similar or same ? Which version of Linux ? > Signed-off-by: Jagan Teki> --- > doc/device-tree-bindings/phy/sun4i-usb-phy.txt | 65 > ++ > 1 file changed, 65 insertions(+) > create mode 100644 doc/device-tree-bindings/phy/sun4i-usb-phy.txt > > diff --git a/doc/device-tree-bindings/phy/sun4i-usb-phy.txt > b/doc/device-tree-bindings/phy/sun4i-usb-phy.txt > new file mode 100644 > index 000..c1ce5a0 > --- /dev/null > +++ b/doc/device-tree-bindings/phy/sun4i-usb-phy.txt > @@ -0,0 +1,65 @@ > +Allwinner sun4i USB PHY > +--- > + > +Required properties: > +- compatible : should be one of > + * allwinner,sun4i-a10-usb-phy > + * allwinner,sun5i-a13-usb-phy > + * allwinner,sun6i-a31-usb-phy > + * allwinner,sun7i-a20-usb-phy > + * allwinner,sun8i-a23-usb-phy > + * allwinner,sun8i-a33-usb-phy > + * allwinner,sun8i-a83t-usb-phy > + * allwinner,sun8i-h3-usb-phy > + * allwinner,sun8i-v3s-usb-phy > + * allwinner,sun50i-a64-usb-phy > +- reg : a list of offset + length pairs > +- reg-names : > + * "phy_ctrl" > + * "pmu0" for H3, V3s and A64 > + * "pmu1" > + * "pmu2" for sun4i, sun6i, sun7i, sun8i-a83t or sun8i-h3 > + * "pmu3" for sun8i-h3 > +- #phy-cells : from the generic phy bindings, must be 1 > +- clocks : phandle + clock specifier for the phy clocks > +- clock-names : > + * "usb_phy" for sun4i, sun5i or sun7i > + * "usb0_phy", "usb1_phy" and "usb2_phy" for sun6i > + * "usb0_phy", "usb1_phy" for sun8i > + * "usb0_phy", "usb1_phy", "usb2_phy" and "usb2_hsic_12M" for sun8i-a83t > + * "usb0_phy", "usb1_phy", "usb2_phy" and "usb3_phy" for sun8i-h3 > +- resets : a list of phandle + reset specifier pairs > +- reset-names : > + * "usb0_reset" > + * "usb1_reset" > + * "usb2_reset" for sun4i, sun6i, sun7i, sun8i-a83t or sun8i-h3 > + * "usb3_reset" for sun8i-h3 > + > +Optional properties: > +- usb0_id_det-gpios : gpio phandle for reading the otg id pin value > +- usb0_vbus_det-gpios : gpio phandle for detecting the presence of usb0 vbus > +- usb0_vbus_power-supply: power-supply phandle for usb0 vbus presence detect > +- usb0_vbus-supply : regulator phandle for controller usb0 vbus > +- usb1_vbus-supply : regulator phandle for controller usb1 vbus > +- usb2_vbus-supply : regulator phandle for controller usb2 vbus > +- usb3_vbus-supply : regulator phandle for controller usb3 vbus > + > +Example: > + usbphy: phy@01c13400 { > + #phy-cells = <1>; > + compatible = "allwinner,sun4i-a10-usb-phy"; > + /* phy base regs, phy1 pmu reg, phy2 pmu reg */ > + reg = <0x01c13400 0x10 0x01c14800 0x4 0x01c1c800 0x4>; > + reg-names = "phy_ctrl", "pmu1", "pmu2"; > + clocks = <_clk 8>; > + clock-names = "usb_phy"; > + resets = <_clk 0>, <_clk 1>, <_clk 2>; > + reset-names = "usb0_reset", "usb1_reset", "usb2_reset"; > + pinctrl-names = "default"; > + pinctrl-0 = <_id_detect_pin>, <_vbus_detect_pin>; > + usb0_id_det-gpios = < 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */ > + usb0_vbus_det-gpios = < 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */ > + usb0_vbus-supply = <_usb0_vbus>; > + usb1_vbus-supply = <_usb1_vbus>; > + usb2_vbus-supply = <_usb2_vbus>; > + }; > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 21/34] usb: sunxi: Switch to use generic-phy
On 02/06/2018 03:25 PM, Jagan Teki wrote: > Allwinner USB PHY handling can be done through driver-model > generic-phy so add the generic-phy ops to relevant places > on host and musb sunxi driver and enable them in respective > SOC's. > > Signed-off-by: Jagan Teki> --- > arch/arm/mach-sunxi/Kconfig | 9 +++ > c | 0 What is this ? > drivers/usb/host/ehci-sunxi.c | 52 +++- > drivers/usb/host/ohci-sunxi.c | 54 +++-- > drivers/usb/musb-new/musb_uboot.c | 3 --- > drivers/usb/musb-new/sunxi.c | 56 > --- > 6 files changed, 135 insertions(+), 39 deletions(-) > create mode 100644 c [...] -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 08/34] musb: sunxi: Add support for H3/H5A64
On 02/06/2018 03:25 PM, Jagan Teki wrote: > Like other Allwinner SoC, the H3/H5/A64 is missing the config register > from the musb hardware block. Use a known working value for it > like other SoC. > > Signed-off-by: Jagan Teki> --- > drivers/usb/musb-new/musb_regs.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/musb-new/musb_regs.h > b/drivers/usb/musb-new/musb_regs.h > index a3cc38e..a6a491a 100644 > --- a/drivers/usb/musb-new/musb_regs.h > +++ b/drivers/usb/musb-new/musb_regs.h > @@ -432,7 +432,8 @@ static inline u8 musb_read_ulpi_buscontrol(void __iomem > *mbase) > > static inline u8 musb_read_configdata(void __iomem *mbase) > { Use DT matching, not this ifdef crap. > -#if defined CONFIG_MACH_SUN8I_A33 || defined CONFIG_MACH_SUN8I_A83T > +#if defined CONFIG_MACH_SUN8I_A33 || defined CONFIG_MACH_SUN8I_A83T || \ > + defined CONFIG_MACH_SUNXI_H3_H5 || defined CONFIG_MACH_SUN50I > /* allwinner saves a reg, and we need to hardcode this */ > return 0xde; > #else > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 04/34] musb: sunxi: Add fifo config
On 02/06/2018 03:25 PM, Jagan Teki wrote: > Unlike other Allwinner SOC's H3/H5/V3s OTG support 4 endpoints > with relevant fifo configs, rest all have 5 endpoints. > So add the fifo configs and defer them based on udevice_id compatible. > > Signed-off-by: Jagan Teki> --- > drivers/usb/musb-new/sunxi.c | 44 > +++- > 1 file changed, 43 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c > index 0b7ff9f..562d311 100644 > --- a/drivers/usb/musb-new/sunxi.c > +++ b/drivers/usb/musb-new/sunxi.c > @@ -301,13 +301,52 @@ static const struct musb_platform_ops sunxi_musb_ops = { > #define SUNXI_MUSB_MAX_EP_NUM6 > #define SUNXI_MUSB_RAM_BITS 11 > > +static struct musb_fifo_cfg sunxi_musb_mode_cfg[] = { > + MUSB_EP_FIFO_SINGLE(1, FIFO_TX, 512), > + MUSB_EP_FIFO_SINGLE(1, FIFO_RX, 512), > + MUSB_EP_FIFO_SINGLE(2, FIFO_TX, 512), > + MUSB_EP_FIFO_SINGLE(2, FIFO_RX, 512), > + MUSB_EP_FIFO_SINGLE(3, FIFO_TX, 512), > + MUSB_EP_FIFO_SINGLE(3, FIFO_RX, 512), > + MUSB_EP_FIFO_SINGLE(4, FIFO_TX, 512), > + MUSB_EP_FIFO_SINGLE(4, FIFO_RX, 512), > + MUSB_EP_FIFO_SINGLE(5, FIFO_TX, 512), > + MUSB_EP_FIFO_SINGLE(5, FIFO_RX, 512), Generate all this programatically with a loop ? > +}; > + > +/* H3/V3s OTG supports only 4 endpoints */ > +#define SUNXI_MUSB_MAX_EP_NUM_H3 5 > + > +static struct musb_fifo_cfg sunxi_musb_mode_cfg_h3[] = { > + MUSB_EP_FIFO_SINGLE(1, FIFO_TX, 512), > + MUSB_EP_FIFO_SINGLE(1, FIFO_RX, 512), > + MUSB_EP_FIFO_SINGLE(2, FIFO_TX, 512), > + MUSB_EP_FIFO_SINGLE(2, FIFO_RX, 512), > + MUSB_EP_FIFO_SINGLE(3, FIFO_TX, 512), > + MUSB_EP_FIFO_SINGLE(3, FIFO_RX, 512), > + MUSB_EP_FIFO_SINGLE(4, FIFO_TX, 512), > + MUSB_EP_FIFO_SINGLE(4, FIFO_RX, 512), > +}; > + > static struct musb_hdrc_config musb_config = { > + .fifo_cfg = sunxi_musb_mode_cfg, > + .fifo_cfg_size = ARRAY_SIZE(sunxi_musb_mode_cfg), > .multipoint = true, > .dyn_fifo = true, > .num_eps= SUNXI_MUSB_MAX_EP_NUM, > .ram_bits = SUNXI_MUSB_RAM_BITS, > }; > > +static struct musb_hdrc_config musb_config_h3 = { > + .fifo_cfg = sunxi_musb_mode_cfg_h3, > + .fifo_cfg_size = ARRAY_SIZE(sunxi_musb_mode_cfg_h3), > + .multipoint = true, > + .dyn_fifo = true, > + .soft_con = true, > + .num_eps= SUNXI_MUSB_MAX_EP_NUM_H3, > + .ram_bits = SUNXI_MUSB_RAM_BITS, > +}; > + > static int musb_usb_probe(struct udevice *dev) > { > struct sunxi_glue *glue = dev_get_priv(dev); > @@ -328,7 +367,10 @@ static int musb_usb_probe(struct udevice *dev) > > pdata.power = 250; > pdata.platform_ops = _musb_ops; > - pdata.config = _config; > + if (!device_is_compatible(dev, "allwinner,sun8i-h3-musb")) Instead of this, use the compatible's .data to pass the musb_config(_h3). Then you can do pdata.config = dev_get_driver_data(dev); > + pdata.config = _config; > + else > + pdata.config = _config_h3; > > #ifdef CONFIG_USB_MUSB_HOST > pdata.mode = MUSB_HOST; > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 06/34] musb: sunxi: Add OTG device clkgate and reset for H3/H5
On 02/06/2018 03:25 PM, Jagan Teki wrote: > Enable OTG device clkgate and reset for H3/H5 > > Signed-off-by: Jagan Teki> Suggested-by: Jun Nie > --- > Note: > Since the driver is dm-driver, we even add SOC changes based on > compatible or driver_data but here few of the reset and clock bits > and register offset memebers are in SOC includes files. > > I even try to add driver code by adding config structure in .data > but that eventually increasing size. > All these code will anyway move to clock and reset framework > once dm support added. > > arch/arm/include/asm/arch-sunxi/clock_sun6i.h | 1 + > drivers/usb/musb-new/sunxi.c | 24 ++-- > 2 files changed, 19 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h > b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h > index d794e16..6569883 100644 > --- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h > +++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h > @@ -288,6 +288,7 @@ struct sunxi_ccm_reg { > #define AHB_GATE_OFFSET_USB_EHCI127 > #define AHB_GATE_OFFSET_USB_EHCI026 > #endif > +#define AHB_GATE_OFFSET_OTG_DEVICE 23 > #ifdef CONFIG_MACH_SUN50I > #define AHB_GATE_OFFSET_USB0 23 > #elif !defined(CONFIG_MACH_SUN8I_R40) > diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c > index 562d311..7d94936 100644 > --- a/drivers/usb/musb-new/sunxi.c > +++ b/drivers/usb/musb-new/sunxi.c > @@ -80,6 +80,8 @@ struct sunxi_glue { > struct musb_host_data mdata; > struct sunxi_ccm_reg *ccm; > struct device dev; > + u32 rst_bit; > + u32 clkgate_bit; Until we reach 256bit systems, this can be u8 [...] -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 03/34] musb: sunxi: Use simple way to fill musb_hdrc pdata
On 02/06/2018 03:25 PM, Jagan Teki wrote: > Filling musb_hdrc pdata using structure will unnecessary > add extra ifdefs, so fill them inside probe call for > better code understanding and get rid ifdefs using > devicetree compatible. > > Signed-off-by: Jagan Teki> --- > drivers/usb/musb-new/sunxi.c | 22 +- > 1 file changed, 9 insertions(+), 13 deletions(-) > > diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c > index 3f3b898..0b7ff9f 100644 > --- a/drivers/usb/musb-new/sunxi.c > +++ b/drivers/usb/musb-new/sunxi.c > @@ -308,22 +308,12 @@ static struct musb_hdrc_config musb_config = { > .ram_bits = SUNXI_MUSB_RAM_BITS, > }; > > -static struct musb_hdrc_platform_data musb_plat = { > -#if defined(CONFIG_USB_MUSB_HOST) > - .mode = MUSB_HOST, > -#else > - .mode = MUSB_PERIPHERAL, > -#endif > - .config = _config, > - .power = 250, > - .platform_ops = _musb_ops, > -}; > - > static int musb_usb_probe(struct udevice *dev) > { > struct sunxi_glue *glue = dev_get_priv(dev); > struct musb_host_data *host = >mdata; > struct usb_bus_priv *priv = dev_get_uclass_priv(dev); > + struct musb_hdrc_platform_data pdata; Make this pdata = musb_plat and then tweak pdata down below to avoid assigning all the values there. > void *base = dev_read_addr_ptr(dev); > int ret; > > @@ -336,8 +326,13 @@ static int musb_usb_probe(struct udevice *dev) > > priv->desc_before_addr = true; > > + pdata.power = 250; > + pdata.platform_ops = _musb_ops; > + pdata.config = _config; > + > #ifdef CONFIG_USB_MUSB_HOST > - host->host = musb_init_controller(_plat, >dev, base); > + pdata.mode = MUSB_HOST; > + host->host = musb_init_controller(, >dev, base); > if (!host->host) > return -EIO; > > @@ -345,7 +340,8 @@ static int musb_usb_probe(struct udevice *dev) > if (!ret) > printf("Allwinner mUSB OTG (Host)\n"); > #else > - ret = musb_register(_plat, >dev, base); > + pdata.mode = MUSB_PERIPHERAL; > + ret = musb_register(, >dev, base); > if (!ret) > printf("Allwinner mUSB OTG (Peripheral)\n"); > #endif > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 01/34] usb: sunxi: Simplify ccm reg base code
On 02/06/2018 03:25 PM, Jagan Teki wrote: > Move struct sunxi_ccm_reg pointer to private structure > so-that accessing ccm reg base become more proper way > and avoid local initialization in each function. > > Signed-off-by: Jagan Teki> --- > drivers/usb/host/ehci-sunxi.c | 15 +-- > drivers/usb/host/ohci-sunxi.c | 19 +++ > drivers/usb/musb-new/sunxi.c | 34 +++--- > 3 files changed, 43 insertions(+), 25 deletions(-) > > diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c > index 6ecb7c4..ed9763c 100644 > --- a/drivers/usb/host/ehci-sunxi.c > +++ b/drivers/usb/host/ehci-sunxi.c > @@ -27,19 +27,23 @@ > > struct ehci_sunxi_priv { > struct ehci_ctrl ehci; > + struct sunxi_ccm_reg *ccm; > int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */ > int phy_index; /* Index of the usb-phy attached to this hcd */ > }; > > static int ehci_usb_probe(struct udevice *dev) > { > - struct sunxi_ccm_reg *ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; Keep this, so you don't have to modify every setbits()/... down below. > struct usb_platdata *plat = dev_get_platdata(dev); > struct ehci_sunxi_priv *priv = dev_get_priv(dev); > struct ehci_hccr *hccr = (struct ehci_hccr *)devfdt_get_addr(dev); > struct ehci_hcor *hcor; > int extra_ahb_gate_mask = 0; > > + priv->ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; Do priv->ccm = ccm , done . > + if (IS_ERR(priv->ccm)) > + return PTR_ERR(priv->ccm); > + > /* >* This should go away once we've moved to the driver model for >* clocks resp. phys. [...] -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH V3] Convert CONFIG_APBH_DMA et al to Kconfig
On 06.02.2018 15:34, Adam Ford wrote: > This converts the following to Kconfig: >CONFIG_APBH_DMA >CONFIG_APBH_DMA_BURST >CONFIG_APBH_DMA_BURST8 > > Signed-off-by: Adam FordThanks, that looks good to me! Reviewed-by: Stefan Agner -- Stefan > --- > V3: Rebased on "arm: imx: convert MX23/28 and MXS NAND to Kconfig" > Make APBH_DMA depend on NAND_MXS since it appears to be the only > driver using DMA. This keeps the defconfig files from changing > V2: Rebase on [U-Boot,v2,1/6] Convert CONFIG_NAND_MXS to Kconfig > Make the NAND controller in MX6 MX7 autoselect the DMA options > > drivers/dma/Kconfig | 15 +++ > drivers/mtd/nand/Kconfig | 3 +++ > include/configs/aristainetos-common.h | 3 --- > include/configs/cm_fx6.h | 3 --- > include/configs/colibri_imx7.h| 3 --- > include/configs/gw_ventana.h | 3 --- > include/configs/imx6-engicam.h| 4 > include/configs/imx6_logic.h | 3 --- > include/configs/mx6sabreauto.h| 3 --- > include/configs/mx6sxsabreauto.h | 3 --- > include/configs/mx7dsabresd.h | 3 --- > include/configs/mxs.h | 1 - > include/configs/pcm058.h | 3 --- > include/configs/pfla02.h | 3 --- > include/configs/platinum.h| 3 --- > include/configs/titanium.h| 3 --- > scripts/config_whitelist.txt | 3 --- > 17 files changed, 18 insertions(+), 44 deletions(-) > > diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig > index 1b92c77..4b96bda 100644 > --- a/drivers/dma/Kconfig > +++ b/drivers/dma/Kconfig > @@ -19,4 +19,19 @@ config TI_EDMA3 > This driver support data transfer between memory > regions. > > +config APBH_DMA > + bool "Support APBH DMA" > + depends on NAND_MXS > + help > + Enable APBH DMA driver. > + > +if APBH_DMA > +config APBH_DMA_BURST > + bool "Enable DMA BURST" > + > +config APBH_DMA_BURST8 > + bool "Enable DMA BURST8" > + > +endif > + > endmenu # menu "DMA Support" > diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig > index 57d2757..a820af6 100644 > --- a/drivers/mtd/nand/Kconfig > +++ b/drivers/mtd/nand/Kconfig > @@ -142,6 +142,9 @@ config NAND_MXS > bool "MXS NAND support" > depends on MX23 || MX28 || MX6 || MX7 > imply CMD_NAND > + select APBH_DMA > + select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7 > + select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7 > help > This enables NAND driver for the NAND flash controller on the > MXS processors. > diff --git a/include/configs/aristainetos-common.h > b/include/configs/aristainetos-common.h > index 9b1a39d..69de44a 100644 > --- a/include/configs/aristainetos-common.h > +++ b/include/configs/aristainetos-common.h > @@ -182,9 +182,6 @@ > #define CONFIG_SYS_NAND_ONFI_DETECTION > > /* DMA stuff, needed for GPMI/MXS NAND support */ > -#define CONFIG_APBH_DMA > -#define CONFIG_APBH_DMA_BURST > -#define CONFIG_APBH_DMA_BURST8 > > /* RTC */ > #define CONFIG_SYS_I2C_RTC_ADDR 0x68 > diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h > index 90cf024..39d166a 100644 > --- a/include/configs/cm_fx6.h > +++ b/include/configs/cm_fx6.h > @@ -184,9 +184,6 @@ > #define CONFIG_SYS_MAX_NAND_DEVICE 1 > #define CONFIG_SYS_NAND_ONFI_DETECTION > /* APBH DMA is required for NAND support */ > -#define CONFIG_APBH_DMA > -#define CONFIG_APBH_DMA_BURST > -#define CONFIG_APBH_DMA_BURST8 > #endif > > /* Ethernet */ > diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h > index d4aaff6..5d9b212 100644 > --- a/include/configs/colibri_imx7.h > +++ b/include/configs/colibri_imx7.h > @@ -170,9 +170,6 @@ > #define CONFIG_MTD_DEVICE/* needed for mtdparts commands */ > > /* DMA stuff, needed for GPMI/MXS NAND support */ > -#define CONFIG_APBH_DMA > -#define CONFIG_APBH_DMA_BURST > -#define CONFIG_APBH_DMA_BURST8 > > /* USB Configs */ > #define CONFIG_EHCI_HCD_INIT_AFTER_RESET > diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h > index 517ad08..6e994b5 100644 > --- a/include/configs/gw_ventana.h > +++ b/include/configs/gw_ventana.h > @@ -73,9 +73,6 @@ >#define CONFIG_SYS_NAND_ONFI_DETECTION > >/* DMA stuff, needed for GPMI/MXS NAND support */ > - #define CONFIG_APBH_DMA > - #define CONFIG_APBH_DMA_BURST > - #define CONFIG_APBH_DMA_BURST8 > #endif > > #endif /* CONFIG_SPI_FLASH */ > diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h > index 5f43dfb..246a636 100644 > --- a/include/configs/imx6-engicam.h > +++ b/include/configs/imx6-engicam.h > @@ -161,10 +161,6 @@ > /* MTD device */ > # define CONFIG_MTD_DEVICE > # define CONFIG_MTD_PARTITIONS > - > -# define CONFIG_APBH_DMA > -# define CONFIG_APBH_DMA_BURST > -# define CONFIG_APBH_DMA_BURST8 >
[U-Boot] CONFIG_RANDOM_UUID and CONFIG_CMD_UUID unused?
config_fallbacks.h both check to see if CONFIG_RANDOM_UUID or CONFIG_CMD_UUID are defined, but I don't ever see either of these options defined. Can this go away: #if (defined(CONFIG_RANDOM_UUID) || \ defined(CONFIG_CMD_UUID)) && \ (!defined(CONFIG_LIB_RAND) && \ !defined(CONFIG_LIB_HW_RAND)) #define CONFIG_LIB_RAND #endif ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Unused CONFIG_SYS_MAXARGS?
I am curious to know if CONFIG_SYS_MAXARGS actually does something. I see it defined in many places, I see it #undef'd and I see it used #ifndef, but I don't see any actual source use it. Can this be removed or I am missing something? adam ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] CONFIG_CMD_KGDB unused?
I see lots of places where the check for CONFIG_CMD_KGDB is done, but I see no place where it is ever defined and I don't see a description in README. Is this still needed? adam ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 32/34] configs: orangepi-pc2: Enable USB OTG peripheral mode
Enable USB_MUSB_GADGET which operate OTG in peripheral mode Signed-off-by: Jagan Teki--- configs/orangepi_pc2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig index e5fea42..9db7655 100644 --- a/configs/orangepi_pc2_defconfig +++ b/configs/orangepi_pc2_defconfig @@ -15,4 +15,5 @@ CONFIG_SPL=y CONFIG_SPL_SPI_SUNXI=y CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y +CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH V3] Convert CONFIG_APBH_DMA et al to Kconfig
This converts the following to Kconfig: CONFIG_APBH_DMA CONFIG_APBH_DMA_BURST CONFIG_APBH_DMA_BURST8 Signed-off-by: Adam Ford--- V3: Rebased on "arm: imx: convert MX23/28 and MXS NAND to Kconfig" Make APBH_DMA depend on NAND_MXS since it appears to be the only driver using DMA. This keeps the defconfig files from changing V2: Rebase on [U-Boot,v2,1/6] Convert CONFIG_NAND_MXS to Kconfig Make the NAND controller in MX6 MX7 autoselect the DMA options drivers/dma/Kconfig | 15 +++ drivers/mtd/nand/Kconfig | 3 +++ include/configs/aristainetos-common.h | 3 --- include/configs/cm_fx6.h | 3 --- include/configs/colibri_imx7.h| 3 --- include/configs/gw_ventana.h | 3 --- include/configs/imx6-engicam.h| 4 include/configs/imx6_logic.h | 3 --- include/configs/mx6sabreauto.h| 3 --- include/configs/mx6sxsabreauto.h | 3 --- include/configs/mx7dsabresd.h | 3 --- include/configs/mxs.h | 1 - include/configs/pcm058.h | 3 --- include/configs/pfla02.h | 3 --- include/configs/platinum.h| 3 --- include/configs/titanium.h| 3 --- scripts/config_whitelist.txt | 3 --- 17 files changed, 18 insertions(+), 44 deletions(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index 1b92c77..4b96bda 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -19,4 +19,19 @@ config TI_EDMA3 This driver support data transfer between memory regions. +config APBH_DMA + bool "Support APBH DMA" + depends on NAND_MXS + help + Enable APBH DMA driver. + +if APBH_DMA +config APBH_DMA_BURST + bool "Enable DMA BURST" + +config APBH_DMA_BURST8 + bool "Enable DMA BURST8" + +endif + endmenu # menu "DMA Support" diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 57d2757..a820af6 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -142,6 +142,9 @@ config NAND_MXS bool "MXS NAND support" depends on MX23 || MX28 || MX6 || MX7 imply CMD_NAND + select APBH_DMA + select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7 + select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7 help This enables NAND driver for the NAND flash controller on the MXS processors. diff --git a/include/configs/aristainetos-common.h b/include/configs/aristainetos-common.h index 9b1a39d..69de44a 100644 --- a/include/configs/aristainetos-common.h +++ b/include/configs/aristainetos-common.h @@ -182,9 +182,6 @@ #define CONFIG_SYS_NAND_ONFI_DETECTION /* DMA stuff, needed for GPMI/MXS NAND support */ -#define CONFIG_APBH_DMA -#define CONFIG_APBH_DMA_BURST -#define CONFIG_APBH_DMA_BURST8 /* RTC */ #define CONFIG_SYS_I2C_RTC_ADDR0x68 diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 90cf024..39d166a 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -184,9 +184,6 @@ #define CONFIG_SYS_MAX_NAND_DEVICE 1 #define CONFIG_SYS_NAND_ONFI_DETECTION /* APBH DMA is required for NAND support */ -#define CONFIG_APBH_DMA -#define CONFIG_APBH_DMA_BURST -#define CONFIG_APBH_DMA_BURST8 #endif /* Ethernet */ diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index d4aaff6..5d9b212 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -170,9 +170,6 @@ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ /* DMA stuff, needed for GPMI/MXS NAND support */ -#define CONFIG_APBH_DMA -#define CONFIG_APBH_DMA_BURST -#define CONFIG_APBH_DMA_BURST8 /* USB Configs */ #define CONFIG_EHCI_HCD_INIT_AFTER_RESET diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 517ad08..6e994b5 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -73,9 +73,6 @@ #define CONFIG_SYS_NAND_ONFI_DETECTION /* DMA stuff, needed for GPMI/MXS NAND support */ - #define CONFIG_APBH_DMA - #define CONFIG_APBH_DMA_BURST - #define CONFIG_APBH_DMA_BURST8 #endif #endif /* CONFIG_SPI_FLASH */ diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h index 5f43dfb..246a636 100644 --- a/include/configs/imx6-engicam.h +++ b/include/configs/imx6-engicam.h @@ -161,10 +161,6 @@ /* MTD device */ # define CONFIG_MTD_DEVICE # define CONFIG_MTD_PARTITIONS - -# define CONFIG_APBH_DMA -# define CONFIG_APBH_DMA_BURST -# define CONFIG_APBH_DMA_BURST8 #endif /* Ethernet */ diff --git a/include/configs/imx6_logic.h b/include/configs/imx6_logic.h index f0ff5b2..8b91a53 100644 --- a/include/configs/imx6_logic.h +++ b/include/configs/imx6_logic.h @@ -156,9 +156,6 @@ # define CONFIG_MTD_PARTITIONS /* DMA stuff, needed for GPMI/MXS NAND support */ -#define CONFIG_APBH_DMA -#define CONFIG_APBH_DMA_BURST -#define
[U-Boot] [PATCH v4 17/34] phy: sun4i-usb: Add A23 USB PHY config
Allwinner A23 has 2 USB PHY's and 0x04 has phy ctrl offset. Signed-off-by: Jagan Teki--- drivers/phy/allwinner/phy-sun4i-usb.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 75056e2..4194a15 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -495,6 +495,14 @@ static const struct sun4i_usb_phy_cfg sun7i_a20_cfg = { .enable_pmu_unk1 = false, }; +static const struct sun4i_usb_phy_cfg sun8i_a23_cfg = { + .num_phys = 2, + .type = sun4i_a10_phy, + .disc_thresh = 3, + .phyctl_offset = REG_PHYCTL_A10, + .enable_pmu_unk1 = false, +}; + static const struct sun4i_usb_phy_cfg sun8i_a33_cfg = { .num_phys = 2, .type = sun8i_a33_phy, @@ -541,6 +549,7 @@ static const struct udevice_id sun4i_usb_phy_ids[] = { { .compatible = "allwinner,sun5i-a13-usb-phy", .data = (ulong)_a13_cfg }, { .compatible = "allwinner,sun6i-a31-usb-phy", .data = (ulong)_a31_cfg }, { .compatible = "allwinner,sun7i-a20-usb-phy", .data = (ulong)_a20_cfg }, + { .compatible = "allwinner,sun8i-a23-usb-phy", .data = (ulong)_a23_cfg }, { .compatible = "allwinner,sun8i-a33-usb-phy", .data = (ulong)_a33_cfg }, { .compatible = "allwinner,sun8i-a83t-usb-phy", .data = (ulong)_a83t_cfg }, { .compatible = "allwinner,sun8i-h3-usb-phy", .data = (ulong)_h3_cfg }, -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 19/34] board: sunxi: Use generic-phy for board_usb_cable_connected
Allwinner PHY USB code is now part of generic-phy framework, so use it in board_usb_cable_connected. Signed-off-by: Jagan Teki--- board/sunxi/board.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 8891961..885d301 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -12,8 +12,11 @@ */ #include +#include #include #include +#include +#include #include #include #include @@ -597,7 +600,35 @@ void sunxi_board_init(void) #ifdef CONFIG_USB_GADGET int g_dnl_board_usb_cable_connected(void) { - return sunxi_usb_phy_vbus_detect(0); + struct udevice *dev; + struct phy phy; + int ret; + + ret = uclass_get_device(UCLASS_USB_DEV_GENERIC, 0, ); + if (ret) { + pr_err("%s: Cannot find USB device\n", __func__); + return ret; + } + + ret = generic_phy_get_by_name(dev, "usb", ); + if (ret) { + pr_err("failed to get %s USB PHY\n", dev->name); + return ret; + } + + ret = generic_phy_init(); + if (ret) { + pr_err("failed to init %s USB PHY\n", dev->name); + return ret; + } + + ret = sun4i_usb_phy_vbus_detect(); + if (ret == 1) { + pr_err("A charger is plugged into the OTG\n"); + return -ENODEV; + } + + return ret; } #endif -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 29/34] configs: bananapi-m2-plus: Enable USB OTG peripheral mode
Enable USB_MUSB_GADGET which operate OTG in peripheral mode Signed-off-by: Jagan Teki--- configs/Sinovoip_BPI_M2_Plus_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/Sinovoip_BPI_M2_Plus_defconfig b/configs/Sinovoip_BPI_M2_Plus_defconfig index 3338b64..36f8094 100644 --- a/configs/Sinovoip_BPI_M2_Plus_defconfig +++ b/configs/Sinovoip_BPI_M2_Plus_defconfig @@ -16,4 +16,5 @@ CONFIG_SPL=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y +CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 23/34] sunxi: h3: Sync OTG and HCI nodes from Linux DT
From: Jun NieAllwinner H3 have a dual-routed USB PHY0 -- routed to either OHCI/EHCI or MUSB controller. Signed-off-by: Jun Nie Reviewed-by: Jagan Teki --- arch/arm/dts/sun8i-h3.dtsi | 32 1 file changed, 32 insertions(+) diff --git a/arch/arm/dts/sun8i-h3.dtsi b/arch/arm/dts/sun8i-h3.dtsi index afa6079..d9728a7 100644 --- a/arch/arm/dts/sun8i-h3.dtsi +++ b/arch/arm/dts/sun8i-h3.dtsi @@ -218,6 +218,19 @@ #size-cells = <0>; }; + usb_otg: usb@1c19000 { + compatible = "allwinner,sun8i-h3-musb"; + reg = <0x01c19000 0x400>; + clocks = < CLK_BUS_OTG>; + resets = < RST_BUS_OTG>; + interrupts = ; + interrupt-names = "mc"; + phys = < 0>; + phy-names = "usb"; + extcon = < 0>; + status = "disabled"; + }; + usbphy: phy@01c19400 { compatible = "allwinner,sun8i-h3-usb-phy"; reg = <0x01c19400 0x2c>, @@ -250,6 +263,25 @@ #phy-cells = <1>; }; + ehci0: usb@1c1a000 { + compatible = "allwinner,sun8i-h3-ehci", "generic-ehci"; + reg = <0x01c1a000 0x100>; + interrupts = ; + clocks = < CLK_BUS_EHCI0>, < CLK_BUS_OHCI0>; + resets = < RST_BUS_EHCI0>, < RST_BUS_OHCI0>; + status = "disabled"; + }; + + ohci0: usb@1c1a400 { + compatible = "allwinner,sun8i-h3-ohci", "generic-ohci"; + reg = <0x01c1a400 0x100>; + interrupts = ; + clocks = < CLK_BUS_EHCI0>, < CLK_BUS_OHCI0>, +< CLK_USB_OHCI0>; + resets = < RST_BUS_EHCI0>, < RST_BUS_OHCI0>; + status = "disabled"; + }; + ehci1: usb@01c1b000 { compatible = "allwinner,sun8i-h3-ehci", "generic-ehci"; reg = <0x01c1b000 0x100>; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 20/34] phy: sun4i-usb: Add a sunxi specific function for setting squelch-detect
The sunxi otg phy has a bug where it wrongly detects a high speed squelch when reset on the root port gets de-asserted with a lo-speed device. The workaround for this is to disable squelch detect before de-asserting reset, and re-enabling it after the reset de-assert is done. Add a sunxi specific phy function to allow the sunxi-musb glue to do this. Signed-off-by: Jagan Teki--- drivers/phy/allwinner/phy-sun4i-usb.c | 6 ++ drivers/usb/musb-new/musb_core.h | 4 drivers/usb/musb-new/musb_uboot.c | 19 --- drivers/usb/musb-new/sunxi.c | 16 include/phy-sun4i-usb.h | 8 5 files changed, 42 insertions(+), 11 deletions(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 4194a15..2b3cf48 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -36,6 +36,7 @@ #define PHY_TX_AMPLITUDE_TUNE 0x20 #define PHY_TX_SLEWRATE_TUNE 0x22 #define PHY_DISCON_TH_SEL 0x2a +#define PHY_SQUELCH_DETECT 0x3c #define PHYCTL_DATABIT(7) #define OTGCTL_ROUTE_MUSB BIT(0) @@ -383,6 +384,11 @@ int sun4i_usb_phy_id_detect(struct phy *phy) return gpio_get_value(usb_phy->gpio_id_det); } +void sun4i_usb_phy_set_squelch_detect(struct phy *phy, bool enabled) +{ + sun4i_usb_phy_write(phy, PHY_SQUELCH_DETECT, enabled ? 0 : 2, 2); +} + static struct phy_ops sun4i_usb_phy_ops = { .of_xlate = sun4i_usb_phy_xlate, .init = sun4i_usb_phy_init, diff --git a/drivers/usb/musb-new/musb_core.h b/drivers/usb/musb-new/musb_core.h index 6394bb0..713a3cf 100644 --- a/drivers/usb/musb-new/musb_core.h +++ b/drivers/usb/musb-new/musb_core.h @@ -201,6 +201,8 @@ enum musb_g_ep0_state { * @vbus_status: returns vbus status if possible * @set_vbus: forces vbus status * @adjust_channel_params: pre check for standard dma channel_program func + * @pre_root_reset_end: called before the root usb port reset flag gets cleared + * @post_root_reset_end: called after the root usb port reset flag gets cleared */ struct musb_platform_ops { int (*init)(struct musb *musb); @@ -222,6 +224,8 @@ struct musb_platform_ops { int (*adjust_channel_params)(struct dma_channel *channel, u16 packet_sz, u8 *mode, dma_addr_t *dma_addr, u32 *len); + void(*pre_root_reset_end)(struct musb *musb); + void(*post_root_reset_end)(struct musb *musb); }; /* diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c index 8662c0f..48242c0 100644 --- a/drivers/usb/musb-new/musb_uboot.c +++ b/drivers/usb/musb-new/musb_uboot.c @@ -193,19 +193,16 @@ static int _musb_reset_root_port(struct musb_host_data *host, power &= 0xf0; musb_writeb(mbase, MUSB_POWER, MUSB_POWER_RESET | power); mdelay(50); -#ifdef CONFIG_ARCH_SUNXI - /* -* sunxi phy has a bug and it will wrongly detect high speed squelch -* when clearing reset on low-speed devices, temporary disable -* squelch detection to work around this. -*/ - sunxi_usb_phy_enable_squelch_detect(0, 0); -#endif + + if (host->host->ops->pre_root_reset_end) + host->host->ops->pre_root_reset_end(host->host); + power = musb_readb(mbase, MUSB_POWER); musb_writeb(mbase, MUSB_POWER, ~MUSB_POWER_RESET & power); -#ifdef CONFIG_ARCH_SUNXI - sunxi_usb_phy_enable_squelch_detect(0, 1); -#endif + + if (host->host->ops->post_root_reset_end) + host->host->ops->post_root_reset_end(host->host); + host->host->isr(0, host->host); host->host_speed = (musb_readb(mbase, MUSB_POWER) & MUSB_POWER_HSMODE) ? USB_SPEED_HIGH : diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 7d94936..c0afd2c 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -296,10 +296,26 @@ static int sunxi_musb_init(struct musb *musb) return 0; } +static void sunxi_musb_pre_root_reset_end(struct musb *musb) +{ + struct sunxi_glue *glue = to_sunxi_glue(musb->controller); + + sun4i_usb_phy_set_squelch_detect(glue->phy, false); +} + +static void sunxi_musb_post_root_reset_end(struct musb *musb) +{ + struct sunxi_glue *glue = to_sunxi_glue(musb->controller); + + sun4i_usb_phy_set_squelch_detect(glue->phy, true); +} + static const struct musb_platform_ops sunxi_musb_ops = { .init = sunxi_musb_init, .enable = sunxi_musb_enable, .disable= sunxi_musb_disable, + .pre_root_reset_end = sunxi_musb_pre_root_reset_end, + .post_root_reset_end = sunxi_musb_post_root_reset_end, }; /* Allwinner OTG supports up to 5 endpoints */ diff --git
[U-Boot] [PATCH v4 16/34] phy: sun4i-usb: Add A33 USB PHY config
Allwinner A33 has 2 USB PHY's and 0x10 has phy ctrl offset. Signed-off-by: Jagan Teki--- drivers/phy/allwinner/phy-sun4i-usb.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 16b399e..75056e2 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -67,6 +67,7 @@ enum sun4i_usb_phy_type { sun4i_a10_phy, sun6i_a31_phy, + sun8i_a33_phy, sun8i_a83t_phy, sun8i_h3_phy, sun8i_v3s_phy, @@ -494,6 +495,14 @@ static const struct sun4i_usb_phy_cfg sun7i_a20_cfg = { .enable_pmu_unk1 = false, }; +static const struct sun4i_usb_phy_cfg sun8i_a33_cfg = { + .num_phys = 2, + .type = sun8i_a33_phy, + .disc_thresh = 3, + .phyctl_offset = REG_PHYCTL_A33, + .enable_pmu_unk1 = false, +}; + static const struct sun4i_usb_phy_cfg sun8i_a83t_cfg = { .num_phys = 3, .type = sun8i_a83t_phy, @@ -532,6 +541,7 @@ static const struct udevice_id sun4i_usb_phy_ids[] = { { .compatible = "allwinner,sun5i-a13-usb-phy", .data = (ulong)_a13_cfg }, { .compatible = "allwinner,sun6i-a31-usb-phy", .data = (ulong)_a31_cfg }, { .compatible = "allwinner,sun7i-a20-usb-phy", .data = (ulong)_a20_cfg }, + { .compatible = "allwinner,sun8i-a33-usb-phy", .data = (ulong)_a33_cfg }, { .compatible = "allwinner,sun8i-a83t-usb-phy", .data = (ulong)_a83t_cfg }, { .compatible = "allwinner,sun8i-h3-usb-phy", .data = (ulong)_h3_cfg }, { .compatible = "allwinner,sun8i-v3s-usb-phy", .data = (ulong)_v3s_cfg }, -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 14/34] phy: sun4i-usb: Add A10/A13/A20 PHY config
Add PHY configs for Allwinner A10/A13/A20 which are SUN4I. Signed-off-by: Jagan Teki--- drivers/phy/allwinner/phy-sun4i-usb.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 01782ac..abb3d0f 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -65,6 +65,7 @@ #define MAX_PHYS 4 enum sun4i_usb_phy_type { + sun4i_a10_phy, sun8i_a83t_phy, sun8i_h3_phy, sun8i_v3s_phy, @@ -460,6 +461,30 @@ static int sun4i_usb_phy_probe(struct udevice *dev) return 0; } +static const struct sun4i_usb_phy_cfg sun4i_a10_cfg = { + .num_phys = 3, + .type = sun4i_a10_phy, + .disc_thresh = 3, + .phyctl_offset = REG_PHYCTL_A10, + .enable_pmu_unk1 = false, +}; + +static const struct sun4i_usb_phy_cfg sun5i_a13_cfg = { + .num_phys = 2, + .type = sun4i_a10_phy, + .disc_thresh = 2, + .phyctl_offset = REG_PHYCTL_A10, + .enable_pmu_unk1 = false, +}; + +static const struct sun4i_usb_phy_cfg sun7i_a20_cfg = { + .num_phys = 3, + .type = sun4i_a10_phy, + .disc_thresh = 2, + .phyctl_offset = REG_PHYCTL_A10, + .enable_pmu_unk1 = false, +}; + static const struct sun4i_usb_phy_cfg sun8i_a83t_cfg = { .num_phys = 3, .type = sun8i_a83t_phy, @@ -494,6 +519,9 @@ static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = { }; static const struct udevice_id sun4i_usb_phy_ids[] = { + { .compatible = "allwinner,sun4i-a10-usb-phy", .data = (ulong)_a10_cfg }, + { .compatible = "allwinner,sun5i-a13-usb-phy", .data = (ulong)_a13_cfg }, + { .compatible = "allwinner,sun7i-a20-usb-phy", .data = (ulong)_a20_cfg }, { .compatible = "allwinner,sun8i-a83t-usb-phy", .data = (ulong)_a83t_cfg }, { .compatible = "allwinner,sun8i-h3-usb-phy", .data = (ulong)_h3_cfg }, { .compatible = "allwinner,sun8i-v3s-usb-phy", .data = (ulong)_v3s_cfg }, -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 34/34] configs: orangepi-prime: Enable USB OTG peripheral mode
Enable USB_MUSB_GADGET which operate OTG in peripheral mode Signed-off-by: Jagan Teki--- configs/orangepi_prime_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/orangepi_prime_defconfig b/configs/orangepi_prime_defconfig index 3d87374..a2e8f2e 100644 --- a/configs/orangepi_prime_defconfig +++ b/configs/orangepi_prime_defconfig @@ -13,4 +13,5 @@ CONFIG_SPL=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y +CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 13/34] phy: sun4i-usb: Add A83T USB PHY config
Unlike, other Allwinner SUN4I Phy supporting SOC, A83T has 2 USB PHY's and second one is HSIC. So phy control need to configure to handle these HSIC and SIDDQ requirement. Signed-off-by: Jagan Teki--- drivers/phy/allwinner/phy-sun4i-usb.c | 85 --- 1 file changed, 68 insertions(+), 17 deletions(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index de0a59a..01782ac 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -53,9 +53,19 @@ #define SUNXI_AHB_INCRX_ALIGN_EN BIT(8) #define SUNXI_ULPI_BYPASS_EN BIT(0) +/* A83T specific control bits for PHY0 */ +#define PHY_CTL_VBUSVLDEXT BIT(5) +#define PHY_CTL_SIDDQ BIT(3) + +/* A83T specific control bits for PHY2 HSIC */ +#define SUNXI_EHCI_HS_FORCEBIT(20) +#define SUNXI_HSIC_CONNECT_INT BIT(16) +#define SUNXI_HSIC BIT(1) + #define MAX_PHYS 4 enum sun4i_usb_phy_type { + sun8i_a83t_phy, sun8i_h3_phy, sun8i_v3s_phy, sun50i_a64_phy, @@ -92,13 +102,20 @@ struct sun4i_usb_phy_info { .gpio_vbus = CONFIG_USB2_VBUS_PIN, .gpio_vbus_det = NULL, .gpio_id_det = NULL, +#ifdef CONFIG_MACH_SUN8I_A83T + .rst_mask = (CCM_USB_CTRL_HSIC_RST | CCM_USB_CTRL_HSIC_CLK | +CCM_USB_CTRL_12M_CLK), +#else .rst_mask = (CCM_USB_CTRL_PHY2_RST | CCM_USB_CTRL_PHY2_CLK), +#endif }, { .gpio_vbus = CONFIG_USB3_VBUS_PIN, .gpio_vbus_det = NULL, .gpio_id_det = NULL, +#ifdef CONFIG_MACH_SUN6I .rst_mask = (CCM_USB_CTRL_PHY3_RST | CCM_USB_CTRL_PHY3_CLK), +#endif }, }; @@ -166,9 +183,10 @@ static void sun4i_usb_phy_write(struct phy *phy, u32 addr, u32 data, int len) } } -static void sun4i_usb_phy_passby(struct sun4i_usb_phy_plat *usb_phy, -bool enable) +static void sun4i_usb_phy_passby(struct phy *phy, bool enable) { + struct sun4i_usb_phy_data *data = dev_get_priv(phy->dev); + struct sun4i_usb_phy_plat *usb_phy = >usb_phy[phy->id]; u32 bits, reg_value; if (!usb_phy->pmu) @@ -176,6 +194,12 @@ static void sun4i_usb_phy_passby(struct sun4i_usb_phy_plat *usb_phy, bits = SUNXI_AHB_ICHR8_EN | SUNXI_AHB_INCR4_BURST_EN | SUNXI_AHB_INCRX_ALIGN_EN | SUNXI_ULPI_BYPASS_EN; + + /* A83T USB2 is HSIC */ + if (data->cfg->type == sun8i_a83t_phy && usb_phy->id == 2) + bits |= SUNXI_EHCI_HS_FORCE | SUNXI_HSIC_CONNECT_INT | + SUNXI_HSIC; + reg_value = readl(usb_phy->pmu); if (enable) @@ -244,25 +268,36 @@ static int sun4i_usb_phy_init(struct phy *phy) setbits_le32(>ccm->usb_clk_cfg, usb_phy->rst_mask); - if (usb_phy->pmu && data->cfg->enable_pmu_unk1) { - val = readl(usb_phy->pmu + REG_PMU_UNK1); - writel(val & ~2, usb_phy->pmu + REG_PMU_UNK1); - } + if (data->cfg->type == sun8i_a83t_phy) { + if (phy->id == 0) { + val = readl(data->base + data->cfg->phyctl_offset); + val |= PHY_CTL_VBUSVLDEXT; + val &= ~PHY_CTL_SIDDQ; + writel(val, data->base + data->cfg->phyctl_offset); + } + } else { + if (usb_phy->pmu && data->cfg->enable_pmu_unk1) { + val = readl(usb_phy->pmu + REG_PMU_UNK1); + writel(val & ~2, usb_phy->pmu + REG_PMU_UNK1); + } - if (usb_phy->id == 0) - sun4i_usb_phy_write(phy, PHY_RES45_CAL_EN, PHY_RES45_CAL_DATA, - PHY_RES45_CAL_LEN); + if (usb_phy->id == 0) + sun4i_usb_phy_write(phy, PHY_RES45_CAL_EN, + PHY_RES45_CAL_DATA, + PHY_RES45_CAL_LEN); - /* Adjust PHY's magnitude and rate */ - sun4i_usb_phy_write(phy, PHY_TX_AMPLITUDE_TUNE, PHY_TX_MAGNITUDE | - PHY_TX_RATE, PHY_TX_AMPLITUDE_LEN); + /* Adjust PHY's magnitude and rate */ + sun4i_usb_phy_write(phy, PHY_TX_AMPLITUDE_TUNE, + PHY_TX_MAGNITUDE | PHY_TX_RATE, + PHY_TX_AMPLITUDE_LEN); - /* Disconnect threshold adjustment */ - sun4i_usb_phy_write(phy, PHY_DISCON_TH_SEL, data->cfg->disc_thresh, - PHY_DISCON_TH_LEN); + /* Disconnect threshold adjustment */ + sun4i_usb_phy_write(phy, PHY_DISCON_TH_SEL, + data->cfg->disc_thresh, PHY_DISCON_TH_LEN); + }
[U-Boot] [PATCH v4 27/34] arm64: allwinner: a64: bananapi-m64: Sync usb host nodes from Linux
Sync bananapi-m64 usb host nodes from Linux. Signed-off-by: Jagan Teki--- arch/arm/dts/sun50i-a64-bananapi-m64.dts | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts index 80405e5..dcde4a4 100644 --- a/arch/arm/dts/sun50i-a64-bananapi-m64.dts +++ b/arch/arm/dts/sun50i-a64-bananapi-m64.dts @@ -68,6 +68,14 @@ }; }; + { + status = "okay"; +}; + + { + status = "okay"; +}; + { pinctrl-names = "default"; pinctrl-0 = <_pins>; @@ -108,6 +116,14 @@ status = "okay"; }; + { + status = "okay"; +}; + + { + status = "okay"; +}; + { pinctrl-names = "default"; pinctrl-0 = <_pins_a>; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 24/34] arm64: allwinner: a64: bananapi-m64: Sync usb_otg node from Linux
Sync bananapi-m64 usb_otg node from Linux. Signed-off-by: Jagan Teki--- arch/arm/dts/sun50i-a64-bananapi-m64.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts index 02db114..80405e5 100644 --- a/arch/arm/dts/sun50i-a64-bananapi-m64.dts +++ b/arch/arm/dts/sun50i-a64-bananapi-m64.dts @@ -119,3 +119,13 @@ pinctrl-0 = <_pins>, <_rts_cts_pins>; status = "okay"; }; + +_otg { + dr_mode = "otg"; + status = "okay"; +}; + + { + usb0_id_det-gpios = < 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + status = "okay"; +}; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 33/34] arm64: allwinner: h5: orangepi-prime: Sync usb otg nodes from Linux
orangepi-prime has usb otg routed host with either EHCI0/OHCI0 sync the same from Linux. Signed-off-by: Jagan Teki--- arch/arm/dts/sun50i-h5-orangepi-prime.dts | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/dts/sun50i-h5-orangepi-prime.dts b/arch/arm/dts/sun50i-h5-orangepi-prime.dts index d4577df..131d805 100644 --- a/arch/arm/dts/sun50i-h5-orangepi-prime.dts +++ b/arch/arm/dts/sun50i-h5-orangepi-prime.dts @@ -72,6 +72,10 @@ }; }; + { + status = "okay"; +}; + { status = "okay"; }; @@ -89,6 +93,10 @@ status = "okay"; }; + { + status = "okay"; +}; + { status = "okay"; }; @@ -99,6 +107,11 @@ status = "okay"; }; +_otg { + dr_mode = "otg"; + status = "okay"; +}; + { status = "okay"; }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 22/34] sunxi: Drop legacy usb_phy.c
Allwinner PHY USB code is now part of generic-phy framework, so drop existing legacy handling like arch/arm/mach-sunxi.c and related code areas. Signed-off-by: Jagan Teki--- arch/arm/include/asm/arch-sunxi/usb_phy.h | 21 -- arch/arm/mach-sunxi/Makefile | 3 - arch/arm/mach-sunxi/usb_phy.c | 407 -- board/sunxi/board.c | 7 - 4 files changed, 438 deletions(-) delete mode 100644 arch/arm/include/asm/arch-sunxi/usb_phy.h delete mode 100644 arch/arm/mach-sunxi/usb_phy.c diff --git a/arch/arm/include/asm/arch-sunxi/usb_phy.h b/arch/arm/include/asm/arch-sunxi/usb_phy.h deleted file mode 100644 index 5a9cacb..000 --- a/arch/arm/include/asm/arch-sunxi/usb_phy.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Sunxi usb-phy code - * - * Copyright (C) 2015 Hans de Goede - * Copyright (C) 2014 Roman Byshko - * - * Based on code from - * Allwinner Technology Co., Ltd. - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -int sunxi_usb_phy_probe(void); -int sunxi_usb_phy_remove(void); -void sunxi_usb_phy_init(int index); -void sunxi_usb_phy_exit(int index); -void sunxi_usb_phy_power_on(int index); -void sunxi_usb_phy_power_off(int index); -int sunxi_usb_phy_vbus_detect(int index); -int sunxi_usb_phy_id_detect(int index); -void sunxi_usb_phy_enable_squelch_detect(int index, int enable); diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 2a3c379..4e44a62 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -13,9 +13,6 @@ obj-y += clock.o obj-y += cpu_info.o obj-y += dram_helpers.o obj-y += pinmux.o -ifndef CONFIG_MACH_SUN9I -obj-y += usb_phy.o -endif obj-$(CONFIG_MACH_SUN6I) += prcm.o obj-$(CONFIG_MACH_SUN8I) += prcm.o obj-$(CONFIG_MACH_SUN9I) += prcm.o diff --git a/arch/arm/mach-sunxi/usb_phy.c b/arch/arm/mach-sunxi/usb_phy.c deleted file mode 100644 index 2f1cad1..000 --- a/arch/arm/mach-sunxi/usb_phy.c +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Sunxi usb-phy code - * - * Copyright (C) 2015 Hans de Goede - * Copyright (C) 2014 Roman Byshko - * - * Based on code from - * Allwinner Technology Co., Ltd. - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include -#include -#include -#include -#include -#include -#include - -#if defined(CONFIG_MACH_SUN4I) || \ - defined(CONFIG_MACH_SUN5I) || \ - defined(CONFIG_MACH_SUN6I) || \ - defined(CONFIG_MACH_SUN7I) || \ - defined(CONFIG_MACH_SUN8I_A23) || \ - defined(CONFIG_MACH_SUN9I) -#define SUNXI_USB_CSR 0x404 -#else -#define SUNXI_USB_CSR 0x410 -#endif - -#define SUNXI_USB_PMU_IRQ_ENABLE 0x800 -#define SUNXI_USB_PASSBY_EN1 - -#define SUNXI_EHCI_AHB_ICHR8_EN(1 << 10) -#define SUNXI_EHCI_AHB_INCR4_BURST_EN (1 << 9) -#define SUNXI_EHCI_AHB_INCRX_ALIGN_EN (1 << 8) -#define SUNXI_EHCI_ULPI_BYPASS_EN (1 << 0) - -#define REG_PHY_UNK_H3 0x420 -#define REG_PMU_UNK_H3 0x810 - -/* A83T specific control bits for PHY0 */ -#define SUNXI_PHY_CTL_VBUSVLDEXT BIT(5) -#define SUNXI_PHY_CTL_SIDDQBIT(3) - -/* A83T HSIC specific bits */ -#define SUNXI_EHCI_HS_FORCEBIT(20) -#define SUNXI_EHCI_CONNECT_DET BIT(17) -#define SUNXI_EHCI_CONNECT_INT BIT(16) -#define SUNXI_EHCI_HSICBIT(1) - -static struct sunxi_usb_phy { - int usb_rst_mask; - int gpio_vbus; - int gpio_vbus_det; - int gpio_id_det; - int id; - int init_count; - int power_on_count; - ulong base; -} sunxi_usb_phy[] = { - { - .usb_rst_mask = CCM_USB_CTRL_PHY0_RST | CCM_USB_CTRL_PHY0_CLK, - .id = 0, - .base = SUNXI_USB0_BASE, - }, - { - .usb_rst_mask = CCM_USB_CTRL_PHY1_RST | CCM_USB_CTRL_PHY1_CLK, - .id = 1, - .base = SUNXI_USB1_BASE, - }, -#if CONFIG_SUNXI_USB_PHYS >= 3 - { -#ifdef CONFIG_MACH_SUN8I_A83T - .usb_rst_mask = CCM_USB_CTRL_HSIC_RST | CCM_USB_CTRL_HSIC_CLK | - CCM_USB_CTRL_12M_CLK, -#else - .usb_rst_mask = CCM_USB_CTRL_PHY2_RST | CCM_USB_CTRL_PHY2_CLK, -#endif - .id = 2, - .base = SUNXI_USB2_BASE, - }, -#endif -#if CONFIG_SUNXI_USB_PHYS >= 4 - { - .usb_rst_mask = CCM_USB_CTRL_PHY3_RST | CCM_USB_CTRL_PHY3_CLK, - .id = 3, - .base = SUNXI_USB3_BASE, - } -#endif -}; - -static int initial_usb_scan_delay = CONFIG_INITIAL_USB_SCAN_DELAY; - -static int get_vbus_gpio(int index) -{ - switch (index) { - case 0: return sunxi_name_to_gpio(CONFIG_USB0_VBUS_PIN); - case 1:
[U-Boot] [PATCH v4 25/34] configs: bananapi-m64: Enable USB OTG peripheral mode
Enable USB_MUSB_GADGET which operate OTG in peripheral mode Signed-off-by: Jagan Teki--- configs/bananapi_m64_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/bananapi_m64_defconfig b/configs/bananapi_m64_defconfig index 461567f..11397ae 100644 --- a/configs/bananapi_m64_defconfig +++ b/configs/bananapi_m64_defconfig @@ -14,4 +14,5 @@ CONFIG_SPL=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y +CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 11/34] phy: sun4i-usb: Add H3/H5 PHY config
H3/H5 has 4 USB PHY, rest are similar to A64. Signed-off-by: Jagan Teki--- drivers/phy/allwinner/phy-sun4i-usb.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 7f2970b..993f036 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -56,6 +56,7 @@ #define MAX_PHYS 4 enum sun4i_usb_phy_type { + sun8i_h3_phy, sun50i_a64_phy, }; @@ -414,6 +415,15 @@ static int sun4i_usb_phy_probe(struct udevice *dev) return 0; } +static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = { + .num_phys = 4, + .type = sun8i_h3_phy, + .disc_thresh = 3, + .phyctl_offset = REG_PHYCTL_A33, + .enable_pmu_unk1 = true, + .phy0_dual_route = true, +}; + static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = { .num_phys = 2, .type = sun50i_a64_phy, @@ -424,6 +434,7 @@ static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = { }; static const struct udevice_id sun4i_usb_phy_ids[] = { + { .compatible = "allwinner,sun8i-h3-usb-phy", .data = (ulong)_h3_cfg }, { .compatible = "allwinner,sun50i-a64-usb-phy", .data = (ulong)_a64_cfg}, { } }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 15/34] phy: sun4i-usb: Add A31 PHY config
Allwinner A31 has 3 USB PHY's and rest similar to A10. Signed-off-by: Jagan Teki--- drivers/phy/allwinner/phy-sun4i-usb.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index abb3d0f..16b399e 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -66,6 +66,7 @@ enum sun4i_usb_phy_type { sun4i_a10_phy, + sun6i_a31_phy, sun8i_a83t_phy, sun8i_h3_phy, sun8i_v3s_phy, @@ -477,6 +478,14 @@ static const struct sun4i_usb_phy_cfg sun5i_a13_cfg = { .enable_pmu_unk1 = false, }; +static const struct sun4i_usb_phy_cfg sun6i_a31_cfg = { + .num_phys = 3, + .type = sun6i_a31_phy, + .disc_thresh = 3, + .phyctl_offset = REG_PHYCTL_A10, + .enable_pmu_unk1 = false, +}; + static const struct sun4i_usb_phy_cfg sun7i_a20_cfg = { .num_phys = 3, .type = sun4i_a10_phy, @@ -521,6 +530,7 @@ static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = { static const struct udevice_id sun4i_usb_phy_ids[] = { { .compatible = "allwinner,sun4i-a10-usb-phy", .data = (ulong)_a10_cfg }, { .compatible = "allwinner,sun5i-a13-usb-phy", .data = (ulong)_a13_cfg }, + { .compatible = "allwinner,sun6i-a31-usb-phy", .data = (ulong)_a31_cfg }, { .compatible = "allwinner,sun7i-a20-usb-phy", .data = (ulong)_a20_cfg }, { .compatible = "allwinner,sun8i-a83t-usb-phy", .data = (ulong)_a83t_cfg }, { .compatible = "allwinner,sun8i-h3-usb-phy", .data = (ulong)_h3_cfg }, -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 26/34] ARM: dts: sun8i: a83t: Sync usbphy node from Linux
Sync sun8i-a83t usbphy node details from Linux. Signed-off-by: Jagan Teki--- arch/arm/dts/sun8i-a83t.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/dts/sun8i-a83t.dtsi b/arch/arm/dts/sun8i-a83t.dtsi index bab6c18..2953e0f 100644 --- a/arch/arm/dts/sun8i-a83t.dtsi +++ b/arch/arm/dts/sun8i-a83t.dtsi @@ -230,13 +230,29 @@ reg = <0x01c19000 0x400>; interrupts = ; interrupt-names = "mc"; + phys = < 0>; + phy-names = "usb"; status = "disabled"; }; + usbphy: phy@1c19400 { + compatible = "allwinner,sun8i-a83t-usb-phy"; + reg = <0x01c19400 0x10>, + <0x01c1a800 0x14>, + <0x01c1b800 0x14>; + reg-names = "phy_ctrl", + "pmu1", + "pmu2"; + status = "disabled"; + #phy-cells = <1>; + }; + ehci0: usb@01c1a000 { compatible = "allwinner,sun8i-a83t-ehci", "generic-ehci"; reg = <0x01c1a000 0x100>; interrupts = ; + phys = < 1>; + phy-names = "usb"; status = "disabled"; }; @@ -244,6 +260,8 @@ compatible = "allwinner,sun8i-a83t-ohci", "generic-ohci"; reg = <0x01c1a400 0x100>; interrupts = ; + phys = < 1>; + phy-names = "usb"; status = "disabled"; }; @@ -251,6 +269,8 @@ compatible = "allwinner,sun8i-a83t-ehci", "generic-ehci"; reg = <0x01c1b000 0x100>; interrupts = ; + phys = < 2>; + phy-names = "usb"; status = "disabled"; }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 18/34] device-tree-bindings: phy: Sync sun4i-usb-phy bindings
Sync sun4i-usb-phy bindings from Linux, since the drivers/phy/allwinner/phy-sun4i-usb.c follw similar. Signed-off-by: Jagan Teki--- doc/device-tree-bindings/phy/sun4i-usb-phy.txt | 65 ++ 1 file changed, 65 insertions(+) create mode 100644 doc/device-tree-bindings/phy/sun4i-usb-phy.txt diff --git a/doc/device-tree-bindings/phy/sun4i-usb-phy.txt b/doc/device-tree-bindings/phy/sun4i-usb-phy.txt new file mode 100644 index 000..c1ce5a0 --- /dev/null +++ b/doc/device-tree-bindings/phy/sun4i-usb-phy.txt @@ -0,0 +1,65 @@ +Allwinner sun4i USB PHY +--- + +Required properties: +- compatible : should be one of + * allwinner,sun4i-a10-usb-phy + * allwinner,sun5i-a13-usb-phy + * allwinner,sun6i-a31-usb-phy + * allwinner,sun7i-a20-usb-phy + * allwinner,sun8i-a23-usb-phy + * allwinner,sun8i-a33-usb-phy + * allwinner,sun8i-a83t-usb-phy + * allwinner,sun8i-h3-usb-phy + * allwinner,sun8i-v3s-usb-phy + * allwinner,sun50i-a64-usb-phy +- reg : a list of offset + length pairs +- reg-names : + * "phy_ctrl" + * "pmu0" for H3, V3s and A64 + * "pmu1" + * "pmu2" for sun4i, sun6i, sun7i, sun8i-a83t or sun8i-h3 + * "pmu3" for sun8i-h3 +- #phy-cells : from the generic phy bindings, must be 1 +- clocks : phandle + clock specifier for the phy clocks +- clock-names : + * "usb_phy" for sun4i, sun5i or sun7i + * "usb0_phy", "usb1_phy" and "usb2_phy" for sun6i + * "usb0_phy", "usb1_phy" for sun8i + * "usb0_phy", "usb1_phy", "usb2_phy" and "usb2_hsic_12M" for sun8i-a83t + * "usb0_phy", "usb1_phy", "usb2_phy" and "usb3_phy" for sun8i-h3 +- resets : a list of phandle + reset specifier pairs +- reset-names : + * "usb0_reset" + * "usb1_reset" + * "usb2_reset" for sun4i, sun6i, sun7i, sun8i-a83t or sun8i-h3 + * "usb3_reset" for sun8i-h3 + +Optional properties: +- usb0_id_det-gpios : gpio phandle for reading the otg id pin value +- usb0_vbus_det-gpios : gpio phandle for detecting the presence of usb0 vbus +- usb0_vbus_power-supply: power-supply phandle for usb0 vbus presence detect +- usb0_vbus-supply : regulator phandle for controller usb0 vbus +- usb1_vbus-supply : regulator phandle for controller usb1 vbus +- usb2_vbus-supply : regulator phandle for controller usb2 vbus +- usb3_vbus-supply : regulator phandle for controller usb3 vbus + +Example: + usbphy: phy@01c13400 { + #phy-cells = <1>; + compatible = "allwinner,sun4i-a10-usb-phy"; + /* phy base regs, phy1 pmu reg, phy2 pmu reg */ + reg = <0x01c13400 0x10 0x01c14800 0x4 0x01c1c800 0x4>; + reg-names = "phy_ctrl", "pmu1", "pmu2"; + clocks = <_clk 8>; + clock-names = "usb_phy"; + resets = <_clk 0>, <_clk 1>, <_clk 2>; + reset-names = "usb0_reset", "usb1_reset", "usb2_reset"; + pinctrl-names = "default"; + pinctrl-0 = <_id_detect_pin>, <_vbus_detect_pin>; + usb0_id_det-gpios = < 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */ + usb0_vbus_det-gpios = < 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */ + usb0_vbus-supply = <_usb0_vbus>; + usb1_vbus-supply = <_usb1_vbus>; + usb2_vbus-supply = <_usb2_vbus>; + }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 31/34] arm64: allwinner: h5: orangepi-pc2: Sync usb otg nodes from Linux
orangepi-pc2 has usb otg routed host with either EHCI0/OHCI0 sync the same from Linux. Signed-off-by: Jagan Teki--- arch/arm/dts/sun50i-h5-orangepi-pc2.dts | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/dts/sun50i-h5-orangepi-pc2.dts b/arch/arm/dts/sun50i-h5-orangepi-pc2.dts index 4f05340..8d2f73a 100644 --- a/arch/arm/dts/sun50i-h5-orangepi-pc2.dts +++ b/arch/arm/dts/sun50i-h5-orangepi-pc2.dts @@ -85,6 +85,10 @@ }; }; + { + status = "okay"; +}; + { status = "okay"; }; @@ -102,6 +106,10 @@ status = "okay"; }; + { + status = "okay"; +}; + { status = "okay"; }; @@ -112,6 +120,11 @@ status = "okay"; }; +_otg { + dr_mode = "otg"; + status = "okay"; +}; + { status = "okay"; }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot