Commit graph

86199 commits

Author SHA1 Message Date
Christophe Leroy
388cb1a10f serial, mpc8xx: Take parameter RAM relocation into account
Instead of inhibiting parameter RAM relacation, take
into account the configured one.

It means INIT_TRX command cannot be used and must be done
manually as explained in the microcode patch application note.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-05 07:26:53 +02:00
Christophe Leroy
14e64c1801 spi, mpc8xx: Take parameter RAM relocation into account
Instead of inhibiting parameter RAM relocation, take it into account.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-05 07:26:53 +02:00
Christophe Leroy
e7930e93cc powerpc: mpc8xx: Add SMC relocation CPM microcode
In order to use QMC mode in the CPM, a SCC requires more space
in parameter RAM.

After SCC1 there is I2C parameter RAM and after SCC2 there is
SPI parameter RAM. MPC866 and MPC885 can already relocate I2C and.
SPI parameter RAM.

But in order to free space after SCC3 and SCC4, SMC1 and SMC2
need to be relocated. In order to do so, a CPM microcode patch
is required.

Binary data for that patch is copied from Linux kernel.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-05 07:26:53 +02:00
Christophe Leroy
62c5fae511 powerpc: mpc885: Add CPM USB-SOF microcode for CPM15 ERRATA
MPC885 CPU has the following ERRATA:

	When the USB controller is configured in Host mode, and the
	SOF generation (SFTE=1 in USMOD register) is being used,
	there may be false CRC error indication in other SCCs.
	Although the data is received correctly, the CRC result
	will be corrupted.

Add capability to load the related microcode to fix it.
The microcode binary data is copied from Linux kernel.

Other microcode will be added in following patch so make it
a Kconfig choice.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-05 07:26:53 +02:00
Christophe Leroy
3febc89563 powerpc: Force cast on memcpy_toio()
sparse reports the following warning:

  CHECK   arch/powerpc/cpu/mpc8xx/micropatch_usb_sof.c
arch/powerpc/cpu/mpc8xx/micropatch_usb_sof.c:29:9: warning: cast removes address space '<asn:2>' of expression
arch/powerpc/cpu/mpc8xx/micropatch_usb_sof.c:30:9: warning: cast removes address space '<asn:2>' of expression

This is because of (void *) casts for using memcpy() as a substitute.

Do like other architectures, __force the cast to silence the warning

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-05 07:26:53 +02:00
Christophe Leroy
bebb8dfabc powerpc: mpc8xx: Reorganise init RAM
Using SMC relocation microcode patch or USB-SOF microcode patch
will disable DPRAM memory from 0x2000 to 0x2400 and from 0x2f00
to 0x3000.

At the time being, init RAM is setup to use 0x2800-0x2e00, but
the stack pointer goes beyond 0x2800 and even beyond 0x2400.

For the time being we are not going to use any microcode patch
that uses memory about 0x3000, so reorganise setup to use:
- 0x2800 - 0x2e00 for init malloc and global data and CPM buffers
- 0x3000 - 0x3c00 for init stack

For more details about CPM dual port ram, see
commit b1d62424cb ("powerpc: mpc8xx: redistribute data in CPM dpram")

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-04 12:40:47 +02:00
Christophe Leroy
fdd243d81b powerpc: mpc8xx: CPM parameter RAM can be anywhere
With relocation, CPM parameter RAM can be anywhere in the
dual port RAM, so don't split dual port RAM.

Remove dparam and dparam16 members of struct comm_proc

PROFF_XXX become offsets from the start of dual port RAM,
then they are now consistant with the offsets in RPBASE
registers.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-04 10:58:07 +02:00
Christophe Leroy
019b39b736 board: cssi: Load CMPC885's motherboard FPGA earlier
In order to know the motherboard type earlier, perform I/O ports
initialisation and FPGA loading in board_early_init_f() instead
of board_early_init_r().

This is needed to be able to load mpc8xx CPM microcode base on
motherboard type and before starting to use the CPM.

Console is not available yet so remove the printfs.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-04 10:58:07 +02:00
Christophe Leroy
756af9ab83 board: cssi: Remove stale macro from cmpcpro.c
Three unused macros were left over. Remove them.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-04 10:58:07 +02:00
Christophe Leroy
66d23d2237 board: cssi: Remove duplicated FPGA loading sequence on CMPC885
A duplicated FPGA loading sequence appears after FPGA reset.

Remove it.

Fixes: dac3c6f625 ("board: cssi: Add new board MCR3000_2G")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-04 10:58:07 +02:00
Tom Rini
6735ab59e6 Prepare v2023.07-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-05-01 12:02:02 -04:00
Tom Rini
c960c0fd38 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2023-05-01 11:50:26 -04:00
Tom Rini
27dc882644 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
Please pull the second part of the sunxi pull request for this cycle.
Another bunch of patches that replace old-school U-Boot hacks with
proper DM based code, this time for the raw NAND flash driver, and the
USB PHY VBUS detection code. Plus two smaller patches that were sitting
in my inbox for a while.

Gitlab CI passed. In lack of some supported board with NAND flash I
couldn't really test this part, but apparently this was tested by the
reviewer. I briefly ran the branch on some boards with USB-OTG, and
this still worked.
2023-04-30 21:29:50 -04:00
Tom Rini
fe3a77cb15 Merge branch 'for-2023.07' of https://source.denx.de/u-boot/custodians/u-boot-mpc8xx
This pull request adds support for the last CPU board from
CS GROUP France (previously CSSI).

That CPU board called CMPCPRO has a mpc8321E CPU (Family PQII PRO hence
its name) and can be plugged in place of the CMPC885 board.

In order to support that new board, the following changes are included
in this series:
- Make the mpc8xx watchdog driver more generic for reusing it
with mpc83xx
- Fix various small problems on mpc83xx platform
- Add a GPIO Driver for QE GPIOs
- Add support for mpc832x into mpc83xx SPI driver
- Refactor existing board code that will be shared with new board
- Add the new board
2023-04-29 09:29:41 -04:00
Tom Rini
076f13308c sandbox and fdt bug fixes / tweaks
various other minor fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmRMHUARHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreZYvQf/R868tRhADWw5UfUyg4TdSWsfGmNlmnYT
 eU2e4L1riWvTzrQh30CGhXOamsgfrsDfOdERgypl1bRvhwI68GZPqjXXAyEcIcsP
 HkqU47cUv4998Gcg4WwWdImU1vBeY1TRckgk3ILGMM1f4yGIlEaA/iYK8sqP2VuO
 UYbrTVBPs5bu7BCQuLyMsR9SKpgMr8CTx9/UqBZioeXwwm8PD5+6S4kh8OlwWn93
 5uFxxgFHSDioZZvM2A4sHkpsR5AxPJbC+Jxy9VHdMpfEaHk1E9H28gQnbnnDvByz
 7I1JWVBeH/xu/OLjG9OR97s/yZF7IpcNtld+EMhczx1JJoxwxDBAKg==
 =G7yK
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-28apr23' of https://source.denx.de/u-boot/custodians/u-boot-dm

sandbox and fdt bug fixes / tweaks
various other minor fixes
2023-04-28 19:00:01 -04:00
Simon Glass
f43fc16812 fdt: Indicate that people should use the ofnode API
Add a note to the comment at the top of this file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:52:38 -06:00
Hugo Villeneuve
ded112f24c fdt_support: fix comments syntax error
Fix comments syntax error in fdt_node_offset_by_compat_reg()
description:
    compatiable -> compatible

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:52:38 -06:00
Johan Jonker
37937aba35 core: fdtaddr: use map_sysmem() as cast for the return
For the devfdt_get_addr_index_ptr() and devfdt_get_addr_size_index_ptr()
function use map_sysmem() function as cast for the return for use in
sandbox. Also fix sandbox test.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Drop second hunk:
Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:52:30 -06:00
Jan Kiszka
de65b122a2 tools: Fall back to importlib_resources on Python 3.6
importlib.resources became part of 3.7 only. Allow using distros with
3.6 and the importlib_resources backport.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:49:00 -06:00
Marek Vasut
f53e973b84 test: fdt: Fix copyright message
Drop the map_to_sysmem() copy paste error. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:49:00 -06:00
Heinrich Schuchardt
c25be4f3ac patman: fix class TestFunctional
Variable orig_dir cannot be used in the finally block if it has not be
assigned outside of the try block.

tools/patman/func_test.py:523:21:
E0601: Using variable 'orig_dir' before assignment
(used-before-assignment)

tools/patman/func_test.py:691:21:
E0601: Using variable 'orig_dir' before assignment
(used-before-assignment)

Fixes: fd70986a62 ("patman: Add a test that uses gitpython")
Fixes: be051c0c77 ("patman: Detect missing upstream in CountCommitsToBranch")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:49:00 -06:00
Simon Glass
ad827e15b2 binman: Use expanduser instead of HOME
There may not be a HOME environment variable, so use the os.expanduser()
function instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:49:00 -06:00
Rasmus Villemoes
ca031c0827 dm: core: introduce uclass_get_device_by_of_path()
There's quite a few instances of board-specific code doing

  off = fdt_path_offset(gd->fdt_blob, ...);
  ...
  ret = uclass_get_device_by_of_offset(..., off, &dev);

looking for an eeprom or a pmic via some alias. Such code can be
simplified a little if we have a helper for directly getting a device
via device tree path (including being given as an alias).

