Commit b1242236 authored by Atish Patra's avatar Atish Patra Committed by David S. Miller

net: macb: Add default usrio config to default gem config

There is no usrio config defined for default gem config leading to
a kernel panic devices that don't define a data. This issue can be
reprdouced with microchip polar fire soc where compatible string
is defined as "cdns,macb".

Fixes: edac6386 ("add userio bits as platform configuration")
Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ef9a6df0
...@@ -3954,6 +3954,13 @@ static int macb_init(struct platform_device *pdev) ...@@ -3954,6 +3954,13 @@ static int macb_init(struct platform_device *pdev)
return 0; return 0;
} }
static const struct macb_usrio_config macb_default_usrio = {
.mii = MACB_BIT(MII),
.rmii = MACB_BIT(RMII),
.rgmii = GEM_BIT(RGMII),
.refclk = MACB_BIT(CLKEN),
};
#if defined(CONFIG_OF) #if defined(CONFIG_OF)
/* 1518 rounded up */ /* 1518 rounded up */
#define AT91ETHER_MAX_RBUFF_SZ 0x600 #define AT91ETHER_MAX_RBUFF_SZ 0x600
...@@ -4439,13 +4446,6 @@ static int fu540_c000_init(struct platform_device *pdev) ...@@ -4439,13 +4446,6 @@ static int fu540_c000_init(struct platform_device *pdev)
return macb_init(pdev); return macb_init(pdev);
} }
static const struct macb_usrio_config macb_default_usrio = {
.mii = MACB_BIT(MII),
.rmii = MACB_BIT(RMII),
.rgmii = GEM_BIT(RGMII),
.refclk = MACB_BIT(CLKEN),
};
static const struct macb_usrio_config sama7g5_usrio = { static const struct macb_usrio_config sama7g5_usrio = {
.mii = 0, .mii = 0,
.rmii = 1, .rmii = 1,
...@@ -4594,6 +4594,7 @@ static const struct macb_config default_gem_config = { ...@@ -4594,6 +4594,7 @@ static const struct macb_config default_gem_config = {
.dma_burst_length = 16, .dma_burst_length = 16,
.clk_init = macb_clk_init, .clk_init = macb_clk_init,
.init = macb_init, .init = macb_init,
.usrio = &macb_default_usrio,
.jumbo_max_len = 10240, .jumbo_max_len = 10240,
}; };
......
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