Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 1 | /* arch/arm/mach-msm/include/mach/uncompress.h |
| 2 | * |
| 3 | * Copyright (C) 2007 Google, Inc. |
| 4 | * |
| 5 | * This software is licensed under the terms of the GNU General Public |
| 6 | * License version 2, as published by the Free Software Foundation, and |
| 7 | * may be copied, distributed, and modified under those terms. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | */ |
| 15 | |
| 16 | #ifndef __ASM_ARCH_MSM_UNCOMPRESS_H |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 17 | #define __ASM_ARCH_MSM_UNCOMPRESS_H |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 18 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 19 | #include <linux/io.h> |
| 20 | #include <asm/mach-types.h> |
| 21 | #include <asm/processor.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 22 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 23 | #include <mach/msm_iomap.h> |
| 24 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 25 | #ifndef CONFIG_DEBUG_ICEDCC |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 26 | static void putc(int c) |
| 27 | { |
Pavel Machek | 6339f66 | 2009-11-02 11:48:29 +0100 | [diff] [blame] | 28 | #if defined(MSM_DEBUG_UART_PHYS) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 29 | unsigned long base = MSM_DEBUG_UART_PHYS; |
| 30 | |
Sathish Ambley | bb87d5f | 2011-11-08 15:14:01 -0800 | [diff] [blame^] | 31 | #ifdef CONFIG_SERIAL_MSM_HSL |
| 32 | /* |
| 33 | * Wait for TX_READY to be set; but skip it if we have a |
| 34 | * TX underrun. |
| 35 | */ |
| 36 | if (__raw_readl(base + 0x08) & 0x08) |
| 37 | while (!(__raw_readl(base + 0x14) & 0x80)) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 38 | cpu_relax(); |
Sathish Ambley | bb87d5f | 2011-11-08 15:14:01 -0800 | [diff] [blame^] | 39 | |
| 40 | __raw_writel(0x300, base + 0x10); |
| 41 | __raw_writel(0x1, base + 0x40); |
| 42 | __raw_writel(c, base + 0x70); |
| 43 | #else |
| 44 | /* Wait for TX_READY to be set */ |
| 45 | while (!(__raw_readl(base + 0x08) & 0x04)) |
| 46 | cpu_relax(); |
| 47 | __raw_writel(c, base + 0x0c); |
| 48 | #endif |
Pavel Machek | 6339f66 | 2009-11-02 11:48:29 +0100 | [diff] [blame] | 49 | #endif |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 50 | } |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 51 | #endif |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 52 | |
| 53 | static inline void flush(void) |
| 54 | { |
| 55 | } |
| 56 | |
| 57 | static inline void arch_decomp_setup(void) |
| 58 | { |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | static inline void arch_decomp_wdog(void) |
| 62 | { |
| 63 | } |
| 64 | |
| 65 | #endif |