Commit f61e6431 authored by Greg Ungerer's avatar Greg Ungerer

m68k: set dma and coherent masks for platform FEC ethernets

As of commit 205e1b7f ("dma-mapping: warn when there is no
coherent_dma_mask") the Freescale FEC driver is issuing the following
warning on driver initialization on ColdFire systems:

WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 0x40159e20
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.16.0-rc7-dirty #4
Stack from 41833dd8:
        41833dd8 40259c53 40025534 40279e26 00000003 00000000 4004e514 41827000
        400255de 40244e42 00000204 40159e20 00000009 00000000 00000000 4024531d
        40159e20 40244e42 00000204 00000000 00000000 00000000 00000007 00000000
        00000000 40279e26 4028d040 40226576 4003ae88 40279e26 418273f6 41833ef8
        7fffffff 418273f2 41867028 4003c9a2 4180ac6c 00000004 41833f8c 4013e71c
        40279e1c 40279e26 40226c16 4013ced2 40279e26 40279e58 4028d040 00000000
Call Trace:
        [<40025534>] 0x40025534
 [<4004e514>] 0x4004e514
 [<400255de>] 0x400255de
 [<40159e20>] 0x40159e20
 [<40159e20>] 0x40159e20

It is not fatal, the driver and the system continue to function normally.

As per the warning the coherent_dma_mask is not set on this device.
There is nothing special about the DMA memory coherency on this hardware
so we can just set the mask to 32bits in the platform data for the FEC
ethernet devices.
Signed-off-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
parent 3eb2ce82
...@@ -135,7 +135,11 @@ static struct platform_device mcf_fec0 = { ...@@ -135,7 +135,11 @@ static struct platform_device mcf_fec0 = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(mcf_fec0_resources), .num_resources = ARRAY_SIZE(mcf_fec0_resources),
.resource = mcf_fec0_resources, .resource = mcf_fec0_resources,
.dev.platform_data = FEC_PDATA, .dev = {
.dma_mask = &mcf_fec0.dev.coherent_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = FEC_PDATA,
}
}; };
#ifdef MCFFEC_BASE1 #ifdef MCFFEC_BASE1
...@@ -167,7 +171,11 @@ static struct platform_device mcf_fec1 = { ...@@ -167,7 +171,11 @@ static struct platform_device mcf_fec1 = {
.id = 1, .id = 1,
.num_resources = ARRAY_SIZE(mcf_fec1_resources), .num_resources = ARRAY_SIZE(mcf_fec1_resources),
.resource = mcf_fec1_resources, .resource = mcf_fec1_resources,
.dev.platform_data = FEC_PDATA, .dev = {
.dma_mask = &mcf_fec1.dev.coherent_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = FEC_PDATA,
}
}; };
#endif /* MCFFEC_BASE1 */ #endif /* MCFFEC_BASE1 */
#endif /* CONFIG_FEC */ #endif /* CONFIG_FEC */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment