diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-02-15 02:37:32 +0100 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-02-17 04:20:37 +0100 |
commit | 583e2448629cc9fb3b1a0c850ddbe06819421d3e (patch) | |
tree | 1c8eaef1d6f0f74db6a4a7e9d22f6da393038090 /arch/arm/mach-shmobile | |
parent | ARM: shmobile: Koelsch: set proper DMA masks for Ether device (diff) | |
download | linux-583e2448629cc9fb3b1a0c850ddbe06819421d3e.tar.xz linux-583e2448629cc9fb3b1a0c850ddbe06819421d3e.zip |
ARM: shmobile: Genmai: 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.
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-genmai.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c index e240980cc227..6c328d63b819 100644 --- a/arch/arm/mach-shmobile/board-genmai.c +++ b/arch/arm/mach-shmobile/board-genmai.c @@ -1,8 +1,9 @@ /* * Genmai board support * - * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013-2014 Renesas Solutions Corp. * Copyright (C) 2013 Magnus Damm + * Copyright (C) 2014 Cogent Embedded, Inc. * * 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 @@ -43,6 +44,17 @@ static const struct resource ether_resources[] __initconst = { DEFINE_RES_IRQ(gic_iid(359)), }; +static const struct platform_device_info ether_info __initconst = { + .parent = &platform_bus, + .name = "r7s72100-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), +}; + /* RSPI */ #define RSPI_RESOURCE(idx, baseaddr, irq) \ static const struct resource rspi##idx##_resources[] __initconst = { \ @@ -82,10 +94,7 @@ static void __init genmai_add_standard_devices(void) r7s72100_clock_init(); r7s72100_add_dt_devices(); - platform_device_register_resndata(&platform_bus, "r7s72100-ether", -1, - ether_resources, - ARRAY_SIZE(ether_resources), - ðer_pdata, sizeof(ether_pdata)); + platform_device_register_full(ðer_info); r7s72100_register_rspi(0); r7s72100_register_rspi(1); |