ARM: uncompress.h: Remove unused arch_decomp_wdog defines
Subsystems (24)
RFC PATCH 1/15 ARM: uncompress.h: Remove unused arch_decomp_wdog defines
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.
--- 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 - arch/arm/mach-footbridge/include/mach/uncompress.h | 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(-)
arch/arm/mach-at91/include/mach/uncompress.h +0 -2
@@ -71,6 +71,4 @@ static inline void flush(void)#define arch_decomp_setup () -#define arch_decomp_wdog () -#endif
arch/arm/mach-bcmring/include/mach/uncompress.h +0 -1
@@ -40,4 +40,3 @@ static inline void flush(void) }#define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-clps711x/include/mach/uncompress.h +0 -2
@@ -55,5 +55,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () - -#define arch_decomp_wdog ()
arch/arm/mach-cns3xxx/include/mach/uncompress.h +0 -1
@@ -51,4 +51,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-davinci/include/mach/uncompress.h +0 -1
@@ -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 ()
arch/arm/mach-dove/include/mach/uncompress.h +0 -1
@@ -34,4 +34,3 @@ static void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-ebsa110/include/mach/uncompress.h +0 -1
@@ -42,4 +42,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-ep93xx/include/mach/uncompress.h +0 -2
@@ -90,5 +90,3 @@ static void arch_decomp_setup(void) {ethernet_reset (); } - -#define arch_decomp_wdog ()
arch/arm/mach-footbridge/include/mach/uncompress.h +0 -1
@@ -35,4 +35,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-gemini/include/mach/uncompress.h +0 -2
@@ -39,6 +39,4 @@ static inline void flush(void)*/ #define arch_decomp_setup () -#define arch_decomp_wdog () -#endif /* __MACH_UNCOMPRESS_H */
arch/arm/mach-h720x/include/mach/uncompress.h +0 -1
@@ -32,6 +32,5 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()#endif
arch/arm/mach-integrator/include/mach/uncompress.h +0 -2
@@ -46,5 +46,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () - -#define arch_decomp_wdog ()
arch/arm/mach-iop13xx/include/mach/uncompress.h +0 -1
@@ -20,4 +20,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-iop32x/include/mach/uncompress.h +0 -1
@@ -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 ()
arch/arm/mach-iop33x/include/mach/uncompress.h +0 -1
@@ -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 ()
arch/arm/mach-ixp2000/include/mach/uncompress.h +0 -1
@@ -44,4 +44,3 @@ static inline void flush(void) }#define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-ixp23xx/include/mach/uncompress.h +0 -2
@@ -34,7 +34,5 @@ static inline void flush(void) }#define arch_decomp_setup () -#define arch_decomp_wdog () -#endif
arch/arm/mach-ixp4xx/include/mach/uncompress.h +0 -2
@@ -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
arch/arm/mach-kirkwood/include/mach/uncompress.h +0 -1
@@ -44,4 +44,3 @@ static void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-ks8695/include/mach/uncompress.h +0 -1
@@ -32,6 +32,5 @@ static inline void flush(void) }#define arch_decomp_setup () -#define arch_decomp_wdog ()#endif
arch/arm/mach-lpc32xx/include/mach/uncompress.h +0 -1
@@ -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
arch/arm/mach-mmp/include/mach/uncompress.h +0 -6
@@ -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 ()
arch/arm/mach-msm/include/mach/uncompress.h +0 -4
@@ -36,8 +36,4 @@ static inline void arch_decomp_setup(void) { } -static inline void arch_decomp_wdog (void ) -{ -} -#endif
arch/arm/mach-mv78xx0/include/mach/uncompress.h +0 -1
@@ -44,4 +44,3 @@ static void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-mxs/include/mach/uncompress.h +0 -1
@@ -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__ */
arch/arm/mach-netx/include/mach/uncompress.h +0 -1
@@ -73,4 +73,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-nomadik/include/mach/uncompress.h +0 -2
@@ -58,6 +58,4 @@ static inline void arch_decomp_setup(void) { } -#define arch_decomp_wdog ()/* nothing to do here */ -#endif /* __ASM_ARCH_UNCOMPRESS_H */
arch/arm/mach-orion5x/include/mach/uncompress.h +0 -1
@@ -46,4 +46,3 @@ static void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-picoxcell/include/mach/uncompress.h +0 -1
@@ -18,4 +18,3 @@#define putc (c)#define flush ()#define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-pnx4008/include/mach/uncompress.h +0 -1
@@ -43,4 +43,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-prima2/include/mach/uncompress.h +0 -2
@@ -17,8 +17,6 @@ void arch_decomp_setup(void) { } -#define arch_decomp_wdog () -static __inline__void putc (char c) {/*
arch/arm/mach-pxa/include/mach/uncompress.h +0 -5
@@ -72,8 +72,3 @@ static inline void arch_decomp_setup(void) uart_is_pxa =0 ; } } - -/* -* nothing to do -*/ -#define arch_decomp_wdog ()
arch/arm/mach-realview/include/mach/uncompress.h +0 -1
@@ -75,4 +75,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-rpc/include/mach/uncompress.h +0 -5
@@ -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 ()
arch/arm/mach-s5p64x0/include/mach/uncompress.h +0 -33
@@ -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
arch/arm/mach-sa1100/include/mach/uncompress.h +0 -1
@@ -47,4 +47,3 @@ static inline void flush(void)* Nothing to do for these */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-shark/include/mach/uncompress.h +0 -1
@@ -48,4 +48,3 @@ static void putr()* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-shmobile/include/mach/uncompress.h +0 -2
@@ -16,6 +16,4 @@ static void arch_decomp_setup(void) { } -#define arch_decomp_wdog () -#endif /* __ASM_MACH_UNCOMPRESS_H */
arch/arm/mach-tegra/include/mach/uncompress.h +0 -4
@@ -57,8 +57,4 @@ static inline void arch_decomp_setup(void) uart[UART_LCR << shift] = 3; } -static inline void arch_decomp_wdog (void ) -{ -} -#endif
arch/arm/mach-u300/include/mach/uncompress.h +0 -1
@@ -43,4 +43,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-ux500/include/mach/uncompress.h +0 -2
@@ -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 */
arch/arm/mach-versatile/include/mach/uncompress.h +0 -1
@@ -43,4 +43,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-vexpress/include/mach/uncompress.h +0 -1
@@ -49,4 +49,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-vt8500/include/mach/uncompress.h +0 -1
@@ -34,4 +34,3 @@ static void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
arch/arm/mach-w90x900/include/mach/uncompress.h +0 -2
@@ -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 ;
arch/arm/mach-zynq/include/mach/uncompress.h +0 -2
@@ -34,8 +34,6 @@ static inline void flush(void)cpu_relax (); } -#define arch_decomp_wdog () -static void putc (char ch) {/*
arch/arm/plat-mxc/include/mach/uncompress.h +0 -1
@@ -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__ */
arch/arm/plat-omap/include/plat/uncompress.h +0 -5
@@ -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 ()
arch/arm/plat-samsung/Kconfig +0 -8
@@ -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
arch/arm/plat-samsung/include/plat/uncompress.h +0 -33
@@ -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.
arch/arm/plat-spear/include/plat/uncompress.h +0 -1
@@ -38,6 +38,5 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()#endif /* __PLAT_UNCOMPRESS_H */
arch/arm/plat-tcc/include/mach/uncompress.h +0 -1
@@ -31,4 +31,3 @@ static inline void flush(void)* nothing to do */ #define arch_decomp_setup () -#define arch_decomp_wdog ()
Signature · 1 line
1.7.4.1
RFC PATCH 2/15 ARM: uncompress: Remove unused definition of ARCH_HAS_DECOMP_WATCHDOG
This was only used by the old inflate code, which isn't used anymore by ARM.
--- arch/arm/boot/compressed/decompress.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/boot/compressed/decompress.c +0 -2
@@ -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);}
Signature · 1 line
1.7.4.1
RFC PATCH 3/15 ARM: uncompress.h: Introduce ARCH_HAVE_DECOMP_SETUP
In reply to Zoltan DevaiAdd this define to machines which really make use of this function.
--- 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(-)
arch/arm/mach-davinci/include/mach/uncompress.h +1 -0
@@ -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)
arch/arm/mach-ep93xx/include/mach/uncompress.h +1 -0
@@ -85,6 +85,7 @@ static void ethernet_reset(void) ; } +#define ARCH_HAVE_DECOMP_SETUP static void arch_decomp_setup (void ) {
arch/arm/mach-iop32x/include/mach/uncompress.h +1 -3
@@ -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)
arch/arm/mach-iop33x/include/mach/uncompress.h +1 -3
@@ -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)
arch/arm/mach-ixp4xx/include/mach/uncompress.h +1 -0
@@ -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
arch/arm/mach-mmp/include/mach/uncompress.h +2 -0
@@ -35,6 +35,8 @@ static inline void flush(void) { } +#define ARCH_HAVE_DECOMP_SETUP +static inline void arch_decomp_setup (void ) {/* default to UART2 */
arch/arm/mach-mxs/include/mach/uncompress.h +1 -0
@@ -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__ */
arch/arm/mach-pxa/include/mach/uncompress.h +2 -0
@@ -54,6 +54,8 @@ static inline void flush(void) { } +#define ARCH_HAVE_DECOMP_SETUP +static inline void arch_decomp_setup (void ) {/* initialize to default */
arch/arm/mach-rpc/include/mach/uncompress.h +2 -0
@@ -109,6 +109,8 @@ static inline void flush(void) { } +#define ARCH_HAVE_DECOMP_SETUP +/* * Setup for decompression */
arch/arm/mach-s5p64x0/include/mach/uncompress.h +2 -0
@@ -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 ) {/*
arch/arm/mach-tegra/include/mach/uncompress.h +2 -0
@@ -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 ;
arch/arm/mach-ux500/include/mach/uncompress.h +2 -0
@@ -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 */
arch/arm/plat-mxc/include/mach/uncompress.h +1 -0
@@ -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__ */
arch/arm/plat-omap/include/plat/uncompress.h +1 -0
@@ -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)
arch/arm/plat-samsung/include/plat/uncompress.h +2 -0
@@ -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 ) {
Signature · 1 line
1.7.4.1
RFC PATCH 4/15 ARM: uncompress: Only call arch_decomp_setup when needed
In reply to Zoltan DevaiAs 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.
--- arch/arm/boot/compressed/misc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/boot/compressed/misc.c +2 -0
@@ -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,
Signature · 1 line
1.7.4.1
RFC PATCH 4/15 ARM: uncompress: Only call arch_decomp_setup when needed
Quoted 5 lines · Zoltan Devai
As only the minority of the machines uses
arch_decomp_setup, ifdef it out when not needed, to avoid needless defines in alluncompress.hfiles.Machines using this feature should add
#define ARCH_HAVE_DECOMP_SETUP
Quoted 1 line
in their
uncompress.hheaders.
I guess this was removed by git-commit.
Quoted 11 lines
Signed-off-by Zoltan Devai <[email protected]>--- arch/arm/boot/compressed/misc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/boot/compressed/misc.c +0
-0
arch/arm/boot/compressed/misc.c decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, · line 147
Quoted 6 lines
arch/arm/boot/compressed/misc.c +2
-0@@ -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
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
RFC PATCH 5/15 ARM: uncompress.h: Remove unused arch_decomp_setup declarations
In reply to Zoltan DevaiNow 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.
--- 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 ----- arch/arm/mach-footbridge/include/mach/uncompress.h | 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(-)
arch/arm/mach-at91/include/mach/uncompress.h +0 -2
@@ -69,6 +69,4 @@ static inline void flush(void) #endif } -#define arch_decomp_setup () -#endif
arch/arm/mach-bcmring/include/mach/uncompress.h +0 -2
@@ -38,5 +38,3 @@ static inline void flush(void)while (BCMRING_UART_0_FR & (1 <<3 )) ; } - -#define arch_decomp_setup ()
arch/arm/mach-clps711x/include/mach/uncompress.h +0 -5
@@ -50,8 +50,3 @@ static inline void flush(void)while (clps_readl (SYSFLGx) &SYSFLG_UBUSY )barrier (); } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-cns3xxx/include/mach/uncompress.h +0 -5
@@ -46,8 +46,3 @@ static inline void flush(void)while (AMBA_UART_FR (base) & (1 <<3 ))barrier (); } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-dove/include/mach/uncompress.h +0 -5
@@ -29,8 +29,3 @@ static void putc(const char c)static void flush (void ) { } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-ebsa110/include/mach/uncompress.h +0 -5
@@ -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 ()
arch/arm/mach-footbridge/include/mach/uncompress.h +0 -5
@@ -30,8 +30,3 @@ static inline void putc(char c)static inline void flush (void ) { } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-gemini/include/mach/uncompress.h +0 -5
@@ -34,9 +34,4 @@ static inline void flush(void) { } -/* -* nothing to do -*/ -#define arch_decomp_setup () -#endif /* __MACH_UNCOMPRESS_H */
arch/arm/mach-h720x/include/mach/uncompress.h +0 -5
@@ -28,9 +28,4 @@ static inline void flush(void) { } -/* -* nothing to do -*/ -#define arch_decomp_setup () -#endif
arch/arm/mach-integrator/include/mach/uncompress.h +0 -5
@@ -41,8 +41,3 @@ static inline void flush(void)while (AMBA_UART_FR & (1 <<3 ))barrier (); } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-iop13xx/include/mach/uncompress.h +0 -5
@@ -15,8 +15,3 @@ static inline void putc(char c)static inline void flush (void ) { } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-ixp2000/include/mach/uncompress.h +0 -2
@@ -42,5 +42,3 @@ static inline void putc(int c)static inline void flush (void ) { } - -#define arch_decomp_setup ()
arch/arm/mach-ixp23xx/include/mach/uncompress.h +0 -2
@@ -33,6 +33,4 @@ static inline void flush(void) { } -#define arch_decomp_setup () -#endif
arch/arm/mach-kirkwood/include/mach/uncompress.h +0 -5
@@ -39,8 +39,3 @@ static void flush(void)barrier (); } } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-ks8695/include/mach/uncompress.h +0 -2
@@ -31,6 +31,4 @@ static inline void flush(void) barrier(); } -#define arch_decomp_setup () -#endif
arch/arm/mach-lpc32xx/include/mach/uncompress.h +0 -3
@@ -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
arch/arm/mach-msm/include/mach/uncompress.h +0 -4
@@ -32,8 +32,4 @@ static inline void flush(void) { } -static inline void arch_decomp_setup (void ) -{ -} -#endif
arch/arm/mach-mv78xx0/include/mach/uncompress.h +0 -5
@@ -39,8 +39,3 @@ static void flush(void)barrier (); } } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-netx/include/mach/uncompress.h +0 -5
@@ -68,8 +68,3 @@ static inline void flush(void)while (REG (base +UART_FR ) &FR_BUSY ); } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-nomadik/include/mach/uncompress.h +0 -4
@@ -54,8 +54,4 @@ static void flush(void) barrier(); } -static inline void arch_decomp_setup (void ) -{ -} -#endif /* __ASM_ARCH_UNCOMPRESS_H */
arch/arm/mach-orion5x/include/mach/uncompress.h +0 -5
@@ -41,8 +41,3 @@ static void flush(void)barrier (); } } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-picoxcell/include/mach/uncompress.h +0 -1
@@ -17,4 +17,3 @@*/ #define putc (c)#define flush () -#define arch_decomp_setup ()
arch/arm/mach-pnx4008/include/mach/uncompress.h +0 -5
@@ -38,8 +38,3 @@ static __inline__ void putc(char c)static inline void flush (void ) { } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-prima2/include/mach/uncompress.h +0 -4
@@ -13,10 +13,6 @@#include <mach/hardware.h> #include <mach/uart.h> -void arch_decomp_setup (void ) -{ -} -static __inline__void putc (char c) {/*
arch/arm/mach-realview/include/mach/uncompress.h +0 -5
@@ -70,8 +70,3 @@ static inline void flush(void)while (AMBA_UART_FR (base) & (1 <<3 ))barrier (); } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-sa1100/include/mach/uncompress.h +0 -5
@@ -42,8 +42,3 @@ static void putc(int c)static inline void flush (void ) { } - -/* -* Nothing to do for these -*/ -#define arch_decomp_setup ()
arch/arm/mach-shark/include/mach/uncompress.h +0 -5
@@ -43,8 +43,3 @@ static void putr() putc('\r'); }#endif - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-shmobile/include/mach/uncompress.h +0 -4
@@ -12,8 +12,4 @@ static inline void flush(void) { } -static void arch_decomp_setup (void ) -{ -} -#endif /* __ASM_MACH_UNCOMPRESS_H */
arch/arm/mach-u300/include/mach/uncompress.h +0 -5
@@ -38,8 +38,3 @@ static inline void flush(void)while (AMBA_UART_FR & (1 <<3 ))barrier (); } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-versatile/include/mach/uncompress.h +0 -5
@@ -38,8 +38,3 @@ static inline void flush(void)while (AMBA_UART_FR & (1 <<3 ))barrier (); } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-vexpress/include/mach/uncompress.h +0 -5
@@ -44,8 +44,3 @@ static inline void flush(void)while (AMBA_UART_FR (base) & (1 <<3 ))barrier (); } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-vt8500/include/mach/uncompress.h +0 -5
@@ -29,8 +29,3 @@ static void putc(const char c)static void flush (void ) { } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
arch/arm/mach-w90x900/include/mach/uncompress.h +0 -4
@@ -41,8 +41,4 @@ static inline void flush(void) { } -static void arch_decomp_setup (void ) -{ -} -#endif /* __ASM_W90X900_UNCOMPRESS_H */
arch/arm/mach-zynq/include/mach/uncompress.h +0 -4
@@ -20,10 +20,6 @@#include <mach/zynq_soc.h> #include <mach/uart.h> -void arch_decomp_setup (void ) -{ -} -static inline void flush (void ) {/*
arch/arm/plat-spear/include/plat/uncompress.h +0 -5
@@ -34,9 +34,4 @@ static inline void flush(void) { } -/* -* nothing to do -*/ -#define arch_decomp_setup () -#endif /* __PLAT_UNCOMPRESS_H */
arch/arm/plat-tcc/include/mach/uncompress.h +0 -5
@@ -26,8 +26,3 @@ static void putc(int c)static inline void flush (void ) { } - -/* -* nothing to do -*/ -#define arch_decomp_setup ()
Signature · 1 line
1.7.4.1
RFC PATCH 6/15 ARM: uncompress: Remove unused Trace functions
In reply to Zoltan DevaiThese trace functions were only used by the old inflate code which isn't used on ARM anymore.
--- arch/arm/boot/compressed/decompress.c | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-)
arch/arm/boot/compressed/decompress.c +0 -17
@@ -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
Signature · 1 line
1.7.4.1
RFC PATCH 7/15 ARM: uncompress: Move decompressing related stuff to decompress.c
In reply to Zoltan DevaiMove 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.
--- arch/arm/boot/compressed/decompress.c | 59 +++++++++++++++++++++++++++++- arch/arm/boot/compressed/misc.c | 66 ++++++++------------------------- 2 files changed, 74 insertions(+), 51 deletions(-)
arch/arm/boot/compressed/decompress.c +58 -1
@@ -1,3 +1,12 @@ +/* +* Nicolas Pitre <[email protected]> 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!" ); +}
arch/arm/boot/compressed/misc.c +16 -50
100 lines not on this page · raw message
Signature · 1 line
1.7.4.1
RFC PATCH 7/15 ARM: uncompress: Move decompressing related stuff to decompress.c
arch/arm/boot/compressed/misc.c line 26
Quoted 4 lines · Zoltan Devai
arch/arm/boot/compressed/misc.c +4
-0+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.
RFC PATCH 7/15 ARM: uncompress: Move decompressing related stuff to decompress.c
Quoted 9 lines · Russell King - ARM Linux
arch/arm/boot/compressed/misc.c line 26
Quoted 4 lines · Zoltan Devai
arch/arm/boot/compressed/misc.c +4
-0+void putstr (const char *ptr); +void error (char *x); +extern unsigned int __machine_arch_type; +#define arch_id __machine_arch_typeWhy do we need this new define?
arch_idin 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().
RFC PATCH 8/15 ARM: uncompress: Rename misc.c to print.c
In reply to Zoltan DevaiNow that misc.c only holds functions related to printout during decompression, rename it accordingly.
--- 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
arch/arm/boot/compressed/Makefile +1 -1
@@ -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)
arch/arm/boot/compressed/misc.c deleted +0 -122
122 lines not on this page · raw message
arch/arm/boot/compressed/print.c new file +122 -0
122 lines not on this page · raw message
Signature · 1 line
1.7.4.1
RFC PATCH 8/15 ARM: uncompress: Rename misc.c to print.c
Quoted 8 lines · Zoltan Devai
Now that
misc.conly holds functions related to printout during decompression, rename it accordingly.Signed-off-by Zoltan Devai <[email protected]>--- 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.
Quoted 24 lines
3 files changed, 123 insertions(+), 123 deletions(-) delete mode 100644 arch/arm/boot/compressed/misc.c create mode 100644 arch/arm/boot/compressed/print.carch/arm/boot/compressed/Makefile +1
-1@@ -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)arch/arm/boot/compressed/print.c new file +0
-0
arch/arm/boot/compressed/print.c line 2
Quoted 2 lines
arch/arm/boot/compressed/print.c new file +2
-0@@ -0,0 +1,122 @@ +/* +* misc.c
This is wrong.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
RFC PATCH 9/15 ARM: uncompress: Introduce ucuart as low-level serial port driver
In reply to Zoltan DevaiThis 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.
--- arch/arm/boot/compressed/print.c | 128 +++++++++++++++++++++++++++++++++++-- 1 files changed, 121 insertions(+), 7 deletions(-)
arch/arm/boot/compressed/print.c +121 -7
@@ -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 */
Signature · 1 line
1.7.4.1
RFC PATCH 9/15 ARM: uncompress: Introduce ucuart as low-level serial port driver
arch/arm/boot/compressed/print.c void error(char *x); · line 43
Quoted 11 lines · Zoltan Devai
arch/arm/boot/compressed/print.c +11
-0+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.
arch/arm/boot/compressed/print.c void error(char *x); · line 49
Quoted 6 lines
arch/arm/boot/compressed/print.c +6
-0+}; + +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.
Quoted 1 line
+#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.
RFC PATCH 10/15 ARM: uncompress.h: Convert machines to use the new ucuart driver
In reply to Zoltan DevaiFinally 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.
--- 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 +------------- arch/arm/mach-footbridge/include/mach/uncompress.h | 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(-)
arch/arm/mach-at91/include/mach/uncompress.h +6 -18
@@ -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 */
arch/arm/mach-bcmring/include/mach/uncompress.h +7 -22
@@ -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 )); }
arch/arm/mach-clps711x/include/mach/uncompress.h +5 -19
@@ -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 ); }
arch/arm/mach-cns3xxx/include/mach/uncompress.h +3 -32
@@ -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 ); }
arch/arm/mach-davinci/include/mach/uncompress.h +4 -20
@@ -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)
arch/arm/mach-dove/include/mach/uncompress.h +3 -18
@@ -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 ); }
arch/arm/mach-ebsa110/include/mach/uncompress.h +3 -27
@@ -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 ); }
arch/arm/mach-ep93xx/include/mach/uncompress.h +4 -44
67 lines not on this page · raw message
arch/arm/mach-footbridge/include/mach/uncompress.h +8 -12
@@ -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 ); }
arch/arm/mach-gemini/include/mach/uncompress.h +3 -15
@@ -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 */
arch/arm/mach-h720x/include/mach/uncompress.h +6 -15
@@ -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
arch/arm/mach-integrator/include/mach/uncompress.h +3 -21
@@ -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 ); }
arch/arm/mach-iop13xx/include/mach/uncompress.h +3 -12
@@ -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 ); }
arch/arm/mach-iop32x/include/mach/uncompress.h +5 -25
@@ -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)
arch/arm/mach-iop33x/include/mach/uncompress.h +4 -22
@@ -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)
arch/arm/mach-ixp2000/include/mach/uncompress.h +3 -25
@@ -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 ); }
arch/arm/mach-ixp23xx/include/mach/uncompress.h +3 -16
@@ -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
arch/arm/mach-ixp4xx/include/mach/uncompress.h +4 -27
@@ -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
arch/arm/mach-kirkwood/include/mach/uncompress.h +3 -29
@@ -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 ); }
arch/arm/mach-ks8695/include/mach/uncompress.h +5 -11
@@ -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
arch/arm/mach-lpc32xx/include/mach/uncompress.h +3 -28
@@ -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
arch/arm/mach-mmp/include/mach/uncompress.h +3 -27
@@ -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 ); }
arch/arm/mach-msm/include/mach/uncompress.h +7 -10
@@ -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
arch/arm/mach-mv78xx0/include/mach/uncompress.h +3 -27
@@ -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 ); }
arch/arm/mach-mxs/include/mach/uncompress.h +3 -39
61 lines not on this page · raw message
arch/arm/mach-netx/include/mach/uncompress.h +4 -38
53 lines not on this page · raw message
arch/arm/mach-nomadik/include/mach/uncompress.h +3 -29
@@ -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 */
arch/arm/mach-orion5x/include/mach/uncompress.h +3 -29
@@ -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 ); }
arch/arm/mach-pnx4008/include/mach/uncompress.h +3 -15
@@ -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 ); }
arch/arm/mach-prima2/include/mach/uncompress.h +5 -17
@@ -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 -
arch/arm/mach-pxa/include/mach/uncompress.h +16 -53
77 lines not on this page · raw message
arch/arm/mach-realview/include/mach/uncompress.h +11 -36
65 lines not on this page · raw message
arch/arm/mach-sa1100/include/mach/uncompress.h +20 -21
51 lines not on this page · raw message
arch/arm/mach-shark/include/mach/uncompress.h +3 -33
@@ -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
arch/arm/mach-tegra/include/mach/uncompress.h +8 -26
@@ -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
arch/arm/mach-u300/include/mach/uncompress.h +3 -18
@@ -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 ); }
arch/arm/mach-ux500/include/mach/uncompress.h +2 -29
@@ -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 */
arch/arm/mach-versatile/include/mach/uncompress.h +3 -18
@@ -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 ); }
arch/arm/mach-vexpress/include/mach/uncompress.h +3 -24
@@ -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 ); }
arch/arm/mach-vt8500/include/mach/uncompress.h +3 -12
@@ -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 ); }
arch/arm/mach-w90x900/include/mach/uncompress.h +2 -19
@@ -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 */
arch/arm/mach-zynq/include/mach/uncompress.h +5 -20
@@ -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
arch/arm/plat-mxc/include/mach/uncompress.h +9 -25
@@ -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__ */
arch/arm/plat-omap/include/plat/uncompress.h +11 -32
76 lines not on this page · raw message
arch/arm/plat-spear/include/plat/uncompress.h +3 -16
@@ -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 */
arch/arm/plat-tcc/include/mach/uncompress.h +3 -18
@@ -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 ); }
Signature · 1 line
1.7.4.1
RFC PATCH 11/15 ARM: uncompress: Call arch_decomp_setup by default
In reply to Zoltan DevaiNow that the initialization of the ucuart uses arch_decomp_setup, almost all machines use it, so make this the default behaviour.
--- 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(-)
arch/arm/boot/compressed/print.c +0 -8
@@ -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 */
arch/arm/mach-mmp/include/mach/uncompress.h +0 -2
@@ -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 ())
arch/arm/mach-picoxcell/include/mach/uncompress.h +1 -0
@@ -17,3 +17,4 @@*/ #define putc (c)#define flush () +#define arch_decomp_setup ()
arch/arm/mach-rpc/include/mach/uncompress.h +0 -2
@@ -109,8 +109,6 @@ static inline void flush(void) { } -#define ARCH_HAVE_DECOMP_SETUP -/* * Setup for decompression */
arch/arm/mach-s5p64x0/include/mach/uncompress.h +0 -2
@@ -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 ) {/*
arch/arm/mach-shmobile/include/mach/uncompress.h +2 -0
@@ -12,4 +12,6 @@ static inline void flush(void) { } +#define arch_decomp_setup () +#endif /* __ASM_MACH_UNCOMPRESS_H */
arch/arm/mach-ux500/include/mach/uncompress.h +0 -2
@@ -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 */
arch/arm/plat-samsung/include/plat/uncompress.h +0 -2
@@ -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 ) {
Signature · 1 line
1.7.4.1
RFC PATCH 12/15 ARM: uncompress.h: make the ucuart driver the default implementation
In reply to Zoltan DevaiAs 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.
--- 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 -- arch/arm/mach-footbridge/include/mach/uncompress.h | 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(-)
arch/arm/boot/compressed/print.c +1 -1
@@ -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>
arch/arm/mach-at91/include/mach/uncompress.h +3 -6
@@ -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
arch/arm/mach-bcmring/include/mach/uncompress.h +0 -1
@@ -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,
arch/arm/mach-clps711x/include/mach/uncompress.h +0 -2
@@ -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,
arch/arm/mach-cns3xxx/include/mach/uncompress.h +0 -2
@@ -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 ())
arch/arm/mach-davinci/include/mach/uncompress.h +0 -2
@@ -24,8 +24,6 @@#include <mach/serial.h> -#define ARCH_HAVE_UCUART_GENERIC -static inline void set_uart_info (u32 phys,void *__iomem virt) {/*
arch/arm/mach-dove/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-ebsa110/include/mach/uncompress.h +0 -1
@@ -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 ) {
arch/arm/mach-ep93xx/include/mach/uncompress.h +0 -2
@@ -43,8 +43,6 @@ static void ethernet_reset(void) ; } -#define ARCH_HAVE_UCUART_GENERIC -static inline void arch_decomp_setup (void ) {ethernet_reset ();
arch/arm/mach-footbridge/include/mach/uncompress.h +0 -2
@@ -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 ())
arch/arm/mach-gemini/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-h720x/include/mach/uncompress.h +0 -2
@@ -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 */
arch/arm/mach-integrator/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-iop13xx/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-iop32x/include/mach/uncompress.h +0 -2
@@ -3,8 +3,6 @@*/ #include <mach/hardware.h> -#define ARCH_HAVE_UCUART_GENERIC -static inline void arch_decomp_setup (void ) {if (machine_is_iq80321 ())
arch/arm/mach-iop33x/include/mach/uncompress.h +0 -2
@@ -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 ())
arch/arm/mach-ixp2000/include/mach/uncompress.h +0 -3
@@ -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 );
arch/arm/mach-ixp23xx/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-ixp4xx/include/mach/uncompress.h +0 -2
@@ -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 ) {/*
arch/arm/mach-kirkwood/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-ks8695/include/mach/uncompress.h +0 -2
@@ -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,
arch/arm/mach-lpc32xx/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-msm/include/mach/uncompress.h +0 -2
@@ -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 )
arch/arm/mach-mv78xx0/include/mach/uncompress.h +0 -4
@@ -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 );
arch/arm/mach-netx/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-nomadik/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-orion5x/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-picoxcell/include/mach/uncompress.h +1 -0
@@ -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 ()
arch/arm/mach-pnx4008/include/mach/uncompress.h +0 -1
@@ -20,7 +20,6 @@*/ #define UART5_BASE 0x40090000 -#define ARCH_HAVE_UCUART_GENERIC static inline void arch_decomp_setup (void ) {
arch/arm/mach-prima2/include/mach/uncompress.h +0 -2
@@ -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,
arch/arm/mach-pxa/include/mach/uncompress.h +0 -2
@@ -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;
arch/arm/mach-realview/include/mach/uncompress.h +0 -1
@@ -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;
arch/arm/mach-rpc/include/mach/uncompress.h +3 -1
@@ -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>
arch/arm/mach-s3c2410/include/mach/uncompress.h +2 -0
@@ -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>
arch/arm/mach-s5p64x0/include/mach/uncompress.h +2 -0
@@ -13,6 +13,8 @@#ifndef __ASM_ARCH_UNCOMPRESS_H#define __ASM_ARCH_UNCOMPRESS_H +#define ARCH_UCUART_NONGENERIC +#include <mach/map.h> /*
arch/arm/mach-s5pc100/include/mach/uncompress.h +2 -0
@@ -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>
arch/arm/mach-s5pv210/include/mach/uncompress.h +1 -0
@@ -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>
arch/arm/mach-sa1100/include/mach/uncompress.h +0 -8
@@ -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 )
arch/arm/mach-shark/include/mach/uncompress.h +0 -3
@@ -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 );
arch/arm/mach-shmobile/include/mach/uncompress.h +2 -0
@@ -1,6 +1,8 @@#ifndef __ASM_MACH_UNCOMPRESS_H#define __ASM_MACH_UNCOMPRESS_H +#define ARCH_UCUART_NONGENERIC +/* * This does not append a newline */
arch/arm/mach-tegra/include/mach/uncompress.h +0 -2
@@ -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 ;
arch/arm/mach-u300/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-versatile/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-vexpress/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-vt8500/include/mach/uncompress.h +0 -2
@@ -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 );
arch/arm/mach-zynq/include/mach/uncompress.h +0 -2
@@ -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,
arch/arm/plat-samsung/include/plat/uncompress.h +2 -0
@@ -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 */
arch/arm/plat-spear/include/plat/uncompress.h +0 -2
@@ -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 );
arch/arm/plat-tcc/include/mach/uncompress.h +0 -2
@@ -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 );
Signature · 1 line
1.7.4.1
RFC PATCH 13/15 ARM: uncompress.h: Cleanup header guards and banners
In reply to Zoltan DevaiBring 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
--- 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 +-------- arch/arm/mach-footbridge/include/mach/uncompress.h | 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(-)
arch/arm/mach-at91/include/mach/uncompress.h +2 -29
@@ -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
arch/arm/mach-bcmring/include/mach/uncompress.h +5 -13
@@ -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
arch/arm/mach-clps711x/include/mach/uncompress.h +2 -16
@@ -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>
arch/arm/mach-cns3xxx/include/mach/uncompress.h +2 -6
@@ -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>
arch/arm/mach-dove/include/mach/uncompress.h +0 -3
@@ -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 )
arch/arm/mach-ebsa110/include/mach/uncompress.h +0 -5
@@ -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 );
arch/arm/mach-exynos4/include/mach/uncompress.h +2 -13
@@ -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 */
arch/arm/mach-footbridge/include/mach/uncompress.h +2 -6
@@ -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 0x7c0003f8static inline void arch_decomp_setup (void ) {
arch/arm/mach-gemini/include/mach/uncompress.h +2 -14
@@ -1,23 +1,11 @@/* -* Copyright (C) 2008-2009 Paulius Zaleckas <[email protected]> -* -* 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 */
arch/arm/mach-h720x/include/mach/uncompress.h +3 -9
@@ -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
arch/arm/mach-integrator/include/mach/uncompress.h +2 -16
@@ -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 ) {
arch/arm/mach-iop13xx/include/mach/uncompress.h +5 -0
@@ -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 )
arch/arm/mach-iop32x/include/mach/uncompress.h +3 -1
@@ -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>
arch/arm/mach-iop33x/include/mach/uncompress.h +3 -2
@@ -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>
arch/arm/mach-ixp2000/include/mach/uncompress.h +3 -13
@@ -1,17 +1,7 @@/* -* arch/arm/mach-ixp2000/include/mach/uncompress.h -* -* -* Original Author: Naeem Afzal <[email protected]> -* Maintainer: Deepak Saxena <[email protected]> -* -* 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 ) {
arch/arm/mach-ixp23xx/include/mach/uncompress.h +0 -10
@@ -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
arch/arm/mach-ixp4xx/include/mach/uncompress.h +0 -12
@@ -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
arch/arm/mach-kirkwood/include/mach/uncompress.h +0 -2
@@ -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.
arch/arm/mach-ks8695/include/mach/uncompress.h +0 -13
@@ -1,19 +1,8 @@/* -* arch/arm/mach-ks8695/include/mach/uncompress.h -* -* Copyright (C) 2006 Ben Dooks <[email protected]> -* 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
arch/arm/mach-lpc32xx/include/mach/uncompress.h +2 -20
@@ -1,29 +1,11 @@/* -* arch/arm/mach-lpc32xx/include/mach/uncompress.h -* -* Author: Kevin Wells <[email protected]> -* -* 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
arch/arm/mach-mmp/include/mach/uncompress.h +0 -2
@@ -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.
arch/arm/mach-msm/include/mach/uncompress.h +8 -20
@@ -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
arch/arm/mach-mv78xx0/include/mach/uncompress.h +0 -2
@@ -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.
arch/arm/mach-mxs/include/mach/uncompress.h +2 -19
@@ -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__ */
arch/arm/mach-netx/include/mach/uncompress.h +2 -23
@@ -1,29 +1,8 @@/* -* arch/arm/mach-netx/include/mach/uncompress.h -* -* Copyright (C) 2005 Sascha Hauer <[email protected]>, 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
arch/arm/mach-nomadik/include/mach/uncompress.h +2 -20
@@ -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 */
arch/arm/mach-omap1/include/mach/uncompress.h +0 -4
@@ -1,5 +1 @@ -/* -* arch/arm/mach-omap1/include/mach/uncompress.h -*/ -#include <plat/uncompress.h>
arch/arm/mach-omap2/include/mach/uncompress.h +0 -4
@@ -1,5 +1 @@ -/* -* arch/arm/mach-omap2/include/mach/uncompress.h -*/ -#include <plat/uncompress.h>
arch/arm/mach-orion5x/include/mach/uncompress.h +3 -7
@@ -1,11 +1,7 @@/* -* arch/arm/mach-orion5x/include/mach/uncompress.h -* -* Tzachi Perelstein <[email protected]> -* -* 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>
arch/arm/mach-picoxcell/include/mach/uncompress.h +2 -14
@@ -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)
arch/arm/mach-pnx4008/include/mach/uncompress.h +2 -18
@@ -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 0x40090000static inline void arch_decomp_setup (void )
arch/arm/mach-prima2/include/mach/uncompress.h +3 -10
@@ -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
arch/arm/mach-pxa/include/mach/uncompress.h +0 -5
@@ -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.
arch/arm/mach-realview/include/mach/uncompress.h +2 -16
@@ -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>
arch/arm/mach-s3c64xx/include/mach/uncompress.h +2 -16
@@ -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 <[email protected]> -* -* 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 */
arch/arm/mach-s5p64x0/include/mach/uncompress.h +0 -6
@@ -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 */
arch/arm/mach-s5pc100/include/mach/uncompress.h +0 -6
@@ -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 */
arch/arm/mach-s5pv210/include/mach/uncompress.h +2 -14
@@ -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 */
arch/arm/mach-sa1100/include/mach/uncompress.h +3 -6
@@ -1,11 +1,8 @@/* -* arch/arm/mach-sa1100/include/mach/uncompress.h -* -* (C) 1999 Nicolas Pitre <[email protected]> -* -* 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)
arch/arm/mach-shark/include/mach/uncompress.h +3 -6
@@ -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 ) {
arch/arm/mach-shmobile/include/mach/uncompress.h +5 -8
@@ -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 */
arch/arm/mach-spear3xx/include/mach/uncompress.h +0 -18
@@ -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<[email protected]> -* -* 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 */
arch/arm/mach-spear6xx/include/mach/uncompress.h +0 -18
@@ -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<[email protected]> -* -* 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 */
arch/arm/mach-tegra/include/mach/uncompress.h +3 -23
@@ -1,26 +1,8 @@/* -* arch/arm/mach-tegra/include/mach/uncompress.h -* -* Copyright (C) 2010 Google, Inc. -* -* Author: -* Colin Cross <[email protected]> -* Erik Gilling <[email protected]> -* -* 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
arch/arm/mach-u300/include/mach/uncompress.h +2 -16
@@ -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 ) {
arch/arm/mach-ux500/include/mach/uncompress.h +2 -19
@@ -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 */
arch/arm/mach-versatile/include/mach/uncompress.h +2 -16
@@ -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 ) {
arch/arm/mach-vexpress/include/mach/uncompress.h +2 -16
@@ -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 ) {
arch/arm/mach-vt8500/include/mach/uncompress.h +4 -15
@@ -1,18 +1,7 @@ -/* arch/arm/mach-vt8500/include/mach/uncompress.h -* -* Copyright (C) 2010 Alexey Charkov <[email protected]> -* -* 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 ) {
arch/arm/mach-w90x900/include/mach/uncompress.h +2 -18
@@ -1,27 +1,11 @@/* -* arch/arm/mach-w90x900/include/mach/uncompress.h -* -* Copyright (c) 2008 Nuvoton technology corporation -* All rights reserved. -* -* Wan ZongShun <[email protected]> -* -* 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 */
arch/arm/mach-zynq/include/mach/uncompress.h +4 -18
@@ -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
arch/arm/plat-mxc/include/mach/uncompress.h +0 -5
@@ -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__ */
arch/arm/plat-spear/include/plat/uncompress.h +3 -15
@@ -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<[email protected]> -* -* 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 */
arch/arm/plat-tcc/include/mach/uncompress.h +3 -3
@@ -1,7 +1,7 @@/* -* Copyright (C) 2009 Hans J. Koch <[email protected]> -* -* 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>
Signature · 1 line
1.7.4.1
RFC PATCH 13/15 ARM: uncompress.h: Cleanup header guards and banners
Quoted 6 lines · Zoltan Devai
Bring some standard into the files:
-uncompress.hshould 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.
RFC PATCH 14/15 ARM: uncompress: Get decompress UART info from DT
In reply to Zoltan DevaiAllow 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.
--- 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(-)
arch/arm/Kconfig +9 -0
@@ -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
arch/arm/boot/compressed/Makefile +7 -0
@@ -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)
arch/arm/boot/compressed/head.S +8 -0
@@ -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.
arch/arm/boot/compressed/print.c +45 -0
54 lines not on this page · raw message
Signature · 1 line
1.7.4.1
RFC PATCH 14/15 ARM: uncompress: Get decompress UART info from DT
Quoted 6 lines · Zoltan Devai
Allow the static decompress UART setup in
uncompress.hfiles to be overridden with an ucuart description in DT.At a later stage, this may also allow to skip the inclusion of
uncompress.hfiles on arches which are DT-only, to get rid of these files completely.
This needs to be reviewed by DT people.
Tony Lindgren
maintainerRFC PATCH 14/15 ARM: uncompress: Get decompress UART info from DT
Quoted 9 lines · Russell King - ARM Linux
Quoted 6 lines · Zoltan Devai
Allow the static decompress UART setup in
uncompress.hfiles to be overridden with an ucuart description in DT.At a later stage, this may also allow to skip the inclusion of
uncompress.hfiles 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
RFC PATCH 15/15 ARM: uncompress: Add documentation
In reply to Zoltan DevaiShort 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.
--- arch/arm/boot/compressed/print.c | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-)
arch/arm/boot/compressed/print.c +26 -9
@@ -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 <[email protected]> 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>
Signature · 1 line
1.7.4.1