aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-10Merge branch '2022-03-09-events-subsystem' into nextnextTom Rini600-1170/+1951
To quote the author: It is a common need in U-Boot to have one subsystem notify another when something happens. An example is reading a partition table when a new block device is set up. It is also common to add weak functions and 'hook' functions to modify how U-Boot works. See for example ft_board_setup() and the like. U-Boot would benefit from a generic mechanism to handle these cases, with the ability to hook into various 'events' in a subsystem-independent and transparent way. This series provides a way to create and dispatch events, with a way of registering a 'spy' which watches for events of different types. This allows 'hook' functions to be created in a generic way. It also includes a script to list the hooks in an image, which is a bit easier to debug than weak functions, as well as an 'event' command to do the same from within U-Boot. These 'static' events can be used to replace hooks like misc_init_f(), for example. Also included is basic support for 'dynamic' events, where a spy can be registered at runtime. The need for this is still being figured out.
2022-03-09event: Add documentationWIP/2022-03-09-events-subsystemSimon Glass4-0/+117
Add documentation for events, including the event command. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09event: Add a script to decode the event-spy listSimon Glass3-0/+137
For debugging and dicoverability it is useful to be able to see a list of each event spy in a U-Boot ELF file. Add a script which shows this, along with the event type and the source location. This makes events a little easier to use than weak functions, for example. Add a basic sandbox test as well. We could provide a test for other boards, but for now, few use events. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09event: Add a commandSimon Glass5-0/+40
Add a command to show the available events. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09event: Convert arch_cpu_init_dm() to use eventsSimon Glass26-43/+74
Instead of a special function, send an event after driver model is inited and adjust the boards which use this function. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09event: Convert misc_init_f() to use eventsSimon Glass21-22/+32
This hook can be implmented using events, for the three boards that actually use it. Add the event type and event handlers. Drop CONFIG_MISC_INIT_F since we can just use CONFIG_EVENT to control this. Since sandbox always enables CONFIG_EVENT, we can drop the defconfig lines there too. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09event: Add events for device probe/removeSimon Glass7-0/+96
Generate events when devices are probed or removed, allowing hooks to be added for these situations. This is controlled by the DM_EVENT config option. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09event: Set up the event system on start-upSimon Glass1-0/+2
Call event_init() before relocation to get the event system running. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09event: Add a simple testSimon Glass4-0/+53
Add a test for event registration and activation. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09event: Add basic support for eventsSimon Glass10-0/+465
Add a way to create and dispatch events without needing to allocate memory. Also add a way to 'spy' on events, thus allowing 'hooks' to be created. Use a linker list for static events, which we can use to replace functions like arch_cpu_init_f(). Allow an EVENT_DEBUG option which makes it easier to see what is going on at runtime, but uses more code space. Dynamic events allow the creation of a spy at runtime. This is not always necessary, but can be enabled with EVENT_DYNAMIC if needed. A 'test' event is the only option for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09binman: Expand elf support a littleSimon Glass1-7/+51
Allow finding a symbol by its address. Also export the function to get the file offset of a particular address, so it can be used by a script to be added. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09sandbox: start: Sort the header filesSimon Glass1-2/+2
These header files don't follow the correct order. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-09net: fec_mxc: Drop CONFIG_FEC_XCV_TYPETom Rini47-84/+3
With all boards now using DM_ETH we determine the value for CONFIG_FEC_XCV_TYPE at run time, except in the case of the default fall-back. Set the fallback directly now. Cc: Fabio Estevam <festevam@gmail.com> Cc: Ramon Fried <rfried.dev@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09net: fec_mxc: Remove non-DM_ETH codeTom Rini1-245/+0
Now that all boards have been converted, remove the non-DM_ETH code. Cc: Fabio Estevam <festevam@gmail.com> Cc: Ramon Fried <rfried.dev@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09imx: Convert some boards to DM_ETHTom Rini16-4/+15
A small number of i.MX6/7 and vf610 boards have not enabled DM_ETH yet. Given the state of the rest of the platform, enable DM_ETH. Cc: Alison Wang <alison.wang@nxp.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Richard Hu <richard.hu@technexion.com> Cc: Troy Kisky <troy.kisky@boundarydevices.com> Cc: Uri Mashiach <uri.mashiach@compulab.co.il> Signed-off-by: Tom Rini <trini@konsulko.com> --- I would very much welcome tested and perhaps slightly more complete migrations for these platforms as the deadline passed with v2020.07. But, in order to do more Kconfig migrations as well, I did this quick pass.
2022-03-09Convert CONFIG_ETHPRIME to KconfigTom Rini297-154/+458
This converts the following to Kconfig: CONFIG_ETHPRIME This is also done by adding a gating Kconfig option, CONFIG_USE_ETHPRIME similar to other options that are not always set and control environment variables. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09Remove CONFIG_HAS_ETH0 et al symbolsTom Rini16-52/+0
This converts removes the following symbols: CONFIG_HAS_ETH0 CONFIG_HAS_ETH1 CONFIG_HAS_ETH2 CONFIG_HAS_ETH3 This is because at this point, only the ids8313 platform was using the code which was controlled by these symbols. In turn, this code already performs error checking on being able to perform the device tree fixup. Rather than convert these to Kconfig for a single platform, update the code to not need these checks and remove them from all the platforms they were unused on. Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09Convert CONFIG_NFS_TIMEOUT to KconfigTom Rini5-16/+12
This converts the following to Kconfig: CONFIG_NFS_TIMEOUT Cc: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09Convert CONFIG_BOOT_RETRY_TIME et al to KconfigTom Rini30-52/+90
This converts the following to Kconfig: CONFIG_BOOT_RETRY_TIME CONFIG_BOOT_RETRY_MIN CONFIG_RESET_TO_RETRY We also introduce CONFIG_BOOT_RETRY to gate these options, and clean up the associated Makefile entry and C code for picking default values of CONFIG_BOOT_RETRY_MIN. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09powerpc: Move CONFIG_BPTR_VIRT_ADDR out of CONFIG namespaceTom Rini2-6/+4
This is only used in one file, and is never overridden. Move this out of CONFIG namespace. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09Convert CONFIG_NET_RETRY_COUNT to KconfigTom Rini143-115/+117
This converts the following to Kconfig: CONFIG_NET_RETRY_COUNT Cc: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09Convert CONFIG_ARP_TIMEOUT to KconfigTom Rini82-51/+61
This converts the following to Kconfig: CONFIG_ARP_TIMEOUT Cc: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09Convert CONFIG_A008044_WORKAROUND to KconfigTom Rini3-10/+7
This converts the following to Kconfig: CONFIG_A008044_WORKAROUND Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09Convert CONFIG_A003399_NOR_WORKAROUND to KconfigTom Rini3-10/+7
This converts the following to Kconfig: CONFIG_A003399_NOR_WORKAROUND Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09Convert CONFIG_ARMV8_SWITCH_TO_EL1 to KconfigTom Rini3-4/+6
This converts the following to Kconfig: CONFIG_ARMV8_SWITCH_TO_EL1 As this option isn't enabled anywhere and is for very specific circumstances, it's not an asked Kconfig option and instead noted as something to select. Cc: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> Cc: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-09arm: sunxi: Remove most SoC-specific config header filesTom Rini8-138/+2
At this point, sunxi-common.h is used for all systems except for some MACH_SUN50I variants. Remove the now basically empty header files and update CONFIG_SYS_CONFIG_NAME to use sunxi-common.h directly. Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-08Convert CONFIG_ARMV7_SECURE_BASE et al to KconfigTom Rini24-54/+41
This converts the following to Kconfig: CONFIG_ARMV7_SECURE_BASE CONFIG_ARMV7_SECURE_MAX_SIZE CONFIG_ARMV7_SECURE_RESERVE_SIZE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-08configs: Resync with savedefconfigTom Rini18-102/+60
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-07Merge branch '2022-03-07-add-platforms' into nextTom Rini25-11/+1258
- bcm6753 support - Aspeed GPIO driver - AM33xx DT-related MMC updates
2022-03-07configs: evb-ast2[56]00: Enable GPIO controlWIP/2022-03-07-add-platformsAndrew Jeffery2-0/+6
Build in the driver for the Aspeed GPIO controller and turn on the `gpio` shell command. Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2022-03-07ARM: dts: ast2500: Add ngpios property to GPIO nodeAndrew Jeffery1-0/+1
Populate gpio_count in the gpio subsystem for the AST2500. Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2022-03-07gpio: Add Aspeed GPIO driverAndrew Jeffery3-0/+307
The Aspeed GPIO driver supports the GPIO controllers found in the AST2400, AST2500 and AST2600 BMC SoCs. The implementation is a cut-down copy of the upstream Linux kernel driver, adapted for u-boot. Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2022-03-07arm: dts: Add DTS description for MMC2 am33xx devicesLukasz Majewski1-9/+30
This code has been ported from Linux v5.16.9 arch/arm/boot/dts/am33xx.dtsi file to allow correct usage of MMC2 controller in U-Boot. This IP block is a bit specific as it is connected to L3 interconnect bus, whereas mmc[01] are connected to L4. Proper configuration of this block (including providing clock) is handled in ti-sysc.c driver. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-07arm: dts: Add mmc[01] aliases to am33xx.dtsiLukasz Majewski1-0/+2
This change provides similar aliases definitions as now present in Linux kernel v5.16.9 for am33xx.dtsi file. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-07arm: mmc: Add "ti, am335-sdhci" compatible for TI's omap_hsmmc driverLukasz Majewski1-0/+1
In the Linux kernel (v5.16) for this SoC there are two separate drivers - namely sdhci-omap.c and omap_hsmmc.c which have separate set of compatibles. The U-Boot's drivers/mmc/omap_hsmmc.c driver supports both eMMC and SD devices - hence the compatible for SDHCI can be added. After this change the am335x DTS description can be easier ported from Linux kernel. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-03-07configs: bcm96753ref_ram_defconfig: enable led supportPhilippe Reynes1-0/+1
Enable the led support on the refboard bcm96753ref. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-07arch: arm: dts: bcm96753ref: enable led supportPhilippe Reynes1-0/+18
Enable the led in the device tree of the refboard bcm96753ref. It also defines two leds (led_red ad led_green). Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-07arch: arm: dts: bcm6753: add led supportPhilippe Reynes1-0/+7
Add a node leds to support the LED IP in the device tree of the bcm6753. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-07drivers: led: led_bcm6753: initial supportPhilippe Reynes3-0/+278
Add the support of the LED IP for bcm6357. This LED IP supports blinking, fading and pulsating, but for the moment, only blinking is supported. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-07bcm96753ref: add initial supportPhilippe Reynes9-0/+264
This add the initial support of the broadcom reference board bcm96753ref with a bcm6753 SoC. This board has 1 GB of RAM, 256 MB of flash (nand), 2 USB port, 1 UART, and 4 ethernet ports. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-07watchdog: bcm6345: allow to use this driver on arm bcm6753Philippe Reynes1-1/+2
This IP is also used on some arm SoC, so we allow to use it on arm bcm6753 too. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-07nand: brcmnand: add bcm6753 supportPhilippe Reynes3-0/+131
This adds the nand support for chipset bcm6753. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-07gpio: bcm6345: allow to use this driver on arm bcm6753Philippe Reynes1-1/+2
This IP is also used on some arm SoC, so we allow to use it on arm bcm6753 too. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-07bcm6753: add initial supportPhilippe Reynes2-0/+208
This add the initial support of the broadcom bcm6753 SoC family. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-03Merge branch '2022-03-03-Kconfig-migrations' into nextWIP/03Mar2022-nextTom Rini518-2857/+713
- Assorted Kconfig migrations and related cleanups.
2022-03-03Convert CONFIG_CHIP_SELECTS_PER_CTRL to KconfigTom Rini85-44/+56
This converts the following to Kconfig: CONFIG_CHIP_SELECTS_PER_CTRL Cc: Alison Wang <alison.wang@nxp.com> Cc: Pramod Kumar <pramod.kumar_1@nxp.com> Cc: Priyanka Jain <priyanka.jain@nxp.com> Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com> Cc: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-03Convert CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS to KconfigTom Rini59-13/+52
This converts the following to Kconfig: CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-03net: Remove CONFIG_BOOTP_DHCP_REQUEST_DELAYTom Rini2-17/+0
This option is not in use anywhere and the documentation implies it's for some very old and unlikely to be seen currently issues. Rather than update the code so the CONFIG symbol could be easily in Kconfig, remove the code. Cc: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Ramon Fried <rfried.dev@gmail.com>
2022-03-03Convert CONFIG_BOOTP_MAY_FAIL et al to KconfigTom Rini222-225/+195
This converts the following to Kconfig: CONFIG_BOOTP_MAY_FAIL CONFIG_BOOTP_VENDOREX CONFIG_BOOTP_BOOTFILESIZE CONFIG_BOOTP_NISDOMAIN CONFIG_BOOTP_TIMEOFFSET Cc: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-03powerpc: P1010RDB: Move CONFIG_BOOTMODE out of CONFIG namespaceTom Rini1-3/+3
This slight environment modification shouldn't be in the CONFIG namespace, change it. Signed-off-by: Tom Rini <trini@konsulko.com>