Commit graph

88333 commits

Author SHA1 Message Date
Marek Vasut
804f7d63f2 disk: Move part_create_block_devices() to blk uclass
Move part_create_block_devices() to blk uclass and unexpose
the function. This can now be internal to the block uclass.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22 15:17:52 -04:00
Marek Vasut
30a12e0801 disk: Switch part_blk_*() functions to disk_blk_*()
The behavior of the part_blk_*() functions is now identical
to disk_blk_*() functions, switch the former to the later.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22 15:17:52 -04:00
Marek Vasut
bfd98b9a63 disk: Extend disk_blk_part_validate() with range checking
Check whether access is out of bounds of the partition and
return an error. This way there is no danger of esp. write
or erase outside of the confines of partition.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22 15:17:52 -04:00
Marek Vasut
2bc0dfef9f disk: Handle partition to block device offset conversion
Convert the read/write/erase offset from one within a partition
to one within a block device, to correctly access the data on
the block device for both write and erase operations.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22 15:17:52 -04:00
Marek Vasut
9161c2c90d disk: Simplify disk_blk_{write, erase}() using blk_{write, erase}()
These two functions are basically identical, just call the blk_*()
functions from disk_blk_*() functions. The only difference is that
the disk_blk_*() functions have to use parent block device as the
udevice implementing block device operations.

Add documentation on what those functions really do. The documentation
is not wrong even though it likely does look that way. The write/erase
functions really do not take into account the partition offset. This
will be fixed in the next patch.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22 15:17:52 -04:00
Marek Vasut
91d3066c90 disk: Simplify disk_blk_read() using blk_read()
The disk_blk_read() can be simplified using blk_read(), the only
things which needs to be handled are the read offset based on the
partition properties, and the block device ops which are coming
from the parent udevice, not the partition udevice.

The later is currently not implemented correctly as far as I can
tell, since the current code extracts block device descriptor from
the parent udevice which is OK, but extracts block device operations
from the partition udevice, which does not seem OK.

Switching to the blk_read() fixes that too.

The dev_get_blk() usage is simplified using UCLASS_PARTITION check.

Add non-confusing documentation what this really does.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22 15:17:52 -04:00
Marek Vasut
5ff4609f85 disk: Drop always true conditional check
if (device_get_uclass_id(dev) == UCLASS_PARTITION) is always
true, because this disk_blk_read() function calls dev_get_blk()
above and checks its return value for non-NULL. The dev_get_blk()
performs the same device_get_uclass_id(dev) check and returns NULL
if not UCLASS_PARTITION. Drop the duplicate check.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22 15:17:52 -04:00
Marek Vasut
5ebe790ff0 test: acpi: Handle both 32bit and 64bit ACPI tables
Handle both 32bit and 64bit systems, i.e. sandbox and sandbox64
the same way drivers/cpu/cpu_sandbox.c sets those ACPI tables up.
This fixes "$ ./u-boot -Tc 'ut dm dm_test_acpi_write_tables'"
test failure on sandbox64.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-22 15:17:52 -04:00
Marek Vasut
c8659ca88c test: Fix the help for the ut command
Drop the 'ut' prefix, this is superfluous and not present in
any of the other ut tests.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-22 15:17:52 -04:00
Tom Rini
7e6e40c572 Prepare v2023.10-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTjxwsACgkQFHw5/5Y0
 tyz4TAwAtVgllQGPVNIVDaEBdG93htm1DoZPc4EMZ4L5rf0nT0yJPeOhRCGygYY+
 zYL1ueleBZtpJhYOuHGetSns0B/M5Wx7gu1eGHNGrMNHH7zCV5Ynjjee2IaqKgbU
 tdSSc8XQpJ3PJY6rhJ6qZ7pO/EcUlQEdqplEUGFmA4JObx43j1+bmqyGTJA57vEw
 rrr+tyUVlr+Wv4lqlX/YJWzAB6IoSMUStv34M2lmiZvZoTYHezvIqBK33GrQ4Cwl
 hQ8nP7ymBXdA5GoMFBpfaBCA7aX3esx4yYN3JIRNRjNmnITJHYs0G8oIh8R5iNnJ
 psroU7GRPu3MmXfOnHlRfA/v0mo8xQGc2RQHyZUGXuApTI8+SFK/4WJPBny/IYse
 ggcVCHoI57dx1+j4+JHYhh61bMR1JUwARs4/UU4dKT3MRZM8Gb99OvbXO3+switZ
 R0YHSnDP///MTC7/MzbOPWzsJiTn9gkZd8nFVTXoncrVI8F3OtCc89G4HBruBSj7
 ptfylxqH
 =VlzD
 -----END PGP SIGNATURE-----

