summaryrefslogtreecommitdiff
path: root/components/drivers/core/platform_ofw.c
AgeCommit message (Collapse)Author
7 days[ARCH/RISC-V] Next RISC-V (#10320)GUI
* [libcpu][risc-v] Refactor the RISC-V architecture port Introduce an opt-in unified RISC-V common layer for RV32 and RV64 while keeping existing BSPs on the legacy implementation during migration. - use ARCH_RISCV and ARCH_CPU_64BIT for architecture and XLEN selection - unify context, trap, MMU, cache, timer, SBI, SMP and ISA handling - add PLIC, CLIC, ACLINT, APLIC and IMSIC support - map physical hart IDs to contiguous logical CPU IDs - add T-Head vendor overrides while preserving legacy ports - migrate qemu-virt64-riscv with RV32 and RV64 support - update clock_time, MM, LWP, OFW, PCI and Rust integration Existing BSPs continue using legacy_common or common64 unless they select RT_USING_RISCV_NEW_COMMON. Signed-off-by: GuEe-GUI <[email protected]> * [libcpu][risc-v] skip disabled CPU nodes in early FDT walk Rbb666 noted that rt_hw_fdt_install_early() walked every /cpus child without checking status, so disabled cores still joined hart registration and MMU capability probing. Skip nodes that are not okay/ok via rt_fdt_device_is_available() before reading reg or mmu-type. Signed-off-by: seteiro <[email protected]> * [libcpu][risc-v] Fix per-CPU page table mapping - reuse existing non-leaf page table entries when mapping per-CPU areas - reject leaf entry conflicts instead of overwriting mappings Signed-off-by: GuEe-GUI <[email protected]> --------- Signed-off-by: GuEe-GUI <[email protected]> Signed-off-by: seteiro <[email protected]> Co-authored-by: seteiro <[email protected]>
2026-08-03[dm][core] Add rt_bus_probe_device APIGuEe-GUI
Add rt_bus_probe_device() to retry driver matching for a registered but unbound device. Use it when an OFW-created platform device is requested again, while preserving native-bus ownership for I2C, SPI, and other non-platform devices. Also instantiate eligible child platform devices after a parent node is registered. Signed-off-by: GuEe-GUI <[email protected]>
2026-01-20[drivers] Fix OFW bus conflict and prevent duplicate device creationlhxj
Problem: When enumerating device tree nodes, platform bus and native buses (I2C/SPI) may create duplicate devices for the same OFW node, causing cross-bus conflicts. This triggers assertion failure '(dev->bus != new_bus)' in rt_bus_reload_driver_device() during boot on minimal DM-enabled systems. Root Cause: 1. Platform bus tries to reload devices that already belong to other buses by calling rt_bus_reload_driver_device(dev->bus, dev), which violates the API contract (requires dev->bus != new_bus). 2. Native buses (I2C/SPI) do not mark OFW nodes as occupied, so platform bus creates duplicate platform devices for I2C/SPI client nodes. Solution: 1. components/drivers/core/platform_ofw.c: Return RT_EOK when np->dev exists, letting the native bus handle device lifecycle instead of cross-bus reload. 2. components/drivers/i2c/dev_i2c_bus.c: Mark i2c_client_np->dev during scan to prevent platform bus from duplicating I2C client devices. 3. components/drivers/spi/dev_spi_bus.c: Mark spi_dev_np->dev during scan to prevent platform bus from duplicating SPI devices. Tested on Spacemit K1 RISC-V platform with minimal DM configuration. Signed-off-by: lhxj <[email protected]>
2025-12-13[dm][core] Update the OFW CLk init flowGuEe-GUI
The clock should init before common platform devices. Signed-off-by: GuEe-GUI <[email protected]>
2025-03-19[DM/Platform] Fixup the node will probe more than onceGUI
If a node request a new node or it's parent node. the request's node will probe a double time. So we check the device object of node in ofw probe entry and ofw probe child exit.
2024-11-18[DM/FEATURE] Support clock subprobe in OFWGuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2024-11-18[DM/FEATURE] Support driver depends fix autoGuEe-GUI
We need a API to fix the driver load auto when a second driver get it in probe process that we can not be careful of the driver-to-driver's depends in different SoC. Signed-off-by: GuEe-GUI <[email protected]>
2024-09-03Fixup platform not free device in OFWGuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2024-08-09fix rt_atomic_dec_and_testzhao maosheng
2024-05-30[Feature] Support simple power domain API (#9005)GUI
* [Feature] Power domain for device 1.Support device power on/off. 2.Support attach/detach device. 3.Support power domain driver api. Signed-off-by: GuEe-GUI <[email protected]> * [DM/platform] Enhanced platform bus 1.Add power domain for device. 2.Support `remove` and `shutdown` bus interface. Signed-off-by: GuEe-GUI <[email protected]> --------- Signed-off-by: GuEe-GUI <[email protected]>
2024-01-09[drivers][core] 完善设备模型 (#8384)fangjianzhou
2023-07-13【dd2.0】Support the Core API for dd2.0 (#7791)ErikChanHub