* [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines
@ 2011-10-23 21:10 Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 02/15] ARM: uncompress: Remove unused definition of ARCH_HAS_DECOMP_WATCHDOG Zoltan Devai
` (13 more replies)
0 siblings, 14 replies; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
arch_decomp_wdog is only used by lib/inflate.c which isn't used
by the ARM arch since 2.6.33.
Stop carrying it around and re-adding it with every new machine.
The only real user was the Samsung platform, but since this
feature wasn't working for over a year, it's probably
not needed at all.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/mach-at91/include/mach/uncompress.h | 2 -
arch/arm/mach-bcmring/include/mach/uncompress.h | 1 -
arch/arm/mach-clps711x/include/mach/uncompress.h | 2 -
arch/arm/mach-cns3xxx/include/mach/uncompress.h | 1 -
arch/arm/mach-davinci/include/mach/uncompress.h | 1 -
arch/arm/mach-dove/include/mach/uncompress.h | 1 -
arch/arm/mach-ebsa110/include/mach/uncompress.h | 1 -
arch/arm/mach-ep93xx/include/mach/uncompress.h | 2 -
| 1 -
arch/arm/mach-gemini/include/mach/uncompress.h | 2 -
arch/arm/mach-h720x/include/mach/uncompress.h | 1 -
arch/arm/mach-integrator/include/mach/uncompress.h | 2 -
arch/arm/mach-iop13xx/include/mach/uncompress.h | 1 -
arch/arm/mach-iop32x/include/mach/uncompress.h | 1 -
arch/arm/mach-iop33x/include/mach/uncompress.h | 1 -
arch/arm/mach-ixp2000/include/mach/uncompress.h | 1 -
arch/arm/mach-ixp23xx/include/mach/uncompress.h | 2 -
arch/arm/mach-ixp4xx/include/mach/uncompress.h | 2 -
arch/arm/mach-kirkwood/include/mach/uncompress.h | 1 -
arch/arm/mach-ks8695/include/mach/uncompress.h | 1 -
arch/arm/mach-lpc32xx/include/mach/uncompress.h | 1 -
arch/arm/mach-mmp/include/mach/uncompress.h | 6 ---
arch/arm/mach-msm/include/mach/uncompress.h | 4 --
arch/arm/mach-mv78xx0/include/mach/uncompress.h | 1 -
arch/arm/mach-mxs/include/mach/uncompress.h | 1 -
arch/arm/mach-netx/include/mach/uncompress.h | 1 -
arch/arm/mach-nomadik/include/mach/uncompress.h | 2 -
arch/arm/mach-orion5x/include/mach/uncompress.h | 1 -
arch/arm/mach-picoxcell/include/mach/uncompress.h | 1 -
arch/arm/mach-pnx4008/include/mach/uncompress.h | 1 -
arch/arm/mach-prima2/include/mach/uncompress.h | 2 -
arch/arm/mach-pxa/include/mach/uncompress.h | 5 ---
arch/arm/mach-realview/include/mach/uncompress.h | 1 -
arch/arm/mach-rpc/include/mach/uncompress.h | 5 ---
arch/arm/mach-s5p64x0/include/mach/uncompress.h | 33 --------------------
arch/arm/mach-sa1100/include/mach/uncompress.h | 1 -
arch/arm/mach-shark/include/mach/uncompress.h | 1 -
arch/arm/mach-shmobile/include/mach/uncompress.h | 2 -
arch/arm/mach-tegra/include/mach/uncompress.h | 4 --
arch/arm/mach-u300/include/mach/uncompress.h | 1 -
arch/arm/mach-ux500/include/mach/uncompress.h | 2 -
arch/arm/mach-versatile/include/mach/uncompress.h | 1 -
arch/arm/mach-vexpress/include/mach/uncompress.h | 1 -
arch/arm/mach-vt8500/include/mach/uncompress.h | 1 -
arch/arm/mach-w90x900/include/mach/uncompress.h | 2 -
arch/arm/mach-zynq/include/mach/uncompress.h | 2 -
arch/arm/plat-mxc/include/mach/uncompress.h | 1 -
arch/arm/plat-omap/include/plat/uncompress.h | 5 ---
arch/arm/plat-samsung/Kconfig | 8 -----
arch/arm/plat-samsung/include/plat/uncompress.h | 33 --------------------
arch/arm/plat-spear/include/plat/uncompress.h | 1 -
arch/arm/plat-tcc/include/mach/uncompress.h | 1 -
52 files changed, 0 insertions(+), 159 deletions(-)
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
index 18bdcde..b5dd672 100644
--- a/arch/arm/mach-at91/include/mach/uncompress.h
+++ b/arch/arm/mach-at91/include/mach/uncompress.h
@@ -71,6 +71,4 @@ static inline void flush(void)
#define arch_decomp_setup()
-#define arch_decomp_wdog()
-
#endif
diff --git a/arch/arm/mach-bcmring/include/mach/uncompress.h b/arch/arm/mach-bcmring/include/mach/uncompress.h
index 9c9821b..5419901 100644
--- a/arch/arm/mach-bcmring/include/mach/uncompress.h
+++ b/arch/arm/mach-bcmring/include/mach/uncompress.h
@@ -40,4 +40,3 @@ static inline void flush(void)
}
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index 7164310..2edd488 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -55,5 +55,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
index a91b605..7a030b9 100644
--- a/arch/arm/mach-cns3xxx/include/mach/uncompress.h
+++ b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
@@ -51,4 +51,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h
index 9dc7cf9..8d63753 100644
--- a/arch/arm/mach-davinci/include/mach/uncompress.h
+++ b/arch/arm/mach-davinci/include/mach/uncompress.h
@@ -103,4 +103,3 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
}
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h
index 2c5cdd7..5c8ae9b 100644
--- a/arch/arm/mach-dove/include/mach/uncompress.h
+++ b/arch/arm/mach-dove/include/mach/uncompress.h
@@ -34,4 +34,3 @@ static void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ebsa110/include/mach/uncompress.h b/arch/arm/mach-ebsa110/include/mach/uncompress.h
index 3204150..ab64bea 100644
--- a/arch/arm/mach-ebsa110/include/mach/uncompress.h
+++ b/arch/arm/mach-ebsa110/include/mach/uncompress.h
@@ -42,4 +42,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
index 16026c2..b2ecb98 100644
--- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -90,5 +90,3 @@ static void arch_decomp_setup(void)
{
ethernet_reset();
}
-
-#define arch_decomp_wdog()
--git a/arch/arm/mach-footbridge/include/mach/uncompress.h b/arch/arm/mach-footbridge/include/mach/uncompress.h
index 5dfa442..a69398c 100644
--- a/arch/arm/mach-footbridge/include/mach/uncompress.h
+++ b/arch/arm/mach-footbridge/include/mach/uncompress.h
@@ -35,4 +35,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-gemini/include/mach/uncompress.h b/arch/arm/mach-gemini/include/mach/uncompress.h
index 0efa262..02e2256 100644
--- a/arch/arm/mach-gemini/include/mach/uncompress.h
+++ b/arch/arm/mach-gemini/include/mach/uncompress.h
@@ -39,6 +39,4 @@ static inline void flush(void)
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
-
#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-h720x/include/mach/uncompress.h b/arch/arm/mach-h720x/include/mach/uncompress.h
index d662323..43e343c 100644
--- a/arch/arm/mach-h720x/include/mach/uncompress.h
+++ b/arch/arm/mach-h720x/include/mach/uncompress.h
@@ -32,6 +32,5 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
#endif
diff --git a/arch/arm/mach-integrator/include/mach/uncompress.h b/arch/arm/mach-integrator/include/mach/uncompress.h
index 30452f0..8f3cc99 100644
--- a/arch/arm/mach-integrator/include/mach/uncompress.h
+++ b/arch/arm/mach-integrator/include/mach/uncompress.h
@@ -46,5 +46,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-iop13xx/include/mach/uncompress.h b/arch/arm/mach-iop13xx/include/mach/uncompress.h
index fa4f805..d3791ec 100644
--- a/arch/arm/mach-iop13xx/include/mach/uncompress.h
+++ b/arch/arm/mach-iop13xx/include/mach/uncompress.h
@@ -20,4 +20,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
index 4fd7154..b3d45fd 100644
--- a/arch/arm/mach-iop32x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop32x/include/mach/uncompress.h
@@ -36,4 +36,3 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
* nothing to do
*/
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-iop33x/include/mach/uncompress.h b/arch/arm/mach-iop33x/include/mach/uncompress.h
index f99bb84..ed282e1 100644
--- a/arch/arm/mach-iop33x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop33x/include/mach/uncompress.h
@@ -34,4 +34,3 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
* nothing to do
*/
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ixp2000/include/mach/uncompress.h b/arch/arm/mach-ixp2000/include/mach/uncompress.h
index ce36308..126e5d7 100644
--- a/arch/arm/mach-ixp2000/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp2000/include/mach/uncompress.h
@@ -44,4 +44,3 @@ static inline void flush(void)
}
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ixp23xx/include/mach/uncompress.h b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
index 8b4c358..1ac7020 100644
--- a/arch/arm/mach-ixp23xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
@@ -34,7 +34,5 @@ static inline void flush(void)
}
#define arch_decomp_setup()
-#define arch_decomp_wdog()
-
#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
index eb945a9..7b25c02 100644
--- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
@@ -53,6 +53,4 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
*/
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-#define arch_decomp_wdog()
-
#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/uncompress.h b/arch/arm/mach-kirkwood/include/mach/uncompress.h
index 75d5497..5bca553 100644
--- a/arch/arm/mach-kirkwood/include/mach/uncompress.h
+++ b/arch/arm/mach-kirkwood/include/mach/uncompress.h
@@ -44,4 +44,3 @@ static void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ks8695/include/mach/uncompress.h b/arch/arm/mach-ks8695/include/mach/uncompress.h
index 9495cb4..9a54080 100644
--- a/arch/arm/mach-ks8695/include/mach/uncompress.h
+++ b/arch/arm/mach-ks8695/include/mach/uncompress.h
@@ -32,6 +32,5 @@ static inline void flush(void)
}
#define arch_decomp_setup()
-#define arch_decomp_wdog()
#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/uncompress.h b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
index c142487..1198a89 100644
--- a/arch/arm/mach-lpc32xx/include/mach/uncompress.h
+++ b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
@@ -55,6 +55,5 @@ static inline void flush(void)
/* NULL functions; we don't presently need them */
#define arch_decomp_setup()
-#define arch_decomp_wdog()
#endif
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h
index d6daeb7..8890fa8 100644
--- a/arch/arm/mach-mmp/include/mach/uncompress.h
+++ b/arch/arm/mach-mmp/include/mach/uncompress.h
@@ -43,9 +43,3 @@ static inline void arch_decomp_setup(void)
if (machine_is_avengers_lite())
UART = (unsigned long *)UART3_BASE;
}
-
-/*
- * nothing to do
- */
-
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
index d94292c..0fe7930 100644
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -36,8 +36,4 @@ static inline void arch_decomp_setup(void)
{
}
-static inline void arch_decomp_wdog(void)
-{
-}
-
#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/uncompress.h b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
index 3652642..6a761c4 100644
--- a/arch/arm/mach-mv78xx0/include/mach/uncompress.h
+++ b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
@@ -44,4 +44,3 @@ static void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-mxs/include/mach/uncompress.h b/arch/arm/mach-mxs/include/mach/uncompress.h
index 7f8bf65..6ab8972 100644
--- a/arch/arm/mach-mxs/include/mach/uncompress.h
+++ b/arch/arm/mach-mxs/include/mach/uncompress.h
@@ -72,6 +72,5 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
}
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-#define arch_decomp_wdog()
#endif /* __MACH_MXS_UNCOMPRESS_H__ */
diff --git a/arch/arm/mach-netx/include/mach/uncompress.h b/arch/arm/mach-netx/include/mach/uncompress.h
index 84f9128..5cb1051 100644
--- a/arch/arm/mach-netx/include/mach/uncompress.h
+++ b/arch/arm/mach-netx/include/mach/uncompress.h
@@ -73,4 +73,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-nomadik/include/mach/uncompress.h b/arch/arm/mach-nomadik/include/mach/uncompress.h
index 071003b..765bff1 100644
--- a/arch/arm/mach-nomadik/include/mach/uncompress.h
+++ b/arch/arm/mach-nomadik/include/mach/uncompress.h
@@ -58,6 +58,4 @@ static inline void arch_decomp_setup(void)
{
}
-#define arch_decomp_wdog() /* nothing to do here */
-
#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-orion5x/include/mach/uncompress.h b/arch/arm/mach-orion5x/include/mach/uncompress.h
index 4322dba..abd26b5 100644
--- a/arch/arm/mach-orion5x/include/mach/uncompress.h
+++ b/arch/arm/mach-orion5x/include/mach/uncompress.h
@@ -46,4 +46,3 @@ static void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-picoxcell/include/mach/uncompress.h b/arch/arm/mach-picoxcell/include/mach/uncompress.h
index b60b19d..db46249 100644
--- a/arch/arm/mach-picoxcell/include/mach/uncompress.h
+++ b/arch/arm/mach-picoxcell/include/mach/uncompress.h
@@ -18,4 +18,3 @@
#define putc(c)
#define flush()
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-pnx4008/include/mach/uncompress.h b/arch/arm/mach-pnx4008/include/mach/uncompress.h
index bb4751e..26b507d 100644
--- a/arch/arm/mach-pnx4008/include/mach/uncompress.h
+++ b/arch/arm/mach-pnx4008/include/mach/uncompress.h
@@ -43,4 +43,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-prima2/include/mach/uncompress.h
index 83125c6..1e17796 100644
--- a/arch/arm/mach-prima2/include/mach/uncompress.h
+++ b/arch/arm/mach-prima2/include/mach/uncompress.h
@@ -17,8 +17,6 @@ void arch_decomp_setup(void)
{
}
-#define arch_decomp_wdog()
-
static __inline__ void putc(char c)
{
/*
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
index 5519a34..8c27757 100644
--- a/arch/arm/mach-pxa/include/mach/uncompress.h
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -72,8 +72,3 @@ static inline void arch_decomp_setup(void)
uart_is_pxa = 0;
}
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-realview/include/mach/uncompress.h b/arch/arm/mach-realview/include/mach/uncompress.h
index 83050378..cfa30d2 100644
--- a/arch/arm/mach-realview/include/mach/uncompress.h
+++ b/arch/arm/mach-realview/include/mach/uncompress.h
@@ -75,4 +75,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-rpc/include/mach/uncompress.h b/arch/arm/mach-rpc/include/mach/uncompress.h
index 9cd9bcd..0fd4b0b 100644
--- a/arch/arm/mach-rpc/include/mach/uncompress.h
+++ b/arch/arm/mach-rpc/include/mach/uncompress.h
@@ -189,8 +189,3 @@ static void arch_decomp_setup(void)
if (nr_pages * page_size < 4096*1024) error("<4M of mem\n");
}
#endif
-
-/*
- * nothing to do
- */
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-s5p64x0/include/mach/uncompress.h b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
index 1608faf..00b70b8 100644
--- a/arch/arm/mach-s5p64x0/include/mach/uncompress.h
+++ b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
@@ -36,10 +36,6 @@ static void arch_detect_cpu(void);
#include <plat/regs-serial.h>
#include <plat/regs-watchdog.h>
-/* working in physical space... */
-#undef S3C2410_WDOGREG
-#define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x)))
-
/* how many bytes we allow into the FIFO at a time in FIFO mode */
#define FIFO_MAX (14)
@@ -116,34 +112,6 @@ static inline void flush(void)
*((volatile unsigned int __force *)(ad)) = (d); \
} while (0)
-/*
- * CONFIG_S3C_BOOT_WATCHDOG
- *
- * Simple boot-time watchdog setup, to reboot the system if there is
- * any problem with the boot process
- */
-
-#ifdef CONFIG_S3C_BOOT_WATCHDOG
-
-#define WDOG_COUNT (0xff00)
-
-static inline void arch_decomp_wdog(void)
-{
- __raw_writel(WDOG_COUNT, S3C2410_WTCNT);
-}
-
-static void arch_decomp_wdog_start(void)
-{
- __raw_writel(WDOG_COUNT, S3C2410_WTDAT);
- __raw_writel(WDOG_COUNT, S3C2410_WTCNT);
- __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON);
-}
-
-#else
-#define arch_decomp_wdog_start()
-#define arch_decomp_wdog()
-#endif
-
#ifdef CONFIG_S3C_BOOT_ERROR_RESET
static void arch_decomp_error(const char *x)
@@ -192,7 +160,6 @@ static void arch_decomp_setup(void)
*/
arch_detect_cpu();
- arch_decomp_wdog_start();
/*
* Enable the UART FIFOs if they where not enabled and our
diff --git a/arch/arm/mach-sa1100/include/mach/uncompress.h b/arch/arm/mach-sa1100/include/mach/uncompress.h
index 6cb39dd..a834962 100644
--- a/arch/arm/mach-sa1100/include/mach/uncompress.h
+++ b/arch/arm/mach-sa1100/include/mach/uncompress.h
@@ -47,4 +47,3 @@ static inline void flush(void)
* Nothing to do for these
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
index 22ccab4..a168435 100644
--- a/arch/arm/mach-shark/include/mach/uncompress.h
+++ b/arch/arm/mach-shark/include/mach/uncompress.h
@@ -48,4 +48,3 @@ static void putr()
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-shmobile/include/mach/uncompress.h b/arch/arm/mach-shmobile/include/mach/uncompress.h
index 0bd7556..f1aee56 100644
--- a/arch/arm/mach-shmobile/include/mach/uncompress.h
+++ b/arch/arm/mach-shmobile/include/mach/uncompress.h
@@ -16,6 +16,4 @@ static void arch_decomp_setup(void)
{
}
-#define arch_decomp_wdog()
-
#endif /* __ASM_MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-tegra/include/mach/uncompress.h b/arch/arm/mach-tegra/include/mach/uncompress.h
index 4e83237..565daa6 100644
--- a/arch/arm/mach-tegra/include/mach/uncompress.h
+++ b/arch/arm/mach-tegra/include/mach/uncompress.h
@@ -57,8 +57,4 @@ static inline void arch_decomp_setup(void)
uart[UART_LCR << shift] = 3;
}
-static inline void arch_decomp_wdog(void)
-{
-}
-
#endif
diff --git a/arch/arm/mach-u300/include/mach/uncompress.h b/arch/arm/mach-u300/include/mach/uncompress.h
index 29acb71..783e7e6 100644
--- a/arch/arm/mach-u300/include/mach/uncompress.h
+++ b/arch/arm/mach-u300/include/mach/uncompress.h
@@ -43,4 +43,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
index 6fb3c4b..ec957e8 100644
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ b/arch/arm/mach-ux500/include/mach/uncompress.h
@@ -57,6 +57,4 @@ static inline void arch_decomp_setup(void)
ux500_uart_base = U8500_UART2_BASE;
}
-#define arch_decomp_wdog() /* nothing to do here */
-
#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-versatile/include/mach/uncompress.h b/arch/arm/mach-versatile/include/mach/uncompress.h
index 3dd0048..986e3d3 100644
--- a/arch/arm/mach-versatile/include/mach/uncompress.h
+++ b/arch/arm/mach-versatile/include/mach/uncompress.h
@@ -43,4 +43,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-vexpress/include/mach/uncompress.h b/arch/arm/mach-vexpress/include/mach/uncompress.h
index 7972c57..a16872b 100644
--- a/arch/arm/mach-vexpress/include/mach/uncompress.h
+++ b/arch/arm/mach-vexpress/include/mach/uncompress.h
@@ -49,4 +49,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-vt8500/include/mach/uncompress.h b/arch/arm/mach-vt8500/include/mach/uncompress.h
index bb9e2d2..14ec0ec 100644
--- a/arch/arm/mach-vt8500/include/mach/uncompress.h
+++ b/arch/arm/mach-vt8500/include/mach/uncompress.h
@@ -34,4 +34,3 @@ static void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-w90x900/include/mach/uncompress.h b/arch/arm/mach-w90x900/include/mach/uncompress.h
index 0313021..4b7c324 100644
--- a/arch/arm/mach-w90x900/include/mach/uncompress.h
+++ b/arch/arm/mach-w90x900/include/mach/uncompress.h
@@ -24,8 +24,6 @@
#include <mach/map.h>
#include <linux/serial_reg.h>
-#define arch_decomp_wdog()
-
#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
static volatile u32 * const uart_base = (u32 *)UART0_PA;
diff --git a/arch/arm/mach-zynq/include/mach/uncompress.h b/arch/arm/mach-zynq/include/mach/uncompress.h
index af4e844..11c3216 100644
--- a/arch/arm/mach-zynq/include/mach/uncompress.h
+++ b/arch/arm/mach-zynq/include/mach/uncompress.h
@@ -34,8 +34,6 @@ static inline void flush(void)
cpu_relax();
}
-#define arch_decomp_wdog()
-
static void putc(char ch)
{
/*
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index 88fd404..d9412a1 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -126,6 +126,5 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
}
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-#define arch_decomp_wdog()
#endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 2f472e9..c5111bd 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -183,8 +183,3 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
}
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-
-/*
- * nothing to do
- */
-#define arch_decomp_wdog()
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 49a134f..6c49c35 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -19,14 +19,6 @@ if PLAT_SAMSUNG
comment "Boot options"
-config S3C_BOOT_WATCHDOG
- bool "S3C Initialisation watchdog"
- depends on S3C2410_WATCHDOG
- help
- Say y to enable the watchdog during the kernel decompression
- stage. If the kernel fails to uncompress, then the watchdog
- will trigger a reset and the system should restart.
-
config S3C_BOOT_ERROR_RESET
bool "S3C Reboot on decompression error"
help
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index ee48e12..94fecf9 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -30,10 +30,6 @@ static void arch_detect_cpu(void);
#include <plat/regs-serial.h>
#include <plat/regs-watchdog.h>
-/* working in physical space... */
-#undef S3C2410_WDOGREG
-#define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x)))
-
/* how many bytes we allow into the FIFO at a time in FIFO mode */
#define FIFO_MAX (14)
@@ -95,33 +91,6 @@ static inline void flush(void)
*((volatile unsigned int __force *)(ad)) = (d); \
} while (0)
-/* CONFIG_S3C_BOOT_WATCHDOG
- *
- * Simple boot-time watchdog setup, to reboot the system if there is
- * any problem with the boot process
-*/
-
-#ifdef CONFIG_S3C_BOOT_WATCHDOG
-
-#define WDOG_COUNT (0xff00)
-
-static inline void arch_decomp_wdog(void)
-{
- __raw_writel(WDOG_COUNT, S3C2410_WTCNT);
-}
-
-static void arch_decomp_wdog_start(void)
-{
- __raw_writel(WDOG_COUNT, S3C2410_WTDAT);
- __raw_writel(WDOG_COUNT, S3C2410_WTCNT);
- __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON);
-}
-
-#else
-#define arch_decomp_wdog_start()
-#define arch_decomp_wdog()
-#endif
-
#ifdef CONFIG_S3C_BOOT_ERROR_RESET
static void arch_decomp_error(const char *x)
@@ -161,7 +130,6 @@ static inline void arch_enable_uart_fifo(void)
#define arch_enable_uart_fifo() do { } while(0)
#endif
-
static void
arch_decomp_setup(void)
{
@@ -171,7 +139,6 @@ arch_decomp_setup(void)
*/
arch_detect_cpu();
- arch_decomp_wdog_start();
/* Enable the UART FIFOs if they where not enabled and our
* configuration says we should turn them on.
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h
index 1bf8452..b631aab 100644
--- a/arch/arm/plat-spear/include/plat/uncompress.h
+++ b/arch/arm/plat-spear/include/plat/uncompress.h
@@ -38,6 +38,5 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
#endif /* __PLAT_UNCOMPRESS_H */
diff --git a/arch/arm/plat-tcc/include/mach/uncompress.h b/arch/arm/plat-tcc/include/mach/uncompress.h
index 7a3e33a..2e9c2bb 100644
--- a/arch/arm/plat-tcc/include/mach/uncompress.h
+++ b/arch/arm/plat-tcc/include/mach/uncompress.h
@@ -31,4 +31,3 @@ static inline void flush(void)
* nothing to do
*/
#define arch_decomp_setup()
-#define arch_decomp_wdog()
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 02/15] ARM: uncompress: Remove unused definition of ARCH_HAS_DECOMP_WATCHDOG
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 03/15] ARM: uncompress.h: Introduce ARCH_HAVE_DECOMP_SETUP Zoltan Devai
` (12 subsequent siblings)
13 siblings, 0 replies; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
This was only used by the old inflate code, which isn't used
anymore by ARM.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/decompress.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c
index 07be5a2..75b1605 100644
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -13,8 +13,6 @@ extern void error(char *);
#define STATIC static
#define STATIC_RW_DATA /* non-static please */
-#define ARCH_HAS_DECOMP_WDOG
-
/* Diagnostic functions */
#ifdef DEBUG
# define Assert(cond,msg) {if(!(cond)) error(msg);}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 03/15] ARM: uncompress.h: Introduce ARCH_HAVE_DECOMP_SETUP
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 02/15] ARM: uncompress: Remove unused definition of ARCH_HAS_DECOMP_WATCHDOG Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 04/15] ARM: uncompress: Only call arch_decomp_setup when needed Zoltan Devai
` (11 subsequent siblings)
13 siblings, 0 replies; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
Add this define to machines which really make use of
this function.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/mach-davinci/include/mach/uncompress.h | 1 +
arch/arm/mach-ep93xx/include/mach/uncompress.h | 1 +
arch/arm/mach-iop32x/include/mach/uncompress.h | 4 +---
arch/arm/mach-iop33x/include/mach/uncompress.h | 4 +---
arch/arm/mach-ixp4xx/include/mach/uncompress.h | 1 +
arch/arm/mach-mmp/include/mach/uncompress.h | 2 ++
arch/arm/mach-mxs/include/mach/uncompress.h | 1 +
arch/arm/mach-pxa/include/mach/uncompress.h | 2 ++
arch/arm/mach-rpc/include/mach/uncompress.h | 2 ++
arch/arm/mach-s5p64x0/include/mach/uncompress.h | 2 ++
arch/arm/mach-tegra/include/mach/uncompress.h | 2 ++
arch/arm/mach-ux500/include/mach/uncompress.h | 2 ++
arch/arm/plat-mxc/include/mach/uncompress.h | 1 +
arch/arm/plat-omap/include/plat/uncompress.h | 1 +
arch/arm/plat-samsung/include/plat/uncompress.h | 2 ++
15 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h
index 8d63753..1947ff9 100644
--- a/arch/arm/mach-davinci/include/mach/uncompress.h
+++ b/arch/arm/mach-davinci/include/mach/uncompress.h
@@ -102,4 +102,5 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
} while (0);
}
+#define ARCH_HAVE_DECOMP_SETUP
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
index b2ecb98..f1cd638 100644
--- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -85,6 +85,7 @@ static void ethernet_reset(void)
;
}
+#define ARCH_HAVE_DECOMP_SETUP
static void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
index b3d45fd..c1ff29a 100644
--- a/arch/arm/mach-iop32x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop32x/include/mach/uncompress.h
@@ -32,7 +32,5 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
uart_base = (volatile u8 *)0xfe800000;
}
-/*
- * nothing to do
- */
+#define ARCH_HAVE_DECOMP_SETUP
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
diff --git a/arch/arm/mach-iop33x/include/mach/uncompress.h b/arch/arm/mach-iop33x/include/mach/uncompress.h
index ed282e1..9537d4b 100644
--- a/arch/arm/mach-iop33x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop33x/include/mach/uncompress.h
@@ -30,7 +30,5 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
uart_base = (volatile u32 *)0xfe800000;
}
-/*
- * nothing to do
- */
+#define ARCH_HAVE_DECOMP_SETUP
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
index 7b25c02..0a0102c 100644
--- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
@@ -51,6 +51,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
/*
* arch_id is a variable in decompress_kernel()
*/
+#define ARCH_HAVE_DECOMP_SETUP
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
#endif
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h
index 8890fa8..8c58b57 100644
--- a/arch/arm/mach-mmp/include/mach/uncompress.h
+++ b/arch/arm/mach-mmp/include/mach/uncompress.h
@@ -35,6 +35,8 @@ static inline void flush(void)
{
}
+#define ARCH_HAVE_DECOMP_SETUP
+
static inline void arch_decomp_setup(void)
{
/* default to UART2 */
diff --git a/arch/arm/mach-mxs/include/mach/uncompress.h b/arch/arm/mach-mxs/include/mach/uncompress.h
index 6ab8972..eded40b 100644
--- a/arch/arm/mach-mxs/include/mach/uncompress.h
+++ b/arch/arm/mach-mxs/include/mach/uncompress.h
@@ -71,6 +71,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
}
}
+#define ARCH_HAVE_DECOMP_SETUP
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
#endif /* __MACH_MXS_UNCOMPRESS_H__ */
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
index 8c27757..28acded 100644
--- a/arch/arm/mach-pxa/include/mach/uncompress.h
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -54,6 +54,8 @@ static inline void flush(void)
{
}
+#define ARCH_HAVE_DECOMP_SETUP
+
static inline void arch_decomp_setup(void)
{
/* initialize to default */
diff --git a/arch/arm/mach-rpc/include/mach/uncompress.h b/arch/arm/mach-rpc/include/mach/uncompress.h
index 0fd4b0b..5ea3974 100644
--- a/arch/arm/mach-rpc/include/mach/uncompress.h
+++ b/arch/arm/mach-rpc/include/mach/uncompress.h
@@ -109,6 +109,8 @@ static inline void flush(void)
{
}
+#define ARCH_HAVE_DECOMP_SETUP
+
/*
* Setup for decompression
*/
diff --git a/arch/arm/mach-s5p64x0/include/mach/uncompress.h b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
index 00b70b8..8d537eb 100644
--- a/arch/arm/mach-s5p64x0/include/mach/uncompress.h
+++ b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
@@ -151,6 +151,8 @@ static inline void arch_enable_uart_fifo(void)
#define arch_enable_uart_fifo() do { } while(0)
#endif
+#define ARCH_HAVE_DECOMP_SETUP
+
static void arch_decomp_setup(void)
{
/*
diff --git a/arch/arm/mach-tegra/include/mach/uncompress.h b/arch/arm/mach-tegra/include/mach/uncompress.h
index 565daa6..1b07047 100644
--- a/arch/arm/mach-tegra/include/mach/uncompress.h
+++ b/arch/arm/mach-tegra/include/mach/uncompress.h
@@ -43,6 +43,8 @@ static inline void flush(void)
{
}
+#define ARCH_HAVE_DECOMP_SETUP
+
static inline void arch_decomp_setup(void)
{
volatile u8 *uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE;
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
index ec957e8..d096c99 100644
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ b/arch/arm/mach-ux500/include/mach/uncompress.h
@@ -48,6 +48,8 @@ static void flush(void)
barrier();
}
+#define ARCH_HAVE_DECOMP_SETUP
+
static inline void arch_decomp_setup(void)
{
/* Check in run time if we run on an U8500 or U5500 */
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index d9412a1..6e43f5e 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -125,6 +125,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
}
}
+#define ARCH_HAVE_DECOMP_SETUP
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
#endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index c5111bd..860c02b 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -182,4 +182,5 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
} while (0);
}
+#define ARCH_HAVE_DECOMP_SETUP
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index 94fecf9..b10e0be 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -130,6 +130,8 @@ static inline void arch_enable_uart_fifo(void)
#define arch_enable_uart_fifo() do { } while(0)
#endif
+#define ARCH_HAVE_DECOMP_SETUP
+
static void
arch_decomp_setup(void)
{
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 04/15] ARM: uncompress: Only call arch_decomp_setup when needed
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 02/15] ARM: uncompress: Remove unused definition of ARCH_HAS_DECOMP_WATCHDOG Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 03/15] ARM: uncompress.h: Introduce ARCH_HAVE_DECOMP_SETUP Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-24 6:55 ` Uwe Kleine-König
2011-10-23 21:10 ` [RFC PATCH 05/15] ARM: uncompress.h: Remove unused arch_decomp_setup declarations Zoltan Devai
` (10 subsequent siblings)
13 siblings, 1 reply; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
As only the minority of the machines uses arch_decomp_setup,
ifdef it out when not needed, to avoid needless defines in
all uncompress.h files.
Machines using this feature should add
in their uncompress.h headers.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/misc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 8e2a8fc..a4b8df2 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -142,7 +142,9 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
free_mem_end_ptr = free_mem_ptr_end_p;
__machine_arch_type = arch_id;
+#ifdef ARCH_HAVE_DECOMP_SETUP
arch_decomp_setup();
+#endif /* ARCH_HAVE_DECOMP_SETUP */
putstr("Uncompressing Linux...");
ret = do_decompress(input_data, input_data_end - input_data,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 05/15] ARM: uncompress.h: Remove unused arch_decomp_setup declarations
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (2 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 04/15] ARM: uncompress: Only call arch_decomp_setup when needed Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 06/15] ARM: uncompress: Remove unused Trace functions Zoltan Devai
` (9 subsequent siblings)
13 siblings, 0 replies; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
Now that the decompressor code only calls this function
when ARCH_HAVE_DECOMP_SETUP is defined, the unused empty
declarations can go away.
As an added bonus, over 30 comments stating "nothing to do"
get deleted, making the ARM arch more busy than ever.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/mach-at91/include/mach/uncompress.h | 2 --
arch/arm/mach-bcmring/include/mach/uncompress.h | 2 --
arch/arm/mach-clps711x/include/mach/uncompress.h | 5 -----
arch/arm/mach-cns3xxx/include/mach/uncompress.h | 5 -----
arch/arm/mach-dove/include/mach/uncompress.h | 5 -----
arch/arm/mach-ebsa110/include/mach/uncompress.h | 5 -----
| 5 -----
arch/arm/mach-gemini/include/mach/uncompress.h | 5 -----
arch/arm/mach-h720x/include/mach/uncompress.h | 5 -----
arch/arm/mach-integrator/include/mach/uncompress.h | 5 -----
arch/arm/mach-iop13xx/include/mach/uncompress.h | 5 -----
arch/arm/mach-ixp2000/include/mach/uncompress.h | 2 --
arch/arm/mach-ixp23xx/include/mach/uncompress.h | 2 --
arch/arm/mach-kirkwood/include/mach/uncompress.h | 5 -----
arch/arm/mach-ks8695/include/mach/uncompress.h | 2 --
arch/arm/mach-lpc32xx/include/mach/uncompress.h | 3 ---
arch/arm/mach-msm/include/mach/uncompress.h | 4 ----
arch/arm/mach-mv78xx0/include/mach/uncompress.h | 5 -----
arch/arm/mach-netx/include/mach/uncompress.h | 5 -----
arch/arm/mach-nomadik/include/mach/uncompress.h | 4 ----
arch/arm/mach-orion5x/include/mach/uncompress.h | 5 -----
arch/arm/mach-picoxcell/include/mach/uncompress.h | 1 -
arch/arm/mach-pnx4008/include/mach/uncompress.h | 5 -----
arch/arm/mach-prima2/include/mach/uncompress.h | 4 ----
arch/arm/mach-realview/include/mach/uncompress.h | 5 -----
arch/arm/mach-sa1100/include/mach/uncompress.h | 5 -----
arch/arm/mach-shark/include/mach/uncompress.h | 5 -----
arch/arm/mach-shmobile/include/mach/uncompress.h | 4 ----
arch/arm/mach-u300/include/mach/uncompress.h | 5 -----
arch/arm/mach-versatile/include/mach/uncompress.h | 5 -----
arch/arm/mach-vexpress/include/mach/uncompress.h | 5 -----
arch/arm/mach-vt8500/include/mach/uncompress.h | 5 -----
arch/arm/mach-w90x900/include/mach/uncompress.h | 4 ----
arch/arm/mach-zynq/include/mach/uncompress.h | 4 ----
arch/arm/plat-spear/include/plat/uncompress.h | 5 -----
arch/arm/plat-tcc/include/mach/uncompress.h | 5 -----
36 files changed, 0 insertions(+), 153 deletions(-)
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
index b5dd672..c644b13 100644
--- a/arch/arm/mach-at91/include/mach/uncompress.h
+++ b/arch/arm/mach-at91/include/mach/uncompress.h
@@ -69,6 +69,4 @@ static inline void flush(void)
#endif
}
-#define arch_decomp_setup()
-
#endif
diff --git a/arch/arm/mach-bcmring/include/mach/uncompress.h b/arch/arm/mach-bcmring/include/mach/uncompress.h
index 5419901..7a365aa 100644
--- a/arch/arm/mach-bcmring/include/mach/uncompress.h
+++ b/arch/arm/mach-bcmring/include/mach/uncompress.h
@@ -38,5 +38,3 @@ static inline void flush(void)
while (BCMRING_UART_0_FR & (1 << 3))
;
}
-
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index 2edd488..3090a43 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -50,8 +50,3 @@ static inline void flush(void)
while (clps_readl(SYSFLGx) & SYSFLG_UBUSY)
barrier();
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
index 7a030b9..255a167 100644
--- a/arch/arm/mach-cns3xxx/include/mach/uncompress.h
+++ b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
@@ -46,8 +46,3 @@ static inline void flush(void)
while (AMBA_UART_FR(base) & (1 << 3))
barrier();
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h
index 5c8ae9b..3bc22a1 100644
--- a/arch/arm/mach-dove/include/mach/uncompress.h
+++ b/arch/arm/mach-dove/include/mach/uncompress.h
@@ -29,8 +29,3 @@ static void putc(const char c)
static void flush(void)
{
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-ebsa110/include/mach/uncompress.h b/arch/arm/mach-ebsa110/include/mach/uncompress.h
index ab64bea..507ec2a 100644
--- a/arch/arm/mach-ebsa110/include/mach/uncompress.h
+++ b/arch/arm/mach-ebsa110/include/mach/uncompress.h
@@ -37,8 +37,3 @@ static inline void flush(void)
} while ((v & (UART_LSR_TEMT|UART_LSR_THRE)) !=
(UART_LSR_TEMT|UART_LSR_THRE));
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
--git a/arch/arm/mach-footbridge/include/mach/uncompress.h b/arch/arm/mach-footbridge/include/mach/uncompress.h
index a69398c..36313de 100644
--- a/arch/arm/mach-footbridge/include/mach/uncompress.h
+++ b/arch/arm/mach-footbridge/include/mach/uncompress.h
@@ -30,8 +30,3 @@ static inline void putc(char c)
static inline void flush(void)
{
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-gemini/include/mach/uncompress.h b/arch/arm/mach-gemini/include/mach/uncompress.h
index 02e2256..1828862 100644
--- a/arch/arm/mach-gemini/include/mach/uncompress.h
+++ b/arch/arm/mach-gemini/include/mach/uncompress.h
@@ -34,9 +34,4 @@ static inline void flush(void)
{
}
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-
#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-h720x/include/mach/uncompress.h b/arch/arm/mach-h720x/include/mach/uncompress.h
index 43e343c..46c8d5a 100644
--- a/arch/arm/mach-h720x/include/mach/uncompress.h
+++ b/arch/arm/mach-h720x/include/mach/uncompress.h
@@ -28,9 +28,4 @@ static inline void flush(void)
{
}
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-
#endif
diff --git a/arch/arm/mach-integrator/include/mach/uncompress.h b/arch/arm/mach-integrator/include/mach/uncompress.h
index 8f3cc99..9f61543 100644
--- a/arch/arm/mach-integrator/include/mach/uncompress.h
+++ b/arch/arm/mach-integrator/include/mach/uncompress.h
@@ -41,8 +41,3 @@ static inline void flush(void)
while (AMBA_UART_FR & (1 << 3))
barrier();
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-iop13xx/include/mach/uncompress.h b/arch/arm/mach-iop13xx/include/mach/uncompress.h
index d3791ec..bfa8eac 100644
--- a/arch/arm/mach-iop13xx/include/mach/uncompress.h
+++ b/arch/arm/mach-iop13xx/include/mach/uncompress.h
@@ -15,8 +15,3 @@ static inline void putc(char c)
static inline void flush(void)
{
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-ixp2000/include/mach/uncompress.h b/arch/arm/mach-ixp2000/include/mach/uncompress.h
index 126e5d7..519ba97 100644
--- a/arch/arm/mach-ixp2000/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp2000/include/mach/uncompress.h
@@ -42,5 +42,3 @@ static inline void putc(int c)
static inline void flush(void)
{
}
-
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-ixp23xx/include/mach/uncompress.h b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
index 1ac7020..ab23cbb 100644
--- a/arch/arm/mach-ixp23xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
@@ -33,6 +33,4 @@ static inline void flush(void)
{
}
-#define arch_decomp_setup()
-
#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/uncompress.h b/arch/arm/mach-kirkwood/include/mach/uncompress.h
index 5bca553..1fc91eb 100644
--- a/arch/arm/mach-kirkwood/include/mach/uncompress.h
+++ b/arch/arm/mach-kirkwood/include/mach/uncompress.h
@@ -39,8 +39,3 @@ static void flush(void)
barrier();
}
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-ks8695/include/mach/uncompress.h b/arch/arm/mach-ks8695/include/mach/uncompress.h
index 9a54080..548c43b 100644
--- a/arch/arm/mach-ks8695/include/mach/uncompress.h
+++ b/arch/arm/mach-ks8695/include/mach/uncompress.h
@@ -31,6 +31,4 @@ static inline void flush(void)
barrier();
}
-#define arch_decomp_setup()
-
#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/uncompress.h b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
index 1198a89..36176e2 100644
--- a/arch/arm/mach-lpc32xx/include/mach/uncompress.h
+++ b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
@@ -53,7 +53,4 @@ static inline void flush(void)
UART_FIFO_CTL_TX_RESET, _UARTREG(LPC32XX_UART_IIRFCR_O));
}
-/* NULL functions; we don't presently need them */
-#define arch_decomp_setup()
-
#endif
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
index 0fe7930..7fa472d 100644
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -32,8 +32,4 @@ static inline void flush(void)
{
}
-static inline void arch_decomp_setup(void)
-{
-}
-
#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/uncompress.h b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
index 6a761c4..d26eb30 100644
--- a/arch/arm/mach-mv78xx0/include/mach/uncompress.h
+++ b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
@@ -39,8 +39,3 @@ static void flush(void)
barrier();
}
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-netx/include/mach/uncompress.h b/arch/arm/mach-netx/include/mach/uncompress.h
index 5cb1051..0e011ee 100644
--- a/arch/arm/mach-netx/include/mach/uncompress.h
+++ b/arch/arm/mach-netx/include/mach/uncompress.h
@@ -68,8 +68,3 @@ static inline void flush(void)
while (REG(base + UART_FR) & FR_BUSY);
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-nomadik/include/mach/uncompress.h b/arch/arm/mach-nomadik/include/mach/uncompress.h
index 765bff1..08f6615 100644
--- a/arch/arm/mach-nomadik/include/mach/uncompress.h
+++ b/arch/arm/mach-nomadik/include/mach/uncompress.h
@@ -54,8 +54,4 @@ static void flush(void)
barrier();
}
-static inline void arch_decomp_setup(void)
-{
-}
-
#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-orion5x/include/mach/uncompress.h b/arch/arm/mach-orion5x/include/mach/uncompress.h
index abd26b5..a4dca1c 100644
--- a/arch/arm/mach-orion5x/include/mach/uncompress.h
+++ b/arch/arm/mach-orion5x/include/mach/uncompress.h
@@ -41,8 +41,3 @@ static void flush(void)
barrier();
}
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-picoxcell/include/mach/uncompress.h b/arch/arm/mach-picoxcell/include/mach/uncompress.h
index db46249..f04f368 100644
--- a/arch/arm/mach-picoxcell/include/mach/uncompress.h
+++ b/arch/arm/mach-picoxcell/include/mach/uncompress.h
@@ -17,4 +17,3 @@
*/
#define putc(c)
#define flush()
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-pnx4008/include/mach/uncompress.h b/arch/arm/mach-pnx4008/include/mach/uncompress.h
index 26b507d..add0c75 100644
--- a/arch/arm/mach-pnx4008/include/mach/uncompress.h
+++ b/arch/arm/mach-pnx4008/include/mach/uncompress.h
@@ -38,8 +38,3 @@ static __inline__ void putc(char c)
static inline void flush(void)
{
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-prima2/include/mach/uncompress.h
index 1e17796..9ee022f 100644
--- a/arch/arm/mach-prima2/include/mach/uncompress.h
+++ b/arch/arm/mach-prima2/include/mach/uncompress.h
@@ -13,10 +13,6 @@
#include <mach/hardware.h>
#include <mach/uart.h>
-void arch_decomp_setup(void)
-{
-}
-
static __inline__ void putc(char c)
{
/*
diff --git a/arch/arm/mach-realview/include/mach/uncompress.h b/arch/arm/mach-realview/include/mach/uncompress.h
index cfa30d2..9ba06e9 100644
--- a/arch/arm/mach-realview/include/mach/uncompress.h
+++ b/arch/arm/mach-realview/include/mach/uncompress.h
@@ -70,8 +70,3 @@ static inline void flush(void)
while (AMBA_UART_FR(base) & (1 << 3))
barrier();
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-sa1100/include/mach/uncompress.h b/arch/arm/mach-sa1100/include/mach/uncompress.h
index a834962..55c9e59 100644
--- a/arch/arm/mach-sa1100/include/mach/uncompress.h
+++ b/arch/arm/mach-sa1100/include/mach/uncompress.h
@@ -42,8 +42,3 @@ static void putc(int c)
static inline void flush(void)
{
}
-
-/*
- * Nothing to do for these
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
index a168435..40f4b68 100644
--- a/arch/arm/mach-shark/include/mach/uncompress.h
+++ b/arch/arm/mach-shark/include/mach/uncompress.h
@@ -43,8 +43,3 @@ static void putr()
putc('\r');
}
#endif
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-shmobile/include/mach/uncompress.h b/arch/arm/mach-shmobile/include/mach/uncompress.h
index f1aee56..b2b2860 100644
--- a/arch/arm/mach-shmobile/include/mach/uncompress.h
+++ b/arch/arm/mach-shmobile/include/mach/uncompress.h
@@ -12,8 +12,4 @@ static inline void flush(void)
{
}
-static void arch_decomp_setup(void)
-{
-}
-
#endif /* __ASM_MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-u300/include/mach/uncompress.h b/arch/arm/mach-u300/include/mach/uncompress.h
index 783e7e6..68d0298 100644
--- a/arch/arm/mach-u300/include/mach/uncompress.h
+++ b/arch/arm/mach-u300/include/mach/uncompress.h
@@ -38,8 +38,3 @@ static inline void flush(void)
while (AMBA_UART_FR & (1 << 3))
barrier();
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-versatile/include/mach/uncompress.h b/arch/arm/mach-versatile/include/mach/uncompress.h
index 986e3d3..164b9b5 100644
--- a/arch/arm/mach-versatile/include/mach/uncompress.h
+++ b/arch/arm/mach-versatile/include/mach/uncompress.h
@@ -38,8 +38,3 @@ static inline void flush(void)
while (AMBA_UART_FR & (1 << 3))
barrier();
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-vexpress/include/mach/uncompress.h b/arch/arm/mach-vexpress/include/mach/uncompress.h
index a16872b..0f85a648 100644
--- a/arch/arm/mach-vexpress/include/mach/uncompress.h
+++ b/arch/arm/mach-vexpress/include/mach/uncompress.h
@@ -44,8 +44,3 @@ static inline void flush(void)
while (AMBA_UART_FR(base) & (1 << 3))
barrier();
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-vt8500/include/mach/uncompress.h b/arch/arm/mach-vt8500/include/mach/uncompress.h
index 14ec0ec..6b93a01 100644
--- a/arch/arm/mach-vt8500/include/mach/uncompress.h
+++ b/arch/arm/mach-vt8500/include/mach/uncompress.h
@@ -29,8 +29,3 @@ static void putc(const char c)
static void flush(void)
{
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-w90x900/include/mach/uncompress.h b/arch/arm/mach-w90x900/include/mach/uncompress.h
index 4b7c324..935d950 100644
--- a/arch/arm/mach-w90x900/include/mach/uncompress.h
+++ b/arch/arm/mach-w90x900/include/mach/uncompress.h
@@ -41,8 +41,4 @@ static inline void flush(void)
{
}
-static void arch_decomp_setup(void)
-{
-}
-
#endif/* __ASM_W90X900_UNCOMPRESS_H */
diff --git a/arch/arm/mach-zynq/include/mach/uncompress.h b/arch/arm/mach-zynq/include/mach/uncompress.h
index 11c3216..623cebe 100644
--- a/arch/arm/mach-zynq/include/mach/uncompress.h
+++ b/arch/arm/mach-zynq/include/mach/uncompress.h
@@ -20,10 +20,6 @@
#include <mach/zynq_soc.h>
#include <mach/uart.h>
-void arch_decomp_setup(void)
-{
-}
-
static inline void flush(void)
{
/*
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h
index b631aab..317cfe4 100644
--- a/arch/arm/plat-spear/include/plat/uncompress.h
+++ b/arch/arm/plat-spear/include/plat/uncompress.h
@@ -34,9 +34,4 @@ static inline void flush(void)
{
}
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-
#endif /* __PLAT_UNCOMPRESS_H */
diff --git a/arch/arm/plat-tcc/include/mach/uncompress.h b/arch/arm/plat-tcc/include/mach/uncompress.h
index 2e9c2bb..35a924e 100644
--- a/arch/arm/plat-tcc/include/mach/uncompress.h
+++ b/arch/arm/plat-tcc/include/mach/uncompress.h
@@ -26,8 +26,3 @@ static void putc(int c)
static inline void flush(void)
{
}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 06/15] ARM: uncompress: Remove unused Trace functions
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (3 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 05/15] ARM: uncompress.h: Remove unused arch_decomp_setup declarations Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 07/15] ARM: uncompress: Move decompressing related stuff to decompress.c Zoltan Devai
` (8 subsequent siblings)
13 siblings, 0 replies; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
These trace functions were only used by the old inflate code
which isn't used on ARM anymore.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/decompress.c | 17 -----------------
1 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c
index 75b1605..6dec528 100644
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -13,23 +13,6 @@ extern void error(char *);
#define STATIC static
#define STATIC_RW_DATA /* non-static please */
-/* Diagnostic functions */
-#ifdef DEBUG
-# define Assert(cond,msg) {if(!(cond)) error(msg);}
-# define Trace(x) fprintf x
-# define Tracev(x) {if (verbose) fprintf x ;}
-# define Tracevv(x) {if (verbose>1) fprintf x ;}
-# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
-# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
-#else
-# define Assert(cond,msg)
-# define Trace(x)
-# define Tracev(x)
-# define Tracevv(x)
-# define Tracec(c,x)
-# define Tracecv(c,x)
-#endif
-
#ifdef CONFIG_KERNEL_GZIP
#include "../../../../lib/decompress_inflate.c"
#endif
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 07/15] ARM: uncompress: Move decompressing related stuff to decompress.c
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (4 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 06/15] ARM: uncompress: Remove unused Trace functions Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-24 9:17 ` Russell King - ARM Linux
2011-10-23 21:10 ` [RFC PATCH 08/15] ARM: uncompress: Rename misc.c to print.c Zoltan Devai
` (7 subsequent siblings)
13 siblings, 1 reply; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
Move decompressing related functions and declarations from misc.c
to decompress.c as it seems to be more logical.
misc.c now only holds the inclusion of uncompress.h and printing
functions.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/decompress.c | 59 +++++++++++++++++++++++++++++-
arch/arm/boot/compressed/misc.c | 66 ++++++++-------------------------
2 files changed, 74 insertions(+), 51 deletions(-)
diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c
index 6dec528..17200d5 100644
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -1,3 +1,12 @@
+/*
+ * Nicolas Pitre <nico@visuaide.com> 1999/04/14 :
+ * For this code to run directly from Flash, all constant variables must
+ * be marked with 'const' and all other variables initialized at run-time
+ * only. This way all non constant variables will end up in the bss segment,
+ * which should point to addresses in RAM and cleared to 0 on start.
+ * This allows for a much quicker boot time.
+ */
+
#define _LINUX_STRING_H_
#include <linux/compiler.h> /* for inline */
@@ -25,7 +34,55 @@ extern void error(char *);
#include "../../../../lib/decompress_unlzma.c"
#endif
-int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
+static int
+do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
{
return decompress(input, len, NULL, NULL, output, NULL, error);
}
+
+unsigned int __machine_arch_type;
+
+/* These are in misc.c */
+extern void putstr(const char *ptr);
+extern void error(char *x);
+extern void decomp_setup(void);
+
+/*
+ * gzip declarations
+ */
+extern char input_data[];
+extern char input_data_end[];
+
+unsigned char *output_data;
+
+unsigned long free_mem_ptr;
+unsigned long free_mem_end_ptr;
+
+void
+decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
+ unsigned long free_mem_ptr_end_p,
+ int arch_id)
+{
+ int ret;
+
+ output_data = (unsigned char *)output_start;
+ free_mem_ptr = free_mem_ptr_p;
+ free_mem_end_ptr = free_mem_ptr_end_p;
+ __machine_arch_type = arch_id;
+
+ /* This is arch_decomp_setup if its use is defined in uncompress.h */
+ decomp_setup();
+
+ putstr("Uncompressing Linux...");
+ ret = do_decompress(input_data, input_data_end - input_data,
+ output_data, error);
+ if (ret)
+ error("decompressor returned an error");
+ else
+ putstr(" done, booting the kernel.\n");
+}
+
+asmlinkage void __div0(void)
+{
+ error("Attempting division by 0!");
+}
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index a4b8df2..25f0fb2 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -16,17 +16,28 @@
* This allows for a much quicker boot time.
*/
-unsigned int __machine_arch_type;
-
#include <linux/compiler.h> /* for inline */
#include <linux/types.h>
#include <linux/linkage.h>
-static void putstr(const char *ptr);
-extern void error(char *x);
+void putstr(const char *ptr);
+void error(char *x);
+extern unsigned int __machine_arch_type;
+#define arch_id __machine_arch_type
#include <mach/uncompress.h>
+#ifdef ARCH_HAVE_DECOMP_SETUP
+void inline decomp_setup(void)
+{
+ arch_decomp_setup();
+}
+#else /* ARCH_HAVE_DECOMP_SETUP */
+void inline decomp_setup(void)
+{
+}
+#endif /* ARCH_HAVE_DECOMP_SETUP */
+
#ifdef CONFIG_DEBUG_ICEDCC
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
@@ -45,7 +56,6 @@ static void icedcc_putc(int ch)
asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
}
-
#elif defined(CONFIG_CPU_XSCALE)
static void icedcc_putc(int ch)
@@ -83,7 +93,7 @@ static void icedcc_putc(int ch)
#define putc(ch) icedcc_putc(ch)
#endif
-static void putstr(const char *ptr)
+void putstr(const char *ptr)
{
char c;
@@ -96,17 +106,6 @@ static void putstr(const char *ptr)
flush();
}
-/*
- * gzip declarations
- */
-extern char input_data[];
-extern char input_data_end[];
-
-unsigned char *output_data;
-
-unsigned long free_mem_ptr;
-unsigned long free_mem_end_ptr;
-
#ifndef arch_error
#define arch_error(x)
#endif
@@ -121,36 +120,3 @@ void error(char *x)
while(1); /* Halt */
}
-
-asmlinkage void __div0(void)
-{
- error("Attempting division by 0!");
-}
-
-extern int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x));
-
-
-void
-decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
- unsigned long free_mem_ptr_end_p,
- int arch_id)
-{
- int ret;
-
- output_data = (unsigned char *)output_start;
- free_mem_ptr = free_mem_ptr_p;
- free_mem_end_ptr = free_mem_ptr_end_p;
- __machine_arch_type = arch_id;
-
-#ifdef ARCH_HAVE_DECOMP_SETUP
- arch_decomp_setup();
-#endif /* ARCH_HAVE_DECOMP_SETUP */
-
- putstr("Uncompressing Linux...");
- ret = do_decompress(input_data, input_data_end - input_data,
- output_data, error);
- if (ret)
- error("decompressor returned an error");
- else
- putstr(" done, booting the kernel.\n");
-}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 08/15] ARM: uncompress: Rename misc.c to print.c
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (5 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 07/15] ARM: uncompress: Move decompressing related stuff to decompress.c Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-24 6:58 ` Uwe Kleine-König
2011-10-23 21:10 ` [RFC PATCH 09/15] ARM: uncompress: Introduce ucuart as low-level serial port driver Zoltan Devai
` (6 subsequent siblings)
13 siblings, 1 reply; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
Now that misc.c only holds functions related to printout
during decompression, rename it accordingly.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/Makefile | 2 +-
arch/arm/boot/compressed/misc.c | 122 -------------------------------------
arch/arm/boot/compressed/print.c | 122 +++++++++++++++++++++++++++++++++++++
3 files changed, 123 insertions(+), 123 deletions(-)
delete mode 100644 arch/arm/boot/compressed/misc.c
create mode 100644 arch/arm/boot/compressed/print.c
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index e4f32a8..d955d4f 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -23,7 +23,7 @@ endif
AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
HEAD = head.o
-OBJS += misc.o decompress.o
+OBJS += print.o decompress.o
FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
# string library code (-Os is enforced to keep it much smaller)
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
deleted file mode 100644
index 25f0fb2..0000000
--- a/arch/arm/boot/compressed/misc.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * misc.c
- *
- * This is a collection of several routines from gzip-1.0.3
- * adapted for Linux.
- *
- * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
- *
- * Modified for ARM Linux by Russell King
- *
- * Nicolas Pitre <nico@visuaide.com> 1999/04/14 :
- * For this code to run directly from Flash, all constant variables must
- * be marked with 'const' and all other variables initialized at run-time
- * only. This way all non constant variables will end up in the bss segment,
- * which should point to addresses in RAM and cleared to 0 on start.
- * This allows for a much quicker boot time.
- */
-
-#include <linux/compiler.h> /* for inline */
-#include <linux/types.h>
-#include <linux/linkage.h>
-
-void putstr(const char *ptr);
-void error(char *x);
-extern unsigned int __machine_arch_type;
-#define arch_id __machine_arch_type
-
-#include <mach/uncompress.h>
-
-#ifdef ARCH_HAVE_DECOMP_SETUP
-void inline decomp_setup(void)
-{
- arch_decomp_setup();
-}
-#else /* ARCH_HAVE_DECOMP_SETUP */
-void inline decomp_setup(void)
-{
-}
-#endif /* ARCH_HAVE_DECOMP_SETUP */
-
-#ifdef CONFIG_DEBUG_ICEDCC
-
-#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
-
-static void icedcc_putc(int ch)
-{
- int status, i = 0x4000000;
-
- do {
- if (--i < 0)
- return;
-
- asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status));
- } while (status & (1 << 29));
-
- asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
-}
-
-#elif defined(CONFIG_CPU_XSCALE)
-
-static void icedcc_putc(int ch)
-{
- int status, i = 0x4000000;
-
- do {
- if (--i < 0)
- return;
-
- asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status));
- } while (status & (1 << 28));
-
- asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch));
-}
-
-#else
-
-static void icedcc_putc(int ch)
-{
- int status, i = 0x4000000;
-
- do {
- if (--i < 0)
- return;
-
- asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status));
- } while (status & 2);
-
- asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
-}
-
-#endif
-
-#define putc(ch) icedcc_putc(ch)
-#endif
-
-void putstr(const char *ptr)
-{
- char c;
-
- while ((c = *ptr++) != '\0') {
- if (c == '\n')
- putc('\r');
- putc(c);
- }
-
- flush();
-}
-
-#ifndef arch_error
-#define arch_error(x)
-#endif
-
-void error(char *x)
-{
- arch_error(x);
-
- putstr("\n\n");
- putstr(x);
- putstr("\n\n -- System halted");
-
- while(1); /* Halt */
-}
diff --git a/arch/arm/boot/compressed/print.c b/arch/arm/boot/compressed/print.c
new file mode 100644
index 0000000..25f0fb2
--- /dev/null
+++ b/arch/arm/boot/compressed/print.c
@@ -0,0 +1,122 @@
+/*
+ * misc.c
+ *
+ * This is a collection of several routines from gzip-1.0.3
+ * adapted for Linux.
+ *
+ * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
+ *
+ * Modified for ARM Linux by Russell King
+ *
+ * Nicolas Pitre <nico@visuaide.com> 1999/04/14 :
+ * For this code to run directly from Flash, all constant variables must
+ * be marked with 'const' and all other variables initialized at run-time
+ * only. This way all non constant variables will end up in the bss segment,
+ * which should point to addresses in RAM and cleared to 0 on start.
+ * This allows for a much quicker boot time.
+ */
+
+#include <linux/compiler.h> /* for inline */
+#include <linux/types.h>
+#include <linux/linkage.h>
+
+void putstr(const char *ptr);
+void error(char *x);
+extern unsigned int __machine_arch_type;
+#define arch_id __machine_arch_type
+
+#include <mach/uncompress.h>
+
+#ifdef ARCH_HAVE_DECOMP_SETUP
+void inline decomp_setup(void)
+{
+ arch_decomp_setup();
+}
+#else /* ARCH_HAVE_DECOMP_SETUP */
+void inline decomp_setup(void)
+{
+}
+#endif /* ARCH_HAVE_DECOMP_SETUP */
+
+#ifdef CONFIG_DEBUG_ICEDCC
+
+#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
+
+static void icedcc_putc(int ch)
+{
+ int status, i = 0x4000000;
+
+ do {
+ if (--i < 0)
+ return;
+
+ asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status));
+ } while (status & (1 << 29));
+
+ asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
+}
+
+#elif defined(CONFIG_CPU_XSCALE)
+
+static void icedcc_putc(int ch)
+{
+ int status, i = 0x4000000;
+
+ do {
+ if (--i < 0)
+ return;
+
+ asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status));
+ } while (status & (1 << 28));
+
+ asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch));
+}
+
+#else
+
+static void icedcc_putc(int ch)
+{
+ int status, i = 0x4000000;
+
+ do {
+ if (--i < 0)
+ return;
+
+ asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status));
+ } while (status & 2);
+
+ asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
+}
+
+#endif
+
+#define putc(ch) icedcc_putc(ch)
+#endif
+
+void putstr(const char *ptr)
+{
+ char c;
+
+ while ((c = *ptr++) != '\0') {
+ if (c == '\n')
+ putc('\r');
+ putc(c);
+ }
+
+ flush();
+}
+
+#ifndef arch_error
+#define arch_error(x)
+#endif
+
+void error(char *x)
+{
+ arch_error(x);
+
+ putstr("\n\n");
+ putstr(x);
+ putstr("\n\n -- System halted");
+
+ while(1); /* Halt */
+}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 09/15] ARM: uncompress: Introduce ucuart as low-level serial port driver
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (6 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 08/15] ARM: uncompress: Rename misc.c to print.c Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-24 9:26 ` Russell King - ARM Linux
2011-10-23 21:10 ` [RFC PATCH 10/15] ARM: uncompress.h: Convert machines to use the new ucuart driver Zoltan Devai
` (5 subsequent siblings)
13 siblings, 1 reply; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
This adds the ucuart struct which should be a sufficient
description for being able to print through a serial port.
Generic versions of putc() and flush() using ucuart are also
added, along with initialization helpers, one specifically
for the 8250 family UART and one for the AMBA01X PrimeCell.
The port structure is not declared statically, but inited
through arch_decomp_setup() to have it in the .bss area,
thus in RAM.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/print.c | 128 +++++++++++++++++++++++++++++++++++--
1 files changed, 121 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boot/compressed/print.c b/arch/arm/boot/compressed/print.c
index 25f0fb2..fbffc99 100644
--- a/arch/arm/boot/compressed/print.c
+++ b/arch/arm/boot/compressed/print.c
@@ -25,18 +25,120 @@ void error(char *x);
extern unsigned int __machine_arch_type;
#define arch_id __machine_arch_type
+enum ucuart_iotypes {
+ UCUART_IO_MEM32 = 0,
+ UCUART_IO_MEM8,
+};
+
+struct uncompress_uart {
+ void __iomem *base;
+ int reg_shift;
+ enum ucuart_iotypes iotype;
+ int tx_regoff;
+ int txfree_regoff;
+ int txfree_mask;
+ int txfree_val;
+ int flush_regoff;
+ int flush_mask;
+ int flush_val;
+};
+
+void ucuart_init(int base, int regshift, enum ucuart_iotypes iotype,
+ int tx_regoff, int txfree_regoff, int txfree_mask,
+ int txfree_val, int flush_regoff, int flush_mask,
+ int flush_val);
+
+void ucuart_init_8250(int base, int regshift, enum ucuart_iotypes iotype);
+
+struct uncompress_uart ucuart;
+
#include <mach/uncompress.h>
-#ifdef ARCH_HAVE_DECOMP_SETUP
-void inline decomp_setup(void)
+#ifdef ARCH_HAVE_UCUART_GENERIC
+
+#define ARCH_HAVE_DECOMP_SETUP
+
+#include <linux/io.h>
+#include <linux/serial_reg.h>
+#include <linux/amba/serial.h>
+
+void ucuart_init(int base, int regshift, enum ucuart_iotypes iotype,
+ int tx_regoff, int txfree_regoff, int txfree_mask,
+ int txfree_val, int flush_regoff, int flush_mask,
+ int flush_val)
{
- arch_decomp_setup();
+ ucuart.base = (void __iomem *)base;
+ ucuart.reg_shift = regshift;
+ ucuart.iotype = iotype;
+
+ ucuart.tx_regoff = tx_regoff;
+ ucuart.txfree_regoff = txfree_regoff;
+ ucuart.txfree_mask = txfree_mask;
+ ucuart.txfree_val = txfree_val;
+ ucuart.flush_regoff = flush_regoff;
+ ucuart.flush_mask = flush_mask;
+ ucuart.flush_val = flush_val;
}
-#else /* ARCH_HAVE_DECOMP_SETUP */
-void inline decomp_setup(void)
+
+void inline ucuart_init_8250(int base, int regshift, enum ucuart_iotypes iotype)
{
+ ucuart_init(base, regshift, iotype, UART_TX,
+ UART_LSR, UART_LSR_THRE, UART_LSR_THRE,
+ UART_LSR, (UART_LSR_TEMT | UART_LSR_THRE),
+ (UART_LSR_TEMT | UART_LSR_THRE));
}
-#endif /* ARCH_HAVE_DECOMP_SETUP */
+
+void ucuart_init_amba01x(int base)
+{
+ /* Do nothing if the UART is not enabled. */
+ if (!(__raw_readl(base + UART011_CR) & UART01x_CR_UARTEN))
+ return;
+
+ ucuart_init(base, 0, UCUART_IO_MEM32, UART01x_DR,
+ UART01x_FR, UART01x_FR_TXFF, 0,
+ UART01x_FR, UART01x_FR_BUSY, 0);
+}
+
+static inline int uart_read(int regoff)
+{
+ if (ucuart.iotype == UCUART_IO_MEM32)
+ return __raw_readl(ucuart.base + (regoff << ucuart.reg_shift));
+ else
+ return __raw_readb(ucuart.base + (regoff << ucuart.reg_shift));
+}
+
+static inline void uart_write(int regoff, int value)
+{
+ if (ucuart.iotype == UCUART_IO_MEM32)
+ __raw_writel(value, ucuart.base + (regoff << ucuart.reg_shift));
+ else
+ __raw_writeb(value, ucuart.base + (regoff << ucuart.reg_shift));
+}
+
+static inline void putc(int ch)
+{
+ if (!ucuart.base)
+ return;
+
+ if (ucuart.txfree_regoff) {
+ while ((uart_read(ucuart.txfree_regoff) & ucuart.txfree_mask)
+ != ucuart.txfree_val)
+ barrier();
+ }
+
+ uart_write(ucuart.tx_regoff, ch);
+}
+
+static inline void flush(void)
+{
+ if (ucuart.flush_regoff) {
+ while ((uart_read(ucuart.flush_regoff) & ucuart.flush_mask) !=
+ ucuart.flush_val)
+ barrier();
+ }
+}
+#endif /* ARCH_HAVE_UCUART_GENERIC */
+
#ifdef CONFIG_DEBUG_ICEDCC
@@ -91,7 +193,8 @@ static void icedcc_putc(int ch)
#endif
#define putc(ch) icedcc_putc(ch)
-#endif
+#define flush()
+#endif /* CONFIG_DEBUG_ICEDCC */
void putstr(const char *ptr)
{
@@ -120,3 +223,14 @@ void error(char *x)
while(1); /* Halt */
}
+
+#ifdef ARCH_HAVE_DECOMP_SETUP
+void inline decomp_setup(void)
+{
+ arch_decomp_setup();
+}
+#else /* ARCH_HAVE_DECOMP_SETUP */
+void inline decomp_setup(void)
+{
+}
+#endif /* ARCH_HAVE_DECOMP_SETUP */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 10/15] ARM: uncompress.h: Convert machines to use the new ucuart driver
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (7 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 09/15] ARM: uncompress: Introduce ucuart as low-level serial port driver Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 11/15] ARM: uncompress: Call arch_decomp_setup by default Zoltan Devai
` (4 subsequent siblings)
13 siblings, 0 replies; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
Finally convert the machine-specific uncompress.h files
to use the ucuart driver. This gets rid dozens of
re-implementations for handling an UART.
Samsung stuff needs re-thinking.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/mach-at91/include/mach/uncompress.h | 24 ++-----
arch/arm/mach-bcmring/include/mach/uncompress.h | 29 ++------
arch/arm/mach-clps711x/include/mach/uncompress.h | 24 ++------
arch/arm/mach-cns3xxx/include/mach/uncompress.h | 35 +---------
arch/arm/mach-davinci/include/mach/uncompress.h | 24 +------
arch/arm/mach-dove/include/mach/uncompress.h | 21 +-----
arch/arm/mach-ebsa110/include/mach/uncompress.h | 30 +--------
arch/arm/mach-ep93xx/include/mach/uncompress.h | 48 +-------------
| 20 ++----
arch/arm/mach-gemini/include/mach/uncompress.h | 18 +----
arch/arm/mach-h720x/include/mach/uncompress.h | 21 ++----
arch/arm/mach-integrator/include/mach/uncompress.h | 24 +------
arch/arm/mach-iop13xx/include/mach/uncompress.h | 15 +----
arch/arm/mach-iop32x/include/mach/uncompress.h | 30 ++-------
arch/arm/mach-iop33x/include/mach/uncompress.h | 26 +------
arch/arm/mach-ixp2000/include/mach/uncompress.h | 28 +-------
arch/arm/mach-ixp23xx/include/mach/uncompress.h | 19 +-----
arch/arm/mach-ixp4xx/include/mach/uncompress.h | 31 +--------
arch/arm/mach-kirkwood/include/mach/uncompress.h | 32 +--------
arch/arm/mach-ks8695/include/mach/uncompress.h | 16 ++---
arch/arm/mach-lpc32xx/include/mach/uncompress.h | 31 +--------
arch/arm/mach-mmp/include/mach/uncompress.h | 30 +--------
arch/arm/mach-msm/include/mach/uncompress.h | 17 ++---
arch/arm/mach-mv78xx0/include/mach/uncompress.h | 30 +--------
arch/arm/mach-mxs/include/mach/uncompress.h | 42 +-----------
arch/arm/mach-netx/include/mach/uncompress.h | 42 +-----------
arch/arm/mach-nomadik/include/mach/uncompress.h | 32 +--------
arch/arm/mach-orion5x/include/mach/uncompress.h | 32 +--------
arch/arm/mach-pnx4008/include/mach/uncompress.h | 18 +----
arch/arm/mach-prima2/include/mach/uncompress.h | 22 ++-----
arch/arm/mach-pxa/include/mach/uncompress.h | 69 +++++---------------
arch/arm/mach-realview/include/mach/uncompress.h | 47 +++----------
arch/arm/mach-sa1100/include/mach/uncompress.h | 41 ++++++------
arch/arm/mach-shark/include/mach/uncompress.h | 36 +---------
arch/arm/mach-tegra/include/mach/uncompress.h | 34 ++-------
arch/arm/mach-u300/include/mach/uncompress.h | 21 +-----
arch/arm/mach-ux500/include/mach/uncompress.h | 31 +--------
arch/arm/mach-versatile/include/mach/uncompress.h | 21 +-----
arch/arm/mach-vexpress/include/mach/uncompress.h | 27 +-------
arch/arm/mach-vt8500/include/mach/uncompress.h | 15 +----
arch/arm/mach-w90x900/include/mach/uncompress.h | 21 +------
arch/arm/mach-zynq/include/mach/uncompress.h | 25 ++------
arch/arm/plat-mxc/include/mach/uncompress.h | 34 +++-------
arch/arm/plat-omap/include/plat/uncompress.h | 43 +++---------
arch/arm/plat-spear/include/plat/uncompress.h | 19 +-----
arch/arm/plat-tcc/include/mach/uncompress.h | 21 +-----
46 files changed, 227 insertions(+), 1089 deletions(-)
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
index c644b13..46acdd5 100644
--- a/arch/arm/mach-at91/include/mach/uncompress.h
+++ b/arch/arm/mach-at91/include/mach/uncompress.h
@@ -47,26 +47,14 @@
*
* This does not append a newline
*/
-static void putc(int c)
-{
#ifdef UART_OFFSET
- void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */
-
- while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXRDY))
- barrier();
- __raw_writel(c, sys + ATMEL_US_THR);
-#endif
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
-#ifdef UART_OFFSET
- void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */
-
- /* wait for transmission to complete */
- while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXEMPTY))
- barrier();
-#endif
+ ucuart_init(UART_OFFSET, 0, UCUART_IO_MEM32, ATMEL_US_THR,
+ ATMEL_US_CSR, ATMEL_US_TXRDY, ATMEL_US_TXRDY,
+ ATMEL_US_CSR, ATMEL_US_TXEMPTY, ATMEL_US_TXEMPTY);
}
-#endif
+#endif /* UART_OFFSET */
diff --git a/arch/arm/mach-bcmring/include/mach/uncompress.h b/arch/arm/mach-bcmring/include/mach/uncompress.h
index 7a365aa..7e44ad3 100644
--- a/arch/arm/mach-bcmring/include/mach/uncompress.h
+++ b/arch/arm/mach-bcmring/include/mach/uncompress.h
@@ -13,28 +13,13 @@
*****************************************************************************/
#include <mach/csp/mm_addr.h>
-#define BCMRING_UART_0_DR (*(volatile unsigned int *)MM_ADDR_IO_UARTA)
-#define BCMRING_UART_0_FR (*(volatile unsigned int *)(MM_ADDR_IO_UARTA + 0x18))
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
-{
- /* Send out UARTA */
- while (BCMRING_UART_0_FR & (1 << 5))
- ;
-
- BCMRING_UART_0_DR = c;
-}
+#define BCMRING_UART_0_DR MM_ADDR_IO_UARTA
+#define BCMRING_UART_0_FR 0x18
-
-static inline void flush(void)
+#define ARCH_HAVE_UCUART_GENERIC
+static inline void arch_decomp_setup(void)
{
- /* Wait for the tx fifo to be empty */
- while ((BCMRING_UART_0_FR & (1 << 7)) == 0)
- ;
-
- /* Wait for the final character to be sent on the txd line */
- while (BCMRING_UART_0_FR & (1 << 3))
- ;
+ ucuart_init(MM_ADDR_IO_UARTA, 0, UCUART_IO_MEM32, BCMRING_UART_0_DR,
+ BCMRING_UART_0_FR, (1 << 5), 0,
+ BCMRING_UART_0_FR, (1 << 7) | (1 << 3), (1 << 7));
}
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index 3090a43..ba17cc6 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -17,16 +17,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <mach/io.h>
#include <mach/hardware.h>
#include <asm/hardware/clps7111.h>
-#undef CLPS7111_BASE
-#define CLPS7111_BASE CLPS7111_PHYS_BASE
-
-#define __raw_readl(p) (*(unsigned long *)(p))
-#define __raw_writel(v,p) (*(unsigned long *)(p) = (v))
-
#ifdef CONFIG_DEBUG_CLPS711X_UART2
#define SYSFLGx SYSFLG2
#define UARTDRx UARTDR2
@@ -35,18 +28,11 @@
#define UARTDRx UARTDR1
#endif
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
-{
- while (clps_readl(SYSFLGx) & SYSFLG_UTXFF)
- barrier();
- clps_writel(c, UARTDRx);
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
- while (clps_readl(SYSFLGx) & SYSFLG_UBUSY)
- barrier();
+ ucuart_init(CLPS7111_PHYS_BASE, 0, UCUART_IO_MEM32, UARTDRx,
+ SYSFLGx, SYSFLG_UTXOFF, 0,
+ SYSFLGx, SYSFLG_UBUSY, 0);
}
diff --git a/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
index 255a167..93cdbd6 100644
--- a/arch/arm/mach-cns3xxx/include/mach/uncompress.h
+++ b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
@@ -10,39 +10,10 @@
#include <asm/mach-types.h>
#include <mach/cns3xxx.h>
-#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
-#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))
-#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))
-#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))
+#define ARCH_HAVE_UCUART_GENERIC
-/*
- * Return the UART base address
- */
-static inline unsigned long get_uart_base(void)
+static inline void arch_decomp_setup(void)
{
if (machine_is_cns3420vb())
- return CNS3XXX_UART0_BASE;
- else
- return 0;
-}
-
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
-{
- unsigned long base = get_uart_base();
-
- while (AMBA_UART_FR(base) & (1 << 5))
- barrier();
-
- AMBA_UART_DR(base) = c;
-}
-
-static inline void flush(void)
-{
- unsigned long base = get_uart_base();
-
- while (AMBA_UART_FR(base) & (1 << 3))
- barrier();
+ ucuart_init_amba01x(CNS3XXX_UART0_BASE);
}
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h
index 1947ff9..daa318d 100644
--- a/arch/arm/mach-davinci/include/mach/uncompress.h
+++ b/arch/arm/mach-davinci/include/mach/uncompress.h
@@ -19,27 +19,12 @@
*/
#include <linux/types.h>
-#include <linux/serial_reg.h>
#include <asm/mach-types.h>
#include <mach/serial.h>
-u32 *uart;
-
-/* PORT_16C550A, in polled non-fifo mode */
-static void putc(char c)
-{
- while (!(uart[UART_LSR] & UART_LSR_THRE))
- barrier();
- uart[UART_TX] = c;
-}
-
-static inline void flush(void)
-{
- while (!(uart[UART_LSR] & UART_LSR_THRE))
- barrier();
-}
+#define ARCH_HAVE_UCUART_GENERIC
static inline void set_uart_info(u32 phys, void * __iomem virt)
{
@@ -53,6 +38,8 @@ static inline void set_uart_info(u32 phys, void * __iomem virt)
uart = (u32 *)phys;
uart_info[0] = phys;
uart_info[1] = (u32)virt;
+
+ ucuart_init_8250(phys, 2, UCUART_IO_MEM32);
}
#define _DEBUG_LL_ENTRY(machine, phys, virt) \
@@ -73,7 +60,7 @@ static inline void set_uart_info(u32 phys, void * __iomem virt)
_DEBUG_LL_ENTRY(machine, TNETV107X_UART##port##_BASE, \
TNETV107X_UART##port##_VIRT)
-static inline void __arch_decomp_setup(unsigned long arch_id)
+static inline void arch_decomp_setup(void)
{
/*
* Initialize the port based on the machine ID from the bootloader.
@@ -101,6 +88,3 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
DEBUG_LL_TNETV107X(tnetv107x, 1);
} while (0);
}
-
-#define ARCH_HAVE_DECOMP_SETUP
-#define arch_decomp_setup() __arch_decomp_setup(arch_id)
diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h
index 3bc22a1..0062a56 100644
--- a/arch/arm/mach-dove/include/mach/uncompress.h
+++ b/arch/arm/mach-dove/include/mach/uncompress.h
@@ -8,24 +8,9 @@
#include <mach/dove.h>
-#define UART_THR ((volatile unsigned char *)(DOVE_UART0_PHYS_BASE + 0x0))
-#define UART_LSR ((volatile unsigned char *)(DOVE_UART0_PHYS_BASE + 0x14))
+#define ARCH_HAVE_UCUART_GENERIC
-#define LSR_THRE 0x20
-
-static void putc(const char c)
-{
- int i;
-
- for (i = 0; i < 0x1000; i++) {
- /* Transmit fifo not full? */
- if (*UART_LSR & LSR_THRE)
- break;
- }
-
- *UART_THR = c;
-}
-
-static void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init_8250(DOVE_UART0_PHYS_BASE, 2, UCUART_IO_MEM8);
}
diff --git a/arch/arm/mach-ebsa110/include/mach/uncompress.h b/arch/arm/mach-ebsa110/include/mach/uncompress.h
index 507ec2a..56a569f 100644
--- a/arch/arm/mach-ebsa110/include/mach/uncompress.h
+++ b/arch/arm/mach-ebsa110/include/mach/uncompress.h
@@ -7,33 +7,9 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
+#define ARCH_HAVE_UCUART_GENERIC
-#include <linux/serial_reg.h>
-
-#define SERIAL_BASE ((unsigned char *)0xf0000be0)
-
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
-{
- unsigned char v, *base = SERIAL_BASE;
-
- do {
- v = base[UART_LSR << 2];
- barrier();
- } while (!(v & UART_LSR_THRE));
-
- base[UART_TX << 2] = c;
-}
-
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
- unsigned char v, *base = SERIAL_BASE;
-
- do {
- v = base[UART_LSR << 2];
- barrier();
- } while ((v & (UART_LSR_TEMT|UART_LSR_THRE)) !=
- (UART_LSR_TEMT|UART_LSR_THRE));
+ ucuart_init_8250(0xf0000be0, 2, UCUART_IO_MEM8);
}
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
index f1cd638..1b36813 100644
--- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -11,26 +11,6 @@
#include <mach/ep93xx-regs.h>
-static unsigned char __raw_readb(unsigned int ptr)
-{
- return *((volatile unsigned char *)ptr);
-}
-
-static unsigned int __raw_readl(unsigned int ptr)
-{
- return *((volatile unsigned int *)ptr);
-}
-
-static void __raw_writeb(unsigned char value, unsigned int ptr)
-{
- *((volatile unsigned char *)ptr) = value;
-}
-
-static void __raw_writel(unsigned int value, unsigned int ptr)
-{
- *((volatile unsigned int *)ptr) = value;
-}
-
#if defined(CONFIG_EP93XX_EARLY_UART1)
#define UART_BASE EP93XX_UART1_PHYS_BASE
#elif defined(CONFIG_EP93XX_EARLY_UART2)
@@ -41,28 +21,6 @@ static void __raw_writel(unsigned int value, unsigned int ptr)
#define UART_BASE EP93XX_UART1_PHYS_BASE
#endif
-#define PHYS_UART_DATA (UART_BASE + 0x00)
-#define PHYS_UART_FLAG (UART_BASE + 0x18)
-#define UART_FLAG_TXFF 0x20
-
-static inline void putc(int c)
-{
- int i;
-
- for (i = 0; i < 1000; i++) {
- /* Transmit fifo not full? */
- if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF))
- break;
- }
-
- __raw_writeb(c, PHYS_UART_DATA);
-}
-
-static inline void flush(void)
-{
-}
-
-
/*
* Some bootloaders don't turn off DMA from the ethernet MAC before
* jumping to linux, which means that we might end up with bits of RX
@@ -85,9 +43,11 @@ static void ethernet_reset(void)
;
}
-#define ARCH_HAVE_DECOMP_SETUP
+#define ARCH_HAVE_UCUART_GENERIC
-static void arch_decomp_setup(void)
+static inline void arch_decomp_setup(void)
{
ethernet_reset();
+
+ ucuart_init_amba01x(UART_BASE);
}
--git a/arch/arm/mach-footbridge/include/mach/uncompress.h b/arch/arm/mach-footbridge/include/mach/uncompress.h
index 36313de..32e9654 100644
--- a/arch/arm/mach-footbridge/include/mach/uncompress.h
+++ b/arch/arm/mach-footbridge/include/mach/uncompress.h
@@ -15,18 +15,14 @@
#define DC21285_BASE ((volatile unsigned int *)0x42000160)
#define SER0_BASE ((volatile unsigned char *)0x7c0003f8)
-static inline void putc(char c)
-{
- if (machine_is_netwinder()) {
- while ((SER0_BASE[5] & 0x60) != 0x60)
- barrier();
- SER0_BASE[0] = c;
- } else {
- while (DC21285_BASE[6] & 8);
- DC21285_BASE[0] = c;
- }
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ if (machine_is_netwinder())
+ ucuart_init_8250(SER0_BASE, 0, UCUART_IO_MEM8);
+ else
+ ucuart_init(DC21285_BASE, 2, UCUART_IO_MEM32, 0,
+ 6, 8, 0,
+ 0, 0, 0);
}
diff --git a/arch/arm/mach-gemini/include/mach/uncompress.h b/arch/arm/mach-gemini/include/mach/uncompress.h
index 1828862..855eb5b 100644
--- a/arch/arm/mach-gemini/include/mach/uncompress.h
+++ b/arch/arm/mach-gemini/include/mach/uncompress.h
@@ -13,25 +13,13 @@
#ifndef __MACH_UNCOMPRESS_H
#define __MACH_UNCOMPRESS_H
-#include <linux/serial_reg.h>
#include <mach/hardware.h>
-static volatile unsigned long * const UART = (unsigned long *)GEMINI_UART_BASE;
+#define ARCH_HAVE_UCUART_GENERIC
-/*
- * The following code assumes the serial port has already been
- * initialized by the bootloader. If you didn't setup a port in
- * your bootloader then nothing will appear (which might be desired).
- */
-static inline void putc(char c)
-{
- while (!(UART[UART_LSR] & UART_LSR_THRE))
- barrier();
- UART[UART_TX] = c;
-}
-
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init_8250(GEMINI_UART_BASE, 2, UCUART_IO_MEM32);
}
#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-h720x/include/mach/uncompress.h b/arch/arm/mach-h720x/include/mach/uncompress.h
index 46c8d5a..be44fd1 100644
--- a/arch/arm/mach-h720x/include/mach/uncompress.h
+++ b/arch/arm/mach-h720x/include/mach/uncompress.h
@@ -9,23 +9,14 @@
#include <mach/hardware.h>
-#define LSR 0x14
-#define TEMPTY 0x40
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void putc(int c)
-{
- volatile unsigned char *p = (volatile unsigned char *)(IO_PHYS+0x20000);
-
- /* wait until transmit buffer is empty */
- while((p[LSR] & TEMPTY) == 0x0)
- barrier();
-
- /* write next character */
- *p = c;
-}
-
-static inline void flush(void)
+/* debug-macro.S treats this port as an AMBA01x, but according to the
+ * datasheet, this should be a 8250
+ */
+static inline void arch_decomp_setup(void)
{
+ ucuart_init_8250(SERIAL0_BASE, 2, UCUART_IO_MEM8);
}
#endif
diff --git a/arch/arm/mach-integrator/include/mach/uncompress.h b/arch/arm/mach-integrator/include/mach/uncompress.h
index 9f61543..19f2eb3 100644
--- a/arch/arm/mach-integrator/include/mach/uncompress.h
+++ b/arch/arm/mach-integrator/include/mach/uncompress.h
@@ -17,27 +17,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#define ARCH_HAVE_UCUART_GENERIC
-#define AMBA_UART_DR (*(volatile unsigned char *)0x16000000)
-#define AMBA_UART_LCRH (*(volatile unsigned char *)0x16000008)
-#define AMBA_UART_LCRM (*(volatile unsigned char *)0x1600000c)
-#define AMBA_UART_LCRL (*(volatile unsigned char *)0x16000010)
-#define AMBA_UART_CR (*(volatile unsigned char *)0x16000014)
-#define AMBA_UART_FR (*(volatile unsigned char *)0x16000018)
-
-/*
- * This does not append a newline
- */
-static void putc(int c)
-{
- while (AMBA_UART_FR & (1 << 5))
- barrier();
-
- AMBA_UART_DR = c;
-}
-
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
- while (AMBA_UART_FR & (1 << 3))
- barrier();
+ ucuart_init_amba01x(0x16000000);
}
diff --git a/arch/arm/mach-iop13xx/include/mach/uncompress.h b/arch/arm/mach-iop13xx/include/mach/uncompress.h
index bfa8eac..ac09a33 100644
--- a/arch/arm/mach-iop13xx/include/mach/uncompress.h
+++ b/arch/arm/mach-iop13xx/include/mach/uncompress.h
@@ -1,17 +1,8 @@
-#include <asm/types.h>
-#include <linux/serial_reg.h>
#include <mach/hardware.h>
-#define UART_BASE ((volatile u32 *)IOP13XX_UART1_PHYS)
-#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void putc(char c)
-{
- while ((UART_BASE[UART_LSR] & TX_DONE) != TX_DONE)
- barrier();
- UART_BASE[UART_TX] = c;
-}
-
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init_8250(IOP13XX_UART1_PHYS, 2, UCUART_IO_MEM32);
}
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
index c1ff29a..97fb970 100644
--- a/arch/arm/mach-iop32x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop32x/include/mach/uncompress.h
@@ -1,36 +1,16 @@
/*
* arch/arm/mach-iop32x/include/mach/uncompress.h
*/
-
-#include <asm/types.h>
-#include <asm/mach-types.h>
-#include <linux/serial_reg.h>
#include <mach/hardware.h>
-volatile u8 *uart_base;
-
-#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
-
-static inline void putc(char c)
-{
- while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
- barrier();
- uart_base[UART_TX] = c;
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void flush(void)
-{
-}
-
-static __inline__ void __arch_decomp_setup(unsigned long arch_id)
+static inline void arch_decomp_setup(void)
{
if (machine_is_iq80321())
- uart_base = (volatile u8 *)IQ80321_UART;
+ ucuart_init_8250(IQ80321_UART, 0, UCUART_IO_MEM8);
else if (machine_is_iq31244() || machine_is_em7210())
- uart_base = (volatile u8 *)IQ31244_UART;
+ ucuart_init_8250(IQ31244_UART, 0, UCUART_IO_MEM8);
else
- uart_base = (volatile u8 *)0xfe800000;
+ ucuart_init_8250(0xfe800000, 0, UCUART_IO_MEM8);
}
-
-#define ARCH_HAVE_DECOMP_SETUP
-#define arch_decomp_setup() __arch_decomp_setup(arch_id)
diff --git a/arch/arm/mach-iop33x/include/mach/uncompress.h b/arch/arm/mach-iop33x/include/mach/uncompress.h
index 9537d4b..294c444 100644
--- a/arch/arm/mach-iop33x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop33x/include/mach/uncompress.h
@@ -2,33 +2,15 @@
* arch/arm/mach-iop33x/include/mach/uncompress.h
*/
-#include <asm/types.h>
#include <asm/mach-types.h>
-#include <linux/serial_reg.h>
#include <mach/hardware.h>
-volatile u32 *uart_base;
+#define ARCH_HAVE_UCUART_GENERIC
-#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
-
-static inline void putc(char c)
-{
- while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
- barrier();
- uart_base[UART_TX] = c;
-}
-
-static inline void flush(void)
-{
-}
-
-static __inline__ void __arch_decomp_setup(unsigned long arch_id)
+static inline void arch_decomp_setup(void)
{
if (machine_is_iq80331() || machine_is_iq80332())
- uart_base = (volatile u32 *)IOP33X_UART0_PHYS;
+ ucuart_init_8250(IOP33X_UART0_PHYS, 2, UCUART_IO_MEM32);
else
- uart_base = (volatile u32 *)0xfe800000;
+ ucuart_init_8250(0xfe800000, 2, UCUART_IO_MEM32);
}
-
-#define ARCH_HAVE_DECOMP_SETUP
-#define arch_decomp_setup() __arch_decomp_setup(arch_id)
diff --git a/arch/arm/mach-ixp2000/include/mach/uncompress.h b/arch/arm/mach-ixp2000/include/mach/uncompress.h
index 519ba97..dc24c65 100644
--- a/arch/arm/mach-ixp2000/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp2000/include/mach/uncompress.h
@@ -14,31 +14,9 @@
*
*/
-#include <linux/serial_reg.h>
+#define ARCH_HAVE_UCUART_GENERIC
-#define UART_BASE 0xc0030000
-
-#define PHYS(x) ((volatile unsigned long *)(UART_BASE + x))
-
-#define UARTDR PHYS(0x00) /* Transmit reg dlab=0 */
-#define UARTDLL PHYS(0x00) /* Divisor Latch reg dlab=1*/
-#define UARTDLM PHYS(0x04) /* Divisor Latch reg dlab=1*/
-#define UARTIER PHYS(0x04) /* Interrupt enable reg */
-#define UARTFCR PHYS(0x08) /* FIFO control reg dlab =0*/
-#define UARTLCR PHYS(0x0c) /* Control reg */
-#define UARTSR PHYS(0x14) /* Status reg */
-
-
-static inline void putc(int c)
-{
- int j = 0x1000;
-
- while (--j && !(*UARTSR & UART_LSR_THRE))
- barrier();
-
- *UARTDR = c;
-}
-
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init_8250(0xc0030000, 2, UCUART_IO_MEM32);
}
diff --git a/arch/arm/mach-ixp23xx/include/mach/uncompress.h b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
index ab23cbb..e986753 100644
--- a/arch/arm/mach-ixp23xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
@@ -12,25 +12,12 @@
#define __ASM_ARCH_UNCOMPRESS_H
#include <mach/ixp23xx.h>
-#include <linux/serial_reg.h>
-#define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS)
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void putc(char c)
-{
- int j;
-
- for (j = 0; j < 0x1000; j++) {
- if (UART_BASE[UART_LSR] & UART_LSR_THRE)
- break;
- barrier();
- }
-
- UART_BASE[UART_TX] = c;
-}
-
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init_8250(IXP23XX_UART1_PHYS, 2, UCUART_IO_MEM32);
}
#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
index 0a0102c..17b430a 100644
--- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
@@ -15,27 +15,10 @@
#include "ixp4xx-regs.h"
#include <asm/mach-types.h>
-#include <linux/serial_reg.h>
-#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
+#define ARCH_HAVE_UCUART_GENERIC
-volatile u32* uart_base;
-
-static inline void putc(int c)
-{
- /* Check THRE and TEMT bits before we transmit the character.
- */
- while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
- barrier();
-
- *uart_base = c;
-}
-
-static void flush(void)
-{
-}
-
-static __inline__ void __arch_decomp_setup(unsigned long arch_id)
+static inline void arch_decomp_setup(void)
{
/*
* Some boards are using UART2 as console
@@ -43,15 +26,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
machine_is_gateway7001() || machine_is_wg302v2() ||
machine_is_devixp() || machine_is_miccpt() || machine_is_mic256())
- uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
+ ucuart_init_8250(IXP4XX_UART2_BASE_PHYS, 2, UCUART_IO_MEM32);
else
- uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
+ ucuart_init_8250(IXP4XX_UART1_BASE_PHYS, 2, UCUART_IO_MEM32);
}
-/*
- * arch_id is a variable in decompress_kernel()
- */
-#define ARCH_HAVE_DECOMP_SETUP
-#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-
#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/uncompress.h b/arch/arm/mach-kirkwood/include/mach/uncompress.h
index 1fc91eb..e46c96c 100644
--- a/arch/arm/mach-kirkwood/include/mach/uncompress.h
+++ b/arch/arm/mach-kirkwood/include/mach/uncompress.h
@@ -5,37 +5,11 @@
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
-
-#include <linux/serial_reg.h>
#include <mach/kirkwood.h>
-#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
-
-static void putc(const char c)
-{
- unsigned char *base = SERIAL_BASE;
- int i;
-
- for (i = 0; i < 0x1000; i++) {
- if (base[UART_LSR << 2] & UART_LSR_THRE)
- break;
- barrier();
- }
+#define ARCH_HAVE_UCUART_GENERIC
- base[UART_TX << 2] = c;
-}
-
-static void flush(void)
+static inline void arch_decomp_setup(void)
{
- unsigned char *base = SERIAL_BASE;
- unsigned char mask;
- int i;
-
- mask = UART_LSR_TEMT | UART_LSR_THRE;
-
- for (i = 0; i < 0x1000; i++) {
- if ((base[UART_LSR << 2] & mask) == mask)
- break;
- barrier();
- }
+ ucuart_init_8250(UART0_PHYS_BASE, 2, UCUART_IO_MEM8);
}
diff --git a/arch/arm/mach-ks8695/include/mach/uncompress.h b/arch/arm/mach-ks8695/include/mach/uncompress.h
index 548c43b..9e6ba4e 100644
--- a/arch/arm/mach-ks8695/include/mach/uncompress.h
+++ b/arch/arm/mach-ks8695/include/mach/uncompress.h
@@ -14,21 +14,15 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
-#include <linux/io.h>
#include <mach/regs-uart.h>
-static void putc(char c)
-{
- while (!(__raw_readl(KS8695_UART_PA + KS8695_URLS) & URLS_URTHRE))
- barrier();
-
- __raw_writel(c, KS8695_UART_PA + KS8695_URTH);
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
- while (!(__raw_readl(KS8695_UART_PA + KS8695_URLS) & URLS_URTE))
- barrier();
+ ucuart_init(KS8695_UART_PA, 0, UCUART_MEM32, KS8695_URTH,
+ KS8695_URLS, URLS_URTHRE, URLS_URTHRE,
+ KS8695_URLS, URLS_URTE, URLS_URTE);
}
#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/uncompress.h b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
index 36176e2..61a16eb 100644
--- a/arch/arm/mach-lpc32xx/include/mach/uncompress.h
+++ b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
@@ -19,38 +19,13 @@
#ifndef __ASM_ARM_ARCH_UNCOMPRESS_H
#define __ASM_ARM_ARCH_UNCOMPRESS_H
-#include <linux/io.h>
-
-#include <mach/hardware.h>
#include <mach/platform.h>
-/*
- * Uncompress output is hardcoded to standard UART 5
- */
-
-#define UART_FIFO_CTL_TX_RESET (1 << 2)
-#define UART_STATUS_TX_MT (1 << 6)
-
-#define _UARTREG(x) (void __iomem *)(LPC32XX_UART5_BASE + (x))
-
-#define LPC32XX_UART_DLLFIFO_O 0x00
-#define LPC32XX_UART_IIRFCR_O 0x08
-#define LPC32XX_UART_LSR_O 0x14
-
-static inline void putc(int ch)
-{
- /* Wait for transmit FIFO to empty */
- while ((__raw_readl(_UARTREG(LPC32XX_UART_LSR_O)) &
- UART_STATUS_TX_MT) == 0)
- ;
-
- __raw_writel((u32) ch, _UARTREG(LPC32XX_UART_DLLFIFO_O));
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
- __raw_writel(__raw_readl(_UARTREG(LPC32XX_UART_IIRFCR_O)) |
- UART_FIFO_CTL_TX_RESET, _UARTREG(LPC32XX_UART_IIRFCR_O));
+ ucuart_init_8250(LPC32XX_UART5_BASE, 2, UCUART_IO_MEM32);
}
#endif
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h
index 8c58b57..4cafe10 100644
--- a/arch/arm/mach-mmp/include/mach/uncompress.h
+++ b/arch/arm/mach-mmp/include/mach/uncompress.h
@@ -5,8 +5,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-
-#include <linux/serial_reg.h>
#include <mach/addr-map.h>
#include <asm/mach-types.h>
@@ -14,34 +12,12 @@
#define UART2_BASE (APB_PHYS_BASE + 0x17000)
#define UART3_BASE (APB_PHYS_BASE + 0x18000)
-volatile unsigned long *UART;
-
-static inline void putc(char c)
-{
- /* UART enabled? */
- if (!(UART[UART_IER] & UART_IER_UUE))
- return;
-
- while (!(UART[UART_LSR] & UART_LSR_THRE))
- barrier();
-
- UART[UART_TX] = c;
-}
-
-/*
- * This does not append a newline
- */
-static inline void flush(void)
-{
-}
-
#define ARCH_HAVE_DECOMP_SETUP
static inline void arch_decomp_setup(void)
{
- /* default to UART2 */
- UART = (unsigned long *)UART2_BASE;
-
if (machine_is_avengers_lite())
- UART = (unsigned long *)UART3_BASE;
+ ucuart_init_8250(UART3_BASE, 2, UCUART_IO_MEM32);
+ else
+ ucuart_init_8250(UART2_BASE, 2, UCUART_IO_MEM32);
}
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
index 7fa472d..d427ce8 100644
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -19,17 +19,14 @@
#include "linux/io.h"
#include "mach/msm_iomap.h"
-static void putc(int c)
-{
-#if defined(MSM_DEBUG_UART_PHYS)
- unsigned base = MSM_DEBUG_UART_PHYS;
- while (!(readl(base + 0x08) & 0x04)) ;
- writel(c, base + 0x0c);
-#endif
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+#if defined(MSM_DEBUG_UART_PHYS)
+ ucuart_init(MSM_DEBUG_UART_PHYS, 2, UCUART_IO_MEM32, 0x0c,
+ 0x08, 0x04, 0x04,
+ 0, 0, 0);
+#endif /* MSM_DEBUG_UART_PHYS */
}
-
#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/uncompress.h b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
index d26eb30..720340e 100644
--- a/arch/arm/mach-mv78xx0/include/mach/uncompress.h
+++ b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
@@ -9,33 +9,9 @@
#include <linux/serial_reg.h>
#include <mach/mv78xx0.h>
-#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
+#define ARCH_HAVE_UCUART_GENERIC
-static void putc(const char c)
+static inline void arch_decomp_setup(void)
{
- unsigned char *base = SERIAL_BASE;
- int i;
-
- for (i = 0; i < 0x1000; i++) {
- if (base[UART_LSR << 2] & UART_LSR_THRE)
- break;
- barrier();
- }
-
- base[UART_TX << 2] = c;
-}
-
-static void flush(void)
-{
- unsigned char *base = SERIAL_BASE;
- unsigned char mask;
- int i;
-
- mask = UART_LSR_TEMT | UART_LSR_THRE;
-
- for (i = 0; i < 0x1000; i++) {
- if ((base[UART_LSR << 2] & mask) == mask)
- break;
- barrier();
- }
+ ucuart_init_8250(UART0_PHYS_BASE, 2, UCUART_IO_MEM8);
}
diff --git a/arch/arm/mach-mxs/include/mach/uncompress.h b/arch/arm/mach-mxs/include/mach/uncompress.h
index eded40b..c9587ce 100644
--- a/arch/arm/mach-mxs/include/mach/uncompress.h
+++ b/arch/arm/mach-mxs/include/mach/uncompress.h
@@ -20,58 +20,22 @@
#include <asm/mach-types.h>
-unsigned long mxs_duart_base;
-
-#define MXS_DUART(x) (*(volatile unsigned long *)(mxs_duart_base + (x)))
-
-#define MXS_DUART_DR 0x00
-#define MXS_DUART_FR 0x18
-#define MXS_DUART_FR_TXFE (1 << 7)
-#define MXS_DUART_CR 0x30
-#define MXS_DUART_CR_UARTEN (1 << 0)
-
-/*
- * The following code assumes the serial port has already been
- * initialized by the bootloader. If it's not, the output is
- * simply discarded.
- */
-
-static void putc(int ch)
-{
- if (!mxs_duart_base)
- return;
- if (!(MXS_DUART(MXS_DUART_CR) & MXS_DUART_CR_UARTEN))
- return;
-
- while (!(MXS_DUART(MXS_DUART_FR) & MXS_DUART_FR_TXFE))
- barrier();
-
- MXS_DUART(MXS_DUART_DR) = ch;
-}
-
-static inline void flush(void)
-{
-}
-
#define MX23_DUART_BASE_ADDR 0x80070000
#define MX28_DUART_BASE_ADDR 0x80074000
-static inline void __arch_decomp_setup(unsigned long arch_id)
+static inline void arch_decomp_setup(void)
{
switch (arch_id) {
case MACH_TYPE_MX23EVK:
- mxs_duart_base = MX23_DUART_BASE_ADDR;
+ ucuart_init_amba01x(MX23_DUART_BASE_ADDR);
break;
case MACH_TYPE_MX28EVK:
case MACH_TYPE_TX28:
- mxs_duart_base = MX28_DUART_BASE_ADDR;
+ ucuart_init_amba01x(MX28_DUART_BASE_ADDR);
break;
default:
break;
}
}
-#define ARCH_HAVE_DECOMP_SETUP
-#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-
#endif /* __MACH_MXS_UNCOMPRESS_H__ */
diff --git a/arch/arm/mach-netx/include/mach/uncompress.h b/arch/arm/mach-netx/include/mach/uncompress.h
index 0e011ee..f61e22b 100644
--- a/arch/arm/mach-netx/include/mach/uncompress.h
+++ b/arch/arm/mach-netx/include/mach/uncompress.h
@@ -22,49 +22,15 @@
* initialized by the bootloader. We search for the first enabled
* port in the most probable order. If you didn't setup a port in
* your bootloader then nothing will appear (which might be desired).
- *
- * This does not append a newline
*/
-#define REG(x) (*(volatile unsigned long *)(x))
-
#define UART1_BASE 0x100a00
#define UART2_BASE 0x100a80
-#define UART_DR 0x0
-
-#define UART_CR 0x14
-#define CR_UART_EN (1<<0)
+#define ARCH_HAVE_UCUART_GENERIC
-#define UART_FR 0x18
-#define FR_BUSY (1<<3)
-#define FR_TXFF (1<<5)
-
-static void putc(char c)
+static inline void arch_decomp_setup(void)
{
- unsigned long base;
-
- if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
- base = UART1_BASE;
- else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
- base = UART2_BASE;
- else
- return;
-
- while (REG(base + UART_FR) & FR_TXFF);
- REG(base + UART_DR) = c;
-}
-
-static inline void flush(void)
-{
- unsigned long base;
-
- if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
- base = UART1_BASE;
- else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
- base = UART2_BASE;
- else
- return;
-
- while (REG(base + UART_FR) & FR_BUSY);
+ ucuart_init_amba01x(UART1_BASE);
+ ucuart_init_amba01x(UART2_BASE);
}
diff --git a/arch/arm/mach-nomadik/include/mach/uncompress.h b/arch/arm/mach-nomadik/include/mach/uncompress.h
index 08f6615..1eb4ae6 100644
--- a/arch/arm/mach-nomadik/include/mach/uncompress.h
+++ b/arch/arm/mach-nomadik/include/mach/uncompress.h
@@ -19,39 +19,13 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
-#include <asm/setup.h>
-#include <asm/io.h>
#include <mach/hardware.h>
-/* we need the constants in amba/serial.h, but it refers to amba_device */
-struct amba_device;
-#include <linux/amba/serial.h>
+#define ARCH_HAVE_UCUART_GENERIC
-#define NOMADIK_UART_DR 0x101FB000
-#define NOMADIK_UART_LCRH 0x101FB02c
-#define NOMADIK_UART_CR 0x101FB030
-#define NOMADIK_UART_FR 0x101FB018
-
-static void putc(const char c)
-{
- /* Do nothing if the UART is not enabled. */
- if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN))
- return;
-
- if (c == '\n')
- putc('\r');
-
- while (readb(NOMADIK_UART_FR) & UART01x_FR_TXFF)
- barrier();
- writeb(c, NOMADIK_UART_DR);
-}
-
-static void flush(void)
+static inline void arch_decomp_setup(void)
{
- if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN))
- return;
- while (readb(NOMADIK_UART_FR) & UART01x_FR_BUSY)
- barrier();
+ ucuart_init_amba01x(NOMADIK_UART1_BASE);
}
#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-orion5x/include/mach/uncompress.h b/arch/arm/mach-orion5x/include/mach/uncompress.h
index a4dca1c..1ac83f5 100644
--- a/arch/arm/mach-orion5x/include/mach/uncompress.h
+++ b/arch/arm/mach-orion5x/include/mach/uncompress.h
@@ -7,37 +7,11 @@
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
-
-#include <linux/serial_reg.h>
#include <mach/orion5x.h>
-#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
-
-static void putc(const char c)
-{
- unsigned char *base = SERIAL_BASE;
- int i;
-
- for (i = 0; i < 0x1000; i++) {
- if (base[UART_LSR << 2] & UART_LSR_THRE)
- break;
- barrier();
- }
+#define ARCH_HAVE_UCUART_GENERIC
- base[UART_TX << 2] = c;
-}
-
-static void flush(void)
+static inline void arch_decomp_setup(void)
{
- unsigned char *base = SERIAL_BASE;
- unsigned char mask;
- int i;
-
- mask = UART_LSR_TEMT | UART_LSR_THRE;
-
- for (i = 0; i < 0x1000; i++) {
- if ((base[UART_LSR << 2] & mask) == mask)
- break;
- barrier();
- }
+ ucuart_init_8250(UART0_PHYS_BASE, 2, UCUART_IO_MEM8);
}
diff --git a/arch/arm/mach-pnx4008/include/mach/uncompress.h b/arch/arm/mach-pnx4008/include/mach/uncompress.h
index add0c75..dee85ef 100644
--- a/arch/arm/mach-pnx4008/include/mach/uncompress.h
+++ b/arch/arm/mach-pnx4008/include/mach/uncompress.h
@@ -20,21 +20,9 @@
*/
#define UART5_BASE 0x40090000
+#define ARCH_HAVE_UCUART_GENERIC
-#define UART5_DR (*(volatile unsigned char *) (UART5_BASE))
-#define UART5_FR (*(volatile unsigned char *) (UART5_BASE + 18))
-
-static __inline__ void putc(char c)
-{
- while (UART5_FR & (1 << 5))
- barrier();
-
- UART5_DR = c;
-}
-
-/*
- * This does not append a newline
- */
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init_amba01x(UART5_BASE);
}
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-prima2/include/mach/uncompress.h
index 9ee022f..14effdc 100644
--- a/arch/arm/mach-prima2/include/mach/uncompress.h
+++ b/arch/arm/mach-prima2/include/mach/uncompress.h
@@ -9,26 +9,14 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
-#include <linux/io.h>
-#include <mach/hardware.h>
#include <mach/uart.h>
-static __inline__ void putc(char c)
-{
- /*
- * during kernel decompression, all mappings are flat:
- * virt_addr == phys_addr
- */
- 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);
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init(SIRFSOC_UART1_PA_BASE, 0, UCUART_IO_MEM32,
+ SIRFSOC_UART_TXFIFO_DATA, SIRFSOC_UART_TXFIFO_STATUS,
+ SIRFSOC_UART1_TXFIFO_FULL, 0, 0, 0, 0);
}
-
#endif
-
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
index 28acded..57f1755 100644
--- a/arch/arm/mach-pxa/include/mach/uncompress.h
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -16,61 +16,24 @@
#define BTUART_BASE (0x40200000)
#define STUART_BASE (0x40700000)
-unsigned long uart_base;
-unsigned int uart_shift;
-unsigned int uart_is_pxa;
-
-static inline unsigned char uart_read(int offset)
-{
- return *(volatile unsigned char *)(uart_base + (offset << uart_shift));
-}
-
-static inline void uart_write(unsigned char val, int offset)
-{
- *(volatile unsigned char *)(uart_base + (offset << uart_shift)) = val;
-}
-
-static inline int uart_is_enabled(void)
-{
- /* assume enabled by default for non-PXA uarts */
- return uart_is_pxa ? uart_read(UART_IER) & UART_IER_UUE : 1;
-}
-
-static inline void putc(char c)
-{
- if (!uart_is_enabled())
- return;
-
- while (!(uart_read(UART_LSR) & UART_LSR_THRE))
- barrier();
-
- uart_write(c, UART_TX);
-}
-
-/*
- * This does not append a newline
- */
-static inline void flush(void)
-{
-}
-
-#define ARCH_HAVE_DECOMP_SETUP
+#define ARCH_HAVE_UCUART_GENERIC
static inline void arch_decomp_setup(void)
{
- /* initialize to default */
- uart_base = FFUART_BASE;
- uart_shift = 2;
- uart_is_pxa = 1;
-
- if (machine_is_littleton() || machine_is_intelmote2()
- || machine_is_csb726() || machine_is_stargate2()
- || machine_is_cm_x300() || machine_is_balloon3())
- uart_base = STUART_BASE;
+ unsigned long uart_base;
+
+ if (machine_is_arcom_zeus())
+ ucuart_init_8250(0x10000000, 1, UCUART_IO_MEM8); /* nCS4 */
+ else if (machine_is_littleton() || machine_is_intelmote2()
+ || machine_is_csb726() || machine_is_stargate2()
+ || machine_is_cm_x300() || machine_is_balloon3())
+ uart_base = STUART_BASE;
+ else
+ uart_base = FFUART_BASE;
+
+ /* Don't do anything if UART is not enabled */
+ if (!__raw_readl(uart_base + UART_IER) & UART_IER_UUE)
+ return;
- if (machine_is_arcom_zeus()) {
- uart_base = 0x10000000; /* nCS4 */
- uart_shift = 1;
- uart_is_pxa = 0;
- }
+ ucuart_init_8250(uart_base, 2, UCUART_IO_MEM8);
}
diff --git a/arch/arm/mach-realview/include/mach/uncompress.h b/arch/arm/mach-realview/include/mach/uncompress.h
index 9ba06e9..899aef7 100644
--- a/arch/arm/mach-realview/include/mach/uncompress.h
+++ b/arch/arm/mach-realview/include/mach/uncompress.h
@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <mach/board-eb.h>
@@ -26,47 +25,23 @@
#include <mach/board-pba8.h>
#include <mach/board-pbx.h>
-#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
-#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))
-#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))
-#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))
-
-/*
- * Return the UART base address
- */
-static inline unsigned long get_uart_base(void)
+#define ARCH_HAVE_UCUART_GENERIC
+static inline void arch_decomp_setup(void)
{
+ int uart_base;
+
if (machine_is_realview_eb())
- return REALVIEW_EB_UART0_BASE;
+ uart_base = REALVIEW_EB_UART0_BASE;
else if (machine_is_realview_pb11mp())
- return REALVIEW_PB11MP_UART0_BASE;
+ uart_base = REALVIEW_PB11MP_UART0_BASE;
else if (machine_is_realview_pb1176())
- return REALVIEW_PB1176_UART0_BASE;
+ uart_base = REALVIEW_PB1176_UART0_BASE;
else if (machine_is_realview_pba8())
- return REALVIEW_PBA8_UART0_BASE;
+ uart_base = REALVIEW_PBA8_UART0_BASE;
else if (machine_is_realview_pbx())
- return REALVIEW_PBX_UART0_BASE;
+ uart_base = REALVIEW_PBX_UART0_BASE;
else
- return 0;
-}
-
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
-{
- unsigned long base = get_uart_base();
-
- while (AMBA_UART_FR(base) & (1 << 5))
- barrier();
-
- AMBA_UART_DR(base) = c;
-}
-
-static inline void flush(void)
-{
- unsigned long base = get_uart_base();
+ return;
- while (AMBA_UART_FR(base) & (1 << 3))
- barrier();
+ ucuart_init_amba01x(uart_base);
}
diff --git a/arch/arm/mach-sa1100/include/mach/uncompress.h b/arch/arm/mach-sa1100/include/mach/uncompress.h
index 55c9e59..dc0c8b7 100644
--- a/arch/arm/mach-sa1100/include/mach/uncompress.h
+++ b/arch/arm/mach-sa1100/include/mach/uncompress.h
@@ -14,31 +14,30 @@
* port in the most probable order. If you didn't setup a port in
* your bootloader then nothing will appear (which might be desired).
*/
+#define ARCH_HAVE_UCUART_GENERIC
-#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
-
-static void putc(int c)
+static inline int uart_enabled(int base)
{
- unsigned long serial_port;
-
- do {
- serial_port = _Ser3UTCR0;
- if (UART(UTCR3) & UTCR3_TXE) break;
- serial_port = _Ser1UTCR0;
- if (UART(UTCR3) & UTCR3_TXE) break;
- serial_port = _Ser2UTCR0;
- if (UART(UTCR3) & UTCR3_TXE) break;
- return;
- } while (0);
+ if (__raw_readl((void __iomem *)(base + UTCR3)) & UTCR3_TXE)
+ return 1;
- /* wait for space in the UART's transmitter */
- while (!(UART(UTSR1) & UTSR1_TNF))
- barrier();
-
- /* send the character out. */
- UART(UTDR) = c;
+ return 0;
}
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ int uart_base;
+
+ if (uart_enabled(_Ser3UTCR0))
+ uart_base = _Ser3UTCR0;
+ else if (uart_enabled(_Ser1UTCR0))
+ uart_base = _Ser1UTCR0;
+ else if (uart_enabled(_Ser2UTCR0))
+ uart_base = _Ser2UTCR0;
+ else
+ return;
+
+ ucuart_init(uart_base, 0, UCUART_IO_MEM32, UTDR,
+ UTSR1, UTSR1_TNF, UTSR1_TNF,
+ 0, 0, 0);
}
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
index 40f4b68..9900826 100644
--- a/arch/arm/mach-shark/include/mach/uncompress.h
+++ b/arch/arm/mach-shark/include/mach/uncompress.h
@@ -7,39 +7,9 @@
* Copyright (C) 1996,1997,1998 Russell King
*/
-#define SERIAL_BASE ((volatile unsigned char *)0x400003f8)
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void putc(int c)
+static inline void arch_decomp_setup(void)
{
- volatile int t;
-
- SERIAL_BASE[0] = c;
- t=0x10000;
- while (t--);
-}
-
-static inline void flush(void)
-{
-}
-
-#ifdef DEBUG
-static void putn(unsigned long z)
-{
- int i;
- char x;
-
- putc('0');
- putc('x');
- for (i=0;i<8;i++) {
- x='0'+((z>>((7-i)*4))&0xf);
- if (x>'9') x=x-'0'+'A'-10;
- putc(x);
- }
-}
-
-static void putr()
-{
- putc('\n');
- putc('\r');
+ ucuart_init_8250(0x400003f8, 0, UCUART_IO_MEM8);
}
-#endif
diff --git a/arch/arm/mach-tegra/include/mach/uncompress.h b/arch/arm/mach-tegra/include/mach/uncompress.h
index 1b07047..61dfd6b 100644
--- a/arch/arm/mach-tegra/include/mach/uncompress.h
+++ b/arch/arm/mach-tegra/include/mach/uncompress.h
@@ -26,37 +26,19 @@
#include <mach/iomap.h>
-static void putc(int c)
-{
- volatile u8 *uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE;
- int shift = 2;
-
- if (uart == NULL)
- return;
-
- while (!(uart[UART_LSR << shift] & UART_LSR_THRE))
- barrier();
- uart[UART_TX << shift] = c;
-}
-
-static inline void flush(void)
-{
-}
-
-#define ARCH_HAVE_DECOMP_SETUP
+#define ARCH_HAVE_UCUART_GENERIC
static inline void arch_decomp_setup(void)
{
- volatile u8 *uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE;
- int shift = 2;
+ void __iomem *uart_base = (void*)TEGRA_DEBUG_UART_BASE;
- if (uart == NULL)
- return;
+ __raw_writel(__raw_readl(uart_base + UART_LCR << 2) | UART_LCR_DLAB,
+ uart_base + UART_LCR << 2);
+ __raw_writel(0x75, uart_base + UART_DLL << 2);
+ __raw_writel(0, uart_base + UART_DLM << 2);
+ __raw_writel(3, uart_base + UART_LCR << 2);
- uart[UART_LCR << shift] |= UART_LCR_DLAB;
- uart[UART_DLL << shift] = 0x75;
- uart[UART_DLM << shift] = 0x0;
- uart[UART_LCR << shift] = 3;
+ ucuart_init_8250(TEGRA_DEBUG_UART_BASE, 2, UCUART_IO_MEM8);
}
#endif
diff --git a/arch/arm/mach-u300/include/mach/uncompress.h b/arch/arm/mach-u300/include/mach/uncompress.h
index 68d0298..8bc389a 100644
--- a/arch/arm/mach-u300/include/mach/uncompress.h
+++ b/arch/arm/mach-u300/include/mach/uncompress.h
@@ -17,24 +17,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define AMBA_UART_DR (*(volatile unsigned char *)0xc0013000)
-#define AMBA_UART_LCRH (*(volatile unsigned char *)0xc001302C)
-#define AMBA_UART_CR (*(volatile unsigned char *)0xc0013030)
-#define AMBA_UART_FR (*(volatile unsigned char *)0xc0013018)
+#define ARCH_HAVE_UCUART_GENERIC
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
-{
- while (AMBA_UART_FR & (1 << 5))
- barrier();
-
- AMBA_UART_DR = c;
-}
-
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
- while (AMBA_UART_FR & (1 << 3))
- barrier();
+ ucuart_init_amba01x(0xc0013000);
}
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
index d096c99..7e3b48a 100644
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ b/arch/arm/mach-ux500/include/mach/uncompress.h
@@ -18,45 +18,18 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
-#include <asm/setup.h>
#include <asm/mach-types.h>
-#include <linux/io.h>
-#include <linux/amba/serial.h>
#include <mach/hardware.h>
-u32 ux500_uart_base;
-
-static void putc(const char c)
-{
- /* Do nothing if the UART is not enabled. */
- if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1))
- return;
-
- if (c == '\n')
- putc('\r');
-
- while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 5))
- barrier();
- __raw_writeb(c, ux500_uart_base + UART01x_DR);
-}
-
-static void flush(void)
-{
- if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1))
- return;
- while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 3))
- barrier();
-}
-
#define ARCH_HAVE_DECOMP_SETUP
static inline void arch_decomp_setup(void)
{
/* Check in run time if we run on an U8500 or U5500 */
if (machine_is_u5500())
- ux500_uart_base = U5500_UART0_BASE;
+ ucuart_init_amba01x(U5500_UART0_BASE);
else
- ux500_uart_base = U8500_UART2_BASE;
+ ucuart_init_amba01x(U8500_UART2_BASE);
}
#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-versatile/include/mach/uncompress.h b/arch/arm/mach-versatile/include/mach/uncompress.h
index 164b9b5..14294ef 100644
--- a/arch/arm/mach-versatile/include/mach/uncompress.h
+++ b/arch/arm/mach-versatile/include/mach/uncompress.h
@@ -17,24 +17,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define AMBA_UART_DR (*(volatile unsigned char *)0x101F1000)
-#define AMBA_UART_LCRH (*(volatile unsigned char *)0x101F102C)
-#define AMBA_UART_CR (*(volatile unsigned char *)0x101F1030)
-#define AMBA_UART_FR (*(volatile unsigned char *)0x101F1018)
+#define ARCH_HAVE_UCUART_GENERIC
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
-{
- while (AMBA_UART_FR & (1 << 5))
- barrier();
-
- AMBA_UART_DR = c;
-}
-
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
- while (AMBA_UART_FR & (1 << 3))
- barrier();
+ ucuart_init_amba01x(0x101F1000);
}
diff --git a/arch/arm/mach-vexpress/include/mach/uncompress.h b/arch/arm/mach-vexpress/include/mach/uncompress.h
index 0f85a648..00c45e5 100644
--- a/arch/arm/mach-vexpress/include/mach/uncompress.h
+++ b/arch/arm/mach-vexpress/include/mach/uncompress.h
@@ -17,30 +17,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
-#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))
-#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))
-#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))
+#define ARCH_HAVE_UCUART_GENERIC
-#define get_uart_base() (0x10000000 + 0x00009000)
-
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
+static inline void arch_decomp_setup(void)
{
- unsigned long base = get_uart_base();
-
- while (AMBA_UART_FR(base) & (1 << 5))
- barrier();
-
- AMBA_UART_DR(base) = c;
-}
-
-static inline void flush(void)
-{
- unsigned long base = get_uart_base();
-
- while (AMBA_UART_FR(base) & (1 << 3))
- barrier();
+ ucuart_init_amba01x(0x10009000);
}
diff --git a/arch/arm/mach-vt8500/include/mach/uncompress.h b/arch/arm/mach-vt8500/include/mach/uncompress.h
index 6b93a01..3f7e315 100644
--- a/arch/arm/mach-vt8500/include/mach/uncompress.h
+++ b/arch/arm/mach-vt8500/include/mach/uncompress.h
@@ -14,18 +14,9 @@
* GNU General Public License for more details.
*
*/
+#define ARCH_HAVE_UCUART_GENERIC
-#define UART0_PHYS 0xd8200000
-#include <asm/io.h>
-
-static void putc(const char c)
-{
- while (readb(UART0_PHYS + 0x1c) & 0x2)
- /* Tx busy, wait and poll */;
-
- writeb(c, UART0_PHYS);
-}
-
-static void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init(0xd8200000, 0, UCUART_IO_MEM8, 0, 0x1C, 0x2, 0, 0, 0, 0);
}
diff --git a/arch/arm/mach-w90x900/include/mach/uncompress.h b/arch/arm/mach-w90x900/include/mach/uncompress.h
index 935d950..f082f83 100644
--- a/arch/arm/mach-w90x900/include/mach/uncompress.h
+++ b/arch/arm/mach-w90x900/include/mach/uncompress.h
@@ -18,27 +18,10 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
-/* Defines for UART registers */
-
-#include <mach/regs-serial.h>
#include <mach/map.h>
-#include <linux/serial_reg.h>
-
-#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
-static volatile u32 * const uart_base = (u32 *)UART0_PA;
-static void putc(int ch)
+static inline void arch_decomp_setup(void)
{
- /* Check THRE and TEMT bits before we transmit the character.
- */
- while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
- barrier();
-
- *uart_base = ch;
+ ucuart_init_8250(W90X900_PA_UART, 2, UCUART_IO_MEM32);
}
-
-static inline void flush(void)
-{
-}
-
#endif/* __ASM_W90X900_UNCOMPRESS_H */
diff --git a/arch/arm/mach-zynq/include/mach/uncompress.h b/arch/arm/mach-zynq/include/mach/uncompress.h
index 623cebe..c968774 100644
--- a/arch/arm/mach-zynq/include/mach/uncompress.h
+++ b/arch/arm/mach-zynq/include/mach/uncompress.h
@@ -15,31 +15,16 @@
#ifndef __MACH_UNCOMPRESS_H__
#define __MACH_UNCOMPRESS_H__
-#include <linux/io.h>
-#include <asm/processor.h>
#include <mach/zynq_soc.h>
#include <mach/uart.h>
-static inline void flush(void)
-{
- /*
- * Wait while the FIFO is not empty
- */
- while (!(__raw_readl(IOMEM(LL_UART_PADDR + UART_SR_OFFSET)) &
- UART_SR_TXEMPTY))
- cpu_relax();
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static void putc(char ch)
+static inline void arch_decomp_setup(void)
{
- /*
- * 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));
+ ucuart_init(LL_UART_PADDR, 0, UCUART_IO_MEM32, UART_FIFO_OFFSET,
+ UART_SR_OFFSET, UART_SR_TXFULL, 0,
+ UART_SR_OFFSET, UART_SR_TXEMPTY, UART_SR_TXEMPTY);
}
#endif
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index 6e43f5e..b7023be 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -21,10 +21,6 @@
#include <asm/mach-types.h>
-unsigned long uart_base;
-
-#define UART(x) (*(volatile unsigned long *)(uart_base + (x)))
-
#define USR2 0x98
#define USR2_TXFE (1<<14)
#define TXR 0x40
@@ -40,23 +36,6 @@ unsigned long uart_base;
* This does not append a newline
*/
-static void putc(int ch)
-{
- if (!uart_base)
- return;
- if (!(UART(UCR1) & UCR1_UARTEN))
- return;
-
- while (!(UART(USR2) & USR2_TXFE))
- barrier();
-
- UART(TXR) = ch;
-}
-
-static inline void flush(void)
-{
-}
-
#define MX1_UART1_BASE_ADDR 0x00206000
#define MX25_UART1_BASE_ADDR 0x43f90000
#define MX2X_UART1_BASE_ADDR 0x1000a000
@@ -67,8 +46,10 @@ static inline void flush(void)
#define MX50_UART1_BASE_ADDR 0x53fbc000
#define MX53_UART1_BASE_ADDR 0x53fbc000
-static __inline__ void __arch_decomp_setup(unsigned long arch_id)
+static inline void arch_decomp_setup(void)
{
+ int uart_base;
+
switch (arch_id) {
case MACH_TYPE_MX1ADS:
case MACH_TYPE_SCB9328:
@@ -123,9 +104,12 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
default:
break;
}
-}
-#define ARCH_HAVE_DECOMP_SETUP
-#define arch_decomp_setup() __arch_decomp_setup(arch_id)
+ if (!__raw_readl((void __iomem *)uart_base + UCR1) & UCR1_UARTEN)
+ return;
+
+ ucuart_init(uart_base, 0, UCUART_IO_MEM32, TXR,
+ USR2, USR2_TXFE, USR2_TXFE, 0, 0, 0);
+}
#endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 860c02b..8f87c24 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -16,20 +16,11 @@
* version 2. This program is licensed "as is" without any warranty of any
* kind, whether express or implied.
*/
-
-#include <linux/types.h>
-#include <linux/serial_reg.h>
-
-#include <asm/memory.h>
#include <asm/mach-types.h>
-
#include <plat/serial.h>
#define MDR1_MODE_MASK 0x07
-volatile u8 *uart_base;
-int uart_shift;
-
/*
* Store the DEBUG_LL uart number into memory.
* See also debug-macro.S, and serial.c for related code.
@@ -45,30 +36,12 @@ static void set_omap_uart_info(unsigned char port)
*uart_info = port;
}
-static void putc(int c)
-{
- if (!uart_base)
- return;
-
- /* Check for UART 16x mode */
- if ((uart_base[UART_OMAP_MDR1 << uart_shift] & MDR1_MODE_MASK) != 0)
- return;
-
- while (!(uart_base[UART_LSR << uart_shift] & UART_LSR_THRE))
- barrier();
- uart_base[UART_TX << uart_shift] = c;
-}
-
-static inline void flush(void)
-{
-}
-
/*
* Macros to configure UART1 and debug UART
*/
#define _DEBUG_LL_ENTRY(mach, dbg_uart, dbg_shft, dbg_id) \
if (machine_is_##mach()) { \
- uart_base = (volatile u8 *)(dbg_uart); \
+ uart_base = (dbg_uart); \
uart_shift = (dbg_shft); \
port = (dbg_id); \
set_omap_uart_info(port); \
@@ -103,8 +76,10 @@ static inline void flush(void)
_DEBUG_LL_ENTRY(mach, TI816X_UART##p##_BASE, OMAP_PORT_SHIFT, \
TI816XUART##p)
-static inline void __arch_decomp_setup(unsigned long arch_id)
+static inline void arch_decomp_setup(void)
{
+ int uart_base;
+ int uart_shift;
int port = 0;
/*
@@ -180,7 +155,11 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
DEBUG_LL_TI816X(3, ti8168evm);
} while (0);
-}
-#define ARCH_HAVE_DECOMP_SETUP
-#define arch_decomp_setup() __arch_decomp_setup(arch_id)
+ /* Check for UART 16x mode */
+ if (__raw_readl((void __iomem *)uart_base +
+ UART_OMAP_MDR1 << uart_shift) & MDR1_MODE_MASK)
+ return;
+
+ ucuart_init_8250(uart_base, uart_shift, UCUART_IO_MEM8);
+}
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h
index 317cfe4..1eb0d82 100644
--- a/arch/arm/plat-spear/include/plat/uncompress.h
+++ b/arch/arm/plat-spear/include/plat/uncompress.h
@@ -10,28 +10,15 @@
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
-
-#include <linux/io.h>
-#include <linux/amba/serial.h>
#include <mach/hardware.h>
#ifndef __PLAT_UNCOMPRESS_H
#define __PLAT_UNCOMPRESS_H
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
-{
- void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE;
- while (readl_relaxed(base + UART01x_FR) & UART01x_FR_TXFF)
- barrier();
+#define ARCH_HAVE_UCUART_GENERIC
- writel_relaxed(c, base + UART01x_DR);
-}
-
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init_amba01x(SPEAR_DBG_UART_BASE);
}
-
#endif /* __PLAT_UNCOMPRESS_H */
diff --git a/arch/arm/plat-tcc/include/mach/uncompress.h b/arch/arm/plat-tcc/include/mach/uncompress.h
index 35a924e..b71a605 100644
--- a/arch/arm/plat-tcc/include/mach/uncompress.h
+++ b/arch/arm/plat-tcc/include/mach/uncompress.h
@@ -3,26 +3,11 @@
*
* This file is licensed under the terms of the GPL version 2.
*/
-
-#include <linux/serial_reg.h>
-#include <linux/types.h>
-
#include <mach/tcc8k-regs.h>
-unsigned int system_rev;
-
-#define ID_MASK 0x7fff
-
-static void putc(int c)
-{
- u32 *uart_lsr = (u32 *)(UART_BASE_PHYS + (UART_LSR << 2));
- u32 *uart_tx = (u32 *)(UART_BASE_PHYS + (UART_TX << 2));
-
- while (!(*uart_lsr & UART_LSR_THRE))
- barrier();
- *uart_tx = c;
-}
+#define ARCH_HAVE_UCUART_GENERIC
-static inline void flush(void)
+static inline void arch_decomp_setup(void)
{
+ ucuart_init_8250(UART_BASE_PHYS, 2, UCUART_IO_MEM32);
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 11/15] ARM: uncompress: Call arch_decomp_setup by default
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (8 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 10/15] ARM: uncompress.h: Convert machines to use the new ucuart driver Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 12/15] ARM: uncompress.h: make the ucuart driver the default implementation Zoltan Devai
` (3 subsequent siblings)
13 siblings, 0 replies; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
Now that the initialization of the ucuart uses arch_decomp_setup,
almost all machines use it, so make this the default behaviour.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/print.c | 8 --------
arch/arm/mach-mmp/include/mach/uncompress.h | 2 --
arch/arm/mach-picoxcell/include/mach/uncompress.h | 1 +
arch/arm/mach-rpc/include/mach/uncompress.h | 2 --
arch/arm/mach-s5p64x0/include/mach/uncompress.h | 2 --
arch/arm/mach-shmobile/include/mach/uncompress.h | 2 ++
arch/arm/mach-ux500/include/mach/uncompress.h | 2 --
arch/arm/plat-samsung/include/plat/uncompress.h | 2 --
8 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/arch/arm/boot/compressed/print.c b/arch/arm/boot/compressed/print.c
index fbffc99..24a08d4 100644
--- a/arch/arm/boot/compressed/print.c
+++ b/arch/arm/boot/compressed/print.c
@@ -56,8 +56,6 @@ struct uncompress_uart ucuart;
#ifdef ARCH_HAVE_UCUART_GENERIC
-#define ARCH_HAVE_DECOMP_SETUP
-
#include <linux/io.h>
#include <linux/serial_reg.h>
#include <linux/amba/serial.h>
@@ -224,13 +222,7 @@ void error(char *x)
while(1); /* Halt */
}
-#ifdef ARCH_HAVE_DECOMP_SETUP
void inline decomp_setup(void)
{
arch_decomp_setup();
}
-#else /* ARCH_HAVE_DECOMP_SETUP */
-void inline decomp_setup(void)
-{
-}
-#endif /* ARCH_HAVE_DECOMP_SETUP */
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h
index 4cafe10..e9bf8bf 100644
--- a/arch/arm/mach-mmp/include/mach/uncompress.h
+++ b/arch/arm/mach-mmp/include/mach/uncompress.h
@@ -12,8 +12,6 @@
#define UART2_BASE (APB_PHYS_BASE + 0x17000)
#define UART3_BASE (APB_PHYS_BASE + 0x18000)
-#define ARCH_HAVE_DECOMP_SETUP
-
static inline void arch_decomp_setup(void)
{
if (machine_is_avengers_lite())
diff --git a/arch/arm/mach-picoxcell/include/mach/uncompress.h b/arch/arm/mach-picoxcell/include/mach/uncompress.h
index f04f368..db46249 100644
--- a/arch/arm/mach-picoxcell/include/mach/uncompress.h
+++ b/arch/arm/mach-picoxcell/include/mach/uncompress.h
@@ -17,3 +17,4 @@
*/
#define putc(c)
#define flush()
+#define arch_decomp_setup()
diff --git a/arch/arm/mach-rpc/include/mach/uncompress.h b/arch/arm/mach-rpc/include/mach/uncompress.h
index 5ea3974..0fd4b0b 100644
--- a/arch/arm/mach-rpc/include/mach/uncompress.h
+++ b/arch/arm/mach-rpc/include/mach/uncompress.h
@@ -109,8 +109,6 @@ static inline void flush(void)
{
}
-#define ARCH_HAVE_DECOMP_SETUP
-
/*
* Setup for decompression
*/
diff --git a/arch/arm/mach-s5p64x0/include/mach/uncompress.h b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
index 8d537eb..00b70b8 100644
--- a/arch/arm/mach-s5p64x0/include/mach/uncompress.h
+++ b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
@@ -151,8 +151,6 @@ static inline void arch_enable_uart_fifo(void)
#define arch_enable_uart_fifo() do { } while(0)
#endif
-#define ARCH_HAVE_DECOMP_SETUP
-
static void arch_decomp_setup(void)
{
/*
diff --git a/arch/arm/mach-shmobile/include/mach/uncompress.h b/arch/arm/mach-shmobile/include/mach/uncompress.h
index b2b2860..462e84e 100644
--- a/arch/arm/mach-shmobile/include/mach/uncompress.h
+++ b/arch/arm/mach-shmobile/include/mach/uncompress.h
@@ -12,4 +12,6 @@ static inline void flush(void)
{
}
+#define arch_decomp_setup()
+
#endif /* __ASM_MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
index 7e3b48a..eb30110 100644
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ b/arch/arm/mach-ux500/include/mach/uncompress.h
@@ -21,8 +21,6 @@
#include <asm/mach-types.h>
#include <mach/hardware.h>
-#define ARCH_HAVE_DECOMP_SETUP
-
static inline void arch_decomp_setup(void)
{
/* Check in run time if we run on an U8500 or U5500 */
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index b10e0be..94fecf9 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -130,8 +130,6 @@ static inline void arch_enable_uart_fifo(void)
#define arch_enable_uart_fifo() do { } while(0)
#endif
-#define ARCH_HAVE_DECOMP_SETUP
-
static void
arch_decomp_setup(void)
{
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 12/15] ARM: uncompress.h: make the ucuart driver the default implementation
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (9 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 11/15] ARM: uncompress: Call arch_decomp_setup by default Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 13/15] ARM: uncompress.h: Cleanup header guards and banners Zoltan Devai
` (2 subsequent siblings)
13 siblings, 0 replies; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
As most of the machines now use the ucuart driver, let's make
this the default implementation, and mark those which do not
conform with ARCH_UCUART_NONGENERIC.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/print.c | 2 +-
arch/arm/mach-at91/include/mach/uncompress.h | 9 +++------
arch/arm/mach-bcmring/include/mach/uncompress.h | 1 -
arch/arm/mach-clps711x/include/mach/uncompress.h | 2 --
arch/arm/mach-cns3xxx/include/mach/uncompress.h | 2 --
arch/arm/mach-davinci/include/mach/uncompress.h | 2 --
arch/arm/mach-dove/include/mach/uncompress.h | 2 --
arch/arm/mach-ebsa110/include/mach/uncompress.h | 1 -
arch/arm/mach-ep93xx/include/mach/uncompress.h | 2 --
| 2 --
arch/arm/mach-gemini/include/mach/uncompress.h | 2 --
arch/arm/mach-h720x/include/mach/uncompress.h | 2 --
arch/arm/mach-integrator/include/mach/uncompress.h | 2 --
arch/arm/mach-iop13xx/include/mach/uncompress.h | 2 --
arch/arm/mach-iop32x/include/mach/uncompress.h | 2 --
arch/arm/mach-iop33x/include/mach/uncompress.h | 2 --
arch/arm/mach-ixp2000/include/mach/uncompress.h | 3 ---
arch/arm/mach-ixp23xx/include/mach/uncompress.h | 2 --
arch/arm/mach-ixp4xx/include/mach/uncompress.h | 2 --
arch/arm/mach-kirkwood/include/mach/uncompress.h | 2 --
arch/arm/mach-ks8695/include/mach/uncompress.h | 2 --
arch/arm/mach-lpc32xx/include/mach/uncompress.h | 2 --
arch/arm/mach-msm/include/mach/uncompress.h | 2 --
arch/arm/mach-mv78xx0/include/mach/uncompress.h | 4 ----
arch/arm/mach-netx/include/mach/uncompress.h | 2 --
arch/arm/mach-nomadik/include/mach/uncompress.h | 2 --
arch/arm/mach-orion5x/include/mach/uncompress.h | 2 --
arch/arm/mach-picoxcell/include/mach/uncompress.h | 1 +
arch/arm/mach-pnx4008/include/mach/uncompress.h | 1 -
arch/arm/mach-prima2/include/mach/uncompress.h | 2 --
arch/arm/mach-pxa/include/mach/uncompress.h | 2 --
arch/arm/mach-realview/include/mach/uncompress.h | 1 -
arch/arm/mach-rpc/include/mach/uncompress.h | 4 +++-
arch/arm/mach-s3c2410/include/mach/uncompress.h | 2 ++
arch/arm/mach-s5p64x0/include/mach/uncompress.h | 2 ++
arch/arm/mach-s5pc100/include/mach/uncompress.h | 2 ++
arch/arm/mach-s5pv210/include/mach/uncompress.h | 1 +
arch/arm/mach-sa1100/include/mach/uncompress.h | 8 --------
arch/arm/mach-shark/include/mach/uncompress.h | 3 ---
arch/arm/mach-shmobile/include/mach/uncompress.h | 2 ++
arch/arm/mach-tegra/include/mach/uncompress.h | 2 --
arch/arm/mach-u300/include/mach/uncompress.h | 2 --
arch/arm/mach-versatile/include/mach/uncompress.h | 2 --
arch/arm/mach-vexpress/include/mach/uncompress.h | 2 --
arch/arm/mach-vt8500/include/mach/uncompress.h | 2 --
arch/arm/mach-zynq/include/mach/uncompress.h | 2 --
arch/arm/plat-samsung/include/plat/uncompress.h | 2 ++
arch/arm/plat-spear/include/plat/uncompress.h | 2 --
arch/arm/plat-tcc/include/mach/uncompress.h | 2 --
49 files changed, 19 insertions(+), 92 deletions(-)
diff --git a/arch/arm/boot/compressed/print.c b/arch/arm/boot/compressed/print.c
index 24a08d4..1529d15 100644
--- a/arch/arm/boot/compressed/print.c
+++ b/arch/arm/boot/compressed/print.c
@@ -54,7 +54,7 @@ struct uncompress_uart ucuart;
#include <mach/uncompress.h>
-#ifdef ARCH_HAVE_UCUART_GENERIC
+#ifndef ARCH_UCUART_NONGENERIC
#include <linux/io.h>
#include <linux/serial_reg.h>
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
index 46acdd5..59c1c68 100644
--- a/arch/arm/mach-at91/include/mach/uncompress.h
+++ b/arch/arm/mach-at91/include/mach/uncompress.h
@@ -21,7 +21,6 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
-#include <linux/io.h>
#include <linux/atmel_serial.h>
#if defined(CONFIG_AT91_EARLY_DBGU)
@@ -38,7 +37,8 @@
#define UART_OFFSET AT91_USART4
#elif defined(CONFIG_AT91_EARLY_USART5)
#define UART_OFFSET AT91_USART5
-#endif
+#elif
+#define UART_OFFSET 0
/*
* The following code assumes the serial port has already been
@@ -47,9 +47,6 @@
*
* This does not append a newline
*/
-#ifdef UART_OFFSET
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init(UART_OFFSET, 0, UCUART_IO_MEM32, ATMEL_US_THR,
@@ -57,4 +54,4 @@ static inline void arch_decomp_setup(void)
ATMEL_US_CSR, ATMEL_US_TXEMPTY, ATMEL_US_TXEMPTY);
}
-#endif /* UART_OFFSET */
+#endif
\ No newline at end of file
diff --git a/arch/arm/mach-bcmring/include/mach/uncompress.h b/arch/arm/mach-bcmring/include/mach/uncompress.h
index 7e44ad3..125f7b4 100644
--- a/arch/arm/mach-bcmring/include/mach/uncompress.h
+++ b/arch/arm/mach-bcmring/include/mach/uncompress.h
@@ -16,7 +16,6 @@
#define BCMRING_UART_0_DR MM_ADDR_IO_UARTA
#define BCMRING_UART_0_FR 0x18
-#define ARCH_HAVE_UCUART_GENERIC
static inline void arch_decomp_setup(void)
{
ucuart_init(MM_ADDR_IO_UARTA, 0, UCUART_IO_MEM32, BCMRING_UART_0_DR,
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index ba17cc6..c0fadf2 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -28,8 +28,6 @@
#define UARTDRx UARTDR1
#endif
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init(CLPS7111_PHYS_BASE, 0, UCUART_IO_MEM32, UARTDRx,
diff --git a/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
index 93cdbd6..35be756 100644
--- a/arch/arm/mach-cns3xxx/include/mach/uncompress.h
+++ b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
@@ -10,8 +10,6 @@
#include <asm/mach-types.h>
#include <mach/cns3xxx.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
if (machine_is_cns3420vb())
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h
index daa318d..ca9308a 100644
--- a/arch/arm/mach-davinci/include/mach/uncompress.h
+++ b/arch/arm/mach-davinci/include/mach/uncompress.h
@@ -24,8 +24,6 @@
#include <mach/serial.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void set_uart_info(u32 phys, void * __iomem virt)
{
/*
diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h
index 0062a56..97a00eb 100644
--- a/arch/arm/mach-dove/include/mach/uncompress.h
+++ b/arch/arm/mach-dove/include/mach/uncompress.h
@@ -8,8 +8,6 @@
#include <mach/dove.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(DOVE_UART0_PHYS_BASE, 2, UCUART_IO_MEM8);
diff --git a/arch/arm/mach-ebsa110/include/mach/uncompress.h b/arch/arm/mach-ebsa110/include/mach/uncompress.h
index 56a569f..38c0f7f 100644
--- a/arch/arm/mach-ebsa110/include/mach/uncompress.h
+++ b/arch/arm/mach-ebsa110/include/mach/uncompress.h
@@ -7,7 +7,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-#define ARCH_HAVE_UCUART_GENERIC
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
index 1b36813..b5693c9 100644
--- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -43,8 +43,6 @@ static void ethernet_reset(void)
;
}
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ethernet_reset();
--git a/arch/arm/mach-footbridge/include/mach/uncompress.h b/arch/arm/mach-footbridge/include/mach/uncompress.h
index 32e9654..5f41698 100644
--- a/arch/arm/mach-footbridge/include/mach/uncompress.h
+++ b/arch/arm/mach-footbridge/include/mach/uncompress.h
@@ -15,8 +15,6 @@
#define DC21285_BASE ((volatile unsigned int *)0x42000160)
#define SER0_BASE ((volatile unsigned char *)0x7c0003f8)
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
if (machine_is_netwinder())
diff --git a/arch/arm/mach-gemini/include/mach/uncompress.h b/arch/arm/mach-gemini/include/mach/uncompress.h
index 855eb5b..dd81586 100644
--- a/arch/arm/mach-gemini/include/mach/uncompress.h
+++ b/arch/arm/mach-gemini/include/mach/uncompress.h
@@ -15,8 +15,6 @@
#include <mach/hardware.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(GEMINI_UART_BASE, 2, UCUART_IO_MEM32);
diff --git a/arch/arm/mach-h720x/include/mach/uncompress.h b/arch/arm/mach-h720x/include/mach/uncompress.h
index be44fd1..6f727ba 100644
--- a/arch/arm/mach-h720x/include/mach/uncompress.h
+++ b/arch/arm/mach-h720x/include/mach/uncompress.h
@@ -9,8 +9,6 @@
#include <mach/hardware.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
/* debug-macro.S treats this port as an AMBA01x, but according to the
* datasheet, this should be a 8250
*/
diff --git a/arch/arm/mach-integrator/include/mach/uncompress.h b/arch/arm/mach-integrator/include/mach/uncompress.h
index 19f2eb3..57cc838 100644
--- a/arch/arm/mach-integrator/include/mach/uncompress.h
+++ b/arch/arm/mach-integrator/include/mach/uncompress.h
@@ -17,8 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_amba01x(0x16000000);
diff --git a/arch/arm/mach-iop13xx/include/mach/uncompress.h b/arch/arm/mach-iop13xx/include/mach/uncompress.h
index ac09a33..6c1c385 100644
--- a/arch/arm/mach-iop13xx/include/mach/uncompress.h
+++ b/arch/arm/mach-iop13xx/include/mach/uncompress.h
@@ -1,7 +1,5 @@
#include <mach/hardware.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(IOP13XX_UART1_PHYS, 2, UCUART_IO_MEM32);
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
index 97fb970..3d970a9 100644
--- a/arch/arm/mach-iop32x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop32x/include/mach/uncompress.h
@@ -3,8 +3,6 @@
*/
#include <mach/hardware.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
if (machine_is_iq80321())
diff --git a/arch/arm/mach-iop33x/include/mach/uncompress.h b/arch/arm/mach-iop33x/include/mach/uncompress.h
index 294c444..9ee4b3b 100644
--- a/arch/arm/mach-iop33x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop33x/include/mach/uncompress.h
@@ -5,8 +5,6 @@
#include <asm/mach-types.h>
#include <mach/hardware.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
if (machine_is_iq80331() || machine_is_iq80332())
diff --git a/arch/arm/mach-ixp2000/include/mach/uncompress.h b/arch/arm/mach-ixp2000/include/mach/uncompress.h
index dc24c65..e9911fb 100644
--- a/arch/arm/mach-ixp2000/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp2000/include/mach/uncompress.h
@@ -13,9 +13,6 @@
* option) any later version.
*
*/
-
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(0xc0030000, 2, UCUART_IO_MEM32);
diff --git a/arch/arm/mach-ixp23xx/include/mach/uncompress.h b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
index e986753..22cc9f5 100644
--- a/arch/arm/mach-ixp23xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
@@ -13,8 +13,6 @@
#include <mach/ixp23xx.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(IXP23XX_UART1_PHYS, 2, UCUART_IO_MEM32);
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
index 17b430a..a8d075c 100644
--- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
@@ -16,8 +16,6 @@
#include "ixp4xx-regs.h"
#include <asm/mach-types.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
/*
diff --git a/arch/arm/mach-kirkwood/include/mach/uncompress.h b/arch/arm/mach-kirkwood/include/mach/uncompress.h
index e46c96c..da9f19f 100644
--- a/arch/arm/mach-kirkwood/include/mach/uncompress.h
+++ b/arch/arm/mach-kirkwood/include/mach/uncompress.h
@@ -7,8 +7,6 @@
*/
#include <mach/kirkwood.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(UART0_PHYS_BASE, 2, UCUART_IO_MEM8);
diff --git a/arch/arm/mach-ks8695/include/mach/uncompress.h b/arch/arm/mach-ks8695/include/mach/uncompress.h
index 9e6ba4e..99cac67 100644
--- a/arch/arm/mach-ks8695/include/mach/uncompress.h
+++ b/arch/arm/mach-ks8695/include/mach/uncompress.h
@@ -16,8 +16,6 @@
#include <mach/regs-uart.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init(KS8695_UART_PA, 0, UCUART_MEM32, KS8695_URTH,
diff --git a/arch/arm/mach-lpc32xx/include/mach/uncompress.h b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
index 61a16eb..0e119c4 100644
--- a/arch/arm/mach-lpc32xx/include/mach/uncompress.h
+++ b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
@@ -21,8 +21,6 @@
#include <mach/platform.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(LPC32XX_UART5_BASE, 2, UCUART_IO_MEM32);
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
index d427ce8..0fa9795 100644
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -19,8 +19,6 @@
#include "linux/io.h"
#include "mach/msm_iomap.h"
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
#if defined(MSM_DEBUG_UART_PHYS)
diff --git a/arch/arm/mach-mv78xx0/include/mach/uncompress.h b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
index 720340e..064bb96 100644
--- a/arch/arm/mach-mv78xx0/include/mach/uncompress.h
+++ b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
@@ -5,12 +5,8 @@
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
-
-#include <linux/serial_reg.h>
#include <mach/mv78xx0.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(UART0_PHYS_BASE, 2, UCUART_IO_MEM8);
diff --git a/arch/arm/mach-netx/include/mach/uncompress.h b/arch/arm/mach-netx/include/mach/uncompress.h
index f61e22b..5a32b87 100644
--- a/arch/arm/mach-netx/include/mach/uncompress.h
+++ b/arch/arm/mach-netx/include/mach/uncompress.h
@@ -27,8 +27,6 @@
#define UART1_BASE 0x100a00
#define UART2_BASE 0x100a80
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_amba01x(UART1_BASE);
diff --git a/arch/arm/mach-nomadik/include/mach/uncompress.h b/arch/arm/mach-nomadik/include/mach/uncompress.h
index 1eb4ae6..f5da290 100644
--- a/arch/arm/mach-nomadik/include/mach/uncompress.h
+++ b/arch/arm/mach-nomadik/include/mach/uncompress.h
@@ -21,8 +21,6 @@
#include <mach/hardware.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_amba01x(NOMADIK_UART1_BASE);
diff --git a/arch/arm/mach-orion5x/include/mach/uncompress.h b/arch/arm/mach-orion5x/include/mach/uncompress.h
index 1ac83f5..4d7c1ba 100644
--- a/arch/arm/mach-orion5x/include/mach/uncompress.h
+++ b/arch/arm/mach-orion5x/include/mach/uncompress.h
@@ -9,8 +9,6 @@
*/
#include <mach/orion5x.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(UART0_PHYS_BASE, 2, UCUART_IO_MEM8);
diff --git a/arch/arm/mach-picoxcell/include/mach/uncompress.h b/arch/arm/mach-picoxcell/include/mach/uncompress.h
index db46249..9464c63 100644
--- a/arch/arm/mach-picoxcell/include/mach/uncompress.h
+++ b/arch/arm/mach-picoxcell/include/mach/uncompress.h
@@ -15,6 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#define ARCH_UCUART_NONGENERIC
#define putc(c)
#define flush()
#define arch_decomp_setup()
diff --git a/arch/arm/mach-pnx4008/include/mach/uncompress.h b/arch/arm/mach-pnx4008/include/mach/uncompress.h
index dee85ef..1a18501 100644
--- a/arch/arm/mach-pnx4008/include/mach/uncompress.h
+++ b/arch/arm/mach-pnx4008/include/mach/uncompress.h
@@ -20,7 +20,6 @@
*/
#define UART5_BASE 0x40090000
-#define ARCH_HAVE_UCUART_GENERIC
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-prima2/include/mach/uncompress.h
index 14effdc..29ee15e 100644
--- a/arch/arm/mach-prima2/include/mach/uncompress.h
+++ b/arch/arm/mach-prima2/include/mach/uncompress.h
@@ -11,8 +11,6 @@
#include <mach/uart.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init(SIRFSOC_UART1_PA_BASE, 0, UCUART_IO_MEM32,
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
index 57f1755..7d24bf1 100644
--- a/arch/arm/mach-pxa/include/mach/uncompress.h
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -16,8 +16,6 @@
#define BTUART_BASE (0x40200000)
#define STUART_BASE (0x40700000)
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
unsigned long uart_base;
diff --git a/arch/arm/mach-realview/include/mach/uncompress.h b/arch/arm/mach-realview/include/mach/uncompress.h
index 899aef7..f69b003 100644
--- a/arch/arm/mach-realview/include/mach/uncompress.h
+++ b/arch/arm/mach-realview/include/mach/uncompress.h
@@ -25,7 +25,6 @@
#include <mach/board-pba8.h>
#include <mach/board-pbx.h>
-#define ARCH_HAVE_UCUART_GENERIC
static inline void arch_decomp_setup(void)
{
int uart_base;
diff --git a/arch/arm/mach-rpc/include/mach/uncompress.h b/arch/arm/mach-rpc/include/mach/uncompress.h
index 0fd4b0b..4583bd1 100644
--- a/arch/arm/mach-rpc/include/mach/uncompress.h
+++ b/arch/arm/mach-rpc/include/mach/uncompress.h
@@ -7,8 +7,10 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
+#define ARCH_UCUART_NONGENERIC
+
#define VIDMEM ((char *)SCREEN_START)
-
+
#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/setup.h>
diff --git a/arch/arm/mach-s3c2410/include/mach/uncompress.h b/arch/arm/mach-s3c2410/include/mach/uncompress.h
index 8b283f8..7c98c81 100644
--- a/arch/arm/mach-s3c2410/include/mach/uncompress.h
+++ b/arch/arm/mach-s3c2410/include/mach/uncompress.h
@@ -14,6 +14,8 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
+#define ARCH_UCUART_NONGENERIC
+
#include <mach/regs-gpio.h>
#include <mach/map.h>
diff --git a/arch/arm/mach-s5p64x0/include/mach/uncompress.h b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
index 00b70b8..0b896fc 100644
--- a/arch/arm/mach-s5p64x0/include/mach/uncompress.h
+++ b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
@@ -13,6 +13,8 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
+#define ARCH_UCUART_NONGENERIC
+
#include <mach/map.h>
/*
diff --git a/arch/arm/mach-s5pc100/include/mach/uncompress.h b/arch/arm/mach-s5pc100/include/mach/uncompress.h
index 01ccf53..3d67981 100644
--- a/arch/arm/mach-s5pc100/include/mach/uncompress.h
+++ b/arch/arm/mach-s5pc100/include/mach/uncompress.h
@@ -15,6 +15,8 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
+#define ARCH_UCUART_NONGENERIC
+
#include <mach/map.h>
#include <plat/uncompress.h>
diff --git a/arch/arm/mach-s5pv210/include/mach/uncompress.h b/arch/arm/mach-s5pv210/include/mach/uncompress.h
index 08ff2fd..f5454f3 100644
--- a/arch/arm/mach-s5pv210/include/mach/uncompress.h
+++ b/arch/arm/mach-s5pv210/include/mach/uncompress.h
@@ -13,6 +13,7 @@
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
+#define ARCH_UCUART_NONGENERIC
#include <mach/map.h>
#include <plat/uncompress.h>
diff --git a/arch/arm/mach-sa1100/include/mach/uncompress.h b/arch/arm/mach-sa1100/include/mach/uncompress.h
index dc0c8b7..714f957 100644
--- a/arch/arm/mach-sa1100/include/mach/uncompress.h
+++ b/arch/arm/mach-sa1100/include/mach/uncompress.h
@@ -8,14 +8,6 @@
#include "hardware.h"
-/*
- * The following code assumes the serial port has already been
- * initialized by the bootloader. We search for the first enabled
- * port in the most probable order. If you didn't setup a port in
- * your bootloader then nothing will appear (which might be desired).
- */
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline int uart_enabled(int base)
{
if (__raw_readl((void __iomem *)(base + UTCR3)) & UTCR3_TXE)
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
index 9900826..cc1ce9b 100644
--- a/arch/arm/mach-shark/include/mach/uncompress.h
+++ b/arch/arm/mach-shark/include/mach/uncompress.h
@@ -6,9 +6,6 @@
* arch/arm/mach-footbridge/include/mach/uncompress.h
* Copyright (C) 1996,1997,1998 Russell King
*/
-
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(0x400003f8, 0, UCUART_IO_MEM8);
diff --git a/arch/arm/mach-shmobile/include/mach/uncompress.h b/arch/arm/mach-shmobile/include/mach/uncompress.h
index 462e84e..9df3a71 100644
--- a/arch/arm/mach-shmobile/include/mach/uncompress.h
+++ b/arch/arm/mach-shmobile/include/mach/uncompress.h
@@ -1,6 +1,8 @@
#ifndef __ASM_MACH_UNCOMPRESS_H
#define __ASM_MACH_UNCOMPRESS_H
+#define ARCH_UCUART_NONGENERIC
+
/*
* This does not append a newline
*/
diff --git a/arch/arm/mach-tegra/include/mach/uncompress.h b/arch/arm/mach-tegra/include/mach/uncompress.h
index 61dfd6b..5c3ec5e 100644
--- a/arch/arm/mach-tegra/include/mach/uncompress.h
+++ b/arch/arm/mach-tegra/include/mach/uncompress.h
@@ -26,8 +26,6 @@
#include <mach/iomap.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
void __iomem *uart_base = (void*)TEGRA_DEBUG_UART_BASE;
diff --git a/arch/arm/mach-u300/include/mach/uncompress.h b/arch/arm/mach-u300/include/mach/uncompress.h
index 8bc389a..7f09047 100644
--- a/arch/arm/mach-u300/include/mach/uncompress.h
+++ b/arch/arm/mach-u300/include/mach/uncompress.h
@@ -17,8 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_amba01x(0xc0013000);
diff --git a/arch/arm/mach-versatile/include/mach/uncompress.h b/arch/arm/mach-versatile/include/mach/uncompress.h
index 14294ef..01390bd 100644
--- a/arch/arm/mach-versatile/include/mach/uncompress.h
+++ b/arch/arm/mach-versatile/include/mach/uncompress.h
@@ -17,8 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_amba01x(0x101F1000);
diff --git a/arch/arm/mach-vexpress/include/mach/uncompress.h b/arch/arm/mach-vexpress/include/mach/uncompress.h
index 00c45e5..970eba5 100644
--- a/arch/arm/mach-vexpress/include/mach/uncompress.h
+++ b/arch/arm/mach-vexpress/include/mach/uncompress.h
@@ -17,8 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_amba01x(0x10009000);
diff --git a/arch/arm/mach-vt8500/include/mach/uncompress.h b/arch/arm/mach-vt8500/include/mach/uncompress.h
index 3f7e315..7fb6603 100644
--- a/arch/arm/mach-vt8500/include/mach/uncompress.h
+++ b/arch/arm/mach-vt8500/include/mach/uncompress.h
@@ -14,8 +14,6 @@
* GNU General Public License for more details.
*
*/
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init(0xd8200000, 0, UCUART_IO_MEM8, 0, 0x1C, 0x2, 0, 0, 0, 0);
diff --git a/arch/arm/mach-zynq/include/mach/uncompress.h b/arch/arm/mach-zynq/include/mach/uncompress.h
index c968774..5eaf93b 100644
--- a/arch/arm/mach-zynq/include/mach/uncompress.h
+++ b/arch/arm/mach-zynq/include/mach/uncompress.h
@@ -18,8 +18,6 @@
#include <mach/zynq_soc.h>
#include <mach/uart.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init(LL_UART_PADDR, 0, UCUART_IO_MEM32, UART_FIFO_OFFSET,
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index 94fecf9..114c6e5 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -14,6 +14,8 @@
#ifndef __ASM_PLAT_UNCOMPRESS_H
#define __ASM_PLAT_UNCOMPRESS_H
+#define ARCH_UCUART_NONGENERIC
+
typedef unsigned int upf_t; /* cannot include linux/serial_core.h */
/* uart setup */
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h
index 1eb0d82..b9d8f6e 100644
--- a/arch/arm/plat-spear/include/plat/uncompress.h
+++ b/arch/arm/plat-spear/include/plat/uncompress.h
@@ -15,8 +15,6 @@
#ifndef __PLAT_UNCOMPRESS_H
#define __PLAT_UNCOMPRESS_H
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_amba01x(SPEAR_DBG_UART_BASE);
diff --git a/arch/arm/plat-tcc/include/mach/uncompress.h b/arch/arm/plat-tcc/include/mach/uncompress.h
index b71a605..23b2b77 100644
--- a/arch/arm/plat-tcc/include/mach/uncompress.h
+++ b/arch/arm/plat-tcc/include/mach/uncompress.h
@@ -5,8 +5,6 @@
*/
#include <mach/tcc8k-regs.h>
-#define ARCH_HAVE_UCUART_GENERIC
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(UART_BASE_PHYS, 2, UCUART_IO_MEM32);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 13/15] ARM: uncompress.h: Cleanup header guards and banners
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (10 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 12/15] ARM: uncompress.h: make the ucuart driver the default implementation Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-24 9:29 ` Russell King - ARM Linux
2011-10-23 21:10 ` [RFC PATCH 14/15] ARM: uncompress: Get decompress UART info from DT Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 15/15] ARM: uncompress: Add documentation Zoltan Devai
13 siblings, 1 reply; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
Bring some standard into the files:
- uncompress.h should only be included once, don't hide an
error with the header guards
- If the copyright banner is longer than the real content,
or the file has been mostly rewritten, just stick
a short-form GPl notice on top
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/mach-at91/include/mach/uncompress.h | 31 +------------------
arch/arm/mach-bcmring/include/mach/uncompress.h | 18 +++--------
arch/arm/mach-clps711x/include/mach/uncompress.h | 18 +----------
arch/arm/mach-cns3xxx/include/mach/uncompress.h | 8 +----
arch/arm/mach-dove/include/mach/uncompress.h | 3 --
arch/arm/mach-ebsa110/include/mach/uncompress.h | 5 ---
arch/arm/mach-exynos4/include/mach/uncompress.h | 15 +--------
| 8 +----
arch/arm/mach-gemini/include/mach/uncompress.h | 16 +---------
arch/arm/mach-h720x/include/mach/uncompress.h | 12 ++------
arch/arm/mach-integrator/include/mach/uncompress.h | 18 +----------
arch/arm/mach-iop13xx/include/mach/uncompress.h | 5 +++
arch/arm/mach-iop32x/include/mach/uncompress.h | 4 ++-
arch/arm/mach-iop33x/include/mach/uncompress.h | 5 ++-
arch/arm/mach-ixp2000/include/mach/uncompress.h | 16 ++--------
arch/arm/mach-ixp23xx/include/mach/uncompress.h | 10 ------
arch/arm/mach-ixp4xx/include/mach/uncompress.h | 12 -------
arch/arm/mach-kirkwood/include/mach/uncompress.h | 2 -
arch/arm/mach-ks8695/include/mach/uncompress.h | 13 --------
arch/arm/mach-lpc32xx/include/mach/uncompress.h | 22 +-------------
arch/arm/mach-mmp/include/mach/uncompress.h | 2 -
arch/arm/mach-msm/include/mach/uncompress.h | 28 +++++-------------
arch/arm/mach-mv78xx0/include/mach/uncompress.h | 2 -
arch/arm/mach-mxs/include/mach/uncompress.h | 21 +------------
arch/arm/mach-netx/include/mach/uncompress.h | 25 +--------------
arch/arm/mach-nomadik/include/mach/uncompress.h | 22 +-------------
arch/arm/mach-omap1/include/mach/uncompress.h | 4 --
arch/arm/mach-omap2/include/mach/uncompress.h | 4 --
arch/arm/mach-orion5x/include/mach/uncompress.h | 10 ++----
arch/arm/mach-picoxcell/include/mach/uncompress.h | 16 +---------
arch/arm/mach-pnx4008/include/mach/uncompress.h | 20 +-----------
arch/arm/mach-prima2/include/mach/uncompress.h | 13 ++------
arch/arm/mach-pxa/include/mach/uncompress.h | 5 ---
arch/arm/mach-realview/include/mach/uncompress.h | 18 +----------
arch/arm/mach-s3c64xx/include/mach/uncompress.h | 18 +----------
arch/arm/mach-s5p64x0/include/mach/uncompress.h | 6 ----
arch/arm/mach-s5pc100/include/mach/uncompress.h | 6 ----
arch/arm/mach-s5pv210/include/mach/uncompress.h | 16 +---------
arch/arm/mach-sa1100/include/mach/uncompress.h | 9 ++----
arch/arm/mach-shark/include/mach/uncompress.h | 9 ++----
arch/arm/mach-shmobile/include/mach/uncompress.h | 13 +++-----
arch/arm/mach-spear3xx/include/mach/uncompress.h | 18 -----------
arch/arm/mach-spear6xx/include/mach/uncompress.h | 18 -----------
arch/arm/mach-tegra/include/mach/uncompress.h | 26 ++--------------
arch/arm/mach-u300/include/mach/uncompress.h | 18 +----------
arch/arm/mach-ux500/include/mach/uncompress.h | 21 +------------
arch/arm/mach-versatile/include/mach/uncompress.h | 18 +----------
arch/arm/mach-vexpress/include/mach/uncompress.h | 18 +----------
arch/arm/mach-vt8500/include/mach/uncompress.h | 19 ++---------
arch/arm/mach-w90x900/include/mach/uncompress.h | 20 +-----------
arch/arm/mach-zynq/include/mach/uncompress.h | 22 ++-----------
arch/arm/plat-mxc/include/mach/uncompress.h | 5 ---
arch/arm/plat-spear/include/plat/uncompress.h | 18 ++---------
arch/arm/plat-tcc/include/mach/uncompress.h | 6 ++--
54 files changed, 106 insertions(+), 629 deletions(-)
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
index 59c1c68..78eb71c 100644
--- a/arch/arm/mach-at91/include/mach/uncompress.h
+++ b/arch/arm/mach-at91/include/mach/uncompress.h
@@ -1,26 +1,8 @@
/*
- * arch/arm/mach-at91/include/mach/uncompress.h
- *
- * Copyright (C) 2003 SAN People
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#include <linux/atmel_serial.h>
#if defined(CONFIG_AT91_EARLY_DBGU)
@@ -40,18 +22,9 @@
#elif
#define UART_OFFSET 0
-/*
- * The following code assumes the serial port has already been
- * initialized by the bootloader. If you didn't setup a port in
- * your bootloader then nothing will appear (which might be desired).
- *
- * This does not append a newline
- */
static inline void arch_decomp_setup(void)
{
ucuart_init(UART_OFFSET, 0, UCUART_IO_MEM32, ATMEL_US_THR,
ATMEL_US_CSR, ATMEL_US_TXRDY, ATMEL_US_TXRDY,
ATMEL_US_CSR, ATMEL_US_TXEMPTY, ATMEL_US_TXEMPTY);
}
-
-#endif
\ No newline at end of file
diff --git a/arch/arm/mach-bcmring/include/mach/uncompress.h b/arch/arm/mach-bcmring/include/mach/uncompress.h
index 125f7b4..ed7a564 100644
--- a/arch/arm/mach-bcmring/include/mach/uncompress.h
+++ b/arch/arm/mach-bcmring/include/mach/uncompress.h
@@ -1,16 +1,8 @@
-/*****************************************************************************
-* Copyright 2005 - 2008 Broadcom Corporation. All rights reserved.
-*
-* Unless you and Broadcom execute a separate written software license
-* agreement governing use of this software, this software is licensed to you
-* under the terms of the GNU General Public License version 2, available at
-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
-*
-* Notwithstanding the above, under no circumstances may you combine this
-* software in any way with any other Broadcom software provided under a
-* license other than the GPL, without Broadcom's express prior written
-* consent.
-*****************************************************************************/
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
#include <mach/csp/mm_addr.h>
#define BCMRING_UART_0_DR MM_ADDR_IO_UARTA
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index c0fadf2..c947d4e 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -1,21 +1,7 @@
/*
- * arch/arm/mach-clps711x/include/mach/uncompress.h
- *
- * Copyright (C) 2000 Deep Blue Solutions Ltd
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#include <mach/hardware.h>
#include <asm/hardware/clps7111.h>
diff --git a/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
index 35be756..f649fa7 100644
--- a/arch/arm/mach-cns3xxx/include/mach/uncompress.h
+++ b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
@@ -1,12 +1,8 @@
/*
- * Copyright 2003 ARM Limited
- * Copyright 2008 Cavium Networks
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, Version 2, as
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-
#include <asm/mach-types.h>
#include <mach/cns3xxx.h>
diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h
index 97a00eb..106f2f0 100644
--- a/arch/arm/mach-dove/include/mach/uncompress.h
+++ b/arch/arm/mach-dove/include/mach/uncompress.h
@@ -1,11 +1,8 @@
/*
- * arch/arm/mach-dove/include/mach/uncompress.h
- *
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
-
#include <mach/dove.h>
static inline void arch_decomp_setup(void)
diff --git a/arch/arm/mach-ebsa110/include/mach/uncompress.h b/arch/arm/mach-ebsa110/include/mach/uncompress.h
index 38c0f7f..6ea8429 100644
--- a/arch/arm/mach-ebsa110/include/mach/uncompress.h
+++ b/arch/arm/mach-ebsa110/include/mach/uncompress.h
@@ -1,13 +1,8 @@
/*
- * arch/arm/mach-ebsa110/include/mach/uncompress.h
- *
- * Copyright (C) 1996,1997,1998 Russell King
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(0xf0000be0, 2, UCUART_IO_MEM8);
diff --git a/arch/arm/mach-exynos4/include/mach/uncompress.h b/arch/arm/mach-exynos4/include/mach/uncompress.h
index 21d97bc..21b7bd1 100644
--- a/arch/arm/mach-exynos4/include/mach/uncompress.h
+++ b/arch/arm/mach-exynos4/include/mach/uncompress.h
@@ -1,18 +1,8 @@
-/* linux/arch/arm/mach-exynos4/include/mach/uncompress.h
- *
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- * http://www.samsung.com
- *
- * EXYNOS4 - uncompress code
- *
+/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H __FILE__
-
+ */
#include <mach/map.h>
#include <plat/uncompress.h>
@@ -27,4 +17,3 @@ static void arch_detect_cpu(void)
fifo_mask = S5PV210_UFSTAT_TXMASK;
fifo_max = 15 << S5PV210_UFSTAT_TXSHIFT;
}
-#endif /* __ASM_ARCH_UNCOMPRESS_H */
--git a/arch/arm/mach-footbridge/include/mach/uncompress.h b/arch/arm/mach-footbridge/include/mach/uncompress.h
index 5f41698..9cef55a 100644
--- a/arch/arm/mach-footbridge/include/mach/uncompress.h
+++ b/arch/arm/mach-footbridge/include/mach/uncompress.h
@@ -1,8 +1,4 @@
/*
- * arch/arm/mach-footbridge/include/mach/uncompress.h
- *
- * Copyright (C) 1996-1999 Russell King
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
@@ -12,8 +8,8 @@
/*
* Note! This could cause problems on the NetWinder
*/
-#define DC21285_BASE ((volatile unsigned int *)0x42000160)
-#define SER0_BASE ((volatile unsigned char *)0x7c0003f8)
+#define DC21285_BASE 0x42000160
+#define SER0_BASE 0x7c0003f8
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-gemini/include/mach/uncompress.h b/arch/arm/mach-gemini/include/mach/uncompress.h
index dd81586..9841798 100644
--- a/arch/arm/mach-gemini/include/mach/uncompress.h
+++ b/arch/arm/mach-gemini/include/mach/uncompress.h
@@ -1,23 +1,11 @@
/*
- * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
- *
- * Based on mach-pxa/include/mach/uncompress.h:
- * Copyright: (C) 2001 MontaVista Software Inc.
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __MACH_UNCOMPRESS_H
-#define __MACH_UNCOMPRESS_H
-
#include <mach/hardware.h>
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(GEMINI_UART_BASE, 2, UCUART_IO_MEM32);
}
-
-#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-h720x/include/mach/uncompress.h b/arch/arm/mach-h720x/include/mach/uncompress.h
index 6f727ba..9c8bdd1 100644
--- a/arch/arm/mach-h720x/include/mach/uncompress.h
+++ b/arch/arm/mach-h720x/include/mach/uncompress.h
@@ -1,12 +1,8 @@
/*
- * arch/arm/mach-h720x/include/mach/uncompress.h
- *
- * Copyright (C) 2001-2002 Jungjun Kim
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#include <mach/hardware.h>
/* debug-macro.S treats this port as an AMBA01x, but according to the
@@ -16,5 +12,3 @@ static inline void arch_decomp_setup(void)
{
ucuart_init_8250(SERIAL0_BASE, 2, UCUART_IO_MEM8);
}
-
-#endif
diff --git a/arch/arm/mach-integrator/include/mach/uncompress.h b/arch/arm/mach-integrator/include/mach/uncompress.h
index 57cc838..a6c0afb 100644
--- a/arch/arm/mach-integrator/include/mach/uncompress.h
+++ b/arch/arm/mach-integrator/include/mach/uncompress.h
@@ -1,21 +1,7 @@
/*
- * arch/arm/mach-integrator/include/mach/uncompress.h
- *
- * Copyright (C) 1999 ARM Limited
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-iop13xx/include/mach/uncompress.h b/arch/arm/mach-iop13xx/include/mach/uncompress.h
index 6c1c385..dfe67a8 100644
--- a/arch/arm/mach-iop13xx/include/mach/uncompress.h
+++ b/arch/arm/mach-iop13xx/include/mach/uncompress.h
@@ -1,3 +1,8 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
#include <mach/hardware.h>
static inline void arch_decomp_setup(void)
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
index 3d970a9..6fe0ad9 100644
--- a/arch/arm/mach-iop32x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop32x/include/mach/uncompress.h
@@ -1,5 +1,7 @@
/*
- * arch/arm/mach-iop32x/include/mach/uncompress.h
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#include <mach/hardware.h>
diff --git a/arch/arm/mach-iop33x/include/mach/uncompress.h b/arch/arm/mach-iop33x/include/mach/uncompress.h
index 9ee4b3b..c661412 100644
--- a/arch/arm/mach-iop33x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop33x/include/mach/uncompress.h
@@ -1,7 +1,8 @@
/*
- * arch/arm/mach-iop33x/include/mach/uncompress.h
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
#include <asm/mach-types.h>
#include <mach/hardware.h>
diff --git a/arch/arm/mach-ixp2000/include/mach/uncompress.h b/arch/arm/mach-ixp2000/include/mach/uncompress.h
index e9911fb..d32b2ef 100644
--- a/arch/arm/mach-ixp2000/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp2000/include/mach/uncompress.h
@@ -1,17 +1,7 @@
/*
- * arch/arm/mach-ixp2000/include/mach/uncompress.h
- *
- *
- * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
- * Maintainer: Deepak Saxena <dsaxena@plexity.net>
- *
- * Copyright 2002 Intel Corp.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-ixp23xx/include/mach/uncompress.h b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
index 22cc9f5..af3d63d 100644
--- a/arch/arm/mach-ixp23xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
@@ -1,21 +1,11 @@
/*
- * arch/arm/mach-ixp23xx/include/mach/uncompress.h
- *
- * Copyright (C) 2002-2004 Intel Corporation.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#include <mach/ixp23xx.h>
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(IXP23XX_UART1_PHYS, 2, UCUART_IO_MEM32);
}
-
-#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
index a8d075c..d3c683b 100644
--- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
@@ -1,18 +1,8 @@
/*
- * arch/arm/mach-ixp4xx/include/mach/uncompress.h
- *
- * Copyright (C) 2002 Intel Corporation.
- * Copyright (C) 2003-2004 MontaVista Software, Inc.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
- *
*/
-
-#ifndef _ARCH_UNCOMPRESS_H_
-#define _ARCH_UNCOMPRESS_H_
-
#include "ixp4xx-regs.h"
#include <asm/mach-types.h>
@@ -28,5 +18,3 @@ static inline void arch_decomp_setup(void)
else
ucuart_init_8250(IXP4XX_UART1_BASE_PHYS, 2, UCUART_IO_MEM32);
}
-
-#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/uncompress.h b/arch/arm/mach-kirkwood/include/mach/uncompress.h
index da9f19f..f2739f4 100644
--- a/arch/arm/mach-kirkwood/include/mach/uncompress.h
+++ b/arch/arm/mach-kirkwood/include/mach/uncompress.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-kirkwood/include/mach/uncompress.h
- *
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
diff --git a/arch/arm/mach-ks8695/include/mach/uncompress.h b/arch/arm/mach-ks8695/include/mach/uncompress.h
index 99cac67..e2be045a07 100644
--- a/arch/arm/mach-ks8695/include/mach/uncompress.h
+++ b/arch/arm/mach-ks8695/include/mach/uncompress.h
@@ -1,19 +1,8 @@
/*
- * arch/arm/mach-ks8695/include/mach/uncompress.h
- *
- * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
- * Copyright (C) 2006 Simtec Electronics
- *
- * KS8695 - Kernel uncompressor
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#include <mach/regs-uart.h>
static inline void arch_decomp_setup(void)
@@ -22,5 +11,3 @@ static inline void arch_decomp_setup(void)
KS8695_URLS, URLS_URTHRE, URLS_URTHRE,
KS8695_URLS, URLS_URTE, URLS_URTE);
}
-
-#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/uncompress.h b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
index 0e119c4..0586c4c 100644
--- a/arch/arm/mach-lpc32xx/include/mach/uncompress.h
+++ b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
@@ -1,29 +1,11 @@
/*
- * arch/arm/mach-lpc32xx/include/mach/uncompress.h
- *
- * Author: Kevin Wells <kevin.wells@nxp.com>
- *
- * Copyright (C) 2010 NXP Semiconductors
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARM_ARCH_UNCOMPRESS_H
-#define __ASM_ARM_ARCH_UNCOMPRESS_H
-
#include <mach/platform.h>
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(LPC32XX_UART5_BASE, 2, UCUART_IO_MEM32);
}
-
-#endif
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h
index e9bf8bf..c8b652f 100644
--- a/arch/arm/mach-mmp/include/mach/uncompress.h
+++ b/arch/arm/mach-mmp/include/mach/uncompress.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mmp/include/mach/uncompress.h
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
index 0fa9795..bb4d080 100644
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -1,30 +1,18 @@
-/* arch/arm/mach-msm/include/mach/uncompress.h
- *
- * Copyright (C) 2007 Google, 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.
- *
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
-
#include "hardware.h"
-#include "linux/io.h"
#include "mach/msm_iomap.h"
+#ifndef MSM_DEBUG_UART_PHYS
+#define MSM_DEBUG_UART_PHYS 0
+#endif /* MSM_DEBUG_UART_PHYS */
+
static inline void arch_decomp_setup(void)
{
-#if defined(MSM_DEBUG_UART_PHYS)
ucuart_init(MSM_DEBUG_UART_PHYS, 2, UCUART_IO_MEM32, 0x0c,
0x08, 0x04, 0x04,
0, 0, 0);
-#endif /* MSM_DEBUG_UART_PHYS */
}
-#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/uncompress.h b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
index 064bb96..60115d3 100644
--- a/arch/arm/mach-mv78xx0/include/mach/uncompress.h
+++ b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mv78xx0/include/mach/uncompress.h
- *
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
diff --git a/arch/arm/mach-mxs/include/mach/uncompress.h b/arch/arm/mach-mxs/include/mach/uncompress.h
index c9587ce..9934c25 100644
--- a/arch/arm/mach-mxs/include/mach/uncompress.h
+++ b/arch/arm/mach-mxs/include/mach/uncompress.h
@@ -1,23 +1,8 @@
/*
- * arch/arm/mach-mxs/include/mach/uncompress.h
- *
- * Copyright (C) 1999 ARM Limited
- * Copyright (C) Shane Nay (shane at minirl.com)
- * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-#ifndef __MACH_MXS_UNCOMPRESS_H__
-#define __MACH_MXS_UNCOMPRESS_H__
-
#include <asm/mach-types.h>
#define MX23_DUART_BASE_ADDR 0x80070000
@@ -37,5 +22,3 @@ static inline void arch_decomp_setup(void)
break;
}
}
-
-#endif /* __MACH_MXS_UNCOMPRESS_H__ */
diff --git a/arch/arm/mach-netx/include/mach/uncompress.h b/arch/arm/mach-netx/include/mach/uncompress.h
index 5a32b87..5944b34 100644
--- a/arch/arm/mach-netx/include/mach/uncompress.h
+++ b/arch/arm/mach-netx/include/mach/uncompress.h
@@ -1,29 +1,8 @@
/*
- * arch/arm/mach-netx/include/mach/uncompress.h
- *
- * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-/*
- * The following code assumes the serial port has already been
- * initialized by the bootloader. We search for the first enabled
- * port in the most probable order. If you didn't setup a port in
- * your bootloader then nothing will appear (which might be desired).
- */
-
#define UART1_BASE 0x100a00
#define UART2_BASE 0x100a80
diff --git a/arch/arm/mach-nomadik/include/mach/uncompress.h b/arch/arm/mach-nomadik/include/mach/uncompress.h
index f5da290..24d0525 100644
--- a/arch/arm/mach-nomadik/include/mach/uncompress.h
+++ b/arch/arm/mach-nomadik/include/mach/uncompress.h
@@ -1,29 +1,11 @@
/*
- * Copyright (C) 2008 STMicroelectronics
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#include <mach/hardware.h>
static inline void arch_decomp_setup(void)
{
ucuart_init_amba01x(NOMADIK_UART1_BASE);
}
-
-#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-omap1/include/mach/uncompress.h b/arch/arm/mach-omap1/include/mach/uncompress.h
index 0ff22dc..a4acb71 100644
--- a/arch/arm/mach-omap1/include/mach/uncompress.h
+++ b/arch/arm/mach-omap1/include/mach/uncompress.h
@@ -1,5 +1 @@
-/*
- * arch/arm/mach-omap1/include/mach/uncompress.h
- */
-
#include <plat/uncompress.h>
diff --git a/arch/arm/mach-omap2/include/mach/uncompress.h b/arch/arm/mach-omap2/include/mach/uncompress.h
index 78e0557..a4acb71 100644
--- a/arch/arm/mach-omap2/include/mach/uncompress.h
+++ b/arch/arm/mach-omap2/include/mach/uncompress.h
@@ -1,5 +1 @@
-/*
- * arch/arm/mach-omap2/include/mach/uncompress.h
- */
-
#include <plat/uncompress.h>
diff --git a/arch/arm/mach-orion5x/include/mach/uncompress.h b/arch/arm/mach-orion5x/include/mach/uncompress.h
index 4d7c1ba..692c366 100644
--- a/arch/arm/mach-orion5x/include/mach/uncompress.h
+++ b/arch/arm/mach-orion5x/include/mach/uncompress.h
@@ -1,11 +1,7 @@
/*
- * arch/arm/mach-orion5x/include/mach/uncompress.h
- *
- * Tzachi Perelstein <tzachi@marvell.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#include <mach/orion5x.h>
diff --git a/arch/arm/mach-picoxcell/include/mach/uncompress.h b/arch/arm/mach-picoxcell/include/mach/uncompress.h
index 9464c63..bb627c3 100644
--- a/arch/arm/mach-picoxcell/include/mach/uncompress.h
+++ b/arch/arm/mach-picoxcell/include/mach/uncompress.h
@@ -1,19 +1,7 @@
/*
- * Copyright (c) 2011 Picochip Ltd., Jamie Iles
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#define ARCH_UCUART_NONGENERIC
#define putc(c)
diff --git a/arch/arm/mach-pnx4008/include/mach/uncompress.h b/arch/arm/mach-pnx4008/include/mach/uncompress.h
index 1a18501..79be042 100644
--- a/arch/arm/mach-pnx4008/include/mach/uncompress.h
+++ b/arch/arm/mach-pnx4008/include/mach/uncompress.h
@@ -1,24 +1,8 @@
/*
- * arch/arm/mach-pnx4008/include/mach/uncompress.h
- *
- * Copyright (C) 1999 ARM Limited
- * Copyright (C) 2006 MontaVista Software, Inc.
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
#define UART5_BASE 0x40090000
static inline void arch_decomp_setup(void)
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-prima2/include/mach/uncompress.h
index 29ee15e..5e1fcbe 100644
--- a/arch/arm/mach-prima2/include/mach/uncompress.h
+++ b/arch/arm/mach-prima2/include/mach/uncompress.h
@@ -1,14 +1,8 @@
/*
- * arch/arm/mach-prima2/include/mach/uncompress.h
- *
- * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
- *
- * Licensed under GPLv2 or later.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#include <mach/uart.h>
static inline void arch_decomp_setup(void)
@@ -17,4 +11,3 @@ static inline void arch_decomp_setup(void)
SIRFSOC_UART_TXFIFO_DATA, SIRFSOC_UART_TXFIFO_STATUS,
SIRFSOC_UART1_TXFIFO_FULL, 0, 0, 0, 0);
}
-#endif
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
index 7d24bf1..f123d9f 100644
--- a/arch/arm/mach-pxa/include/mach/uncompress.h
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -1,9 +1,4 @@
/*
- * arch/arm/mach-pxa/include/mach/uncompress.h
- *
- * Author: Nicolas Pitre
- * Copyright: (C) 2001 MontaVista Software Inc.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
diff --git a/arch/arm/mach-realview/include/mach/uncompress.h b/arch/arm/mach-realview/include/mach/uncompress.h
index f69b003..8e7ecaf 100644
--- a/arch/arm/mach-realview/include/mach/uncompress.h
+++ b/arch/arm/mach-realview/include/mach/uncompress.h
@@ -1,21 +1,7 @@
/*
- * arch/arm/mach-realview/include/mach/uncompress.h
- *
- * Copyright (C) 2003 ARM Limited
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#include <asm/mach-types.h>
diff --git a/arch/arm/mach-s3c64xx/include/mach/uncompress.h b/arch/arm/mach-s3c64xx/include/mach/uncompress.h
index c6a82a2..78f5e06 100644
--- a/arch/arm/mach-s3c64xx/include/mach/uncompress.h
+++ b/arch/arm/mach-s3c64xx/include/mach/uncompress.h
@@ -1,20 +1,8 @@
-/* arch/arm/mach-s3c6400/include/mach/uncompress.h
- *
- * Copyright 2008 Openmoko, Inc.
- * Copyright 2008 Simtec Electronics
- * http://armlinux.simtec.co.uk/
- * Ben Dooks <ben@simtec.co.uk>
- *
- * S3C6400 - uncompress code
- *
+/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
+ */
#include <mach/map.h>
#include <plat/uncompress.h>
@@ -24,5 +12,3 @@ static void arch_detect_cpu(void)
fifo_mask = S3C2440_UFSTAT_TXMASK;
fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
}
-
-#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-s5p64x0/include/mach/uncompress.h b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
index 0b896fc..436920a 100644
--- a/arch/arm/mach-s5p64x0/include/mach/uncompress.h
+++ b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
@@ -9,10 +9,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#define ARCH_UCUART_NONGENERIC
#include <mach/map.h>
@@ -177,5 +173,3 @@ static void arch_detect_cpu(void)
{
/* we do not need to do any cpu detection here at the moment. */
}
-
-#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-s5pc100/include/mach/uncompress.h b/arch/arm/mach-s5pc100/include/mach/uncompress.h
index 3d67981..9d64a2c 100644
--- a/arch/arm/mach-s5pc100/include/mach/uncompress.h
+++ b/arch/arm/mach-s5pc100/include/mach/uncompress.h
@@ -11,10 +11,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#define ARCH_UCUART_NONGENERIC
#include <mach/map.h>
@@ -26,5 +22,3 @@ static void arch_detect_cpu(void)
fifo_mask = S3C2440_UFSTAT_TXMASK;
fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
}
-
-#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-s5pv210/include/mach/uncompress.h b/arch/arm/mach-s5pv210/include/mach/uncompress.h
index f5454f3..81afd51 100644
--- a/arch/arm/mach-s5pv210/include/mach/uncompress.h
+++ b/arch/arm/mach-s5pv210/include/mach/uncompress.h
@@ -1,18 +1,8 @@
-/* linux/arch/arm/mach-s5pv210/include/mach/uncompress.h
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- * http://www.samsung.com/
- *
- * S5PV210 - uncompress code
- *
+/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
+ */
#define ARCH_UCUART_NONGENERIC
#include <mach/map.h>
#include <plat/uncompress.h>
@@ -21,5 +11,3 @@ static void arch_detect_cpu(void)
{
/* we do not need to do any cpu detection here at the moment. */
}
-
-#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-sa1100/include/mach/uncompress.h b/arch/arm/mach-sa1100/include/mach/uncompress.h
index 714f957..4c89c40 100644
--- a/arch/arm/mach-sa1100/include/mach/uncompress.h
+++ b/arch/arm/mach-sa1100/include/mach/uncompress.h
@@ -1,11 +1,8 @@
/*
- * arch/arm/mach-sa1100/include/mach/uncompress.h
- *
- * (C) 1999 Nicolas Pitre <nico@fluxnic.net>
- *
- * Reorganised to be machine independent.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
#include "hardware.h"
static inline int uart_enabled(int base)
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
index cc1ce9b..3d3ab55 100644
--- a/arch/arm/mach-shark/include/mach/uncompress.h
+++ b/arch/arm/mach-shark/include/mach/uncompress.h
@@ -1,10 +1,7 @@
/*
- * arch/arm/mach-shark/include/mach/uncompress.h
- * by Alexander Schulz
- *
- * derived from:
- * arch/arm/mach-footbridge/include/mach/uncompress.h
- * Copyright (C) 1996,1997,1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-shmobile/include/mach/uncompress.h b/arch/arm/mach-shmobile/include/mach/uncompress.h
index 9df3a71..346028a 100644
--- a/arch/arm/mach-shmobile/include/mach/uncompress.h
+++ b/arch/arm/mach-shmobile/include/mach/uncompress.h
@@ -1,11 +1,10 @@
-#ifndef __ASM_MACH_UNCOMPRESS_H
-#define __ASM_MACH_UNCOMPRESS_H
-
-#define ARCH_UCUART_NONGENERIC
-
/*
- * This does not append a newline
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
+#define ARCH_UCUART_NONGENERIC
+
static void putc(int c)
{
}
@@ -15,5 +14,3 @@ static inline void flush(void)
}
#define arch_decomp_setup()
-
-#endif /* __ASM_MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/uncompress.h b/arch/arm/mach-spear3xx/include/mach/uncompress.h
index 53ba8bb..a4acb71 100644
--- a/arch/arm/mach-spear3xx/include/mach/uncompress.h
+++ b/arch/arm/mach-spear3xx/include/mach/uncompress.h
@@ -1,19 +1 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/uncompress.h
- *
- * Serial port stubs for kernel decompress status messages
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_UNCOMPRESS_H
-#define __MACH_UNCOMPRESS_H
-
#include <plat/uncompress.h>
-
-#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/uncompress.h b/arch/arm/mach-spear6xx/include/mach/uncompress.h
index 77f0765..a4acb71 100644
--- a/arch/arm/mach-spear6xx/include/mach/uncompress.h
+++ b/arch/arm/mach-spear6xx/include/mach/uncompress.h
@@ -1,19 +1 @@
-/*
- * arch/arm/mach-spear6xx/include/mach/uncompress.h
- *
- * Serial port stubs for kernel decompress status messages
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_UNCOMPRESS_H
-#define __MACH_UNCOMPRESS_H
-
#include <plat/uncompress.h>
-
-#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-tegra/include/mach/uncompress.h b/arch/arm/mach-tegra/include/mach/uncompress.h
index 5c3ec5e..13318ef 100644
--- a/arch/arm/mach-tegra/include/mach/uncompress.h
+++ b/arch/arm/mach-tegra/include/mach/uncompress.h
@@ -1,26 +1,8 @@
/*
- * arch/arm/mach-tegra/include/mach/uncompress.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- * Colin Cross <ccross@google.com>
- * Erik Gilling <konkers@google.com>
- *
- * 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.
- *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __MACH_TEGRA_UNCOMPRESS_H
-#define __MACH_TEGRA_UNCOMPRESS_H
-
#include <linux/types.h>
#include <linux/serial_reg.h>
@@ -38,5 +20,3 @@ static inline void arch_decomp_setup(void)
ucuart_init_8250(TEGRA_DEBUG_UART_BASE, 2, UCUART_IO_MEM8);
}
-
-#endif
diff --git a/arch/arm/mach-u300/include/mach/uncompress.h b/arch/arm/mach-u300/include/mach/uncompress.h
index 7f09047..df644d4 100644
--- a/arch/arm/mach-u300/include/mach/uncompress.h
+++ b/arch/arm/mach-u300/include/mach/uncompress.h
@@ -1,21 +1,7 @@
/*
- * arch/arm/mach-u300/include/mach/uncompress.h
- *
- * Copyright (C) 2003 ARM Limited
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
index eb30110..39fcc4f 100644
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ b/arch/arm/mach-ux500/include/mach/uncompress.h
@@ -1,23 +1,8 @@
/*
- * Copyright (C) 2009 ST-Ericsson
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#include <asm/mach-types.h>
#include <mach/hardware.h>
@@ -29,5 +14,3 @@ static inline void arch_decomp_setup(void)
else
ucuart_init_amba01x(U8500_UART2_BASE);
}
-
-#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-versatile/include/mach/uncompress.h b/arch/arm/mach-versatile/include/mach/uncompress.h
index 01390bd..5afe25b 100644
--- a/arch/arm/mach-versatile/include/mach/uncompress.h
+++ b/arch/arm/mach-versatile/include/mach/uncompress.h
@@ -1,21 +1,7 @@
/*
- * arch/arm/mach-versatile/include/mach/uncompress.h
- *
- * Copyright (C) 2003 ARM Limited
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-vexpress/include/mach/uncompress.h b/arch/arm/mach-vexpress/include/mach/uncompress.h
index 970eba5..aedf7cc 100644
--- a/arch/arm/mach-vexpress/include/mach/uncompress.h
+++ b/arch/arm/mach-vexpress/include/mach/uncompress.h
@@ -1,21 +1,7 @@
/*
- * arch/arm/mach-vexpress/include/mach/uncompress.h
- *
- * Copyright (C) 2003 ARM Limited
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-vt8500/include/mach/uncompress.h b/arch/arm/mach-vt8500/include/mach/uncompress.h
index 7fb6603..477ab84 100644
--- a/arch/arm/mach-vt8500/include/mach/uncompress.h
+++ b/arch/arm/mach-vt8500/include/mach/uncompress.h
@@ -1,18 +1,7 @@
-/* arch/arm/mach-vt8500/include/mach/uncompress.h
- *
- * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
- *
- * Based on arch/arm/mach-dove/include/mach/uncompress.h
- *
- * 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.
- *
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
static inline void arch_decomp_setup(void)
{
diff --git a/arch/arm/mach-w90x900/include/mach/uncompress.h b/arch/arm/mach-w90x900/include/mach/uncompress.h
index f082f83..6118a77 100644
--- a/arch/arm/mach-w90x900/include/mach/uncompress.h
+++ b/arch/arm/mach-w90x900/include/mach/uncompress.h
@@ -1,27 +1,11 @@
/*
- * arch/arm/mach-w90x900/include/mach/uncompress.h
- *
- * Copyright (c) 2008 Nuvoton technology corporation
- * All rights reserved.
- *
- * Wan ZongShun <mcuos.com@gmail.com>
- *
- * Based on arch/arm/mach-s3c2410/include/mach/uncompress.h
- *
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H
-
#include <mach/map.h>
static inline void arch_decomp_setup(void)
{
ucuart_init_8250(W90X900_PA_UART, 2, UCUART_IO_MEM32);
}
-#endif/* __ASM_W90X900_UNCOMPRESS_H */
diff --git a/arch/arm/mach-zynq/include/mach/uncompress.h b/arch/arm/mach-zynq/include/mach/uncompress.h
index 5eaf93b..fb1bbdf 100644
--- a/arch/arm/mach-zynq/include/mach/uncompress.h
+++ b/arch/arm/mach-zynq/include/mach/uncompress.h
@@ -1,20 +1,8 @@
-/* arch/arm/mach-zynq/include/mach/uncompress.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.
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
-#ifndef __MACH_UNCOMPRESS_H__
-#define __MACH_UNCOMPRESS_H__
-
#include <mach/zynq_soc.h>
#include <mach/uart.h>
@@ -24,5 +12,3 @@ static inline void arch_decomp_setup(void)
UART_SR_OFFSET, UART_SR_TXFULL, 0,
UART_SR_OFFSET, UART_SR_TXEMPTY, UART_SR_TXEMPTY);
}
-
-#endif
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index b7023be..00059cc 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -14,9 +14,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#ifndef __ASM_ARCH_MXC_UNCOMPRESS_H__
-#define __ASM_ARCH_MXC_UNCOMPRESS_H__
-
#define __MXC_BOOT_UNCOMPRESS
#include <asm/mach-types.h>
@@ -111,5 +108,3 @@ static inline void arch_decomp_setup(void)
ucuart_init(uart_base, 0, UCUART_IO_MEM32, TXR,
USR2, USR2_TXFE, USR2_TXFE, 0, 0, 0);
}
-
-#endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h
index b9d8f6e..ffdfcde 100644
--- a/arch/arm/plat-spear/include/plat/uncompress.h
+++ b/arch/arm/plat-spear/include/plat/uncompress.h
@@ -1,22 +1,10 @@
/*
- * arch/arm/plat-spear/include/plat/uncompress.h
- *
- * Serial port stubs for kernel decompress status messages
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#include <mach/hardware.h>
-
-#ifndef __PLAT_UNCOMPRESS_H
-#define __PLAT_UNCOMPRESS_H
-
static inline void arch_decomp_setup(void)
{
ucuart_init_amba01x(SPEAR_DBG_UART_BASE);
}
-#endif /* __PLAT_UNCOMPRESS_H */
diff --git a/arch/arm/plat-tcc/include/mach/uncompress.h b/arch/arm/plat-tcc/include/mach/uncompress.h
index 23b2b77..f12e63e 100644
--- a/arch/arm/plat-tcc/include/mach/uncompress.h
+++ b/arch/arm/plat-tcc/include/mach/uncompress.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2009 Hans J. Koch <hjk@linutronix.de>
- *
- * This file is licensed under the terms of the GPL version 2.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#include <mach/tcc8k-regs.h>
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 14/15] ARM: uncompress: Get decompress UART info from DT
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (11 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 13/15] ARM: uncompress.h: Cleanup header guards and banners Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
2011-10-24 9:30 ` Russell King - ARM Linux
2011-10-23 21:10 ` [RFC PATCH 15/15] ARM: uncompress: Add documentation Zoltan Devai
13 siblings, 1 reply; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
Allow the static decompress UART setup in uncompress.h
files to be overridden with an ucuart description in DT.
At a later stage, this may also allow to skip the
inclusion of uncompress.h files on arches which are DT-only,
to get rid of these files completely.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/Kconfig | 9 +++++++
arch/arm/boot/compressed/Makefile | 7 +++++
arch/arm/boot/compressed/head.S | 8 ++++++
arch/arm/boot/compressed/print.c | 45 +++++++++++++++++++++++++++++++++++++
4 files changed, 69 insertions(+), 0 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7a011f4..edfd4b7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1866,6 +1866,15 @@ config ZBOOT_ROM_SH_MOBILE_SDHI
endchoice
+config UCUART_DT
+ bool "Configure the decompress UART port from DT"
+ depends on OF
+ help
+ With this option, the decompressor will use the UART port set up
+ via the device tree.
+ This configuration will override the hardcoded settings in any
+ uncompress.h files.
+
config ARM_APPENDED_DTB
bool "Use appended device tree blob to zImage (EXPERIMENTAL)"
depends on OF && !ZBOOT_ROM && EXPERIMENTAL
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index d955d4f..a4a1b8b 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -110,6 +110,13 @@ ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
OBJS += $(libfdt_objs) atags_to_fdt.o
endif
+$(addprefix $(obj)/,$(libfdt_objs) print.o): \
+ $(addprefix $(obj)/,$(libfdt_hdrs))
+
+ifeq ($(CONFIG_UCUART_DT),y)
+OBJS += $(libfdt_objs)
+endif
+
targets := vmlinux vmlinux.lds \
piggy.$(suffix_y) piggy.$(suffix_y).o \
lib1funcs.o lib1funcs.S font.o font.c head.o misc.o $(OBJS)
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 9f5ac11..b80e5df 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -443,6 +443,14 @@ not_relocated: mov r0, #0
cmp r2, r3
blo 1b
+#ifdef CONFIG_UCUART_DT
+/* Set up the uncompress UART port from DT data */
+ stmfd sp!, {r0-r3, ip, lr}
+ mov r0, r6 @ ATAG / DT pointer
+ bl ucuart_init_dt
+ ldmfd sp!, {r0-r3, ip, lr}
+#endif /* CONFIG_UCUART_DT */
+
/*
* The C runtime environment should now be setup sufficiently.
* Set up some pointers, and start decompressing.
diff --git a/arch/arm/boot/compressed/print.c b/arch/arm/boot/compressed/print.c
index 1529d15..cbb0dbf 100644
--- a/arch/arm/boot/compressed/print.c
+++ b/arch/arm/boot/compressed/print.c
@@ -49,9 +49,54 @@ void ucuart_init(int base, int regshift, enum ucuart_iotypes iotype,
int flush_val);
void ucuart_init_8250(int base, int regshift, enum ucuart_iotypes iotype);
+void ucuart_init_amba01x(int base);
struct uncompress_uart ucuart;
+#ifdef CONFIG_UCUART_DT
+#include <libfdt.h>
+
+/* Just a concept sketch... */
+void ucuart_init_dt(void *fdt)
+{
+ int ret, offset;
+ const void *prop;
+ const int *uart_base, *uart_regshift;
+ enum ucuart_iotypes iotype = UCUART_IO_MEM8;
+
+ ret = fdt_check_header(fdt);
+ if (ret < 0)
+ return;
+
+ offset = fdt_path_offset(fdt, "/chosen");
+ if (offset == -FDT_ERR_NOTFOUND)
+ return;
+
+ prop = fdt_getprop(fdt, offset, "linux,ucuart-8250", NULL);
+ if (!prop) {
+ putstr("non-8250 uart\n");
+ return;
+ }
+
+ prop = fdt_getprop(fdt, offset, "linux,ucuart-io-32", NULL);
+ if (prop)
+ iotype = UCUART_IO_MEM32;
+
+ uart_base = fdt_getprop(fdt, offset, "linux,ucuart-base", NULL);
+ uart_regshift = fdt_getprop(fdt, offset, "linux,ucuart-regshift", NULL);
+
+ prop = fdt_getprop(fdt, offset, "linux,ucuart-8250", NULL);
+ if (prop)
+ ucuart_init_8250(*uart_base, *uart_regshift, iotype);
+
+ prop = fdt_getprop(fdt, offset, "linux,ucuart-amba01x", NULL);
+ if (prop)
+ ucuart_init_amba01x(*uart_base);
+
+ fdt_pack(fdt);
+}
+#endif
+
#include <mach/uncompress.h>
#ifndef ARCH_UCUART_NONGENERIC
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 15/15] ARM: uncompress: Add documentation
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
` (12 preceding siblings ...)
2011-10-23 21:10 ` [RFC PATCH 14/15] ARM: uncompress: Get decompress UART info from DT Zoltan Devai
@ 2011-10-23 21:10 ` Zoltan Devai
13 siblings, 0 replies; 23+ messages in thread
From: Zoltan Devai @ 2011-10-23 21:10 UTC (permalink / raw)
To: linux-arm-kernel
Short description for mach maintainters on how to use the
ucuart driver. It is in-line in the print.c file, as they will
probably look there for any compile/link errors caused by
their decompressor UART setup.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/print.c | 35 ++++++++++++++++++++++++++---------
1 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/compressed/print.c b/arch/arm/boot/compressed/print.c
index cbb0dbf..b495c2e 100644
--- a/arch/arm/boot/compressed/print.c
+++ b/arch/arm/boot/compressed/print.c
@@ -1,21 +1,38 @@
/*
- * misc.c
- *
- * This is a collection of several routines from gzip-1.0.3
- * adapted for Linux.
- *
- * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
- *
- * Modified for ARM Linux by Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
* Nicolas Pitre <nico@visuaide.com> 1999/04/14 :
* For this code to run directly from Flash, all constant variables must
- * be marked with 'const' and all other variables initialized at run-time
+ * be marked with 'const' and all other variables initialized at run-time
* only. This way all non constant variables will end up in the bss segment,
* which should point to addresses in RAM and cleared to 0 on start.
* This allows for a much quicker boot time.
*/
+/* UART usage before kernel start:
+ * The files in this directory allow the boot of a self-extracting kernel
+ * image. As the kernel itself is compressed, this is a separate environment
+ * and thus needs a separate UART driver to communicate with the outside.
+ * Machines have multiple ways for providing this UART driver in their
+ * uncompress.h files:
+ *
+ * a) If your UART is compatible with a standard 8250 or AMBA01X port,
+ * call one of the below ucuart_8250/amba01x setup routines from the
+ * function "static inline void arch_decomp_setup(void)", that
+ * resides in the uncompress.h file.
+ * b) If your UART is not a standard one, but still an MMIO one, that
+ * has at least a direct register for TX, use the generic ucuart_init()
+ * function.
+ * c) If your UART is too complicated for these simple routines, or you
+ * rather want to use a framebuffer, provide your own putc(), flush() and
+ * arch_decomp_setup() functions and #define ARCH_UCUART_NONGENERIC
+ * in your header file.
+ * d) You can supply the description of the UART in a device tree blob that
+ * is passed to the kernel.
+ * (Not yet: In this case, you may omit the uncompress.h file entirely)
+ */
#include <linux/compiler.h> /* for inline */
#include <linux/types.h>
#include <linux/linkage.h>
--
1.7.4.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC PATCH 04/15] ARM: uncompress: Only call arch_decomp_setup when needed
2011-10-23 21:10 ` [RFC PATCH 04/15] ARM: uncompress: Only call arch_decomp_setup when needed Zoltan Devai
@ 2011-10-24 6:55 ` Uwe Kleine-König
0 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2011-10-24 6:55 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Oct 23, 2011 at 11:10:34PM +0200, Zoltan Devai wrote:
> As only the minority of the machines uses arch_decomp_setup,
> ifdef it out when not needed, to avoid needless defines in
> all uncompress.h files.
>
> Machines using this feature should add
#define ARCH_HAVE_DECOMP_SETUP
> in their uncompress.h headers.
I guess this was removed by git-commit.
>
> Signed-off-by: Zoltan Devai <zoss@devai.org>
> ---
> arch/arm/boot/compressed/misc.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
> index 8e2a8fc..a4b8df2 100644
> --- a/arch/arm/boot/compressed/misc.c
> +++ b/arch/arm/boot/compressed/misc.c
> @@ -142,7 +142,9 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
> free_mem_end_ptr = free_mem_ptr_end_p;
> __machine_arch_type = arch_id;
>
> +#ifdef ARCH_HAVE_DECOMP_SETUP
> arch_decomp_setup();
> +#endif /* ARCH_HAVE_DECOMP_SETUP */
This is a place that needs some care for multi-SoC. I don't know if
there are any ideas how to handle it, but using a cpp symbol won't work
I guess. So I think it's not worth to touch arch_decomp_setup without
solving the multi-SoC case.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 23+ messages in thread
* [RFC PATCH 08/15] ARM: uncompress: Rename misc.c to print.c
2011-10-23 21:10 ` [RFC PATCH 08/15] ARM: uncompress: Rename misc.c to print.c Zoltan Devai
@ 2011-10-24 6:58 ` Uwe Kleine-König
0 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2011-10-24 6:58 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Oct 23, 2011 at 11:10:38PM +0200, Zoltan Devai wrote:
> Now that misc.c only holds functions related to printout
> during decompression, rename it accordingly.
>
> Signed-off-by: Zoltan Devai <zoss@devai.org>
> ---
> arch/arm/boot/compressed/Makefile | 2 +-
> arch/arm/boot/compressed/misc.c | 122 -------------------------------------
> arch/arm/boot/compressed/print.c | 122 +++++++++++++++++++++++++++++++++++++
If you add -M to git-format-patch this gets much easier to review.
> 3 files changed, 123 insertions(+), 123 deletions(-)
> delete mode 100644 arch/arm/boot/compressed/misc.c
> create mode 100644 arch/arm/boot/compressed/print.c
>
> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
> index e4f32a8..d955d4f 100644
> --- a/arch/arm/boot/compressed/Makefile
> +++ b/arch/arm/boot/compressed/Makefile
> @@ -23,7 +23,7 @@ endif
>
> AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
> HEAD = head.o
> -OBJS += misc.o decompress.o
> +OBJS += print.o decompress.o
> FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
>
> # string library code (-Os is enforced to keep it much smaller)
> [...]
> diff --git a/arch/arm/boot/compressed/print.c b/arch/arm/boot/compressed/print.c
> new file mode 100644
> index 0000000..25f0fb2
> --- /dev/null
> +++ b/arch/arm/boot/compressed/print.c
> @@ -0,0 +1,122 @@
> +/*
> + * misc.c
This is wrong.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 23+ messages in thread
* [RFC PATCH 07/15] ARM: uncompress: Move decompressing related stuff to decompress.c
2011-10-23 21:10 ` [RFC PATCH 07/15] ARM: uncompress: Move decompressing related stuff to decompress.c Zoltan Devai
@ 2011-10-24 9:17 ` Russell King - ARM Linux
2011-10-24 9:23 ` Russell King - ARM Linux
0 siblings, 1 reply; 23+ messages in thread
From: Russell King - ARM Linux @ 2011-10-24 9:17 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Oct 23, 2011 at 11:10:37PM +0200, Zoltan Devai wrote:
> +void putstr(const char *ptr);
> +void error(char *x);
> +extern unsigned int __machine_arch_type;
> +#define arch_id __machine_arch_type
Why do we need this new define? arch_id in this file has only been a
local parameter to a function, and with your changes it looks like all
references have been removed.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [RFC PATCH 07/15] ARM: uncompress: Move decompressing related stuff to decompress.c
2011-10-24 9:17 ` Russell King - ARM Linux
@ 2011-10-24 9:23 ` Russell King - ARM Linux
0 siblings, 0 replies; 23+ messages in thread
From: Russell King - ARM Linux @ 2011-10-24 9:23 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Oct 24, 2011 at 10:17:56AM +0100, Russell King - ARM Linux wrote:
> On Sun, Oct 23, 2011 at 11:10:37PM +0200, Zoltan Devai wrote:
> > +void putstr(const char *ptr);
> > +void error(char *x);
> > +extern unsigned int __machine_arch_type;
> > +#define arch_id __machine_arch_type
>
> Why do we need this new define? arch_id in this file has only been a
> local parameter to a function, and with your changes it looks like all
> references have been removed.
Ignore this - it's needed for calls to arch_decomp_setup().
^ permalink raw reply [flat|nested] 23+ messages in thread
* [RFC PATCH 09/15] ARM: uncompress: Introduce ucuart as low-level serial port driver
2011-10-23 21:10 ` [RFC PATCH 09/15] ARM: uncompress: Introduce ucuart as low-level serial port driver Zoltan Devai
@ 2011-10-24 9:26 ` Russell King - ARM Linux
0 siblings, 0 replies; 23+ messages in thread
From: Russell King - ARM Linux @ 2011-10-24 9:26 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Oct 23, 2011 at 11:10:39PM +0200, Zoltan Devai wrote:
> +struct uncompress_uart {
> + void __iomem *base;
> + int reg_shift;
> + enum ucuart_iotypes iotype;
> + int tx_regoff;
> + int txfree_regoff;
> + int txfree_mask;
> + int txfree_val;
> + int flush_regoff;
> + int flush_mask;
> + int flush_val;
The values and masks should be unsigned.
> +};
> +
> +void ucuart_init(int base, int regshift, enum ucuart_iotypes iotype,
> + int tx_regoff, int txfree_regoff, int txfree_mask,
> + int txfree_val, int flush_regoff, int flush_mask,
> + int flush_val);
Ditto.
> +#include <linux/io.h>
I don't like this - this is *not* part of the kernel, it's part of a
separate execution environment which may not contain everything required
for a functional macros in this header file.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [RFC PATCH 13/15] ARM: uncompress.h: Cleanup header guards and banners
2011-10-23 21:10 ` [RFC PATCH 13/15] ARM: uncompress.h: Cleanup header guards and banners Zoltan Devai
@ 2011-10-24 9:29 ` Russell King - ARM Linux
0 siblings, 0 replies; 23+ messages in thread
From: Russell King - ARM Linux @ 2011-10-24 9:29 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Oct 23, 2011 at 11:10:43PM +0200, Zoltan Devai wrote:
> Bring some standard into the files:
> - uncompress.h should only be included once, don't hide an
> error with the header guards
> - If the copyright banner is longer than the real content,
> or the file has been mostly rewritten, just stick
> a short-form GPl notice on top
This changes the license terms on these files, some of them are GPL2+
and you're changing them to be GPL2. You don't have the right to make
that change.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [RFC PATCH 14/15] ARM: uncompress: Get decompress UART info from DT
2011-10-23 21:10 ` [RFC PATCH 14/15] ARM: uncompress: Get decompress UART info from DT Zoltan Devai
@ 2011-10-24 9:30 ` Russell King - ARM Linux
2011-10-25 7:38 ` Tony Lindgren
0 siblings, 1 reply; 23+ messages in thread
From: Russell King - ARM Linux @ 2011-10-24 9:30 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Oct 23, 2011 at 11:10:44PM +0200, Zoltan Devai wrote:
> Allow the static decompress UART setup in uncompress.h
> files to be overridden with an ucuart description in DT.
>
> At a later stage, this may also allow to skip the
> inclusion of uncompress.h files on arches which are DT-only,
> to get rid of these files completely.
This needs to be reviewed by DT people.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [RFC PATCH 14/15] ARM: uncompress: Get decompress UART info from DT
2011-10-24 9:30 ` Russell King - ARM Linux
@ 2011-10-25 7:38 ` Tony Lindgren
0 siblings, 0 replies; 23+ messages in thread
From: Tony Lindgren @ 2011-10-25 7:38 UTC (permalink / raw)
To: linux-arm-kernel
* Russell King - ARM Linux <linux@arm.linux.org.uk> [111024 10:56]:
> On Sun, Oct 23, 2011 at 11:10:44PM +0200, Zoltan Devai wrote:
> > Allow the static decompress UART setup in uncompress.h
> > files to be overridden with an ucuart description in DT.
> >
> > At a later stage, this may also allow to skip the
> > inclusion of uncompress.h files on arches which are DT-only,
> > to get rid of these files completely.
>
> This needs to be reviewed by DT people.
Nice patch series!
I like this approach, because it allows us to:
1. Use this DT entry entry for earlyprintk, and then
CONFIG_DEBUG_LL can be separated from all this
2. CONFIG_DEBUG_LL can now be reserved for the low-level
debugging when bringing up new SoC/board etc
3. This allows seeing uncompress errors on unsupported
boards, which is important when working on multiarch support
4. With this series we can turn earlyprintk into something
that can be compiled into production kernels too
I have not looked through the patch series if it uses still
CONFIG_DEBUG_LL somewhere, but if it does, it should be
separated from that.
Cheers,
Tony
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2011-10-25 7:38 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 02/15] ARM: uncompress: Remove unused definition of ARCH_HAS_DECOMP_WATCHDOG Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 03/15] ARM: uncompress.h: Introduce ARCH_HAVE_DECOMP_SETUP Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 04/15] ARM: uncompress: Only call arch_decomp_setup when needed Zoltan Devai
2011-10-24 6:55 ` Uwe Kleine-König
2011-10-23 21:10 ` [RFC PATCH 05/15] ARM: uncompress.h: Remove unused arch_decomp_setup declarations Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 06/15] ARM: uncompress: Remove unused Trace functions Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 07/15] ARM: uncompress: Move decompressing related stuff to decompress.c Zoltan Devai
2011-10-24 9:17 ` Russell King - ARM Linux
2011-10-24 9:23 ` Russell King - ARM Linux
2011-10-23 21:10 ` [RFC PATCH 08/15] ARM: uncompress: Rename misc.c to print.c Zoltan Devai
2011-10-24 6:58 ` Uwe Kleine-König
2011-10-23 21:10 ` [RFC PATCH 09/15] ARM: uncompress: Introduce ucuart as low-level serial port driver Zoltan Devai
2011-10-24 9:26 ` Russell King - ARM Linux
2011-10-23 21:10 ` [RFC PATCH 10/15] ARM: uncompress.h: Convert machines to use the new ucuart driver Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 11/15] ARM: uncompress: Call arch_decomp_setup by default Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 12/15] ARM: uncompress.h: make the ucuart driver the default implementation Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 13/15] ARM: uncompress.h: Cleanup header guards and banners Zoltan Devai
2011-10-24 9:29 ` Russell King - ARM Linux
2011-10-23 21:10 ` [RFC PATCH 14/15] ARM: uncompress: Get decompress UART info from DT Zoltan Devai
2011-10-24 9:30 ` Russell King - ARM Linux
2011-10-25 7:38 ` Tony Lindgren
2011-10-23 21:10 ` [RFC PATCH 15/15] ARM: uncompress: Add documentation Zoltan Devai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).