From 26d39cd10776fd623bc1152df02231c439d3b050 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 2 Nov 2016 13:07:55 +0200 Subject: [PATCH] Bluetooth: Move controller code to subsys/bluetooth Move controller code from drivers/controller to subsys/bluetooth/controller. Change-Id: I73f675188485aa3267507bad7647796e593a3da0 Signed-off-by: Johan Hedberg --- MAINTAINERS | 2 +- drivers/bluetooth/Kconfig | 2 -- drivers/bluetooth/Makefile | 1 - subsys/bluetooth/Kconfig | 2 ++ subsys/bluetooth/Makefile | 1 + {drivers => subsys}/bluetooth/controller/Kconfig | 0 {drivers => subsys}/bluetooth/controller/Makefile | 6 +++--- {drivers => subsys}/bluetooth/controller/hal/ccm.h | 0 {drivers => subsys}/bluetooth/controller/hal/cpu.h | 0 {drivers => subsys}/bluetooth/controller/hal/debug.h | 0 {drivers => subsys}/bluetooth/controller/hal/ecb.c | 0 {drivers => subsys}/bluetooth/controller/hal/ecb.h | 0 {drivers => subsys}/bluetooth/controller/hal/hal_rtc.h | 0 {drivers => subsys}/bluetooth/controller/hal/hal_work.h | 0 {drivers => subsys}/bluetooth/controller/hal/radio.c | 0 {drivers => subsys}/bluetooth/controller/hal/radio.h | 0 {drivers => subsys}/bluetooth/controller/hal/rand.c | 0 {drivers => subsys}/bluetooth/controller/hal/rand.h | 0 {drivers => subsys}/bluetooth/controller/hal/rtc.c | 0 {drivers => subsys}/bluetooth/controller/hci/hci.c | 0 {drivers => subsys}/bluetooth/controller/hci/hci_driver.c | 2 +- {drivers => subsys}/bluetooth/controller/hci/hci_internal.h | 0 {drivers => subsys}/bluetooth/controller/ll/ctrl.c | 0 {drivers => subsys}/bluetooth/controller/ll/ctrl.h | 0 {drivers => subsys}/bluetooth/controller/ll/ctrl_internal.h | 1 - {drivers => subsys}/bluetooth/controller/ll/ll.c | 0 {drivers => subsys}/bluetooth/controller/ll/ll.h | 0 {drivers => subsys}/bluetooth/controller/ll/pdu.h | 0 {drivers => subsys}/bluetooth/controller/ll/ticker.c | 0 {drivers => subsys}/bluetooth/controller/ll/ticker.h | 0 {drivers => subsys}/bluetooth/controller/util/defines.h | 0 {drivers => subsys}/bluetooth/controller/util/mem.c | 0 {drivers => subsys}/bluetooth/controller/util/mem.h | 0 {drivers => subsys}/bluetooth/controller/util/memq.c | 0 {drivers => subsys}/bluetooth/controller/util/memq.h | 0 {drivers => subsys}/bluetooth/controller/util/util.c | 0 {drivers => subsys}/bluetooth/controller/util/util.h | 0 {drivers => subsys}/bluetooth/controller/util/work.c | 0 {drivers => subsys}/bluetooth/controller/util/work.h | 0 39 files changed, 8 insertions(+), 9 deletions(-) rename {drivers => subsys}/bluetooth/controller/Kconfig (100%) rename {drivers => subsys}/bluetooth/controller/Makefile (70%) rename {drivers => subsys}/bluetooth/controller/hal/ccm.h (100%) rename {drivers => subsys}/bluetooth/controller/hal/cpu.h (100%) rename {drivers => subsys}/bluetooth/controller/hal/debug.h (100%) rename {drivers => subsys}/bluetooth/controller/hal/ecb.c (100%) rename {drivers => subsys}/bluetooth/controller/hal/ecb.h (100%) rename {drivers => subsys}/bluetooth/controller/hal/hal_rtc.h (100%) rename {drivers => subsys}/bluetooth/controller/hal/hal_work.h (100%) rename {drivers => subsys}/bluetooth/controller/hal/radio.c (100%) rename {drivers => subsys}/bluetooth/controller/hal/radio.h (100%) rename {drivers => subsys}/bluetooth/controller/hal/rand.c (100%) rename {drivers => subsys}/bluetooth/controller/hal/rand.h (100%) rename {drivers => subsys}/bluetooth/controller/hal/rtc.c (100%) rename {drivers => subsys}/bluetooth/controller/hci/hci.c (100%) rename {drivers => subsys}/bluetooth/controller/hci/hci_driver.c (99%) rename {drivers => subsys}/bluetooth/controller/hci/hci_internal.h (100%) rename {drivers => subsys}/bluetooth/controller/ll/ctrl.c (100%) rename {drivers => subsys}/bluetooth/controller/ll/ctrl.h (100%) rename {drivers => subsys}/bluetooth/controller/ll/ctrl_internal.h (99%) rename {drivers => subsys}/bluetooth/controller/ll/ll.c (100%) rename {drivers => subsys}/bluetooth/controller/ll/ll.h (100%) rename {drivers => subsys}/bluetooth/controller/ll/pdu.h (100%) rename {drivers => subsys}/bluetooth/controller/ll/ticker.c (100%) rename {drivers => subsys}/bluetooth/controller/ll/ticker.h (100%) rename {drivers => subsys}/bluetooth/controller/util/defines.h (100%) rename {drivers => subsys}/bluetooth/controller/util/mem.c (100%) rename {drivers => subsys}/bluetooth/controller/util/mem.h (100%) rename {drivers => subsys}/bluetooth/controller/util/memq.c (100%) rename {drivers => subsys}/bluetooth/controller/util/memq.h (100%) rename {drivers => subsys}/bluetooth/controller/util/util.c (100%) rename {drivers => subsys}/bluetooth/controller/util/util.h (100%) rename {drivers => subsys}/bluetooth/controller/util/work.c (100%) rename {drivers => subsys}/bluetooth/controller/util/work.h (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 616c38aafd0..20a9403a7fa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -185,7 +185,7 @@ BLUETOOTH CONTROLLER M: Vinayak Chettimada M: Carles Cufi S: Supported -F: drivers/bluetooth/controller/ +F: subsys/bluetooth/controller/ CC3200 SDK M: Gil Pitney diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index 6d38c5755de..ea082456fa8 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig @@ -28,8 +28,6 @@ source "drivers/bluetooth/hci/Kconfig" source "drivers/bluetooth/nble/Kconfig" -source "drivers/bluetooth/controller/Kconfig" - config BLUETOOTH_NRF51_PM bool "nRF51 Power Management [EXPERIMENTAL]" depends on BLUETOOTH_H4 || NBLE diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile index ebb0303b69c..bf61e4ec098 100644 --- a/drivers/bluetooth/Makefile +++ b/drivers/bluetooth/Makefile @@ -1,4 +1,3 @@ obj-y += hci/ obj-$(CONFIG_NBLE) += nble/ obj-$(CONFIG_BLUETOOTH_NRF51_PM) += nrf51_pm.o -obj-$(CONFIG_BLUETOOTH_CONTROLLER) += controller/ diff --git a/subsys/bluetooth/Kconfig b/subsys/bluetooth/Kconfig index 4b5d4e742cc..975a1d5f20c 100644 --- a/subsys/bluetooth/Kconfig +++ b/subsys/bluetooth/Kconfig @@ -16,3 +16,5 @@ # source "subsys/bluetooth/host/Kconfig" + +source "subsys/bluetooth/controller/Kconfig" diff --git a/subsys/bluetooth/Makefile b/subsys/bluetooth/Makefile index 8b9f92aebde..30cad48da35 100644 --- a/subsys/bluetooth/Makefile +++ b/subsys/bluetooth/Makefile @@ -1 +1,2 @@ obj-$(CONFIG_BLUETOOTH) += host/ +obj-$(CONFIG_BLUETOOTH_CONTROLLER) += controller/ diff --git a/drivers/bluetooth/controller/Kconfig b/subsys/bluetooth/controller/Kconfig similarity index 100% rename from drivers/bluetooth/controller/Kconfig rename to subsys/bluetooth/controller/Kconfig diff --git a/drivers/bluetooth/controller/Makefile b/subsys/bluetooth/controller/Makefile similarity index 70% rename from drivers/bluetooth/controller/Makefile rename to subsys/bluetooth/controller/Makefile index a04e1bebd5c..98f4575fb96 100644 --- a/drivers/bluetooth/controller/Makefile +++ b/subsys/bluetooth/controller/Makefile @@ -1,6 +1,6 @@ -ccflags-$(CONFIG_BLUETOOTH_CONTROLLER) += -I$(srctree)/drivers/bluetooth/controller/util -ccflags-$(CONFIG_BLUETOOTH_CONTROLLER) += -I$(srctree)/drivers/bluetooth/controller/hal -ccflags-$(CONFIG_BLUETOOTH_CONTROLLER) += -I$(srctree)/drivers/bluetooth/controller/ll +ccflags-$(CONFIG_BLUETOOTH_CONTROLLER) += -I$(srctree)/subsys/bluetooth/controller/util +ccflags-$(CONFIG_BLUETOOTH_CONTROLLER) += -I$(srctree)/subsys/bluetooth/controller/hal +ccflags-$(CONFIG_BLUETOOTH_CONTROLLER) += -I$(srctree)/subsys/bluetooth/controller/ll obj-$(CONFIG_BLUETOOTH_CONTROLLER) += util/mem.o obj-$(CONFIG_BLUETOOTH_CONTROLLER) += util/memq.o obj-$(CONFIG_BLUETOOTH_CONTROLLER) += util/work.o diff --git a/drivers/bluetooth/controller/hal/ccm.h b/subsys/bluetooth/controller/hal/ccm.h similarity index 100% rename from drivers/bluetooth/controller/hal/ccm.h rename to subsys/bluetooth/controller/hal/ccm.h diff --git a/drivers/bluetooth/controller/hal/cpu.h b/subsys/bluetooth/controller/hal/cpu.h similarity index 100% rename from drivers/bluetooth/controller/hal/cpu.h rename to subsys/bluetooth/controller/hal/cpu.h diff --git a/drivers/bluetooth/controller/hal/debug.h b/subsys/bluetooth/controller/hal/debug.h similarity index 100% rename from drivers/bluetooth/controller/hal/debug.h rename to subsys/bluetooth/controller/hal/debug.h diff --git a/drivers/bluetooth/controller/hal/ecb.c b/subsys/bluetooth/controller/hal/ecb.c similarity index 100% rename from drivers/bluetooth/controller/hal/ecb.c rename to subsys/bluetooth/controller/hal/ecb.c diff --git a/drivers/bluetooth/controller/hal/ecb.h b/subsys/bluetooth/controller/hal/ecb.h similarity index 100% rename from drivers/bluetooth/controller/hal/ecb.h rename to subsys/bluetooth/controller/hal/ecb.h diff --git a/drivers/bluetooth/controller/hal/hal_rtc.h b/subsys/bluetooth/controller/hal/hal_rtc.h similarity index 100% rename from drivers/bluetooth/controller/hal/hal_rtc.h rename to subsys/bluetooth/controller/hal/hal_rtc.h diff --git a/drivers/bluetooth/controller/hal/hal_work.h b/subsys/bluetooth/controller/hal/hal_work.h similarity index 100% rename from drivers/bluetooth/controller/hal/hal_work.h rename to subsys/bluetooth/controller/hal/hal_work.h diff --git a/drivers/bluetooth/controller/hal/radio.c b/subsys/bluetooth/controller/hal/radio.c similarity index 100% rename from drivers/bluetooth/controller/hal/radio.c rename to subsys/bluetooth/controller/hal/radio.c diff --git a/drivers/bluetooth/controller/hal/radio.h b/subsys/bluetooth/controller/hal/radio.h similarity index 100% rename from drivers/bluetooth/controller/hal/radio.h rename to subsys/bluetooth/controller/hal/radio.h diff --git a/drivers/bluetooth/controller/hal/rand.c b/subsys/bluetooth/controller/hal/rand.c similarity index 100% rename from drivers/bluetooth/controller/hal/rand.c rename to subsys/bluetooth/controller/hal/rand.c diff --git a/drivers/bluetooth/controller/hal/rand.h b/subsys/bluetooth/controller/hal/rand.h similarity index 100% rename from drivers/bluetooth/controller/hal/rand.h rename to subsys/bluetooth/controller/hal/rand.h diff --git a/drivers/bluetooth/controller/hal/rtc.c b/subsys/bluetooth/controller/hal/rtc.c similarity index 100% rename from drivers/bluetooth/controller/hal/rtc.c rename to subsys/bluetooth/controller/hal/rtc.c diff --git a/drivers/bluetooth/controller/hci/hci.c b/subsys/bluetooth/controller/hci/hci.c similarity index 100% rename from drivers/bluetooth/controller/hci/hci.c rename to subsys/bluetooth/controller/hci/hci.c diff --git a/drivers/bluetooth/controller/hci/hci_driver.c b/subsys/bluetooth/controller/hci/hci_driver.c similarity index 99% rename from drivers/bluetooth/controller/hci/hci_driver.c rename to subsys/bluetooth/controller/hci/hci_driver.c index b6915c066b5..c656acf1910 100644 --- a/drivers/bluetooth/controller/hci/hci_driver.c +++ b/subsys/bluetooth/controller/hci/hci_driver.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include "util/defines.h" #include "util/work.h" diff --git a/drivers/bluetooth/controller/hci/hci_internal.h b/subsys/bluetooth/controller/hci/hci_internal.h similarity index 100% rename from drivers/bluetooth/controller/hci/hci_internal.h rename to subsys/bluetooth/controller/hci/hci_internal.h diff --git a/drivers/bluetooth/controller/ll/ctrl.c b/subsys/bluetooth/controller/ll/ctrl.c similarity index 100% rename from drivers/bluetooth/controller/ll/ctrl.c rename to subsys/bluetooth/controller/ll/ctrl.c diff --git a/drivers/bluetooth/controller/ll/ctrl.h b/subsys/bluetooth/controller/ll/ctrl.h similarity index 100% rename from drivers/bluetooth/controller/ll/ctrl.h rename to subsys/bluetooth/controller/ll/ctrl.h diff --git a/drivers/bluetooth/controller/ll/ctrl_internal.h b/subsys/bluetooth/controller/ll/ctrl_internal.h similarity index 99% rename from drivers/bluetooth/controller/ll/ctrl_internal.h rename to subsys/bluetooth/controller/ll/ctrl_internal.h index bddc406337c..25f7c200efa 100644 --- a/drivers/bluetooth/controller/ll/ctrl_internal.h +++ b/subsys/bluetooth/controller/ll/ctrl_internal.h @@ -236,4 +236,3 @@ struct pdu_data_q_tx { #define LL_MEM_TOTAL (LL_MEM_CONN + LL_MEM_RXQ + (LL_MEM_TXQ * 2) + \ LL_MEM_RX_POOL_SZ + \ LL_MEM_RX_LINK_POOL + LL_MEM_TX_CTRL_POOL + LL_MEM_TX_DATA_POOL) - diff --git a/drivers/bluetooth/controller/ll/ll.c b/subsys/bluetooth/controller/ll/ll.c similarity index 100% rename from drivers/bluetooth/controller/ll/ll.c rename to subsys/bluetooth/controller/ll/ll.c diff --git a/drivers/bluetooth/controller/ll/ll.h b/subsys/bluetooth/controller/ll/ll.h similarity index 100% rename from drivers/bluetooth/controller/ll/ll.h rename to subsys/bluetooth/controller/ll/ll.h diff --git a/drivers/bluetooth/controller/ll/pdu.h b/subsys/bluetooth/controller/ll/pdu.h similarity index 100% rename from drivers/bluetooth/controller/ll/pdu.h rename to subsys/bluetooth/controller/ll/pdu.h diff --git a/drivers/bluetooth/controller/ll/ticker.c b/subsys/bluetooth/controller/ll/ticker.c similarity index 100% rename from drivers/bluetooth/controller/ll/ticker.c rename to subsys/bluetooth/controller/ll/ticker.c diff --git a/drivers/bluetooth/controller/ll/ticker.h b/subsys/bluetooth/controller/ll/ticker.h similarity index 100% rename from drivers/bluetooth/controller/ll/ticker.h rename to subsys/bluetooth/controller/ll/ticker.h diff --git a/drivers/bluetooth/controller/util/defines.h b/subsys/bluetooth/controller/util/defines.h similarity index 100% rename from drivers/bluetooth/controller/util/defines.h rename to subsys/bluetooth/controller/util/defines.h diff --git a/drivers/bluetooth/controller/util/mem.c b/subsys/bluetooth/controller/util/mem.c similarity index 100% rename from drivers/bluetooth/controller/util/mem.c rename to subsys/bluetooth/controller/util/mem.c diff --git a/drivers/bluetooth/controller/util/mem.h b/subsys/bluetooth/controller/util/mem.h similarity index 100% rename from drivers/bluetooth/controller/util/mem.h rename to subsys/bluetooth/controller/util/mem.h diff --git a/drivers/bluetooth/controller/util/memq.c b/subsys/bluetooth/controller/util/memq.c similarity index 100% rename from drivers/bluetooth/controller/util/memq.c rename to subsys/bluetooth/controller/util/memq.c diff --git a/drivers/bluetooth/controller/util/memq.h b/subsys/bluetooth/controller/util/memq.h similarity index 100% rename from drivers/bluetooth/controller/util/memq.h rename to subsys/bluetooth/controller/util/memq.h diff --git a/drivers/bluetooth/controller/util/util.c b/subsys/bluetooth/controller/util/util.c similarity index 100% rename from drivers/bluetooth/controller/util/util.c rename to subsys/bluetooth/controller/util/util.c diff --git a/drivers/bluetooth/controller/util/util.h b/subsys/bluetooth/controller/util/util.h similarity index 100% rename from drivers/bluetooth/controller/util/util.h rename to subsys/bluetooth/controller/util/util.h diff --git a/drivers/bluetooth/controller/util/work.c b/subsys/bluetooth/controller/util/work.c similarity index 100% rename from drivers/bluetooth/controller/util/work.c rename to subsys/bluetooth/controller/util/work.c diff --git a/drivers/bluetooth/controller/util/work.h b/subsys/bluetooth/controller/util/work.h similarity index 100% rename from drivers/bluetooth/controller/util/work.h rename to subsys/bluetooth/controller/util/work.h