Implement it in terms of ofnode rather than raw offsets so that this
will work whether live tree is enabled or not.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-04-28 11:48:59 -06:00
Rasmus Villemoes
6ebb357a6a uclass: add uclass_find_device_by_phandle_id() helper
The functions uclass_find_device_by_phandle() and
uclass_get_device_by_phandle_id() both loop over a given uclass
looking for a device with a given phandle. Factor that out to a common
helper.

For now, there are no (known potential) users of the new helper
outside uclass.c, so make it static.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Fix warning on sandbox_spl; fix code style:
Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:48:09 -06:00
Pavel Skripkin
763f0a1f0d sandbox: disable tracing before unmapping RAM
Currently doing 'reset' command in sandbox with tracing enabled causes
SIGSEV

```
Hit any key to stop autoboot:  0
=>
=>
=> reset
resetting ...
Segmentation fault (core dumped)

```

Tracing callback uses RAM buffer for storing tracing reports, but
state_uninit() function unmaps whole RAM, which causes SIGSEV on umapped
memory inside tracing subsystem.

Fix it by disabling tracing before unmapping memory

Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Add missing check for CONFIG_TRACE:
Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:47:01 -06:00
Heinrich Schuchardt
c383e85434 sandbox: correct posix_types.h define
arch/arm/include/asm/posix_types.h and
arch/sandbox/include/asm/posix_types.h should use different defines.

Add SPDX header.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:18 -06:00
Tom Rini
e0dda26c2e bootflow: Rework do_bootflow_menu() slightly
When building this with clang, we get a warning such as:
cmd/bootflow.c:412:27: warning: variable 'bflow' is uninitialized when used here [-Wuninitialized]
        printf("Selected: %s\n", bflow->os_name ? bflow->os_name : bflow->name);
                                 ^~~~~

And a suggestion to just initialize bflow to NULL. This would however
would be ensuring a bad dereference. Instead, looking at the function we
rework things so that when CONFIG_EXPO is not enabled (and so, no UI) we
error early and would never reach this point in the code.  Simplify the
rest slightly as well while at this.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Bin Meng
86592af536 dm: core: Make aliases_lookup static
aliases_lookup is only referenced in of_access.c

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Jorge Ramirez-Ortiz
7f1a4c9dd8 drivers: tee: sandbox: Fix SCP03 control emulator
Fix and document the Secure Channel Protocol03 emulator.

Fixes: 5a8783c80c ("drivers: tee: sandbox: SCP03 control emulator")

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-04-28 11:30:17 -06:00
Heinrich Schuchardt
1a07d39521 sandbox: fix return type of os_filesize()
Given a file ../img of size 4294967296 with GPT partition table and
partitions:

=> host bind 0 ../img
=> part list host 0
Disk host-0.blk not ready

The cause is os_filesize() returning int. File sizes must use off_t.

Correct all uses of os_filesize() too.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Heinrich Schuchardt
86daa47c84 MAINTAINERS: assign include/os.h
os.h is only used by the sandbox.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Andrew Davis
c71ee7e163 binman: Use unsigned long over typedef ulong
The header binman_sym.h depends on ulong typedef but does not include
types.h. This means the header must be included after including types.h
or a header that includes it.

We could include types.h but instead let's just switch from ulong
to directly using unsigned long. This removes the need for typedef'ing
it in some of the tests, so also remove those.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Heinrich Schuchardt
b52d6de207 common: static fdt_simplefb_enable_existing_node()
Function fdt_simplefb_enable_existing_node() should be static as it is not
used outside common/fdt_simplefb.c.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Bin Meng
327883c3c9 boot: vbe_simple: Fix vbe_simple_read_bootflow() dependency
vbe_simple_read_bootflow() calls vbe_simple_read_bootflow_fw()
which is only available when BOOTMETH_VBE_SIMPLE_FW is on.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Heinrich Schuchardt
9963b1f5b8 sandbox: mark sandbox_exit() as no return.
Fix a -Wimplicit-fallthrough warning in sandbox_sysreset_request().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Heinrich Schuchardt
278c9b22ba sandbox: spi: sandbox_sf_process_cmd() missing fallthrough
Add a missing fallthrough macro to avoid a -Wimplicit-fallthrough warning.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Heinrich Schuchardt
42175a70d1 sandbox: fix sandbox_hub_submit_control_msg()
Avoid incorrect fall through:
A USB_RT_HUB request should not be treated as USB_RT_PORT.

Simplify the coding:
Avoid duplicate debug() statements.

This fixes all -Wimplicit-fallthrough warnings.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Heinrich Schuchardt
159d6bf720 sandbox: fix fall through in sandbox_flash_bulk()
Handling of SANDBOX_FLASH_EP_OUT should never fall through to
SANDBOX_FLASH_EP_IN.

