From patchwork Sat Feb 15 01:30:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3655161 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DFAA4BF13A for ; Sat, 15 Feb 2014 00:30:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C009201DE for ; Sat, 15 Feb 2014 00:30:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34FB4201C7 for ; Sat, 15 Feb 2014 00:30:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753236AbaBOAaS (ORCPT ); Fri, 14 Feb 2014 19:30:18 -0500 Received: from mail-la0-f44.google.com ([209.85.215.44]:61020 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753128AbaBOAaS (ORCPT ); Fri, 14 Feb 2014 19:30:18 -0500 Received: by mail-la0-f44.google.com with SMTP id hr13so9795470lab.17 for ; Fri, 14 Feb 2014 16:30:17 -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=qvW5mMQ5IoIwf9xD+qjWaUPMPdGv0qysKTwNAQGTiHI=; b=P+ya81fMaZOggDUuvtMEqME2m8uw7+cuE+UnIdUMTvPAIaKNBjnpGLLI1814wjQTgG uaPO4b6TOLu1UGjKwum7Xu7ouM70IOgvDNDhdawRhfwQ6EcBo3h+Vpjw4/eoILEqpY0N Wl5hJmmBAsCR6lfKbUEU9kEhRh3aDhZn6U0hwsNfaXykGWpbnA4KxFIztW+QmGKPUYs0 EyHCByTyPzulzUYmk+bRdX3CZeO5V3xDdOGxFstZ1sT7QHTSmQXiOpAgjivKg+V5iZ8Y 0Dwhjq5SN2X7mQAX+TD0uwR3mJA7gRYg4VpAtzsn9p3eD6kmHhxbPd9RoNffqczkhPWW U7Cg== X-Gm-Message-State: ALoCoQlBUtXpC1VhEDc+f2iT1mosgYsJkyCH4tOBizjx6c3X67gGeAojMyaob+EnMcY5GZFPdpr7 X-Received: by 10.153.0.33 with SMTP id av1mr7576889lad.14.1392424216940; Fri, 14 Feb 2014 16:30:16 -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 bl8sm7664632lbb.3.2014.02.14.16.30.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 14 Feb 2014 16:30:16 -0800 (PST) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, linux-sh@vger.kernel.org Subject: [PATCH 3/5] ARM: shmobile: Lager: set proper DMA masks for Ether device Date: Sat, 15 Feb 2014 04:30:20 +0300 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org References: <201402150424.30954.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201402150424.30954.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201402150430.20874.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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. 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 --- arch/arm/mach-shmobile/board-lager.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: renesas/arch/arm/mach-shmobile/board-lager.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/board-lager.c +++ renesas/arch/arm/mach-shmobile/board-lager.c @@ -1,8 +1,9 @@ /* * Lager 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 @@ -275,6 +276,17 @@ static const struct resource ether_resou DEFINE_RES_IRQ(gic_spi(162)), }; +static const struct platform_device_info ether_info __initconst = { + .parent = &platform_bus, + .name = "r8a7790-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), +}; + /* SPI Flash memory (Spansion S25FL512SAGMFIG11 64Mb) */ static struct mtd_partition spi_flash_part[] = { /* Reserved for user loader program, read-only */ @@ -743,10 +755,7 @@ static void __init lager_add_standard_de mmcif1_resources, ARRAY_SIZE(mmcif1_resources), &mmcif1_pdata, sizeof(mmcif1_pdata)); - platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1, - ether_resources, - ARRAY_SIZE(ether_resources), - ðer_pdata, sizeof(ether_pdata)); + platform_device_register_full(ðer_info); lager_add_du_device();