Re: [PATCH v2 6/6] can: c_can: add support to 64 message objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25.02.2021 22:51:55, Dario Binacchi wrote:
> --- a/drivers/net/can/c_can/c_can.h
> +++ b/drivers/net/can/c_can/c_can.h
> @@ -22,8 +22,6 @@
>  #ifndef C_CAN_H
>  #define C_CAN_H
>  
> -#define C_CAN_NO_OF_OBJECTS	32
> -
>  enum reg {
>  	C_CAN_CTRL_REG = 0,
>  	C_CAN_CTRL_EX_REG,
> @@ -61,6 +59,7 @@ enum reg {
>  	C_CAN_NEWDAT2_REG,
>  	C_CAN_INTPND1_REG,
>  	C_CAN_INTPND2_REG,
> +	C_CAN_INTPND3_REG,
>  	C_CAN_MSGVAL1_REG,
>  	C_CAN_MSGVAL2_REG,
>  	C_CAN_FUNCTION_REG,
> @@ -122,6 +121,7 @@ static const u16 __maybe_unused reg_map_d_can[] = {
>  	[C_CAN_NEWDAT2_REG]	= 0x9E,
>  	[C_CAN_INTPND1_REG]	= 0xB0,
>  	[C_CAN_INTPND2_REG]	= 0xB2,
> +	[C_CAN_INTPND3_REG]	= 0xB4,
>  	[C_CAN_MSGVAL1_REG]	= 0xC4,
>  	[C_CAN_MSGVAL2_REG]	= 0xC6,
>  	[C_CAN_IF1_COMREQ_REG]	= 0x100,
> @@ -161,6 +161,7 @@ struct raminit_bits {
>  
>  struct c_can_driver_data {
>  	enum c_can_dev_id id;
> +	int msg_obj_num;

unsigned int

>  
>  	/* RAMINIT register description. Optional. */
>  	const struct raminit_bits *raminit_bits; /* Array of START/DONE bit positions */
> diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c
> index 3752f68d095e..2cb98ccd04d7 100644
> --- a/drivers/net/can/c_can/c_can_pci.c
> +++ b/drivers/net/can/c_can/c_can_pci.c
> @@ -31,6 +31,8 @@ enum c_can_pci_reg_align {
>  struct c_can_pci_data {
>  	/* Specify if is C_CAN or D_CAN */
>  	enum c_can_dev_id type;
> +	/* Number of message objects */
> +	int msg_obj_num;

unsigned int


Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux