From patchwork Sat Feb 15 01:36:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3655181 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 EC6D8BF13A for ; Sat, 15 Feb 2014 00:36:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7F2D2020E for ; Sat, 15 Feb 2014 00:36:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13B04201DE for ; Sat, 15 Feb 2014 00:36:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752948AbaBOAgS (ORCPT ); Fri, 14 Feb 2014 19:36:18 -0500 Received: from mail-la0-f47.google.com ([209.85.215.47]:35976 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752397AbaBOAgR (ORCPT ); Fri, 14 Feb 2014 19:36:17 -0500 Received: by mail-la0-f47.google.com with SMTP id hr17so9818413lab.34 for ; Fri, 14 Feb 2014 16:36:16 -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=6794XZ9nFbLklPoS550fQEQtLnM4aUHXqhjIaeX1keU=; b=BIUf9tKZKDzXdpK6Zz3hgk/jqNh6LyECsgY6fD0E6Ef3Wxcv1IHtm6WG+UoTbQgLGA jbgoXsKs21V2ACSIBlYxvZZUDKTb7ElgeGWM6qO2bVgB41dcvykkXyRqmfEtnnub8WV8 FiE/NxWm9UpouNeKir0pXpsIyBeQDk+Dp5Z+C+pf6Fsyam7Sn7/Zh3J0t+6bc4C1EtDH RcdQS73uXsPxF1yB9RXxT5DQDLWuTomF38MmcXdDENapJ/o/r5A1efX1aM+cbEtqA/XF vaJ9OOZDCdiKGJnONjthL57jJGb2kGoyQAR4pFnQpiZ5HVdkDdAzC/A499IUcQTnJU35 PW8A== X-Gm-Message-State: ALoCoQleU3cH8D606tmSwKun1IFc3vebkXHoHozuEg519yoStqzQaQOXdRQKGl9NI8e8nwgB/TaK X-Received: by 10.112.34.231 with SMTP id c7mr108409lbj.56.1392424576300; Fri, 14 Feb 2014 16:36: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 cl5sm7653787lbb.14.2014.02.14.16.36.15 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 14 Feb 2014 16:36:15 -0800 (PST) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, linux-sh@vger.kernel.org Subject: [PATCH 4/5] ARM: shmobile: Koelsch: set proper DMA masks for Ether device Date: Sat, 15 Feb 2014 04:36:19 +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: <201402150436.20195.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-koelsch.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-koelsch.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/board-koelsch.c +++ renesas/arch/arm/mach-shmobile/board-koelsch.c @@ -2,8 +2,9 @@ * Koelsch board support * * Copyright (C) 2013 Renesas Electronics Corporation - * 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 @@ -116,6 +117,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 = "r8a7791-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), +}; + /* LEDS */ static struct gpio_led koelsch_leds[] = { { @@ -426,10 +438,7 @@ static void __init koelsch_add_standard_ ARRAY_SIZE(koelsch_pinctrl_map)); r8a7791_pinmux_init(); r8a7791_add_standard_devices(); - platform_device_register_resndata(&platform_bus, "r8a7791-ether", -1, - ether_resources, - ARRAY_SIZE(ether_resources), - ðer_pdata, sizeof(ether_pdata)); + platform_device_register_full(ðer_info); platform_device_register_data(&platform_bus, "leds-gpio", -1, &koelsch_leds_pdata, sizeof(koelsch_leds_pdata));