From 6a6f1efaced2ca7f8cd581a220af428c6bfc909d Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 31 Oct 2011 14:34:31 +0000 Subject: ARM: restart: remove local_irq_disable() from within arch_reset() IRQs are already disabled by the time arch_reset() is called, so these calls to local_irq_disable() instead arch_reset() are redundant. Remove them. Acked-by: H Hartley Sweeten Acked-by: Nicolas Pitre Acked-by: Will Deacon Signed-off-by: Russell King --- arch/arm/mach-ep93xx/include/mach/system.h | 2 -- arch/arm/mach-iop32x/include/mach/system.h | 2 -- arch/arm/mach-ixp2000/include/mach/system.h | 2 -- arch/arm/mach-lpc32xx/include/mach/system.h | 3 --- arch/arm/mach-shark/core.c | 1 - arch/arm/mach-u300/include/mach/system.h | 2 -- 6 files changed, 12 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h index 6d661fe9d66c..bdf6c4f1feef 100644 --- a/arch/arm/mach-ep93xx/include/mach/system.h +++ b/arch/arm/mach-ep93xx/include/mach/system.h @@ -11,8 +11,6 @@ static inline void arch_idle(void) static inline void arch_reset(char mode, const char *cmd) { - local_irq_disable(); - /* * Set then clear the SWRST bit to initiate a software reset */ diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h index a4b808fe0d81..5987196b89c4 100644 --- a/arch/arm/mach-iop32x/include/mach/system.h +++ b/arch/arm/mach-iop32x/include/mach/system.h @@ -18,8 +18,6 @@ static inline void arch_idle(void) static inline void arch_reset(char mode, const char *cmd) { - local_irq_disable(); - if (machine_is_n2100()) { gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW); gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT); diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h index de370992c848..810df7b93982 100644 --- a/arch/arm/mach-ixp2000/include/mach/system.h +++ b/arch/arm/mach-ixp2000/include/mach/system.h @@ -19,8 +19,6 @@ static inline void arch_idle(void) static inline void arch_reset(char mode, const char *cmd) { - local_irq_disable(); - /* * Reset flash banking register so that we are pointing at * RedBoot bank. diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h index df3b0dea4d7b..d47f3b1c24b8 100644 --- a/arch/arm/mach-lpc32xx/include/mach/system.h +++ b/arch/arm/mach-lpc32xx/include/mach/system.h @@ -33,9 +33,6 @@ static inline void arch_reset(char mode, const char *cmd) case 'h': printk(KERN_CRIT "RESET: Rebooting system\n"); - /* Disable interrupts */ - local_irq_disable(); - lpc32xx_watchdog_reset(); break; diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index feda3ca7fc95..f4b25d875f3d 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c @@ -29,7 +29,6 @@ void arch_reset(char mode, const char *cmd) { short temp; - local_irq_disable(); /* Reset the Machine via pc[3] of the sequoia chipset */ outw(0x09,0x24); temp=inw(0x26); diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h index 8daf13634ce0..6b6fef7a438c 100644 --- a/arch/arm/mach-u300/include/mach/system.h +++ b/arch/arm/mach-u300/include/mach/system.h @@ -27,8 +27,6 @@ static void arch_reset(char mode, const char *cmd) case 's': case 'h': printk(KERN_CRIT "RESET: shutting down/rebooting system\n"); - /* Disable interrupts */ - local_irq_disable(); #ifdef CONFIG_COH901327_WATCHDOG coh901327_watchdog_reset(); #endif -- cgit v1.2.3 From 4e65331c6bb4a777bd61a4dac0daa9fc47777b63 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 10 Nov 2011 22:45:17 +0100 Subject: ARM: 7159/1: OMAP: Introduce local common.h files As suggested by Russell King - ARM Linux , there's no need to keep local prototypes in non-local headers. Add mach-omap1/common.h and mach-omap2/common.h and move the local prototypes there from plat/common.h and mach/omap4-common.h. Signed-off-by: Tony Lindgren Signed-off-by: Russell King --- arch/arm/mach-omap1/board-ams-delta.c | 2 +- arch/arm/mach-omap1/board-fsample.c | 2 +- arch/arm/mach-omap1/board-generic.c | 2 +- arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-htcherald.c | 2 +- arch/arm/mach-omap1/board-innovator.c | 2 +- arch/arm/mach-omap1/board-nokia770.c | 2 +- arch/arm/mach-omap1/board-osk.c | 2 +- arch/arm/mach-omap1/board-palmte.c | 2 +- arch/arm/mach-omap1/board-palmtt.c | 2 +- arch/arm/mach-omap1/board-palmz71.c | 2 +- arch/arm/mach-omap1/board-perseus2.c | 2 +- arch/arm/mach-omap1/board-sx1.c | 2 +- arch/arm/mach-omap1/board-voiceblue.c | 2 +- arch/arm/mach-omap1/common.h | 61 ++++++++ arch/arm/mach-omap1/devices.c | 2 +- arch/arm/mach-omap1/time.c | 2 +- arch/arm/mach-omap1/timer32k.c | 2 +- arch/arm/mach-omap2/board-2430sdp.c | 2 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-3630sdp.c | 2 +- arch/arm/mach-omap2/board-4430sdp.c | 3 +- arch/arm/mach-omap2/board-am3517crane.c | 2 +- arch/arm/mach-omap2/board-am3517evm.c | 2 +- arch/arm/mach-omap2/board-apollon.c | 2 +- arch/arm/mach-omap2/board-cm-t35.c | 2 +- arch/arm/mach-omap2/board-cm-t3517.c | 2 +- arch/arm/mach-omap2/board-devkit8000.c | 2 +- arch/arm/mach-omap2/board-generic.c | 3 +- arch/arm/mach-omap2/board-h4.c | 2 +- arch/arm/mach-omap2/board-igep0020.c | 2 +- arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-n8x0.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3evm.c | 2 +- arch/arm/mach-omap2/board-omap3logic.c | 2 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-omap3stalker.c | 2 +- arch/arm/mach-omap2/board-omap3touchbook.c | 2 +- arch/arm/mach-omap2/board-omap4panda.c | 3 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-rm680.c | 2 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/board-ti8168evm.c | 2 +- arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +- arch/arm/mach-omap2/board-zoom.c | 2 +- arch/arm/mach-omap2/cm2xxx_3xxx.c | 2 +- arch/arm/mach-omap2/cm44xx.c | 2 +- arch/arm/mach-omap2/cminst44xx.c | 2 +- arch/arm/mach-omap2/common.c | 2 +- arch/arm/mach-omap2/common.h | 185 ++++++++++++++++++++++++ arch/arm/mach-omap2/control.c | 2 +- arch/arm/mach-omap2/i2c.c | 2 +- arch/arm/mach-omap2/id.c | 2 +- arch/arm/mach-omap2/include/mach/omap4-common.h | 43 ------ arch/arm/mach-omap2/io.c | 4 +- arch/arm/mach-omap2/omap-hotplug.c | 3 +- arch/arm/mach-omap2/omap-smp.c | 3 +- arch/arm/mach-omap2/omap4-common.c | 3 +- arch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-omap2/pm.c | 2 +- arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + arch/arm/mach-omap2/pm44xx.c | 2 +- arch/arm/mach-omap2/prcm.c | 2 +- arch/arm/mach-omap2/prcm_mpu44xx.c | 2 +- arch/arm/mach-omap2/prm2xxx_3xxx.c | 2 +- arch/arm/mach-omap2/prm44xx.c | 2 +- arch/arm/mach-omap2/prminst44xx.c | 2 +- arch/arm/mach-omap2/sdram-nokia.c | 2 +- arch/arm/mach-omap2/sdrc.c | 2 +- arch/arm/mach-omap2/sdrc2xxx.c | 2 +- arch/arm/mach-omap2/serial.c | 2 +- arch/arm/mach-omap2/smartreflex.c | 2 +- arch/arm/mach-omap2/timer.c | 2 +- arch/arm/mach-omap2/vc3xxx_data.c | 2 +- arch/arm/mach-omap2/vc44xx_data.c | 2 +- arch/arm/mach-omap2/voltage.c | 2 +- arch/arm/mach-omap2/voltagedomains3xxx_data.c | 2 +- arch/arm/mach-omap2/voltagedomains44xx_data.c | 2 +- arch/arm/mach-omap2/vp.c | 2 +- arch/arm/mach-omap2/vp3xxx_data.c | 2 +- arch/arm/mach-omap2/vp44xx_data.c | 2 +- arch/arm/plat-omap/include/plat/common.h | 82 ----------- arch/arm/plat-omap/include/plat/io.h | 68 --------- arch/arm/plat-omap/include/plat/irqs.h | 10 -- 88 files changed, 332 insertions(+), 287 deletions(-) create mode 100644 arch/arm/mach-omap1/common.h create mode 100644 arch/arm/mach-omap2/common.h delete mode 100644 arch/arm/mach-omap2/include/mach/omap4-common.h (limited to 'arch/arm') diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 51bae31cf361..1b374009b1a3 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include "common.h" #include #include diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 23178275f96b..b9c4c0f933ee 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include "common.h" #include /* fsample is pretty close to p2-sample */ diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index dc5b75de531c..7f41d7a504a5 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include "common.h" /* assume no Mini-AB port */ diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index b334b1481678..7933b97698f8 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include "common.h" #include #include "board-h2.h" diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 74ebe72c9848..04be2f83ca09 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include "common.h" #include #include "board-h3.h" diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 3e91baab1a89..46fcfeb1f11e 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c @@ -41,7 +41,7 @@ #include #include -#include +#include "common.h" #include #include #include diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 273153dba15b..f99d11de1531 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include "common.h" #include /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 6798b8488315..c64342388ec3 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include "common.h" #include #include #include diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index c3859278d257..a409dfcc5b18 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -51,7 +51,7 @@ #include #include #include -#include +#include "common.h" /* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ #define OMAP_OSK_ETHR_START 0x04800300 diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index f9c44cb15b47..105292d39484 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include "common.h" #define PALMTE_USBDETECT_GPIO 0 #define PALMTE_USB_OR_DC_GPIO 1 diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index 11a98539f7bb..387a9006358d 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include "common.h" #include #include diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index 42061573e380..df6d15e68aad 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include "common.h" #include #include diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 203ae07550db..57ecd7e09831 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include "common.h" #include static const unsigned int p2_keymap[] = { diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 092a4c046407..774ae39fd636 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include "common.h" #include #include diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 61ed6cdab2bd..7721c146d8d6 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c @@ -34,7 +34,7 @@ #include #include -#include +#include "common.h" #include #include #include diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h new file mode 100644 index 000000000000..52c4eda97fa8 --- /dev/null +++ b/arch/arm/mach-omap1/common.h @@ -0,0 +1,61 @@ +/* + * + * Header for code common to all OMAP1 machines. + * + * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * 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., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __ARCH_ARM_MACH_OMAP1_COMMON_H +#define __ARCH_ARM_MACH_OMAP1_COMMON_H + +#include + +#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) +void omap7xx_map_io(void); +#else +static inline void omap7xx_map_io(void) +{ +} +#endif + +#ifdef CONFIG_ARCH_OMAP15XX +void omap15xx_map_io(void); +#else +static inline void omap15xx_map_io(void) +{ +} +#endif + +#ifdef CONFIG_ARCH_OMAP16XX +void omap16xx_map_io(void); +#else +static inline void omap16xx_map_io(void) +{ +} +#endif + +void omap1_init_early(void); +void omap1_init_irq(void); + +extern struct sys_timer omap1_timer; +extern bool omap_32k_timer_init(void); + +#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 48ef9888e820..9d47ca7f80fa 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c @@ -22,7 +22,7 @@ #include #include -#include +#include "common.h" #include #include #include diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index a1837771e031..485a21d31004 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c @@ -54,7 +54,7 @@ #include #include -#include +#include "common.h" #ifdef CONFIG_OMAP_MPU_TIMER diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index 96604a50c4fe..9a54ef4dcf5e 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include "common.h" #include /* diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index d704f0ac328d..a17a6c49e18d 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c @@ -34,7 +34,7 @@ #include #include -#include +#include "common.h" #include #include #include diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 77142c13fa13..670919c04851 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include "common.h" #include #include #include