]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 years agocmd: ubi: Fix 'ubi list' command arguments parsing
Dmitry Dunaev [Wed, 12 Jul 2023 12:58:21 +0000 (15:58 +0300)] 
cmd: ubi: Fix 'ubi list' command arguments parsing

This fixes allowed argc variable value for arguments parsing

Fixes: 6de1daf64b1 ("cmd: ubi: Add 'ubi list' command")
Signed-off-by: Dmitry Dunaev <dunaev@tecon.ru>
2 years agoi2c: mvtwsi: reset controller if stuck in "bus error" state
Sam Edwards [Tue, 25 Jul 2023 22:13:05 +0000 (16:13 -0600)] 
i2c: mvtwsi: reset controller if stuck in "bus error" state

The MVTWSI controller can act either as a master or slave device. When
acting as a master, the FSM is driven by the CPU. As a slave, the FSM is
driven by the bus directly. In what is (apparently) a safety mechanism,
if the bus transitions our FSM in any improper way, the FSM goes to a
"bus error" state (0x00). I could find no documented or experimental way
to get the FSM out of this state, except for a controller reset.

Since U-Boot only uses the MVTWSI controller as a bus master, this
feature only gets in the way: we do not care what happened on the bus
previously as long as the bus is ready for a new transaction. So, when
trying to start a new transaction, check for this state and reset the
controller if necessary.

Note that this should not be confused with the "deblocking" technique
(used by the `i2c reset` command), which involves pulsing SCL repeatedly
if SDA is found to be held low, in an attempt to force the bus back to
an idle state. This patch only resets the controller in case something
else had previously upset it, and (in principle) results in no
externally-observable change in behavior.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
2 years agoMerge tag 'dm-next-14aug23' of https://source.denx.de/u-boot/custodians/u-boot-dm...
Tom Rini [Tue, 15 Aug 2023 01:39:08 +0000 (21:39 -0400)] 
Merge tag 'dm-next-14aug23' of https://source.denx.de/u-boot/custodians/u-boot-dm into next

Enhance bootmeth_cros

2 years agogpio: Use separate bitfield array to indicate GPIO is claimed
Marek Vasut [Tue, 1 Aug 2023 23:26:02 +0000 (01:26 +0200)] 
gpio: Use separate bitfield array to indicate GPIO is claimed

The current gpio-uclass design uses name field in struct gpio_dev_priv as
an indicator that GPIO is claimed by consumer. This overloads the function
of name field and does not work well for named pins not configured as GPIO
pins.

Introduce separate bitfield array as the claim indicator.

This unbreaks dual-purpose AF and GPIO operation on STM32MP since commit
2c38f7c31806 ("pinctrl: pinctrl_stm32: Populate uc_priv->name[] with pinmux node's name")
where any pin which has already been configured as AF could no longer be
claimed as dual-purpose GPIO. This is important for pins like STM32 MMCI
st,cmd-gpios .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agotest: unit test for semihosting
Heinrich Schuchardt [Mon, 31 Jul 2023 20:01:21 +0000 (22:01 +0200)] 
test: unit test for semihosting

Provide a unit test for semihosting testing reading and writing a file.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2 years agoconfigs: enable SEMIHOSTING on qemu_arm64_defconfig
Heinrich Schuchardt [Mon, 31 Jul 2023 20:01:20 +0000 (22:01 +0200)] 
configs: enable SEMIHOSTING on qemu_arm64_defconfig

We need a platform on which we can test our semihosting code.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2 years agocmd: pxe: Update the command help
Bin Meng [Mon, 31 Jul 2023 08:33:23 +0000 (16:33 +0800)] 
cmd: pxe: Update the command help

Currently the "help" displays pxe command help text like this:

  => help
  ...
  printenv  - print environment variables
  pxe       - commands to get and boot from pxe files
  To use IPv6 add -ipv6 parameter
  qfw       - QEMU firmware interface
  ...

This does not read clearly. Remove the IPv6 stuff as it is in
the detailed help text so that it fits just a single line.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agopci: ftpci100: add new driver implementation
Sergei Antonov [Sun, 30 Jul 2023 18:17:09 +0000 (21:17 +0300)] 
pci: ftpci100: add new driver implementation

Add a new DM driver supporting FTPCI100 IP used in SoC designs.
This implementation is not based on the old non-DM ftpci100 code
dropped from U-Boot.

Enable the driver in sandbox_defconfig to test compilability.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
2 years agofs: fat: avoid multiplication overflow
Heinrich Schuchardt [Sun, 30 Jul 2023 14:44:04 +0000 (16:44 +0200)] 
fs: fat: avoid multiplication overflow

The product of two 32 bit integers is a 32 bit integer. Hence
clustcount * bytesperclust may overflow on > 4 GiB devices.

Change the type of clustcount.

Fixes: cb8af8af5ba0 ("fs: fat: support write with non-zero offset")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agospl: add FIT support to semihosting boot method
Heinrich Schuchardt [Sat, 22 Jul 2023 19:27:48 +0000 (21:27 +0200)] 
spl: add FIT support to semihosting boot method

Allow loading a FIT image via semihosting in SPL.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agopci: Fix device_find_first_child() return value handling
Marek Vasut [Sun, 16 Jul 2023 15:53:24 +0000 (17:53 +0200)] 
pci: Fix device_find_first_child() return value handling

