11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* 2a09e64fbc0094e3073dbb09c3b4bfe4ab669244bRussell King * arch/arm/mach-clps711x/include/mach/uncompress.h 31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 41da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Copyright (C) 2000 Deep Blue Solutions Ltd 51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * This program is free software; you can redistribute it and/or modify 71da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * it under the terms of the GNU General Public License as published by 81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * the Free Software Foundation; either version 2 of the License, or 91da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * (at your option) any later version. 101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * This program is distributed in the hope that it will be useful, 121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * but WITHOUT ANY WARRANTY; without even the implied warranty of 131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * GNU General Public License for more details. 151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * You should have received a copy of the GNU General Public License 171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * along with this program; if not, write to the Free Software 181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 20a09e64fbc0094e3073dbb09c3b4bfe4ab669244bRussell King#include <mach/hardware.h> 211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#include <asm/hardware/clps7111.h> 221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#undef CLPS7111_BASE 241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CLPS7111_BASE CLPS7111_PHYS_BASE 251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define __raw_readl(p) (*(unsigned long *)(p)) 271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define __raw_writel(v,p) (*(unsigned long *)(p) = (v)) 281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifdef CONFIG_DEBUG_CLPS711X_UART2 301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SYSFLGx SYSFLG2 311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UARTDRx UARTDR2 321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#else 331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SYSFLGx SYSFLG1 341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UARTDRx UARTDR1 351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif 361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* 381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * This does not append a newline 391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 40a081568d7016061ed848696984e3acf1ba0b3054Russell Kingstatic inline void putc(int c) 411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds{ 42a081568d7016061ed848696984e3acf1ba0b3054Russell King while (clps_readl(SYSFLGx) & SYSFLG_UTXFF) 43a081568d7016061ed848696984e3acf1ba0b3054Russell King barrier(); 44a081568d7016061ed848696984e3acf1ba0b3054Russell King clps_writel(c, UARTDRx); 45a081568d7016061ed848696984e3acf1ba0b3054Russell King} 461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 47a081568d7016061ed848696984e3acf1ba0b3054Russell Kingstatic inline void flush(void) 48a081568d7016061ed848696984e3acf1ba0b3054Russell King{ 491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds while (clps_readl(SYSFLGx) & SYSFLG_UBUSY) 501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds barrier(); 511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds} 521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* 541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * nothing to do 551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define arch_decomp_setup() 571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define arch_decomp_wdog() 59