diff mbox series

[OpenWrt-Devel,5/7] kernel: can: add Xilinx CAN IP kernel module package

Message ID 20190401033308.8539-6-luaraneda@gmail.com
State Accepted
Delegated to: Hauke Mehrtens
Headers show
Series zynq: improve kernel config and packages | expand

Commit Message

Luis Araneda April 1, 2019, 3:33 a.m. UTC
This driver is required to use the CAN IP on devices
from the zynq target

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
---
 package/kernel/linux/modules/can.mk | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Comments

Hauke Mehrtens April 6, 2019, 12:37 p.m. UTC | #1
On 4/1/19 5:33 AM, Luis Araneda wrote:
> This driver is required to use the CAN IP on devices
> from the zynq target
> 
> Signed-off-by: Luis Araneda <luaraneda@gmail.com>
> ---
>  package/kernel/linux/modules/can.mk | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk
> index b0d254511b..85700eabad 100644
> --- a/package/kernel/linux/modules/can.mk
> +++ b/package/kernel/linux/modules/can.mk
> @@ -26,7 +26,6 @@ define KernelPackage/can
>  	CONFIG_CAN_MSCAN=n \
>  	CONFIG_CAN_SJA1000=n \
>  	CONFIG_CAN_SOFTING=n \
> -	CONFIG_CAN_XILINXCAN=n \

You will probably run into a problem when you only select kmod-can and
not kmod-can-xilinx-can on this target.

I would suggest to add CONFIG_CAN_XILINXCAN to
target/linux/generic/config4.*

>  	CONFIG_NET_EMATCH_CANID=n \
>  	CONFIG_CAN_DEBUG_DEVICES=n
>    FILES:=$(LINUX_DIR)/drivers/net/can/can-dev.ko \
> @@ -277,4 +276,17 @@ endef
>  
>  $(eval $(call KernelPackage,can-vcan))
>  
> +define KernelPackage/can-xilinx-can
> +  TITLE:=Xilinx CAN IP
> +  KCONFIG:=CONFIG_CAN_XILINXCAN
> +  FILES:=$(LINUX_DIR)/drivers/net/can/xilinx_can.ko
> +  AUTOLOAD:=$(call AutoProbe,xilinx_can)
> +  $(call AddDepends/can,@TARGET_zynq)
> +endef
> +
> +define KernelPackage/can-xilinx-can/description
> + Xilinx CAN driver. This driver supports both
> + soft AXI CAN IP and Zynq CANPS IP.
> +endef
>  
> +$(eval $(call KernelPackage,can-xilinx-can))
>
Hauke Mehrtens April 6, 2019, 2:37 p.m. UTC | #2
On 4/6/19 2:37 PM, Hauke Mehrtens wrote:
> On 4/1/19 5:33 AM, Luis Araneda wrote:
>> This driver is required to use the CAN IP on devices
>> from the zynq target
>>
>> Signed-off-by: Luis Araneda <luaraneda@gmail.com>
>> ---
>>  package/kernel/linux/modules/can.mk | 14 +++++++++++++-
>>  1 file changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk
>> index b0d254511b..85700eabad 100644
>> --- a/package/kernel/linux/modules/can.mk
>> +++ b/package/kernel/linux/modules/can.mk
>> @@ -26,7 +26,6 @@ define KernelPackage/can
>>  	CONFIG_CAN_MSCAN=n \
>>  	CONFIG_CAN_SJA1000=n \
>>  	CONFIG_CAN_SOFTING=n \
>> -	CONFIG_CAN_XILINXCAN=n \
> 
> You will probably run into a problem when you only select kmod-can and
> not kmod-can-xilinx-can on this target.
> 
> I would suggest to add CONFIG_CAN_XILINXCAN to
> target/linux/generic/config4.*
> 
This looks good, I applied it to master.

Hauke
diff mbox series

Patch

diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk
index b0d254511b..85700eabad 100644
--- a/package/kernel/linux/modules/can.mk
+++ b/package/kernel/linux/modules/can.mk
@@ -26,7 +26,6 @@  define KernelPackage/can
 	CONFIG_CAN_MSCAN=n \
 	CONFIG_CAN_SJA1000=n \
 	CONFIG_CAN_SOFTING=n \
-	CONFIG_CAN_XILINXCAN=n \
 	CONFIG_NET_EMATCH_CANID=n \
 	CONFIG_CAN_DEBUG_DEVICES=n
   FILES:=$(LINUX_DIR)/drivers/net/can/can-dev.ko \
@@ -277,4 +276,17 @@  endef
 
 $(eval $(call KernelPackage,can-vcan))
 
+define KernelPackage/can-xilinx-can
+  TITLE:=Xilinx CAN IP
+  KCONFIG:=CONFIG_CAN_XILINXCAN
+  FILES:=$(LINUX_DIR)/drivers/net/can/xilinx_can.ko
+  AUTOLOAD:=$(call AutoProbe,xilinx_can)
+  $(call AddDepends/can,@TARGET_zynq)
+endef
+
+define KernelPackage/can-xilinx-can/description
+ Xilinx CAN driver. This driver supports both
+ soft AXI CAN IP and Zynq CANPS IP.
+endef
 
+$(eval $(call KernelPackage,can-xilinx-can))