blob: 74cbda17c5b2de74c9c5cc13dc59e7da2cfe239d [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/* 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 Huntsman3f2bc4d2011-08-16 17:27:22 -070017#define __ASM_ARCH_MSM_UNCOMPRESS_H
Russell Kinga09e64f2008-08-05 16:14:15 +010018
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070019#include <linux/io.h>
20#include <asm/mach-types.h>
21#include <asm/processor.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010022
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070023#include <mach/msm_iomap.h>
24
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070025#ifndef CONFIG_DEBUG_ICEDCC
Russell Kinga09e64f2008-08-05 16:14:15 +010026static void putc(int c)
27{
Pavel Machek6339f662009-11-02 11:48:29 +010028#if defined(MSM_DEBUG_UART_PHYS)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070029 unsigned long base = MSM_DEBUG_UART_PHYS;
30
Sathish Ambleybb87d5f2011-11-08 15:14:01 -080031#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 Huntsman3f2bc4d2011-08-16 17:27:22 -070038 cpu_relax();
Sathish Ambleybb87d5f2011-11-08 15:14:01 -080039
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 Machek6339f662009-11-02 11:48:29 +010049#endif
Russell Kinga09e64f2008-08-05 16:14:15 +010050}
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070051#endif
Russell Kinga09e64f2008-08-05 16:14:15 +010052
53static inline void flush(void)
54{
55}
56
57static inline void arch_decomp_setup(void)
58{
Russell Kinga09e64f2008-08-05 16:14:15 +010059}
60
61static inline void arch_decomp_wdog(void)
62{
63}
64
65#endif