diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-02-14 20:36:19 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-02-16 22:20:36 -0500 |
commit | 379bfd7134bccccf58962b39e504bd639a5e75b2 (patch) | |
tree | fcb1bfc2f19a04fe9eac6f021af8646f5bbef732 | |
parent | 5d5a87a5b6572426f8eae6e26ebcf9664d2d001a (diff) |
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>
-rw-r--r-- | arch/arm/mach-shmobile/board-koelsch.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index 893d47c7d7a6..5a034ff405d0 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c | |||
@@ -2,8 +2,9 @@ | |||
2 | * Koelsch board support | 2 | * Koelsch board support |
3 | * | 3 | * |
4 | * Copyright (C) 2013 Renesas Electronics Corporation | 4 | * Copyright (C) 2013 Renesas Electronics Corporation |
5 | * Copyright (C) 2013 Renesas Solutions Corp. | 5 | * Copyright (C) 2013-2014 Renesas Solutions Corp. |
6 | * Copyright (C) 2013 Magnus Damm | 6 | * Copyright (C) 2013 Magnus Damm |
7 | * Copyright (C) 2014 Cogent Embedded, Inc. | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 10 | * it under the terms of the GNU General Public License as published by |
@@ -116,6 +117,17 @@ static const struct resource ether_resources[] __initconst = { | |||
116 | DEFINE_RES_IRQ(gic_spi(162)), | 117 | DEFINE_RES_IRQ(gic_spi(162)), |
117 | }; | 118 | }; |
118 | 119 | ||
120 | static const struct platform_device_info ether_info __initconst = { | ||
121 | .parent = &platform_bus, | ||
122 | .name = "r8a7791-ether", | ||
123 | .id = -1, | ||
124 | .res = ether_resources, | ||
125 | .num_res = ARRAY_SIZE(ether_resources), | ||
126 | .data = ðer_pdata, | ||
127 | .size_data = sizeof(ether_pdata), | ||
128 | .dma_mask = DMA_BIT_MASK(32), | ||
129 | }; | ||
130 | |||
119 | /* LEDS */ | 131 | /* LEDS */ |
120 | static struct gpio_led koelsch_leds[] = { | 132 | static struct gpio_led koelsch_leds[] = { |
121 | { | 133 | { |
@@ -426,10 +438,7 @@ static void __init koelsch_add_standard_devices(void) | |||
426 | ARRAY_SIZE(koelsch_pinctrl_map)); | 438 | ARRAY_SIZE(koelsch_pinctrl_map)); |
427 | r8a7791_pinmux_init(); | 439 | r8a7791_pinmux_init(); |
428 | r8a7791_add_standard_devices(); | 440 | r8a7791_add_standard_devices(); |
429 | platform_device_register_resndata(&platform_bus, "r8a7791-ether", -1, | 441 | platform_device_register_full(ðer_info); |
430 | ether_resources, | ||
431 | ARRAY_SIZE(ether_resources), | ||
432 | ðer_pdata, sizeof(ether_pdata)); | ||
433 | platform_device_register_data(&platform_bus, "leds-gpio", -1, | 442 | platform_device_register_data(&platform_bus, "leds-gpio", -1, |
434 | &koelsch_leds_pdata, | 443 | &koelsch_leds_pdata, |
435 | sizeof(koelsch_leds_pdata)); | 444 | sizeof(koelsch_leds_pdata)); |