Merge branch 'highbank/soc' into next/soc
Conflicts: arch/arm/mach-mxs/include/mach/gpio.h arch/arm/mach-omap2/board-generic.c arch/arm/plat-mxc/include/mach/gpio.h
This commit is contained in:
		
				commit
				
					
						884897e6a1
					
				
			
		
					 303 changed files with 3024 additions and 2085 deletions
				
			
		
							
								
								
									
										8
									
								
								Documentation/devicetree/bindings/arm/calxeda.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Documentation/devicetree/bindings/arm/calxeda.txt
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					Calxeda Highbank Platforms Device Tree Bindings
 | 
				
			||||||
 | 
					-----------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Boards with Calxeda Cortex-A9 based Highbank SOC shall have the following
 | 
				
			||||||
 | 
					properties.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Required root node properties:
 | 
				
			||||||
 | 
					    - compatible = "calxeda,highbank";
 | 
				
			||||||
							
								
								
									
										44
									
								
								Documentation/devicetree/bindings/arm/l2cc.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								Documentation/devicetree/bindings/arm/l2cc.txt
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,44 @@
 | 
				
			||||||
 | 
					* ARM L2 Cache Controller
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ARM cores often have a separate level 2 cache controller. There are various
 | 
				
			||||||
 | 
					implementations of the L2 cache controller with compatible programming models.
 | 
				
			||||||
 | 
					The ARM L2 cache representation in the device tree should be done as follows:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Required properties:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- compatible : should be one of:
 | 
				
			||||||
 | 
						"arm,pl310-cache"
 | 
				
			||||||
 | 
						"arm,l220-cache"
 | 
				
			||||||
 | 
						"arm,l210-cache"
 | 
				
			||||||
 | 
					- cache-unified : Specifies the cache is a unified cache.
 | 
				
			||||||
 | 
					- cache-level : Should be set to 2 for a level 2 cache.
 | 
				
			||||||
 | 
					- reg : Physical base address and size of cache controller's memory mapped
 | 
				
			||||||
 | 
					  registers.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Optional properties:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- arm,data-latency : Cycles of latency for Data RAM accesses. Specifies 3 cells of
 | 
				
			||||||
 | 
					  read, write and setup latencies. Minimum valid values are 1. Controllers
 | 
				
			||||||
 | 
					  without setup latency control should use a value of 0.
 | 
				
			||||||
 | 
					- arm,tag-latency : Cycles of latency for Tag RAM accesses. Specifies 3 cells of
 | 
				
			||||||
 | 
					  read, write and setup latencies. Controllers without setup latency control
 | 
				
			||||||
 | 
					  should use 0. Controllers without separate read and write Tag RAM latency
 | 
				
			||||||
 | 
					  values should only use the first cell.
 | 
				
			||||||
 | 
					- arm,dirty-latency : Cycles of latency for Dirty RAMs. This is a single cell.
 | 
				
			||||||
 | 
					- arm,filter-ranges : <start length> Starting address and length of window to
 | 
				
			||||||
 | 
					  filter. Addresses in the filter window are directed to the M1 port. Other
 | 
				
			||||||
 | 
					  addresses will go to the M0 port.
 | 
				
			||||||
 | 
					- interrupts : 1 combined interrupt.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					L2: cache-controller {
 | 
				
			||||||
 | 
					        compatible = "arm,pl310-cache";
 | 
				
			||||||
 | 
					        reg = <0xfff12000 0x1000>;
 | 
				
			||||||
 | 
					        arm,data-latency = <1 1 1>;
 | 
				
			||||||
 | 
					        arm,tag-latency = <2 2 2>;
 | 
				
			||||||
 | 
					        arm,filter-latency = <0x80000000 0x8000000>;
 | 
				
			||||||
 | 
					        cache-unified;
 | 
				
			||||||
 | 
					        cache-level = <2>;
 | 
				
			||||||
 | 
						interrupts = <45>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
| 
						 | 
					@ -688,6 +688,12 @@ F:	drivers/mtd/nand/bcm_umi_nand.c
 | 
				
			||||||
F:	drivers/mtd/nand/bcm_umi_bch.c
 | 
					F:	drivers/mtd/nand/bcm_umi_bch.c
 | 
				
			||||||
F:	drivers/mtd/nand/nand_bcm_umi.h
 | 
					F:	drivers/mtd/nand/nand_bcm_umi.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ARM/CALXEDA HIGHBANK ARCHITECTURE
 | 
				
			||||||
 | 
					M:	Rob Herring <rob.herring@calxeda.com>
 | 
				
			||||||
 | 
					L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 | 
				
			||||||
 | 
					S:	Maintained
 | 
				
			||||||
 | 
					F:	arch/arm/mach-highbank/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ARM/CAVIUM NETWORKS CNS3XXX MACHINE SUPPORT
 | 
					ARM/CAVIUM NETWORKS CNS3XXX MACHINE SUPPORT
 | 
				
			||||||
M:	Anton Vorontsov <avorontsov@mvista.com>
 | 
					M:	Anton Vorontsov <avorontsov@mvista.com>
 | 
				
			||||||
S:	Maintained
 | 
					S:	Maintained
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -330,6 +330,20 @@ config ARCH_BCMRING
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
	  Support for Broadcom's BCMRing platform.
 | 
						  Support for Broadcom's BCMRing platform.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					config ARCH_HIGHBANK
 | 
				
			||||||
 | 
						bool "Calxeda Highbank-based"
 | 
				
			||||||
 | 
						select ARCH_WANT_OPTIONAL_GPIOLIB
 | 
				
			||||||
 | 
						select ARM_AMBA
 | 
				
			||||||
 | 
						select ARM_GIC
 | 
				
			||||||
 | 
						select ARM_TIMER_SP804
 | 
				
			||||||
 | 
						select CLKDEV_LOOKUP
 | 
				
			||||||
 | 
						select CPU_V7
 | 
				
			||||||
 | 
						select GENERIC_CLOCKEVENTS
 | 
				
			||||||
 | 
						select HAVE_ARM_SCU
 | 
				
			||||||
 | 
						select USE_OF
 | 
				
			||||||
 | 
						help
 | 
				
			||||||
 | 
						  Support for the Calxeda Highbank SoC based boards.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config ARCH_CLPS711X
 | 
					config ARCH_CLPS711X
 | 
				
			||||||
	bool "Cirrus Logic CLPS711x/EP721x-based"
 | 
						bool "Cirrus Logic CLPS711x/EP721x-based"
 | 
				
			||||||
	select CPU_ARM720T
 | 
						select CPU_ARM720T
 | 
				
			||||||
| 
						 | 
					@ -862,6 +876,7 @@ config ARCH_U300
 | 
				
			||||||
	select CLKDEV_LOOKUP
 | 
						select CLKDEV_LOOKUP
 | 
				
			||||||
	select HAVE_MACH_CLKDEV
 | 
						select HAVE_MACH_CLKDEV
 | 
				
			||||||
	select GENERIC_GPIO
 | 
						select GENERIC_GPIO
 | 
				
			||||||
 | 
						select ARCH_REQUIRE_GPIOLIB
 | 
				
			||||||
	select NEED_MACH_MEMORY_H
 | 
						select NEED_MACH_MEMORY_H
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
	  Support for ST-Ericsson U300 series mobile platforms.
 | 
						  Support for ST-Ericsson U300 series mobile platforms.
 | 
				
			||||||
| 
						 | 
					@ -1402,7 +1417,7 @@ config SMP
 | 
				
			||||||
	depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
 | 
						depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
 | 
				
			||||||
		 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
 | 
							 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
 | 
				
			||||||
		 ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \
 | 
							 ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \
 | 
				
			||||||
		 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE
 | 
							 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE || ARCH_HIGHBANK
 | 
				
			||||||
	select USE_GENERIC_SMP_HELPERS
 | 
						select USE_GENERIC_SMP_HELPERS
 | 
				
			||||||
	select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
 | 
						select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -65,13 +65,78 @@ config DEBUG_USER
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# These options are only for real kernel hackers who want to get their hands dirty.
 | 
					# These options are only for real kernel hackers who want to get their hands dirty.
 | 
				
			||||||
config DEBUG_LL
 | 
					config DEBUG_LL
 | 
				
			||||||
	bool "Kernel low-level debugging functions"
 | 
						bool "Kernel low-level debugging functions (read help!)"
 | 
				
			||||||
	depends on DEBUG_KERNEL
 | 
						depends on DEBUG_KERNEL
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
	  Say Y here to include definitions of printascii, printch, printhex
 | 
						  Say Y here to include definitions of printascii, printch, printhex
 | 
				
			||||||
	  in the kernel.  This is helpful if you are debugging code that
 | 
						  in the kernel.  This is helpful if you are debugging code that
 | 
				
			||||||
	  executes before the console is initialized.
 | 
						  executes before the console is initialized.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						  Note that selecting this option will limit the kernel to a single
 | 
				
			||||||
 | 
						  UART definition, as specified below. Attempting to boot the kernel
 | 
				
			||||||
 | 
						  image on a different platform *will not work*, so this option should
 | 
				
			||||||
 | 
						  not be enabled for kernels that are intended to be portable.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					choice
 | 
				
			||||||
 | 
						prompt "Kernel low-level debugging port"
 | 
				
			||||||
 | 
						depends on DEBUG_LL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config DEBUG_LL_UART_NONE
 | 
				
			||||||
 | 
							bool "No low-level debugging UART"
 | 
				
			||||||
 | 
							help
 | 
				
			||||||
 | 
							  Say Y here if your platform doesn't provide a UART option
 | 
				
			||||||
 | 
							  below. This relies on your platform choosing the right UART
 | 
				
			||||||
 | 
							  definition internally in order for low-level debugging to
 | 
				
			||||||
 | 
							  work.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config DEBUG_ICEDCC
 | 
				
			||||||
 | 
							bool "Kernel low-level debugging via EmbeddedICE DCC channel"
 | 
				
			||||||
 | 
							help
 | 
				
			||||||
 | 
							  Say Y here if you want the debug print routines to direct
 | 
				
			||||||
 | 
							  their output to the EmbeddedICE macrocell's DCC channel using
 | 
				
			||||||
 | 
							  co-processor 14. This is known to work on the ARM9 style ICE
 | 
				
			||||||
 | 
							  channel and on the XScale with the PEEDI.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							  Note that the system will appear to hang during boot if there
 | 
				
			||||||
 | 
							  is nothing connected to read from the DCC.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config DEBUG_FOOTBRIDGE_COM1
 | 
				
			||||||
 | 
							bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1"
 | 
				
			||||||
 | 
							depends on FOOTBRIDGE
 | 
				
			||||||
 | 
							help
 | 
				
			||||||
 | 
							  Say Y here if you want the debug print routines to direct
 | 
				
			||||||
 | 
							  their output to the 8250 at PCI COM1.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config DEBUG_DC21285_PORT
 | 
				
			||||||
 | 
							bool "Kernel low-level debugging messages via footbridge serial port"
 | 
				
			||||||
 | 
							depends on FOOTBRIDGE
 | 
				
			||||||
 | 
							help
 | 
				
			||||||
 | 
							  Say Y here if you want the debug print routines to direct
 | 
				
			||||||
 | 
							  their output to the serial port in the DC21285 (Footbridge).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config DEBUG_CLPS711X_UART1
 | 
				
			||||||
 | 
							bool "Kernel low-level debugging messages via UART1"
 | 
				
			||||||
 | 
							depends on ARCH_CLPS711X
 | 
				
			||||||
 | 
							help
 | 
				
			||||||
 | 
							  Say Y here if you want the debug print routines to direct
 | 
				
			||||||
 | 
							  their output to the first serial port on these devices.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config DEBUG_CLPS711X_UART2
 | 
				
			||||||
 | 
							bool "Kernel low-level debugging messages via UART2"
 | 
				
			||||||
 | 
							depends on ARCH_CLPS711X
 | 
				
			||||||
 | 
							help
 | 
				
			||||||
 | 
							  Say Y here if you want the debug print routines to direct
 | 
				
			||||||
 | 
							  their output to the second serial port on these devices.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config DEBUG_HIGHBANK_UART
 | 
				
			||||||
 | 
							bool "Kernel low-level debugging messages via Highbank UART"
 | 
				
			||||||
 | 
							depends on ARCH_HIGHBANK
 | 
				
			||||||
 | 
							help
 | 
				
			||||||
 | 
							  Say Y here if you want the debug print routines to direct
 | 
				
			||||||
 | 
							  their output to the UART on Highbank based devices.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					endchoice
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config EARLY_PRINTK
 | 
					config EARLY_PRINTK
 | 
				
			||||||
	bool "Early printk"
 | 
						bool "Early printk"
 | 
				
			||||||
	depends on DEBUG_LL
 | 
						depends on DEBUG_LL
 | 
				
			||||||
| 
						 | 
					@ -80,18 +145,6 @@ config EARLY_PRINTK
 | 
				
			||||||
	  kernel low-level debugging functions. Add earlyprintk to your
 | 
						  kernel low-level debugging functions. Add earlyprintk to your
 | 
				
			||||||
	  kernel parameters to enable this console.
 | 
						  kernel parameters to enable this console.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config DEBUG_ICEDCC
 | 
					 | 
				
			||||||
	bool "Kernel low-level debugging via EmbeddedICE DCC channel"
 | 
					 | 
				
			||||||
	depends on DEBUG_LL
 | 
					 | 
				
			||||||
	help
 | 
					 | 
				
			||||||
	  Say Y here if you want the debug print routines to direct their
 | 
					 | 
				
			||||||
	  output to the EmbeddedICE macrocell's DCC channel using
 | 
					 | 
				
			||||||
	  co-processor 14. This is known to work on the ARM9 style ICE
 | 
					 | 
				
			||||||
	  channel and on the XScale with the PEEDI.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	  It does include a timeout to ensure that the system does not
 | 
					 | 
				
			||||||
	  totally freeze when there is nothing connected to read.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
config OC_ETM
 | 
					config OC_ETM
 | 
				
			||||||
	bool "On-chip ETM and ETB"
 | 
						bool "On-chip ETM and ETB"
 | 
				
			||||||
	select ARM_AMBA
 | 
						select ARM_AMBA
 | 
				
			||||||
| 
						 | 
					@ -100,23 +153,6 @@ config OC_ETM
 | 
				
			||||||
	  buffer driver that will allow you to collect traces of the
 | 
						  buffer driver that will allow you to collect traces of the
 | 
				
			||||||
	  kernel code.
 | 
						  kernel code.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config DEBUG_DC21285_PORT
 | 
					 | 
				
			||||||
	bool "Kernel low-level debugging messages via footbridge serial port"
 | 
					 | 
				
			||||||
	depends on DEBUG_LL && FOOTBRIDGE
 | 
					 | 
				
			||||||
	help
 | 
					 | 
				
			||||||
	  Say Y here if you want the debug print routines to direct their
 | 
					 | 
				
			||||||
	  output to the serial port in the DC21285 (Footbridge). Saying N
 | 
					 | 
				
			||||||
	  will cause the debug messages to appear on the first 16550
 | 
					 | 
				
			||||||
	  serial port.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
config DEBUG_CLPS711X_UART2
 | 
					 | 
				
			||||||
	bool "Kernel low-level debugging messages via UART2"
 | 
					 | 
				
			||||||
	depends on DEBUG_LL && ARCH_CLPS711X
 | 
					 | 
				
			||||||
	help
 | 
					 | 
				
			||||||
	  Say Y here if you want the debug print routines to direct their
 | 
					 | 
				
			||||||
	  output to the second serial port on these devices.  Saying N will
 | 
					 | 
				
			||||||
	  cause the debug messages to appear on the first serial port.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
config DEBUG_S3C_UART
 | 
					config DEBUG_S3C_UART
 | 
				
			||||||
	depends on PLAT_SAMSUNG
 | 
						depends on PLAT_SAMSUNG
 | 
				
			||||||
	int "S3C UART to use for low-level debug"
 | 
						int "S3C UART to use for low-level debug"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -144,6 +144,7 @@ machine-$(CONFIG_ARCH_EBSA110)		:= ebsa110
 | 
				
			||||||
machine-$(CONFIG_ARCH_EP93XX)		:= ep93xx
 | 
					machine-$(CONFIG_ARCH_EP93XX)		:= ep93xx
 | 
				
			||||||
machine-$(CONFIG_ARCH_GEMINI)		:= gemini
 | 
					machine-$(CONFIG_ARCH_GEMINI)		:= gemini
 | 
				
			||||||
machine-$(CONFIG_ARCH_H720X)		:= h720x
 | 
					machine-$(CONFIG_ARCH_H720X)		:= h720x
 | 
				
			||||||
 | 
					machine-$(CONFIG_ARCH_HIGHBANK)		:= highbank
 | 
				
			||||||
machine-$(CONFIG_ARCH_INTEGRATOR)	:= integrator
 | 
					machine-$(CONFIG_ARCH_INTEGRATOR)	:= integrator
 | 
				
			||||||
machine-$(CONFIG_ARCH_IOP13XX)		:= iop13xx
 | 
					machine-$(CONFIG_ARCH_IOP13XX)		:= iop13xx
 | 
				
			||||||
machine-$(CONFIG_ARCH_IOP32X)		:= iop32x
 | 
					machine-$(CONFIG_ARCH_IOP32X)		:= iop32x
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										198
									
								
								arch/arm/boot/dts/highbank.dts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										198
									
								
								arch/arm/boot/dts/highbank.dts
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,198 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/dts-v1/;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* First 4KB has pen for secondary cores. */
 | 
				
			||||||
 | 
					/memreserve/ 0x00000000 0x0001000;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						model = "Calxeda Highbank";
 | 
				
			||||||
 | 
						compatible = "calxeda,highbank";
 | 
				
			||||||
 | 
						#address-cells = <1>;
 | 
				
			||||||
 | 
						#size-cells = <1>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						cpus {
 | 
				
			||||||
 | 
							#address-cells = <1>;
 | 
				
			||||||
 | 
							#size-cells = <0>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							cpu@0 {
 | 
				
			||||||
 | 
								compatible = "arm,cortex-a9";
 | 
				
			||||||
 | 
								reg = <0>;
 | 
				
			||||||
 | 
								next-level-cache = <&L2>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							cpu@1 {
 | 
				
			||||||
 | 
								compatible = "arm,cortex-a9";
 | 
				
			||||||
 | 
								reg = <1>;
 | 
				
			||||||
 | 
								next-level-cache = <&L2>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							cpu@2 {
 | 
				
			||||||
 | 
								compatible = "arm,cortex-a9";
 | 
				
			||||||
 | 
								reg = <2>;
 | 
				
			||||||
 | 
								next-level-cache = <&L2>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							cpu@3 {
 | 
				
			||||||
 | 
								compatible = "arm,cortex-a9";
 | 
				
			||||||
 | 
								reg = <3>;
 | 
				
			||||||
 | 
								next-level-cache = <&L2>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						memory {
 | 
				
			||||||
 | 
							name = "memory";
 | 
				
			||||||
 | 
							device_type = "memory";
 | 
				
			||||||
 | 
							reg = <0x00000000 0xff900000>;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						chosen {
 | 
				
			||||||
 | 
							bootargs = "console=ttyAMA0";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						soc {
 | 
				
			||||||
 | 
							#address-cells = <1>;
 | 
				
			||||||
 | 
							#size-cells = <1>;
 | 
				
			||||||
 | 
							compatible = "simple-bus";
 | 
				
			||||||
 | 
							interrupt-parent = <&intc>;
 | 
				
			||||||
 | 
							ranges;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							timer@fff10600 {
 | 
				
			||||||
 | 
								compatible = "arm,smp-twd";
 | 
				
			||||||
 | 
								reg = <0xfff10600 0x20>;
 | 
				
			||||||
 | 
								interrupts = <1 13 0xf04>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							watchdog@fff10620 {
 | 
				
			||||||
 | 
								compatible = "arm,cortex-a9-wdt";
 | 
				
			||||||
 | 
								reg = <0xfff10620 0x20>;
 | 
				
			||||||
 | 
								interrupts = <1 14 0xf04>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							intc: interrupt-controller@fff11000 {
 | 
				
			||||||
 | 
								compatible = "arm,cortex-a9-gic";
 | 
				
			||||||
 | 
								#interrupt-cells = <3>;
 | 
				
			||||||
 | 
								#size-cells = <0>;
 | 
				
			||||||
 | 
								#address-cells = <1>;
 | 
				
			||||||
 | 
								interrupt-controller;
 | 
				
			||||||
 | 
								interrupt-parent;
 | 
				
			||||||
 | 
								reg = <0xfff11000 0x1000>,
 | 
				
			||||||
 | 
								      <0xfff10100 0x100>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							L2: l2-cache {
 | 
				
			||||||
 | 
								compatible = "arm,pl310-cache";
 | 
				
			||||||
 | 
								reg = <0xfff12000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 70 4>;
 | 
				
			||||||
 | 
								cache-unified;
 | 
				
			||||||
 | 
								cache-level = <2>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							pmu {
 | 
				
			||||||
 | 
								compatible = "arm,cortex-a9-pmu";
 | 
				
			||||||
 | 
								interrupts = <0 76 4  0 75 4  0 74 4  0 73 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							sata@ffe08000 {
 | 
				
			||||||
 | 
								compatible = "calxeda,hb-ahci";
 | 
				
			||||||
 | 
								reg = <0xffe08000 0x10000>;
 | 
				
			||||||
 | 
								interrupts = <0 83 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							sdhci@ffe0e000 {
 | 
				
			||||||
 | 
								compatible = "calxeda,hb-sdhci";
 | 
				
			||||||
 | 
								reg = <0xffe0e000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 90 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ipc@fff20000 {
 | 
				
			||||||
 | 
								compatible = "arm,pl320", "arm,primecell";
 | 
				
			||||||
 | 
								reg = <0xfff20000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 7 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							gpioe: gpio@fff30000 {
 | 
				
			||||||
 | 
								#gpio-cells = <2>;
 | 
				
			||||||
 | 
								compatible = "arm,pl061", "arm,primecell";
 | 
				
			||||||
 | 
								gpio-controller;
 | 
				
			||||||
 | 
								reg = <0xfff30000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 14 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							gpiof: gpio@fff31000 {
 | 
				
			||||||
 | 
								#gpio-cells = <2>;
 | 
				
			||||||
 | 
								compatible = "arm,pl061", "arm,primecell";
 | 
				
			||||||
 | 
								gpio-controller;
 | 
				
			||||||
 | 
								reg = <0xfff31000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 15 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							gpiog: gpio@fff32000 {
 | 
				
			||||||
 | 
								#gpio-cells = <2>;
 | 
				
			||||||
 | 
								compatible = "arm,pl061", "arm,primecell";
 | 
				
			||||||
 | 
								gpio-controller;
 | 
				
			||||||
 | 
								reg = <0xfff32000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 16 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							gpioh: gpio@fff33000 {
 | 
				
			||||||
 | 
								#gpio-cells = <2>;
 | 
				
			||||||
 | 
								compatible = "arm,pl061", "arm,primecell";
 | 
				
			||||||
 | 
								gpio-controller;
 | 
				
			||||||
 | 
								reg = <0xfff33000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 17 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							timer {
 | 
				
			||||||
 | 
								compatible = "arm,sp804", "arm,primecell";
 | 
				
			||||||
 | 
								reg = <0xfff34000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 18 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							rtc@fff35000 {
 | 
				
			||||||
 | 
								compatible = "arm,pl031", "arm,primecell";
 | 
				
			||||||
 | 
								reg = <0xfff35000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 19 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							serial@fff36000 {
 | 
				
			||||||
 | 
								compatible = "arm,pl011", "arm,primecell";
 | 
				
			||||||
 | 
								reg = <0xfff36000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 20 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							smic@fff3a000 {
 | 
				
			||||||
 | 
								compatible = "ipmi-smic";
 | 
				
			||||||
 | 
								device_type = "ipmi";
 | 
				
			||||||
 | 
								reg = <0xfff3a000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 24 4>;
 | 
				
			||||||
 | 
								reg-size = <4>;
 | 
				
			||||||
 | 
								reg-spacing = <4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							sregs@fff3c000 {
 | 
				
			||||||
 | 
								compatible = "calxeda,hb-sregs";
 | 
				
			||||||
 | 
								reg = <0xfff3c000 0x1000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							dma@fff3d000 {
 | 
				
			||||||
 | 
								compatible = "arm,pl330", "arm,primecell";
 | 
				
			||||||
 | 
								reg = <0xfff3d000 0x1000>;
 | 
				
			||||||
 | 
								interrupts = <0 92 4>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
| 
						 | 
					@ -12,11 +12,11 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/device.h>
 | 
					#include <linux/device.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/string.h>
 | 
					#include <linux/string.h>
 | 
				
			||||||
#include <linux/slab.h>
 | 
					#include <linux/slab.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
#include <asm/gpio.h>
 | 
					 | 
				
			||||||
#include <asm/hardware/scoop.h>
 | 
					#include <asm/hardware/scoop.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* PCMCIA to Scoop linkage
 | 
					/* PCMCIA to Scoop linkage
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -161,7 +161,6 @@ struct expansion_card {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Private internal data */
 | 
						/* Private internal data */
 | 
				
			||||||
	const char		*card_desc;	/* Card description		*/
 | 
						const char		*card_desc;	/* Card description		*/
 | 
				
			||||||
	CONST unsigned int	podaddr;	/* Base Linux address for card	*/
 | 
					 | 
				
			||||||
	CONST loader_t		loader;		/* loader program */
 | 
						CONST loader_t		loader;		/* loader program */
 | 
				
			||||||
	u64			dma_mask;
 | 
						u64			dma_mask;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,4 +4,23 @@
 | 
				
			||||||
/* not all ARM platforms necessarily support this API ... */
 | 
					/* not all ARM platforms necessarily support this API ... */
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					#include <mach/gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __ARM_GPIOLIB_COMPLEX
 | 
				
			||||||
 | 
					/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
 | 
				
			||||||
 | 
					#include <asm-generic/gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* The trivial gpiolib dispatchers */
 | 
				
			||||||
 | 
					#define gpio_get_value  __gpio_get_value
 | 
				
			||||||
 | 
					#define gpio_set_value  __gpio_set_value
 | 
				
			||||||
 | 
					#define gpio_cansleep   __gpio_cansleep
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Provide a default gpio_to_irq() which should satisfy every case.
 | 
				
			||||||
 | 
					 * However, some platforms want to do this differently, so allow them
 | 
				
			||||||
 | 
					 * to override it.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#ifndef gpio_to_irq
 | 
				
			||||||
 | 
					#define gpio_to_irq	__gpio_to_irq
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* _ARCH_ARM_GPIO_H */
 | 
					#endif /* _ARCH_ARM_GPIO_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,6 +52,8 @@
 | 
				
			||||||
#define L2X0_LOCKDOWN_WAY_D_BASE	0x900
 | 
					#define L2X0_LOCKDOWN_WAY_D_BASE	0x900
 | 
				
			||||||
#define L2X0_LOCKDOWN_WAY_I_BASE	0x904
 | 
					#define L2X0_LOCKDOWN_WAY_I_BASE	0x904
 | 
				
			||||||
#define L2X0_LOCKDOWN_STRIDE		0x08
 | 
					#define L2X0_LOCKDOWN_STRIDE		0x08
 | 
				
			||||||
 | 
					#define L2X0_ADDR_FILTER_START		0xC00
 | 
				
			||||||
 | 
					#define L2X0_ADDR_FILTER_END		0xC04
 | 
				
			||||||
#define L2X0_TEST_OPERATION		0xF00
 | 
					#define L2X0_TEST_OPERATION		0xF00
 | 
				
			||||||
#define L2X0_LINE_DATA			0xF10
 | 
					#define L2X0_LINE_DATA			0xF10
 | 
				
			||||||
#define L2X0_LINE_TAG			0xF30
 | 
					#define L2X0_LINE_TAG			0xF30
 | 
				
			||||||
| 
						 | 
					@ -65,8 +67,23 @@
 | 
				
			||||||
#define L2X0_CACHE_ID_PART_MASK		(0xf << 6)
 | 
					#define L2X0_CACHE_ID_PART_MASK		(0xf << 6)
 | 
				
			||||||
#define L2X0_CACHE_ID_PART_L210		(1 << 6)
 | 
					#define L2X0_CACHE_ID_PART_L210		(1 << 6)
 | 
				
			||||||
#define L2X0_CACHE_ID_PART_L310		(3 << 6)
 | 
					#define L2X0_CACHE_ID_PART_L310		(3 << 6)
 | 
				
			||||||
 | 
					#define L2X0_CACHE_ID_RTL_MASK          0x3f
 | 
				
			||||||
 | 
					#define L2X0_CACHE_ID_RTL_R0P0          0x0
 | 
				
			||||||
 | 
					#define L2X0_CACHE_ID_RTL_R1P0          0x2
 | 
				
			||||||
 | 
					#define L2X0_CACHE_ID_RTL_R2P0          0x4
 | 
				
			||||||
 | 
					#define L2X0_CACHE_ID_RTL_R3P0          0x5
 | 
				
			||||||
 | 
					#define L2X0_CACHE_ID_RTL_R3P1          0x6
 | 
				
			||||||
 | 
					#define L2X0_CACHE_ID_RTL_R3P2          0x8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define L2X0_AUX_CTRL_MASK			0xc0000fff
 | 
					#define L2X0_AUX_CTRL_MASK			0xc0000fff
 | 
				
			||||||
 | 
					#define L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT	0
 | 
				
			||||||
 | 
					#define L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK	0x7
 | 
				
			||||||
 | 
					#define L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT	3
 | 
				
			||||||
 | 
					#define L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK	(0x7 << 3)
 | 
				
			||||||
 | 
					#define L2X0_AUX_CTRL_TAG_LATENCY_SHIFT		6
 | 
				
			||||||
 | 
					#define L2X0_AUX_CTRL_TAG_LATENCY_MASK		(0x7 << 6)
 | 
				
			||||||
 | 
					#define L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT	9
 | 
				
			||||||
 | 
					#define L2X0_AUX_CTRL_DIRTY_LATENCY_MASK	(0x7 << 9)
 | 
				
			||||||
#define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT	16
 | 
					#define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT	16
 | 
				
			||||||
#define L2X0_AUX_CTRL_WAY_SIZE_SHIFT		17
 | 
					#define L2X0_AUX_CTRL_WAY_SIZE_SHIFT		17
 | 
				
			||||||
#define L2X0_AUX_CTRL_WAY_SIZE_MASK		(0x7 << 17)
 | 
					#define L2X0_AUX_CTRL_WAY_SIZE_MASK		(0x7 << 17)
 | 
				
			||||||
| 
						 | 
					@ -77,8 +94,40 @@
 | 
				
			||||||
#define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT	29
 | 
					#define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT	29
 | 
				
			||||||
#define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT		30
 | 
					#define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT		30
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define L2X0_LATENCY_CTRL_SETUP_SHIFT	0
 | 
				
			||||||
 | 
					#define L2X0_LATENCY_CTRL_RD_SHIFT	4
 | 
				
			||||||
 | 
					#define L2X0_LATENCY_CTRL_WR_SHIFT	8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define L2X0_ADDR_FILTER_EN		1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ASSEMBLY__
 | 
					#ifndef __ASSEMBLY__
 | 
				
			||||||
extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
 | 
					extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
 | 
				
			||||||
 | 
					#if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF)
 | 
				
			||||||
 | 
					extern int l2x0_of_init(__u32 aux_val, __u32 aux_mask);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					static inline int l2x0_of_init(__u32 aux_val, __u32 aux_mask)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return -ENODEV;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct l2x0_regs {
 | 
				
			||||||
 | 
						unsigned long phy_base;
 | 
				
			||||||
 | 
						unsigned long aux_ctrl;
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * Whether the following registers need to be saved/restored
 | 
				
			||||||
 | 
						 * depends on platform
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						unsigned long tag_latency;
 | 
				
			||||||
 | 
						unsigned long data_latency;
 | 
				
			||||||
 | 
						unsigned long filter_start;
 | 
				
			||||||
 | 
						unsigned long filter_end;
 | 
				
			||||||
 | 
						unsigned long prefetch_ctrl;
 | 
				
			||||||
 | 
						unsigned long pwr_ctrl;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern struct l2x0_regs l2x0_saved_regs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif /* __ASSEMBLY__ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,6 +28,8 @@
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <asm-generic/gpio.h>
 | 
					#include <asm-generic/gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define __ARM_GPIOLIB_COMPLEX
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define IOP3XX_N_GPIOS	8
 | 
					#define IOP3XX_N_GPIOS	8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline int gpio_get_value(unsigned gpio)
 | 
					static inline int gpio_get_value(unsigned gpio)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -109,6 +109,27 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <mach/io.h>
 | 
					#include <mach/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * This is the limit of PC card/PCI/ISA IO space, which is by default
 | 
				
			||||||
 | 
					 * 64K if we have PC card, PCI or ISA support.  Otherwise, default to
 | 
				
			||||||
 | 
					 * zero to prevent ISA/PCI drivers claiming IO space (and potentially
 | 
				
			||||||
 | 
					 * oopsing.)
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Only set this larger if you really need inb() et.al. to operate over
 | 
				
			||||||
 | 
					 * a larger address space.  Note that SOC_COMMON ioremaps each sockets
 | 
				
			||||||
 | 
					 * IO space area, and so inb() et.al. must be defined to operate as per
 | 
				
			||||||
 | 
					 * readb() et.al. on such platforms.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#ifndef IO_SPACE_LIMIT
 | 
				
			||||||
 | 
					#if defined(CONFIG_PCMCIA_SOC_COMMON) || defined(CONFIG_PCMCIA_SOC_COMMON_MODULE)
 | 
				
			||||||
 | 
					#define IO_SPACE_LIMIT ((resource_size_t)0xffffffff)
 | 
				
			||||||
 | 
					#elif defined(CONFIG_PCI) || defined(CONFIG_ISA) || defined(CONFIG_PCCARD)
 | 
				
			||||||
 | 
					#define IO_SPACE_LIMIT ((resource_size_t)0xffff)
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					#define IO_SPACE_LIMIT ((resource_size_t)0)
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  IO port access primitives
 | 
					 *  IO port access primitives
 | 
				
			||||||
 *  -------------------------
 | 
					 *  -------------------------
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,6 +34,7 @@ struct outer_cache_fns {
 | 
				
			||||||
	void (*sync)(void);
 | 
						void (*sync)(void);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	void (*set_debug)(unsigned long);
 | 
						void (*set_debug)(unsigned long);
 | 
				
			||||||
 | 
						void (*resume)(void);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_OUTER_CACHE
 | 
					#ifdef CONFIG_OUTER_CACHE
 | 
				
			||||||
| 
						 | 
					@ -74,6 +75,12 @@ static inline void outer_disable(void)
 | 
				
			||||||
		outer_cache.disable();
 | 
							outer_cache.disable();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void outer_resume(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (outer_cache.resume)
 | 
				
			||||||
 | 
							outer_cache.resume();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
 | 
					static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
#include <asm/thread_info.h>
 | 
					#include <asm/thread_info.h>
 | 
				
			||||||
#include <asm/memory.h>
 | 
					#include <asm/memory.h>
 | 
				
			||||||
#include <asm/procinfo.h>
 | 
					#include <asm/procinfo.h>
 | 
				
			||||||
 | 
					#include <asm/hardware/cache-l2x0.h>
 | 
				
			||||||
#include <linux/kbuild.h>
 | 
					#include <linux/kbuild.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					@ -92,6 +93,17 @@ int main(void)
 | 
				
			||||||
  DEFINE(S_OLD_R0,		offsetof(struct pt_regs, ARM_ORIG_r0));
 | 
					  DEFINE(S_OLD_R0,		offsetof(struct pt_regs, ARM_ORIG_r0));
 | 
				
			||||||
  DEFINE(S_FRAME_SIZE,		sizeof(struct pt_regs));
 | 
					  DEFINE(S_FRAME_SIZE,		sizeof(struct pt_regs));
 | 
				
			||||||
  BLANK();
 | 
					  BLANK();
 | 
				
			||||||
 | 
					#ifdef CONFIG_CACHE_L2X0
 | 
				
			||||||
 | 
					  DEFINE(L2X0_R_PHY_BASE,	offsetof(struct l2x0_regs, phy_base));
 | 
				
			||||||
 | 
					  DEFINE(L2X0_R_AUX_CTRL,	offsetof(struct l2x0_regs, aux_ctrl));
 | 
				
			||||||
 | 
					  DEFINE(L2X0_R_TAG_LATENCY,	offsetof(struct l2x0_regs, tag_latency));
 | 
				
			||||||
 | 
					  DEFINE(L2X0_R_DATA_LATENCY,	offsetof(struct l2x0_regs, data_latency));
 | 
				
			||||||
 | 
					  DEFINE(L2X0_R_FILTER_START,	offsetof(struct l2x0_regs, filter_start));
 | 
				
			||||||
 | 
					  DEFINE(L2X0_R_FILTER_END,	offsetof(struct l2x0_regs, filter_end));
 | 
				
			||||||
 | 
					  DEFINE(L2X0_R_PREFETCH_CTRL,	offsetof(struct l2x0_regs, prefetch_ctrl));
 | 
				
			||||||
 | 
					  DEFINE(L2X0_R_PWR_CTRL,	offsetof(struct l2x0_regs, pwr_ctrl));
 | 
				
			||||||
 | 
					  BLANK();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#ifdef CONFIG_CPU_HAS_ASID
 | 
					#ifdef CONFIG_CPU_HAS_ASID
 | 
				
			||||||
  DEFINE(MM_CONTEXT_ID,		offsetof(struct mm_struct, context.id));
 | 
					  DEFINE(MM_CONTEXT_ID,		offsetof(struct mm_struct, context.id));
 | 
				
			||||||
  BLANK();
 | 
					  BLANK();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -237,7 +237,7 @@ static void ecard_init_pgtables(struct mm_struct *mm)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE));
 | 
						memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	src_pgd = pgd_offset(mm, EASI_BASE);
 | 
						src_pgd = pgd_offset(mm, (unsigned long)EASI_BASE);
 | 
				
			||||||
	dst_pgd = pgd_offset(mm, EASI_START);
 | 
						dst_pgd = pgd_offset(mm, EASI_START);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE));
 | 
						memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE));
 | 
				
			||||||
| 
						 | 
					@ -674,44 +674,37 @@ static int __init ecard_probeirqhw(void)
 | 
				
			||||||
#define ecard_probeirqhw() (0)
 | 
					#define ecard_probeirqhw() (0)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef IO_EC_MEMC8_BASE
 | 
					static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed)
 | 
				
			||||||
#define IO_EC_MEMC8_BASE 0
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	unsigned long address = 0;
 | 
						void __iomem *address = NULL;
 | 
				
			||||||
	int slot = ec->slot_no;
 | 
						int slot = ec->slot_no;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (ec->slot_no == 8)
 | 
						if (ec->slot_no == 8)
 | 
				
			||||||
		return IO_EC_MEMC8_BASE;
 | 
							return ECARD_MEMC8_BASE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ectcr &= ~(1 << slot);
 | 
						ectcr &= ~(1 << slot);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	switch (type) {
 | 
						switch (type) {
 | 
				
			||||||
	case ECARD_MEMC:
 | 
						case ECARD_MEMC:
 | 
				
			||||||
		if (slot < 4)
 | 
							if (slot < 4)
 | 
				
			||||||
			address = IO_EC_MEMC_BASE + (slot << 12);
 | 
								address = ECARD_MEMC_BASE + (slot << 14);
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	case ECARD_IOC:
 | 
						case ECARD_IOC:
 | 
				
			||||||
		if (slot < 4)
 | 
							if (slot < 4)
 | 
				
			||||||
			address = IO_EC_IOC_BASE + (slot << 12);
 | 
								address = ECARD_IOC_BASE + (slot << 14);
 | 
				
			||||||
#ifdef IO_EC_IOC4_BASE
 | 
					 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			address = IO_EC_IOC4_BASE + ((slot - 4) << 12);
 | 
								address = ECARD_IOC4_BASE + ((slot - 4) << 14);
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
		if (address)
 | 
							if (address)
 | 
				
			||||||
			address +=  speed << 17;
 | 
								address += speed << 19;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef IO_EC_EASI_BASE
 | 
					 | 
				
			||||||
	case ECARD_EASI:
 | 
						case ECARD_EASI:
 | 
				
			||||||
		address = IO_EC_EASI_BASE + (slot << 22);
 | 
							address = ECARD_EASI_BASE + (slot << 24);
 | 
				
			||||||
		if (speed == ECARD_FAST)
 | 
							if (speed == ECARD_FAST)
 | 
				
			||||||
			ectcr |= 1 << slot;
 | 
								ectcr |= 1 << slot;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
#endif
 | 
					
 | 
				
			||||||
	default:
 | 
						default:
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -990,6 +983,7 @@ ecard_probe(int slot, card_type_t type)
 | 
				
			||||||
	ecard_t **ecp;
 | 
						ecard_t **ecp;
 | 
				
			||||||
	ecard_t *ec;
 | 
						ecard_t *ec;
 | 
				
			||||||
	struct ex_ecid cid;
 | 
						struct ex_ecid cid;
 | 
				
			||||||
 | 
						void __iomem *addr;
 | 
				
			||||||
	int i, rc;
 | 
						int i, rc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ec = ecard_alloc_card(type, slot);
 | 
						ec = ecard_alloc_card(type, slot);
 | 
				
			||||||
| 
						 | 
					@ -999,7 +993,7 @@ ecard_probe(int slot, card_type_t type)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	rc = -ENODEV;
 | 
						rc = -ENODEV;
 | 
				
			||||||
	if ((ec->podaddr = __ecard_address(ec, type, ECARD_SYNC)) == 0)
 | 
						if ((addr = __ecard_address(ec, type, ECARD_SYNC)) == NULL)
 | 
				
			||||||
		goto nodev;
 | 
							goto nodev;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cid.r_zero = 1;
 | 
						cid.r_zero = 1;
 | 
				
			||||||
| 
						 | 
					@ -1019,7 +1013,7 @@ ecard_probe(int slot, card_type_t type)
 | 
				
			||||||
	ec->cid.fiqmask = cid.r_fiqmask;
 | 
						ec->cid.fiqmask = cid.r_fiqmask;
 | 
				
			||||||
	ec->cid.fiqoff  = ecard_gets24(cid.r_fiqoff);
 | 
						ec->cid.fiqoff  = ecard_gets24(cid.r_fiqoff);
 | 
				
			||||||
	ec->fiqaddr	=
 | 
						ec->fiqaddr	=
 | 
				
			||||||
	ec->irqaddr	= (void __iomem *)ioaddr(ec->podaddr);
 | 
						ec->irqaddr	= addr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (ec->cid.is) {
 | 
						if (ec->cid.is) {
 | 
				
			||||||
		ec->irqmask = ec->cid.irqmask;
 | 
							ec->irqmask = ec->cid.irqmask;
 | 
				
			||||||
| 
						 | 
					@ -1048,10 +1042,8 @@ ecard_probe(int slot, card_type_t type)
 | 
				
			||||||
		set_irq_flags(ec->irq, IRQF_VALID);
 | 
							set_irq_flags(ec->irq, IRQF_VALID);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef IO_EC_MEMC8_BASE
 | 
					 | 
				
			||||||
	if (slot == 8)
 | 
						if (slot == 8)
 | 
				
			||||||
		ec->irq = 11;
 | 
							ec->irq = 11;
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifdef CONFIG_ARCH_RPC
 | 
					#ifdef CONFIG_ARCH_RPC
 | 
				
			||||||
	/* On RiscPC, only first two slots have DMA capability */
 | 
						/* On RiscPC, only first two slots have DMA capability */
 | 
				
			||||||
	if (slot < 2)
 | 
						if (slot < 2)
 | 
				
			||||||
| 
						 | 
					@ -1097,9 +1089,7 @@ static int __init ecard_init(void)
 | 
				
			||||||
			ecard_probe(slot, ECARD_IOC);
 | 
								ecard_probe(slot, ECARD_IOC);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef IO_EC_MEMC8_BASE
 | 
					 | 
				
			||||||
	ecard_probe(8, ECARD_IOC);
 | 
						ecard_probe(8, ECARD_IOC);
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	irqhw = ecard_probeirqhw();
 | 
						irqhw = ecard_probeirqhw();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,6 +16,7 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/i2c-gpio.h>
 | 
					#include <linux/i2c-gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,7 +24,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/cpu.h>
 | 
					#include <mach/cpu.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91cap9.h>
 | 
					#include <mach/at91cap9.h>
 | 
				
			||||||
#include <mach/at91cap9_matrix.h>
 | 
					#include <mach/at91cap9_matrix.h>
 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,11 +14,11 @@
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/i2c-gpio.h>
 | 
					#include <linux/i2c-gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91rm9200.h>
 | 
					#include <mach/at91rm9200.h>
 | 
				
			||||||
#include <mach/at91rm9200_mc.h>
 | 
					#include <mach/at91rm9200_mc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,11 +13,11 @@
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/i2c-gpio.h>
 | 
					#include <linux/i2c-gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/cpu.h>
 | 
					#include <mach/cpu.h>
 | 
				
			||||||
#include <mach/at91sam9260.h>
 | 
					#include <mach/at91sam9260.h>
 | 
				
			||||||
#include <mach/at91sam9260_matrix.h>
 | 
					#include <mach/at91sam9260_matrix.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,6 +14,7 @@
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/i2c-gpio.h>
 | 
					#include <linux/i2c-gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,7 +22,6 @@
 | 
				
			||||||
#include <video/atmel_lcdc.h>
 | 
					#include <video/atmel_lcdc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9261.h>
 | 
					#include <mach/at91sam9261.h>
 | 
				
			||||||
#include <mach/at91sam9261_matrix.h>
 | 
					#include <mach/at91sam9261_matrix.h>
 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,7 @@
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/i2c-gpio.h>
 | 
					#include <linux/i2c-gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +21,6 @@
 | 
				
			||||||
#include <video/atmel_lcdc.h>
 | 
					#include <video/atmel_lcdc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9263.h>
 | 
					#include <mach/at91sam9263.h>
 | 
				
			||||||
#include <mach/at91sam9263_matrix.h>
 | 
					#include <mach/at91sam9263_matrix.h>
 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,7 @@
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/i2c-gpio.h>
 | 
					#include <linux/i2c-gpio.h>
 | 
				
			||||||
#include <linux/atmel-mci.h>
 | 
					#include <linux/atmel-mci.h>
 | 
				
			||||||
| 
						 | 
					@ -21,7 +22,6 @@
 | 
				
			||||||
#include <video/atmel_lcdc.h>
 | 
					#include <video/atmel_lcdc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9g45.h>
 | 
					#include <mach/at91sam9g45.h>
 | 
				
			||||||
#include <mach/at91sam9g45_matrix.h>
 | 
					#include <mach/at91sam9g45_matrix.h>
 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,6 +10,7 @@
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/i2c-gpio.h>
 | 
					#include <linux/i2c-gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,7 +18,6 @@
 | 
				
			||||||
#include <video/atmel_lcdc.h>
 | 
					#include <video/atmel_lcdc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9rl.h>
 | 
					#include <mach/at91sam9rl.h>
 | 
				
			||||||
#include <mach/at91sam9rl_matrix.h>
 | 
					#include <mach/at91sam9rl_matrix.h>
 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -34,7 +35,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/cpu.h>
 | 
					#include <mach/cpu.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -43,7 +44,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -38,7 +39,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "sam9_smc.h"
 | 
					#include "sam9_smc.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,6 +22,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -41,7 +42,6 @@
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91cap9_matrix.h>
 | 
					#include <mach/at91cap9_matrix.h>
 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/system_rev.h>
 | 
					#include <mach/system_rev.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -35,7 +36,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -40,7 +41,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/at91sam9260_matrix.h>
 | 
					#include <mach/at91sam9260_matrix.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -36,7 +37,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91rm9200_mc.h>
 | 
					#include <mach/at91rm9200_mc.h>
 | 
				
			||||||
#include <mach/cpu.h>
 | 
					#include <mach/cpu.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -38,7 +39,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
| 
						 | 
					@ -35,7 +36,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -35,7 +36,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -37,7 +38,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/cpu.h>
 | 
					#include <mach/cpu.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -34,7 +35,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/cpu.h>
 | 
					#include <mach/cpu.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -35,7 +36,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/cpu.h>
 | 
					#include <mach/cpu.h>
 | 
				
			||||||
#include <mach/at91rm9200_mc.h>
 | 
					#include <mach/at91rm9200_mc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -44,7 +45,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "sam9_smc.h"
 | 
					#include "sam9_smc.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -37,7 +38,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91rm9200_mc.h>
 | 
					#include <mach/at91rm9200_mc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -40,7 +41,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/at91_shdwc.h>
 | 
					#include <mach/at91_shdwc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,6 +22,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -39,7 +40,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91rm9200_mc.h>
 | 
					#include <mach/at91rm9200_mc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,6 +22,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -39,7 +40,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91rm9200_mc.h>
 | 
					#include <mach/at91rm9200_mc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -37,7 +38,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "sam9_smc.h"
 | 
					#include "sam9_smc.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -41,7 +42,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/at91_shdwc.h>
 | 
					#include <mach/at91_shdwc.h>
 | 
				
			||||||
#include <mach/system_rev.h>
 | 
					#include <mach/system_rev.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -45,7 +46,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/at91_shdwc.h>
 | 
					#include <mach/at91_shdwc.h>
 | 
				
			||||||
#include <mach/system_rev.h>
 | 
					#include <mach/system_rev.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -44,7 +45,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/at91_shdwc.h>
 | 
					#include <mach/at91_shdwc.h>
 | 
				
			||||||
#include <mach/system_rev.h>
 | 
					#include <mach/system_rev.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,6 +18,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -41,7 +42,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/system_rev.h>
 | 
					#include <mach/system_rev.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,6 +14,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -38,7 +39,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/at91_shdwc.h>
 | 
					#include <mach/at91_shdwc.h>
 | 
				
			||||||
#include <mach/system_rev.h>
 | 
					#include <mach/system_rev.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,6 +8,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -30,7 +31,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/at91_shdwc.h>
 | 
					#include <mach/at91_shdwc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -40,7 +41,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/at91_shdwc.h>
 | 
					#include <mach/at91_shdwc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -39,7 +40,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91sam9_smc.h>
 | 
					#include <mach/at91sam9_smc.h>
 | 
				
			||||||
#include <mach/at91_shdwc.h>
 | 
					#include <mach/at91_shdwc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,6 +22,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -43,7 +44,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/at91rm9200_mc.h>
 | 
					#include <mach/at91rm9200_mc.h>
 | 
				
			||||||
#include <mach/cpu.h>
 | 
					#include <mach/cpu.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
#include <linux/errno.h>
 | 
					#include <linux/errno.h>
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/interrupt.h>
 | 
					#include <linux/interrupt.h>
 | 
				
			||||||
#include <linux/irq.h>
 | 
					#include <linux/irq.h>
 | 
				
			||||||
#include <linux/debugfs.h>
 | 
					#include <linux/debugfs.h>
 | 
				
			||||||
| 
						 | 
					@ -22,9 +23,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/at91_pio.h>
 | 
					#include <mach/at91_pio.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <asm/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -214,11 +214,6 @@ extern void at91_gpio_resume(void);
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/errno.h>
 | 
					#include <asm/errno.h>
 | 
				
			||||||
#include <asm-generic/gpio.h>		/* cansleep wrappers */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define gpio_get_value	__gpio_get_value
 | 
					 | 
				
			||||||
#define gpio_set_value	__gpio_set_value
 | 
					 | 
				
			||||||
#define gpio_cansleep	__gpio_cansleep
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define gpio_to_irq(gpio) (gpio)
 | 
					#define gpio_to_irq(gpio) (gpio)
 | 
				
			||||||
#define irq_to_gpio(irq)  (irq)
 | 
					#define irq_to_gpio(irq)  (irq)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,13 +9,13 @@
 | 
				
			||||||
 * 2 of the License, or (at your option) any later version.
 | 
					 * 2 of the License, or (at your option) any later version.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/board.h>
 | 
					#include <mach/board.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* ------------------------------------------------------------------------- */
 | 
					/* ------------------------------------------------------------------------- */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,6 +10,7 @@
 | 
				
			||||||
 * (at your option) any later version.
 | 
					 * (at your option) any later version.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/suspend.h>
 | 
					#include <linux/suspend.h>
 | 
				
			||||||
#include <linux/sched.h>
 | 
					#include <linux/sched.h>
 | 
				
			||||||
#include <linux/proc_fs.h>
 | 
					#include <linux/proc_fs.h>
 | 
				
			||||||
| 
						 | 
					@ -25,7 +26,6 @@
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/at91_pmc.h>
 | 
					#include <mach/at91_pmc.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/cpu.h>
 | 
					#include <mach/cpu.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "generic.h"
 | 
					#include "generic.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Common objects
 | 
					# Common objects
 | 
				
			||||||
obj-y 			:= time.o clock.o serial.o io.o psc.o \
 | 
					obj-y 			:= time.o clock.o serial.o io.o psc.o \
 | 
				
			||||||
			   gpio.o dma.o usb.o common.o sram.o aemif.o
 | 
								   dma.o usb.o common.o sram.o aemif.o
 | 
				
			||||||
 | 
					
 | 
				
			||||||
obj-$(CONFIG_DAVINCI_MUX)		+= mux.o
 | 
					obj-$(CONFIG_DAVINCI_MUX)		+= mux.o
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,7 +17,6 @@ obj-$(CONFIG_ARCH_DAVINCI_DM365)	+= dm365.o devices.o
 | 
				
			||||||
obj-$(CONFIG_ARCH_DAVINCI_DA830)        += da830.o devices-da8xx.o
 | 
					obj-$(CONFIG_ARCH_DAVINCI_DA830)        += da830.o devices-da8xx.o
 | 
				
			||||||
obj-$(CONFIG_ARCH_DAVINCI_DA850)        += da850.o devices-da8xx.o
 | 
					obj-$(CONFIG_ARCH_DAVINCI_DA850)        += da850.o devices-da8xx.o
 | 
				
			||||||
obj-$(CONFIG_ARCH_DAVINCI_TNETV107X)    += tnetv107x.o devices-tnetv107x.o
 | 
					obj-$(CONFIG_ARCH_DAVINCI_TNETV107X)    += tnetv107x.o devices-tnetv107x.o
 | 
				
			||||||
obj-$(CONFIG_ARCH_DAVINCI_TNETV107X)    += gpio-tnetv107x.o
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
obj-$(CONFIG_AINTC)			+= irq.o
 | 
					obj-$(CONFIG_AINTC)			+= irq.o
 | 
				
			||||||
obj-$(CONFIG_CP_INTC)			+= cp_intc.o
 | 
					obj-$(CONFIG_CP_INTC)			+= cp_intc.o
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,6 +8,7 @@
 | 
				
			||||||
 * is licensed "as is" without any warranty of any kind, whether express
 | 
					 * is licensed "as is" without any warranty of any kind, whether express
 | 
				
			||||||
 * or implied.
 | 
					 * or implied.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,7 +20,7 @@
 | 
				
			||||||
#include <mach/common.h>
 | 
					#include <mach/common.h>
 | 
				
			||||||
#include <mach/time.h>
 | 
					#include <mach/time.h>
 | 
				
			||||||
#include <mach/da8xx.h>
 | 
					#include <mach/da8xx.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					#include <mach/gpio-davinci.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "clock.h"
 | 
					#include "clock.h"
 | 
				
			||||||
#include "mux.h"
 | 
					#include "mux.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,7 @@
 | 
				
			||||||
 * is licensed "as is" without any warranty of any kind, whether express
 | 
					 * is licensed "as is" without any warranty of any kind, whether express
 | 
				
			||||||
 * or implied.
 | 
					 * or implied.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
| 
						 | 
					@ -27,7 +28,7 @@
 | 
				
			||||||
#include <mach/da8xx.h>
 | 
					#include <mach/da8xx.h>
 | 
				
			||||||
#include <mach/cpufreq.h>
 | 
					#include <mach/cpufreq.h>
 | 
				
			||||||
#include <mach/pm.h>
 | 
					#include <mach/pm.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					#include <mach/gpio-davinci.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "clock.h"
 | 
					#include "clock.h"
 | 
				
			||||||
#include "mux.h"
 | 
					#include "mux.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,6 @@
 | 
				
			||||||
#include <linux/serial_8250.h>
 | 
					#include <linux/serial_8250.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
#include <linux/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/spi/spi.h>
 | 
					#include <linux/spi/spi.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,6 +29,7 @@
 | 
				
			||||||
#include <mach/common.h>
 | 
					#include <mach/common.h>
 | 
				
			||||||
#include <mach/asp.h>
 | 
					#include <mach/asp.h>
 | 
				
			||||||
#include <mach/spi.h>
 | 
					#include <mach/spi.h>
 | 
				
			||||||
 | 
					#include <mach/gpio-davinci.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "clock.h"
 | 
					#include "clock.h"
 | 
				
			||||||
#include "mux.h"
 | 
					#include "mux.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,7 +17,6 @@
 | 
				
			||||||
#include <linux/serial_8250.h>
 | 
					#include <linux/serial_8250.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
#include <linux/gpio.h>
 | 
					 | 
				
			||||||
#include <linux/spi/spi.h>
 | 
					#include <linux/spi/spi.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
| 
						 | 
					@ -34,7 +33,7 @@
 | 
				
			||||||
#include <mach/asp.h>
 | 
					#include <mach/asp.h>
 | 
				
			||||||
#include <mach/keyscan.h>
 | 
					#include <mach/keyscan.h>
 | 
				
			||||||
#include <mach/spi.h>
 | 
					#include <mach/spi.h>
 | 
				
			||||||
 | 
					#include <mach/gpio-davinci.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "clock.h"
 | 
					#include "clock.h"
 | 
				
			||||||
#include "mux.h"
 | 
					#include "mux.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,6 @@
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
#include <linux/serial_8250.h>
 | 
					#include <linux/serial_8250.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,6 +25,7 @@
 | 
				
			||||||
#include <mach/serial.h>
 | 
					#include <mach/serial.h>
 | 
				
			||||||
#include <mach/common.h>
 | 
					#include <mach/common.h>
 | 
				
			||||||
#include <mach/asp.h>
 | 
					#include <mach/asp.h>
 | 
				
			||||||
 | 
					#include <mach/gpio-davinci.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "clock.h"
 | 
					#include "clock.h"
 | 
				
			||||||
#include "mux.h"
 | 
					#include "mux.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,6 @@
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
#include <linux/serial_8250.h>
 | 
					#include <linux/serial_8250.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/gpio.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,6 +26,7 @@
 | 
				
			||||||
#include <mach/serial.h>
 | 
					#include <mach/serial.h>
 | 
				
			||||||
#include <mach/common.h>
 | 
					#include <mach/common.h>
 | 
				
			||||||
#include <mach/asp.h>
 | 
					#include <mach/asp.h>
 | 
				
			||||||
 | 
					#include <mach/gpio-davinci.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "clock.h"
 | 
					#include "clock.h"
 | 
				
			||||||
#include "mux.h"
 | 
					#include "mux.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										91
									
								
								arch/arm/mach-davinci/include/mach/gpio-davinci.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								arch/arm/mach-davinci/include/mach/gpio-davinci.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,91 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * TI DaVinci GPIO Support
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Copyright (c) 2006 David Brownell
 | 
				
			||||||
 | 
					 * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify
 | 
				
			||||||
 | 
					 * it under the terms of the GNU General Public License as published by
 | 
				
			||||||
 | 
					 * the Free Software Foundation; either version 2 of the License, or
 | 
				
			||||||
 | 
					 * (at your option) any later version.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef	__DAVINCI_DAVINCI_GPIO_H
 | 
				
			||||||
 | 
					#define	__DAVINCI_DAVINCI_GPIO_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <linux/io.h>
 | 
				
			||||||
 | 
					#include <linux/spinlock.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <asm-generic/gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <mach/irqs.h>
 | 
				
			||||||
 | 
					#include <mach/common.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define DAVINCI_GPIO_BASE 0x01C67000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					enum davinci_gpio_type {
 | 
				
			||||||
 | 
						GPIO_TYPE_DAVINCI = 0,
 | 
				
			||||||
 | 
						GPIO_TYPE_TNETV107X,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * basic gpio routines
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * board-specific init should be done by arch/.../.../board-XXX.c (maybe
 | 
				
			||||||
 | 
					 * initializing banks together) rather than boot loaders; kexec() won't
 | 
				
			||||||
 | 
					 * go through boot loaders.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * the gpio clock will be turned on when gpios are used, and you may also
 | 
				
			||||||
 | 
					 * need to pay attention to PINMUX registers to be sure those pins are
 | 
				
			||||||
 | 
					 * used as gpios, not with other peripherals.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * On-chip GPIOs are numbered 0..(DAVINCI_N_GPIO-1).  For documentation,
 | 
				
			||||||
 | 
					 * and maybe for later updates, code may write GPIO(N).  These may be
 | 
				
			||||||
 | 
					 * all 1.8V signals, all 3.3V ones, or a mix of the two.  A given chip
 | 
				
			||||||
 | 
					 * may not support all the GPIOs in that range.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * GPIOs can also be on external chips, numbered after the ones built-in
 | 
				
			||||||
 | 
					 * to the DaVinci chip.  For now, they won't be usable as IRQ sources.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#define	GPIO(X)		(X)		/* 0 <= X <= (DAVINCI_N_GPIO - 1) */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Convert GPIO signal to GPIO pin number */
 | 
				
			||||||
 | 
					#define GPIO_TO_PIN(bank, gpio)	(16 * (bank) + (gpio))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct davinci_gpio_controller {
 | 
				
			||||||
 | 
						struct gpio_chip	chip;
 | 
				
			||||||
 | 
						int			irq_base;
 | 
				
			||||||
 | 
						spinlock_t		lock;
 | 
				
			||||||
 | 
						void __iomem		*regs;
 | 
				
			||||||
 | 
						void __iomem		*set_data;
 | 
				
			||||||
 | 
						void __iomem		*clr_data;
 | 
				
			||||||
 | 
						void __iomem		*in_data;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* The __gpio_to_controller() and __gpio_mask() functions inline to constants
 | 
				
			||||||
 | 
					 * with constant parameters; or in outlined code they execute at runtime.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * You'd access the controller directly when reading or writing more than
 | 
				
			||||||
 | 
					 * one gpio value at a time, and to support wired logic where the value
 | 
				
			||||||
 | 
					 * being driven by the cpu need not match the value read back.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * These are NOT part of the cross-platform GPIO interface
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					static inline struct davinci_gpio_controller *
 | 
				
			||||||
 | 
					__gpio_to_controller(unsigned gpio)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct davinci_gpio_controller *ctlrs = davinci_soc_info.gpio_ctlrs;
 | 
				
			||||||
 | 
						int index = gpio / 32;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!ctlrs || index >= davinci_soc_info.gpio_ctlrs_num)
 | 
				
			||||||
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return ctlrs + index;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline u32 __gpio_mask(unsigned gpio)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return 1 << (gpio % 32);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif	/* __DAVINCI_DAVINCI_GPIO_H */
 | 
				
			||||||
| 
						 | 
					@ -13,80 +13,10 @@
 | 
				
			||||||
#ifndef	__DAVINCI_GPIO_H
 | 
					#ifndef	__DAVINCI_GPIO_H
 | 
				
			||||||
#define	__DAVINCI_GPIO_H
 | 
					#define	__DAVINCI_GPIO_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/io.h>
 | 
					 | 
				
			||||||
#include <linux/spinlock.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <asm-generic/gpio.h>
 | 
					#include <asm-generic/gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/irqs.h>
 | 
					/* The inline versions use the static inlines in the driver header */
 | 
				
			||||||
#include <mach/common.h>
 | 
					#include "gpio-davinci.h"
 | 
				
			||||||
 | 
					 | 
				
			||||||
#define DAVINCI_GPIO_BASE 0x01C67000
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
enum davinci_gpio_type {
 | 
					 | 
				
			||||||
	GPIO_TYPE_DAVINCI = 0,
 | 
					 | 
				
			||||||
	GPIO_TYPE_TNETV107X,
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * basic gpio routines
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * board-specific init should be done by arch/.../.../board-XXX.c (maybe
 | 
					 | 
				
			||||||
 * initializing banks together) rather than boot loaders; kexec() won't
 | 
					 | 
				
			||||||
 * go through boot loaders.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * the gpio clock will be turned on when gpios are used, and you may also
 | 
					 | 
				
			||||||
 * need to pay attention to PINMUX registers to be sure those pins are
 | 
					 | 
				
			||||||
 * used as gpios, not with other peripherals.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * On-chip GPIOs are numbered 0..(DAVINCI_N_GPIO-1).  For documentation,
 | 
					 | 
				
			||||||
 * and maybe for later updates, code may write GPIO(N).  These may be
 | 
					 | 
				
			||||||
 * all 1.8V signals, all 3.3V ones, or a mix of the two.  A given chip
 | 
					 | 
				
			||||||
 * may not support all the GPIOs in that range.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * GPIOs can also be on external chips, numbered after the ones built-in
 | 
					 | 
				
			||||||
 * to the DaVinci chip.  For now, they won't be usable as IRQ sources.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#define	GPIO(X)		(X)		/* 0 <= X <= (DAVINCI_N_GPIO - 1) */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Convert GPIO signal to GPIO pin number */
 | 
					 | 
				
			||||||
#define GPIO_TO_PIN(bank, gpio)	(16 * (bank) + (gpio))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct davinci_gpio_controller {
 | 
					 | 
				
			||||||
	struct gpio_chip	chip;
 | 
					 | 
				
			||||||
	int			irq_base;
 | 
					 | 
				
			||||||
	spinlock_t		lock;
 | 
					 | 
				
			||||||
	void __iomem		*regs;
 | 
					 | 
				
			||||||
	void __iomem		*set_data;
 | 
					 | 
				
			||||||
	void __iomem		*clr_data;
 | 
					 | 
				
			||||||
	void __iomem		*in_data;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* The __gpio_to_controller() and __gpio_mask() functions inline to constants
 | 
					 | 
				
			||||||
 * with constant parameters; or in outlined code they execute at runtime.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You'd access the controller directly when reading or writing more than
 | 
					 | 
				
			||||||
 * one gpio value at a time, and to support wired logic where the value
 | 
					 | 
				
			||||||
 * being driven by the cpu need not match the value read back.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * These are NOT part of the cross-platform GPIO interface
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
static inline struct davinci_gpio_controller *
 | 
					 | 
				
			||||||
__gpio_to_controller(unsigned gpio)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct davinci_gpio_controller *ctlrs = davinci_soc_info.gpio_ctlrs;
 | 
					 | 
				
			||||||
	int index = gpio / 32;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!ctlrs || index >= davinci_soc_info.gpio_ctlrs_num)
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return ctlrs + index;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline u32 __gpio_mask(unsigned gpio)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return 1 << (gpio % 32);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * The get/set/clear functions will inline when called with constant
 | 
					 * The get/set/clear functions will inline when called with constant
 | 
				
			||||||
| 
						 | 
					@ -147,11 +77,6 @@ static inline int gpio_cansleep(unsigned gpio)
 | 
				
			||||||
		return __gpio_cansleep(gpio);
 | 
							return __gpio_cansleep(gpio);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline int gpio_to_irq(unsigned gpio)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return __gpio_to_irq(gpio);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline int irq_to_gpio(unsigned irq)
 | 
					static inline int irq_to_gpio(unsigned irq)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	/* don't support the reverse mapping */
 | 
						/* don't support the reverse mapping */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,6 +12,7 @@
 | 
				
			||||||
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 * GNU General Public License for more details.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
| 
						 | 
					@ -27,9 +28,9 @@
 | 
				
			||||||
#include <mach/psc.h>
 | 
					#include <mach/psc.h>
 | 
				
			||||||
#include <mach/cp_intc.h>
 | 
					#include <mach/cp_intc.h>
 | 
				
			||||||
#include <mach/irqs.h>
 | 
					#include <mach/irqs.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/tnetv107x.h>
 | 
					#include <mach/tnetv107x.h>
 | 
				
			||||||
 | 
					#include <mach/gpio-davinci.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "clock.h"
 | 
					#include "clock.h"
 | 
				
			||||||
#include "mux.h"
 | 
					#include "mux.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,8 +13,6 @@
 | 
				
			||||||
#ifndef __ASM_ARM_ARCH_IO_H
 | 
					#ifndef __ASM_ARM_ARCH_IO_H
 | 
				
			||||||
#define __ASM_ARM_ARCH_IO_H
 | 
					#define __ASM_ARM_ARCH_IO_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define IO_SPACE_LIMIT 0xffff
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
u8 __inb8(unsigned int port);
 | 
					u8 __inb8(unsigned int port);
 | 
				
			||||||
void __outb8(u8  val, unsigned int port);
 | 
					void __outb8(u8  val, unsigned int port);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,6 +38,7 @@
 | 
				
			||||||
#include <mach/fb.h>
 | 
					#include <mach/fb.h>
 | 
				
			||||||
#include <mach/ep93xx_keypad.h>
 | 
					#include <mach/ep93xx_keypad.h>
 | 
				
			||||||
#include <mach/ep93xx_spi.h>
 | 
					#include <mach/ep93xx_spi.h>
 | 
				
			||||||
 | 
					#include <mach/gpio-ep93xx.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
#include <asm/mach/time.h>
 | 
					#include <asm/mach/time.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,6 +37,7 @@
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/fb.h>
 | 
					#include <mach/fb.h>
 | 
				
			||||||
#include <mach/ep93xx_spi.h>
 | 
					#include <mach/ep93xx_spi.h>
 | 
				
			||||||
 | 
					#include <mach/gpio-ep93xx.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/mach-types.h>
 | 
					#include <asm/mach-types.h>
 | 
				
			||||||
#include <asm/mach/arch.h>
 | 
					#include <asm/mach/arch.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,7 @@
 | 
				
			||||||
/*
 | 
					/* Include file for the EP93XX GPIO controller machine specifics */
 | 
				
			||||||
 * arch/arm/mach-ep93xx/include/mach/gpio.h
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ASM_ARCH_GPIO_H
 | 
					#ifndef __GPIO_EP93XX_H
 | 
				
			||||||
#define __ASM_ARCH_GPIO_H
 | 
					#define __GPIO_EP93XX_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* GPIO port A.  */
 | 
					/* GPIO port A.  */
 | 
				
			||||||
#define EP93XX_GPIO_LINE_A(x)		((x) + 0)
 | 
					#define EP93XX_GPIO_LINE_A(x)		((x) + 0)
 | 
				
			||||||
| 
						 | 
					@ -99,22 +97,4 @@
 | 
				
			||||||
/* maximum value for irq capable line identifiers */
 | 
					/* maximum value for irq capable line identifiers */
 | 
				
			||||||
#define EP93XX_GPIO_LINE_MAX_IRQ	EP93XX_GPIO_LINE_F(7)
 | 
					#define EP93XX_GPIO_LINE_MAX_IRQ	EP93XX_GPIO_LINE_F(7)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* new generic GPIO API - see Documentation/gpio.txt */
 | 
					#endif /* __GPIO_EP93XX_H */
 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <asm-generic/gpio.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define gpio_get_value	__gpio_get_value
 | 
					 | 
				
			||||||
#define gpio_set_value	__gpio_set_value
 | 
					 | 
				
			||||||
#define gpio_cansleep	__gpio_cansleep
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * Map GPIO A0..A7  (0..7)  to irq 64..71,
 | 
					 | 
				
			||||||
 *          B0..B7  (7..15) to irq 72..79, and
 | 
					 | 
				
			||||||
 *          F0..F7 (16..24) to irq 80..87.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#define gpio_to_irq(gpio)	\
 | 
					 | 
				
			||||||
	(((gpio) <= EP93XX_GPIO_LINE_MAX_IRQ) ? (64 + (gpio)) : -EINVAL)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define irq_to_gpio(irq)	((irq) - gpio_to_irq(0))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
| 
						 | 
					@ -18,12 +18,12 @@
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/gpio.h>
 | 
					 | 
				
			||||||
#include <linux/i2c.h>
 | 
					#include <linux/i2c.h>
 | 
				
			||||||
#include <linux/i2c-gpio.h>
 | 
					#include <linux/i2c-gpio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/fb.h>
 | 
					#include <mach/fb.h>
 | 
				
			||||||
 | 
					#include <mach/gpio-ep93xx.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/mach-types.h>
 | 
					#include <asm/mach-types.h>
 | 
				
			||||||
#include <asm/mach/arch.h>
 | 
					#include <asm/mach/arch.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,6 @@
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
#include <linux/gpio.h>
 | 
					 | 
				
			||||||
#include <linux/i2c.h>
 | 
					#include <linux/i2c.h>
 | 
				
			||||||
#include <linux/i2c-gpio.h>
 | 
					#include <linux/i2c-gpio.h>
 | 
				
			||||||
#include <linux/fb.h>
 | 
					#include <linux/fb.h>
 | 
				
			||||||
| 
						 | 
					@ -30,6 +29,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/fb.h>
 | 
					#include <mach/fb.h>
 | 
				
			||||||
 | 
					#include <mach/gpio-ep93xx.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/mach-types.h>
 | 
					#include <asm/mach-types.h>
 | 
				
			||||||
#include <asm/mach/arch.h>
 | 
					#include <asm/mach/arch.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,11 +13,6 @@
 | 
				
			||||||
#ifndef __ASM_ARCH_GPIO_H
 | 
					#ifndef __ASM_ARCH_GPIO_H
 | 
				
			||||||
#define __ASM_ARCH_GPIO_H __FILE__
 | 
					#define __ASM_ARCH_GPIO_H __FILE__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define gpio_get_value	__gpio_get_value
 | 
					 | 
				
			||||||
#define gpio_set_value	__gpio_set_value
 | 
					 | 
				
			||||||
#define gpio_cansleep	__gpio_cansleep
 | 
					 | 
				
			||||||
#define gpio_to_irq	__gpio_to_irq
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Practically, GPIO banks up to GPZ are the configurable gpio banks */
 | 
					/* Practically, GPIO banks up to GPZ are the configurable gpio banks */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* GPIO bank sizes */
 | 
					/* GPIO bank sizes */
 | 
				
			||||||
| 
						 | 
					@ -151,6 +146,4 @@ enum s5p_gpio_number {
 | 
				
			||||||
#define ARCH_NR_GPIOS		(EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) +	\
 | 
					#define ARCH_NR_GPIOS		(EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) +	\
 | 
				
			||||||
				 CONFIG_SAMSUNG_GPIO_EXTRA + 1)
 | 
									 CONFIG_SAMSUNG_GPIO_EXTRA + 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm-generic/gpio.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* __ASM_ARCH_GPIO_H */
 | 
					#endif /* __ASM_ARCH_GPIO_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,8 +23,6 @@
 | 
				
			||||||
#define PCIO_SIZE       0x00100000
 | 
					#define PCIO_SIZE       0x00100000
 | 
				
			||||||
#define PCIO_BASE       MMU_IO(0xff000000, 0x7c000000)
 | 
					#define PCIO_BASE       MMU_IO(0xff000000, 0x7c000000)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define IO_SPACE_LIMIT 0xffff
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Translation of various region addresses to virtual addresses
 | 
					 * Translation of various region addresses to virtual addresses
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,11 +13,6 @@
 | 
				
			||||||
#define __MACH_GPIO_H__
 | 
					#define __MACH_GPIO_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/irqs.h>
 | 
					#include <mach/irqs.h>
 | 
				
			||||||
#include <asm-generic/gpio.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define gpio_get_value	__gpio_get_value
 | 
					 | 
				
			||||||
#define gpio_set_value	__gpio_set_value
 | 
					 | 
				
			||||||
#define gpio_cansleep	__gpio_cansleep
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define gpio_to_irq(x)	((x) + GPIO_IRQ_BASE)
 | 
					#define gpio_to_irq(x)	((x) + GPIO_IRQ_BASE)
 | 
				
			||||||
#define irq_to_gpio(x)	((x) - GPIO_IRQ_BASE)
 | 
					#define irq_to_gpio(x)	((x) - GPIO_IRQ_BASE)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										6
									
								
								arch/arm/mach-highbank/Makefile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								arch/arm/mach-highbank/Makefile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					obj-y					:= clock.o highbank.o system.o
 | 
				
			||||||
 | 
					obj-$(CONFIG_DEBUG_HIGHBANK_UART)	+= lluart.o
 | 
				
			||||||
 | 
					obj-$(CONFIG_SMP)			+= platsmp.o
 | 
				
			||||||
 | 
					obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
 | 
				
			||||||
 | 
					obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
 | 
				
			||||||
 | 
					obj-$(CONFIG_PM_SLEEP)			+= pm.o
 | 
				
			||||||
							
								
								
									
										1
									
								
								arch/arm/mach-highbank/Makefile.boot
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								arch/arm/mach-highbank/Makefile.boot
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					zreladdr-y	:= 0x00008000
 | 
				
			||||||
							
								
								
									
										62
									
								
								arch/arm/mach-highbank/clock.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								arch/arm/mach-highbank/clock.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,62 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/module.h>
 | 
				
			||||||
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
 | 
					#include <linux/errno.h>
 | 
				
			||||||
 | 
					#include <linux/clk.h>
 | 
				
			||||||
 | 
					#include <linux/clkdev.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct clk {
 | 
				
			||||||
 | 
						unsigned long rate;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int clk_enable(struct clk *clk)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void clk_disable(struct clk *clk)
 | 
				
			||||||
 | 
					{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					unsigned long clk_get_rate(struct clk *clk)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return clk->rate;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					long clk_round_rate(struct clk *clk, unsigned long rate)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return clk->rate;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int clk_set_rate(struct clk *clk, unsigned long rate)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static struct clk eclk = { .rate = 200000000 };
 | 
				
			||||||
 | 
					static struct clk pclk = { .rate = 150000000 };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static struct clk_lookup lookups[] = {
 | 
				
			||||||
 | 
						{ .clk = &pclk, .con_id = "apb_pclk", },
 | 
				
			||||||
 | 
						{ .clk = &pclk, .dev_id = "sp804", },
 | 
				
			||||||
 | 
						{ .clk = &eclk, .dev_id = "ffe0e000.sdhci", },
 | 
				
			||||||
 | 
						{ .clk = &pclk, .dev_id = "fff36000.serial", },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void __init highbank_clocks_init(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						clkdev_add_table(lookups, ARRAY_SIZE(lookups));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										9
									
								
								arch/arm/mach-highbank/core.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								arch/arm/mach-highbank/core.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,9 @@
 | 
				
			||||||
 | 
					extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
 | 
				
			||||||
 | 
					extern void highbank_clocks_init(void);
 | 
				
			||||||
 | 
					extern void __iomem *scu_base_addr;
 | 
				
			||||||
 | 
					#ifdef CONFIG_DEBUG_HIGHBANK_UART
 | 
				
			||||||
 | 
					extern void highbank_lluart_map_io(void);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					static inline void highbank_lluart_map_io(void) {}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										145
									
								
								arch/arm/mach-highbank/highbank.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										145
									
								
								arch/arm/mach-highbank/highbank.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,145 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2010-2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/clk.h>
 | 
				
			||||||
 | 
					#include <linux/clkdev.h>
 | 
				
			||||||
 | 
					#include <linux/io.h>
 | 
				
			||||||
 | 
					#include <linux/irq.h>
 | 
				
			||||||
 | 
					#include <linux/irqdomain.h>
 | 
				
			||||||
 | 
					#include <linux/of.h>
 | 
				
			||||||
 | 
					#include <linux/of_irq.h>
 | 
				
			||||||
 | 
					#include <linux/of_platform.h>
 | 
				
			||||||
 | 
					#include <linux/of_address.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <asm/cacheflush.h>
 | 
				
			||||||
 | 
					#include <asm/unified.h>
 | 
				
			||||||
 | 
					#include <asm/smp_scu.h>
 | 
				
			||||||
 | 
					#include <asm/hardware/arm_timer.h>
 | 
				
			||||||
 | 
					#include <asm/hardware/timer-sp.h>
 | 
				
			||||||
 | 
					#include <asm/hardware/gic.h>
 | 
				
			||||||
 | 
					#include <asm/hardware/cache-l2x0.h>
 | 
				
			||||||
 | 
					#include <asm/mach/arch.h>
 | 
				
			||||||
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					#include <asm/mach/time.h>
 | 
				
			||||||
 | 
					#include <mach/irqs.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "core.h"
 | 
				
			||||||
 | 
					#include "sysregs.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void __iomem *sregs_base;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define HB_SCU_VIRT_BASE	0xfee00000
 | 
				
			||||||
 | 
					void __iomem *scu_base_addr = ((void __iomem *)(HB_SCU_VIRT_BASE));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static struct map_desc scu_io_desc __initdata = {
 | 
				
			||||||
 | 
						.virtual	= HB_SCU_VIRT_BASE,
 | 
				
			||||||
 | 
						.pfn		= 0, /* run-time */
 | 
				
			||||||
 | 
						.length		= SZ_4K,
 | 
				
			||||||
 | 
						.type		= MT_DEVICE,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void __init highbank_scu_map_io(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						unsigned long base;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Get SCU base */
 | 
				
			||||||
 | 
						asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (base));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						scu_io_desc.pfn = __phys_to_pfn(base);
 | 
				
			||||||
 | 
						iotable_init(&scu_io_desc, 1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void __init highbank_map_io(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						highbank_scu_map_io();
 | 
				
			||||||
 | 
						highbank_lluart_map_io();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define HB_JUMP_TABLE_PHYS(cpu)		(0x40 + (0x10 * (cpu)))
 | 
				
			||||||
 | 
					#define HB_JUMP_TABLE_VIRT(cpu)		phys_to_virt(HB_JUMP_TABLE_PHYS(cpu))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void highbank_set_cpu_jump(int cpu, void *jump_addr)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						writel(BSYM(virt_to_phys(jump_addr)), HB_JUMP_TABLE_VIRT(cpu));
 | 
				
			||||||
 | 
						__cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16);
 | 
				
			||||||
 | 
						outer_clean_range(HB_JUMP_TABLE_PHYS(cpu),
 | 
				
			||||||
 | 
								  HB_JUMP_TABLE_PHYS(cpu) + 15);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const static struct of_device_id irq_match[] = {
 | 
				
			||||||
 | 
						{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
 | 
				
			||||||
 | 
						{}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void __init highbank_init_irq(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						of_irq_init(irq_match);
 | 
				
			||||||
 | 
						l2x0_of_init(0, ~0UL);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void __init highbank_timer_init(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						int irq;
 | 
				
			||||||
 | 
						struct device_node *np;
 | 
				
			||||||
 | 
						void __iomem *timer_base;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Map system registers */
 | 
				
			||||||
 | 
						np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
 | 
				
			||||||
 | 
						sregs_base = of_iomap(np, 0);
 | 
				
			||||||
 | 
						WARN_ON(!sregs_base);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						np = of_find_compatible_node(NULL, NULL, "arm,sp804");
 | 
				
			||||||
 | 
						timer_base = of_iomap(np, 0);
 | 
				
			||||||
 | 
						WARN_ON(!timer_base);
 | 
				
			||||||
 | 
						irq = irq_of_parse_and_map(np, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						highbank_clocks_init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						sp804_clocksource_init(timer_base + 0x20, "timer1");
 | 
				
			||||||
 | 
						sp804_clockevents_init(timer_base, irq, "timer0");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static struct sys_timer highbank_timer = {
 | 
				
			||||||
 | 
						.init = highbank_timer_init,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void highbank_power_off(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						hignbank_set_pwr_shutdown();
 | 
				
			||||||
 | 
						scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						while (1)
 | 
				
			||||||
 | 
							cpu_do_idle();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void __init highbank_init(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						pm_power_off = highbank_power_off;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static const char *highbank_match[] __initconst = {
 | 
				
			||||||
 | 
						"calxeda,highbank",
 | 
				
			||||||
 | 
						NULL,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DT_MACHINE_START(HIGHBANK, "Highbank")
 | 
				
			||||||
 | 
						.map_io		= highbank_map_io,
 | 
				
			||||||
 | 
						.init_irq	= highbank_init_irq,
 | 
				
			||||||
 | 
						.timer		= &highbank_timer,
 | 
				
			||||||
 | 
						.init_machine	= highbank_init,
 | 
				
			||||||
 | 
						.dt_compat	= highbank_match,
 | 
				
			||||||
 | 
					MACHINE_END
 | 
				
			||||||
							
								
								
									
										56
									
								
								arch/arm/mach-highbank/hotplug.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								arch/arm/mach-highbank/hotplug.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,56 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
 | 
					#include <linux/errno.h>
 | 
				
			||||||
 | 
					#include <linux/smp.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <asm/smp_scu.h>
 | 
				
			||||||
 | 
					#include <asm/cacheflush.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "core.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern void secondary_startup(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int platform_cpu_kill(unsigned int cpu)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * platform-specific code to shutdown a CPU
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					void platform_cpu_die(unsigned int cpu)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						flush_cache_all();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						highbank_set_cpu_jump(cpu, secondary_startup);
 | 
				
			||||||
 | 
						scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						cpu_do_idle();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* We should never return from idle */
 | 
				
			||||||
 | 
						panic("highbank: cpu %d unexpectedly exit from shutdown\n", cpu);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int platform_cpu_disable(unsigned int cpu)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * CPU0 should not be shut down via hotplug.  cpu_idle can WFI
 | 
				
			||||||
 | 
						 * or a proper shutdown or hibernate should be used.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						return cpu == 0 ? -EPERM : 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										19
									
								
								arch/arm/mach-highbank/include/mach/debug-macro.S
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								arch/arm/mach-highbank/include/mach/debug-macro.S
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Debugging macro include header
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  Copyright (C) 1994-1999 Russell King
 | 
				
			||||||
 | 
					 *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * 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.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							.macro	addruart,rp,rv,tmp
 | 
				
			||||||
 | 
							movw	\rv, #0x6000
 | 
				
			||||||
 | 
							movt	\rv, #0xfee3
 | 
				
			||||||
 | 
							movw	\rp, #0x6000
 | 
				
			||||||
 | 
							movt	\rp, #0xfff3
 | 
				
			||||||
 | 
							.endm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <asm/hardware/debug-pl01x.S>
 | 
				
			||||||
							
								
								
									
										7
									
								
								arch/arm/mach-highbank/include/mach/entry-macro.S
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								arch/arm/mach-highbank/include/mach/entry-macro.S
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					#include <asm/hardware/entry-macro-gic.S>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						.macro	disable_fiq
 | 
				
			||||||
 | 
						.endm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						.macro	arch_ret_to_user, tmp1, tmp2
 | 
				
			||||||
 | 
						.endm
 | 
				
			||||||
							
								
								
									
										1
									
								
								arch/arm/mach-highbank/include/mach/gpio.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								arch/arm/mach-highbank/include/mach/gpio.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					/* empty */
 | 
				
			||||||
							
								
								
									
										7
									
								
								arch/arm/mach-highbank/include/mach/io.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								arch/arm/mach-highbank/include/mach/io.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					#ifndef __MACH_IO_H
 | 
				
			||||||
 | 
					#define __MACH_IO_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define __io(a)		({ (void)(a); __typesafe_io(0); })
 | 
				
			||||||
 | 
					#define __mem_pci(a)	(a)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										6
									
								
								arch/arm/mach-highbank/include/mach/irqs.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								arch/arm/mach-highbank/include/mach/irqs.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					#ifndef __MACH_IRQS_H
 | 
				
			||||||
 | 
					#define __MACH_IRQS_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define NR_IRQS			192
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										1
									
								
								arch/arm/mach-highbank/include/mach/memory.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								arch/arm/mach-highbank/include/mach/memory.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					/* empty */
 | 
				
			||||||
							
								
								
									
										26
									
								
								arch/arm/mach-highbank/include/mach/system.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								arch/arm/mach-highbank/include/mach/system.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,26 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2010-2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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 __MACH_SYSTEM_H
 | 
				
			||||||
 | 
					#define __MACH_SYSTEM_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void arch_idle(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						cpu_do_idle();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern void arch_reset(char mode, const char *cmd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										6
									
								
								arch/arm/mach-highbank/include/mach/timex.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								arch/arm/mach-highbank/include/mach/timex.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					#ifndef __MACH_TIMEX_H
 | 
				
			||||||
 | 
					#define __MACH_TIMEX_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define CLOCK_TICK_RATE		1000000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										9
									
								
								arch/arm/mach-highbank/include/mach/uncompress.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								arch/arm/mach-highbank/include/mach/uncompress.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,9 @@
 | 
				
			||||||
 | 
					#ifndef __MACH_UNCOMPRESS_H
 | 
				
			||||||
 | 
					#define __MACH_UNCOMPRESS_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define putc(c)
 | 
				
			||||||
 | 
					#define flush()
 | 
				
			||||||
 | 
					#define arch_decomp_setup()
 | 
				
			||||||
 | 
					#define arch_decomp_wdog()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										1
									
								
								arch/arm/mach-highbank/include/mach/vmalloc.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								arch/arm/mach-highbank/include/mach/vmalloc.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					#define VMALLOC_END		0xFEE00000UL
 | 
				
			||||||
							
								
								
									
										34
									
								
								arch/arm/mach-highbank/lluart.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								arch/arm/mach-highbank/lluart.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,34 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/init.h>
 | 
				
			||||||
 | 
					#include <asm/page.h>
 | 
				
			||||||
 | 
					#include <asm/sizes.h>
 | 
				
			||||||
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define HB_DEBUG_LL_PHYS_BASE	0xfff36000
 | 
				
			||||||
 | 
					#define HB_DEBUG_LL_VIRT_BASE	0xfee36000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static struct map_desc lluart_io_desc __initdata = {
 | 
				
			||||||
 | 
						.virtual	= HB_DEBUG_LL_VIRT_BASE,
 | 
				
			||||||
 | 
						.pfn		= __phys_to_pfn(HB_DEBUG_LL_PHYS_BASE),
 | 
				
			||||||
 | 
						.length		= SZ_4K,
 | 
				
			||||||
 | 
						.type		= MT_DEVICE,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void __init highbank_lluart_map_io(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						iotable_init(&lluart_io_desc, 1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										40
									
								
								arch/arm/mach-highbank/localtimer.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								arch/arm/mach-highbank/localtimer.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,40 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2010-2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 * Based on localtimer.c, Copyright (C) 2002 ARM Ltd.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/init.h>
 | 
				
			||||||
 | 
					#include <linux/clockchips.h>
 | 
				
			||||||
 | 
					#include <linux/of.h>
 | 
				
			||||||
 | 
					#include <linux/of_address.h>
 | 
				
			||||||
 | 
					#include <linux/of_irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <asm/smp_twd.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Setup the local clock events for a CPU.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					int __cpuinit local_timer_setup(struct clock_event_device *evt)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct device_node *np;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						np = of_find_compatible_node(NULL, NULL, "arm,smp-twd");
 | 
				
			||||||
 | 
						if (!twd_base) {
 | 
				
			||||||
 | 
							twd_base = of_iomap(np, 0);
 | 
				
			||||||
 | 
							WARN_ON(!twd_base);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						evt->irq = irq_of_parse_and_map(np, 0);
 | 
				
			||||||
 | 
						twd_timer_setup(evt);
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										78
									
								
								arch/arm/mach-highbank/platsmp.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								arch/arm/mach-highbank/platsmp.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,78 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2010-2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 * Based on platsmp.c, Copyright (C) 2002 ARM Ltd.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/init.h>
 | 
				
			||||||
 | 
					#include <linux/smp.h>
 | 
				
			||||||
 | 
					#include <linux/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <asm/smp_scu.h>
 | 
				
			||||||
 | 
					#include <asm/hardware/gic.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "core.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern void secondary_startup(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void __cpuinit platform_secondary_init(unsigned int cpu)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						gic_secondary_init(0);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						gic_raise_softirq(cpumask_of(cpu), 0);
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Initialise the CPU possible map early - this describes the CPUs
 | 
				
			||||||
 | 
					 * which may be present or become present in the system.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					void __init smp_init_cpus(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						unsigned int i, ncores;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ncores = scu_get_core_count(scu_base_addr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* sanity check */
 | 
				
			||||||
 | 
						if (ncores > NR_CPUS) {
 | 
				
			||||||
 | 
							printk(KERN_WARNING
 | 
				
			||||||
 | 
							       "highbank: no. of cores (%d) greater than configured "
 | 
				
			||||||
 | 
							       "maximum of %d - clipping\n",
 | 
				
			||||||
 | 
							       ncores, NR_CPUS);
 | 
				
			||||||
 | 
							ncores = NR_CPUS;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i = 0; i < ncores; i++)
 | 
				
			||||||
 | 
							set_cpu_possible(i, true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						set_smp_cross_call(gic_raise_softirq);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						int i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						scu_enable(scu_base_addr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * Write the address of secondary startup into the jump table
 | 
				
			||||||
 | 
						 * The cores are in wfi and wait until they receive a soft interrupt
 | 
				
			||||||
 | 
						 * and a non-zero value to jump to. Then the secondary CPU branches
 | 
				
			||||||
 | 
						 * to this address.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						for (i = 1; i < max_cpus; i++)
 | 
				
			||||||
 | 
							highbank_set_cpu_jump(i, secondary_startup);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										55
									
								
								arch/arm/mach-highbank/pm.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								arch/arm/mach-highbank/pm.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,55 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <linux/init.h>
 | 
				
			||||||
 | 
					#include <linux/io.h>
 | 
				
			||||||
 | 
					#include <linux/suspend.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <asm/proc-fns.h>
 | 
				
			||||||
 | 
					#include <asm/smp_scu.h>
 | 
				
			||||||
 | 
					#include <asm/suspend.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "core.h"
 | 
				
			||||||
 | 
					#include "sysregs.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int highbank_suspend_finish(unsigned long val)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						cpu_do_idle();
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int highbank_pm_enter(suspend_state_t state)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						hignbank_set_pwr_suspend();
 | 
				
			||||||
 | 
						highbank_set_cpu_jump(0, cpu_resume);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
 | 
				
			||||||
 | 
						cpu_suspend(0, highbank_suspend_finish);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static const struct platform_suspend_ops highbank_pm_ops = {
 | 
				
			||||||
 | 
						.enter = highbank_pm_enter,
 | 
				
			||||||
 | 
						.valid = suspend_valid_only_mem,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int __init highbank_pm_init(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						suspend_set_ops(&highbank_pm_ops);
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					module_init(highbank_pm_init);
 | 
				
			||||||
							
								
								
									
										52
									
								
								arch/arm/mach-highbank/sysregs.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								arch/arm/mach-highbank/sysregs.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,52 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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 _MACH_HIGHBANK__SYSREGS_H_
 | 
				
			||||||
 | 
					#define _MACH_HIGHBANK__SYSREGS_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <linux/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern void __iomem *sregs_base;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define HB_SREG_A9_PWR_REQ		0xf00
 | 
				
			||||||
 | 
					#define HB_SREG_A9_BOOT_STAT		0xf04
 | 
				
			||||||
 | 
					#define HB_SREG_A9_BOOT_DATA		0xf08
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define HB_PWR_SUSPEND			0
 | 
				
			||||||
 | 
					#define HB_PWR_SOFT_RESET		1
 | 
				
			||||||
 | 
					#define HB_PWR_HARD_RESET		2
 | 
				
			||||||
 | 
					#define HB_PWR_SHUTDOWN			3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void hignbank_set_pwr_suspend(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void hignbank_set_pwr_shutdown(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void hignbank_set_pwr_soft_reset(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void hignbank_set_pwr_hard_reset(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										33
									
								
								arch/arm/mach-highbank/system.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								arch/arm/mach-highbank/system.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,33 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2011 Calxeda, Inc.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
 | 
					 * under the terms and conditions of the GNU General Public License,
 | 
				
			||||||
 | 
					 * version 2, as published by the Free Software Foundation.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope 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/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/io.h>
 | 
				
			||||||
 | 
					#include <asm/smp_scu.h>
 | 
				
			||||||
 | 
					#include <asm/proc-fns.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "core.h"
 | 
				
			||||||
 | 
					#include "sysregs.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void arch_reset(char mode, const char *cmd)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (mode == 'h')
 | 
				
			||||||
 | 
							hignbank_set_pwr_hard_reset();
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							hignbank_set_pwr_soft_reset();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
 | 
				
			||||||
 | 
						cpu_do_idle();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,13 +17,12 @@
 | 
				
			||||||
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 | 
					 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 | 
				
			||||||
 * MA 02110-1301, USA.
 | 
					 * MA 02110-1301, USA.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/spinlock.h>
 | 
					#include <linux/spinlock.h>
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
#include <mach/hardware.h>
 | 
					#include <mach/hardware.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/iomux-mx3.h>
 | 
					#include <mach/iomux-mx3.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@
 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 * GNU General Public License for more details.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/mtd/mtd.h>
 | 
					#include <linux/mtd/mtd.h>
 | 
				
			||||||
#include <linux/mtd/map.h>
 | 
					#include <linux/mtd/map.h>
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,6 @@
 | 
				
			||||||
#include <asm/mach/arch.h>
 | 
					#include <asm/mach/arch.h>
 | 
				
			||||||
#include <asm/mach/time.h>
 | 
					#include <asm/mach/time.h>
 | 
				
			||||||
#include <asm/mach/map.h>
 | 
					#include <asm/mach/map.h>
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					 | 
				
			||||||
#include <mach/iomux-mx27.h>
 | 
					#include <mach/iomux-mx27.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "devices-imx27.h"
 | 
					#include "devices-imx27.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,8 +20,6 @@
 | 
				
			||||||
#ifndef __ASM_ARM_ARCH_IO_H
 | 
					#ifndef __ASM_ARM_ARCH_IO_H
 | 
				
			||||||
#define __ASM_ARM_ARCH_IO_H
 | 
					#define __ASM_ARM_ARCH_IO_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define IO_SPACE_LIMIT 0xffff
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * WARNING: this has to mirror definitions in platform.h
 | 
					 * WARNING: this has to mirror definitions in platform.h
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@
 | 
				
			||||||
 * License version 2. This program is licensed "as is" without any 
 | 
					 * License version 2. This program is licensed "as is" without any 
 | 
				
			||||||
 * warranty of any kind, whether express or implied.
 | 
					 * warranty of any kind, whether express or implied.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/spinlock.h>
 | 
					#include <linux/spinlock.h>
 | 
				
			||||||
| 
						 | 
					@ -39,7 +39,7 @@
 | 
				
			||||||
#include <asm/mach/time.h>
 | 
					#include <asm/mach/time.h>
 | 
				
			||||||
#include <asm/mach/irq.h>
 | 
					#include <asm/mach/irq.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mach/gpio.h>
 | 
					#include <mach/gpio-ixp2000.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static DEFINE_SPINLOCK(ixp2000_slowport_lock);
 | 
					static DEFINE_SPINLOCK(ixp2000_slowport_lock);
 | 
				
			||||||
static unsigned long ixp2000_slowport_irq_flags;
 | 
					static unsigned long ixp2000_slowport_irq_flags;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue