Received: by 10.223.164.202 with SMTP id h10csp48282wrb; Wed, 29 Nov 2017 16:46:43 -0800 (PST) X-Google-Smtp-Source: AGs4zMbR2JNSdoZyZ1xCRnMw6pfGwIaYdqORFFsWFPUAsHNx5IwFA0tKWfe+ol98X8+oK0QhDTwX X-Received: by 10.101.77.139 with SMTP id p11mr686813pgq.286.1512002803321; Wed, 29 Nov 2017 16:46:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512002803; cv=none; d=google.com; s=arc-20160816; b=vvurGw+ltHpWbJOAwxWfsGGS47GaRIYd8MESBH8HNI0oqJdvjhHyc5EQKGTpKXi9yX z8iHWmV7A94F1BjSMboGuFNmD2J6bfW/EokDjshORZXmxAIZmZs6/DnFu5azL5z7iTya hb7sxz4jUZsiLUV4r+fu4O0U3+9URpdgmSvwHQHyg89BF2kXOOkw8OvWK4zrHf3ayzzp fO9p7q7RJ9BpoEtN23DZBp06vD49SJx5E5VPIvRSID8ptFsg+B9n7+r5bq2GZK5SU28p dpgydZ3PNgdt3WnJEsfrZ/uQezEZ+8VHgzT00z/rlkHq8+/SpwT15CrxLPbX14fHkWSp 2p4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=44TahWSOgI3MrFhV2RFACquu1Dj110jZGogsY81wWts=; b=Rvn8OL/3r7HlN/4sBpn5mHgwDHQZIgF71KsNsgGtnjZSkEG/XjaKnHFJvv0DoBDvDw hSmhy2grQDac1707S5KfHVvHzIOaWPjB6tqLjaQYnm6YXcEjhIcDSjs6t70jErOblUlw dY9Itu76N40Ikh/mhDY9jvo13Z4bViW+suLSA6fkkF9Trg+d5NX8vKxUDdVrLW7vxKQQ 2XyeoFtkS7jQGIwtn3QbqCSXwcsffMZrqH8v6u9L9ku+VyxmxrEWdLN5DlmccuhLPo2X pg7xsgnzDqGJZkoh2P6w48KhxSkj2Q/7LCO3IU2ksQQ5rPWZyAJgiorOaMaTKc8LqZeJ gymQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u79si2193927pfa.354.2017.11.29.16.46.29; Wed, 29 Nov 2017 16:46:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753840AbdK3Api (ORCPT + 99 others); Wed, 29 Nov 2017 19:45:38 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:42541 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753536AbdK3Apg (ORCPT ); Wed, 29 Nov 2017 19:45:36 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3ynJbg1b75z1qv30; Thu, 30 Nov 2017 01:45:35 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3ynJbg0mWtz1qqkr; Thu, 30 Nov 2017 01:45:35 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 05BWhkvcuYzX; Thu, 30 Nov 2017 01:45:33 +0100 (CET) X-Auth-Info: +2InbfP6p2UJh8oQxZ22hHV3w60xmIbdNy6Lr4U4cw8= Received: from localhost.localdomain (89-64-27-66.dynamic.chello.pl [89.64.27.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 30 Nov 2017 01:45:33 +0100 (CET) From: Lukasz Majewski To: Alexander Sverdlin , Arnd Bergmann , arndbergmann@gmail.com, Hartley Sweeten Cc: Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Olof Johansson , Linus Walleij , Lukasz Majewski Subject: [PATCH v3 4/6] ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable Date: Thu, 30 Nov 2017 01:45:08 +0100 Message-Id: <20171130004510.23887-5-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171130004510.23887-1-lukma@denx.de> References: <20171116232239.16823-1-lukma@denx.de> <20171130004510.23887-1-lukma@denx.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The map IO common code has been excluded to be reused by other ts72xx clones. Signed-off-by: Lukasz Majewski Acked-by: Alexander Sverdlin --- Changes for v2: - New patch Changes for v3: - None --- arch/arm/mach-ep93xx/ts72xx.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 00e0e5b8babf..a6e473b3dcf6 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c @@ -30,11 +30,6 @@ static struct map_desc ts72xx_io_desc[] __initdata = { { - .virtual = (unsigned long)TS72XX_MODEL_VIRT_BASE, - .pfn = __phys_to_pfn(TS72XX_MODEL_PHYS_BASE), - .length = TS72XX_MODEL_SIZE, - .type = MT_DEVICE, - }, { .virtual = (unsigned long)TS72XX_OPTIONS_VIRT_BASE, .pfn = __phys_to_pfn(TS72XX_OPTIONS_PHYS_BASE), .length = TS72XX_OPTIONS_SIZE, @@ -47,12 +42,26 @@ static struct map_desc ts72xx_io_desc[] __initdata = { } }; -static void __init ts72xx_map_io(void) +static struct map_desc ts72xx_common_io_desc[] __initdata = { + { + .virtual = (unsigned long)TS72XX_MODEL_VIRT_BASE, + .pfn = __phys_to_pfn(TS72XX_MODEL_PHYS_BASE), + .length = TS72XX_MODEL_SIZE, + .type = MT_DEVICE, + } +}; + +void __init ts72xx_common_map_io(void) { ep93xx_map_io(); - iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc)); + iotable_init(ts72xx_common_io_desc, ARRAY_SIZE(ts72xx_common_io_desc)); } +static void __init ts72xx_map_io(void) +{ + ts72xx_common_map_io(); + iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc)); +} /************************************************************************* * NAND flash -- 2.11.0 From 1585434161630184358@xxx Wed Nov 29 20:37:20 +0000 2017 X-GM-THRID: 1584686522007405730 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread