lhxj
7641ef6885
[drivers] Fix OFW bus conflict and prevent duplicate device creation
...
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
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 <2743257167@qq.com >
2026-01-20 22:05:28 +08:00
GuEe-GUI
4913211409
[dm][core] add common machine power interface
...
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-12-16 11:35:35 +08:00
GuEe-GUI
cbf3f8c3b4
[dm][core] Update the OFW CLk init flow
...
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
ToolsCI / Tools (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
The clock should init before common platform devices.
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-12-13 16:35:32 +08:00
GUI
1b4111a99e
[dm][pinctrl] Set pinctrl default auto in platform bus. ( #11052 )
...
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-12-13 16:33:05 +08:00
GuEe-GUI
6270b2f97c
[dm][core] Set default CLK config for platform device probe
...
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-12-12 13:33:28 +08:00
GuEe-GUI
056ae364cb
[dm][core] add new API for DM
...
1. rt_dm_dev_is_big_endian
2. rt_dm_dev_get_prop_fuzzy_name
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-12-09 21:04:16 +08:00
GuEe-GUI
c857e03544
[dm][core] fixup the rt_dm_dev_prop_read_u8_array_index OFW check
...
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-12-09 21:04:16 +08:00
GuEe-GUI
7357abdc37
[dm][core] cleanup format
...
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-12-09 21:04:16 +08:00
Chuan
ee20484759
docs(utest):Add standardized documentation for Drivers Core Test
...
Signed-off-by: ChuanN-sudo <fjchuanil@gmail.com >
2025-11-16 10:28:46 +08:00
Chen Wang
c1363c77d6
utest: Improve the strings displayed in the menu
...
Use "Test" instead of "Unit Testcases" to make string shorter.
Use uppercase to make it look more eye-catching.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com >
2025-10-16 18:34:43 +08:00
Chen Wang
01e015450f
utest: move driver related case under to drivers
...
ToolsCI / Tools (push) Has been cancelled
AutoTestCI / components/cpp11 (push) Has been cancelled
AutoTestCI / kernel/atomic (push) Has been cancelled
AutoTestCI / kernel/atomic/riscv64 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11/riscv64 (push) Has been cancelled
AutoTestCI / kernel/device (push) Has been cancelled
AutoTestCI / kernel/ipc (push) Has been cancelled
AutoTestCI / kernel/irq (push) Has been cancelled
AutoTestCI / kernel/mem (push) Has been cancelled
AutoTestCI / kernel/mem/riscv64 (push) Has been cancelled
AutoTestCI / kernel/thread (push) Has been cancelled
AutoTestCI / kernel/timer (push) Has been cancelled
AutoTestCI / rtsmart/aarch64 (push) Has been cancelled
AutoTestCI / rtsmart/arm (push) Has been cancelled
AutoTestCI / rtsmart/riscv64 (push) Has been cancelled
AutoTestCI / components/utest (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :dfs/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/object.cfg (push) Has been cancelled
utest_auto_run / A9 :lwip/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :netdev/netdev.cfg (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
src/utest/device_tc.c is testing API: rt_device_find(),
which is a function defined in components/drivers/core/device.c.
So it should be a testcase for drivers core, not for core.
Move it to under components/drivers/core.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com >
2025-09-26 16:53:44 +08:00
Bernard Xiong
d1628a1cf3
[dfs] enable procfs and tempfs in default when using smart; fix LWIP_ROUTE warning issue.
2025-05-20 17:27:55 +08:00
GUI
fc86cb9427
[DM/Platform] Fixup the node will probe more than once
...
pkgs_test / change (push) Has been skipped
AutoTestCI / components/cpp11 (push) Has been cancelled
AutoTestCI / kernel/atomic (push) Has been cancelled
AutoTestCI / kernel/atomic/riscv64 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11/riscv64 (push) Has been cancelled
AutoTestCI / kernel/device (push) Has been cancelled
AutoTestCI / kernel/ipc (push) Has been cancelled
AutoTestCI / kernel/irq (push) Has been cancelled
AutoTestCI / kernel/mem (push) Has been cancelled
AutoTestCI / kernel/mem/riscv64 (push) Has been cancelled
AutoTestCI / kernel/thread (push) Has been cancelled
AutoTestCI / kernel/timer (push) Has been cancelled
AutoTestCI / rtsmart/aarch64 (push) Has been cancelled
AutoTestCI / rtsmart/arm (push) Has been cancelled
AutoTestCI / rtsmart/riscv64 (push) Has been cancelled
AutoTestCI / components/utest (push) Has been cancelled
RT-Thread BSP Static Build Check / ESP32C3 (push) Has been cancelled
RT-Thread BSP Static Build Check / Infineon_TI_microchip (push) Has been cancelled
RT-Thread BSP Static Build Check / RT-Thread Online Packages (STM32F407 RT-Spark) (push) Has been cancelled
RT-Thread BSP Static Build Check / RTduino/Arduino Libraries (Raspberry Pico) (push) Has been cancelled
RT-Thread BSP Static Build Check / RTduino/Arduino Libraries (STM32F412 Nucleo) (push) Has been cancelled
RT-Thread BSP Static Build Check / aarch64 (push) Has been cancelled
RT-Thread BSP Static Build Check / at32_hc32_ht32 (push) Has been cancelled
RT-Thread BSP Static Build Check / gd32_n32_apm32 (push) Has been cancelled
RT-Thread BSP Static Build Check / hpmicro (push) Has been cancelled
RT-Thread BSP Static Build Check / i386-unknown (push) Has been cancelled
RT-Thread BSP Static Build Check / llvm-arm (push) Has been cancelled
RT-Thread BSP Static Build Check / mips (push) Has been cancelled
RT-Thread BSP Static Build Check / nordic(yml) (push) Has been cancelled
RT-Thread BSP Static Build Check / nuvoton (push) Has been cancelled
RT-Thread BSP Static Build Check / nxp_renesas (push) Has been cancelled
RT-Thread BSP Static Build Check / others_ft32_mm32_acm32 (push) Has been cancelled
RT-Thread BSP Static Build Check / riscv-none (push) Has been cancelled
RT-Thread BSP Static Build Check / riscv64-unknown (push) Has been cancelled
RT-Thread BSP Static Build Check / simulator (push) Has been cancelled
RT-Thread BSP Static Build Check / stm32_f2_f4 (push) Has been cancelled
RT-Thread BSP Static Build Check / stm32_f7_g0_h7_mp15_u5_h5_wb5 (push) Has been cancelled
RT-Thread BSP Static Build Check / stm32f0_f1 (push) Has been cancelled
RT-Thread BSP Static Build Check / stm32l4 (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
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.
2025-03-19 09:46:48 +08:00
GuEe-GUI
f506076281
[DM] Replace spinlock static init by RT_DEFINE_SPINLOCK
...
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-02-11 14:58:18 +08:00
yuqingli05
d57b7cb40a
修复编译过程中的 DFS_V2报错、FAL警告
2025-01-01 19:02:50 -05:00
GuEe-GUI
6185250c86
[DM/FEATURE] Support clock subprobe in OFW
...
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2024-11-18 15:03:23 +08:00
GuEe-GUI
cefe6d6380
[DM/FEATURE] Support driver depends fix auto
...
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 <2991707448@qq.com >
2024-11-18 15:03:23 +08:00
GuEe-GUI
b6f67285e9
[DM/FIXUP] remove OFW switch macros
...
The drivers will support OFW and name probe both.
We should make build OK when OFW is disable.
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2024-11-18 15:03:23 +08:00
GuEe-GUI
3b22dbd049
[DM/FEATURE] DM Device IDA management
...
Drivers can manage their own IDs without having to concern
themselves with the register/unregister in system
Link: https://github.com/RT-Thread/rt-thread/issues/9534
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2024-11-18 14:23:25 +08:00
milo
2a8aba4c8b
[fix]:fix log format and reopen with a different oflag issue ( #9452 )
...
fix log format and reopen with a different oflag issue
2024-09-19 18:15:55 +08:00
GuEe-GUI
175a2ff954
Fixup platform not free device in OFW
...
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2024-09-03 19:49:47 -04:00
GuEe-GUI
2ec69c3ce4
Fixup bus remove device option
...
The bus should call driver's `remove` callback not
instead of `shutdown` in rt_bus_remove_device.
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2024-09-03 19:49:47 -04:00
Yaochenger
7469edd165
[fix][device] 修正使用rt_device_create创建设备,使用rt_device_destroy删除失败的问题
2024-09-03 18:24:45 -04:00
zhao maosheng
f543160ead
fix rt_atomic_dec_and_test
2024-08-09 12:54:10 +08:00
Rui
3b1d4e9222
fix Compilation error in "driver.c", "completion_up.c", "syslog.c" and "dlmodule.c". ( #9093 )
2024-06-26 23:25:23 +08:00
zms123456
b785ef9ed7
[libcpu][aarch64]memory setup using memblock ( #9092 )
...
* memory setup using memblock
* map pages later
2024-06-26 14:36:49 +08:00
sp-cai
f1832fea24
[components] [drivers ] [Kconfig] 整理 components/drivers 的 Kconfig ( #9054 )
...
整理 components/drivers 的 Kconfig
2024-06-16 15:43:27 +08:00
GUI
e7cddf3a52
[Feature] Support simple power domain API ( #9005 )
...
* [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 <2991707448@qq.com >
* [DM/platform] Enhanced platform bus
1.Add power domain for device.
2.Support `remove` and `shutdown` bus interface.
Signed-off-by: GuEe-GUI <2991707448@qq.com >
---------
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2024-05-30 15:30:40 +08:00
GUI
6f6b0c3ba0
[DM/feature] Simple NUMA (Non-Uniform Memory Access) ( #9000 )
...
For some CPU memory access devices, that the drivers
will find memory and CPU affinity to config device.
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2024-05-28 14:08:33 +08:00
GUI
754c59a411
[Feature] DFS mount auto by kernel parameters ( #8989 )
...
DFS mount auto by kernel parameters
1.Mount the rootfs options by parameters:
- root=: root device, like vda1, sda1, sd0p1, nvme0n0p1...
- rootfstype=: root file system type, like elm, ext, crom...
- rw/ro: root is readonly or all enable, if not have 'rw' flag,
the 'ro' flag is default.
- rootwait: always wait for root device status is OK.
- rootdelay=: mount rootfs delay amount of time (millisecond).
2.Mount the other fs options by `fstab.sh`, it will read the script
after root mount is OK, it's format is a list of mount cmds in MSH:
mount vda2 /mnt elm
mount 192.168.1.1:/ /mnt/remote nfs
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2024-05-28 00:26:57 +08:00
Shell
83e95bdff4
sync smart & dfs ( #8672 )
...
Signed-off-by: xqyjlj <xqyjlj@126.com >
Signed-off-by: Shell <smokewood@qq.com >
Co-authored-by: xqyjlj <xqyjlj@126.com >
2024-03-28 23:42:56 +08:00
Shell
3237efd089
fixup d1s ( #8671 )
...
Signed-off-by: Shell <smokewood@qq.com >
2024-03-25 20:29:56 +08:00
zms123456
195f94ef1d
[components][drivers]add pic-gic ( #8388 )
2024-02-29 09:39:56 +08:00
fangjianzhou
10b16273b8
[drivers][core] 完善设备模型 ( #8384 )
2024-01-09 23:10:42 +08:00
Meco Man
589641258e
[debug] rename RT_DEBUGING_INIT as RT_DEBUGING_AUTO_INIT
2023-11-10 05:24:33 -05:00
zms123456
d01dd05a0c
[kernel][dm]适配新的设备驱动模型 ( #8075 )
2023-10-18 20:50:30 +08:00
Man, Jianting (Meco)
244b903e5d
[debug] 整理debug宏并增加RT_DEBUGING_CONTEXT ( #7805 )
2023-07-22 10:36:42 +08:00
ErikChanHub
2f5e4ac27e
【dd2.0】Support the Core API for dd2.0 ( #7791 )
2023-07-13 14:49:35 +08:00
wusongjie
179157f4e1
Components/drivers: support DM device id management
...
We add the device name and id set api in DM, now driver
could set name like sprintf without know how many devices
it is.
The misc.h and byteorder.h add some macros to developers
that they always use in drivers.
Signed-off-by: GuEe-GUI <GuEe-GUI@github.com >
2023-07-04 13:55:07 +08:00
Shicheng Chu
e2c031643c
[include][dbg]update: no longer use RT_DEBUG_LOG in rtdebug.h ( #7750 )
2023-06-29 11:24:25 -04:00
Bernard Xiong
e3f068f058
[DeviceDrivers] prepare for device driver v2.0 ( #7697 )
2023-06-22 14:16:03 +08:00