From patchwork Thu Jul 7 13:21:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 952792 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 p67DLfxD001321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 7 Jul 2011 13:22:02 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QeoWC-0008Ee-PD; Thu, 07 Jul 2011 13:21:24 +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 1QeoWC-00051k-DH; Thu, 07 Jul 2011 13:21:24 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QeoW6-00051S-Mt for linux-arm-kernel@lists.infradead.org; Thu, 07 Jul 2011 13:21:21 +0000 Received: from klappe2.localnet (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MK5kP-1QdRbP2M7B-001VFd; Thu, 07 Jul 2011 15:21:10 +0200 From: Arnd Bergmann To: "Russell King - ARM Linux" Subject: Re: [PATCH 1/3] ARM: CSR: Adding CSR SiRFprimaII board support Date: Thu, 7 Jul 2011 15:21:06 +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> <201107071343.03591.arnd@arndb.de> <20110707123707.GN8286@n2100.arm.linux.org.uk> In-Reply-To: <20110707123707.GN8286@n2100.arm.linux.org.uk> MIME-Version: 1.0 Message-Id: <201107071521.07070.arnd@arndb.de> X-Provags-ID: V02:K0:aFcVncN4miG7NfZOzE/yFoAFB4wqmLvG2FUgQ4cxd92 C+4JYvoUv3RvSBLP5J1FqQXXvDTDtSoGLHprFq2rm6a7ZZvZMc ipSg3xmQA3ginRTW/C7VVTGT0oYygcBEz2xb4laQN7X6ZbsNWk qvbr5FvSWlnutC1FSNMWo2G60sn+5Vkdgd/cllWiCpiq1vmtRY bNCgI9YfoEBSrxQvq8t/w== X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110707_092119_217462_E01963ED X-CRM114-Status: GOOD ( 29.29 ) 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.126.187 listed in list.dnswl.org] Cc: nico@fluxnic.net, Bin Shi , Barry Song , Barry Song <21cnbao@gmail.com>, 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 13:22:02 +0000 (UTC) X-MIME-Autoconverted: from quoted-printable to 8bit by demeter2.kernel.org id p67DLfxD001321 diff -urN arch/arm/mach-prima2/include/mach/clkdev.h arch/arm/mach-zynq/include/mach/clkdev.h --- arch/arm/mach-prima2/include/mach/clkdev.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/clkdev.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,13 +1,30 @@ /* - * arch/arm/mach-prima2/include/mach/clkdev.h + * arch/arm/mach-zynq/include/mach/clkdev.h * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx, Inc. + * + * 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. * - * Licensed under GPLv2 or later. */ -#ifndef __MACH_CLKDEV_H -#define __MACH_CLKDEV_H +#ifndef __MACH_CLKDEV_H__ +#define __MACH_CLKDEV_H__ + +#include + +struct clk { + unsigned long rate; + const struct clk_ops *ops; + const struct icst_params *params; + void __iomem *vcoreg; +}; #define __clk_get(clk) ({ 1; }) #define __clk_put(clk) do { } while (0) diff -urN arch/arm/mach-prima2/include/mach/debug-macro.S arch/arm/mach-zynq/include/mach/debug-macro.S --- arch/arm/mach-prima2/include/mach/debug-macro.S 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/debug-macro.S 2011-07-07 13:22:07.000000000 +0000 @@ -1,29 +1,36 @@ -/* - * arch/arm/mach-prima2/include/mach/debug-macro.S +/* arch/arm/mach-zynq/include/mach/debug-macro.S * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Debugging macro include header * - * Licensed under GPLv2 or later. + * Copyright (C) 2011 Xilinx + * + * 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 - .macro addruart, rp, rv - ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical - ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual - .endm - - .macro senduart,rd,rx - str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA] - .endm - - .macro busyuart,rd,rx - .endm - - .macro waituart,rd,rx -1001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS] - tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY - beq 1001b - .endm - + .macro addruart, rp, rv + ldr \rp, =LL_UART_PADDR @ physical + ldr \rv, =LL_UART_VADDR @ virtual + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #UART_FIFO_OFFSET] @ TXDATA + .endm + + .macro waituart,rd,rx + .endm + + .macro busyuart,rd,rx +1002: ldr \rd, [\rx, #UART_SR_OFFSET] @ get status register + tst \rd, #UART_SR_TXFULL @ + bne 1002b @ wait if FIFO is full + .endm diff -urN arch/arm/mach-prima2/include/mach/entry-macro.S arch/arm/mach-zynq/include/mach/entry-macro.S --- arch/arm/mach-prima2/include/mach/entry-macro.S 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/entry-macro.S 2011-07-07 13:22:07.000000000 +0000 @@ -1,29 +1,30 @@ /* - * arch/arm/mach-prima2/include/mach/entry-macro.S + * arch/arm/mach-zynq/include/mach/entry-macro.S * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Low-level IRQ helper macros * - * Licensed under GPLv2 or later. + * Copyright (C) 2011 Xilinx + * + * based on arch/plat-mxc/include/mach/entry-macro.S + * + * Copyright (C) 2007 Lennert Buytenhek + * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. + * + * 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 -#define SIRFSOC_INT_ID 0x38 - - .macro get_irqnr_preamble, base, tmp - ldr \base, =sirfsoc_intc_base - ldr \base, [\base] - .endm - - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - ldr \irqnr, [\base, #SIRFSOC_INT_ID] @ Get the highest priority irq - cmp \irqnr, #0x40 @ the irq num can't be larger than 0x3f - movges \irqnr, #0 - .endm - - .macro disable_fiq - .endm - - .macro arch_ret_to_user, tmp1, tmp2 - .endm + .macro disable_fiq + .endm + .macro arch_ret_to_user, tmp1, tmp2 + .endm diff -urN arch/arm/mach-prima2/include/mach/hardware.h arch/arm/mach-zynq/include/mach/hardware.h --- arch/arm/mach-prima2/include/mach/hardware.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/hardware.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,15 +1,18 @@ -/* - * arch/arm/mach-prima2/include/mach/hardware.h +/* arch/arm/mach-zynq/include/mach/hardware.h * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx * - * Licensed under GPLv2 or later. + * 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. */ #ifndef __MACH_HARDWARE_H__ #define __MACH_HARDWARE_H__ -#include -#include - #endif diff -urN arch/arm/mach-prima2/include/mach/io.h arch/arm/mach-zynq/include/mach/io.h --- arch/arm/mach-prima2/include/mach/io.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/io.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,16 +1,33 @@ -/* - * arch/arm/mach-prima2/include/mach/io.h +/* arch/arm/mach-zynq/include/mach/io.h * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx * - * Licensed under GPLv2 or later. + * 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. */ -#ifndef __MACH_PRIMA2_IO_H -#define __MACH_PRIMA2_IO_H +#ifndef __MACH_IO_H__ +#define __MACH_IO_H__ + +/* Allow IO space to be anywhere in the memory */ + +#define IO_SPACE_LIMIT 0xffff -#define IO_SPACE_LIMIT ((resource_size_t)0) +/* IO address mapping macros, nothing special at this time but required */ + +#ifdef __ASSEMBLER__ +#define IOMEM(x) (x) +#else +#define IOMEM(x) ((void __force __iomem *)(x)) +#endif -#define __mem_pci(a) (a) +#define __io(a) __typesafe_io(a) +#define __mem_pci(a) (a) #endif diff -urN arch/arm/mach-prima2/include/mach/irqs.h arch/arm/mach-zynq/include/mach/irqs.h --- arch/arm/mach-prima2/include/mach/irqs.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/irqs.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,17 +1,21 @@ -/* - * arch/arm/mach-prima2/include/mach/irqs.h +/* arch/arm/mach-zynq/include/mach/irqs.h * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx * - * Licensed under GPLv2 or later. + * 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. */ -#ifndef __ASM_ARCH_IRQS_H -#define __ASM_ARCH_IRQS_H - -#define SIRFSOC_INTENAL_IRQ_START 0 -#define SIRFSOC_INTENAL_IRQ_END 59 +#ifndef __MACH_IRQS_H +#define __MACH_IRQS_H -#define NR_IRQS 220 +#define ARCH_NR_GPIOS 118 +#define NR_IRQS (128 + ARCH_NR_GPIOS) #endif diff -urN arch/arm/mach-prima2/include/mach/map.h arch/arm/mach-zynq/include/mach/map.h --- arch/arm/mach-prima2/include/mach/map.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/map.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -/* - * memory & I/O static mapping definitions for CSR SiRFprimaII - * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. - * - * Licensed under GPLv2 or later. - */ - -#ifndef __MACH_PRIMA2_MAP_H__ -#define __MACH_PRIMA2_MAP_H__ - -#include - -#define SIRFSOC_VA(x) (VMALLOC_END + ((x) & 0x00FFF000)) - -#endif diff -urN arch/arm/mach-prima2/include/mach/memory.h arch/arm/mach-zynq/include/mach/memory.h --- arch/arm/mach-prima2/include/mach/memory.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/memory.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,21 +1,22 @@ -/* - * arch/arm/mach-prima2/include/mach/memory.h +/* arch/arm/mach-zynq/include/mach/memory.h * - * Copyright (c) 2010 â?? 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx * - * Licensed under GPLv2 or later. + * 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. */ -#ifndef __ASM_ARCH_MEMORY_H -#define __ASM_ARCH_MEMORY_H +#ifndef __MACH_MEMORY_H__ +#define __MACH_MEMORY_H__ -#define PLAT_PHYS_OFFSET UL(0x00000000) +#include -/* - * Restrict DMA-able region to workaround silicon limitation. - * The limitation restricts buffers available for DMA to SD/MMC - * hardware to be below 256MB - */ -#define ARM_DMA_ZONE_SIZE (SZ_256M) +#define PLAT_PHYS_OFFSET UL(0x0) #endif diff -urN arch/arm/mach-prima2/include/mach/system.h arch/arm/mach-zynq/include/mach/system.h --- arch/arm/mach-prima2/include/mach/system.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/system.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,21 +1,20 @@ -/* - * arch/arm/mach-prima2/include/mach/system.h +/* arch/arm/mach-zynq/include/mach/system.h * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx * - * Licensed under GPLv2 or later. + * 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. */ #ifndef __MACH_SYSTEM_H__ #define __MACH_SYSTEM_H__ -#include -#include - -#define SIRFSOC_SYS_RST_BIT BIT(31) - -extern void __iomem *sirfsoc_rstc_base; - static inline void arch_idle(void) { cpu_do_idle(); @@ -23,7 +22,7 @@ static inline void arch_reset(char mode, const char *cmd) { - writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); + /* Add architecture specific reset processing here */ } #endif diff -urN arch/arm/mach-prima2/include/mach/timex.h arch/arm/mach-zynq/include/mach/timex.h --- arch/arm/mach-prima2/include/mach/timex.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/timex.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,14 +1,23 @@ -/* - * arch/arm/mach-prima2/include/mach/timex.h +/* arch/arm/mach-zynq/include/mach/timex.h * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx * - * Licensed under GPLv2 or later. + * 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. */ #ifndef __MACH_TIMEX_H__ #define __MACH_TIMEX_H__ -#define CLOCK_TICK_RATE 1000000 +/* the following is needed for the system to build but will be removed + in the future, the value is not important but won't hurt +*/ +#define CLOCK_TICK_RATE (100 * HZ) #endif diff -urN arch/arm/mach-prima2/include/mach/uart.h arch/arm/mach-zynq/include/mach/uart.h --- arch/arm/mach-prima2/include/mach/uart.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/uart.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,23 +1,25 @@ -/* - * arch/arm/mach-prima2/include/mach/uart.h +/* arch/arm/mach-zynq/include/mach/uart.h * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx * - * Licensed under GPLv2 or later. + * 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. */ -#ifndef __MACH_PRIMA2_SIRFSOC_UART_H -#define __MACH_PRIMA2_SIRFSOC_UART_H - -/* UART-1: used as serial debug port */ -#define SIRFSOC_UART1_PA_BASE 0xb0060000 -#define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000) -#define SIRFSOC_UART1_SIZE SZ_4K +#ifndef __MACH_UART_H__ +#define __MACH_UART_H__ -#define SIRFSOC_UART_TXFIFO_STATUS 0x0114 -#define SIRFSOC_UART_TXFIFO_DATA 0x0118 +#define UART_CR_OFFSET 0x00 /* Control Register [8:0] */ +#define UART_SR_OFFSET 0x2C /* Channel Status [11:0] */ +#define UART_FIFO_OFFSET 0x30 /* FIFO [15:0] or [7:0] */ -#define SIRFSOC_UART1_TXFIFO_FULL (1 << 5) -#define SIRFSOC_UART1_TXFIFO_EMPTY (1 << 6) +#define UART_SR_TXFULL 0x00000010 /* TX FIFO full */ +#define UART_SR_TXEMPTY 0x00000008 /* TX FIFO empty */ #endif diff -urN arch/arm/mach-prima2/include/mach/uncompress.h arch/arm/mach-zynq/include/mach/uncompress.h --- arch/arm/mach-prima2/include/mach/uncompress.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/uncompress.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,40 +1,51 @@ -/* - * arch/arm/mach-prima2/include/mach/uncompress.h +/* arch/arm/mach-zynq/include/mach/uncompress.h * - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx * - * Licensed under GPLv2 or later. + * 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. */ -#ifndef __ASM_ARCH_UNCOMPRESS_H -#define __ASM_ARCH_UNCOMPRESS_H +#ifndef __MACH_UNCOMPRESS_H__ +#define __MACH_UNCOMPRESS_H__ #include -#include +#include +#include #include void arch_decomp_setup(void) { } -#define arch_decomp_wdog() - -static __inline__ void putc(char c) +static inline void flush(void) { /* - * during kernel decompression, all mappings are flat: - * virt_addr == phys_addr + * Wait while the FIFO is not empty */ - while (__raw_readl(SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_STATUS) - & SIRFSOC_UART1_TXFIFO_FULL) - barrier(); - - __raw_writel(c, SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_DATA); + while (!(__raw_readl(IOMEM(LL_UART_PADDR + UART_SR_OFFSET)) & + UART_SR_TXEMPTY)) + cpu_relax(); } -static inline void flush(void) +#define arch_decomp_wdog() + +static void putc(char ch) { + /* + * Wait for room in the FIFO, then write the char into the FIFO + */ + while (__raw_readl(IOMEM(LL_UART_PADDR + UART_SR_OFFSET)) & + UART_SR_TXFULL) + cpu_relax(); + + __raw_writel(ch, IOMEM(LL_UART_PADDR + UART_FIFO_OFFSET)); } #endif - diff -urN arch/arm/mach-prima2/include/mach/vmalloc.h arch/arm/mach-zynq/include/mach/vmalloc.h --- arch/arm/mach-prima2/include/mach/vmalloc.h 2011-07-07 13:21:41.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/vmalloc.h 2011-07-07 13:22:07.000000000 +0000 @@ -1,14 +1,20 @@ -/* - * arch/arm/ach-prima2/include/mach/vmalloc.h +/* arch/arm/mach-zynq/include/mach/vmalloc.h * - * Copyright (c) 2010 â?? 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * Copyright (C) 2011 Xilinx * - * Licensed under GPLv2 or later. + * 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. */ -#ifndef __MACH_VMALLOC_H -#define __MACH_VMALLOC_H +#ifndef __MACH_VMALLOC_H__ +#define __MACH_VMALLOC_H__ -#define VMALLOC_END 0xFEC00000 +#define VMALLOC_END 0xE0000000UL #endif diff -urN arch/arm/mach-prima2/include/mach/zynq_soc.h arch/arm/mach-zynq/include/mach/zynq_soc.h --- arch/arm/mach-prima2/include/mach/zynq_soc.h 1970-01-01 00:00:00.000000000 +0000 +++ arch/arm/mach-zynq/include/mach/zynq_soc.h 2011-07-07 13:22:07.000000000 +0000 @@ -0,0 +1,48 @@ +/* arch/arm/mach-zynq/include/mach/zynq_soc.h + * + * Copyright (C) 2011 Xilinx + * + * 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. + */ + +#ifndef __MACH_XILINX_SOC_H__ +#define __MACH_XILINX_SOC_H__ + +#define PERIPHERAL_CLOCK_RATE 2500000 + +/* For now, all mappings are flat (physical = virtual) + */ +#define UART0_PHYS 0xE0000000 +#define UART0_VIRT UART0_PHYS + +#define TTC0_PHYS 0xF8001000 +#define TTC0_VIRT TTC0_PHYS + +#define PL310_L2CC_PHYS 0xF8F02000 +#define PL310_L2CC_VIRT PL310_L2CC_PHYS + +#define SCU_PERIPH_PHYS 0xF8F00000 +#define SCU_PERIPH_VIRT SCU_PERIPH_PHYS + +/* The following are intended for the devices that are mapped early */ + +#define TTC0_BASE IOMEM(TTC0_VIRT) +#define SCU_PERIPH_BASE IOMEM(SCU_PERIPH_VIRT) +#define SCU_GIC_CPU_BASE (SCU_PERIPH_BASE + 0x100) +#define SCU_GIC_DIST_BASE (SCU_PERIPH_BASE + 0x1000) +#define PL310_L2CC_BASE IOMEM(PL310_L2CC_VIRT) + +/* + * Mandatory for CONFIG_LL_DEBUG, UART is mapped virtual = physical + */ +#define LL_UART_PADDR UART0_PHYS +#define LL_UART_VADDR UART0_VIRT + +#endif