This addresses a warning shown when compiling with
-Wimplicit-fallthrough.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28 11:30:17 -06:00
Christophe Leroy
4d0c8db74d board: cssi: Add CPU board CMPCPRO
CSSI has another CPU board, similar to the CMPC885 board
that get plugged on the two base boards MCR3000_2G and MIAE.

That CPU board is called CMPCPRO because it has a MPC8321E CPU,
also known as Power QUICC II PRO.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28 17:52:23 +02:00
Christophe Leroy
78ba7b61da board: cssi: Move all mother board code into common.c
All the code used to manage the mother boards will be
common to soon to come CPU board.

Move all that code into common.c

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28 17:52:23 +02:00
Christophe Leroy
4b6a5388da board: cssi: Refactor EEPROM read
On cmpc885 board, the ethernet addresses are stored in an
EEPROM that is accessed through SPI.

A 3 bytes command is sent to the chip then the content
gets read. At the time being a single block access is
performed, ignoring the first 3 bytes read.

Reword the SPI transfer to first send 3 bytes then
receive the content of the EEPROM so that there don't be
3 dummy bytes at the beginning of the buffer.

And move the function into common.c so that it can be
reused by the board that will be added in a future patch.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28 17:52:23 +02:00
Christophe Leroy
3155b0af4e board: cssi: Create dedicated file for common sources
In preparation of the new cssi board called cmpcpro which
we be introduce in a future patch, move common
functions into a dedicated file in a common directory.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28 17:52:23 +02:00
Christophe Leroy
71e94640fb board: cssi: Migrate to hashed password
Use a hashed password instead of clear text in order to
improve board security.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28 17:52:23 +02:00
Samuel Holland
25bc7bfc30 Kconfig: Remove an impossible condition
ARCH_SUNXI selects BINMAN, so the condition "!BINMAN && ARCH_SUNXI"
is impossible to satisfy.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-28 01:32:05 +01:00
Samuel Holland
df202d996d phy: sun4i-usb: Do not drive VBUS with external VBUS present
It is possible to use host-side USB with externally-provided VBUS. For
example, some USB OTG cables have an extra power input which powers
both the board and the USB peripheral.

To support this setup, skip enabling the VBUS switch/regulator if VBUS
voltage is already present. This behavior matches the Linux PHY driver.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-28 01:30:40 +01:00
Samuel Holland
09cbd3858f gpio: axp/sunxi: Remove virtual VBUS detection GPIO
Now that this functionality is modeled using the device tree and
regulator uclass, the named GPIO is not referenced anywhere. Remove it.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-28 01:30:24 +01:00
Samuel Holland
7d5b17cca6 sunxi: Switch to PMIC USB power supply VBUS detection
Update boards to use the USB power supply driver, as referenced in the
device tree, instead of a virtual GPIO. This removes the need for some
DM-incompatible special cases in the GPIO driver.

The following five boards used AXP0-VBUS-DETECT in their config, but are
missing the "usb0_vbus_power-supply" property in their device tree:
 - Ainol_AW1_defconfig / sun7i-a20-ainol-aw1
 - Cubieboard4_defconfig / sun9i-a80-cubieboard4
 - Merrii_A80_Optimus_defconfig / sun9i-a80-optimus
 - Yones_Toptech_BD1078_defconfig / sun7i-a20-yones-toptech-bd1078
 - Yones_Toptech_BS1078_V2_defconfig /
   sun6i-a31s-yones-toptech-bs1078-v2

None of those five boards have the MUSB controller (USB OTG) enabled in
their device trees, so this change should not break anything for them.

Additionally, the following board intentionally omits the property
because VBUS is always enabled:
 - Nintendo_NES_Classic_Edition_defconfig /
   sun8i-r16-nintendo-nes-classic

The PHY driver already assumes VBUS is enabled when no detection method
is available, so again this will not cause any problems.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-28 01:30:05 +01:00
Samuel Holland
ee6a678263 power: regulator: Add a driver for the AXP USB power supply
This driver reports the presence/absence of voltage on the PMIC's USB
VBUS pin. This information is used by the USB PHY driver. The
corresponding Linux driver uses the power supply class, which does not
exist in U-Boot. UCLASS_REGULATOR seems to be the closest match.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-28 01:29:40 +01:00
Samuel Holland
2a6805b5fa mtd: nand: sunxi: Pass the device to the init function
This more closely matches the U-Boot driver to the Linux version.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Michael Trimarchi <micahel@amarulasolutions.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-28 01:06:57 +01:00
Samuel Holland
21b790fd49 mtd: nand: sunxi: Convert to the driver model
Clocks, resets, and pinmuxes are now handled by the driver model, so the
only thing the "board" code needs to do is load the driver. This matches
the pattern used by other DM raw NAND drivers (there is no NAND uclass).

The actual board code is now only needed in SPL.

Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-28 01:06:57 +01:00