ARM: shmobile: Koelsch: set proper DMA masks for Ether device
Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and 'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing ability. Currently, the code works without DMA masks but as we would have to enable CONFIG_HIGHMEM to access the full board memory in the future, when support for NETIF_F_SG would be added to the 'sh_eth' driver as well, the correct DMA masks should start to matter... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
This commit is contained in:
parent
5d5a87a5b6
commit
379bfd7134
1 changed files with 14 additions and 5 deletions
|
@ -2,8 +2,9 @@
|
||||||
* Koelsch board support
|
* Koelsch board support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Renesas Electronics Corporation
|
* Copyright (C) 2013 Renesas Electronics Corporation
|
||||||
* Copyright (C) 2013 Renesas Solutions Corp.
|
* Copyright (C) 2013-2014 Renesas Solutions Corp.
|
||||||
* Copyright (C) 2013 Magnus Damm
|
* Copyright (C) 2013 Magnus Damm
|
||||||
|
* Copyright (C) 2014 Cogent Embedded, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -116,6 +117,17 @@ static const struct resource ether_resources[] __initconst = {
|
||||||
DEFINE_RES_IRQ(gic_spi(162)),
|
DEFINE_RES_IRQ(gic_spi(162)),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct platform_device_info ether_info __initconst = {
|
||||||
|
.parent = &platform_bus,
|
||||||
|
.name = "r8a7791-ether",
|
||||||
|
.id = -1,
|
||||||
|
.res = ether_resources,
|
||||||
|
.num_res = ARRAY_SIZE(ether_resources),
|
||||||
|
.data = ðer_pdata,
|
||||||
|
.size_data = sizeof(ether_pdata),
|
||||||
|
.dma_mask = DMA_BIT_MASK(32),
|
||||||
|
};
|
||||||
|
|
||||||
/* LEDS */
|
/* LEDS */
|
||||||
static struct gpio_led koelsch_leds[] = {
|
static struct gpio_led koelsch_leds[] = {
|
||||||
{
|
{
|
||||||
|
@ -426,10 +438,7 @@ static void __init koelsch_add_standard_devices(void)
|
||||||
ARRAY_SIZE(koelsch_pinctrl_map));
|
ARRAY_SIZE(koelsch_pinctrl_map));
|
||||||
r8a7791_pinmux_init();
|
r8a7791_pinmux_init();
|
||||||
r8a7791_add_standard_devices();
|
r8a7791_add_standard_devices();
|
||||||
platform_device_register_resndata(&platform_bus, "r8a7791-ether", -1,
|
platform_device_register_full(ðer_info);
|
||||||
ether_resources,
|
|
||||||
ARRAY_SIZE(ether_resources),
|
|
||||||
ðer_pdata, sizeof(ether_pdata));
|
|
||||||
platform_device_register_data(&platform_bus, "leds-gpio", -1,
|
platform_device_register_data(&platform_bus, "leds-gpio", -1,
|
||||||
&koelsch_leds_pdata,
|
&koelsch_leds_pdata,
|
||||||
sizeof(koelsch_leds_pdata));
|
sizeof(koelsch_leds_pdata));
|
||||||
|
|
Loading…
Add table
Reference in a new issue