Re: [PATCH v2 1/5] can: flexcan: add platform data for ColdFire

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

 



On 17.06.2021 09:23:13, Angelo Dureghello wrote:
> > Is this actually specific to the ColdFire M5411x SoC?
> > I thought a number of other ColdFire parts also have canbus support.
> > Are they not all the same underlying hardware block?
> > 
> > So should this be more generic, say flexcan.h or mcf_flexcan.h or
> > something like that?
> 
> 
> yes, the file can be reused for all mcf, they have similar
> hardware blocks (flexcan) but with small differences, like i.e.
> number of buffers, so the define guards are named generic (MCF),
> with specific defines as needed,

If there are other flexcan IP cores with small differences compared to
this one, you better give this IP core a popper name. See Patch 3:

| +static struct platform_device mcf_flexcan0 = { 
| +	.name = "flexcan-mcf",

what about naming it "flexcan-mcf5441x"? Or is this too specific? As
this is not a DT compatible we can change this later if needed.

| +	.id = 0, 
| +	.num_resources = ARRAY_SIZE(mcf_flexcan0_resource), 
| +	.resource = mcf_flexcan0_resource, 
| +	.dev.platform_data = &mcf_flexcan_info, 
| +}; 

> Will rename it to mcf_flexcan.h.

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