Commit 5b1c3c85 authored by Hartley Sweeten's avatar Hartley Sweeten Committed by Russell King

[ARM] 5600/1: ep93xx: core.c remove cast when copying dev_addr

The MAC address for the ep93xx ethernet driver can be optionally
copied from registers in the controller when booting.  Due to
[ARM] 5573/1: ep93xx: ensure typesafe io, the cast for the source
address is no longer needed.

EP93XX_ETHERNET_BASE is typed as a (void __iomem __force *) so
memcpy_fromio() needs to be used instead of memcpy().
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d19d3667
...@@ -541,10 +541,8 @@ static struct platform_device ep93xx_eth_device = { ...@@ -541,10 +541,8 @@ static struct platform_device ep93xx_eth_device = {
void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr) void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
{ {
if (copy_addr) { if (copy_addr)
memcpy(data->dev_addr, memcpy_fromio(data->dev_addr, EP93XX_ETHERNET_BASE + 0x50, 6);
(void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
}
ep93xx_eth_data = *data; ep93xx_eth_data = *data;
platform_device_register(&ep93xx_eth_device); platform_device_register(&ep93xx_eth_device);
......
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