diff options
110 files changed, 773 insertions, 1212 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2c3bdce1513..eaae82a182e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1596,6 +1596,7 @@ config HAVE_ARM_ARCH_TIMER  config HAVE_ARM_TWD  	bool  	depends on SMP +	select CLKSRC_OF if OF  	help  	  This options enables support for the ARM timer and watchdog unit diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index 1ea959019fc..047f2a41530 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig @@ -20,7 +20,7 @@ CONFIG_SOC_AT91SAM9263=y  CONFIG_SOC_AT91SAM9G45=y  CONFIG_SOC_AT91SAM9X5=y  CONFIG_SOC_AT91SAM9N12=y -CONFIG_MACH_AT91SAM_DT=y +CONFIG_MACH_AT91SAM9_DT=y  CONFIG_AT91_PROGRAMMABLE_CLOCKS=y  CONFIG_AT91_TIMER_HZ=128  CONFIG_AEABI=y diff --git a/arch/arm/configs/at91sam9260_defconfig b/arch/arm/configs/at91sam9260_defconfig index 0ea5d2c97fc..05618eb694f 100644 --- a/arch/arm/configs/at91sam9260_defconfig +++ b/arch/arm/configs/at91sam9260_defconfig @@ -22,7 +22,7 @@ CONFIG_MACH_QIL_A9260=y  CONFIG_MACH_CPU9260=y  CONFIG_MACH_FLEXIBITY=y  CONFIG_MACH_SNAPPER_9260=y -CONFIG_MACH_AT91SAM_DT=y +CONFIG_MACH_AT91SAM9_DT=y  CONFIG_AT91_PROGRAMMABLE_CLOCKS=y  # CONFIG_ARM_THUMB is not set  CONFIG_ZBOOT_ROM_TEXT=0x0 diff --git a/arch/arm/configs/at91sam9g20_defconfig b/arch/arm/configs/at91sam9g20_defconfig index 3b1881033ad..892e8287ed7 100644 --- a/arch/arm/configs/at91sam9g20_defconfig +++ b/arch/arm/configs/at91sam9g20_defconfig @@ -22,7 +22,7 @@ CONFIG_MACH_PCONTROL_G20=y  CONFIG_MACH_GSIA18S=y  CONFIG_MACH_USB_A9G20=y  CONFIG_MACH_SNAPPER_9260=y -CONFIG_MACH_AT91SAM_DT=y +CONFIG_MACH_AT91SAM9_DT=y  CONFIG_AT91_PROGRAMMABLE_CLOCKS=y  # CONFIG_ARM_THUMB is not set  CONFIG_AEABI=y diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig index 606d48f3b8f..5f551b76cb6 100644 --- a/arch/arm/configs/at91sam9g45_defconfig +++ b/arch/arm/configs/at91sam9g45_defconfig @@ -18,7 +18,7 @@ CONFIG_MODULE_UNLOAD=y  CONFIG_ARCH_AT91=y  CONFIG_ARCH_AT91SAM9G45=y  CONFIG_MACH_AT91SAM9M10G45EK=y -CONFIG_MACH_AT91SAM_DT=y +CONFIG_MACH_AT91SAM9_DT=y  CONFIG_AT91_PROGRAMMABLE_CLOCKS=y  CONFIG_AT91_SLOW_CLOCK=y  CONFIG_AEABI=y diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h index 35c21c375d8..53c15dec7af 100644 --- a/arch/arm/include/asm/irq.h +++ b/arch/arm/include/asm/irq.h @@ -30,6 +30,11 @@ extern void asm_do_IRQ(unsigned int, struct pt_regs *);  void handle_IRQ(unsigned int, struct pt_regs *);  void init_IRQ(void); +#ifdef CONFIG_MULTI_IRQ_HANDLER +extern void (*handle_arch_irq)(struct pt_regs *); +extern void set_handle_irq(void (*handle_irq)(struct pt_regs *)); +#endif +  #endif  #endif diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h index 18c88302333..2092ee1e130 100644 --- a/arch/arm/include/asm/mach/irq.h +++ b/arch/arm/include/asm/mach/irq.h @@ -20,11 +20,6 @@ struct seq_file;  extern void init_FIQ(int);  extern int show_fiq_list(struct seq_file *, int); -#ifdef CONFIG_MULTI_IRQ_HANDLER -extern void (*handle_arch_irq)(struct pt_regs *); -extern void set_handle_irq(void (*handle_irq)(struct pt_regs *)); -#endif -  /*   * This is for easy migration, but should be changed in the source   */ @@ -35,35 +30,4 @@ do {							\  	raw_spin_unlock(&desc->lock);			\  } while(0) -#ifndef __ASSEMBLY__ -/* - * Entry/exit functions for chained handlers where the primary IRQ chip - * may implement either fasteoi or level-trigger flow control. - */ -static inline void chained_irq_enter(struct irq_chip *chip, -				     struct irq_desc *desc) -{ -	/* FastEOI controllers require no action on entry. */ -	if (chip->irq_eoi) -		return; - -	if (chip->irq_mask_ack) { -		chip->irq_mask_ack(&desc->irq_data); -	} else { -		chip->irq_mask(&desc->irq_data); -		if (chip->irq_ack) -			chip->irq_ack(&desc->irq_data); -	} -} - -static inline void chained_irq_exit(struct irq_chip *chip, -				    struct irq_desc *desc) -{ -	if (chip->irq_eoi) -		chip->irq_eoi(&desc->irq_data); -	else -		chip->irq_unmask(&desc->irq_data); -} -#endif -  #endif diff --git a/arch/arm/include/asm/smp_twd.h b/arch/arm/include/asm/smp_twd.h index 0f01f4677bd..7b2899c2f7f 100644 --- a/arch/arm/include/asm/smp_twd.h +++ b/arch/arm/include/asm/smp_twd.h @@ -34,12 +34,4 @@ struct twd_local_timer name __initdata = {	\  int twd_local_timer_register(struct twd_local_timer *); -#ifdef CONFIG_HAVE_ARM_TWD -void twd_local_timer_of_register(void); -#else -static inline void twd_local_timer_of_register(void) -{ -} -#endif -  #endif diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 8e4ef4c83a7..9723d17b8f3 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -26,6 +26,7 @@  #include <linux/ioport.h>  #include <linux/interrupt.h>  #include <linux/irq.h> +#include <linux/irqchip.h>  #include <linux/random.h>  #include <linux/smp.h>  #include <linux/init.h> @@ -114,7 +115,10 @@ EXPORT_SYMBOL_GPL(set_irq_flags);  void __init init_IRQ(void)  { -	machine_desc->init_irq(); +	if (IS_ENABLED(CONFIG_OF) && !machine_desc->init_irq) +		irqchip_init(); +	else +		machine_desc->init_irq();  }  #ifdef CONFIG_MULTI_IRQ_HANDLER diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 3f256503748..90525d9d290 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -362,25 +362,13 @@ int __init twd_local_timer_register(struct twd_local_timer *tlt)  }  #ifdef CONFIG_OF -const static struct of_device_id twd_of_match[] __initconst = { -	{ .compatible = "arm,cortex-a9-twd-timer",	}, -	{ .compatible = "arm,cortex-a5-twd-timer",	}, -	{ .compatible = "arm,arm11mp-twd-timer",	}, -	{ }, -}; - -void __init twd_local_timer_of_register(void) +static void __init twd_local_timer_of_register(struct device_node *np)  { -	struct device_node *np;  	int err;  	if (!is_smp() || !setup_max_cpus)  		return; -	np = of_find_matching_node(NULL, twd_of_match); -	if (!np) -		return; -  	twd_ppi = irq_of_parse_and_map(np, 0);  	if (!twd_ppi) {  		err = -EINVAL; @@ -398,4 +386,7 @@ void __init twd_local_timer_of_register(void)  out:  	WARN(err, "twd_local_timer_of_register failed (%d)\n", err);  } +CLOCKSOURCE_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register); +CLOCKSOURCE_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register); +CLOCKSOURCE_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register);  #endif diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 6071f4c3d65..440682b708f 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -1,8 +1,5 @@  if ARCH_AT91 -config HAVE_AT91_DATAFLASH_CARD -	bool -  config HAVE_AT91_DBGU0  	bool @@ -93,394 +90,13 @@ config SOC_AT91SAM9N12  	help  	  Select this if you are using Atmel's AT91SAM9N12 SoC. -choice -	prompt "Atmel AT91 Processor Devices for non DT boards" - -config ARCH_AT91_NONE -	bool "None" - -config ARCH_AT91RM9200 -	bool "AT91RM9200" -	select SOC_AT91RM9200 - -config ARCH_AT91SAM9260 -	bool "AT91SAM9260 or AT91SAM9XE" -	select SOC_AT91SAM9260 - -config ARCH_AT91SAM9261 -	bool "AT91SAM9261" -	select SOC_AT91SAM9261 - -config ARCH_AT91SAM9G10 -	bool "AT91SAM9G10" -	select SOC_AT91SAM9261 - -config ARCH_AT91SAM9263 -	bool "AT91SAM9263" -	select SOC_AT91SAM9263 - -config ARCH_AT91SAM9RL -	bool "AT91SAM9RL" -	select SOC_AT91SAM9RL - -config ARCH_AT91SAM9G20 -	bool "AT91SAM9G20" -	select SOC_AT91SAM9260 - -config ARCH_AT91SAM9G45 -	bool "AT91SAM9G45" -	select SOC_AT91SAM9G45 - -config ARCH_AT91X40 -	bool "AT91x40" -	depends on !MMU -	select ARCH_USES_GETTIMEOFFSET -	select MULTI_IRQ_HANDLER -	select SPARSE_IRQ - -endchoice -  config AT91_PMC_UNIT  	bool  	default !ARCH_AT91X40  # ---------------------------------------------------------- -if ARCH_AT91RM9200 - -comment "AT91RM9200 Board Type" - -config MACH_ONEARM -	bool "Ajeco 1ARM Single Board Computer" -	help -	  Select this if you are using Ajeco's 1ARM Single Board Computer. -	  <http://www.ajeco.fi/> - -config ARCH_AT91RM9200DK -	bool "Atmel AT91RM9200-DK Development board" -	select HAVE_AT91_DATAFLASH_CARD -	help -	  Select this if you are using Atmel's AT91RM9200-DK Development board. -	  (Discontinued) - -config MACH_AT91RM9200EK -	bool "Atmel AT91RM9200-EK Evaluation Kit" -	select HAVE_AT91_DATAFLASH_CARD -	help -	  Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit. -	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3507> - -config MACH_CSB337 -	bool "Cogent CSB337" -	help -	  Select this if you are using Cogent's CSB337 board. -	  <http://www.cogcomp.com/csb_csb337.htm> - -config MACH_CSB637 -	bool "Cogent CSB637" -	help -	  Select this if you are using Cogent's CSB637 board. -	  <http://www.cogcomp.com/csb_csb637.htm> - -config MACH_CARMEVA -	bool "Conitec ARM&EVA" -	help -	  Select this if you are using Conitec's AT91RM9200-MCU-Module. -	  <http://www.conitec.net/english/linuxboard.php> - -config MACH_ATEB9200 -	bool "Embest ATEB9200" -	help -	  Select this if you are using Embest's ATEB9200 board. -	  <http://www.embedinfo.com/english/product/ATEB9200.asp> - -config MACH_KB9200 -	bool "KwikByte KB920x" -	help -	  Select this if you are using KwikByte's KB920x board. -	  <http://www.kwikbyte.com/KB9202.html> - -config MACH_PICOTUX2XX -	bool "picotux 200" -	help -	  Select this if you are using a picotux 200. -	  <http://www.picotux.com/> - -config MACH_KAFA -	bool "Sperry-Sun KAFA board" -	help -	  Select this if you are using Sperry-Sun's KAFA board. - -config MACH_ECBAT91 -	bool "emQbit ECB_AT91 SBC" -	select HAVE_AT91_DATAFLASH_CARD -	help -	  Select this if you are using emQbit's ECB_AT91 board. -	  <http://wiki.emqbit.com/free-ecb-at91> - -config MACH_YL9200 -	bool "ucDragon YL-9200" -	help -	  Select this if you are using the ucDragon YL-9200 board. - -config MACH_CPUAT91 -	bool "Eukrea CPUAT91" -	help -	  Select this if you are using the Eukrea Electromatique's -	  CPUAT91 board <http://www.eukrea.com/>. - -config MACH_ECO920 -	bool "eco920" -	help -	  Select this if you are using the eco920 board - -config MACH_RSI_EWS -	bool "RSI Embedded Webserver" -	depends on ARCH_AT91RM9200 -	help -	  Select this if you are using RSIs EWS board. -endif - -# ---------------------------------------------------------- - -if ARCH_AT91SAM9260 - -comment "AT91SAM9260 Variants" - -comment "AT91SAM9260 / AT91SAM9XE Board Type" - -config MACH_AT91SAM9260EK -	bool "Atmel AT91SAM9260-EK / AT91SAM9XE Evaluation Kit" -	select HAVE_AT91_DATAFLASH_CARD -	help -	  Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit -	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933> - -config MACH_CAM60 -	bool "KwikByte KB9260 (CAM60) board" -	help -	  Select this if you are using KwikByte's KB9260 (CAM60) board based on the Atmel AT91SAM9260. -	  <http://www.kwikbyte.com/KB9260.html> - -config MACH_SAM9_L9260 -	bool "Olimex SAM9-L9260 board" -	select HAVE_AT91_DATAFLASH_CARD -	help -	  Select this if you are using Olimex's SAM9-L9260 board based on the Atmel AT91SAM9260. -	  <http://www.olimex.com/dev/sam9-L9260.html> - -config MACH_AFEB9260 -	bool "Custom afeb9260 board v1" -	help -	  Select this if you are using custom afeb9260 board based on -	  open hardware design. Select this for revision 1 of the board. -	  <svn://194.85.238.22/home/users/george/svn/arm9eb> -	  <http://groups.google.com/group/arm9fpga-evolution-board> - -config MACH_USB_A9260 -	bool "CALAO USB-A9260" -	help -	  Select this if you are using a Calao Systems USB-A9260. -	  <http://www.calao-systems.com> - -config MACH_QIL_A9260 -	bool "CALAO QIL-A9260 board" -	help -	  Select this if you are using a Calao Systems QIL-A9260 Board. -	  <http://www.calao-systems.com> - -config MACH_CPU9260 -	bool "Eukrea CPU9260 board" -	help -	  Select this if you are using a Eukrea Electromatique's -	  CPU9260 Board <http://www.eukrea.com/> - -config MACH_FLEXIBITY -	bool "Flexibity Connect board" -	help -	  Select this if you are using Flexibity Connect board -	  <http://www.flexibity.com> - -endif - -# ---------------------------------------------------------- - -if ARCH_AT91SAM9261 - -comment "AT91SAM9261 Board Type" - -config MACH_AT91SAM9261EK -	bool "Atmel AT91SAM9261-EK Evaluation Kit" -	select HAVE_AT91_DATAFLASH_CARD -	help -	  Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit. -	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820> - -endif - -# ---------------------------------------------------------- - -if ARCH_AT91SAM9G10 - -comment "AT91SAM9G10 Board Type" - -config MACH_AT91SAM9G10EK -	bool "Atmel AT91SAM9G10-EK Evaluation Kit" -	select HAVE_AT91_DATAFLASH_CARD -	help -	  Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit. -	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588> - -endif - -# ---------------------------------------------------------- - -if ARCH_AT91SAM9263 - -comment "AT91SAM9263 Board Type" - -config MACH_AT91SAM9263EK -	bool "Atmel AT91SAM9263-EK Evaluation Kit" -	select HAVE_AT91_DATAFLASH_CARD -	help -	  Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit. -	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057> - -config MACH_USB_A9263 -	bool "CALAO USB-A9263" -	help -	  Select this if you are using a Calao Systems USB-A9263. -	  <http://www.calao-systems.com> - -endif - -# ---------------------------------------------------------- - -if ARCH_AT91SAM9RL - -comment "AT91SAM9RL Board Type" - -config MACH_AT91SAM9RLEK -	bool "Atmel AT91SAM9RL-EK Evaluation Kit" -	help -	  Select this if you are using Atmel's AT91SAM9RL-EK Evaluation Kit. - -endif - -# ---------------------------------------------------------- - -if ARCH_AT91SAM9G20 - -comment "AT91SAM9G20 Board Type" - -config MACH_AT91SAM9G20EK -	bool "Atmel AT91SAM9G20-EK Evaluation Kit" -	select HAVE_AT91_DATAFLASH_CARD -	help -	  Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit -	  that embeds only one SD/MMC slot. - -config MACH_AT91SAM9G20EK_2MMC -	depends on MACH_AT91SAM9G20EK -	bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots" -	help -	  Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit -	  with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and -	  onwards. -	  <http://www.atmel.com/tools/SAM9G20-EK.aspx> - -config MACH_CPU9G20 -	bool "Eukrea CPU9G20 board" -	help -	  Select this if you are using a Eukrea Electromatique's -	  CPU9G20 Board <http://www.eukrea.com/> - -config MACH_ACMENETUSFOXG20 -	bool "Acme Systems srl FOX Board G20" -	help -	  Select this if you are using Acme Systems -	  FOX Board G20 <http://www.acmesystems.it> - -config MACH_PORTUXG20 -	bool "taskit PortuxG20" -	help -	  Select this if you are using taskit's PortuxG20. -	  <http://www.taskit.de/en/> - -config MACH_STAMP9G20 -	bool "taskit Stamp9G20 CPU module" -	help -	  Select this if you are using taskit's Stamp9G20 CPU module on its -	  evaluation board. -	  <http://www.taskit.de/en/> - -config MACH_PCONTROL_G20 -	bool "PControl G20 CPU module" -	help -	  Select this if you are using taskit's Stamp9G20 CPU module on this -	  carrier board, beeing the decentralized unit of a building automation -	  system; featuring nvram, eth-switch, iso-rs485, display, io - -config MACH_GSIA18S -	bool "GS_IA18_S board" -	help -	  This enables support for the GS_IA18_S board -	  produced by GeoSIG Ltd company. This is an internet accelerograph. -	  <http://www.geosig.com> - -config MACH_USB_A9G20 -	bool "CALAO USB-A9G20" -	depends on ARCH_AT91SAM9G20 -	help -	  Select this if you are using a Calao Systems USB-A9G20. -	  <http://www.calao-systems.com> - -endif - -if (ARCH_AT91SAM9260 || ARCH_AT91SAM9G20) -comment "AT91SAM9260/AT91SAM9G20 boards" - -config MACH_SNAPPER_9260 -        bool "Bluewater Systems Snapper 9260/9G20 module" -        help -          Select this if you are using the Bluewater Systems Snapper 9260 or -          Snapper 9G20 modules. -          <http://www.bluewatersys.com/> -endif - -# ---------------------------------------------------------- - -if ARCH_AT91SAM9G45 - -comment "AT91SAM9G45 Board Type" - -config MACH_AT91SAM9M10G45EK -	bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" -	help -	  Select this if you are using Atmel's AT91SAM9M10G45-EK Evaluation Kit. -	  Those boards can be populated with any SoC of AT91SAM9G45 or AT91SAM9M10 -	  families: AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. -	  <http://www.atmel.com/tools/SAM9M10-G45-EK.aspx> - -endif - -# ---------------------------------------------------------- - -if ARCH_AT91X40 - -comment "AT91X40 Board Type" - -config MACH_AT91EB01 -	bool "Atmel AT91EB01 Evaluation Kit" -	help -	  Select this if you are using Atmel's AT91EB01 Evaluation Kit. -	  It is also a popular target for simulators such as GDB's -	  ARM simulator (commonly known as the ARMulator) and the -	  Skyeye simulator. - -endif - -# ---------------------------------------------------------- +source arch/arm/mach-at91/Kconfig.non_dt  comment "Generic Board Type" @@ -492,7 +108,7 @@ config MACH_AT91RM9200_DT  	  Select this if you want to experiment device-tree with  	  an Atmel RM9200 Evaluation Kit. -config MACH_AT91SAM_DT +config MACH_AT91SAM9_DT  	bool "Atmel AT91SAM Evaluation Kits with device-tree support"  	depends on SOC_AT91SAM9  	select USE_OF @@ -502,16 +118,6 @@ config MACH_AT91SAM_DT  # ---------------------------------------------------------- -comment "AT91 Board Options" - -config MTD_AT91_DATAFLASH_CARD -	bool "Enable DataFlash Card support" -	depends on HAVE_AT91_DATAFLASH_CARD -	help -	  Enable support for the DataFlash card. - -# ---------------------------------------------------------- -  comment "AT91 Feature Selections"  config AT91_PROGRAMMABLE_CLOCKS diff --git a/arch/arm/mach-at91/Kconfig.non_dt b/arch/arm/mach-at91/Kconfig.non_dt new file mode 100644 index 00000000000..6c24985515a --- /dev/null +++ b/arch/arm/mach-at91/Kconfig.non_dt @@ -0,0 +1,399 @@ +menu "Atmel Non-DT world" + +config HAVE_AT91_DATAFLASH_CARD +	bool + +choice +	prompt "Atmel AT91 Processor Devices for non DT boards" + +config ARCH_AT91_NONE +	bool "None" + +config ARCH_AT91RM9200 +	bool "AT91RM9200" +	select SOC_AT91RM9200 + +config ARCH_AT91SAM9260 +	bool "AT91SAM9260 or AT91SAM9XE" +	select SOC_AT91SAM9260 + +config ARCH_AT91SAM9261 +	bool "AT91SAM9261" +	select SOC_AT91SAM9261 + +config ARCH_AT91SAM9G10 +	bool "AT91SAM9G10" +	select SOC_AT91SAM9261 + +config ARCH_AT91SAM9263 +	bool "AT91SAM9263" +	select SOC_AT91SAM9263 + +config ARCH_AT91SAM9RL +	bool "AT91SAM9RL" +	select SOC_AT91SAM9RL + +config ARCH_AT91SAM9G20 +	bool "AT91SAM9G20" +	select SOC_AT91SAM9260 + +config ARCH_AT91SAM9G45 +	bool "AT91SAM9G45" +	select SOC_AT91SAM9G45 + +config ARCH_AT91X40 +	bool "AT91x40" +	depends on !MMU +	select ARCH_USES_GETTIMEOFFSET +	select MULTI_IRQ_HANDLER +	select SPARSE_IRQ + +endchoice + +# ---------------------------------------------------------- + +if ARCH_AT91RM9200 + +comment "AT91RM9200 Board Type" + +config MACH_ONEARM +	bool "Ajeco 1ARM Single Board Computer" +	help +	  Select this if you are using Ajeco's 1ARM Single Board Computer. +	  <http://www.ajeco.fi/> + +config ARCH_AT91RM9200DK +	bool "Atmel AT91RM9200-DK Development board" +	select HAVE_AT91_DATAFLASH_CARD +	help +	  Select this if you are using Atmel's AT91RM9200-DK Development board. +	  (Discontinued) + +config MACH_AT91RM9200EK +	bool "Atmel AT91RM9200-EK Evaluation Kit" +	select HAVE_AT91_DATAFLASH_CARD +	help +	  Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit. +	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3507> + +config MACH_CSB337 +	bool "Cogent CSB337" +	help +	  Select this if you are using Cogent's CSB337 board. +	  <http://www.cogcomp.com/csb_csb337.htm> + +config MACH_CSB637 +	bool "Cogent CSB637" +	help +	  Select this if you are using Cogent's CSB637 board. +	  <http://www.cogcomp.com/csb_csb637.htm> + +config MACH_CARMEVA +	bool "Conitec ARM&EVA" +	help +	  Select this if you are using Conitec's AT91RM9200-MCU-Module. +	  <http://www.conitec.net/english/linuxboard.php> + +config MACH_ATEB9200 +	bool "Embest ATEB9200" +	help +	  Select this if you are using Embest's ATEB9200 board. +	  <http://www.embedinfo.com/english/product/ATEB9200.asp> + +config MACH_KB9200 +	bool "KwikByte KB920x" +	help +	  Select this if you are using KwikByte's KB920x board. +	  <http://www.kwikbyte.com/KB9202.html> + +config MACH_PICOTUX2XX +	bool "picotux 200" +	help +	  Select this if you are using a picotux 200. +	  <http://www.picotux.com/> + +config MACH_KAFA +	bool "Sperry-Sun KAFA board" +	help +	  Select this if you are using Sperry-Sun's KAFA board. + +config MACH_ECBAT91 +	bool "emQbit ECB_AT91 SBC" +	select HAVE_AT91_DATAFLASH_CARD +	help +	  Select this if you are using emQbit's ECB_AT91 board. +	  <http://wiki.emqbit.com/free-ecb-at91> + +config MACH_YL9200 +	bool "ucDragon YL-9200" +	help +	  Select this if you are using the ucDragon YL-9200 board. + +config MACH_CPUAT91 +	bool "Eukrea CPUAT91" +	help +	  Select this if you are using the Eukrea Electromatique's +	  CPUAT91 board <http://www.eukrea.com/>. + +config MACH_ECO920 +	bool "eco920" +	help +	  Select this if you are using the eco920 board + +config MACH_RSI_EWS +	bool "RSI Embedded Webserver" +	depends on ARCH_AT91RM9200 +	help +	  Select this if you are using RSIs EWS board. +endif + +# ---------------------------------------------------------- + +if ARCH_AT91SAM9260 + +comment "AT91SAM9260 Variants" + +comment "AT91SAM9260 / AT91SAM9XE Board Type" + +config MACH_AT91SAM9260EK +	bool "Atmel AT91SAM9260-EK / AT91SAM9XE Evaluation Kit" +	select HAVE_AT91_DATAFLASH_CARD +	help +	  Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit +	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933> + +config MACH_CAM60 +	bool "KwikByte KB9260 (CAM60) board" +	help +	  Select this if you are using KwikByte's KB9260 (CAM60) board based on the Atmel AT91SAM9260. +	  <http://www.kwikbyte.com/KB9260.html> + +config MACH_SAM9_L9260 +	bool "Olimex SAM9-L9260 board" +	select HAVE_AT91_DATAFLASH_CARD +	help +	  Select this if you are using Olimex's SAM9-L9260 board based on the Atmel AT91SAM9260. +	  <http://www.olimex.com/dev/sam9-L9260.html> + +config MACH_AFEB9260 +	bool "Custom afeb9260 board v1" +	help +	  Select this if you are using custom afeb9260 board based on +	  open hardware design. Select this for revision 1 of the board. +	  <svn://194.85.238.22/home/users/george/svn/arm9eb> +	  <http://groups.google.com/group/arm9fpga-evolution-board> + +config MACH_USB_A9260 +	bool "CALAO USB-A9260" +	help +	  Select this if you are using a Calao Systems USB-A9260. +	  <http://www.calao-systems.com> + +config MACH_QIL_A9260 +	bool "CALAO QIL-A9260 board" +	help +	  Select this if you are using a Calao Systems QIL-A9260 Board. +	  <http://www.calao-systems.com> + +config MACH_CPU9260 +	bool "Eukrea CPU9260 board" +	help +	  Select this if you are using a Eukrea Electromatique's +	  CPU9260 Board <http://www.eukrea.com/> + +config MACH_FLEXIBITY +	bool "Flexibity Connect board" +	help +	  Select this if you are using Flexibity Connect board +	  <http://www.flexibity.com> + +endif + +# ---------------------------------------------------------- + +if ARCH_AT91SAM9261 + +comment "AT91SAM9261 Board Type" + +config MACH_AT91SAM9261EK +	bool "Atmel AT91SAM9261-EK Evaluation Kit" +	select HAVE_AT91_DATAFLASH_CARD +	help +	  Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit. +	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820> + +endif + +# ---------------------------------------------------------- + +if ARCH_AT91SAM9G10 + +comment "AT91SAM9G10 Board Type" + +config MACH_AT91SAM9G10EK +	bool "Atmel AT91SAM9G10-EK Evaluation Kit" +	select HAVE_AT91_DATAFLASH_CARD +	help +	  Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit. +	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588> + +endif + +# ---------------------------------------------------------- + +if ARCH_AT91SAM9263 + +comment "AT91SAM9263 Board Type" + +config MACH_AT91SAM9263EK +	bool "Atmel AT91SAM9263-EK Evaluation Kit" +	select HAVE_AT91_DATAFLASH_CARD +	help +	  Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit. +	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057> + +config MACH_USB_A9263 +	bool "CALAO USB-A9263" +	help +	  Select this if you are using a Calao Systems USB-A9263. +	  <http://www.calao-systems.com> + +endif + +# ---------------------------------------------------------- + +if ARCH_AT91SAM9RL + +comment "AT91SAM9RL Board Type" + +config MACH_AT91SAM9RLEK +	bool "Atmel AT91SAM9RL-EK Evaluation Kit" +	help +	  Select this if you are using Atmel's AT91SAM9RL-EK Evaluation Kit. + +endif + +# ---------------------------------------------------------- + +if ARCH_AT91SAM9G20 + +comment "AT91SAM9G20 Board Type" + +config MACH_AT91SAM9G20EK +	bool "Atmel AT91SAM9G20-EK Evaluation Kit" +	select HAVE_AT91_DATAFLASH_CARD +	help +	  Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit +	  that embeds only one SD/MMC slot. + +config MACH_AT91SAM9G20EK_2MMC +	depends on MACH_AT91SAM9G20EK +	bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots" +	help +	  Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit +	  with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and +	  onwards. +	  <http://www.atmel.com/tools/SAM9G20-EK.aspx> + +config MACH_CPU9G20 +	bool "Eukrea CPU9G20 board" +	help +	  Select this if you are using a Eukrea Electromatique's +	  CPU9G20 Board <http://www.eukrea.com/> + +config MACH_ACMENETUSFOXG20 +	bool "Acme Systems srl FOX Board G20" +	help +	  Select this if you are using Acme Systems +	  FOX Board G20 <http://www.acmesystems.it> + +config MACH_PORTUXG20 +	bool "taskit PortuxG20" +	help +	  Select this if you are using taskit's PortuxG20. +	  <http://www.taskit.de/en/> + +config MACH_STAMP9G20 +	bool "taskit Stamp9G20 CPU module" +	help +	  Select this if you are using taskit's Stamp9G20 CPU module on its +	  evaluation board. +	  <http://www.taskit.de/en/> + +config MACH_PCONTROL_G20 +	bool "PControl G20 CPU module" +	help +	  Select this if you are using taskit's Stamp9G20 CPU module on this +	  carrier board, beeing the decentralized unit of a building automation +	  system; featuring nvram, eth-switch, iso-rs485, display, io + +config MACH_GSIA18S +	bool "GS_IA18_S board" +	help +	  This enables support for the GS_IA18_S board +	  produced by GeoSIG Ltd company. This is an internet accelerograph. +	  <http://www.geosig.com> + +config MACH_USB_A9G20 +	bool "CALAO USB-A9G20" +	depends on ARCH_AT91SAM9G20 +	help +	  Select this if you are using a Calao Systems USB-A9G20. +	  <http://www.calao-systems.com> + +endif + +if (ARCH_AT91SAM9260 || ARCH_AT91SAM9G20) +comment "AT91SAM9260/AT91SAM9G20 boards" + +config MACH_SNAPPER_9260 +        bool "Bluewater Systems Snapper 9260/9G20 module" +        help +          Select this if you are using the Bluewater Systems Snapper 9260 or +          Snapper 9G20 modules. +          <http://www.bluewatersys.com/> +endif + +# ---------------------------------------------------------- + +if ARCH_AT91SAM9G45 + +comment "AT91SAM9G45 Board Type" + +config MACH_AT91SAM9M10G45EK +	bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" +	help +	  Select this if you are using Atmel's AT91SAM9M10G45-EK Evaluation Kit. +	  Those boards can be populated with any SoC of AT91SAM9G45 or AT91SAM9M10 +	  families: AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. +	  <http://www.atmel.com/tools/SAM9M10-G45-EK.aspx> + +endif + +# ---------------------------------------------------------- + +if ARCH_AT91X40 + +comment "AT91X40 Board Type" + +config MACH_AT91EB01 +	bool "Atmel AT91EB01 Evaluation Kit" +	help +	  Select this if you are using Atmel's AT91EB01 Evaluation Kit. +	  It is also a popular target for simulators such as GDB's +	  ARM simulator (commonly known as the ARMulator) and the +	  Skyeye simulator. + +endif + +# ---------------------------------------------------------- + +comment "AT91 Board Options" + +config MTD_AT91_DATAFLASH_CARD +	bool "Enable DataFlash Card support" +	depends on HAVE_AT91_DATAFLASH_CARD +	help +	  Enable support for the DataFlash card. + +endmenu diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 39218ca6d8e..505fed961eb 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile @@ -87,8 +87,8 @@ obj-$(CONFIG_MACH_SNAPPER_9260)	+= board-snapper9260.o  obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o  # AT91SAM board with device-tree -obj-$(CONFIG_MACH_AT91RM9200_DT) += board-rm9200-dt.o -obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o +obj-$(CONFIG_MACH_AT91RM9200_DT) += board-dt-rm9200.o +obj-$(CONFIG_MACH_AT91SAM9_DT) += board-dt-sam9.o  # AT91X40 board-specific support  obj-$(CONFIG_MACH_AT91EB01)	+= board-eb01.o diff --git a/arch/arm/mach-at91/board-rm9200-dt.c b/arch/arm/mach-at91/board-dt-rm9200.c index 3fcb6623a33..3fcb6623a33 100644 --- a/arch/arm/mach-at91/board-rm9200-dt.c +++ b/arch/arm/mach-at91/board-dt-rm9200.c diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt-sam9.c index 8db30132abe..8db30132abe 100644 --- a/arch/arm/mach-at91/board-dt.c +++ b/arch/arm/mach-at91/board-dt-sam9.c diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index c5d7e1e9d75..a5afcf76550 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c @@ -22,10 +22,9 @@  #include <linux/module.h>  #include <linux/io.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/of_address.h> -#include <asm/mach/irq.h> -  #include <mach/hardware.h>  #include <mach/at91_pio.h> diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 4b678478cf9..6b4608d58da 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -333,7 +333,7 @@ static void at91_dt_rstc(void)  	of_id = of_match_node(rstc_ids, np);  	if (!of_id) -		panic("AT91: rtsc no restart function availlable\n"); +		panic("AT91: rtsc no restart function available\n");  	arm_pm_restart = of_id->data; diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index d63d399c7ba..7bc0f9aa8b3 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -26,6 +26,7 @@  #include <linux/irqchip.h>  #include <linux/of_address.h>  #include <linux/irqchip/arm-gic.h> +#include <linux/irqchip/chained_irq.h>  #include <asm/proc-fns.h>  #include <asm/exception.h> diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 60f7c5be057..95e04bd5813 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -20,7 +20,6 @@  #include <linux/jiffies.h>  #include <linux/smp.h>  #include <linux/io.h> -#include <linux/irqchip/arm-gic.h>  #include <asm/cacheflush.h>  #include <asm/smp_plat.h> @@ -76,13 +75,6 @@ static DEFINE_SPINLOCK(boot_lock);  static void __cpuinit exynos_secondary_init(unsigned int cpu)  {  	/* -	 * if any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); - -	/*  	 * let the primary processor know we're out of the  	 * pen, then head off into the C entry point  	 */ diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index a4f9f50247d..76c1170b352 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -32,7 +32,6 @@  #include <asm/cacheflush.h>  #include <asm/cputype.h>  #include <asm/smp_plat.h> -#include <asm/smp_twd.h>  #include <asm/hardware/arm_timer.h>  #include <asm/hardware/timer-sp.h>  #include <asm/hardware/cache-l2x0.h> @@ -119,10 +118,10 @@ static void __init highbank_timer_init(void)  	sp804_clocksource_and_sched_clock_init(timer_base + 0x20, "timer1");  	sp804_clockevents_init(timer_base, irq, "timer0"); -	twd_local_timer_of_register(); -  	arch_timer_of_register();  	arch_timer_sched_clock_init(); + +	clocksource_of_init();  }  static void highbank_power_off(void) diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c index 8797a700172..a984573e0d0 100644 --- a/arch/arm/mach-highbank/platsmp.c +++ b/arch/arm/mach-highbank/platsmp.c @@ -17,7 +17,6 @@  #include <linux/init.h>  #include <linux/smp.h>  #include <linux/io.h> -#include <linux/irqchip/arm-gic.h>  #include <asm/smp_scu.h> @@ -25,11 +24,6 @@  extern void secondary_startup(void); -static void __cpuinit highbank_secondary_init(unsigned int cpu) -{ -	gic_secondary_init(0); -} -  static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)  {  	highbank_set_cpu_jump(cpu, secondary_startup); @@ -67,7 +61,6 @@ static void __init highbank_smp_prepare_cpus(unsigned int max_cpus)  struct smp_operations highbank_smp_ops __initdata = {  	.smp_init_cpus		= highbank_smp_init_cpus,  	.smp_prepare_cpus	= highbank_smp_prepare_cpus, -	.smp_secondary_init	= highbank_secondary_init,  	.smp_boot_secondary	= highbank_boot_secondary,  #ifdef CONFIG_HOTPLUG_CPU  	.cpu_die		= highbank_cpu_die, diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 9ffd103b27e..b59ddcb57c7 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -12,6 +12,7 @@  #include <linux/clk.h>  #include <linux/clkdev.h> +#include <linux/clocksource.h>  #include <linux/cpu.h>  #include <linux/delay.h>  #include <linux/export.h> @@ -28,11 +29,9 @@  #include <linux/regmap.h>  #include <linux/micrel_phy.h>  #include <linux/mfd/syscon.h> -#include <asm/smp_twd.h>  #include <asm/hardware/cache-l2x0.h>  #include <asm/mach/arch.h>  #include <asm/mach/map.h> -#include <asm/mach/time.h>  #include <asm/system_misc.h>  #include "common.h" @@ -292,7 +291,7 @@ static void __init imx6q_init_irq(void)  static void __init imx6q_timer_init(void)  {  	mx6q_clocks_init(); -	twd_local_timer_of_register(); +	clocksource_of_init();  	imx_print_silicon_rev("i.MX6Q", imx6q_revision());  } diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c index 7c0b03f67b0..77e9a25ed0f 100644 --- a/arch/arm/mach-imx/platsmp.c +++ b/arch/arm/mach-imx/platsmp.c @@ -12,7 +12,6 @@  #include <linux/init.h>  #include <linux/smp.h> -#include <linux/irqchip/arm-gic.h>  #include <asm/page.h>  #include <asm/smp_scu.h>  #include <asm/mach/map.h> @@ -52,16 +51,6 @@ void imx_scu_standby_enable(void)  	writel_relaxed(val, scu_base);  } -static void __cpuinit imx_secondary_init(unsigned int cpu) -{ -	/* -	 * if any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); -} -  static int __cpuinit imx_boot_secondary(unsigned int cpu, struct task_struct *idle)  {  	imx_set_cpu_jump(cpu, v7_secondary_startup); @@ -96,7 +85,6 @@ static void __init imx_smp_prepare_cpus(unsigned int max_cpus)  struct smp_operations  imx_smp_ops __initdata = {  	.smp_init_cpus		= imx_smp_init_cpus,  	.smp_prepare_cpus	= imx_smp_prepare_cpus, -	.smp_secondary_init	= imx_secondary_init,  	.smp_boot_secondary	= imx_boot_secondary,  #ifdef CONFIG_HOTPLUG_CPU  	.cpu_die		= imx_cpu_die, diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c index 42932865416..00cdb0a5dac 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c @@ -15,7 +15,6 @@  #include <linux/jiffies.h>  #include <linux/smp.h>  #include <linux/io.h> -#include <linux/irqchip/arm-gic.h>  #include <asm/cacheflush.h>  #include <asm/cputype.h> @@ -42,13 +41,6 @@ static inline int get_core_count(void)  static void __cpuinit msm_secondary_init(unsigned int cpu)  {  	/* -	 * if any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); - -	/*  	 * let the primary processor know we're out of the  	 * pen, then head off into the C entry point  	 */ diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index 0cbb677c4df..f76f94fb847 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c @@ -66,13 +66,6 @@ static void __cpuinit omap4_secondary_init(unsigned int cpu)  							4, 0, 0, 0, 0, 0);  	/* -	 * If any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); - -	/*  	 * Synchronise with the boot thread.  	 */  	spin_lock(&boot_lock); diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 2bdd4cf17a8..4fd80257c73 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -597,7 +597,7 @@ void __init omap4_local_timer_init(void)  		int err;  		if (of_have_populated_dt()) { -			twd_local_timer_of_register(); +			clocksource_of_init();  			return;  		} diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index d9c7c3bf0d9..973db98a3c2 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c @@ -402,8 +402,9 @@ static void __init orion5x_pci_master_slave_enable(void)  	orion5x_pci_hw_wr_conf(bus_nr, 0, func, reg, 4, val | 0x7);  } -static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram) +static void __init orion5x_setup_pci_wins(void)  { +	const struct mbus_dram_target_info *dram = mv_mbus_dram_info();  	u32 win_enable;  	int bus;  	int i; @@ -420,7 +421,7 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram)  	bus = orion5x_pci_local_bus_nr();  	for (i = 0; i < dram->num_cs; i++) { -		struct mbus_dram_window *cs = dram->cs + i; +		const struct mbus_dram_window *cs = dram->cs + i;  		u32 func = PCI_CONF_FUNC_BAR_CS(cs->cs_index);  		u32 reg;  		u32 val; @@ -467,7 +468,7 @@ static int __init pci_setup(struct pci_sys_data *sys)  	/*  	 * Point PCI unit MBUS decode windows to DRAM space.  	 */ -	orion5x_setup_pci_wins(&orion_mbus_dram_info); +	orion5x_setup_pci_wins();  	/*  	 * Master + Slave enable diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c index 4b788310f6a..c7c92e78f0c 100644 --- a/arch/arm/mach-prima2/platsmp.c +++ b/arch/arm/mach-prima2/platsmp.c @@ -11,7 +11,6 @@  #include <linux/delay.h>  #include <linux/of.h>  #include <linux/of_address.h> -#include <linux/irqchip/arm-gic.h>  #include <asm/page.h>  #include <asm/mach/map.h>  #include <asm/smp_plat.h> @@ -49,13 +48,6 @@ void __init sirfsoc_map_scu(void)  static void __cpuinit sirfsoc_secondary_init(unsigned int cpu)  {  	/* -	 * if any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); - -	/*  	 * let the primary processor know we're out of the  	 * pen, then head off into the C entry point  	 */ diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c index c0daa9590b4..cb1b791954d 100644 --- a/arch/arm/mach-s3c24xx/bast-irq.c +++ b/arch/arm/mach-s3c24xx/bast-irq.c @@ -34,8 +34,6 @@  #include <mach/hardware.h>  #include <mach/regs-irq.h> -#include <plat/irq.h> -  #include "bast.h"  #define irqdbf(x...) diff --git a/arch/arm/mach-s3c24xx/clock-s3c2410.c b/arch/arm/mach-s3c24xx/clock-s3c2410.c index 641266f3d15..34fffdf6fc1 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2410.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2410.c @@ -40,7 +40,6 @@  #include <mach/regs-clock.h>  #include <mach/regs-gpio.h> -#include <plat/s3c2410.h>  #include <plat/clock.h>  #include <plat/cpu.h> diff --git a/arch/arm/mach-s3c24xx/clock-s3c2412.c b/arch/arm/mach-s3c24xx/clock-s3c2412.c index d10b695a906..2cc017da88f 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2412.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2412.c @@ -41,7 +41,6 @@  #include <mach/regs-clock.h>  #include <mach/regs-gpio.h> -#include <plat/s3c2412.h>  #include <plat/clock.h>  #include <plat/cpu.h> diff --git a/arch/arm/mach-s3c24xx/clock-s3c2416.c b/arch/arm/mach-s3c24xx/clock-s3c2416.c index 14a81c2317a..036056cea57 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2416.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2416.c @@ -14,7 +14,6 @@  #include <linux/init.h>  #include <linux/clk.h> -#include <plat/s3c2416.h>  #include <plat/clock.h>  #include <plat/clock-clksrc.h>  #include <plat/cpu.h> diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c index bdaba59b42d..0a53051b078 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2443.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c @@ -41,7 +41,6 @@  #include <plat/cpu-freq.h> -#include <plat/s3c2443.h>  #include <plat/clock.h>  #include <plat/clock-clksrc.h>  #include <plat/cpu.h> diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c index 3b2cf6db363..404444dd384 100644 --- a/arch/arm/mach-s3c24xx/common-smdk.c +++ b/arch/arm/mach-s3c24xx/common-smdk.c @@ -41,11 +41,12 @@  #include <linux/platform_data/mtd-nand-s3c2410.h> -#include <plat/common-smdk.h>  #include <plat/gpio-cfg.h>  #include <plat/devs.h>  #include <plat/pm.h> +#include "common-smdk.h" +  /* LED devices */  static struct s3c24xx_led_platdata smdk_pdata_led4 = { diff --git a/arch/arm/plat-samsung/include/plat/common-smdk.h b/arch/arm/mach-s3c24xx/common-smdk.h index ba028f1ed30..98f733e1cb4 100644 --- a/arch/arm/plat-samsung/include/plat/common-smdk.h +++ b/arch/arm/mach-s3c24xx/common-smdk.h @@ -1,5 +1,4 @@ -/* linux/arch/arm/plat-samsung/include/plat/common-smdk.h - * +/*   * Copyright (c) 2006 Simtec Electronics   *	Ben Dooks <ben@simtec.co.uk>   * diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c index 6bcf87f65f9..d97533d21ac 100644 --- a/arch/arm/mach-s3c24xx/common.c +++ b/arch/arm/mach-s3c24xx/common.c @@ -47,14 +47,11 @@  #include <plat/cpu.h>  #include <plat/devs.h>  #include <plat/clock.h> -#include <plat/s3c2410.h> -#include <plat/s3c2412.h> -#include <plat/s3c2416.h> -#include <plat/s3c244x.h> -#include <plat/s3c2443.h>  #include <plat/cpu-freq.h>  #include <plat/pll.h> +#include "common.h" +  /* table of supported CPUs */  static const char name_s3c2410[]  = "S3C2410"; diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h index ed6276fcaa3..8a2b4137ddb 100644 --- a/arch/arm/mach-s3c24xx/common.h +++ b/arch/arm/mach-s3c24xx/common.h @@ -12,8 +12,94 @@  #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H  #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ -void s3c2410_restart(char mode, const char *cmd); -void s3c244x_restart(char mode, const char *cmd); +struct s3c2410_uartcfg; + +#ifdef CONFIG_CPU_S3C2410 +extern  int s3c2410_init(void); +extern  int s3c2410a_init(void); +extern void s3c2410_map_io(void); +extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); +extern void s3c2410_init_clocks(int xtal); +extern void s3c2410_restart(char mode, const char *cmd); +#else +#define s3c2410_init_clocks NULL +#define s3c2410_init_uarts NULL +#define s3c2410_map_io NULL +#define s3c2410_init NULL +#define s3c2410a_init NULL +#endif + +#ifdef CONFIG_CPU_S3C2412 +extern  int s3c2412_init(void); +extern void s3c2412_map_io(void); +extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); +extern void s3c2412_init_clocks(int xtal); +extern  int s3c2412_baseclk_add(void); +extern void s3c2412_restart(char mode, const char *cmd); +#else +#define s3c2412_init_clocks NULL +#define s3c2412_init_uarts NULL +#define s3c2412_map_io NULL +#define s3c2412_init NULL +#endif + +#ifdef CONFIG_CPU_S3C2416 +extern  int s3c2416_init(void); +extern void s3c2416_map_io(void); +extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); +extern void s3c2416_init_clocks(int xtal); +extern  int s3c2416_baseclk_add(void); +extern void s3c2416_restart(char mode, const char *cmd); +extern void s3c2416_init_irq(void); + +extern struct syscore_ops s3c2416_irq_syscore_ops; +#else +#define s3c2416_init_clocks NULL +#define s3c2416_init_uarts NULL +#define s3c2416_map_io NULL +#define s3c2416_init NULL +#endif + +#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) +extern void s3c244x_map_io(void); +extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); +extern void s3c244x_init_clocks(int xtal); +extern void s3c244x_restart(char mode, const char *cmd); +#else +#define s3c244x_init_clocks NULL +#define s3c244x_init_uarts NULL +#endif + +#ifdef CONFIG_CPU_S3C2440 +extern  int s3c2440_init(void); +extern void s3c2440_map_io(void); +#else +#define s3c2440_init NULL +#define s3c2440_map_io NULL +#endif + +#ifdef CONFIG_CPU_S3C2442 +extern  int s3c2442_init(void); +extern void s3c2442_map_io(void); +#else +#define s3c2442_init NULL +#define s3c2442_map_io NULL +#endif + +#ifdef CONFIG_CPU_S3C2443 +extern  int s3c2443_init(void); +extern void s3c2443_map_io(void); +extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); +extern void s3c2443_init_clocks(int xtal); +extern  int s3c2443_baseclk_add(void); +extern void s3c2443_restart(char mode, const char *cmd); +extern void s3c2443_init_irq(void); +#else +#define s3c2443_init_clocks NULL +#define s3c2443_init_uarts NULL +#define s3c2443_map_io NULL +#define s3c2443_init NULL +#endif  extern struct syscore_ops s3c24xx_irq_syscore_ops; diff --git a/arch/arm/mach-s3c24xx/dma-s3c2410.c b/arch/arm/mach-s3c24xx/dma-s3c2410.c index 25d085adc93..a6c94b82095 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2410.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2410.c @@ -28,7 +28,6 @@  #include <plat/regs-ac97.h>  #include <plat/regs-dma.h>  #include <mach/regs-lcd.h> -#include <mach/regs-sdi.h>  #include <plat/regs-iis.h>  #include <plat/regs-spi.h> diff --git a/arch/arm/mach-s3c24xx/dma-s3c2412.c b/arch/arm/mach-s3c24xx/dma-s3c2412.c index d2408ba372c..c0e8c3f5057 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2412.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2412.c @@ -28,7 +28,6 @@  #include <plat/regs-ac97.h>  #include <plat/regs-dma.h>  #include <mach/regs-lcd.h> -#include <mach/regs-sdi.h>  #include <plat/regs-iis.h>  #include <plat/regs-spi.h> diff --git a/arch/arm/mach-s3c24xx/dma-s3c2440.c b/arch/arm/mach-s3c24xx/dma-s3c2440.c index 0b86e74d104..1c08eccd942 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2440.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2440.c @@ -28,7 +28,6 @@  #include <plat/regs-ac97.h>  #include <plat/regs-dma.h>  #include <mach/regs-lcd.h> -#include <mach/regs-sdi.h>  #include <plat/regs-iis.h>  #include <plat/regs-spi.h> diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c index 05536254a3f..000e4c69fce 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2443.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c @@ -28,7 +28,6 @@  #include <plat/regs-ac97.h>  #include <plat/regs-dma.h>  #include <mach/regs-lcd.h> -#include <mach/regs-sdi.h>  #include <plat/regs-iis.h>  #include <plat/regs-spi.h> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-sdi.h b/arch/arm/mach-s3c24xx/include/mach/regs-sdi.h deleted file mode 100644 index cbf2d8884e3..00000000000 --- a/arch/arm/mach-s3c24xx/include/mach/regs-sdi.h +++ /dev/null @@ -1,127 +0,0 @@ -/* arch/arm/mach-s3c2410/include/mach/regs-sdi.h - * - * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk> - *		      http://www.simtec.co.uk/products/SWLINUX/ - * - * 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. - * - * S3C2410 MMC/SDIO register definitions -*/ - -#ifndef __ASM_ARM_REGS_SDI -#define __ASM_ARM_REGS_SDI "regs-sdi.h" - -#define S3C2410_SDICON                (0x00) -#define S3C2410_SDIPRE                (0x04) -#define S3C2410_SDICMDARG             (0x08) -#define S3C2410_SDICMDCON             (0x0C) -#define S3C2410_SDICMDSTAT            (0x10) -#define S3C2410_SDIRSP0               (0x14) -#define S3C2410_SDIRSP1               (0x18) -#define S3C2410_SDIRSP2               (0x1C) -#define S3C2410_SDIRSP3               (0x20) -#define S3C2410_SDITIMER              (0x24) -#define S3C2410_SDIBSIZE              (0x28) -#define S3C2410_SDIDCON               (0x2C) -#define S3C2410_SDIDCNT               (0x30) -#define S3C2410_SDIDSTA               (0x34) -#define S3C2410_SDIFSTA               (0x38) - -#define S3C2410_SDIDATA               (0x3C) -#define S3C2410_SDIIMSK               (0x40) - -#define S3C2440_SDIDATA               (0x40) -#define S3C2440_SDIIMSK               (0x3C) - -#define S3C2440_SDICON_SDRESET        (1<<8) -#define S3C2440_SDICON_MMCCLOCK       (1<<5) -#define S3C2410_SDICON_BYTEORDER      (1<<4) -#define S3C2410_SDICON_SDIOIRQ        (1<<3) -#define S3C2410_SDICON_RWAITEN        (1<<2) -#define S3C2410_SDICON_FIFORESET      (1<<1) -#define S3C2410_SDICON_CLOCKTYPE      (1<<0) - -#define S3C2410_SDICMDCON_ABORT       (1<<12) -#define S3C2410_SDICMDCON_WITHDATA    (1<<11) -#define S3C2410_SDICMDCON_LONGRSP     (1<<10) -#define S3C2410_SDICMDCON_WAITRSP     (1<<9) -#define S3C2410_SDICMDCON_CMDSTART    (1<<8) -#define S3C2410_SDICMDCON_SENDERHOST  (1<<6) -#define S3C2410_SDICMDCON_INDEX       (0x3f) - -#define S3C2410_SDICMDSTAT_CRCFAIL    (1<<12) -#define S3C2410_SDICMDSTAT_CMDSENT    (1<<11) -#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10) -#define S3C2410_SDICMDSTAT_RSPFIN     (1<<9) -#define S3C2410_SDICMDSTAT_XFERING    (1<<8) -#define S3C2410_SDICMDSTAT_INDEX      (0xff) - -#define S3C2440_SDIDCON_DS_BYTE       (0<<22) -#define S3C2440_SDIDCON_DS_HALFWORD   (1<<22) -#define S3C2440_SDIDCON_DS_WORD       (2<<22) -#define S3C2410_SDIDCON_IRQPERIOD     (1<<21) -#define S3C2410_SDIDCON_TXAFTERRESP   (1<<20) -#define S3C2410_SDIDCON_RXAFTERCMD    (1<<19) -#define S3C2410_SDIDCON_BUSYAFTERCMD  (1<<18) -#define S3C2410_SDIDCON_BLOCKMODE     (1<<17) -#define S3C2410_SDIDCON_WIDEBUS       (1<<16) -#define S3C2410_SDIDCON_DMAEN         (1<<15) -#define S3C2410_SDIDCON_STOP          (1<<14) -#define S3C2440_SDIDCON_DATSTART      (1<<14) -#define S3C2410_SDIDCON_DATMODE	      (3<<12) -#define S3C2410_SDIDCON_BLKNUM        (0x7ff) - -/* constants for S3C2410_SDIDCON_DATMODE */ -#define S3C2410_SDIDCON_XFER_READY    (0<<12) -#define S3C2410_SDIDCON_XFER_CHKSTART (1<<12) -#define S3C2410_SDIDCON_XFER_RXSTART  (2<<12) -#define S3C2410_SDIDCON_XFER_TXSTART  (3<<12) - -#define S3C2410_SDIDCON_BLKNUM_MASK   (0xFFF) -#define S3C2410_SDIDCNT_BLKNUM_SHIFT  (12) - -#define S3C2410_SDIDSTA_RDYWAITREQ    (1<<10) -#define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9) -#define S3C2410_SDIDSTA_FIFOFAIL      (1<<8)	/* reserved on 2440 */ -#define S3C2410_SDIDSTA_CRCFAIL       (1<<7) -#define S3C2410_SDIDSTA_RXCRCFAIL     (1<<6) -#define S3C2410_SDIDSTA_DATATIMEOUT   (1<<5) -#define S3C2410_SDIDSTA_XFERFINISH    (1<<4) -#define S3C2410_SDIDSTA_BUSYFINISH    (1<<3) -#define S3C2410_SDIDSTA_SBITERR       (1<<2)	/* reserved on 2410a/2440 */ -#define S3C2410_SDIDSTA_TXDATAON      (1<<1) -#define S3C2410_SDIDSTA_RXDATAON      (1<<0) - -#define S3C2440_SDIFSTA_FIFORESET      (1<<16) -#define S3C2440_SDIFSTA_FIFOFAIL       (3<<14)  /* 3 is correct (2 bits) */ -#define S3C2410_SDIFSTA_TFDET          (1<<13) -#define S3C2410_SDIFSTA_RFDET          (1<<12) -#define S3C2410_SDIFSTA_TFHALF         (1<<11) -#define S3C2410_SDIFSTA_TFEMPTY        (1<<10) -#define S3C2410_SDIFSTA_RFLAST         (1<<9) -#define S3C2410_SDIFSTA_RFFULL         (1<<8) -#define S3C2410_SDIFSTA_RFHALF         (1<<7) -#define S3C2410_SDIFSTA_COUNTMASK      (0x7f) - -#define S3C2410_SDIIMSK_RESPONSECRC    (1<<17) -#define S3C2410_SDIIMSK_CMDSENT        (1<<16) -#define S3C2410_SDIIMSK_CMDTIMEOUT     (1<<15) -#define S3C2410_SDIIMSK_RESPONSEND     (1<<14) -#define S3C2410_SDIIMSK_READWAIT       (1<<13) -#define S3C2410_SDIIMSK_SDIOIRQ        (1<<12) -#define S3C2410_SDIIMSK_FIFOFAIL       (1<<11) -#define S3C2410_SDIIMSK_CRCSTATUS      (1<<10) -#define S3C2410_SDIIMSK_DATACRC        (1<<9) -#define S3C2410_SDIIMSK_DATATIMEOUT    (1<<8) -#define S3C2410_SDIIMSK_DATAFINISH     (1<<7) -#define S3C2410_SDIIMSK_BUSYFINISH     (1<<6) -#define S3C2410_SDIIMSK_SBITERR        (1<<5)	/* reserved 2440/2410a */ -#define S3C2410_SDIIMSK_TXFIFOHALF     (1<<4) -#define S3C2410_SDIIMSK_TXFIFOEMPTY    (1<<3) -#define S3C2410_SDIIMSK_RXFIFOLAST     (1<<2) -#define S3C2410_SDIIMSK_RXFIFOFULL     (1<<1) -#define S3C2410_SDIIMSK_RXFIFOHALF     (1<<0) - -#endif /* __ASM_ARM_REGS_SDI */ diff --git a/arch/arm/mach-s3c24xx/irq-pm.c b/arch/arm/mach-s3c24xx/irq-pm.c index e1199599873..b91341ef2b2 100644 --- a/arch/arm/mach-s3c24xx/irq-pm.c +++ b/arch/arm/mach-s3c24xx/irq-pm.c @@ -16,10 +16,15 @@  #include <linux/interrupt.h>  #include <linux/irq.h>  #include <linux/syscore_ops.h> +#include <linux/io.h>  #include <plat/cpu.h>  #include <plat/pm.h> -#include <plat/irq.h> +#include <plat/map-base.h> +#include <plat/map-s3c.h> + +#include <mach/regs-irq.h> +#include <mach/regs-gpio.h>  #include <asm/irq.h> diff --git a/arch/arm/mach-s3c24xx/irq.c b/arch/arm/mach-s3c24xx/irq.c index cb9f5e011e7..05be3e2487a 100644 --- a/arch/arm/mach-s3c24xx/irq.c +++ b/arch/arm/mach-s3c24xx/irq.c @@ -25,6 +25,7 @@  #include <linux/ioport.h>  #include <linux/device.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <asm/mach/irq.h> @@ -34,7 +35,6 @@  #include <plat/cpu.h>  #include <plat/regs-irqtype.h>  #include <plat/pm.h> -#include <plat/irq.h>  #define S3C_IRQTYPE_NONE	0  #define S3C_IRQTYPE_EINT	1 @@ -175,8 +175,7 @@ static int s3c_irqext_type_set(void __iomem *gpcon_reg,  	return 0;  } -/* FIXME: make static when it's out of plat-samsung/irq.h */ -int s3c_irqext_type(struct irq_data *data, unsigned int type) +static int s3c_irqext_type(struct irq_data *data, unsigned int type)  {  	void __iomem *extint_reg;  	void __iomem *gpcon_reg; @@ -224,7 +223,7 @@ static int s3c_irqext0_type(struct irq_data *data, unsigned int type)  				   extint_offset, type);  } -struct irq_chip s3c_irq_chip = { +static struct irq_chip s3c_irq_chip = {  	.name		= "s3c",  	.irq_ack	= s3c_irq_ack,  	.irq_mask	= s3c_irq_mask, @@ -232,7 +231,7 @@ struct irq_chip s3c_irq_chip = {  	.irq_set_wake	= s3c_irq_wake  }; -struct irq_chip s3c_irq_level_chip = { +static struct irq_chip s3c_irq_level_chip = {  	.name		= "s3c-level",  	.irq_mask	= s3c_irq_mask,  	.irq_unmask	= s3c_irq_unmask, diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c index 54e83c1f780..ca08d7df07f 100644 --- a/arch/arm/mach-s3c24xx/mach-jive.c +++ b/arch/arm/mach-s3c24xx/mach-jive.c @@ -46,7 +46,6 @@  #include <linux/mtd/nand_ecc.h>  #include <linux/mtd/partitions.h> -#include <plat/s3c2412.h>  #include <plat/gpio-cfg.h>  #include <plat/clock.h>  #include <plat/devs.h> @@ -54,6 +53,7 @@  #include <plat/pm.h>  #include <linux/platform_data/usb-s3c2410_udc.h> +#include "common.h"  #include "s3c2412-power.h"  static struct map_desc jive_iodesc[] __initdata = { diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c index d9d04b24029..8017c0fc172 100644 --- a/arch/arm/mach-s3c24xx/mach-n30.c +++ b/arch/arm/mach-s3c24xx/mach-n30.c @@ -48,7 +48,6 @@  #include <plat/cpu.h>  #include <plat/devs.h>  #include <linux/platform_data/mmc-s3cmci.h> -#include <plat/s3c2410.h>  #include <linux/platform_data/usb-s3c2410_udc.h>  #include "common.h" diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c index a454e246186..144b9f80c4a 100644 --- a/arch/arm/mach-s3c24xx/mach-nexcoder.c +++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c @@ -41,8 +41,6 @@  #include <linux/platform_data/i2c-s3c2410.h>  #include <plat/gpio-cfg.h> -#include <plat/s3c2410.h> -#include <plat/s3c244x.h>  #include <plat/clock.h>  #include <plat/devs.h>  #include <plat/cpu.h> diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c index 40a47d6c6a8..deb0ace585b 100644 --- a/arch/arm/mach-s3c24xx/mach-otom.c +++ b/arch/arm/mach-s3c24xx/mach-otom.c @@ -33,7 +33,6 @@  #include <plat/cpu.h>  #include <plat/devs.h>  #include <plat/regs-serial.h> -#include <plat/s3c2410.h>  #include "common.h"  #include "otom.h" diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c index 56175f0941b..84c54160266 100644 --- a/arch/arm/mach-s3c24xx/mach-qt2410.c +++ b/arch/arm/mach-s3c24xx/mach-qt2410.c @@ -55,13 +55,13 @@  #include <linux/platform_data/usb-s3c2410_udc.h>  #include <linux/platform_data/i2c-s3c2410.h> -#include <plat/common-smdk.h>  #include <plat/gpio-cfg.h>  #include <plat/devs.h>  #include <plat/cpu.h>  #include <plat/pm.h>  #include "common.h" +#include "common-smdk.h"  static struct map_desc qt2410_iodesc[] __initdata = {  	{ 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE } diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c24xx/mach-smdk2410.c index e184bfa9613..cd0b1635c47 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2410.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c @@ -52,9 +52,8 @@  #include <plat/devs.h>  #include <plat/cpu.h> -#include <plat/common-smdk.h> -  #include "common.h" +#include "common-smdk.h"  static struct map_desc smdk2410_iodesc[] __initdata = {    /* nothing here yet */ diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c index 86d7847c9d4..79485907950 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2413.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c @@ -41,13 +41,12 @@  #include <linux/platform_data/i2c-s3c2410.h>  #include <mach/fb.h> -#include <plat/s3c2410.h> -#include <plat/s3c2412.h>  #include <plat/clock.h>  #include <plat/devs.h>  #include <plat/cpu.h> -#include <plat/common-smdk.h> +#include "common.h" +#include "common-smdk.h"  static struct map_desc smdk2413_iodesc[] __initdata = {  }; diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c index ebb2e61f3d0..037a5da343b 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2416.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c @@ -42,7 +42,6 @@  #include <linux/platform_data/leds-s3c24xx.h>  #include <linux/platform_data/i2c-s3c2410.h> -#include <plat/s3c2416.h>  #include <plat/gpio-cfg.h>  #include <plat/clock.h>  #include <plat/devs.h> @@ -54,7 +53,8 @@  #include <plat/fb.h> -#include <plat/common-smdk.h> +#include "common.h" +#include "common-smdk.h"  static struct map_desc smdk2416_iodesc[] __initdata = {  	/* ISA IO Space map (memory space selected by A24) */ diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c index 08cc38c8a4a..29d31314e23 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2440.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c @@ -38,15 +38,12 @@  #include <mach/fb.h>  #include <linux/platform_data/i2c-s3c2410.h> -#include <plat/s3c2410.h> -#include <plat/s3c244x.h>  #include <plat/clock.h>  #include <plat/devs.h>  #include <plat/cpu.h> -#include <plat/common-smdk.h> -  #include "common.h" +#include "common-smdk.h"  static struct map_desc smdk2440_iodesc[] __initdata = {  	/* ISA IO Space map (memory space selected by A24) */ diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c index fc65d74d3c7..b3be4c4dc7b 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2443.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c @@ -38,13 +38,12 @@  #include <mach/fb.h>  #include <linux/platform_data/i2c-s3c2410.h> -#include <plat/s3c2410.h> -#include <plat/s3c2443.h>  #include <plat/clock.h>  #include <plat/devs.h>  #include <plat/cpu.h> -#include <plat/common-smdk.h> +#include "common.h" +#include "common-smdk.h"  static struct map_desc smdk2443_iodesc[] __initdata = {  	/* ISA IO Space map (memory space selected by A24) */ diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c index 3e2bfddc9df..239129c2d8b 100644 --- a/arch/arm/mach-s3c24xx/mach-vstms.c +++ b/arch/arm/mach-s3c24xx/mach-vstms.c @@ -41,12 +41,11 @@  #include <linux/platform_data/i2c-s3c2410.h>  #include <linux/platform_data/mtd-nand-s3c2410.h> -#include <plat/s3c2410.h> -#include <plat/s3c2412.h>  #include <plat/clock.h>  #include <plat/devs.h>  #include <plat/cpu.h> +#include "common.h"  static struct map_desc vstms_iodesc[] __initdata = {  }; diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c index 668a78a8b19..4c4bc1c83b7 100644 --- a/arch/arm/mach-s3c24xx/pm-s3c2412.c +++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c @@ -29,7 +29,6 @@  #include <plat/cpu.h>  #include <plat/pm.h> -#include <plat/s3c2412.h>  #include "regs-dsc.h"  #include "s3c2412-power.h" diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c index 9ebef95da72..d850ea5adac 100644 --- a/arch/arm/mach-s3c24xx/s3c2410.c +++ b/arch/arm/mach-s3c24xx/s3c2410.c @@ -37,7 +37,6 @@  #include <mach/regs-clock.h>  #include <plat/regs-serial.h> -#include <plat/s3c2410.h>  #include <plat/cpu.h>  #include <plat/devs.h>  #include <plat/clock.h> diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c index 0d592159a5c..0f864d4c97d 100644 --- a/arch/arm/mach-s3c24xx/s3c2412.c +++ b/arch/arm/mach-s3c24xx/s3c2412.c @@ -44,7 +44,6 @@  #include <plat/pm.h>  #include <plat/regs-serial.h>  #include <plat/regs-spi.h> -#include <plat/s3c2412.h>  #include "common.h"  #include "regs-dsc.h" diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index e30476db029..b9c5d382daf 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c @@ -50,7 +50,6 @@  #include <plat/gpio-core.h>  #include <plat/gpio-cfg.h>  #include <plat/gpio-cfg-helpers.h> -#include <plat/s3c2416.h>  #include <plat/devs.h>  #include <plat/cpu.h>  #include <plat/sdhci.h> diff --git a/arch/arm/mach-s3c24xx/s3c2440.c b/arch/arm/mach-s3c24xx/s3c2440.c index 559e394e898..5f9d6569475 100644 --- a/arch/arm/mach-s3c24xx/s3c2440.c +++ b/arch/arm/mach-s3c24xx/s3c2440.c @@ -33,7 +33,6 @@  #include <plat/devs.h>  #include <plat/cpu.h> -#include <plat/s3c244x.h>  #include <plat/pm.h>  #include <plat/gpio-core.h> diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c24xx/s3c2442.c index f732826c235..6819961f6b1 100644 --- a/arch/arm/mach-s3c24xx/s3c2442.c +++ b/arch/arm/mach-s3c24xx/s3c2442.c @@ -44,7 +44,6 @@  #include <plat/clock.h>  #include <plat/cpu.h> -#include <plat/s3c244x.h>  #include <plat/pm.h>  #include <plat/gpio-core.h> diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index 165b6a6b3da..8328cd65bf3 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c @@ -36,7 +36,6 @@  #include <plat/gpio-core.h>  #include <plat/gpio-cfg.h>  #include <plat/gpio-cfg-helpers.h> -#include <plat/s3c2443.h>  #include <plat/devs.h>  #include <plat/cpu.h>  #include <plat/fb-core.h> diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c index ad2671baa91..2a35edb6735 100644 --- a/arch/arm/mach-s3c24xx/s3c244x.c +++ b/arch/arm/mach-s3c24xx/s3c244x.c @@ -37,8 +37,6 @@  #include <plat/regs-serial.h>  #include <mach/regs-gpio.h> -#include <plat/s3c2410.h> -#include <plat/s3c244x.h>  #include <plat/clock.h>  #include <plat/devs.h>  #include <plat/cpu.h> diff --git a/arch/arm/mach-s5pc100/common.h b/arch/arm/mach-s5pc100/common.h index 9fbd3ae2b40..c41f912e9e1 100644 --- a/arch/arm/mach-s5pc100/common.h +++ b/arch/arm/mach-s5pc100/common.h @@ -20,18 +20,9 @@ void s5pc100_setup_clocks(void);  void s5pc100_restart(char mode, const char *cmd); -#ifdef CONFIG_CPU_S5PC100 -  extern  int s5pc100_init(void);  extern void s5pc100_map_io(void);  extern void s5pc100_init_clocks(int xtal);  extern void s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no); -#else -#define s5pc100_init_clocks NULL -#define s5pc100_init_uarts NULL -#define s5pc100_map_io NULL -#define s5pc100_init NULL -#endif -  #endif /* __ARCH_ARM_MACH_S5PC100_COMMON_H */ diff --git a/arch/arm/mach-s5pv210/common.h b/arch/arm/mach-s5pv210/common.h index 6ed2af5c751..0a1cc0aef72 100644 --- a/arch/arm/mach-s5pv210/common.h +++ b/arch/arm/mach-s5pv210/common.h @@ -20,18 +20,9 @@ void s5pv210_setup_clocks(void);  void s5pv210_restart(char mode, const char *cmd); -#ifdef CONFIG_CPU_S5PV210 -  extern  int s5pv210_init(void);  extern void s5pv210_map_io(void);  extern void s5pv210_init_clocks(int xtal);  extern void s5pv210_init_uarts(struct s3c2410_uartcfg *cfg, int no); -#else -#define s5pv210_init_clocks NULL -#define s5pv210_init_uarts NULL -#define s5pv210_map_io NULL -#define s5pv210_init NULL -#endif -  #endif /* __ARCH_ARM_MACH_S5PV210_COMMON_H */ diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c index 953eb1f9388..384e27dd360 100644 --- a/arch/arm/mach-shmobile/smp-emev2.c +++ b/arch/arm/mach-shmobile/smp-emev2.c @@ -23,7 +23,6 @@  #include <linux/spinlock.h>  #include <linux/io.h>  #include <linux/delay.h> -#include <linux/irqchip/arm-gic.h>  #include <mach/common.h>  #include <mach/emev2.h>  #include <asm/smp_plat.h> @@ -85,11 +84,6 @@ static int __maybe_unused emev2_cpu_kill(unsigned int cpu)  } -static void __cpuinit emev2_secondary_init(unsigned int cpu) -{ -	gic_secondary_init(0); -} -  static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *idle)  {  	cpu = cpu_logical_map(cpu); @@ -124,7 +118,6 @@ static void __init emev2_smp_init_cpus(void)  struct smp_operations emev2_smp_ops __initdata = {  	.smp_init_cpus		= emev2_smp_init_cpus,  	.smp_prepare_cpus	= emev2_smp_prepare_cpus, -	.smp_secondary_init	= emev2_secondary_init,  	.smp_boot_secondary	= emev2_boot_secondary,  #ifdef CONFIG_HOTPLUG_CPU  	.cpu_kill		= emev2_cpu_kill, diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c index 3a4acf23edc..994906560ed 100644 --- a/arch/arm/mach-shmobile/smp-r8a7779.c +++ b/arch/arm/mach-shmobile/smp-r8a7779.c @@ -23,7 +23,6 @@  #include <linux/spinlock.h>  #include <linux/io.h>  #include <linux/delay.h> -#include <linux/irqchip/arm-gic.h>  #include <mach/common.h>  #include <mach/r8a7779.h>  #include <asm/smp_plat.h> @@ -132,11 +131,6 @@ static int __maybe_unused r8a7779_cpu_kill(unsigned int cpu)  } -static void __cpuinit r8a7779_secondary_init(unsigned int cpu) -{ -	gic_secondary_init(0); -} -  static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)  {  	struct r8a7779_pm_ch *ch = NULL; @@ -186,7 +180,6 @@ static void __init r8a7779_smp_init_cpus(void)  struct smp_operations r8a7779_smp_ops  __initdata = {  	.smp_init_cpus		= r8a7779_smp_init_cpus,  	.smp_prepare_cpus	= r8a7779_smp_prepare_cpus, -	.smp_secondary_init	= r8a7779_secondary_init,  	.smp_boot_secondary	= r8a7779_boot_secondary,  #ifdef CONFIG_HOTPLUG_CPU  	.cpu_kill		= r8a7779_cpu_kill, diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index acb46a94ccd..d0f9aca2247 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c @@ -23,7 +23,6 @@  #include <linux/spinlock.h>  #include <linux/io.h>  #include <linux/delay.h> -#include <linux/irqchip/arm-gic.h>  #include <mach/common.h>  #include <asm/cacheflush.h>  #include <asm/smp_plat.h> @@ -59,11 +58,6 @@ static unsigned int __init sh73a0_get_core_count(void)  	return scu_get_core_count(scu_base);  } -static void __cpuinit sh73a0_secondary_init(unsigned int cpu) -{ -	gic_secondary_init(0); -} -  static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)  {  	cpu = cpu_logical_map(cpu); @@ -138,7 +132,6 @@ static void sh73a0_cpu_die(unsigned int cpu)  struct smp_operations sh73a0_smp_ops __initdata = {  	.smp_init_cpus		= sh73a0_smp_init_cpus,  	.smp_prepare_cpus	= sh73a0_smp_prepare_cpus, -	.smp_secondary_init	= sh73a0_secondary_init,  	.smp_boot_secondary	= sh73a0_boot_secondary,  #ifdef CONFIG_HOTPLUG_CPU  	.cpu_kill		= sh73a0_cpu_kill, diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c index 84c60fa8daa..ca14d1d5ac7 100644 --- a/arch/arm/mach-socfpga/platsmp.c +++ b/arch/arm/mach-socfpga/platsmp.c @@ -22,7 +22,6 @@  #include <linux/io.h>  #include <linux/of.h>  #include <linux/of_address.h> -#include <linux/irqchip/arm-gic.h>  #include <asm/cacheflush.h>  #include <asm/smp_scu.h> @@ -33,16 +32,6 @@  extern void __iomem *sys_manager_base_addr;  extern void __iomem *rst_manager_base_addr; -static void __cpuinit socfpga_secondary_init(unsigned int cpu) -{ -	/* -	 * if any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); -} -  static int __cpuinit socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle)  {  	int trampoline_size = &secondary_trampoline_end - &secondary_trampoline; @@ -109,7 +98,6 @@ static void socfpga_cpu_die(unsigned int cpu)  struct smp_operations socfpga_smp_ops __initdata = {  	.smp_init_cpus		= socfpga_smp_init_cpus,  	.smp_prepare_cpus	= socfpga_smp_prepare_cpus, -	.smp_secondary_init	= socfpga_secondary_init,  	.smp_boot_secondary	= socfpga_boot_secondary,  #ifdef CONFIG_HOTPLUG_CPU  	.cpu_die		= socfpga_cpu_die, diff --git a/arch/arm/mach-spear13xx/platsmp.c b/arch/arm/mach-spear13xx/platsmp.c index af4ade61cd9..551c69c9a22 100644 --- a/arch/arm/mach-spear13xx/platsmp.c +++ b/arch/arm/mach-spear13xx/platsmp.c @@ -15,7 +15,6 @@  #include <linux/jiffies.h>  #include <linux/io.h>  #include <linux/smp.h> -#include <linux/irqchip/arm-gic.h>  #include <asm/cacheflush.h>  #include <asm/smp_scu.h>  #include <mach/spear.h> @@ -28,13 +27,6 @@ static void __iomem *scu_base = IOMEM(VA_SCU_BASE);  static void __cpuinit spear13xx_secondary_init(unsigned int cpu)  {  	/* -	 * if any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); - -	/*  	 * let the primary processor know we're out of the  	 * pen, then head off into the C entry point  	 */ diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear13xx/spear13xx.c index c7d2b4a8d8c..25a10191b02 100644 --- a/arch/arm/mach-spear13xx/spear13xx.c +++ b/arch/arm/mach-spear13xx/spear13xx.c @@ -15,12 +15,12 @@  #include <linux/amba/pl022.h>  #include <linux/clk.h> +#include <linux/clocksource.h>  #include <linux/dw_dmac.h>  #include <linux/err.h>  #include <linux/of.h>  #include <asm/hardware/cache-l2x0.h>  #include <asm/mach/map.h> -#include <asm/smp_twd.h>  #include <mach/dma.h>  #include <mach/generic.h>  #include <mach/spear.h> @@ -179,5 +179,5 @@ void __init spear13xx_timer_init(void)  	clk_put(pclk);  	spear_setup_of_timer(); -	twd_local_timer_of_register(); +	clocksource_of_init();  } diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 2c6b3d55213..9348d3c496a 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c @@ -18,7 +18,6 @@  #include <linux/jiffies.h>  #include <linux/smp.h>  #include <linux/io.h> -#include <linux/irqchip/arm-gic.h>  #include <linux/clk/tegra.h>  #include <asm/cacheflush.h> @@ -44,13 +43,6 @@ static cpumask_t tegra_cpu_init_mask;  static void __cpuinit tegra_secondary_init(unsigned int cpu)  { -	/* -	 * if any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); -  	cpumask_set_cpu(cpu, &tegra_cpu_init_mask);  } diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 18f7af339dc..152b1309b9a 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c @@ -16,7 +16,6 @@  #include <linux/device.h>  #include <linux/smp.h>  #include <linux/io.h> -#include <linux/irqchip/arm-gic.h>  #include <asm/cacheflush.h>  #include <asm/smp_plat.h> @@ -58,13 +57,6 @@ static DEFINE_SPINLOCK(boot_lock);  static void __cpuinit ux500_secondary_init(unsigned int cpu)  {  	/* -	 * if any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); - -	/*  	 * let the primary processor know we're out of the  	 * pen, then head off into the C entry point  	 */ diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index a6af0b8732b..d07bbe7f04a 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c @@ -7,6 +7,7 @@  #include <linux/io.h>  #include <linux/errno.h>  #include <linux/clksrc-dbx500-prcmu.h> +#include <linux/clocksource.h>  #include <linux/of.h>  #include <linux/of_address.h>  #include <linux/platform_data/clocksource-nomadik-mtu.h> @@ -32,7 +33,7 @@ static void __init ux500_twd_init(void)  	twd_local_timer = &u8500_twd_local_timer;  	if (of_have_populated_dt()) -		twd_local_timer_of_register(); +		clocksource_of_init();  	else {  		err = twd_local_timer_register(twd_local_timer);  		if (err) diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 915683cb67d..d0ad78998cb 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c @@ -5,6 +5,7 @@  #include <linux/amba/bus.h>  #include <linux/amba/mmci.h>  #include <linux/io.h> +#include <linux/clocksource.h>  #include <linux/smp.h>  #include <linux/init.h>  #include <linux/irqchip.h> @@ -25,7 +26,6 @@  #include <asm/arch_timer.h>  #include <asm/mach-types.h>  #include <asm/sizes.h> -#include <asm/smp_twd.h>  #include <asm/mach/arch.h>  #include <asm/mach/map.h>  #include <asm/mach/time.h> @@ -435,6 +435,7 @@ static void __init v2m_dt_timer_init(void)  	vexpress_clk_of_init(); +	clocksource_of_init();  	do {  		node = of_find_compatible_node(node, NULL, "arm,sp804");  	} while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB); @@ -445,8 +446,7 @@ static void __init v2m_dt_timer_init(void)  				irq_of_parse_and_map(node, 0));  	} -	if (arch_timer_of_register() != 0) -		twd_local_timer_of_register(); +	arch_timer_of_register();  	if (arch_timer_sched_clock_init() != 0)  		versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), diff --git a/arch/arm/mach-virt/platsmp.c b/arch/arm/mach-virt/platsmp.c index 8badaabe70a..f4143f5bfa5 100644 --- a/arch/arm/mach-virt/platsmp.c +++ b/arch/arm/mach-virt/platsmp.c @@ -21,8 +21,6 @@  #include <linux/smp.h>  #include <linux/of.h> -#include <linux/irqchip/arm-gic.h> -  #include <asm/psci.h>  #include <asm/smp_plat.h> @@ -45,14 +43,8 @@ static int __cpuinit virt_boot_secondary(unsigned int cpu,  	return -ENODEV;  } -static void __cpuinit virt_secondary_init(unsigned int cpu) -{ -	gic_secondary_init(0); -} -  struct smp_operations __initdata virt_smp_ops = {  	.smp_init_cpus		= virt_smp_init_cpus,  	.smp_prepare_cpus	= virt_smp_prepare_cpus, -	.smp_secondary_init	= virt_secondary_init,  	.smp_boot_secondary	= virt_boot_secondary,  }; diff --git a/arch/arm/plat-orion/Makefile b/arch/arm/plat-orion/Makefile index a82cecb8494..ad97400ba3a 100644 --- a/arch/arm/plat-orion/Makefile +++ b/arch/arm/plat-orion/Makefile @@ -3,7 +3,11 @@  #  ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -obj-y                             += addr-map.o +obj-$(CONFIG_ARCH_MVEBU)          += addr-map.o +obj-$(CONFIG_ARCH_KIRKWOOD)       += addr-map.o +obj-$(CONFIG_ARCH_DOVE)           += addr-map.o +obj-$(CONFIG_ARCH_ORION5X)        += addr-map.o +obj-$(CONFIG_ARCH_MV78XX0)        += addr-map.o  orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o  obj-$(CONFIG_PLAT_ORION_LEGACY)   += irq.o pcie.o time.o common.o mpp.o diff --git a/arch/arm/plat-orion/pcie.c b/arch/arm/plat-orion/pcie.c index f20a321088a..8b8c06d2e9c 100644 --- a/arch/arm/plat-orion/pcie.c +++ b/arch/arm/plat-orion/pcie.c @@ -120,12 +120,14 @@ void __init orion_pcie_reset(void __iomem *base)   * BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks   * WIN[0-3] -> DRAM bank[0-3]   */ -static void __init orion_pcie_setup_wins(void __iomem *base, -					 struct mbus_dram_target_info *dram) +static void __init orion_pcie_setup_wins(void __iomem *base)  { +	const struct mbus_dram_target_info *dram;  	u32 size;  	int i; +	dram = mv_mbus_dram_info(); +  	/*  	 * First, disable and clear BARs and windows.  	 */ @@ -150,7 +152,7 @@ static void __init orion_pcie_setup_wins(void __iomem *base,  	 */  	size = 0;  	for (i = 0; i < dram->num_cs; i++) { -		struct mbus_dram_window *cs = dram->cs + i; +		const struct mbus_dram_window *cs = dram->cs + i;  		writel(cs->base & 0xffff0000, base + PCIE_WIN04_BASE_OFF(i));  		writel(0, base + PCIE_WIN04_REMAP_OFF(i)); @@ -184,7 +186,7 @@ void __init orion_pcie_setup(void __iomem *base)  	/*  	 * Point PCIe unit MBUS decode windows to DRAM space.  	 */ -	orion_pcie_setup_wins(base, &orion_mbus_dram_info); +	orion_pcie_setup_wins(base);  	/*  	 * Master + slave enable. diff --git a/arch/arm/plat-samsung/include/plat/irq.h b/arch/arm/plat-samsung/include/plat/irq.h deleted file mode 100644 index e21a89bc26c..00000000000 --- a/arch/arm/plat-samsung/include/plat/irq.h +++ /dev/null @@ -1,116 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/irq.h - * - * Copyright (c) 2004-2005 Simtec Electronics - *	Ben Dooks <ben@simtec.co.uk> - * - * Header file for S3C24XX CPU IRQ support - * - * 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 <linux/io.h> - -#include <mach/hardware.h> -#include <mach/regs-irq.h> -#include <mach/regs-gpio.h> - -#define irqdbf(x...) -#define irqdbf2(x...) - -#define EXTINT_OFF (IRQ_EINT4 - 4) - -/* these are exported for arch/arm/mach-* usage */ -extern struct irq_chip s3c_irq_level_chip; -extern struct irq_chip s3c_irq_chip; - -static inline void s3c_irqsub_mask(unsigned int irqno, -				   unsigned int parentbit, -				   int subcheck) -{ -	unsigned long mask; -	unsigned long submask; - -	submask = __raw_readl(S3C2410_INTSUBMSK); -	mask = __raw_readl(S3C2410_INTMSK); - -	submask |= (1UL << (irqno - IRQ_S3CUART_RX0)); - -	/* check to see if we need to mask the parent IRQ */ - -	if ((submask  & subcheck) == subcheck) -		__raw_writel(mask | parentbit, S3C2410_INTMSK); - -	/* write back masks */ -	__raw_writel(submask, S3C2410_INTSUBMSK); - -} - -static inline void s3c_irqsub_unmask(unsigned int irqno, -				     unsigned int parentbit) -{ -	unsigned long mask; -	unsigned long submask; - -	submask = __raw_readl(S3C2410_INTSUBMSK); -	mask = __raw_readl(S3C2410_INTMSK); - -	submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0)); -	mask &= ~parentbit; - -	/* write back masks */ -	__raw_writel(submask, S3C2410_INTSUBMSK); -	__raw_writel(mask, S3C2410_INTMSK); -} - - -static inline void s3c_irqsub_maskack(unsigned int irqno, -				      unsigned int parentmask, -				      unsigned int group) -{ -	unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0); - -	s3c_irqsub_mask(irqno, parentmask, group); - -	__raw_writel(bit, S3C2410_SUBSRCPND); - -	/* only ack parent if we've got all the irqs (seems we must -	 * ack, all and hope that the irq system retriggers ok when -	 * the interrupt goes off again) -	 */ - -	if (1) { -		__raw_writel(parentmask, S3C2410_SRCPND); -		__raw_writel(parentmask, S3C2410_INTPND); -	} -} - -static inline void s3c_irqsub_ack(unsigned int irqno, -				  unsigned int parentmask, -				  unsigned int group) -{ -	unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0); - -	__raw_writel(bit, S3C2410_SUBSRCPND); - -	/* only ack parent if we've got all the irqs (seems we must -	 * ack, all and hope that the irq system retriggers ok when -	 * the interrupt goes off again) -	 */ - -	if (1) { -		__raw_writel(parentmask, S3C2410_SRCPND); -		__raw_writel(parentmask, S3C2410_INTPND); -	} -} - -/* exported for use in arch/arm/mach-s3c2410 */ - -#ifdef CONFIG_PM -extern int s3c_irq_wake(struct irq_data *data, unsigned int state); -#else -#define s3c_irq_wake NULL -#endif - -extern int s3c_irqext_type(struct irq_data *d, unsigned int type); diff --git a/arch/arm/plat-samsung/include/plat/s3c2410.h b/arch/arm/plat-samsung/include/plat/s3c2410.h deleted file mode 100644 index 55b0e5f51e9..00000000000 --- a/arch/arm/plat-samsung/include/plat/s3c2410.h +++ /dev/null @@ -1,31 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s3c2410.h - * - * Copyright (c) 2004 Simtec Electronics - *	Ben Dooks <ben@simtec.co.uk> - * - * Header file for s3c2410 machine directory - * - * 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. - * -*/ - -#ifdef CONFIG_CPU_S3C2410 - -extern  int s3c2410_init(void); -extern  int s3c2410a_init(void); - -extern void s3c2410_map_io(void); - -extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); - -extern void s3c2410_init_clocks(int xtal); - -#else -#define s3c2410_init_clocks NULL -#define s3c2410_init_uarts NULL -#define s3c2410_map_io NULL -#define s3c2410_init NULL -#define s3c2410a_init NULL -#endif diff --git a/arch/arm/plat-samsung/include/plat/s3c2412.h b/arch/arm/plat-samsung/include/plat/s3c2412.h deleted file mode 100644 index cbae50ddacc..00000000000 --- a/arch/arm/plat-samsung/include/plat/s3c2412.h +++ /dev/null @@ -1,32 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s3c2412.h - * - * Copyright (c) 2006 Simtec Electronics - *	Ben Dooks <ben@simtec.co.uk> - * - * Header file for s3c2412 cpu support - * - * 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. -*/ - -#ifdef CONFIG_CPU_S3C2412 - -extern  int s3c2412_init(void); - -extern void s3c2412_map_io(void); - -extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); - -extern void s3c2412_init_clocks(int xtal); - -extern  int s3c2412_baseclk_add(void); - -extern void s3c2412_restart(char mode, const char *cmd); -#else -#define s3c2412_init_clocks NULL -#define s3c2412_init_uarts NULL -#define s3c2412_map_io NULL -#define s3c2412_init NULL -#define s3c2412_restart NULL -#endif diff --git a/arch/arm/plat-samsung/include/plat/s3c2416.h b/arch/arm/plat-samsung/include/plat/s3c2416.h deleted file mode 100644 index f27399a3c68..00000000000 --- a/arch/arm/plat-samsung/include/plat/s3c2416.h +++ /dev/null @@ -1,37 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s3c2416.h - * - * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com> - * - * Header file for s3c2416 cpu support - * - * 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. -*/ - -#ifdef CONFIG_CPU_S3C2416 - -struct s3c2410_uartcfg; - -extern  int s3c2416_init(void); - -extern void s3c2416_map_io(void); - -extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); - -extern void s3c2416_init_clocks(int xtal); - -extern  int s3c2416_baseclk_add(void); - -extern void s3c2416_restart(char mode, const char *cmd); - -extern void s3c2416_init_irq(void); -extern struct syscore_ops s3c2416_irq_syscore_ops; - -#else -#define s3c2416_init_clocks NULL -#define s3c2416_init_uarts NULL -#define s3c2416_map_io NULL -#define s3c2416_init NULL -#define s3c2416_restart NULL -#endif diff --git a/arch/arm/plat-samsung/include/plat/s3c2443.h b/arch/arm/plat-samsung/include/plat/s3c2443.h deleted file mode 100644 index 71b88ec4895..00000000000 --- a/arch/arm/plat-samsung/include/plat/s3c2443.h +++ /dev/null @@ -1,36 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s3c2443.h - * - * Copyright (c) 2004-2005 Simtec Electronics - *	Ben Dooks <ben@simtec.co.uk> - * - * Header file for s3c2443 cpu support - * - * 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. -*/ - -#ifdef CONFIG_CPU_S3C2443 - -struct s3c2410_uartcfg; - -extern  int s3c2443_init(void); - -extern void s3c2443_map_io(void); - -extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); - -extern void s3c2443_init_clocks(int xtal); - -extern  int s3c2443_baseclk_add(void); - -extern void s3c2443_restart(char mode, const char *cmd); - -extern void s3c2443_init_irq(void); -#else -#define s3c2443_init_clocks NULL -#define s3c2443_init_uarts NULL -#define s3c2443_map_io NULL -#define s3c2443_init NULL -#define s3c2443_restart NULL -#endif diff --git a/arch/arm/plat-samsung/include/plat/s3c244x.h b/arch/arm/plat-samsung/include/plat/s3c244x.h deleted file mode 100644 index ea0c961b760..00000000000 --- a/arch/arm/plat-samsung/include/plat/s3c244x.h +++ /dev/null @@ -1,42 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s3c244x.h - * - * Copyright (c) 2004-2005 Simtec Electronics - *	Ben Dooks <ben@simtec.co.uk> - * - * Header file for S3C2440 and S3C2442 cpu support - * - * 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. -*/ - -#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) - -extern void s3c244x_map_io(void); - -extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); - -extern void s3c244x_init_clocks(int xtal); - -#else -#define s3c244x_init_clocks NULL -#define s3c244x_init_uarts NULL -#endif - -#ifdef CONFIG_CPU_S3C2440 -extern  int s3c2440_init(void); - -extern void s3c2440_map_io(void); -#else -#define s3c2440_init NULL -#define s3c2440_map_io NULL -#endif - -#ifdef CONFIG_CPU_S3C2442 -extern  int s3c2442_init(void); - -extern void s3c2442_map_io(void); -#else -#define s3c2442_init NULL -#define s3c2442_map_io NULL -#endif diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c index f980cf3d2ba..5d205e74e49 100644 --- a/arch/arm/plat-samsung/irq-vic-timer.c +++ b/arch/arm/plat-samsung/irq-vic-timer.c @@ -16,6 +16,7 @@  #include <linux/kernel.h>  #include <linux/interrupt.h>  #include <linux/irq.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/io.h>  #include <mach/map.h> @@ -23,8 +24,6 @@  #include <plat/irq-vic-timer.h>  #include <plat/regs-timer.h> -#include <asm/mach/irq.h> -  static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc)  {  	struct irq_chip *chip = irq_get_chip(irq); diff --git a/arch/arm/plat-samsung/s5p-irq-gpioint.c b/arch/arm/plat-samsung/s5p-irq-gpioint.c index bae56131a50..fafdb059043 100644 --- a/arch/arm/plat-samsung/s5p-irq-gpioint.c +++ b/arch/arm/plat-samsung/s5p-irq-gpioint.c @@ -14,6 +14,7 @@  #include <linux/kernel.h>  #include <linux/interrupt.h>  #include <linux/irq.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/io.h>  #include <linux/gpio.h>  #include <linux/slab.h> @@ -22,8 +23,6 @@  #include <plat/gpio-core.h>  #include <plat/gpio-cfg.h> -#include <asm/mach/irq.h> -  #define GPIO_BASE(chip)		((void __iomem *)((unsigned long)((chip)->base) & 0xFFFFF000u))  #define CON_OFFSET		0x700 diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c index f2ac1556177..1e1b2d76974 100644 --- a/arch/arm/plat-versatile/platsmp.c +++ b/arch/arm/plat-versatile/platsmp.c @@ -14,7 +14,6 @@  #include <linux/device.h>  #include <linux/jiffies.h>  #include <linux/smp.h> -#include <linux/irqchip/arm-gic.h>  #include <asm/cacheflush.h>  #include <asm/smp_plat.h> @@ -37,13 +36,6 @@ static DEFINE_SPINLOCK(boot_lock);  void __cpuinit versatile_secondary_init(unsigned int cpu)  {  	/* -	 * if any interrupts are already enabled for the primary -	 * core (e.g. timer irq), then they will not have been enabled -	 * for us: do so -	 */ -	gic_secondary_init(0); - -	/*  	 * let the primary processor know we're out of the  	 * pen, then head off into the C entry point  	 */ diff --git a/drivers/clocksource/bcm2835_timer.c b/drivers/clocksource/bcm2835_timer.c index 50c68fef944..766611d2994 100644 --- a/drivers/clocksource/bcm2835_timer.c +++ b/drivers/clocksource/bcm2835_timer.c @@ -95,23 +95,13 @@ static irqreturn_t bcm2835_time_interrupt(int irq, void *dev_id)  	}  } -static struct of_device_id bcm2835_time_match[] __initconst = { -	{ .compatible = "brcm,bcm2835-system-timer" }, -	{} -}; - -static void __init bcm2835_timer_init(void) +static void __init bcm2835_timer_init(struct device_node *node)  { -	struct device_node *node;  	void __iomem *base;  	u32 freq;  	int irq;  	struct bcm2835_timer *timer; -	node = of_find_matching_node(NULL, bcm2835_time_match); -	if (!node) -		panic("No bcm2835 timer node"); -  	base = of_iomap(node, 0);  	if (!base)  		panic("Can't remap registers"); diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c index bdabdaa8d00..3ef11fba781 100644 --- a/drivers/clocksource/clksrc-of.c +++ b/drivers/clocksource/clksrc-of.c @@ -26,10 +26,10 @@ void __init clocksource_of_init(void)  {  	struct device_node *np;  	const struct of_device_id *match; -	void (*init_func)(void); +	void (*init_func)(struct device_node *);  	for_each_matching_node_and_match(np, __clksrc_of_table, &match) {  		init_func = match->data; -		init_func(); +		init_func(np);  	}  } diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c index 0bde03feb09..2e4d8a666c3 100644 --- a/drivers/clocksource/tegra20_timer.c +++ b/drivers/clocksource/tegra20_timer.c @@ -154,29 +154,12 @@ static struct irqaction tegra_timer_irq = {  	.dev_id		= &tegra_clockevent,  }; -static const struct of_device_id timer_match[] __initconst = { -	{ .compatible = "nvidia,tegra20-timer" }, -	{} -}; - -static const struct of_device_id rtc_match[] __initconst = { -	{ .compatible = "nvidia,tegra20-rtc" }, -	{} -}; - -static void __init tegra20_init_timer(void) +static void __init tegra20_init_timer(struct device_node *np)  { -	struct device_node *np;  	struct clk *clk;  	unsigned long rate;  	int ret; -	np = of_find_matching_node(NULL, timer_match); -	if (!np) { -		pr_err("Failed to find timer DT node\n"); -		BUG(); -	} -  	timer_reg_base = of_iomap(np, 0);  	if (!timer_reg_base) {  		pr_err("Can't map timer registers\n"); @@ -200,30 +183,6 @@ static void __init tegra20_init_timer(void)  	of_node_put(np); -	np = of_find_matching_node(NULL, rtc_match); -	if (!np) { -		pr_err("Failed to find RTC DT node\n"); -		BUG(); -	} - -	rtc_base = of_iomap(np, 0); -	if (!rtc_base) { -		pr_err("Can't map RTC registers"); -		BUG(); -	} - -	/* -	 * rtc registers are used by read_persistent_clock, keep the rtc clock -	 * enabled -	 */ -	clk = clk_get_sys("rtc-tegra", NULL); -	if (IS_ERR(clk)) -		pr_warn("Unable to get rtc-tegra clock\n"); -	else -		clk_prepare_enable(clk); - -	of_node_put(np); -  	switch (rate) {  	case 12000000:  		timer_writel(0x000b, TIMERUS_USEC_CFG); @@ -259,12 +218,34 @@ static void __init tegra20_init_timer(void)  	tegra_clockevent.irq = tegra_timer_irq.irq;  	clockevents_config_and_register(&tegra_clockevent, 1000000,  					0x1, 0x1fffffff); -#ifdef CONFIG_HAVE_ARM_TWD -	twd_local_timer_of_register(); -#endif +} +CLOCKSOURCE_OF_DECLARE(tegra20_timer, "nvidia,tegra20-timer", tegra20_init_timer); + +static void __init tegra20_init_rtc(struct device_node *np) +{ +	struct clk *clk; + +	rtc_base = of_iomap(np, 0); +	if (!rtc_base) { +		pr_err("Can't map RTC registers"); +		BUG(); +	} + +	/* +	 * rtc registers are used by read_persistent_clock, keep the rtc clock +	 * enabled +	 */ +	clk = clk_get_sys("rtc-tegra", NULL); +	if (IS_ERR(clk)) +		pr_warn("Unable to get rtc-tegra clock\n"); +	else +		clk_prepare_enable(clk); + +	of_node_put(np); +  	register_persistent_clock(NULL, tegra_read_persistent_clock);  } -CLOCKSOURCE_OF_DECLARE(tegra20, "nvidia,tegra20-timer", tegra20_init_timer); +CLOCKSOURCE_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc);  #ifdef CONFIG_PM  static u32 usec_config; diff --git a/drivers/clocksource/vt8500_timer.c b/drivers/clocksource/vt8500_timer.c index 8efc86b5b5d..24225528559 100644 --- a/drivers/clocksource/vt8500_timer.c +++ b/drivers/clocksource/vt8500_timer.c @@ -129,22 +129,10 @@ static struct irqaction irq = {  	.dev_id  = &clockevent,  }; -static struct of_device_id vt8500_timer_ids[] = { -	{ .compatible = "via,vt8500-timer" }, -	{ } -}; - -static void __init vt8500_timer_init(void) +static void __init vt8500_timer_init(struct device_node *np)  { -	struct device_node *np;  	int timer_irq; -	np = of_find_matching_node(NULL, vt8500_timer_ids); -	if (!np) { -		pr_err("%s: Timer description missing from Device Tree\n", -								__func__); -		return; -	}  	regbase = of_iomap(np, 0);  	if (!regbase) {  		pr_err("%s: Missing iobase description in Device Tree\n", diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c index 55a7e7769af..dd2eddeb1e0 100644 --- a/drivers/gpio/gpio-msm-v2.c +++ b/drivers/gpio/gpio-msm-v2.c @@ -23,13 +23,12 @@  #include <linux/init.h>  #include <linux/interrupt.h>  #include <linux/io.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/irq.h>  #include <linux/module.h>  #include <linux/platform_device.h>  #include <linux/spinlock.h> -#include <asm/mach/irq.h> -  #include <mach/msm_gpiomux.h>  #include <mach/msm_iomap.h> diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index 7877335c4cc..7176743915d 100644 --- a/drivers/gpio/gpio-mxc.c +++ b/drivers/gpio/gpio-mxc.c @@ -24,6 +24,7 @@  #include <linux/io.h>  #include <linux/irq.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/gpio.h>  #include <linux/platform_device.h>  #include <linux/slab.h> @@ -32,7 +33,6 @@  #include <linux/of_device.h>  #include <linux/module.h>  #include <asm-generic/bug.h> -#include <asm/mach/irq.h>  enum mxc_gpio_hwtype {  	IMX1_GPIO,	/* runs on i.mx1 */ diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 159f5c57eb4..a612ea1c53c 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -25,11 +25,10 @@  #include <linux/of.h>  #include <linux/of_device.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/gpio.h>  #include <linux/platform_data/gpio-omap.h> -#include <asm/mach/irq.h> -  #define OFF_MODE	1  static LIST_HEAD(omap_gpio_list); diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c index b820869ca93..29763361d13 100644 --- a/drivers/gpio/gpio-pl061.c +++ b/drivers/gpio/gpio-pl061.c @@ -15,6 +15,7 @@  #include <linux/io.h>  #include <linux/ioport.h>  #include <linux/irq.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/bitops.h>  #include <linux/workqueue.h>  #include <linux/gpio.h> @@ -23,7 +24,6 @@  #include <linux/amba/pl061.h>  #include <linux/slab.h>  #include <linux/pm.h> -#include <asm/mach/irq.h>  #define GPIODIR 0x400  #define GPIOIS  0x404 diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 9cc108d2b77..7523b6d108d 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -19,6 +19,7 @@  #include <linux/init.h>  #include <linux/irq.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/io.h>  #include <linux/of.h>  #include <linux/of_device.h> @@ -26,8 +27,6 @@  #include <linux/syscore_ops.h>  #include <linux/slab.h> -#include <asm/mach/irq.h> -  #include <mach/irqs.h>  /* diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 414ad912232..8e215554888 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -27,11 +27,10 @@  #include <linux/platform_device.h>  #include <linux/module.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/pinctrl/consumer.h>  #include <linux/pm.h> -#include <asm/mach/irq.h> -  #define GPIO_BANK(x)		((x) >> 5)  #define GPIO_PORT(x)		(((x) >> 3) & 0x3)  #define GPIO_BIT(x)		((x) & 0x7) diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c index 04d86a9803f..6a520135150 100644 --- a/drivers/irqchip/exynos-combiner.c +++ b/drivers/irqchip/exynos-combiner.c @@ -13,6 +13,7 @@  #include <linux/init.h>  #include <linux/io.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/of_address.h>  #include <linux/of_irq.h>  #include <asm/mach/irq.h> diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index a32e0d5aa45..47aea33a078 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -28,6 +28,7 @@  #include <linux/module.h>  #include <linux/list.h>  #include <linux/smp.h> +#include <linux/cpu.h>  #include <linux/cpu_pm.h>  #include <linux/cpumask.h>  #include <linux/io.h> @@ -38,12 +39,12 @@  #include <linux/interrupt.h>  #include <linux/percpu.h>  #include <linux/slab.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/irqchip/arm-gic.h>  #include <asm/irq.h>  #include <asm/exception.h>  #include <asm/smp_plat.h> -#include <asm/mach/irq.h>  #include "irqchip.h" @@ -127,7 +128,7 @@ static inline void gic_set_base_accessor(struct gic_chip_data *data,  #else  #define gic_data_dist_base(d)	((d)->dist_base.common_base)  #define gic_data_cpu_base(d)	((d)->cpu_base.common_base) -#define gic_set_base_accessor(d,f) +#define gic_set_base_accessor(d, f)  #endif  static inline void __iomem *gic_dist_base(struct irq_data *d) @@ -323,7 +324,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)  	cascade_irq = irq_find_mapping(chip_data->domain, gic_irq);  	if (unlikely(gic_irq < 32 || gic_irq > 1020)) -		do_bad_IRQ(cascade_irq, desc); +		handle_bad_irq(cascade_irq, desc);  	else  		generic_handle_irq(cascade_irq); @@ -699,6 +700,25 @@ static int gic_irq_domain_xlate(struct irq_domain *d,  	return 0;  } +#ifdef CONFIG_SMP +static int __cpuinit gic_secondary_init(struct notifier_block *nfb, +					unsigned long action, void *hcpu) +{ +	if (action == CPU_STARTING) +		gic_cpu_init(&gic_data[0]); +	return NOTIFY_OK; +} + +/* + * Notifier for enabling the GIC CPU interface. Set an arbitrarily high + * priority because the GIC needs to be up before the ARM generic timers. + */ +static struct notifier_block __cpuinitdata gic_cpu_notifier = { +	.notifier_call = gic_secondary_init, +	.priority = 100, +}; +#endif +  const struct irq_domain_ops gic_irq_domain_ops = {  	.map = gic_irq_domain_map,  	.xlate = gic_irq_domain_xlate, @@ -789,6 +809,7 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,  #ifdef CONFIG_SMP  	set_smp_cross_call(gic_raise_softirq); +	register_cpu_notifier(&gic_cpu_notifier);  #endif  	set_handle_irq(gic_handle_irq); @@ -799,15 +820,8 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,  	gic_pm_init(gic);  } -void __cpuinit gic_secondary_init(unsigned int gic_nr) -{ -	BUG_ON(gic_nr >= MAX_GIC_NR); - -	gic_cpu_init(&gic_data[gic_nr]); -} -  #ifdef CONFIG_OF -static int gic_cnt __initdata = 0; +static int gic_cnt __initdata;  int __init gic_of_init(struct device_node *node, struct device_node *parent)  { diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c index 3cf97aaebe4..884d11c7355 100644 --- a/drivers/irqchip/irq-vic.c +++ b/drivers/irqchip/irq-vic.c @@ -23,6 +23,7 @@  #include <linux/init.h>  #include <linux/list.h>  #include <linux/io.h> +#include <linux/irq.h>  #include <linux/irqdomain.h>  #include <linux/of.h>  #include <linux/of_address.h> @@ -33,7 +34,7 @@  #include <linux/irqchip/arm-vic.h>  #include <asm/exception.h> -#include <asm/mach/irq.h> +#include <asm/irq.h>  #include "irqchip.h" diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 63fb265e0da..8d6794cdf89 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -25,14 +25,93 @@  #include <mach/dma.h> -#include <mach/regs-sdi.h> -  #include <linux/platform_data/mmc-s3cmci.h>  #include "s3cmci.h"  #define DRIVER_NAME "s3c-mci" +#define S3C2410_SDICON			(0x00) +#define S3C2410_SDIPRE			(0x04) +#define S3C2410_SDICMDARG		(0x08) +#define S3C2410_SDICMDCON		(0x0C) +#define S3C2410_SDICMDSTAT		(0x10) +#define S3C2410_SDIRSP0			(0x14) +#define S3C2410_SDIRSP1			(0x18) +#define S3C2410_SDIRSP2			(0x1C) +#define S3C2410_SDIRSP3			(0x20) +#define S3C2410_SDITIMER		(0x24) +#define S3C2410_SDIBSIZE		(0x28) +#define S3C2410_SDIDCON			(0x2C) +#define S3C2410_SDIDCNT			(0x30) +#define S3C2410_SDIDSTA			(0x34) +#define S3C2410_SDIFSTA			(0x38) + +#define S3C2410_SDIDATA			(0x3C) +#define S3C2410_SDIIMSK			(0x40) + +#define S3C2440_SDIDATA			(0x40) +#define S3C2440_SDIIMSK			(0x3C) + +#define S3C2440_SDICON_SDRESET		(1 << 8) +#define S3C2410_SDICON_SDIOIRQ		(1 << 3) +#define S3C2410_SDICON_FIFORESET	(1 << 1) +#define S3C2410_SDICON_CLOCKTYPE	(1 << 0) + +#define S3C2410_SDICMDCON_LONGRSP	(1 << 10) +#define S3C2410_SDICMDCON_WAITRSP	(1 << 9) +#define S3C2410_SDICMDCON_CMDSTART	(1 << 8) +#define S3C2410_SDICMDCON_SENDERHOST	(1 << 6) +#define S3C2410_SDICMDCON_INDEX		(0x3f) + +#define S3C2410_SDICMDSTAT_CRCFAIL	(1 << 12) +#define S3C2410_SDICMDSTAT_CMDSENT	(1 << 11) +#define S3C2410_SDICMDSTAT_CMDTIMEOUT	(1 << 10) +#define S3C2410_SDICMDSTAT_RSPFIN	(1 << 9) + +#define S3C2440_SDIDCON_DS_WORD		(2 << 22) +#define S3C2410_SDIDCON_TXAFTERRESP	(1 << 20) +#define S3C2410_SDIDCON_RXAFTERCMD	(1 << 19) +#define S3C2410_SDIDCON_BLOCKMODE	(1 << 17) +#define S3C2410_SDIDCON_WIDEBUS		(1 << 16) +#define S3C2410_SDIDCON_DMAEN		(1 << 15) +#define S3C2410_SDIDCON_STOP		(1 << 14) +#define S3C2440_SDIDCON_DATSTART	(1 << 14) + +#define S3C2410_SDIDCON_XFER_RXSTART	(2 << 12) +#define S3C2410_SDIDCON_XFER_TXSTART	(3 << 12) + +#define S3C2410_SDIDCON_BLKNUM_MASK	(0xFFF) + +#define S3C2410_SDIDSTA_SDIOIRQDETECT	(1 << 9) +#define S3C2410_SDIDSTA_FIFOFAIL	(1 << 8) +#define S3C2410_SDIDSTA_CRCFAIL		(1 << 7) +#define S3C2410_SDIDSTA_RXCRCFAIL	(1 << 6) +#define S3C2410_SDIDSTA_DATATIMEOUT	(1 << 5) +#define S3C2410_SDIDSTA_XFERFINISH	(1 << 4) +#define S3C2410_SDIDSTA_TXDATAON	(1 << 1) +#define S3C2410_SDIDSTA_RXDATAON	(1 << 0) + +#define S3C2440_SDIFSTA_FIFORESET	(1 << 16) +#define S3C2440_SDIFSTA_FIFOFAIL	(3 << 14) +#define S3C2410_SDIFSTA_TFDET		(1 << 13) +#define S3C2410_SDIFSTA_RFDET		(1 << 12) +#define S3C2410_SDIFSTA_COUNTMASK	(0x7f) + +#define S3C2410_SDIIMSK_RESPONSECRC	(1 << 17) +#define S3C2410_SDIIMSK_CMDSENT		(1 << 16) +#define S3C2410_SDIIMSK_CMDTIMEOUT	(1 << 15) +#define S3C2410_SDIIMSK_RESPONSEND	(1 << 14) +#define S3C2410_SDIIMSK_SDIOIRQ		(1 << 12) +#define S3C2410_SDIIMSK_FIFOFAIL	(1 << 11) +#define S3C2410_SDIIMSK_CRCSTATUS	(1 << 10) +#define S3C2410_SDIIMSK_DATACRC		(1 << 9) +#define S3C2410_SDIIMSK_DATATIMEOUT	(1 << 8) +#define S3C2410_SDIIMSK_DATAFINISH	(1 << 7) +#define S3C2410_SDIIMSK_TXFIFOHALF	(1 << 4) +#define S3C2410_SDIIMSK_RXFIFOLAST	(1 << 2) +#define S3C2410_SDIIMSK_RXFIFOHALF	(1 << 0) +  enum dbg_channels {  	dbg_err   = (1 << 0),  	dbg_debug = (1 << 1), diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 75933a6aa82..5cbadc9ad2e 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -18,6 +18,7 @@  #include <linux/interrupt.h>  #include <linux/irq.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/io.h>  #include <linux/gpio.h>  #include <linux/pinctrl/machine.h> @@ -27,8 +28,6 @@  /* Since we request GPIOs from ourself */  #include <linux/pinctrl/consumer.h> -#include <asm/mach/irq.h> -  #include <mach/hardware.h>  #include <mach/at91_pio.h> diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c index 538b9ddaadf..7265e551ddd 100644 --- a/drivers/pinctrl/pinctrl-exynos.c +++ b/drivers/pinctrl/pinctrl-exynos.c @@ -23,13 +23,12 @@  #include <linux/interrupt.h>  #include <linux/irqdomain.h>  #include <linux/irq.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/of_irq.h>  #include <linux/io.h>  #include <linux/slab.h>  #include <linux/err.h> -#include <asm/mach/irq.h> -  #include "pinctrl-samsung.h"  #include "pinctrl-exynos.h" diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 36d20293de5..93eba9715e6 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -23,6 +23,7 @@  #include <linux/interrupt.h>  #include <linux/irq.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/slab.h>  #include <linux/of_device.h>  #include <linux/of_address.h> @@ -33,7 +34,6 @@  /* Since we request GPIOs from ourself */  #include <linux/pinctrl/consumer.h>  #include <linux/platform_data/pinctrl-nomadik.h> -#include <asm/mach/irq.h>  #include "pinctrl-nomadik.h"  #include "core.h" diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index d02498b30c6..ab26b4b669d 100644 --- a/drivers/pinctrl/pinctrl-sirf.c +++ b/drivers/pinctrl/pinctrl-sirf.c @@ -14,6 +14,7 @@  #include <linux/slab.h>  #include <linux/err.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/pinctrl/pinctrl.h>  #include <linux/pinctrl/pinmux.h>  #include <linux/pinctrl/consumer.h> @@ -25,7 +26,6 @@  #include <linux/bitops.h>  #include <linux/gpio.h>  #include <linux/of_gpio.h> -#include <asm/mach/irq.h>  #define DRIVER_NAME "pinmux-sirf" diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c index 295b349a05c..a4908ecd74f 100644 --- a/drivers/pinctrl/spear/pinctrl-plgpio.c +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c @@ -15,12 +15,12 @@  #include <linux/io.h>  #include <linux/irq.h>  #include <linux/irqdomain.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/module.h>  #include <linux/pinctrl/consumer.h>  #include <linux/platform_device.h>  #include <linux/pm.h>  #include <linux/spinlock.h> -#include <asm/mach/irq.h>  #define MAX_GPIO_PER_REG		32  #define PIN_OFFSET(pin)			(pin % MAX_GPIO_PER_REG) diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c index 366f259e375..6efe4e1b499 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c @@ -25,8 +25,8 @@  #include <linux/clk.h>  #include <linux/list.h>  #include <linux/irq.h> +#include <linux/irqchip/chained_irq.h>  #include <linux/of_device.h> -#include <asm/mach/irq.h>  #include "imx-ipu-v3.h"  #include "ipu-prv.h" diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 27cfda427dd..08ed5e19d8c 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -340,6 +340,7 @@ extern void clocksource_of_init(void);  		__used __section(__clksrc_of_table)			\  		 = { .compatible = compat, .data = fn };  #else +static inline void clocksource_of_init(void) {}  #define CLOCKSOURCE_OF_DECLARE(name, compat, fn)  #endif diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h index 3fd8e4290a1..3e203eb23cc 100644 --- a/include/linux/irqchip/arm-gic.h +++ b/include/linux/irqchip/arm-gic.h @@ -65,7 +65,6 @@ extern struct irq_chip gic_arch_extn;  void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *,  		    u32 offset, struct device_node *); -void gic_secondary_init(unsigned int);  void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);  static inline void gic_init(unsigned int nr, int start, diff --git a/include/linux/irqchip/chained_irq.h b/include/linux/irqchip/chained_irq.h new file mode 100644 index 00000000000..adf4c30f3af --- /dev/null +++ b/include/linux/irqchip/chained_irq.h @@ -0,0 +1,52 @@ +/* + * Chained IRQ handlers support. + * + * Copyright (C) 2011 ARM Ltd. + * + * 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, see <http://www.gnu.org/licenses/>. + */ +#ifndef __IRQCHIP_CHAINED_IRQ_H +#define __IRQCHIP_CHAINED_IRQ_H + +#include <linux/irq.h> + +/* + * Entry/exit functions for chained handlers where the primary IRQ chip + * may implement either fasteoi or level-trigger flow control. + */ +static inline void chained_irq_enter(struct irq_chip *chip, +				     struct irq_desc *desc) +{ +	/* FastEOI controllers require no action on entry. */ +	if (chip->irq_eoi) +		return; + +	if (chip->irq_mask_ack) { +		chip->irq_mask_ack(&desc->irq_data); +	} else { +		chip->irq_mask(&desc->irq_data); +		if (chip->irq_ack) +			chip->irq_ack(&desc->irq_data); +	} +} + +static inline void chained_irq_exit(struct irq_chip *chip, +				    struct irq_desc *desc) +{ +	if (chip->irq_eoi) +		chip->irq_eoi(&desc->irq_data); +	else +		chip->irq_unmask(&desc->irq_data); +} + +#endif /* __IRQCHIP_CHAINED_IRQ_H */  |