From 000887795f935b6088c9172c03e51420d4589a15 Mon Sep 17 00:00:00 2001 From: shaojinchun Date: Mon, 27 Aug 2018 15:37:08 +0800 Subject: Move configs of VBUS to Kconfig, delete related head files in the bsp directory --- components/vbus/Kconfig | 50 ++++++++++++++++++++++++++++++++++++ components/vbus/share_hdr/vbus_api.h | 2 -- components/vbus/vbus.h | 1 - 3 files changed, 50 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/vbus/Kconfig b/components/vbus/Kconfig index af58f78624..d1b38ec90f 100644 --- a/components/vbus/Kconfig +++ b/components/vbus/Kconfig @@ -18,6 +18,56 @@ if RT_USING_VBUS help When enable remote shell, the finsh/msh of RT-Thread can be operated from another Operating System. + + config RT_VBUS_USING_FLOW_CONTROL + bool "Enable flow control on VBUS " + default n + help + Enable manage the rate of data transmission + + config RT_VBUS_USING_TESTS + bool "Enable tests on VBUS " + default n + + config _RT_VBUS_RING_BASE + hex "VBUS address" + help + VBUS ring buffer physical address. + + config _RT_VBUS_RING_SZ + int "VBUS ring size" + help + VBUS size of the ring buffer. + + config RT_VMM_RB_BLK_NR + int "RT_VMM_RB_BLK_NR" + help + Number of ring buffer. + + config RT_VBUS_GUEST_VIRQ + int "RT_VBUS_GUEST_VIRQ" + help + RT_VBUS_GUEST_VIRQ + help + The interrupt number used to notify the client on a particular system. + + config RT_VBUS_HOST_VIRQ + int "RT_VBUS_HOST_VIRQ" + help + The interrupt be triggered on a particular system when the client notify the host. + + config RT_VBUS_SHELL_DEV_NAME + string "RT_VBUS_SHELL_DEV_NAME" + default "vbser0" + help + The name of the UBUS shell device. + + config RT_VBUS_RFS_DEV_NAME + string "RT_VBUS_RFS_DEV_NAME" + default "rfs" + help + The name of the UBUS rfs device. + endif endmenu diff --git a/components/vbus/share_hdr/vbus_api.h b/components/vbus/share_hdr/vbus_api.h index fb15fa24b0..71fd4165c3 100644 --- a/components/vbus/share_hdr/vbus_api.h +++ b/components/vbus/share_hdr/vbus_api.h @@ -1,8 +1,6 @@ #ifndef __VBUS_API_H__ #define __VBUS_API_H__ -#include "vbus_conf.h" - #define RT_VBUS_CHANNEL_NR 32 #define RT_VBUS_BLK_HEAD_SZ 4 diff --git a/components/vbus/vbus.h b/components/vbus/vbus.h index 2187773a47..a5fd33130b 100644 --- a/components/vbus/vbus.h +++ b/components/vbus/vbus.h @@ -30,7 +30,6 @@ * 2015-01-06 Grissiom version 2.0.3; API change, no functional changes */ -#include "vbus_local_conf.h" #include int rt_vbus_init(void *outr, void *inr); -- cgit v1.3.1 From 84e8c6568337fee7f6daa936cb1b822c1154b4e6 Mon Sep 17 00:00:00 2001 From: shaojinchun Date: Mon, 27 Aug 2018 18:15:38 +0800 Subject: RT_VMM_RB_BLK_NR now is calculated from _RT_VBUS_RING_SZ --- bsp/qemu-vexpress-gemini/.config | 1 - bsp/qemu-vexpress-gemini/rtconfig.h | 1 - components/vbus/Kconfig | 5 ----- components/vbus/share_hdr/vbus_api.h | 2 ++ 4 files changed, 2 insertions(+), 7 deletions(-) (limited to 'components') diff --git a/bsp/qemu-vexpress-gemini/.config b/bsp/qemu-vexpress-gemini/.config index 572f15f786..a403198e78 100644 --- a/bsp/qemu-vexpress-gemini/.config +++ b/bsp/qemu-vexpress-gemini/.config @@ -183,7 +183,6 @@ CONFIG_RT_VBUS_USING_FLOW_CONTROL=y CONFIG_RT_VBUS_USING_TESTS=y CONFIG__RT_VBUS_RING_BASE=0x6f800000 CONFIG__RT_VBUS_RING_SZ=2097152 -CONFIG_RT_VMM_RB_BLK_NR=32767 CONFIG_RT_VBUS_GUEST_VIRQ=14 CONFIG_RT_VBUS_HOST_VIRQ=15 CONFIG_RT_VBUS_SHELL_DEV_NAME="vbser0" diff --git a/bsp/qemu-vexpress-gemini/rtconfig.h b/bsp/qemu-vexpress-gemini/rtconfig.h index d0c93855aa..a5b23d1604 100644 --- a/bsp/qemu-vexpress-gemini/rtconfig.h +++ b/bsp/qemu-vexpress-gemini/rtconfig.h @@ -166,7 +166,6 @@ #define RT_VBUS_USING_TESTS #define _RT_VBUS_RING_BASE 0x6f800000 #define _RT_VBUS_RING_SZ 2097152 -#define RT_VMM_RB_BLK_NR 32767 #define RT_VBUS_GUEST_VIRQ 14 #define RT_VBUS_HOST_VIRQ 15 #define RT_VBUS_SHELL_DEV_NAME "vbser0" diff --git a/components/vbus/Kconfig b/components/vbus/Kconfig index d1b38ec90f..c1afca994f 100644 --- a/components/vbus/Kconfig +++ b/components/vbus/Kconfig @@ -39,11 +39,6 @@ if RT_USING_VBUS help VBUS size of the ring buffer. - config RT_VMM_RB_BLK_NR - int "RT_VMM_RB_BLK_NR" - help - Number of ring buffer. - config RT_VBUS_GUEST_VIRQ int "RT_VBUS_GUEST_VIRQ" help diff --git a/components/vbus/share_hdr/vbus_api.h b/components/vbus/share_hdr/vbus_api.h index 71fd4165c3..3ad2a9ae68 100644 --- a/components/vbus/share_hdr/vbus_api.h +++ b/components/vbus/share_hdr/vbus_api.h @@ -6,6 +6,8 @@ #define RT_VBUS_BLK_HEAD_SZ 4 #define RT_VBUS_MAX_PKT_SZ (256 - RT_VBUS_BLK_HEAD_SZ) +#define RT_VMM_RB_BLK_NR (_RT_VBUS_RING_SZ / 64 - 1) + #ifndef __ASSEMBLY__ #include /* For size_t */ -- cgit v1.3.1 From 03cd2c005d77aae6d0e8aa78fd8b2fd5f45f55e6 Mon Sep 17 00:00:00 2001 From: shaojinchun Date: Mon, 27 Aug 2018 18:33:03 +0800 Subject: Add the definition of RT_VBUS_USING_FLOW_CONTROL to vbus_api.h --- bsp/qemu-vexpress-gemini/.config | 1 - bsp/qemu-vexpress-gemini/rtconfig.h | 1 - components/vbus/Kconfig | 6 ------ components/vbus/share_hdr/vbus_api.h | 2 ++ 4 files changed, 2 insertions(+), 8 deletions(-) (limited to 'components') diff --git a/bsp/qemu-vexpress-gemini/.config b/bsp/qemu-vexpress-gemini/.config index a403198e78..02c5ee7d12 100644 --- a/bsp/qemu-vexpress-gemini/.config +++ b/bsp/qemu-vexpress-gemini/.config @@ -179,7 +179,6 @@ CONFIG_RT_USING_POSIX=y CONFIG_RT_USING_VBUS=y # CONFIG_RT_USING_VBUS_RFS is not set # CONFIG_RT_USING_VBUS_RSHELL is not set -CONFIG_RT_VBUS_USING_FLOW_CONTROL=y CONFIG_RT_VBUS_USING_TESTS=y CONFIG__RT_VBUS_RING_BASE=0x6f800000 CONFIG__RT_VBUS_RING_SZ=2097152 diff --git a/bsp/qemu-vexpress-gemini/rtconfig.h b/bsp/qemu-vexpress-gemini/rtconfig.h index a5b23d1604..a1dcba1248 100644 --- a/bsp/qemu-vexpress-gemini/rtconfig.h +++ b/bsp/qemu-vexpress-gemini/rtconfig.h @@ -162,7 +162,6 @@ #define RT_USING_VBUS /* RT_USING_VBUS_RFS is not set */ /* RT_USING_VBUS_RSHELL is not set */ -#define RT_VBUS_USING_FLOW_CONTROL #define RT_VBUS_USING_TESTS #define _RT_VBUS_RING_BASE 0x6f800000 #define _RT_VBUS_RING_SZ 2097152 diff --git a/components/vbus/Kconfig b/components/vbus/Kconfig index c1afca994f..cd30874e38 100644 --- a/components/vbus/Kconfig +++ b/components/vbus/Kconfig @@ -19,12 +19,6 @@ if RT_USING_VBUS When enable remote shell, the finsh/msh of RT-Thread can be operated from another Operating System. - config RT_VBUS_USING_FLOW_CONTROL - bool "Enable flow control on VBUS " - default n - help - Enable manage the rate of data transmission - config RT_VBUS_USING_TESTS bool "Enable tests on VBUS " default n diff --git a/components/vbus/share_hdr/vbus_api.h b/components/vbus/share_hdr/vbus_api.h index 3ad2a9ae68..4425bb448a 100644 --- a/components/vbus/share_hdr/vbus_api.h +++ b/components/vbus/share_hdr/vbus_api.h @@ -1,6 +1,8 @@ #ifndef __VBUS_API_H__ #define __VBUS_API_H__ +#define RT_VBUS_USING_FLOW_CONTROL + #define RT_VBUS_CHANNEL_NR 32 #define RT_VBUS_BLK_HEAD_SZ 4 -- cgit v1.3.1