Merge tag 'v2023.10-rc3' into next

Prepare v2023.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-21 17:32:17 -04:00
Tom Rini
976fb2ffa3 Prepare v2023.10-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-21 16:19:59 -04:00
Tom Rini
db72a5736f sandbox64 fixes
-----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmTin6QRHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreYl+AgAp/2c853uNCqfGqkhc5tc4lztwOA7gT/I
 35MeifGeMCAHrZdXgUc6pMWHepIacJzfBPA4yXPgNfVNC4DpId5hYhWtQjPdJUAl
 eztSWOSGUxRCQF5fLg30E8l98Cj25xII6bG2tpUqWEh27oEmc255nPlWyoG4M31a
 D4qp9TEYGmqQeo/u926wJKa73pKe92hH67j25ri6G1SaYsBLHToLPznEV2kIkRPl
 RDHXikSx615Ju1PfKuTBL/mL+8HdP+SVJRd/en6iq4K3pK5F8Hv77ACXDX5W+zQR
 E2f2Yw1jTIJJd4sLdttTYAwVVSnknZpvikMkGh+ZNCNXKiiWOOBLQA==
 =Lhyt
 -----END PGP SIGNATURE-----

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

sandbox64 fixes
2023-08-21 15:48:30 -04:00
Marek Vasut
25a9be71ec test: cpu: Handle both 32bit and 64bit CPUs
Handle both 32bit and 64bit systems, i.e. sandbox and sandbox64
the same way drivers/cpu/cpu_sandbox.c does, that is in case
CONFIG_PHYS_64BIT is enabled, assume 64bit address width, else
assume 32bit address width. This fixes ut_dm_dm_test_cpu test
failure on sandbox64.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
ddfda552e7 configs: sandbox64: Enable PCI register multi-entry support
Align the sandbox64 defconfig with sandbox defconfig. Enable missing
PCI register multi-entry support. This fixes ut_dm_dm_test_pci_bus_to_phys
test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
eaa5b5d7d2 configs: sandbox64: Enable clock CCF driver
Align the sandbox64 defconfig with sandbox defconfig. Enable missing
CCF and Sandbox CCF drivers. This fixes ut_dm_dm_test_clk_ccf test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
5d5d7e225d configs: sandbox64: Enable video 12x22 font support
Align the sandbox64 defconfig with sandbox defconfig. Enable missing
12x22 font support. This fixes ut_dm_dm_test_video_text_12x22 test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
539485fd9e configs: sandbox64: Enable video 16bpp and 24bpp support
Align the sandbox64 defconfig with sandbox defconfig. Enable missing
16bpp and 24bpp video support. This fixes ut_dm_dm_test_video_bmp16
and ut_dm_dm_test_video_bmp24 tests .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
d54c44b474 configs: sandbox64: Enable PINCTRL_SINGLE driver
Align the sandbox64 defconfig with sandbox defconfig. Enable missing
PINCTRL single driver. This fixes ut_dm_dm_test_pinctrl_single test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
2fff2881c8 test: dm: pinmux: Handle %pa in pinctrl-single mux output
The pinctrl-single driver uses %pa to print register value
in its single_get_pin_muxing() output. Handle this properly
in the test based on CONFIG_PHYS_64BIT .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
09c0b2e712 configs: sandbox64: Enable BUTTON_ADC driver
Align the sandbox64 defconfig with sandbox defconfig. Enable missing
BUTTON ADC driver. This fixes ut_dm_dm_test_button_keys_adc test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
226ddc0dcc configs: sandbox64: Enable MC34708 driver
Align the sandbox64 defconfig with sandbox defconfig. Enable missing
MC34708 PMIC driver. This fixes ut_dm_dm_test_power_pmic_mc34708_get test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
49147a0b0d configs: sandbox64: Increase console record size to 0x6000
Align the sandbox64 defconfig with sandbox defconfig. Increase the
console record size. This fixes ut_bootstd_bootflow_cmd_scan_e .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:27 -06:00
Marek Vasut
ff547a6bc2 configs: sandbox64: Enable SF bootdev
Align the sandbox64 defconfig with sandbox defconfig. Enable missing
SPI NOT bootdev. This fixes ut_bootstd_bootdev_test_cmd_hunt test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20 15:55:26 -06:00
Tom Rini
17aad80355 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh 2023-08-20 11:09:11 -04:00
Paul Barker
dbada49554 arm: rmobile: Fix off-by-one error in cpuinfo
In rmobile_cpuinfo_idx() there is an off-by-one error in accessing the
rmobile_cpuinfo array.

At the end of the loop, i is equal to the array size, i.e.
rmobile_cpuinfo[i] accesses one entry past the end of the array. The
last entry in the array is a fallback value so the loop should count to
ARRAY_SIZE(rmobile_cpuinfo) - 1 instead, this will leave i equal to the
index of the fallback value if no match is found.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-19 16:34:41 +02:00
Tom Rini
406a5ddf9d Pull request doc-2023-10-rc3-2
Documentation:
 
 * csf_examples: csf.sh: Remove unneeded export ATF_LOAD_ADDR line
 * printf() codes: correct format specifier for unsigned int
 * Fix typos in clk.h, irq.h.
 * Correct description of proftool
 
 Other:
 
 * Quieten test for erofs filesystem presence
 * spl: don't assume NVMe partition 1 exists
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmTgJesACgkQxIHbvCwF
 GsTteA/+OrA4XhmKbR9FPV+8Prwxs+SdRzTxBQ/UTz0UqjreICcpoPlk8ca8oAUa
 Tlg631k+ROdESEj6H7V3Q/pe3iPp9zyXpSAXJjtVxUwJ/C9xJRTwveuOhyNVM8d8
 st5BCfGVA/qrx5dmUw8Nj7QrPCoPpo05hL5X2McTsbGtJupwvzPH4GRCRkro4Zuq
 lVB1yEL2jwyjQ+wUPojQwxcaqYX26T7jHiU+NQz3ZNMhynFhnq9iO2PYMo3d+IIc
 9EiBBDJnACJg/uVam8urLJqn7tbuAroMat6/Unw7lHoAJgoQDjYhD2DnK/cEHIYU
 lIWZrwBeZGDKDSu0NM+FBSPygA9MwnIyLqDjW55qIquDYwms41ElQFeHjmnvAvJX
 8Kq1Souj+VAJzu6CRQOQAgpyBrWvbXMSnzYBVnKNFfwnKco07mR2xIys7CnkKQsA
 /Ig3VG5xaRpQCJ9jG4nGRVqC0/ivNeye7GIB6YbtktZywk1+bOamsf1LrFsqq+/G
 vf5qQvoJcwDtXeDmOAXRz0KEgRXR+Abc4DXexYJ7YDQiUavUv7cCPGUpSS6pP1Jy
 M1l6TgpP0Gk8ZN1I1dCyeEdDSZGgBAXYL8No1K/tC1STsrD/RjNEPyFywOQtzXis
 +iQ/pq+NZaWObN4CEB084Rx632QA8pxJz0ewu8eD/RFfrVZpRhg=
 =d5QR
 -----END PGP SIGNATURE-----

Merge tag 'doc-2023-10-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2023-10-rc3-2

Documentation:

* csf_examples: csf.sh: Remove unneeded export ATF_LOAD_ADDR line
* printf() codes: correct format specifier for unsigned int
* Fix typos in clk.h, irq.h.
* Correct description of proftool