This function only ever returns 0, but may not assign the second
parameter. Same thing for device_find_next_child(). Do not assign
ret to stop proliferation of this misuse.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agophy: Add support for the Apple Type-C PHY
Mark Kettenis [Fri, 14 Jul 2023 20:21:42 +0000 (22:21 +0200)] 
phy: Add support for the Apple Type-C PHY

This is merely a dummy driver that makes sure the DWC3 XHCI driver
finds its reset and PHY controllers.  We rely on iBoot to set up
the PHY for us.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2 years agopci: apple: Enable CONFIG_SYS_PCI_64BIT
Mark Kettenis [Fri, 14 Jul 2023 19:15:16 +0000 (21:15 +0200)] 
pci: apple: Enable CONFIG_SYS_PCI_64BIT

The Apple hardware supports 64-bit prefetchable memory windows so
enable CONFIG_SYS_PCI_64BIT. This fixes BAR assignments for the
Broadcom Ethernet controller used in some of the desktop machines.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2 years agoMerge branch '2023-08-14-keep-fixed-gpio-regulator-count-in-balance' into next
Tom Rini [Mon, 14 Aug 2023 13:14:51 +0000 (09:14 -0400)] 
Merge branch '2023-08-14-keep-fixed-gpio-regulator-count-in-balance' into next

To quote the author:

The commit 4fcba5d556b4 ("regulator: implement basic reference counter")
have made it more important to keep fixed/gpio regulators enable/disable
state in balance.

This series fixes an inbalance in the mmc_dw driver and changes to use
the more relaxed regulator_set_enable_if_allowed function for a few
other drivers.

The regulator_set_enable_if_allowed function is more relaxed and will
return ENOSYS if the provided regulator is NULL or when DM_REGULATOR
was disabled. Using the following call convention should be safe:

  ret = regulator_set_enable_if_allowed(<supply>, <true|false>);
  if (ret && ret != -ENOSYS)
          return ret;

2 years agommc: dw_mmc: Keep vqmmc-supply enable count in balance
Jonas Karlman [Wed, 19 Jul 2023 21:21:00 +0000 (21:21 +0000)] 
mmc: dw_mmc: Keep vqmmc-supply enable count in balance

