NET: m_can: split into core library and platform adaptation
Subsystems (4)
PATCH 1/2 NET: m_can: split into core library and platform adaptation
A future patch will add PCI-based m_can driver. This patch makes that a lot simpler.
Signed-off-by Felipe Balbi <[email protected]>
--- drivers/net/can/m_can/Kconfig | 10 + drivers/net/can/m_can/Makefile | 1 + drivers/net/can/m_can/m_can.c | 707 ++----------------------- drivers/net/can/m_can/m_can.h | 420 +++++++++++++++ drivers/net/can/m_can/m_can_platform.c | 306 +++++++++++ 5 files changed, 778 insertions(+), 666 deletions(-) create mode 100644 drivers/net/can/m_can/m_can.h create mode 100644 drivers/net/can/m_can/m_can_platform.c
drivers/net/can/m_can/Kconfig +10 -0
@@ -4,3 +4,13 @@ config CAN_M_CAN tristate "Bosch M_CAN devices" ---help--- Say Y here if you want to support for Bosch M_CAN controller. + +if CAN_M_CAN + +config CAN_M_CAN_PLATFORM + tristate "Generic Platform Bus based M_CAN driver" + ---help--- + Say Y here if you want to support Bosch M_CAN controller connected + to the platform bus. + +endif
drivers/net/can/m_can/Makefile +1 -0
@@ -4,3 +4,4 @@ # obj-$(CONFIG_CAN_M_CAN) += m_can.o +obj-$(CONFIG_CAN_M_CAN_PLATFORM) += m_can_platform.o
drivers/net/can/m_can/m_can.c +41 -666
853 lines not on this page · raw message
drivers/net/can/m_can/m_can.h new file +420 -0
420 lines not on this page · raw message
drivers/net/can/m_can/m_can_platform.c new file +306 -0
306 lines not on this page · raw message
Signature · 1 line
2.23.0
PATCH 2/2 NET: m_can: add PCI glue driver
Some intel platforms support an MCAN controller attached to the PCI bus. This minimal driver adds support for those.
Signed-off-by Felipe Balbi <[email protected]>
--- drivers/net/can/m_can/Kconfig | 7 + drivers/net/can/m_can/Makefile | 1 + drivers/net/can/m_can/m_can_pci.c | 222 ++++++++++++++++++++++++++++++ 3 files changed, 230 insertions(+) create mode 100644 drivers/net/can/m_can/m_can_pci.c
drivers/net/can/m_can/Kconfig +7 -0
@@ -13,4 +13,11 @@ config CAN_M_CAN_PLATFORM Say Y here if you want to support Bosch M_CAN controller connected to the platform bus. +config CAN_M_CAN_PCI + tristate "Generic PCI Bus based M_CAN driver" + depends on PCI + ---help--- + Say Y here if you want to support Bosch M_CAN controller connected + to the pci bus. + endif
drivers/net/can/m_can/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-$(CONFIG_CAN_M_CAN) += m_can.o obj-$(CONFIG_CAN_M_CAN_PLATFORM) += m_can_platform.o +obj-$(CONFIG_CAN_M_CAN_PCI) += m_can_pci.o
drivers/net/can/m_can/m_can_pci.c new file +222 -0
222 lines not on this page · raw message
Signature · 1 line
2.23.0