diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-02-14 20:30:20 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-02-16 22:20:36 -0500 |
commit | 5d5a87a5b6572426f8eae6e26ebcf9664d2d001a (patch) | |
tree | fbf849006656eccbbea81b7b1eca4e9a6cb8c523 /arch/arm/mach-shmobile | |
parent | ca6da5319761308e38bb97af9030d16e223355d1 (diff) |
ARM: shmobile: Lager: 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>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-lager.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 193dff0267d8..f0104bfe544e 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -1,8 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Lager board support | 2 | * Lager board support |
3 | * | 3 | * |
4 | * Copyright (C) 2013 Renesas Solutions Corp. | 4 | * Copyright (C) 2013-2014 Renesas Solutions Corp. |
5 | * Copyright (C) 2013 Magnus Damm | 5 | * Copyright (C) 2013 Magnus Damm |
6 | * Copyright (C) 2014 Cogent Embedded, Inc. | ||
6 | * | 7 | * |
7 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -275,6 +276,17 @@ static const struct resource ether_resources[] __initconst = { | |||
275 | DEFINE_RES_IRQ(gic_spi(162)), | 276 | DEFINE_RES_IRQ(gic_spi(162)), |
276 | }; | 277 | }; |
277 | 278 | ||
279 | static const struct platform_device_info ether_info __initconst = { | ||
280 | .parent = &platform_bus, | ||
281 | .name = "r8a7790-ether", | ||
282 | .id = -1, | ||
283 | .res = ether_resources, | ||
284 | .num_res = ARRAY_SIZE(ether_resources), | ||
285 | .data = ðer_pdata, | ||
286 | .size_data = sizeof(ether_pdata), | ||
287 | .dma_mask = DMA_BIT_MASK(32), | ||
288 | }; | ||
289 | |||
278 | /* SPI Flash memory (Spansion S25FL512SAGMFIG11 64Mb) */ | 290 | /* SPI Flash memory (Spansion S25FL512SAGMFIG11 64Mb) */ |
279 | static struct mtd_partition spi_flash_part[] = { | 291 | static struct mtd_partition spi_flash_part[] = { |
280 | /* Reserved for user loader program, read-only */ | 292 | /* Reserved for user loader program, read-only */ |
@@ -791,10 +803,7 @@ static void __init lager_add_standard_devices(void) | |||
791 | mmcif1_resources, ARRAY_SIZE(mmcif1_resources), | 803 | mmcif1_resources, ARRAY_SIZE(mmcif1_resources), |
792 | &mmcif1_pdata, sizeof(mmcif1_pdata)); | 804 | &mmcif1_pdata, sizeof(mmcif1_pdata)); |
793 | 805 | ||
794 | platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1, | 806 | platform_device_register_full(ðer_info); |
795 | ether_resources, | ||
796 | ARRAY_SIZE(ether_resources), | ||
797 | ðer_pdata, sizeof(ether_pdata)); | ||
798 | 807 | ||
799 | lager_add_du_device(); | 808 | lager_add_du_device(); |
800 | 809 | ||