From d01dd05a0cd2107d85e26a445a43957880fd1978 Mon Sep 17 00:00:00 2001 From: zms123456 <85141075+zmshahaha@users.noreply.github.com> Date: Wed, 18 Oct 2023 20:50:30 +0800 Subject: [kernel][dm]适配新的设备驱动模型 (#8075) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Kconfig | 64 +++++++++++++++++++++------------------------------------- src/SConscript | 3 --- 2 files changed, 23 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/Kconfig b/src/Kconfig index 49fcf256c0..bb93e76bb7 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -25,6 +25,7 @@ config RT_USING_SMART select RT_USING_DFS select RT_USING_LIBC select RT_USING_POSIX_CLOCKTIME + select RT_USING_DEVICE select RT_USING_TTY select RT_USING_NULL select RT_USING_ZERO @@ -382,52 +383,33 @@ menu "Memory Management" default y if RT_USING_USERHEAP endmenu -menu "Kernel Device Object" - - config RT_USING_DEVICE - bool "Using device object" - default y - - config RT_USING_DEVICE_OPS - bool "Using ops for each device object" - default n - - config RT_USING_DM - bool "Enable device driver model with device tree" - default n - help - Enable device driver model with device tree (FDT). It will use more memory - to parse and support device tree feature. - - config RT_USING_DM_FDT - bool "Enablie builtin libfdt" - depends on RT_USING_DM - default y - help - libfdt - Flat Device Tree manipulation. If your code already contains the - libfdt, you can cancel this built-in libfdt to avoid link issue. +config RT_USING_DEVICE + bool "Using device object" + default y - config RT_USING_INTERRUPT_INFO - bool "Enable additional interrupt trace information" - default n - help - Add name and counter information for interrupt trace. +config RT_USING_DEVICE_OPS + bool "Using ops for each device object" + default n - config RT_USING_CONSOLE - bool "Using console for rt_kprintf" - default y +config RT_USING_INTERRUPT_INFO + bool "Enable additional interrupt trace information" + default n + help + Add name and counter information for interrupt trace. - if RT_USING_CONSOLE - config RT_CONSOLEBUF_SIZE - int "the buffer size for console log printf" - default 128 +config RT_USING_CONSOLE + bool "Using console for rt_kprintf" + default y - config RT_CONSOLE_DEVICE_NAME - string "the device name for console" - default "uart" - endif +if RT_USING_CONSOLE + config RT_CONSOLEBUF_SIZE + int "the buffer size for console log printf" + default 128 -endmenu + config RT_CONSOLE_DEVICE_NAME + string "the device name for console" + default "uart" +endif config RT_VER_NUM hex diff --git a/src/SConscript b/src/SConscript index 9d74d6a8e4..7f7098aaab 100644 --- a/src/SConscript +++ b/src/SConscript @@ -30,9 +30,6 @@ if GetDepend('RT_USING_SMP') == False: if GetDepend('RT_USING_SMP') == True: SrcRemove(src, ['scheduler_up.c']) -if GetDepend('RT_USING_DM') == False: - SrcRemove(src, ['driver.c']) - group = DefineGroup('Kernel', src, depend = [''], CPPPATH = inc, CPPDEFINES = ['__RTTHREAD__']) Return('group') -- cgit v1.3.1