With the commit 4fcba5d556b4 ("regulator: implement basic reference
counter"), keeping regulator enablement in balance become more important.

Disable vqmmc-supply before signal voltage is changed to keep regulator
enable counter in balance.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2 years agommc: Use regulator_set_enable_if_allowed
Jonas Karlman [Wed, 19 Jul 2023 21:20:59 +0000 (21:20 +0000)] 
mmc: Use regulator_set_enable_if_allowed

With the commit 4fcba5d556b4 ("regulator: implement basic reference
counter") the return value of regulator_set_enable may be EALREADY or
EBUSY for fixed/gpio regulators.

Change to use the more relaxed regulator_set_enable_if_allowed to
continue if regulator already was enabled or disabled.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # P895 Tegra 3;
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # rockpro64-rk3399
2 years agousb: ehci-generic: Use regulator_set_enable_if_allowed
Jonas Karlman [Wed, 19 Jul 2023 21:20:57 +0000 (21:20 +0000)] 
usb: ehci-generic: Use regulator_set_enable_if_allowed

With the commit 4fcba5d556b4 ("regulator: implement basic reference
counter") the return value of regulator_set_enable may be EALREADY or
EBUSY for fixed/gpio regulators.

Change to use the more relaxed regulator_set_enable_if_allowed to
continue if regulator already was enabled or disabled.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: dwc2: Use regulator_set_enable_if_allowed
Jonas Karlman [Wed, 19 Jul 2023 21:20:56 +0000 (21:20 +0000)] 
usb: dwc2: Use regulator_set_enable_if_allowed

With the commit 4fcba5d556b4 ("regulator: implement basic reference
counter") the return value of regulator_set_enable may be EALREADY or
EBUSY for fixed/gpio regulators.

Change to use the more relaxed regulator_set_enable_if_allowed to
continue if regulator already was enabled or disabled.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # rockpro64-rk3399
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agoadc: Use regulator_set_enable_if_allowed
Jonas Karlman [Wed, 19 Jul 2023 21:20:55 +0000 (21:20 +0000)] 
adc: Use regulator_set_enable_if_allowed

With the commit 4fcba5d556b4 ("regulator: implement basic reference
counter") the return value of regulator_set_enable may be EALREADY or
EBUSY for fixed/gpio regulators.

Change to use the more relaxed regulator_set_enable_if_allowed to
continue if regulator already was enabled or disabled.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # rockpro64-rk3399
2 years agoMerge tag 'u-boot-rockchip-20230814' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 14 Aug 2023 13:11:09 +0000 (09:11 -0400)] 
Merge tag 'u-boot-rockchip-20230814' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

- Add board: rk3568 EmbedFire Lubancat 2
- Fixes for rk3568 clock and pinctrl;
- Fixes for rk3308 clock and uart;
- rk3328 rock64 updates;
- Video fix on veyron board;

2 years agoMerge tag 'video-20230814' of https://source.denx.de/u-boot/custodians/u-boot-video
Tom Rini [Mon, 14 Aug 2023 13:09:23 +0000 (09:09 -0400)] 
Merge tag 'video-20230814' of https://source.denx.de/u-boot/custodians/u-boot-video

 - fix NULL dereference in vidconsole_measure()
 - fix simplefb format for raspberrypi-4b
 - fix typo in Kconfig

2 years agopinctrl: rockchip: Fix drive and input schmitt on RK3568
Jonas Karlman [Mon, 14 Aug 2023 00:28:26 +0000 (00:28 +0000)] 
pinctrl: rockchip: Fix drive and input schmitt on RK3568

On RK3568 most pins have a configurable drive strength of level 0-5 and
some pins level 0-11. When rk3568_set_drive is called with a strength
value above 7 the drv value written to reg may overflow into the write
enable bits, resulting in a bad configuration.

This cause e.g. ethernet PHY on Radxa CM3-IO board not to work after
drive is configured according to the device tree.

  Could not get PHY for ethernet@fe010000: addr 0

Level 6-11 can be configured using a second reg for some pins, however
the drv value is reused resulting in lower 6 bits being written to reg.

Input schmitt is configured in 2-bit fields on RK3568 compared to
earlier generation and 2'b10 should be used to enable input schmitt.

Change to use regmap_update_bits with a rmask to fix the overflow issue
and closer match the linux driver. Bit shift the drv value used for the
second reg to configure drive strength level 6-11. Also write correct
values for input schmitt setting.

Fixes: 1977d746aa54 ("rockchip: rk3568: add rk3568 pinctrl driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorpi: set the correct parameter for simple framebuffer node
Meng Li [Wed, 26 Jul 2023 02:42:35 +0000 (10:42 +0800)] 
rpi: set the correct parameter for simple framebuffer node

When raspberrpi-4b platform  boots up, there are 2 sets of same bootup
log displayed on HDMI monitor screen, it looks like the screen is split
into 2 parts. The root cause is that video format of u-boot is different
from kernel. The fixing "a8r8g8b8" video format is used in u-boot, but
"r5g6b5" video format from framebuffer node is used in kernel image. In
order to avoid weird display status on screen, it needs to set the correct
parameter for simple framebuffer node even if it has existed.

Signed-off-by: Meng Li <Meng.Li@windriver.com>
2 years agobcm2835: Add simiple-framebuffer for use with fkms
Jason Wessel [Wed, 26 Jul 2023 02:42:34 +0000 (10:42 +0800)] 
bcm2835: Add simiple-framebuffer for use with fkms

When the fkms dtb overlay is used only the simple-framebuffer is
presented as a usable video display. So, add "simple-framebuffer"
compatible to enable video driver bcm2835.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Meng Li <Meng.Li@windriver.com>
2 years agovideo: kconfig: Fix a typo in SPL_VIDEO_REMOVE
Bin Meng [Thu, 3 Aug 2023 10:40:08 +0000 (18:40 +0800)] 
video: kconfig: Fix a typo in SPL_VIDEO_REMOVE

Add one space between 'before' and 'loading'.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agovideo: vidconsole: Fix null dereference of ops->measure
Bin Meng [Thu, 3 Aug 2023 09:32:41 +0000 (17:32 +0800)] 
video: vidconsole: Fix null dereference of ops->measure

At present vidconsole_measure() tests ops->select_font before calling
ops->measure, which would result in a null dereference when the console
driver provides no ops for measure.

Fixes: b828ed7d7929 ("console: Allow measuring the bounding box of text")
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoARM: rmobile: Update little‐endian byte order option in srec_cat command
Hai Pham [Mon, 19 Jun 2023 22:43:18 +0000 (00:43 +0200)] 
ARM: rmobile: Update little‐endian byte order option in srec_cat command

Since srecord v1.60, option "-Little_Endian_CONSTant" is deprecated.
Fix the build warnings by updating little‐endian byte order option in
srec_cat command when generating loader header.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agoclk: renesas: Tear clock controller down last before booting OS
Marek Vasut [Sat, 25 Apr 2020 12:57:55 +0000 (14:57 +0200)] 
clk: renesas: Tear clock controller down last before booting OS

Once all the other drivers got torn down in preparation for the OS
to start, tear down the clock controller last. The clock controller
must be torn down last as some of the clock which get turned off
might have still been needed during the teardown stage of the other
drivers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
2 years agorockchip: MAINTAINERS: fix board name for Radxa ROCK 4C+
FUKAUMI Naoki [Thu, 3 Aug 2023 08:04:32 +0000 (17:04 +0900)] 
rockchip: MAINTAINERS: fix board name for Radxa ROCK 4C+

align with other ROCK series.

Fixes: 2b506407c8 ("rockchip: Add MAINTAINERS entry for Radxa Rock 4C+")
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agodts: rockchip: rk3308: Avoid warning for serial probe on prereloc
Massimo Pegorer [Thu, 3 Aug 2023 11:08:13 +0000 (13:08 +0200)] 
dts: rockchip: rk3308: Avoid warning for serial probe on prereloc

Make device tree complete and consistent for pre relocation phase. Some
nodes are missing, causing warnings to be issued on serial port probing
during pre relocation phase (uclass_get_device_by_phandle_id fails when
called by pinctrl_select_state_full: none of these failures is fatal
nor causing issues). Add to *-u-boot.dtsi all required nodes with the
'bootph-some-ram' attribute.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoclk: rockchip: rk3308: Support reading UART rate and clock registers
Massimo Pegorer [Thu, 3 Aug 2023 11:08:12 +0000 (13:08 +0200)] 
clk: rockchip: rk3308: Support reading UART rate and clock registers

Add support to read RK3308 registers used to configure UART clocks, and
thus to get UART rate and baudrate. This fixes clock_get_rate returning
error on serial device probing. Moreover, there is no need anymore to
use 'clock-frequency' property for UART nodes in *-u-boot.dtsi files
for all cases where UART is not inited by U-Boot proper or by SPL o by
TPL code but by a preliminary external boot phase (for Rock PI S, UART
is inited by external TPL).

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoclk: rockchip: rk3308: Fix ordering between masking and shifting
Massimo Pegorer [Thu, 3 Aug 2023 11:08:11 +0000 (13:08 +0200)] 
clk: rockchip: rk3308: Fix ordering between masking and shifting

As per definitions of masks and shift offsets in cru_rk3308.h, values
read from registers must be first masked and then shifted. By the way,
this fix is binary invariant, because in all of fixed cases the shift
offset is zero.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: spl: Drop out of scope debug message related to uart init
Massimo Pegorer [Wed, 2 Aug 2023 17:05:24 +0000 (19:05 +0200)] 
rockchip: spl: Drop out of scope debug message related to uart init

Debug uart is no more inited in board_init_f function: remove this
debug message from board_init_f. If an earliest-as-possible message
after debug uart initialization is needed, enable DEBUG_UART_ANNOUNCE
Kconfig option, instead.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: spl: Drop useless call to debug_uart_init
Massimo Pegorer [Wed, 2 Aug 2023 17:05:23 +0000 (19:05 +0200)] 
rockchip: spl: Drop useless call to debug_uart_init

Since commit 0dba45864b2a ("arm: Init the debug UART") function
debug_uart_init is called in crt files _main before calling
board_init_f. Therefore, there is no need to call it again
inside board_init_f implementation in arm/mach-rockchip/spl.c.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: rk356x-u-boot: Set max-frequency prop in sdhci node
Jonas Karlman [Fri, 4 Aug 2023 09:34:01 +0000 (09:34 +0000)] 
rockchip: rk356x-u-boot: Set max-frequency prop in sdhci node

Most board device trees for RK356x set max-frequency = <200000000> in
the sdhci node, some boards like Quartz64 do not. This result in an
error message due to sdhci driver trying to set a clock rate of 0
instead of the max-frequency value.

  rockchip_sdhci_probe clk set rate fail!

Fix this by setting a common max-frequency in rk356x-u-boot.dtsi. A
patch to set default max-frequency of sdhci node in linux is planned.

Also remove the forced status = "okay" for the sdhci and sdmmc0 nodes,
boards already set correct state for these nodes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoclk: rockchip: rk3568: Add dummy support for GMAC speed clocks
Jonas Karlman [Fri, 4 Aug 2023 09:34:00 +0000 (09:34 +0000)] 
clk: rockchip: rk3568: Add dummy support for GMAC speed clocks

Pine64 Quartz64 boards DT reference SCLK_GMAC1_RGMII_SPEED in the
assigned-clocks property of the gmac1 node. This result in a ENOENT
error when driver core tries to set a parent for this clock.

The clock speed in rgmii/rmii mode is changed using clk_set_rate of the
tx_rx clock and not using clk_set_parent of the speed clock.

Add dummy support for SCLK_GMAC1_RGMII_SPEED and similar clocks to clk
driver to allow a driver for gmac node to probe.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoclk: rockchip: rk3568: Include UART clocks in SPL
Jonas Karlman [Fri, 4 Aug 2023 09:33:59 +0000 (09:33 +0000)] 
clk: rockchip: rk3568: Include UART clocks in SPL

The clock driver for RK3568 does not include support for UART clocks in
SPL. This result in the following message with high enough loglevel.

  ns16550_serial serial@fe660000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19

Fix this by including support for UART clocks in SPL.

Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoclk: rockchip: rk3568: Fix mask for clk_cpll_div_25m_div
Jonas Karlman [Fri, 4 Aug 2023 09:33:59 +0000 (09:33 +0000)] 
clk: rockchip: rk3568: Fix mask for clk_cpll_div_25m_div

The field for clk_cpll_div_25m_div in CRU_CLKSEL_CON81 is 6 bits wide,
not 5 bits wide as currently defined in CPLL_25M_DIV_MASK.

Fix this and the assert so that CPLL_25M can be assigned a 25 MHz rate.

Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoclk: rockchip: rk3568: Fix clk selection in rk3568_pwm_get_clk
Damon Ding [Fri, 4 Aug 2023 09:33:57 +0000 (09:33 +0000)] 
clk: rockchip: rk3568: Fix clk selection in rk3568_pwm_get_clk

Fix use of wrong clk selection for CLK_PWM1 on RK3568.

Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver")
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: cru: Enable cpu info support for rk3568
Anton [Mon, 7 Aug 2023 07:04:46 +0000 (10:04 +0300)] 
rockchip: cru: Enable cpu info support for rk3568

Add cru structure definition in head file to support cpu_info driver.

Series-version: 2
Series-changes: 2
Format the patch header, add commit message and signature.

Signed-off-by: Anton <vao@asu-vei.ru>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2 years agovideo: avoid build failure on veyron board
Alvaro Fernando García [Fri, 4 Aug 2023 00:35:38 +0000 (21:35 -0300)] 
video: avoid build failure on veyron board

533ad9dc avoided an overflow but causes compilation
failure on 32bit boards (eg. veyron speedy)

this commit uses div_u64 which has a fallback codepath
for 32bit platforms

Signed-off-by: Alvaro Fernando García <alvarofernandogarcia@gmail.com>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook_jerry
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: rk3568: Add EmbedFire Lubancat 2 support
Andy Yan [Sat, 5 Aug 2023 12:00:11 +0000 (20:00 +0800)] 
rockchip: rk3568: Add EmbedFire Lubancat 2 support

LubanCat2 is a rk3568 based SBC from EmbedFire.

Specification:
- Rockchip rk3568
- LPDDR4/4X 1/2/4/8 GB
- TF scard slot
- eMMC 8/32/64/128 GB
- Gigabit ethernet x 2
- HDMI out
- USB 2.0 Host x 1
- USB 2.0 Type-C OTG x 1
- USB 3.0 Host x 1
- Mini PCIE interface for WIFI/BT module
- M.2 key for 2280 NVME
- 40 pin header

The dts file is sync from linux mainline.

Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: rv1126: Enable fdtoverlay support
Jagan Teki [Sat, 29 Jul 2023 13:41:42 +0000 (19:11 +0530)] 
rockchip: rv1126: Enable fdtoverlay support

Add fdtoverlay_addr_r and enable OF_LIBFDT_OVERLAY for the
use of DT overlay in RV1126.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: dts: rk3328: rock64: Align spi flash entry
Peter Robinson [Wed, 14 Jun 2023 12:43:14 +0000 (13:43 +0100)] 
rockchip: dts: rk3328: rock64: Align spi flash entry

Align the SPI flash entry with upstream. There's no need
to diverge here.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: dts: rk3328: Add rng details to u-boot.dtsi
Peter Robinson [Wed, 14 Jun 2023 12:43:13 +0000 (13:43 +0100)] 
rockchip: dts: rk3328: Add rng details to u-boot.dtsi

Add the rk3328 rng details to the u-boot.dtsi and
enable the RNG on the Rock64 to be able to provide
a random seed via UEFI.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
(Fix typo message)
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoconfig: rock64: enable efuse for stable mac addr
Peter Robinson [Wed, 14 Jun 2023 12:43:12 +0000 (13:43 +0100)] 
config: rock64: enable efuse for stable mac addr

Enable the rockchip efuse driver on the Rock64 to
provide a stable ethernet address on the device.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agopci: rockchip: Release resources on failing probe
Jonas Karlman [Tue, 11 Jul 2023 23:13:56 +0000 (23:13 +0000)] 
pci: rockchip: Release resources on failing probe

The PCIe driver for RK3399 is affected by a similar issue that was fixed
for RK35xx in the commit e04b67a7f4c1 ("pci: pcie_dw_rockchip: release
resources on failing probe").

Resources are not released on failing probe, e.g. regulators may be left
enabled and the ep-gpio may be left in a requested state.

Change to use regulator_set_enable_if_allowed and disable regulators
after failure to keep regulator enable count balanced, ep-gpio is also
released on regulator failure.

Also add support for the vpcie12v-supply, remove unused include and
check return value from dev_read_addr_name.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: rk3399: remove duplicate call to regulators_enable_boot_on
Quentin Schulz [Fri, 22 Jul 2022 10:09:08 +0000 (12:09 +0200)] 
rockchip: rk3399: remove duplicate call to regulators_enable_boot_on

An earlier commit makes the common SPL code call
regulators_enable_boot_on and regulators_enable_boot_off before
iterating over possible boot media for U-Boot proper. There is therefore
no need to do this in the rk3399-specific code, so let's remove it.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Tested-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agobootstd: cros: Add ARM support
Simon Glass [Sun, 30 Jul 2023 17:17:02 +0000 (11:17 -0600)] 
bootstd: cros: Add ARM support

Support booting ChromiumOS on ARM devices using FIT. Add an entry into the
boot implementation which does not require a command line. This can be
expanded over time as the bootm code is refactored.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: Add a command to read all files for a bootflow
Simon Glass [Fri, 11 Aug 2023 01:33:18 +0000 (19:33 -0600)] 
bootstd: Add a command to read all files for a bootflow

Some bootflows (such as EFI and ChromiumOS) delay reading the kernel until
it is needed to boot. This saves time when scanning and avoids needing to
allocate memory for something that may never be used.

To permit reading of these files, add a new 'bootflow read' command.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: Allow display of the x86 setup information
Simon Glass [Sun, 30 Jul 2023 17:17:00 +0000 (11:17 -0600)] 
bootstd: Allow display of the x86 setup information

Provide an option to dump this information if available.

Move the funciion prototype to the common x86 header. Allow the command
line to be left out since 'bootflow info' show this itself and it is
not in the correct place in memory until the kernel is actually booted.

Fix a badly aligned heading while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Split up reading info and kernel
Simon Glass [Sun, 30 Jul 2023 17:16:59 +0000 (11:16 -0600)] 
bootstd: cros: Split up reading info and kernel

Use the two new functions to separate reading of the ChromiumOS info from
the partition from actually reading the kernel and booting it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Add a function to read a kernel
Simon Glass [Sun, 30 Jul 2023 17:16:58 +0000 (11:16 -0600)] 
bootstd: cros: Add a function to read a kernel

The code to read the ChromiumOS information from the partition is
currently all in one function.

Create a new function which reads the kernel, assuming that the metadata
has been parsed.

For now this function is not used. Future work will plumb it in.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Add a function to read info from partition
Simon Glass [Sun, 30 Jul 2023 17:16:57 +0000 (11:16 -0600)] 
bootstd: cros: Add a function to read info from partition

The code to read the ChromiumOS information from the partition is
currently all in one function. It reads the entire kernel, which is
unnecessary unless it is to be booted.

Create a new function which reads just the minimum required data from the
disk, then obtains what it needs from there.

For now this function is not used. Future work will plumb it in.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: Add private bootmeth data to the bootflow
Simon Glass [Sun, 30 Jul 2023 17:16:56 +0000 (11:16 -0600)] 
bootstd: Add private bootmeth data to the bootflow

Some bootmeths need to store their own information related to the
bootflow, in addition to the generic information in struct bootflow.
Add a pointer for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Add private info for ChromiumOS
Simon Glass [Sun, 30 Jul 2023 17:16:55 +0000 (11:16 -0600)] 
bootstd: cros: Add private info for ChromiumOS

Create a new private structure to hold information gleaned from the disk.
This will allow separation between reading of the bootflow information and
(later) reading the whole kernel.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Add docs for the kernel layout
Simon Glass [Sun, 30 Jul 2023 17:16:54 +0000 (11:16 -0600)] 
bootstd: cros: Add docs for the kernel layout

Provide brief documentation about the ChromiumOS kernel layout.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: Move common zimage functions to bootm.h
Simon Glass [Sun, 30 Jul 2023 17:16:53 +0000 (11:16 -0600)] 
bootstd: Move common zimage functions to bootm.h

We want to avoid using #ifdefs around header files and in the code. It
makes sense to collect the various functions used for loading images into
a single header which can be included by all architectures. The best place
for this is the arch-neutral bootm.h header, so use that.

Move some zimage functions into this bootm.h header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Simplify setup and cmdline expressions
Simon Glass [Sun, 30 Jul 2023 17:16:52 +0000 (11:16 -0600)] 
bootstd: cros: Simplify setup and cmdline expressions

Create a common base from which the other parts are offset and make all
of the offsets related to that. This makes the code a little easier to
read.

Use X86_ prefixes for the two values which are x86-specific.

Drop OFFSET_BASE since it is available in a header field.

Drop the unnecessary 'start' variable too.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Decode some kernel preamble fields
Simon Glass [Sun, 30 Jul 2023 17:16:51 +0000 (11:16 -0600)] 
bootstd: cros: Decode some kernel preamble fields

Decode the kernel start and size using the structures provided. This
accesses the same data, just in a cleaner way.

Add some logging for some of the fields in the kernel preamble.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Support a kernel on either partition
Simon Glass [Sun, 30 Jul 2023 17:16:50 +0000 (11:16 -0600)] 
bootstd: cros: Support a kernel on either partition

ChromiumOS allows a kernel to be on either partition 2 or 4. Add support
for scanning both and using the first one we find with a suitable
signature.

Record the partition which is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Bring in some ChromiumOS structures
Simon Glass [Sun, 30 Jul 2023 17:16:49 +0000 (11:16 -0600)] 
bootstd: cros: Bring in some ChromiumOS structures

Add a header file with structures for booting ChromiumOS, taken from the
vboot tree. Using these makes it easier to understand the code.

Note that the code style has not been updated for U-Boot, with use of
uint64_t,  __attribute__((packed)) and one comment-style nit. This should
make it easier to keep the code in sync. It was taken from commit:

   5b8596ce ("2sha256_arm: Fix data abort issue")

Update the CHROMEOS string to use the defined values.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Move partition reading into a function
Simon Glass [Sun, 30 Jul 2023 17:16:48 +0000 (11:16 -0600)] 
bootstd: cros: Move partition reading into a function

Move the code which reads a partition into its own function. Add a
constant for the number of bytes to 'probe' at the start of the partition.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstd: cros: Correct reporting of I/O errors
Simon Glass [Sun, 30 Jul 2023 17:16:47 +0000 (11:16 -0600)] 
bootstd: cros: Correct reporting of I/O errors

Return -EIO when the read failed, rather than the number of blocks read.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-watchdog
Tom Rini [Thu, 10 Aug 2023 15:40:09 +0000 (11:40 -0400)] 
Merge https://source.denx.de/u-boot/custodians/u-boot-watchdog

- cmd: cyclic: Remove duplicate command name in help text (Alexander)
- ftwdt010: need to reset watchdog in ftwdt010_wdt_start() (Sergei)

2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 10 Aug 2023 14:36:43 +0000 (10:36 -0400)] 
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

+ Add USB host support on VisionFive2 board
+ Enable SPI flash support on VisionFive2 board
+ Enable Random Number Generator in RISC-V QEMU board
+ Display new SBI extension
+ Add SPL_ZERO_MEM_BEFORE_USE Kconfig for jh7110 L2 LIM
  (Loosely-Integrated Memory)

2 years agowatchdog: ftwdt010: need to reset watchdog in ftwdt010_wdt_start()
Sergei Antonov [Sun, 30 Jul 2023 17:14:16 +0000 (20:14 +0300)] 
watchdog: ftwdt010: need to reset watchdog in ftwdt010_wdt_start()

ftwdt010_wdt_start() has to call ftwdt010_wdt_reset() after setting-up
the timeout in the same fashion ftwdt010_wdt_expire_now() does it.

Without this patch the "wdt start <ms>" command does not actually start
the watchdog timer until the "wdt reset" command is executed.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agocmd: cyclic: Remove duplicate command name in help text
Alexander Dahl [Fri, 4 Aug 2023 15:53:23 +0000 (17:53 +0200)] 
cmd: cyclic: Remove duplicate command name in help text

Function 'cmd_usage()' already prints one command in usage before
printing out the help text given to the U_BOOT_CMD_WITH_SUBCMDS macro.

Wrong previous output:

    Usage:
    cyclic cyclic demo <cycletime_ms> <delay_us> - register cyclic demo function
    cyclic list - list cyclic functions

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoriscv: cpu: jh7110: Select SPL_ZERO_MEM_BEFORE_USE
Shengyu Qu [Wed, 9 Aug 2023 13:11:33 +0000 (21:11 +0800)] 
riscv: cpu: jh7110: Select SPL_ZERO_MEM_BEFORE_USE

Add Kconfig item for Starfive JH7110 to select SPL_ZERO_MEM_BEFORE_USE.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: Add SPL_ZERO_MEM_BEFORE_USE implementation
Shengyu Qu [Wed, 9 Aug 2023 13:11:32 +0000 (21:11 +0800)] 
riscv: Add SPL_ZERO_MEM_BEFORE_USE implementation

Add the actual support code for SPL_ZERO_MEM_BEFORE_USE and remove
existing Starfive JH7110's L2 LIM clean code, since existing code has
following issues:
 1. Each hart (in the middle of a function call) overwriting its own
    stack and other harts' stacks.
    (data-race and data-corruption)
 2. Lottery winner hart can be doing "board_init_f_init_reserve",
    while other harts are in the middle of zeroing L2 LIM.
    (data-race)

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: Kconfig: Add SPL_ZERO_MEM_BEFORE_USE
Shengyu Qu [Wed, 9 Aug 2023 13:11:31 +0000 (21:11 +0800)] 
riscv: Kconfig: Add SPL_ZERO_MEM_BEFORE_USE

Add a Kconfig item to allow SPL to clear stack/GD/malloc area before
using them.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoconfigs: starfive: Enable environment in SPI flash support
Shengyu Qu [Tue, 8 Aug 2023 13:14:36 +0000 (21:14 +0800)] 
configs: starfive: Enable environment in SPI flash support

On Starfive Visionfive 2, the u-boot environment settings are saved to
on-board SPI flash. Enable relative configs by default and set offset
and size according to upstream linux dts.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoconfigs: riscv: starfive: Add VF2 PCIe USB3 XHCI support
Minda Chen [Mon, 7 Aug 2023 08:53:38 +0000 (16:53 +0800)] 
configs: riscv: starfive: Add VF2 PCIe USB3 XHCI support

Add XHCI_PCI to enable usb3-host functions.
Also add usb command and keyboard config.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: starfive: Add SYS_CACHE_SHIFT_6 to enable SYS_CACHELINE_SIZE
Minda Chen [Mon, 7 Aug 2023 08:53:37 +0000 (16:53 +0800)] 
riscv: starfive: Add SYS_CACHE_SHIFT_6 to enable SYS_CACHELINE_SIZE

Some device driver need SYS_CACHELINE_SIZE macro. Add StarFive
SYS_CACHE_SHIFT_6 to enable it.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: dts: starfive: Enable pcie0 dts node
Minda Chen [Mon, 7 Aug 2023 08:53:36 +0000 (16:53 +0800)] 
riscv: dts: starfive: Enable pcie0 dts node

In StarFive VF2 board. pcie0 connect to VTI usb controller.
Enable it to support usb host.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agopci: plda: Get correct ECAM offset in multiple PCIe RC case
Minda Chen [Mon, 7 Aug 2023 08:53:35 +0000 (16:53 +0800)] 
pci: plda: Get correct ECAM offset in multiple PCIe RC case

Get the correct ECAM offset and record the secondary bus
number in Multiple RC case.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agocmd/sbi: display new extensions
Heinrich Schuchardt [Wed, 2 Aug 2023 20:39:46 +0000 (22:39 +0200)] 
cmd/sbi: display new extensions

The SBI specification v2.0-rc2 defines new extensions:

* Nested Acceleration Extension (NACL)
* Steal Time Accounting (STA)

Allow the sbi command to display these.

Add missing implementation IDs.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: qemu: imply CONFIG_DM_RNG
Heinrich Schuchardt [Fri, 28 Jul 2023 13:54:15 +0000 (15:54 +0200)] 
riscv: qemu: imply CONFIG_DM_RNG

The EFI_RNG_PROTOCOL is needed for Linux' KASLR.

QEMU can provide a virtio-rng device to emulate a hardware random number
generator which is supported by our virtio_rng driver.

Enabling CONFIG_DM_RNG will enable CONFIG_VIRTIO_RNG and
CONFIG_EFI_RNG_PROTOCOL by default too.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agoMerge tag 'x86-pull-20230809' of https://source.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Wed, 9 Aug 2023 17:17:34 +0000 (13:17 -0400)] 
Merge tag 'x86-pull-20230809' of https://source.denx.de/u-boot/custodians/u-boot-x86

- x86: Fixes for distro booting
- x86: Move some boards to text environment

2 years agoMerge branch '2023-08-09-misc-cleanups' into next
Tom Rini [Wed, 9 Aug 2023 17:15:51 +0000 (13:15 -0400)] 
Merge branch '2023-08-09-misc-cleanups' into next

- Rework the arch linker scripts to be consistent for all, support
  Kconfig fragments in the board directory and fix some Kconfig options
  that were hex-type by default of 0 not 0x0.

2 years agox86: qemu-x86: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:02:05 +0000 (21:02 -0600)] 
x86: qemu-x86: Convert to text environment

Use the common include.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: qemu: Add required linux/sizes.h include
Simon Glass [Mon, 31 Jul 2023 03:02:04 +0000 (21:02 -0600)] 
x86: qemu: Add required linux/sizes.h include

These files rely on the config.h file provided this include. Add it
explictily so we can move to a text environment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: efi-x86_payload: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:02:03 +0000 (21:02 -0600)] 
x86: efi-x86_payload: Convert to text environment

Use the common include.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: efi-x86_app: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:02:02 +0000 (21:02 -0600)] 
x86: efi-x86_app: Convert to text environment

Use the common include. Drop the unnecessary changes, since missing
stdio drivers will be ignored.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: slimbootloader: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:02:01 +0000 (21:02 -0600)] 
x86: slimbootloader: Convert to text environment

Use the common include along with some additions.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[Drop common env from slimbootloader.env]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: minnowmax: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:02:00 +0000 (21:02 -0600)] 
x86: minnowmax: Convert to text environment

Use the common include along with some additions.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: cougarcanyon2: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:01:59 +0000 (21:01 -0600)] 
x86: cougarcanyon2: Convert to text environment

Use the common include. The existing environment includes "vga" but that
is not valid anymore, so let it use vidconsole

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: cherryhill: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:01:58 +0000 (21:01 -0600)] 
x86: cherryhill: Convert to text environment

Use the common include.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: edison: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:01:57 +0000 (21:01 -0600)] 
x86: edison: Convert to text environment

Don't use the common include since Edison's environment is empty.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: galileo: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:01:56 +0000 (21:01 -0600)] 
x86: galileo: Convert to text environment

Use the common include.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: bayleybay: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:01:55 +0000 (21:01 -0600)] 
x86: bayleybay: Convert to text environment

Use the common include.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: crownbay: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:01:54 +0000 (21:01 -0600)] 
x86: crownbay: Convert to text environment

Use the common include.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: coreboot: Convert to text environment
Simon Glass [Mon, 31 Jul 2023 03:01:53 +0000 (21:01 -0600)] 
x86: coreboot: Convert to text environment

Use the common include and add some options specific to this board.

Drop everything from the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: Add a common include for environment settings
Simon Glass [Mon, 31 Jul 2023 03:01:52 +0000 (21:01 -0600)] 
x86: Add a common include for environment settings

