From patchwork Sat Feb 15 01:28:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3655151 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0BD879F334 for ; Sat, 15 Feb 2014 00:29:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 37553201DE for ; Sat, 15 Feb 2014 00:29:44 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41416201C7 for ; Sat, 15 Feb 2014 00:29:43 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WET82-0004Cc-V2; Sat, 15 Feb 2014 00:29:11 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WET80-0000Qa-IC; Sat, 15 Feb 2014 00:29:08 +0000 Received: from mail-la0-f43.google.com ([209.85.215.43]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WET7w-0000Ph-Uh for linux-arm-kernel@lists.infradead.org; Sat, 15 Feb 2014 00:29:05 +0000 Received: by mail-la0-f43.google.com with SMTP id pv20so9771340lab.16 for ; Fri, 14 Feb 2014 16:28:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=a5Z6Vp1WMTxTDo+2Rc1VIxF4Io6zm1wYMYoTNFYxDZQ=; b=a7qnenQvMiz8qs5D55olq/UC8GOoBRI3+cXnuLWH6utTm6SUZODVnmV2YBPvQJmosV lVyCZOIpFZdt70NRSsd/6Ve3EGGi8/4ynt6KAwvlzHJOutWDlZsBd727TtytON4ulf1y SWcEMQ6/HNfSBE1JECfQjIx2VgmBRBcWdMk5Sbahx72EZxOv0Y6FWFFuUfUVKSb5EDDb 5FcYAAPpTaJn8YhKgdOjA3a1xd42L0ExqiOlXhpkQAtedb/7jwf4Vt/rrNFflMvg0Lhd XXyowt3xnVIl6bUewiWzVQdvFawdDEXaNJOWfOPODy9juqr4cOxhGvRA9cybBtXSqkJV 4TsQ== X-Gm-Message-State: ALoCoQn4h5pH8S39lphFZps6KLrLqv5EyKddUo+t0weBOiZsAZrwvMwlqxjJKWoOk+ayF9ORx8HK X-Received: by 10.152.8.47 with SMTP id o15mr7587009laa.20.1392424120356; Fri, 14 Feb 2014 16:28:40 -0800 (PST) Received: from wasted.cogentembedded.com (ppp83-237-57-97.pppoe.mtu-net.ru. [83.237.57.97]) by mx.google.com with ESMTPSA id ri4sm7654982lbb.6.2014.02.14.16.28.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 14 Feb 2014 16:28:40 -0800 (PST) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, linux-sh@vger.kernel.org Subject: [PATCH 2/5] ARM: shmobile: BOCK-W: set proper DMA masks for Ether device Date: Sat, 15 Feb 2014 04:28:43 +0300 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) References: <201402150424.30954.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201402150424.30954.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201402150428.44268.sergei.shtylyov@cogentembedded.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140214_192905_162359_BC9B5C92 X-CRM114-Status: GOOD ( 14.84 ) X-Spam-Score: -2.6 (--) Cc: linux@arm.linux.org.uk, magnus.damm@gmail.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- arch/arm/mach-shmobile/board-bockw.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) Index: renesas/arch/arm/mach-shmobile/board-bockw.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/board-bockw.c +++ renesas/arch/arm/mach-shmobile/board-bockw.c @@ -1,9 +1,9 @@ /* * Bock-W board support * - * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013-2014 Renesas Solutions Corp. * Copyright (C) 2013 Kuninori Morimoto - * Copyright (C) 2013 Cogent Embedded, Inc. + * Copyright (C) 2013-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 @@ -235,6 +235,17 @@ static struct sh_eth_plat_data ether_pla .no_ether_link = 1, }; +static struct platform_device_info ether_info __initdata = { + .parent = &platform_bus, + .name = "r8a777x-ether", + .id = -1, + .res = ether_resources, + .num_res = ARRAY_SIZE(ether_resources), + .data = ðer_platform_data, + .size_data = sizeof(ether_platform_data), + .dma_mask = DMA_BIT_MASK(32), +}; + /* I2C */ static struct i2c_board_info i2c0_devices[] = { { @@ -592,11 +603,7 @@ static void __init bockw_init(void) r8a7778_init_irq_extpin(1); r8a7778_add_standard_devices(); - platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1, - ether_resources, - ARRAY_SIZE(ether_resources), - ðer_platform_data, - sizeof(ether_platform_data)); + platform_device_register_full(ðer_info); platform_device_register_full(&vin0_info); /* VIN1 has a pin conflict with Ether */