Other:

* Quieten test for erofs filesystem presence
* spl: don't assume NVMe partition 1 exists
2023-08-19 10:13:28 -04:00
Fabio Estevam
951d63000e doc: csf_examples: csf.sh: Remove unneeded export ATF_LOAD_ADDR line
Originally, exporting the ATF_LOAD_ADDR was required, but since binman has
been used to generate the flash.bin, it is no longer needed to do
such manual export.

The ATF address is now passed via binman.

Remove the unneeded export ATF_LOAD_ADDR line.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-08-19 04:12:53 +02:00
Paul Barker
99a4e5865e irq: Fix typo in header comment
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-19 04:12:53 +02:00
Paul Barker
52029b783b clk: Fix typo in header comment
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-19 04:12:53 +02:00
Siddharth Vadapalli
68886a9941 doc: printf() codes: Fix format specifier for unsigned int
The format specifier for the "unsigned int" variable is documented as
"%d". However, it should be "%u". Thus, fix it.

Fixes: f5e9035043 ("doc: printf() codes")
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-19 04:12:52 +02:00
Puhan Zhou
aab60a5128 docs: fix wrong usage of proftool
The usage of proftool in docs is incorrect. If proftool is used without
'-o' argument, it will show the usage like following

$ ./sandbox/tools/proftool -m sandbox/System.map -t trace -f funcgraph dump-ftrace >trace.dat
Must provide trace data, System.map file and output file
Usage: proftool [-cmtv] <cmd> <profdata>

Change '>' to '-o' to fix it.

Signed-off-by: Puhan Zhou <puh4n.zhou@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-19 04:12:52 +02:00
Heinrich Schuchardt
4ad85a9fea spl: don't assume NVMe partition 1 exists
There is no requirement that a partition 1 exists in a partition table.
We should not try to retrieve information about it.

We should not even try reading with partition number
CONFIG_SYS_NVME_BOOT_PARTITION here as this is done in the fs_set_blk_dev()
call anyway.

Fixes: 8ce6a2e175 ("spl: blk: Support loading images from fs")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-19 04:12:52 +02:00
Simon Glass
97f4bc372f fs/erofs: Quieten test for filesystem presence
At present listing a partition produces lots of errors about this
filesystem:

   => part list mmc 4
   cannot find valid erofs superblock
   cannot find valid erofs superblock
   cannot read erofs superblock: -5
   [9 more similar lines]

Use debugging rather than errors when unable to find a signature, as is
done with other filesystems.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-19 04:12:52 +02:00
Tom Rini
3881c9fbb7 Merge branch '2023-08-18-assorted-updates' into next
- Use built-in ffs/fls on ARM, fix a PIE issue in SPL on ARMv8, bcm283x
  and mediatek updates, whitespace fix in UFS uclass, make CI use
  "tools-only" defconfig for more tests, add TI TCA9554 GPIO support,
  cache alignment fix for SCSI, and fix a problem with
  SYS_MMCSD_RAW_MODE_ARGS_SECTOR in SPL.
2023-08-18 13:45:58 -04:00
Jonas Karlman
e34efcf51d rockchip: rk3566-anbernic-rgxx3: Rename defconfig to include SoC name
Rename defconfig to include SoC name, use similar pattern as other
RK356x boards: <soc>-<name>.dts -> <name>-<soc>_defconfig

Suggested-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-18 10:25:03 -04:00
Tom Rini
2d8e7ac320 ARM: tegra: Changes for v2023.10-rc1
This adds support for various new Tegra30 boards (ASUS, LG and HTC) and
 has some other minor enhancements, such as enabling the poweroff command
 on several Tegra210 and Tegra186 boards.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmTfWrITHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoYPFD/9hw40HjaAXf6cD960HWSlcGuNOIV99
 A9JoSgHipCuhACr0z7s4MpbATjEgknZUblJNiVdhzCWAgW3Spy9JpSxMyKlpqdiH
 7Z971DuaXFX9ZCilX9g6whZI/RDglpUEjt3cb4PWrznM6dpKA73voizo+czBeXd7
 AhxTN/2I89VLz75RyR+X41bLLK1VuGND+uGHz/DDbpMXEW8gVRtZ8gnJPeR4zg1y
 EUacNFc+PVjghMFZGmClnw0pXkq2akKp5cJ/A+11aa/Q7FII63v5/Np79kDtnUje
 GPSdg4yqSr1ZE/6qK0qV58B2KKHfeg+6GC47s46KjzaUwL4De64zHtCt6t37zz8y
 hngeeR5SYIKR8HkpXKM8DsMv0D1WciP2awggFPaPF802H/5GMVCnEFITmuFlOuAe
 Q1lg2acywMo2NFINMOONuQahGIJZORpm2VMonMhlesyAuc89quslt/iYSAoV9E4/
 Pt1AqgeOpUh5I236EygJJ11V2BAXkwzR6RazFDr3AHCqB9iFW/UNS1Y7A1pXwKYN
 IVUWU8xkuYYSyxeGwuIrTj/JdQhwfO0jn+xn5g+rUPWNP5n4FJ2oBVPOInfEpled
 k0HgxcGK6Z0hBCwd6/t03QQJWD47/r5jAd9x1eLRFWYV8ivl2Acvm+MlkPx81weG
 E1h7UKdfvTZcDw==
 =Bzgn
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-2023.10-rc1' of https://source.denx.de/u-boot/custodians/u-boot-tegra

ARM: tegra: Changes for v2023.10-rc1

This adds support for various new Tegra30 boards (ASUS, LG and HTC) and
has some other minor enhancements, such as enabling the poweroff command
on several Tegra210 and Tegra186 boards.
2023-08-18 10:05:04 -04:00
Tom Rini
48f792e31b CI: Switch to tools-only from sandbox_spl for tooling tests
When running tools for various tests use the tools-only build rather
than sandbox_spl.  We used sandbox_spl here for historical reasons that
are no longer true.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-17 16:39:20 -04:00
Elena Popa
86b1aad541 spl: mmc: Fix check of CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR
When Falcon Mode is enabled, SPL needs to check the value of
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR. Unfortunately, it was using the
CONFIG_VAL(SYS_MMCSD_RAW_MODE_ARGS_SECTOR) which converts it into
CONFIG_SPL_SYS_MMCSD_RAW_MODE_ARGS_SECTOR when CONFIG_SPL_BUILD is
enabled. CONFIG_SPL_SYS_MMCSD_RAW_MODE_ARGS_SECTOR does not exist in
common/spl/Kconfig. Replaced with
defined(CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR).

Signed-off-by: Elena Popa <elena.popa@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-17 16:39:20 -04:00
Marek Vasut
02660defdc scsi: Cache align temporary buffer
The temporary buffer may be passed to DMA capable device,
make sure it is cache aligned.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-17 16:39:20 -04:00
Marek Vasut
4b316f1e67 gpio: pca953x: Add TI TCA9554 support
Add support for TI TCA9554, which is compatible with PCA9554 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-17 16:39:20 -04:00
Marek Vasut
e4e01f8066 ufs: cdns: Drop extra space
Drop extra space before UCLASS. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-17 16:39:20 -04:00
Frank Wunderlich
44bab4366f arm: mediatek: add usb support for MT7988
MT7988 has a t-phy and an x-phy controller. There is already a driver for
t-phy so we can add USB support for this phy type.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
2023-08-17 16:39:20 -04:00
Frank Wunderlich
3139a77c60 arm: dts: mediatek: convert gmac link mode to 2500base-x for r3
Ethernet on Bananapi-r3 is broken after

commit bd70f3cea3 ("net: mediatek: add support for SGMII 1Gbps auto-negotiation mode")

because changes from this commit were not applied to bpi-r3 devicetree too:

commit aef54ea16c ("arm: dts: medaitek: convert gmac link mode to 2500base-x")

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
2023-08-17 16:39:20 -04:00
Naveen Kumar Chaudhary
ea8ddb7e7c arm: bcm283x undefined reference to "print_cpuinfo"
Builds for Raspberry Pi targets fail when CONFIG_DISPLAY_CPUINFO is
enabled and following error can be seen -
common/board_f.o:(.rodata.init_sequence_f+0x90):
    undefined reference to `print_cpuinfo'

Added implementation of function "print_cpuinfo"

Signed-off-by: Naveen Kumar Chaudhary <naveenchaudhary2010@hotmail.com>
2023-08-17 16:39:20 -04:00
Kevin Chen
fe85863086 armv8: Skip PIE in SPL due to load alignment fault.
When PIE is enabled in start.S, u-boot/-spl use __rel_dyn_start
and _rel_dyn_end symbol to be loaded to and executed at a
different address than it was linked at.

u-boot-spl.lds is used in SPL build, but relocation information
section(.rela*) were discarded.
In line number 80 in arch/arm/cpu/armv8/u-boot-spl.lds
 /DISCARD/ : { *(.rela*) }

If PIE enabled in SPL, __rel_dyn_start which is defined as
.rel_dyn_start in sections.c will be apended to the end of
.bss section.

In our ASPEED case, size of .bss section would let .rel_dyn_start
without 8-byte alignment, leading to alignment fault when
executing ldp instuction in pie_fix_loop.

Signed-off-by: Kevin Chen <kevin_chen@aspeedtech.com>
2023-08-17 16:39:20 -04:00
Sean Anderson
726a802fda arm: Use builtins for ffs/fls
Since ARMv5, the clz instruction allows for efficient implementation of
ffs/fls with builtins. Until ARMv7 (with Thumb-2), this instruction is
only available in ARM mode. LTO makes it difficult to force specific
functions to be in ARM mode, as it is effectively a form of very
aggressive inlining. To work around this, fls/ffs are implemented in
assembly for ARMv5 and ARMv6 when compiling U-Boot in Thumb mode.
Overall, this saves around 75 bytes per call.

This code is synced with v5.15 of the Linux kernel.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-17 16:39:20 -04:00
Tom Rini
14ba0a8bbc Merge branch '2023-08-17-ti-k3-am64-dt-resync' into next
To quote the author:

This series syncs AM64 DT files from Linux v6.5-rc1.

Tested on AM642-EVM GP SR1.0 and AM642-SK-EVM HS-FS SR2.0.
2023-08-17 15:19:04 -04:00
Roger Quadros
01f573eb88 arm: dts: k3-am64: Sync DT with Linux v6.5-rc1
Sync all am642-evm/am642-sk related DT files
with Linux v6.5-rc1.

- drop timer1 in favor of main_timer0 in am64-main.dtsi.
Need to delete clock & power domain properties of
main_timer1 in -r5.dts else won't boot. This is because
timer_init is done during rproc_start to start System Firmware,
but we can't do any clock/power-domain operations before
System Firmware starts.
- same constraint applies to main_uart0
- drop cpsw3g custom DT property 'mac_efuse' and custom
DT node cpsw-phy-sel as driver picks these from standard
property/node.
- include board dts file in -r5 dts file to avoid duplication
of nodes. Include -u-boot.dtsi on top.
- drop duplicate nodes in -r5 dts and -u-boot.dtsi

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Tested-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2023-08-17 15:10:01 -04:00
Roger Quadros
4bf49bade1 doc: board: ti: am64: Add boot flow diagram
Add documenatation and boot flow diagram for AM64 EVM/SoC.

Suggested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: Nishanth Menon <nm@ti.com> #SK-AM64B
2023-08-17 15:10:01 -04:00
Roger Quadros
3fd4410f69 Revert "ARM: dts: k3-am642-sk-u-boot: add PMIC node"
This reverts commit 28a4c31134.

This node should be in the board DT file and should come from upstream.
Moreover, this PMIC is no present on all variants of am642-sk
and will need a separate board DT file.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: Nishanth Menon <nm@ti.com> #SK-AM64B
2023-08-17 15:08:46 -04:00