Create a text-file version of x86-common.h which can be used by x86
boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: Drop unused distro settings
Simon Glass [Mon, 31 Jul 2023 03:01:51 +0000 (21:01 -0600)] 
x86: Drop unused distro settings

No x86 board uses distro boot, so drop these settings.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: Drop inclusion of ibmpc.h
Simon Glass [Mon, 31 Jul 2023 03:01:50 +0000 (21:01 -0600)] 
x86: Drop inclusion of ibmpc.h

This is not needed in this file anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: edison: Drop inclusion of ibmpc.h
Simon Glass [Mon, 31 Jul 2023 03:01:49 +0000 (21:01 -0600)] 
x86: edison: Drop inclusion of ibmpc.h

This should be included by files that need it, not the config.h file.
Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: i8254: Include required ibmpc.h header
Simon Glass [Mon, 31 Jul 2023 03:01:48 +0000 (21:01 -0600)] 
x86: i8254: Include required ibmpc.h header

This is needed for this file, so include it here explicitly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agox86: Drop CFG_SYS_STACK_SIZE
Simon Glass [Mon, 31 Jul 2023 03:01:47 +0000 (21:01 -0600)] 
x86: Drop CFG_SYS_STACK_SIZE

This is only used in one file and the value is the same for both boards
which define it. Use the fixed value of 32KB and drop the CFG. This will
allow removal of the config.h files.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agoenv: Explain how to use #include files in text environment
Simon Glass [Mon, 31 Jul 2023 03:01:46 +0000 (21:01 -0600)] 
env: Explain how to use #include files in text environment

Provide documentation on how to share common settings among boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>