Thread (21 messages) 21 messages, 4 authors, 2021-06-18

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

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2021-06-17 11:45:23
Also in: linux-m68k

On 17.06.2021 09:23:13, Angelo Dureghello wrote:
quoted
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 |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help