Received: by 10.223.164.202 with SMTP id h10csp588556wrb; Thu, 30 Nov 2017 15:53:04 -0800 (PST) X-Google-Smtp-Source: AGs4zMadHeC/j8+sQF8nNec0jq0+Lo0Bf7xqXgo3F4Zctblo7xRL9youSM2i/JiJX+d+ndg4LFgn X-Received: by 10.84.132.106 with SMTP id 97mr4308056ple.44.1512085984600; Thu, 30 Nov 2017 15:53:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512085984; cv=none; d=google.com; s=arc-20160816; b=u30DXyj+o4zkehXuYQZ+4TmzezuolVTSs9Hbfhq56vTAYEdjtuWH6pGloHyceWUlw0 bLfCq4x6yRpyXBnHVEloEJLG+iJHOBrqoB44ZTuz2HRN+vTZZxjsNcaRTFXWbZolQsNF /nNL8dH0KXV6ylkbmM2EceSCBOU+IU4HmHzCy6iWo8lAWAU1/PW+Iwd3nCre5F4XgeWm JcDW4hdeVaNhiIfMYK+CYzFn7LpbdRBqNQfZ/KPEg6CjUszxSWNuHaaj+TOCIOjXPLIF exBPGeB+LBoihA8q6Q8yxxizIoAGxDOu1IbgyiGmBqAtAMbIIDhOOpH/e20bk75DzrTg w4Ag== 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=FurZzw/5HmahEQIi+A3DfF1pYjy0q3pKgDugmJZu+zM=; b=gt544ax8wp/OOmGzmibM1U7j5UzxoaJL2YDYNJukNpsxZi/4YhGivW7Va/YvdIrERP ndy4cxrYnQizSTKnAuoGwuemGAu714MKp/n1UtfoGS8Zc/IDoMxVl51BZHL4NKGQMSlQ HUuSjtNj6+VNIggEaJ5tBvpd1QY5YVykmWVpqEA4UOEySK7q1OvzS2FCbzQNnv8JmHlW wN0xKLMTqGr4aZ1gM8KMYD/ICBpT99Do/gloJy+7OFR0uNFdgClhB5E/1Rq6OGfE8Qoq O7ccfRIXnoSkIuBX2mG20wdogTor/LFZIh30kTV/4e7v6AHSsCfETz+yrzWaFoA4t+PI JouQ== 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 136si3777261pgc.243.2017.11.30.15.52.51; Thu, 30 Nov 2017 15:53:04 -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 S1752179AbdK3XwE (ORCPT + 99 others); Thu, 30 Nov 2017 18:52:04 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:50666 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752139AbdK3XwC (ORCPT ); Thu, 30 Nov 2017 18:52:02 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3ynvMP18qMz1qyvM; Fri, 1 Dec 2017 00:52:01 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3ynvMP0QZtz22LPp; Fri, 1 Dec 2017 00:52:01 +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 Jrxr3l6C7ndh; Fri, 1 Dec 2017 00:51:59 +0100 (CET) X-Auth-Info: d5znXmsTCMQm7BXSGx8pUW5+qt9M2vkn4mlTFomD5Wg= 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; Fri, 1 Dec 2017 00:51:59 +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 v4 3/5] ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable Date: Fri, 1 Dec 2017 00:51:38 +0100 Message-Id: <20171130235140.12243-4-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171130235140.12243-1-lukma@denx.de> References: <20171116232239.16823-1-lukma@denx.de> <20171130235140.12243-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 Changes for v4: - 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 141ae4c65a81..19b23c9a2efa 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c @@ -33,11 +33,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, @@ -50,12 +45,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 1585511885582052538@xxx Thu Nov 30 17:12:43 +0000 2017 X-GM-THRID: 1584686522007405730 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread