From: Stephen Rothwell Date: Wed, 30 Nov 2011 00:12:27 +0000 (+1100) Subject: Merge remote-tracking branch 'arm-soc/for-next' X-Git-Tag: next-20111130~89 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=01490d8fc0ee50bc9b4f5bd8d4db8b760a807c24;p=karo-tx-linux.git Merge remote-tracking branch 'arm-soc/for-next' Conflicts: arch/arm/mach-at91/at91cap9.c arch/arm/mach-at91/at91sam9260.c arch/arm/mach-at91/at91sam9261.c arch/arm/mach-at91/at91sam9263.c arch/arm/mach-at91/at91sam9g45.c arch/arm/mach-at91/at91sam9rl.c arch/arm/mach-at91/setup.c arch/arm/plat-omap/include/plat/common.h arch/arm/tools/mach-types --- 01490d8fc0ee50bc9b4f5bd8d4db8b760a807c24 diff --cc arch/arm/mach-at91/at91cap9.c index 29373397d2df,506a26c3fff6..edb879ac04c8 --- a/arch/arm/mach-at91/at91cap9.c +++ b/arch/arm/mach-at91/at91cap9.c @@@ -333,10 -328,16 +328,16 @@@ static void __init at91cap9_map_io(void at91_init_sram(0, AT91CAP9_SRAM_BASE, AT91CAP9_SRAM_SIZE); } + static void __init at91cap9_ioremap_registers(void) + { + at91_ioremap_shdwc(AT91CAP9_BASE_SHDWC); + at91sam926x_ioremap_pit(AT91CAP9_BASE_PIT); + at91sam9_ioremap_smc(0, AT91CAP9_BASE_SMC); + } + static void __init at91cap9_initialize(void) { - at91_arch_reset = at91cap9_reset; + arm_pm_restart = at91cap9_restart; - pm_power_off = at91cap9_poweroff; at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); /* Register GPIO subsystem */ diff --cc arch/arm/mach-at91/at91rm9200.c index 430a9fdc3dbf,9163d7d5f76e..99c3174e24a2 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@@ -307,9 -308,13 +308,13 @@@ static void __init at91rm9200_map_io(vo iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); } + static void __init at91rm9200_ioremap_registers(void) + { + } + static void __init at91rm9200_initialize(void) { - at91_arch_reset = at91rm9200_reset; + arm_pm_restart = at91rm9200_restart; at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) diff --cc arch/arm/mach-at91/at91sam9260.c index ec9e23dbce0f,3f6c6a12480d..50395cb0b1df --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c @@@ -325,10 -320,16 +320,16 @@@ static void __init at91sam9260_map_io(v } } + static void __init at91sam9260_ioremap_registers(void) + { + at91_ioremap_shdwc(AT91SAM9260_BASE_SHDWC); + at91sam926x_ioremap_pit(AT91SAM9260_BASE_PIT); + at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC); + } + static void __init at91sam9260_initialize(void) { - at91_arch_reset = at91sam9_alt_reset; + arm_pm_restart = at91sam9_alt_restart; - pm_power_off = at91sam9260_poweroff; at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) | (1 << AT91SAM9260_ID_IRQ2); diff --cc arch/arm/mach-at91/at91sam9261.c index 19ac7c0729a0,a0538c5c2520..b85b9ea60170 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c @@@ -285,10 -278,16 +278,16 @@@ static void __init at91sam9261_map_io(v at91_init_sram(0, AT91SAM9261_SRAM_BASE, AT91SAM9261_SRAM_SIZE); } + static void __init at91sam9261_ioremap_registers(void) + { + at91_ioremap_shdwc(AT91SAM9261_BASE_SHDWC); + at91sam926x_ioremap_pit(AT91SAM9261_BASE_PIT); + at91sam9_ioremap_smc(0, AT91SAM9261_BASE_SMC); + } + static void __init at91sam9261_initialize(void) { - at91_arch_reset = at91sam9_alt_reset; + arm_pm_restart = at91sam9_alt_restart; - pm_power_off = at91sam9261_poweroff; at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) | (1 << AT91SAM9261_ID_IRQ2); diff --cc arch/arm/mach-at91/at91sam9263.c index 50d016310031,5ffbbb024c1e..79e3669b1117 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c @@@ -303,10 -298,17 +298,17 @@@ static void __init at91sam9263_map_io(v at91_init_sram(1, AT91SAM9263_SRAM1_BASE, AT91SAM9263_SRAM1_SIZE); } + static void __init at91sam9263_ioremap_registers(void) + { + at91_ioremap_shdwc(AT91SAM9263_BASE_SHDWC); + at91sam926x_ioremap_pit(AT91SAM9263_BASE_PIT); + at91sam9_ioremap_smc(0, AT91SAM9263_BASE_SMC0); + at91sam9_ioremap_smc(1, AT91SAM9263_BASE_SMC1); + } + static void __init at91sam9263_initialize(void) { - at91_arch_reset = at91sam9_alt_reset; + arm_pm_restart = at91sam9_alt_restart; - pm_power_off = at91sam9263_poweroff; at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); /* Register GPIO subsystem */ diff --cc arch/arm/mach-at91/at91sam9g45.c index ff21f7a60c63,f61eb64e6b39..7032dd32cdf0 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c @@@ -338,10 -333,16 +333,16 @@@ static void __init at91sam9g45_map_io(v init_consistent_dma_size(SZ_4M); } + static void __init at91sam9g45_ioremap_registers(void) + { + at91_ioremap_shdwc(AT91SAM9G45_BASE_SHDWC); + at91sam926x_ioremap_pit(AT91SAM9G45_BASE_PIT); + at91sam9_ioremap_smc(0, AT91SAM9G45_BASE_SMC); + } + static void __init at91sam9g45_initialize(void) { - at91_arch_reset = at91sam9g45_reset; + arm_pm_restart = at91sam9g45_restart; - pm_power_off = at91sam9g45_poweroff; at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); /* Register GPIO subsystem */ diff --cc arch/arm/mach-at91/at91sam9rl.c index 61cbb46f5b0e,96247f68b9d2..d6bcb1da11df --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c @@@ -290,10 -283,16 +283,16 @@@ static void __init at91sam9rl_map_io(vo at91_init_sram(0, AT91SAM9RL_SRAM_BASE, sram_size); } + static void __init at91sam9rl_ioremap_registers(void) + { + at91_ioremap_shdwc(AT91SAM9RL_BASE_SHDWC); + at91sam926x_ioremap_pit(AT91SAM9RL_BASE_PIT); + at91sam9_ioremap_smc(0, AT91SAM9RL_BASE_SMC); + } + static void __init at91sam9rl_initialize(void) { - at91_arch_reset = at91sam9_alt_reset; + arm_pm_restart = at91sam9_alt_restart; - pm_power_off = at91sam9rl_poweroff; at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); /* Register GPIO subsystem */ diff --cc arch/arm/mach-at91/generic.h index 7f4503bc4cbb,40309588f360..4866b8180d66 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h @@@ -57,8 -58,11 +58,11 @@@ extern void at91_irq_suspend(void) extern void at91_irq_resume(void); /* reset */ -extern void at91sam9_alt_reset(void); +extern void at91sam9_alt_restart(char, const char *); + /* shutdown */ + extern void at91_ioremap_shdwc(u32 base_addr); + /* GPIO */ #define AT91RM9200_PQFP 3 /* AT91RM9200 PQFP package has 3 banks */ #define AT91RM9200_BGA 4 /* AT91RM9200 BGA package has 4 banks */ diff --cc arch/arm/mach-at91/setup.c index cf98a8f94dc5,242c26b2368d..8bdcc3cb6012 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@@ -73,9 -75,24 +75,6 @@@ static struct map_desc at91_io_desc __i .type = MT_DEVICE, }; - #define AT91_DBGU0 0xfffff200 - #define AT91_DBGU1 0xffffee00 -void __iomem *at91_ioremap(unsigned long p, size_t size, unsigned int type) -{ - if (p >= AT91_BASE_SYS && p <= (AT91_BASE_SYS + SZ_16K - 1)) - return (void __iomem *)AT91_IO_P2V(p); - - return __arm_ioremap_caller(p, size, type, __builtin_return_address(0)); -} -EXPORT_SYMBOL(at91_ioremap); - -void at91_iounmap(volatile void __iomem *addr) -{ - unsigned long virt = (unsigned long)addr; - - if (virt >= VMALLOC_START && virt < VMALLOC_END) - __iounmap(addr); -} -EXPORT_SYMBOL(at91_iounmap); -- static void __init soc_detect(u32 dbgu_base) { u32 cidr, socid; diff --cc arch/arm/plat-mxc/include/mach/system.h index b9c71b409095,b9895d250167..13ad0df2e860 --- a/arch/arm/plat-mxc/include/mach/system.h +++ b/arch/arm/plat-mxc/include/mach/system.h @@@ -17,14 -17,11 +17,9 @@@ #ifndef __ASM_ARCH_MXC_SYSTEM_H__ #define __ASM_ARCH_MXC_SYSTEM_H__ - extern void (*imx_idle)(void); - static inline void arch_idle(void) { - if (imx_idle != NULL) - (imx_idle)(); - else - cpu_do_idle(); + cpu_do_idle(); } -void arch_reset(char mode, const char *cmd); - #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */ diff --cc arch/arm/plat-omap/include/plat/common.h index 346098fb9219,3ff3e36580f2..20674bfa280f --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h @@@ -27,12 -27,97 +27,16 @@@ #ifndef __ARCH_ARM_MACH_OMAP_COMMON_H #define __ARCH_ARM_MACH_OMAP_COMMON_H -#include - #include + #include -struct sys_timer; - -extern void omap_map_common_io(void); -extern struct sys_timer omap1_timer; -extern struct sys_timer omap2_timer; -extern struct sys_timer omap3_timer; -extern struct sys_timer omap3_secure_timer; -extern struct sys_timer omap4_timer; -extern bool omap_32k_timer_init(void); extern int __init omap_init_clocksource_32k(void); extern unsigned long long notrace omap_32k_sched_clock(void); extern void omap_reserve(void); + -void omap2420_init_early(void); -void omap2430_init_early(void); -void omap3430_init_early(void); -void omap35xx_init_early(void); -void omap3630_init_early(void); -void omap3_init_early(void); /* Do not use this one */ -void am35xx_init_early(void); -void ti816x_init_early(void); -void omap4430_init_early(void); - + extern int omap_dss_reset(struct omap_hwmod *); + void omap_sram_init(void); -/* - * IO bases for various OMAP processors - * Except the tap base, rest all the io bases - * listed are physical addresses. - */ -struct omap_globals { - u32 class; /* OMAP class to detect */ - void __iomem *tap; /* Control module ID code */ - void __iomem *sdrc; /* SDRAM Controller */ - void __iomem *sms; /* SDRAM Memory Scheduler */ - void __iomem *ctrl; /* System Control Module */ - void __iomem *ctrl_pad; /* PAD Control Module */ - void __iomem *prm; /* Power and Reset Management */ - void __iomem *cm; /* Clock Management */ - void __iomem *cm2; -}; - -void omap2_set_globals_242x(void); -void omap2_set_globals_243x(void); -void omap2_set_globals_3xxx(void); -void omap2_set_globals_443x(void); -void omap2_set_globals_ti816x(void); - -/* These get called from omap2_set_globals_xxxx(), do not call these */ -void omap2_set_globals_tap(struct omap_globals *); -void omap2_set_globals_sdrc(struct omap_globals *); -void omap2_set_globals_control(struct omap_globals *); -void omap2_set_globals_prcm(struct omap_globals *); - -void omap242x_map_io(void); -void omap243x_map_io(void); -void omap3_map_io(void); -void omap4_map_io(void); - - -/** - * omap_test_timeout - busy-loop, testing a condition - * @cond: condition to test until it evaluates to true - * @timeout: maximum number of microseconds in the timeout - * @index: loop index (integer) - * - * Loop waiting for @cond to become true or until at least @timeout - * microseconds have passed. To use, define some integer @index in the - * calling code. After running, if @index == @timeout, then the loop has - * timed out. - */ -#define omap_test_timeout(cond, timeout, index) \ -({ \ - for (index = 0; index < timeout; index++) { \ - if (cond) \ - break; \ - udelay(1); \ - } \ -}) - -extern struct device *omap2_get_mpuss_device(void); -extern struct device *omap2_get_iva_device(void); -extern struct device *omap2_get_l3_device(void); -extern struct device *omap4_get_dsp_device(void); - #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */