From patchwork Thu Jul 7 11:43:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 952642 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p67BhqfR020373 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 7 Jul 2011 11:44:13 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QemzS-00067V-5w; Thu, 07 Jul 2011 11:43:30 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QemzR-0002lc-PS; Thu, 07 Jul 2011 11:43:29 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QemzO-0002lJ-Cn for linux-arm-kernel@lists.infradead.org; Thu, 07 Jul 2011 11:43:27 +0000 Received: from klappe2.localnet (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0Maxwc-1QzCBE3nyM-00KRUv; Thu, 07 Jul 2011 13:43:07 +0200 From: Arnd Bergmann To: Barry Song <21cnbao@gmail.com> Subject: Re: [PATCH 1/3] ARM: CSR: Adding CSR SiRFprimaII board support Date: Thu, 7 Jul 2011 13:43:03 +0200 User-Agent: KMail/1.12.2 (Linux/2.6.37; KDE/4.3.2; x86_64; ; ) References: <1309945678-18813-1-git-send-email-bs14@csr.com> <201107062231.51117.arnd@arndb.de> In-Reply-To: MIME-Version: 1.0 Message-Id: <201107071343.03591.arnd@arndb.de> X-Provags-ID: V02:K0:fiSpS6uuO17NAMM1O3jXKZZBuU0qmY2kIVJDiFQZ/w0 s1gAsgVcUcWIPvyLZhjhuD/9UvlfyCaa3JwIh7764Ma8JO9Es1 oR8h+m4uVnGmqiG+ShdFvCsFqvKkcDei6VD50W/h2nNkUrCvFe VwcUPRK4kBaZvpJClDEnpkO+RMXlwb86aqWgGE1BfsNDdAjDKZ sEypUyuqIJZf+w69urtGw== X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110707_074326_725188_5582F942 X-CRM114-Status: GOOD ( 29.47 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.10 listed in list.dnswl.org] Cc: Russell King - ARM Linux , nico@fluxnic.net, Bin Shi , Barry Song , workgroup.linux@csr.com, Zhiwu Song , grant.likely@secretlab.ca, Rongjun Ying , Binghua Duan , Barry Song , tglx@linutronix.de, Yuping Luo , John Linn , Huayi Li , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 07 Jul 2011 11:44:13 +0000 (UTC) On Thursday 07 July 2011, Barry Song wrote: > > FWIW, I've double-checked the Xilinx zynq platform that I've already queued > > up for 3.1: this one defines IO_SPACE_LIMIT to 0xffff because PCI support > > will get merged later, so that's fine. > > as far as i know, zynq still has some static mapping tables and board > file board_dt.c. as you have reviewed csr platform very carefully, i > guess those can get fixed in zynq later too :-) > xilinx zynq and csr prima2 should be the pioneering two new SoCs to > move to DT in arm for the moment. at least, these two things can try > to get same. Good point. I'm not planning to change the initial xilinx code, since it's already in the tree, but I'd like to apply the patch below to make it do the same as prima2 in this regard. John, can you ack this patch? For the iotable, it would also be good to remove that from zynq, but it's harder to do for me when I can't test it. I'll try to split out the serial setup, and I'd hope that John can do the others along the lines of what you have done in sirfprima2. 8<---- Subject: [PATCH] ARM: Xilinx: merge board file into main platform code The zynq platform will never have board files other than the device tree one, so there is no point splitting it from common.c. This makes the code more compact. Signed-off-by: Arnd Bergmann --- arch/arm/mach-zynq/board_dt.c | 37 ------------------------------------- arch/arm/mach-zynq/common.c | 22 +++++++++++++++++++--- arch/arm/mach-zynq/common.h | 5 ----- 3 files changed, 19 insertions(+), 45 deletions(-) diff --git a/arch/arm/mach-zynq/board_dt.c b/arch/arm/mach-zynq/board_dt.c index 5b4710d..e69de29 100644 --- a/arch/arm/mach-zynq/board_dt.c +++ b/arch/arm/mach-zynq/board_dt.c @@ -1,37 +0,0 @@ -/* - * This file contains code for boards with device tree support. - * - * Copyright (C) 2011 Xilinx - * - * based on arch/arm/mach-realview/core.c - * - * Copyright (C) 1999 - 2003 ARM Limited - * Copyright (C) 2000 Deep Blue Solutions Ltd - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include -#include -#include -#include "common.h" - -static const char *xilinx_dt_match[] = { - "xlnx,zynq-ep107", - NULL -}; - -MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") - .map_io = xilinx_map_io, - .init_irq = xilinx_irq_init, - .init_machine = xilinx_init_machine, - .timer = &xttcpss_sys_timer, - .dt_compat = xilinx_dt_match, -MACHINE_END diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index b3ac5c2..73e9368 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c @@ -21,8 +21,11 @@ #include #include #include +#include +#include #include +#include #include #include #include @@ -40,7 +43,7 @@ static struct of_device_id zynq_of_bus_ids[] __initdata = { * xilinx_init_machine() - System specific initialization, intended to be * called from board specific initialization. */ -void __init xilinx_init_machine(void) +static void __init xilinx_init_machine(void) { #ifdef CONFIG_CACHE_L2X0 /* @@ -55,7 +58,7 @@ void __init xilinx_init_machine(void) /** * xilinx_irq_init() - Interrupt controller initialization for the GIC. */ -void __init xilinx_irq_init(void) +static void __init xilinx_irq_init(void) { gic_init(0, 29, SCU_GIC_DIST_BASE, SCU_GIC_CPU_BASE); } @@ -96,7 +99,20 @@ static struct map_desc io_desc[] __initdata = { /** * xilinx_map_io() - Create memory mappings needed for early I/O. */ -void __init xilinx_map_io(void) +static void __init xilinx_map_io(void) { iotable_init(io_desc, ARRAY_SIZE(io_desc)); } + +static const char *xilinx_dt_match[] = { + "xlnx,zynq-ep107", + NULL +}; + +MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") + .map_io = xilinx_map_io, + .init_irq = xilinx_irq_init, + .init_machine = xilinx_init_machine, + .timer = &xttcpss_sys_timer, + .dt_compat = xilinx_dt_match, +MACHINE_END diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h index bca2196..a009644 100644 --- a/arch/arm/mach-zynq/common.h +++ b/arch/arm/mach-zynq/common.h @@ -17,13 +17,8 @@ #ifndef __MACH_ZYNQ_COMMON_H__ #define __MACH_ZYNQ_COMMON_H__ -#include #include -extern void xilinx_init_machine(void); -extern void xilinx_irq_init(void); -extern void xilinx_map_io(void); - extern struct sys_timer xttcpss_sys_timer; #endif