diff options
Diffstat (limited to 'arch')
382 files changed, 1575 insertions, 4321 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9277237810e9..de89df1e9c21 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -196,7 +196,8 @@ config VECTORS_BASE | |||
196 | The base address of exception vectors. | 196 | The base address of exception vectors. |
197 | 197 | ||
198 | config ARM_PATCH_PHYS_VIRT | 198 | config ARM_PATCH_PHYS_VIRT |
199 | bool "Patch physical to virtual translations at runtime" | 199 | bool "Patch physical to virtual translations at runtime" if EMBEDDED |
200 | default y | ||
200 | depends on !XIP_KERNEL && MMU | 201 | depends on !XIP_KERNEL && MMU |
201 | depends on !ARCH_REALVIEW || !SPARSEMEM | 202 | depends on !ARCH_REALVIEW || !SPARSEMEM |
202 | help | 203 | help |
@@ -205,16 +206,25 @@ config ARM_PATCH_PHYS_VIRT | |||
205 | kernel in system memory. | 206 | kernel in system memory. |
206 | 207 | ||
207 | This can only be used with non-XIP MMU kernels where the base | 208 | This can only be used with non-XIP MMU kernels where the base |
208 | of physical memory is at a 16MB boundary, or theoretically 64K | 209 | of physical memory is at a 16MB boundary. |
209 | for the MSM machine class. | ||
210 | 210 | ||
211 | config ARM_PATCH_PHYS_VIRT_16BIT | 211 | Only disable this option if you know that you do not require |
212 | def_bool y | 212 | this feature (eg, building a kernel for a single machine) and |
213 | depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM | 213 | you need to shrink the kernel to the minimal size. |
214 | |||
215 | config NEED_MACH_MEMORY_H | ||
216 | bool | ||
214 | help | 217 | help |
215 | This option extends the physical to virtual translation patching | 218 | Select this when mach/memory.h is required to provide special |
216 | to allow physical memory down to a theoretical minimum of 64K | 219 | definitions for this platform. The need for mach/memory.h should |
217 | boundaries. | 220 | be avoided when possible. |
221 | |||
222 | config PHYS_OFFSET | ||
223 | hex "Physical address of main memory" | ||
224 | depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H | ||
225 | help | ||
226 | Please provide the physical address corresponding to the | ||
227 | location of main memory in your system. | ||
218 | 228 | ||
219 | source "init/Kconfig" | 229 | source "init/Kconfig" |
220 | 230 | ||
@@ -247,6 +257,7 @@ config ARCH_INTEGRATOR | |||
247 | select GENERIC_CLOCKEVENTS | 257 | select GENERIC_CLOCKEVENTS |
248 | select PLAT_VERSATILE | 258 | select PLAT_VERSATILE |
249 | select PLAT_VERSATILE_FPGA_IRQ | 259 | select PLAT_VERSATILE_FPGA_IRQ |
260 | select NEED_MACH_MEMORY_H | ||
250 | help | 261 | help |
251 | Support for ARM's Integrator platform. | 262 | Support for ARM's Integrator platform. |
252 | 263 | ||
@@ -262,6 +273,7 @@ config ARCH_REALVIEW | |||
262 | select PLAT_VERSATILE_CLCD | 273 | select PLAT_VERSATILE_CLCD |
263 | select ARM_TIMER_SP804 | 274 | select ARM_TIMER_SP804 |
264 | select GPIO_PL061 if GPIOLIB | 275 | select GPIO_PL061 if GPIOLIB |
276 | select NEED_MACH_MEMORY_H | ||
265 | help | 277 | help |
266 | This enables support for ARM Ltd RealView boards. | 278 | This enables support for ARM Ltd RealView boards. |
267 | 279 | ||
@@ -302,7 +314,6 @@ config ARCH_AT91 | |||
302 | select ARCH_REQUIRE_GPIOLIB | 314 | select ARCH_REQUIRE_GPIOLIB |
303 | select HAVE_CLK | 315 | select HAVE_CLK |
304 | select CLKDEV_LOOKUP | 316 | select CLKDEV_LOOKUP |
305 | select ARM_PATCH_PHYS_VIRT if MMU | ||
306 | help | 317 | help |
307 | This enables support for systems based on the Atmel AT91RM9200, | 318 | This enables support for systems based on the Atmel AT91RM9200, |
308 | AT91SAM9 and AT91CAP9 processors. | 319 | AT91SAM9 and AT91CAP9 processors. |
@@ -323,6 +334,7 @@ config ARCH_CLPS711X | |||
323 | bool "Cirrus Logic CLPS711x/EP721x-based" | 334 | bool "Cirrus Logic CLPS711x/EP721x-based" |
324 | select CPU_ARM720T | 335 | select CPU_ARM720T |
325 | select ARCH_USES_GETTIMEOFFSET | 336 | select ARCH_USES_GETTIMEOFFSET |
337 | select NEED_MACH_MEMORY_H | ||
326 | help | 338 | help |
327 | Support for Cirrus Logic 711x/721x based boards. | 339 | Support for Cirrus Logic 711x/721x based boards. |
328 | 340 | ||
@@ -363,6 +375,7 @@ config ARCH_EBSA110 | |||
363 | select ISA | 375 | select ISA |
364 | select NO_IOPORT | 376 | select NO_IOPORT |
365 | select ARCH_USES_GETTIMEOFFSET | 377 | select ARCH_USES_GETTIMEOFFSET |
378 | select NEED_MACH_MEMORY_H | ||
366 | help | 379 | help |
367 | This is an evaluation board for the StrongARM processor available | 380 | This is an evaluation board for the StrongARM processor available |
368 | from Digital. It has limited hardware on-board, including an | 381 | from Digital. It has limited hardware on-board, including an |
@@ -378,6 +391,7 @@ config ARCH_EP93XX | |||
378 | select ARCH_REQUIRE_GPIOLIB | 391 | select ARCH_REQUIRE_GPIOLIB |
379 | select ARCH_HAS_HOLES_MEMORYMODEL | 392 | select ARCH_HAS_HOLES_MEMORYMODEL |
380 | select ARCH_USES_GETTIMEOFFSET | 393 | select ARCH_USES_GETTIMEOFFSET |
394 | select NEED_MEMORY_H | ||
381 | help | 395 | help |
382 | This enables support for the Cirrus EP93xx series of CPUs. | 396 | This enables support for the Cirrus EP93xx series of CPUs. |
383 | 397 | ||
@@ -386,6 +400,7 @@ config ARCH_FOOTBRIDGE | |||
386 | select CPU_SA110 | 400 | select CPU_SA110 |
387 | select FOOTBRIDGE | 401 | select FOOTBRIDGE |
388 | select GENERIC_CLOCKEVENTS | 402 | select GENERIC_CLOCKEVENTS |
403 | select NEED_MACH_MEMORY_H | ||
389 | help | 404 | help |
390 | Support for systems based on the DC21285 companion chip | 405 | Support for systems based on the DC21285 companion chip |
391 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. | 406 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. |
@@ -435,6 +450,7 @@ config ARCH_IOP13XX | |||
435 | select PCI | 450 | select PCI |
436 | select ARCH_SUPPORTS_MSI | 451 | select ARCH_SUPPORTS_MSI |
437 | select VMSPLIT_1G | 452 | select VMSPLIT_1G |
453 | select NEED_MACH_MEMORY_H | ||
438 | help | 454 | help |
439 | Support for Intel's IOP13XX (XScale) family of processors. | 455 | Support for Intel's IOP13XX (XScale) family of processors. |
440 | 456 | ||
@@ -465,6 +481,7 @@ config ARCH_IXP23XX | |||
465 | select CPU_XSC3 | 481 | select CPU_XSC3 |
466 | select PCI | 482 | select PCI |
467 | select ARCH_USES_GETTIMEOFFSET | 483 | select ARCH_USES_GETTIMEOFFSET |
484 | select NEED_MACH_MEMORY_H | ||
468 | help | 485 | help |
469 | Support for Intel's IXP23xx (XScale) family of processors. | 486 | Support for Intel's IXP23xx (XScale) family of processors. |
470 | 487 | ||
@@ -474,6 +491,7 @@ config ARCH_IXP2000 | |||
474 | select CPU_XSCALE | 491 | select CPU_XSCALE |
475 | select PCI | 492 | select PCI |
476 | select ARCH_USES_GETTIMEOFFSET | 493 | select ARCH_USES_GETTIMEOFFSET |
494 | select NEED_MACH_MEMORY_H | ||
477 | help | 495 | help |
478 | Support for Intel's IXP2400/2800 (XScale) family of processors. | 496 | Support for Intel's IXP2400/2800 (XScale) family of processors. |
479 | 497 | ||
@@ -567,6 +585,7 @@ config ARCH_KS8695 | |||
567 | select CPU_ARM922T | 585 | select CPU_ARM922T |
568 | select ARCH_REQUIRE_GPIOLIB | 586 | select ARCH_REQUIRE_GPIOLIB |
569 | select ARCH_USES_GETTIMEOFFSET | 587 | select ARCH_USES_GETTIMEOFFSET |
588 | select NEED_MACH_MEMORY_H | ||
570 | help | 589 | help |
571 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based | 590 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based |
572 | System-on-Chip devices. | 591 | System-on-Chip devices. |
@@ -658,6 +677,7 @@ config ARCH_SHMOBILE | |||
658 | select SPARSE_IRQ | 677 | select SPARSE_IRQ |
659 | select MULTI_IRQ_HANDLER | 678 | select MULTI_IRQ_HANDLER |
660 | select PM_GENERIC_DOMAINS if PM | 679 | select PM_GENERIC_DOMAINS if PM |
680 | select NEED_MACH_MEMORY_H | ||
661 | help | 681 | help |
662 | Support for Renesas's SH-Mobile and R-Mobile ARM platforms. | 682 | Support for Renesas's SH-Mobile and R-Mobile ARM platforms. |
663 | 683 | ||
@@ -672,6 +692,7 @@ config ARCH_RPC | |||
672 | select NO_IOPORT | 692 | select NO_IOPORT |
673 | select ARCH_SPARSEMEM_ENABLE | 693 | select ARCH_SPARSEMEM_ENABLE |
674 | select ARCH_USES_GETTIMEOFFSET | 694 | select ARCH_USES_GETTIMEOFFSET |
695 | select NEED_MACH_MEMORY_H | ||
675 | help | 696 | help |
676 | On the Acorn Risc-PC, Linux can support the internal IDE disk and | 697 | On the Acorn Risc-PC, Linux can support the internal IDE disk and |
677 | CD-ROM interface, serial and parallel port, and the floppy drive. | 698 | CD-ROM interface, serial and parallel port, and the floppy drive. |
@@ -690,6 +711,7 @@ config ARCH_SA1100 | |||
690 | select HAVE_SCHED_CLOCK | 711 | select HAVE_SCHED_CLOCK |
691 | select TICK_ONESHOT | 712 | select TICK_ONESHOT |
692 | select ARCH_REQUIRE_GPIOLIB | 713 | select ARCH_REQUIRE_GPIOLIB |
714 | select NEED_MACH_MEMORY_H | ||
693 | help | 715 | help |
694 | Support for StrongARM 11x0 based boards. | 716 | Support for StrongARM 11x0 based boards. |
695 | 717 | ||
@@ -782,6 +804,7 @@ config ARCH_S5PV210 | |||
782 | select HAVE_S3C2410_I2C if I2C | 804 | select HAVE_S3C2410_I2C if I2C |
783 | select HAVE_S3C_RTC if RTC_CLASS | 805 | select HAVE_S3C_RTC if RTC_CLASS |
784 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 806 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
807 | select NEED_MACH_MEMORY_H | ||
785 | help | 808 | help |
786 | Samsung S5PV210/S5PC110 series based systems | 809 | Samsung S5PV210/S5PC110 series based systems |
787 | 810 | ||
@@ -798,6 +821,7 @@ config ARCH_EXYNOS4 | |||
798 | select HAVE_S3C_RTC if RTC_CLASS | 821 | select HAVE_S3C_RTC if RTC_CLASS |
799 | select HAVE_S3C2410_I2C if I2C | 822 | select HAVE_S3C2410_I2C if I2C |
800 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 823 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
824 | select NEED_MACH_MEMORY_H | ||
801 | help | 825 | help |
802 | Samsung EXYNOS4 series based systems | 826 | Samsung EXYNOS4 series based systems |
803 | 827 | ||
@@ -809,6 +833,7 @@ config ARCH_SHARK | |||
809 | select ZONE_DMA | 833 | select ZONE_DMA |
810 | select PCI | 834 | select PCI |
811 | select ARCH_USES_GETTIMEOFFSET | 835 | select ARCH_USES_GETTIMEOFFSET |
836 | select NEED_MACH_MEMORY_H | ||
812 | help | 837 | help |
813 | Support for the StrongARM based Digital DNARD machine, also known | 838 | Support for the StrongARM based Digital DNARD machine, also known |
814 | as "Shark" (<http://www.shark-linux.de/shark.html>). | 839 | as "Shark" (<http://www.shark-linux.de/shark.html>). |
@@ -837,6 +862,8 @@ config ARCH_U300 | |||
837 | select CLKDEV_LOOKUP | 862 | select CLKDEV_LOOKUP |
838 | select HAVE_MACH_CLKDEV | 863 | select HAVE_MACH_CLKDEV |
839 | select GENERIC_GPIO | 864 | select GENERIC_GPIO |
865 | select ARCH_REQUIRE_GPIOLIB | ||
866 | select NEED_MACH_MEMORY_H | ||
840 | help | 867 | help |
841 | Support for ST-Ericsson U300 series mobile platforms. | 868 | Support for ST-Ericsson U300 series mobile platforms. |
842 | 869 | ||
@@ -1987,6 +2014,7 @@ config CPU_FREQ_PXA | |||
1987 | bool | 2014 | bool |
1988 | depends on CPU_FREQ && ARCH_PXA && PXA25x | 2015 | depends on CPU_FREQ && ARCH_PXA && PXA25x |
1989 | default y | 2016 | default y |
2017 | select CPU_FREQ_TABLE | ||
1990 | select CPU_FREQ_DEFAULT_GOV_USERSPACE | 2018 | select CPU_FREQ_DEFAULT_GOV_USERSPACE |
1991 | 2019 | ||
1992 | config CPU_FREQ_S3C | 2020 | config CPU_FREQ_S3C |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 70c424eaf7b0..5665c2a3b652 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -128,6 +128,9 @@ textofs-$(CONFIG_PM_H1940) := 0x00108000 | |||
128 | ifeq ($(CONFIG_ARCH_SA1100),y) | 128 | ifeq ($(CONFIG_ARCH_SA1100),y) |
129 | textofs-$(CONFIG_SA1111) := 0x00208000 | 129 | textofs-$(CONFIG_SA1111) := 0x00208000 |
130 | endif | 130 | endif |
131 | textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000 | ||
132 | textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 | ||
133 | textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 | ||
131 | 134 | ||
132 | # Machine directory name. This list is sorted alphanumerically | 135 | # Machine directory name. This list is sorted alphanumerically |
133 | # by CONFIG_* macro name. | 136 | # by CONFIG_* macro name. |
diff --git a/arch/arm/boot/dts/tegra-harmony.dts b/arch/arm/boot/dts/tegra-harmony.dts index e5818668d091..0e225b86b652 100644 --- a/arch/arm/boot/dts/tegra-harmony.dts +++ b/arch/arm/boot/dts/tegra-harmony.dts | |||
@@ -66,5 +66,6 @@ | |||
66 | cd-gpios = <&gpio 58 0>; /* gpio PH2 */ | 66 | cd-gpios = <&gpio 58 0>; /* gpio PH2 */ |
67 | wp-gpios = <&gpio 59 0>; /* gpio PH3 */ | 67 | wp-gpios = <&gpio 59 0>; /* gpio PH3 */ |
68 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ | 68 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ |
69 | support-8bit; | ||
69 | }; | 70 | }; |
70 | }; | 71 | }; |
diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts index 64cedca6fc79..a72299b8e668 100644 --- a/arch/arm/boot/dts/tegra-seaboard.dts +++ b/arch/arm/boot/dts/tegra-seaboard.dts | |||
@@ -25,4 +25,8 @@ | |||
25 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ | 25 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
26 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ | 26 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ |
27 | }; | 27 | }; |
28 | |||
29 | sdhci@c8000600 { | ||
30 | support-8bit; | ||
31 | }; | ||
28 | }; | 32 | }; |
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index a07b0e763a80..1cde34a080d7 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
@@ -12,11 +12,11 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/gpio.h> | ||
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/io.h> | 19 | #include <linux/io.h> |
19 | #include <asm/gpio.h> | ||
20 | #include <asm/hardware/scoop.h> | 20 | #include <asm/hardware/scoop.h> |
21 | 21 | ||
22 | /* PCMCIA to Scoop linkage | 22 | /* PCMCIA to Scoop linkage |
diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig new file mode 100644 index 000000000000..c5876d244f4b --- /dev/null +++ b/arch/arm/configs/at91sam9g45_defconfig | |||
@@ -0,0 +1,214 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | ||
6 | CONFIG_SYSFS_DEPRECATED=y | ||
7 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
8 | CONFIG_BLK_DEV_INITRD=y | ||
9 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
10 | CONFIG_EMBEDDED=y | ||
11 | CONFIG_SLAB=y | ||
12 | CONFIG_MODULES=y | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | # CONFIG_LBDAF is not set | ||
15 | # CONFIG_BLK_DEV_BSG is not set | ||
16 | # CONFIG_IOSCHED_DEADLINE is not set | ||
17 | # CONFIG_IOSCHED_CFQ is not set | ||
18 | CONFIG_ARCH_AT91=y | ||
19 | CONFIG_ARCH_AT91SAM9G45=y | ||
20 | CONFIG_MACH_AT91SAM9M10G45EK=y | ||
21 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | ||
22 | CONFIG_AT91_SLOW_CLOCK=y | ||
23 | CONFIG_AEABI=y | ||
24 | # CONFIG_OABI_COMPAT is not set | ||
25 | CONFIG_LEDS=y | ||
26 | CONFIG_LEDS_CPU=y | ||
27 | CONFIG_UACCESS_WITH_MEMCPY=y | ||
28 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
29 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
30 | CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x71100000,25165824 root=/dev/ram0 rw" | ||
31 | CONFIG_AUTO_ZRELADDR=y | ||
32 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
33 | CONFIG_NET=y | ||
34 | CONFIG_PACKET=y | ||
35 | CONFIG_UNIX=y | ||
36 | CONFIG_INET=y | ||
37 | CONFIG_IP_MULTICAST=y | ||
38 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
39 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
40 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
41 | # CONFIG_INET_DIAG is not set | ||
42 | CONFIG_IPV6=y | ||
43 | # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set | ||
44 | # CONFIG_INET6_XFRM_MODE_TUNNEL is not set | ||
45 | # CONFIG_INET6_XFRM_MODE_BEET is not set | ||
46 | CONFIG_IPV6_SIT_6RD=y | ||
47 | CONFIG_CFG80211=y | ||
48 | CONFIG_LIB80211=y | ||
49 | CONFIG_MAC80211=y | ||
50 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
51 | CONFIG_DEVTMPFS=y | ||
52 | CONFIG_DEVTMPFS_MOUNT=y | ||
53 | # CONFIG_STANDALONE is not set | ||
54 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
55 | CONFIG_MTD=y | ||
56 | CONFIG_MTD_CMDLINE_PARTS=y | ||
57 | CONFIG_MTD_CHAR=y | ||
58 | CONFIG_MTD_BLOCK=y | ||
59 | CONFIG_MTD_DATAFLASH=y | ||
60 | CONFIG_MTD_NAND=y | ||
61 | CONFIG_MTD_NAND_ATMEL=y | ||
62 | CONFIG_MTD_UBI=y | ||
63 | CONFIG_BLK_DEV_LOOP=y | ||
64 | CONFIG_BLK_DEV_RAM=y | ||
65 | CONFIG_BLK_DEV_RAM_COUNT=4 | ||
66 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
67 | CONFIG_MISC_DEVICES=y | ||
68 | CONFIG_ATMEL_PWM=y | ||
69 | CONFIG_ATMEL_TCLIB=y | ||
70 | CONFIG_SCSI=y | ||
71 | CONFIG_BLK_DEV_SD=y | ||
72 | CONFIG_SCSI_MULTI_LUN=y | ||
73 | # CONFIG_SCSI_LOWLEVEL is not set | ||
74 | CONFIG_NETDEVICES=y | ||
75 | CONFIG_MII=y | ||
76 | CONFIG_DAVICOM_PHY=y | ||
77 | CONFIG_NET_ETHERNET=y | ||
78 | CONFIG_MACB=y | ||
79 | # CONFIG_NETDEV_1000 is not set | ||
80 | # CONFIG_NETDEV_10000 is not set | ||
81 | CONFIG_LIBERTAS_THINFIRM=m | ||
82 | CONFIG_LIBERTAS_THINFIRM_USB=m | ||
83 | CONFIG_AT76C50X_USB=m | ||
84 | CONFIG_USB_ZD1201=m | ||
85 | CONFIG_RTL8187=m | ||
86 | CONFIG_ATH_COMMON=m | ||
87 | CONFIG_ATH9K=m | ||
88 | CONFIG_CARL9170=m | ||
89 | CONFIG_B43=m | ||
90 | CONFIG_B43_PHY_N=y | ||
91 | CONFIG_LIBERTAS=m | ||
92 | CONFIG_LIBERTAS_USB=m | ||
93 | CONFIG_LIBERTAS_SDIO=m | ||
94 | CONFIG_LIBERTAS_SPI=m | ||
95 | CONFIG_RT2X00=m | ||
96 | CONFIG_RT2500USB=m | ||
97 | CONFIG_RT73USB=m | ||
98 | CONFIG_RT2800USB=m | ||
99 | CONFIG_RT2800USB_RT53XX=y | ||
100 | CONFIG_RT2800USB_UNKNOWN=y | ||
101 | CONFIG_RTL8192CU=m | ||
102 | CONFIG_WL1251=m | ||
103 | CONFIG_WL1251_SDIO=m | ||
104 | CONFIG_WL12XX_MENU=m | ||
105 | CONFIG_WL12XX=m | ||
106 | CONFIG_WL12XX_SDIO=m | ||
107 | CONFIG_ZD1211RW=m | ||
108 | CONFIG_MWIFIEX=m | ||
109 | CONFIG_MWIFIEX_SDIO=m | ||
110 | CONFIG_INPUT_POLLDEV=m | ||
111 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
112 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 | ||
113 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272 | ||
114 | CONFIG_INPUT_JOYDEV=y | ||
115 | CONFIG_INPUT_EVDEV=y | ||
116 | # CONFIG_KEYBOARD_ATKBD is not set | ||
117 | CONFIG_KEYBOARD_QT1070=m | ||
118 | CONFIG_KEYBOARD_QT2160=m | ||
119 | CONFIG_KEYBOARD_GPIO=y | ||
120 | # CONFIG_INPUT_MOUSE is not set | ||
121 | CONFIG_INPUT_TOUCHSCREEN=y | ||
122 | CONFIG_TOUCHSCREEN_ATMEL_MXT=m | ||
123 | CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y | ||
124 | # CONFIG_SERIO is not set | ||
125 | CONFIG_LEGACY_PTY_COUNT=4 | ||
126 | CONFIG_SERIAL_ATMEL=y | ||
127 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
128 | CONFIG_HW_RANDOM=y | ||
129 | CONFIG_I2C=y | ||
130 | CONFIG_I2C_GPIO=y | ||
131 | CONFIG_SPI=y | ||
132 | CONFIG_SPI_ATMEL=y | ||
133 | # CONFIG_HWMON is not set | ||
134 | # CONFIG_MFD_SUPPORT is not set | ||
135 | CONFIG_FB=y | ||
136 | CONFIG_FB_ATMEL=y | ||
137 | CONFIG_FB_UDL=m | ||
138 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
139 | # CONFIG_LCD_CLASS_DEVICE is not set | ||
140 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
141 | CONFIG_BACKLIGHT_ATMEL_LCDC=y | ||
142 | # CONFIG_BACKLIGHT_GENERIC is not set | ||
143 | CONFIG_SOUND=y | ||
144 | CONFIG_SND=y | ||
145 | CONFIG_SND_SEQUENCER=y | ||
146 | CONFIG_SND_MIXER_OSS=y | ||
147 | CONFIG_SND_PCM_OSS=y | ||
148 | # CONFIG_SND_SUPPORT_OLD_API is not set | ||
149 | # CONFIG_SND_VERBOSE_PROCFS is not set | ||
150 | # CONFIG_SND_DRIVERS is not set | ||
151 | # CONFIG_SND_ARM is not set | ||
152 | CONFIG_SND_ATMEL_AC97C=y | ||
153 | # CONFIG_SND_SPI is not set | ||
154 | CONFIG_SND_USB_AUDIO=m | ||
155 | # CONFIG_USB_HID is not set | ||
156 | CONFIG_USB=y | ||
157 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | ||
158 | CONFIG_USB_DEVICEFS=y | ||
159 | # CONFIG_USB_DEVICE_CLASS is not set | ||
160 | CONFIG_USB_EHCI_HCD=y | ||
161 | CONFIG_USB_OHCI_HCD=y | ||
162 | CONFIG_USB_ACM=y | ||
163 | CONFIG_USB_STORAGE=y | ||
164 | CONFIG_USB_GADGET=y | ||
165 | CONFIG_USB_ATMEL_USBA=m | ||
166 | CONFIG_USB_ZERO=m | ||
167 | CONFIG_USB_AUDIO=m | ||
168 | CONFIG_USB_ETH=m | ||
169 | CONFIG_USB_ETH_EEM=y | ||
170 | CONFIG_USB_MASS_STORAGE=m | ||
171 | CONFIG_USB_G_SERIAL=m | ||
172 | CONFIG_USB_CDC_COMPOSITE=m | ||
173 | CONFIG_USB_G_MULTI=m | ||
174 | CONFIG_USB_G_MULTI_CDC=y | ||
175 | CONFIG_MMC=y | ||
176 | # CONFIG_MMC_BLOCK_BOUNCE is not set | ||
177 | CONFIG_SDIO_UART=m | ||
178 | CONFIG_MMC_ATMELMCI=y | ||
179 | CONFIG_MMC_ATMELMCI_DMA=y | ||
180 | CONFIG_LEDS_ATMEL_PWM=y | ||
181 | CONFIG_LEDS_GPIO=y | ||
182 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
183 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
184 | CONFIG_LEDS_TRIGGER_GPIO=y | ||
185 | CONFIG_RTC_CLASS=y | ||
186 | CONFIG_RTC_DRV_AT91RM9200=y | ||
187 | CONFIG_DMADEVICES=y | ||
188 | CONFIG_AT_HDMAC=y | ||
189 | CONFIG_DMATEST=m | ||
190 | # CONFIG_IOMMU_SUPPORT is not set | ||
191 | CONFIG_EXT2_FS=y | ||
192 | CONFIG_FANOTIFY=y | ||
193 | CONFIG_VFAT_FS=y | ||
194 | CONFIG_TMPFS=y | ||
195 | CONFIG_JFFS2_FS=y | ||
196 | CONFIG_JFFS2_SUMMARY=y | ||
197 | CONFIG_CRAMFS=m | ||
198 | CONFIG_SQUASHFS=m | ||
199 | CONFIG_SQUASHFS_EMBEDDED=y | ||
200 | CONFIG_NFS_FS=y | ||
201 | CONFIG_NFS_V3=y | ||
202 | CONFIG_NLS_CODEPAGE_437=y | ||
203 | CONFIG_NLS_CODEPAGE_850=y | ||
204 | CONFIG_NLS_ISO8859_1=y | ||
205 | CONFIG_STRIP_ASM_SYMS=y | ||
206 | # CONFIG_SCHED_DEBUG is not set | ||
207 | CONFIG_DEBUG_MEMORY_INIT=y | ||
208 | # CONFIG_FTRACE is not set | ||
209 | CONFIG_DEBUG_USER=y | ||
210 | CONFIG_CRYPTO_ECB=y | ||
211 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
212 | CONFIG_CRYPTO_USER_API_HASH=m | ||
213 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | ||
214 | # CONFIG_CRYPTO_HW is not set | ||
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index 166a7a3e2840..11ad0bfbb0ad 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h | |||
@@ -4,4 +4,23 @@ | |||
4 | /* not all ARM platforms necessarily support this API ... */ | 4 | /* not all ARM platforms necessarily support this API ... */ |
5 | #include <mach/gpio.h> | 5 | #include <mach/gpio.h> |
6 | 6 | ||
7 | #ifndef __ARM_GPIOLIB_COMPLEX | ||
8 | /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ | ||
9 | #include <asm-generic/gpio.h> | ||
10 | |||
11 | /* The trivial gpiolib dispatchers */ | ||
12 | #define gpio_get_value __gpio_get_value | ||
13 | #define gpio_set_value __gpio_set_value | ||
14 | #define gpio_cansleep __gpio_cansleep | ||
15 | #endif | ||
16 | |||
17 | /* | ||
18 | * Provide a default gpio_to_irq() which should satisfy every case. | ||
19 | * However, some platforms want to do this differently, so allow them | ||
20 | * to override it. | ||
21 | */ | ||
22 | #ifndef gpio_to_irq | ||
23 | #define gpio_to_irq __gpio_to_irq | ||
24 | #endif | ||
25 | |||
7 | #endif /* _ARCH_ARM_GPIO_H */ | 26 | #endif /* _ARCH_ARM_GPIO_H */ |
diff --git a/arch/arm/include/asm/hardware/iop3xx-gpio.h b/arch/arm/include/asm/hardware/iop3xx-gpio.h index b69d972b1f7d..9eda7dc92ad8 100644 --- a/arch/arm/include/asm/hardware/iop3xx-gpio.h +++ b/arch/arm/include/asm/hardware/iop3xx-gpio.h | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm-generic/gpio.h> | 29 | #include <asm-generic/gpio.h> |
30 | 30 | ||
31 | #define __ARM_GPIOLIB_COMPLEX | ||
32 | |||
31 | #define IOP3XX_N_GPIOS 8 | 33 | #define IOP3XX_N_GPIOS 8 |
32 | 34 | ||
33 | static inline int gpio_get_value(unsigned gpio) | 35 | static inline int gpio_get_value(unsigned gpio) |
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h index b3fea38d55c6..43cab498bc27 100644 --- a/arch/arm/include/asm/hardware/it8152.h +++ b/arch/arm/include/asm/hardware/it8152.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #ifndef __ASM_HARDWARE_IT8152_H | 10 | #ifndef __ASM_HARDWARE_IT8152_H |
11 | #define __ASM_HARDWARE_IT8152_H | 11 | #define __ASM_HARDWARE_IT8152_H |
12 | extern unsigned long it8152_base_address; | 12 | extern void __iomem *it8152_base_address; |
13 | 13 | ||
14 | #define IT8152_IO_BASE (it8152_base_address + 0x03e00000) | 14 | #define IT8152_IO_BASE (it8152_base_address + 0x03e00000) |
15 | #define IT8152_CFGREG_BASE (it8152_base_address + 0x03f00000) | 15 | #define IT8152_CFGREG_BASE (it8152_base_address + 0x03f00000) |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 652fccca4952..a8997d71084e 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -16,9 +16,12 @@ | |||
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/const.h> | 17 | #include <linux/const.h> |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <mach/memory.h> | ||
20 | #include <asm/sizes.h> | 19 | #include <asm/sizes.h> |
21 | 20 | ||
21 | #ifdef CONFIG_NEED_MACH_MEMORY_H | ||
22 | #include <mach/memory.h> | ||
23 | #endif | ||
24 | |||
22 | /* | 25 | /* |
23 | * Allow for constants defined here to be used from assembly code | 26 | * Allow for constants defined here to be used from assembly code |
24 | * by prepending the UL suffix only with actual C code compilation. | 27 | * by prepending the UL suffix only with actual C code compilation. |
@@ -151,7 +154,6 @@ | |||
151 | * so that all we need to do is modify the 8-bit constant field. | 154 | * so that all we need to do is modify the 8-bit constant field. |
152 | */ | 155 | */ |
153 | #define __PV_BITS_31_24 0x81000000 | 156 | #define __PV_BITS_31_24 0x81000000 |
154 | #define __PV_BITS_23_16 0x00810000 | ||
155 | 157 | ||
156 | extern unsigned long __pv_phys_offset; | 158 | extern unsigned long __pv_phys_offset; |
157 | #define PHYS_OFFSET __pv_phys_offset | 159 | #define PHYS_OFFSET __pv_phys_offset |
@@ -169,9 +171,6 @@ static inline unsigned long __virt_to_phys(unsigned long x) | |||
169 | { | 171 | { |
170 | unsigned long t; | 172 | unsigned long t; |
171 | __pv_stub(x, t, "add", __PV_BITS_31_24); | 173 | __pv_stub(x, t, "add", __PV_BITS_31_24); |
172 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
173 | __pv_stub(t, t, "add", __PV_BITS_23_16); | ||
174 | #endif | ||
175 | return t; | 174 | return t; |
176 | } | 175 | } |
177 | 176 | ||
@@ -179,9 +178,6 @@ static inline unsigned long __phys_to_virt(unsigned long x) | |||
179 | { | 178 | { |
180 | unsigned long t; | 179 | unsigned long t; |
181 | __pv_stub(x, t, "sub", __PV_BITS_31_24); | 180 | __pv_stub(x, t, "sub", __PV_BITS_31_24); |
182 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
183 | __pv_stub(t, t, "sub", __PV_BITS_23_16); | ||
184 | #endif | ||
185 | return t; | 181 | return t; |
186 | } | 182 | } |
187 | #else | 183 | #else |
@@ -191,7 +187,11 @@ static inline unsigned long __phys_to_virt(unsigned long x) | |||
191 | #endif | 187 | #endif |
192 | 188 | ||
193 | #ifndef PHYS_OFFSET | 189 | #ifndef PHYS_OFFSET |
190 | #ifdef PLAT_PHYS_OFFSET | ||
194 | #define PHYS_OFFSET PLAT_PHYS_OFFSET | 191 | #define PHYS_OFFSET PLAT_PHYS_OFFSET |
192 | #else | ||
193 | #define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) | ||
194 | #endif | ||
195 | #endif | 195 | #endif |
196 | 196 | ||
197 | /* | 197 | /* |
diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h index 543b44916d2c..6c6809f982f1 100644 --- a/arch/arm/include/asm/module.h +++ b/arch/arm/include/asm/module.h | |||
@@ -31,11 +31,7 @@ struct mod_arch_specific { | |||
31 | 31 | ||
32 | /* Add __virt_to_phys patching state as well */ | 32 | /* Add __virt_to_phys patching state as well */ |
33 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT | 33 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT |
34 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
35 | #define MODULE_ARCH_VERMAGIC_P2V "p2v16 " | ||
36 | #else | ||
37 | #define MODULE_ARCH_VERMAGIC_P2V "p2v8 " | 34 | #define MODULE_ARCH_VERMAGIC_P2V "p2v8 " |
38 | #endif | ||
39 | #else | 35 | #else |
40 | #define MODULE_ARCH_VERMAGIC_P2V "" | 36 | #define MODULE_ARCH_VERMAGIC_P2V "" |
41 | #endif | 37 | #endif |
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index bcd66e00bdbe..b7685f1bb04a 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
@@ -22,7 +22,7 @@ | |||
22 | #if defined(CONFIG_DEBUG_ICEDCC) | 22 | #if defined(CONFIG_DEBUG_ICEDCC) |
23 | @@ debug using ARM EmbeddedICE DCC channel | 23 | @@ debug using ARM EmbeddedICE DCC channel |
24 | 24 | ||
25 | .macro addruart, rp, rv | 25 | .macro addruart, rp, rv, tmp |
26 | .endm | 26 | .endm |
27 | 27 | ||
28 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) | 28 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) |
@@ -106,7 +106,7 @@ | |||
106 | 106 | ||
107 | #ifdef CONFIG_MMU | 107 | #ifdef CONFIG_MMU |
108 | .macro addruart_current, rx, tmp1, tmp2 | 108 | .macro addruart_current, rx, tmp1, tmp2 |
109 | addruart \tmp1, \tmp2 | 109 | addruart \tmp1, \tmp2, \rx |
110 | mrc p15, 0, \rx, c1, c0 | 110 | mrc p15, 0, \rx, c1, c0 |
111 | tst \rx, #1 | 111 | tst \rx, #1 |
112 | moveq \rx, \tmp1 | 112 | moveq \rx, \tmp1 |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 742b6108a001..673c806cc106 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -95,7 +95,7 @@ ENTRY(stext) | |||
95 | sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) | 95 | sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) |
96 | add r8, r8, r4 @ PHYS_OFFSET | 96 | add r8, r8, r4 @ PHYS_OFFSET |
97 | #else | 97 | #else |
98 | ldr r8, =PLAT_PHYS_OFFSET | 98 | ldr r8, =PHYS_OFFSET @ always constant in this case |
99 | #endif | 99 | #endif |
100 | 100 | ||
101 | /* | 101 | /* |
@@ -234,7 +234,7 @@ __create_page_tables: | |||
234 | * This allows debug messages to be output | 234 | * This allows debug messages to be output |
235 | * via a serial console before paging_init. | 235 | * via a serial console before paging_init. |
236 | */ | 236 | */ |
237 | addruart r7, r3 | 237 | addruart r7, r3, r0 |
238 | 238 | ||
239 | mov r3, r3, lsr #20 | 239 | mov r3, r3, lsr #20 |
240 | mov r3, r3, lsl #2 | 240 | mov r3, r3, lsl #2 |
@@ -488,13 +488,8 @@ __fixup_pv_table: | |||
488 | add r5, r5, r3 @ adjust table end address | 488 | add r5, r5, r3 @ adjust table end address |
489 | add r7, r7, r3 @ adjust __pv_phys_offset address | 489 | add r7, r7, r3 @ adjust __pv_phys_offset address |
490 | str r8, [r7] @ save computed PHYS_OFFSET to __pv_phys_offset | 490 | str r8, [r7] @ save computed PHYS_OFFSET to __pv_phys_offset |
491 | #ifndef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
492 | mov r6, r3, lsr #24 @ constant for add/sub instructions | 491 | mov r6, r3, lsr #24 @ constant for add/sub instructions |
493 | teq r3, r6, lsl #24 @ must be 16MiB aligned | 492 | teq r3, r6, lsl #24 @ must be 16MiB aligned |
494 | #else | ||
495 | mov r6, r3, lsr #16 @ constant for add/sub instructions | ||
496 | teq r3, r6, lsl #16 @ must be 64kiB aligned | ||
497 | #endif | ||
498 | THUMB( it ne @ cross section branch ) | 493 | THUMB( it ne @ cross section branch ) |
499 | bne __error | 494 | bne __error |
500 | str r6, [r7, #4] @ save to __pv_offset | 495 | str r6, [r7, #4] @ save to __pv_offset |
@@ -510,20 +505,8 @@ ENDPROC(__fixup_pv_table) | |||
510 | .text | 505 | .text |
511 | __fixup_a_pv_table: | 506 | __fixup_a_pv_table: |
512 | #ifdef CONFIG_THUMB2_KERNEL | 507 | #ifdef CONFIG_THUMB2_KERNEL |
513 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | 508 | lsls r6, #24 |
514 | lsls r0, r6, #24 | 509 | beq 2f |
515 | lsr r6, #8 | ||
516 | beq 1f | ||
517 | clz r7, r0 | ||
518 | lsr r0, #24 | ||
519 | lsl r0, r7 | ||
520 | bic r0, 0x0080 | ||
521 | lsrs r7, #1 | ||
522 | orrcs r0, #0x0080 | ||
523 | orr r0, r0, r7, lsl #12 | ||
524 | #endif | ||
525 | 1: lsls r6, #24 | ||
526 | beq 4f | ||
527 | clz r7, r6 | 510 | clz r7, r6 |
528 | lsr r6, #24 | 511 | lsr r6, #24 |
529 | lsl r6, r7 | 512 | lsl r6, r7 |
@@ -532,43 +515,25 @@ __fixup_a_pv_table: | |||
532 | orrcs r6, #0x0080 | 515 | orrcs r6, #0x0080 |
533 | orr r6, r6, r7, lsl #12 | 516 | orr r6, r6, r7, lsl #12 |
534 | orr r6, #0x4000 | 517 | orr r6, #0x4000 |
535 | b 4f | 518 | b 2f |
536 | 2: @ at this point the C flag is always clear | 519 | 1: add r7, r3 |
537 | add r7, r3 | 520 | ldrh ip, [r7, #2] |
538 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
539 | ldrh ip, [r7] | ||
540 | tst ip, 0x0400 @ the i bit tells us LS or MS byte | ||
541 | beq 3f | ||
542 | cmp r0, #0 @ set C flag, and ... | ||
543 | biceq ip, 0x0400 @ immediate zero value has a special encoding | ||
544 | streqh ip, [r7] @ that requires the i bit cleared | ||
545 | #endif | ||
546 | 3: ldrh ip, [r7, #2] | ||
547 | and ip, 0x8f00 | 521 | and ip, 0x8f00 |
548 | orrcc ip, r6 @ mask in offset bits 31-24 | 522 | orr ip, r6 @ mask in offset bits 31-24 |
549 | orrcs ip, r0 @ mask in offset bits 23-16 | ||
550 | strh ip, [r7, #2] | 523 | strh ip, [r7, #2] |
551 | 4: cmp r4, r5 | 524 | 2: cmp r4, r5 |
552 | ldrcc r7, [r4], #4 @ use branch for delay slot | 525 | ldrcc r7, [r4], #4 @ use branch for delay slot |
553 | bcc 2b | 526 | bcc 1b |
554 | bx lr | 527 | bx lr |
555 | #else | 528 | #else |
556 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | 529 | b 2f |
557 | and r0, r6, #255 @ offset bits 23-16 | 530 | 1: ldr ip, [r7, r3] |
558 | mov r6, r6, lsr #8 @ offset bits 31-24 | ||
559 | #else | ||
560 | mov r0, #0 @ just in case... | ||
561 | #endif | ||
562 | b 3f | ||
563 | 2: ldr ip, [r7, r3] | ||
564 | bic ip, ip, #0x000000ff | 531 | bic ip, ip, #0x000000ff |
565 | tst ip, #0x400 @ rotate shift tells us LS or MS byte | 532 | orr ip, ip, r6 @ mask in offset bits 31-24 |
566 | orrne ip, ip, r6 @ mask in offset bits 31-24 | ||
567 | orreq ip, ip, r0 @ mask in offset bits 23-16 | ||
568 | str ip, [r7, r3] | 533 | str ip, [r7, r3] |
569 | 3: cmp r4, r5 | 534 | 2: cmp r4, r5 |
570 | ldrcc r7, [r4], #4 @ use branch for delay slot | 535 | ldrcc r7, [r4], #4 @ use branch for delay slot |
571 | bcc 2b | 536 | bcc 1b |
572 | mov pc, lr | 537 | mov pc, lr |
573 | #endif | 538 | #endif |
574 | ENDPROC(__fixup_a_pv_table) | 539 | ENDPROC(__fixup_a_pv_table) |
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index dba0d8d8a4bd..f87f5040e78e 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/mach/irq.h> | 16 | #include <asm/mach/irq.h> |
17 | 17 | ||
18 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
19 | #include <linux/gpio.h> | ||
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/i2c-gpio.h> | 21 | #include <linux/i2c-gpio.h> |
21 | 22 | ||
@@ -23,7 +24,6 @@ | |||
23 | 24 | ||
24 | #include <mach/board.h> | 25 | #include <mach/board.h> |
25 | #include <mach/cpu.h> | 26 | #include <mach/cpu.h> |
26 | #include <mach/gpio.h> | ||
27 | #include <mach/at91cap9.h> | 27 | #include <mach/at91cap9.h> |
28 | #include <mach/at91cap9_matrix.h> | 28 | #include <mach/at91cap9_matrix.h> |
29 | #include <mach/at91sam9_smc.h> | 29 | #include <mach/at91sam9_smc.h> |
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 7227755ffec6..978be950035a 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -14,11 +14,11 @@ | |||
14 | #include <asm/mach/map.h> | 14 | #include <asm/mach/map.h> |
15 | 15 | ||
16 | #include <linux/dma-mapping.h> | 16 | #include <linux/dma-mapping.h> |
17 | #include <linux/gpio.h> | ||
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/i2c-gpio.h> | 19 | #include <linux/i2c-gpio.h> |
19 | 20 | ||
20 | #include <mach/board.h> | 21 | #include <mach/board.h> |
21 | #include <mach/gpio.h> | ||
22 | #include <mach/at91rm9200.h> | 22 | #include <mach/at91rm9200.h> |
23 | #include <mach/at91rm9200_mc.h> | 23 | #include <mach/at91rm9200_mc.h> |
24 | 24 | ||
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 39f81f47b4ba..a53b3de9daa2 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -13,11 +13,11 @@ | |||
13 | #include <asm/mach/map.h> | 13 | #include <asm/mach/map.h> |
14 | 14 | ||
15 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/i2c-gpio.h> | 18 | #include <linux/i2c-gpio.h> |
18 | 19 | ||
19 | #include <mach/board.h> | 20 | #include <mach/board.h> |
20 | #include <mach/gpio.h> | ||
21 | #include <mach/cpu.h> | 21 | #include <mach/cpu.h> |
22 | #include <mach/at91sam9260.h> | 22 | #include <mach/at91sam9260.h> |
23 | #include <mach/at91sam9260_matrix.h> | 23 | #include <mach/at91sam9260_matrix.h> |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 0f917928eeb7..4e647b653339 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/mach/map.h> | 14 | #include <asm/mach/map.h> |
15 | 15 | ||
16 | #include <linux/dma-mapping.h> | 16 | #include <linux/dma-mapping.h> |
17 | #include <linux/gpio.h> | ||
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/i2c-gpio.h> | 19 | #include <linux/i2c-gpio.h> |
19 | 20 | ||
@@ -21,7 +22,6 @@ | |||
21 | #include <video/atmel_lcdc.h> | 22 | #include <video/atmel_lcdc.h> |
22 | 23 | ||
23 | #include <mach/board.h> | 24 | #include <mach/board.h> |
24 | #include <mach/gpio.h> | ||
25 | #include <mach/at91sam9261.h> | 25 | #include <mach/at91sam9261.h> |
26 | #include <mach/at91sam9261_matrix.h> | 26 | #include <mach/at91sam9261_matrix.h> |
27 | #include <mach/at91sam9_smc.h> | 27 | #include <mach/at91sam9_smc.h> |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index a050f41fc860..dd7662bc395f 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/mach/map.h> | 13 | #include <asm/mach/map.h> |
14 | 14 | ||
15 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/i2c-gpio.h> | 18 | #include <linux/i2c-gpio.h> |
18 | 19 | ||
@@ -20,7 +21,6 @@ | |||
20 | #include <video/atmel_lcdc.h> | 21 | #include <video/atmel_lcdc.h> |
21 | 22 | ||
22 | #include <mach/board.h> | 23 | #include <mach/board.h> |
23 | #include <mach/gpio.h> | ||
24 | #include <mach/at91sam9263.h> | 24 | #include <mach/at91sam9263.h> |
25 | #include <mach/at91sam9263_matrix.h> | 25 | #include <mach/at91sam9263_matrix.h> |
26 | #include <mach/at91sam9_smc.h> | 26 | #include <mach/at91sam9_smc.h> |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 600bffb01edb..c3dfb1b3b1e3 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/mach/map.h> | 13 | #include <asm/mach/map.h> |
14 | 14 | ||
15 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/i2c-gpio.h> | 18 | #include <linux/i2c-gpio.h> |
18 | #include <linux/atmel-mci.h> | 19 | #include <linux/atmel-mci.h> |
@@ -21,7 +22,6 @@ | |||
21 | #include <video/atmel_lcdc.h> | 22 | #include <video/atmel_lcdc.h> |
22 | 23 | ||
23 | #include <mach/board.h> | 24 | #include <mach/board.h> |
24 | #include <mach/gpio.h> | ||
25 | #include <mach/at91sam9g45.h> | 25 | #include <mach/at91sam9g45.h> |
26 | #include <mach/at91sam9g45_matrix.h> | 26 | #include <mach/at91sam9g45_matrix.h> |
27 | #include <mach/at91sam9_smc.h> | 27 | #include <mach/at91sam9_smc.h> |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index aacb19dc9225..305a851b5bff 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/mach/map.h> | 10 | #include <asm/mach/map.h> |
11 | 11 | ||
12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
13 | #include <linux/gpio.h> | ||
13 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
14 | #include <linux/i2c-gpio.h> | 15 | #include <linux/i2c-gpio.h> |
15 | 16 | ||
@@ -17,7 +18,6 @@ | |||
17 | #include <video/atmel_lcdc.h> | 18 | #include <video/atmel_lcdc.h> |
18 | 19 | ||
19 | #include <mach/board.h> | 20 | #include <mach/board.h> |
20 | #include <mach/gpio.h> | ||
21 | #include <mach/at91sam9rl.h> | 21 | #include <mach/at91sam9rl.h> |
22 | #include <mach/at91sam9rl_matrix.h> | 22 | #include <mach/at91sam9rl_matrix.h> |
23 | #include <mach/at91sam9_smc.h> | 23 | #include <mach/at91sam9_smc.h> |
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c index 5aa58851eb39..367d5cd5e362 100644 --- a/arch/arm/mach-at91/board-1arm.c +++ b/arch/arm/mach-at91/board-1arm.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/gpio.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
@@ -34,7 +35,6 @@ | |||
34 | #include <asm/mach/irq.h> | 35 | #include <asm/mach/irq.h> |
35 | 36 | ||
36 | #include <mach/board.h> | 37 | #include <mach/board.h> |
37 | #include <mach/gpio.h> | ||
38 | #include <mach/cpu.h> | 38 | #include <mach/cpu.h> |
39 | 39 | ||
40 | #include "generic.h" | 40 | #include "generic.h" |
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index b0c796d42e49..0487ea10c2d6 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/gpio.h> | ||
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
30 | #include <linux/module.h> | 31 | #include <linux/module.h> |
@@ -43,7 +44,6 @@ | |||
43 | #include <asm/mach/irq.h> | 44 | #include <asm/mach/irq.h> |
44 | 45 | ||
45 | #include <mach/board.h> | 46 | #include <mach/board.h> |
46 | #include <mach/gpio.h> | ||
47 | 47 | ||
48 | #include "generic.h" | 48 | #include "generic.h" |
49 | 49 | ||
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index d1abd5898e85..747b2eaa9737 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/gpio.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -38,7 +39,6 @@ | |||
38 | #include <asm/mach/irq.h> | 39 | #include <asm/mach/irq.h> |
39 | 40 | ||
40 | #include <mach/board.h> | 41 | #include <mach/board.h> |
41 | #include <mach/gpio.h> | ||
42 | #include <mach/at91sam9_smc.h> | 42 | #include <mach/at91sam9_smc.h> |
43 | 43 | ||
44 | #include "sam9_smc.h" | 44 | #include "sam9_smc.h" |
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c index 679b0b743e92..062670351a6a 100644 --- a/arch/arm/mach-at91/board-cap9adk.c +++ b/arch/arm/mach-at91/board-cap9adk.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/gpio.h> | ||
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
26 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
@@ -41,7 +42,6 @@ | |||
41 | #include <asm/mach/map.h> | 42 | #include <asm/mach/map.h> |
42 | 43 | ||
43 | #include <mach/board.h> | 44 | #include <mach/board.h> |
44 | #include <mach/gpio.h> | ||
45 | #include <mach/at91cap9_matrix.h> | 45 | #include <mach/at91cap9_matrix.h> |
46 | #include <mach/at91sam9_smc.h> | 46 | #include <mach/at91sam9_smc.h> |
47 | #include <mach/system_rev.h> | 47 | #include <mach/system_rev.h> |
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c index c578c5d90728..774c87fcbd5b 100644 --- a/arch/arm/mach-at91/board-carmeva.c +++ b/arch/arm/mach-at91/board-carmeva.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -35,7 +36,6 @@ | |||
35 | 36 | ||
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
37 | #include <mach/board.h> | 38 | #include <mach/board.h> |
38 | #include <mach/gpio.h> | ||
39 | 39 | ||
40 | #include "generic.h" | 40 | #include "generic.h" |
41 | 41 | ||
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c index f4da8a16d5dc..fc885a4ce243 100644 --- a/arch/arm/mach-at91/board-cpu9krea.c +++ b/arch/arm/mach-at91/board-cpu9krea.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/gpio.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -40,7 +41,6 @@ | |||
40 | 41 | ||
41 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
42 | #include <mach/board.h> | 43 | #include <mach/board.h> |
43 | #include <mach/gpio.h> | ||
44 | #include <mach/at91sam9_smc.h> | 44 | #include <mach/at91sam9_smc.h> |
45 | #include <mach/at91sam9260_matrix.h> | 45 | #include <mach/at91sam9260_matrix.h> |
46 | 46 | ||
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c index 2d919f5a4f57..d35e65b08ccd 100644 --- a/arch/arm/mach-at91/board-cpuat91.c +++ b/arch/arm/mach-at91/board-cpuat91.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/gpio.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
@@ -36,7 +37,6 @@ | |||
36 | #include <asm/mach/irq.h> | 37 | #include <asm/mach/irq.h> |
37 | 38 | ||
38 | #include <mach/board.h> | 39 | #include <mach/board.h> |
39 | #include <mach/gpio.h> | ||
40 | #include <mach/at91rm9200_mc.h> | 40 | #include <mach/at91rm9200_mc.h> |
41 | #include <mach/cpu.h> | 41 | #include <mach/cpu.h> |
42 | 42 | ||
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index 17654d5e94e6..c3936665e645 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/gpio.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
@@ -38,7 +39,6 @@ | |||
38 | 39 | ||
39 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
40 | #include <mach/board.h> | 41 | #include <mach/board.h> |
41 | #include <mach/gpio.h> | ||
42 | 42 | ||
43 | #include "generic.h" | 43 | #include "generic.h" |
44 | 44 | ||
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c index 72b55674616c..586100e2acbb 100644 --- a/arch/arm/mach-at91/board-csb637.c +++ b/arch/arm/mach-at91/board-csb637.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
@@ -35,7 +36,6 @@ | |||
35 | 36 | ||
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
37 | #include <mach/board.h> | 38 | #include <mach/board.h> |
38 | #include <mach/gpio.h> | ||
39 | 39 | ||
40 | #include "generic.h" | 40 | #include "generic.h" |
41 | 41 | ||
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c index 01170a2766a8..45db7a3dbef0 100644 --- a/arch/arm/mach-at91/board-eb9200.c +++ b/arch/arm/mach-at91/board-eb9200.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -35,7 +36,6 @@ | |||
35 | #include <asm/mach/irq.h> | 36 | #include <asm/mach/irq.h> |
36 | 37 | ||
37 | #include <mach/board.h> | 38 | #include <mach/board.h> |
38 | #include <mach/gpio.h> | ||
39 | 39 | ||
40 | #include "generic.h" | 40 | #include "generic.h" |
41 | 41 | ||
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 7c0313c51f26..2f9c16d29212 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -37,7 +38,6 @@ | |||
37 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
38 | 39 | ||
39 | #include <mach/board.h> | 40 | #include <mach/board.h> |
40 | #include <mach/gpio.h> | ||
41 | #include <mach/cpu.h> | 41 | #include <mach/cpu.h> |
42 | 42 | ||
43 | #include "generic.h" | 43 | #include "generic.h" |
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c index 4a170890b3b1..3bae73e63633 100644 --- a/arch/arm/mach-at91/board-kafa.c +++ b/arch/arm/mach-at91/board-kafa.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/gpio.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
@@ -34,7 +35,6 @@ | |||
34 | #include <asm/mach/irq.h> | 35 | #include <asm/mach/irq.h> |
35 | 36 | ||
36 | #include <mach/board.h> | 37 | #include <mach/board.h> |
37 | #include <mach/gpio.h> | ||
38 | #include <mach/cpu.h> | 38 | #include <mach/cpu.h> |
39 | 39 | ||
40 | #include "generic.h" | 40 | #include "generic.h" |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index 9dc8d496ead1..15a3f1a87ab0 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -35,7 +36,6 @@ | |||
35 | #include <asm/mach/irq.h> | 36 | #include <asm/mach/irq.h> |
36 | 37 | ||
37 | #include <mach/board.h> | 38 | #include <mach/board.h> |
38 | #include <mach/gpio.h> | ||
39 | #include <mach/cpu.h> | 39 | #include <mach/cpu.h> |
40 | #include <mach/at91rm9200_mc.h> | 40 | #include <mach/at91rm9200_mc.h> |
41 | 41 | ||
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index 9bc6ab32e0ac..6094496f7edb 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/gpio.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -44,7 +45,6 @@ | |||
44 | 45 | ||
45 | #include <mach/hardware.h> | 46 | #include <mach/hardware.h> |
46 | #include <mach/board.h> | 47 | #include <mach/board.h> |
47 | #include <mach/gpio.h> | ||
48 | #include <mach/at91sam9_smc.h> | 48 | #include <mach/at91sam9_smc.h> |
49 | 49 | ||
50 | #include "sam9_smc.h" | 50 | #include "sam9_smc.h" |
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c index b7b8390e8a00..0a8fe6a1b7c8 100644 --- a/arch/arm/mach-at91/board-picotux200.c +++ b/arch/arm/mach-at91/board-picotux200.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -37,7 +38,6 @@ | |||
37 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
38 | 39 | ||
39 | #include <mach/board.h> | 40 | #include <mach/board.h> |
40 | #include <mach/gpio.h> | ||
41 | #include <mach/at91rm9200_mc.h> | 41 | #include <mach/at91rm9200_mc.h> |
42 | 42 | ||
43 | #include "generic.h" | 43 | #include "generic.h" |
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index 81f911033681..938cc390bea3 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/gpio.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -40,7 +41,6 @@ | |||
40 | 41 | ||
41 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
42 | #include <mach/board.h> | 43 | #include <mach/board.h> |
43 | #include <mach/gpio.h> | ||
44 | #include <mach/at91sam9_smc.h> | 44 | #include <mach/at91sam9_smc.h> |
45 | #include <mach/at91_shdwc.h> | 45 | #include <mach/at91_shdwc.h> |
46 | 46 | ||
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c index 6f08faadb474..b4ac30e38a9e 100644 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/gpio.h> | ||
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
26 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
@@ -39,7 +40,6 @@ | |||
39 | 40 | ||
40 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
41 | #include <mach/board.h> | 42 | #include <mach/board.h> |
42 | #include <mach/gpio.h> | ||
43 | #include <mach/at91rm9200_mc.h> | 43 | #include <mach/at91rm9200_mc.h> |
44 | 44 | ||
45 | #include "generic.h" | 45 | #include "generic.h" |
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c index 85bcccd7b9e4..99fd7f8aee0e 100644 --- a/arch/arm/mach-at91/board-rm9200ek.c +++ b/arch/arm/mach-at91/board-rm9200ek.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/gpio.h> | ||
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
26 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
@@ -39,7 +40,6 @@ | |||
39 | 40 | ||
40 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
41 | #include <mach/board.h> | 42 | #include <mach/board.h> |
42 | #include <mach/gpio.h> | ||
43 | #include <mach/at91rm9200_mc.h> | 43 | #include <mach/at91rm9200_mc.h> |
44 | 44 | ||
45 | #include "generic.h" | 45 | #include "generic.h" |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index 4d3a02f1289e..2a21e790250e 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/gpio.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -37,7 +38,6 @@ | |||
37 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
38 | 39 | ||
39 | #include <mach/board.h> | 40 | #include <mach/board.h> |
40 | #include <mach/gpio.h> | ||
41 | #include <mach/at91sam9_smc.h> | 41 | #include <mach/at91sam9_smc.h> |
42 | 42 | ||
43 | #include "sam9_smc.h" | 43 | #include "sam9_smc.h" |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index 8a50c3e67186..89c8b579bfda 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -41,7 +42,6 @@ | |||
41 | 42 | ||
42 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
43 | #include <mach/board.h> | 44 | #include <mach/board.h> |
44 | #include <mach/gpio.h> | ||
45 | #include <mach/at91sam9_smc.h> | 45 | #include <mach/at91sam9_smc.h> |
46 | #include <mach/at91_shdwc.h> | 46 | #include <mach/at91_shdwc.h> |
47 | #include <mach/system_rev.h> | 47 | #include <mach/system_rev.h> |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 5096a0ec50c1..3741f43cdae9 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -45,7 +46,6 @@ | |||
45 | 46 | ||
46 | #include <mach/hardware.h> | 47 | #include <mach/hardware.h> |
47 | #include <mach/board.h> | 48 | #include <mach/board.h> |
48 | #include <mach/gpio.h> | ||
49 | #include <mach/at91sam9_smc.h> | 49 | #include <mach/at91sam9_smc.h> |
50 | #include <mach/at91_shdwc.h> | 50 | #include <mach/at91_shdwc.h> |
51 | #include <mach/system_rev.h> | 51 | #include <mach/system_rev.h> |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index ea8f185d3b9d..a580dd451a41 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -44,7 +45,6 @@ | |||
44 | 45 | ||
45 | #include <mach/hardware.h> | 46 | #include <mach/hardware.h> |
46 | #include <mach/board.h> | 47 | #include <mach/board.h> |
47 | #include <mach/gpio.h> | ||
48 | #include <mach/at91sam9_smc.h> | 48 | #include <mach/at91sam9_smc.h> |
49 | #include <mach/at91_shdwc.h> | 49 | #include <mach/at91_shdwc.h> |
50 | #include <mach/system_rev.h> | 50 | #include <mach/system_rev.h> |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 817f59d7251b..8d77c2ff96b2 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/gpio.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
@@ -41,7 +42,6 @@ | |||
41 | #include <asm/mach/irq.h> | 42 | #include <asm/mach/irq.h> |
42 | 43 | ||
43 | #include <mach/board.h> | 44 | #include <mach/board.h> |
44 | #include <mach/gpio.h> | ||
45 | #include <mach/at91sam9_smc.h> | 45 | #include <mach/at91sam9_smc.h> |
46 | #include <mach/system_rev.h> | 46 | #include <mach/system_rev.h> |
47 | 47 | ||
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index ad234ccbf57e..2d6203ac1a42 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/gpio.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
@@ -38,7 +39,6 @@ | |||
38 | #include <asm/mach/irq.h> | 39 | #include <asm/mach/irq.h> |
39 | 40 | ||
40 | #include <mach/board.h> | 41 | #include <mach/board.h> |
41 | #include <mach/gpio.h> | ||
42 | #include <mach/at91sam9_smc.h> | 42 | #include <mach/at91sam9_smc.h> |
43 | #include <mach/at91_shdwc.h> | 43 | #include <mach/at91_shdwc.h> |
44 | #include <mach/system_rev.h> | 44 | #include <mach/system_rev.h> |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 4f14b54b93a8..39a28effc3df 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/gpio.h> | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
@@ -30,7 +31,6 @@ | |||
30 | 31 | ||
31 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
32 | #include <mach/board.h> | 33 | #include <mach/board.h> |
33 | #include <mach/gpio.h> | ||
34 | #include <mach/at91sam9_smc.h> | 34 | #include <mach/at91sam9_smc.h> |
35 | #include <mach/at91_shdwc.h> | 35 | #include <mach/at91_shdwc.h> |
36 | 36 | ||
diff --git a/arch/arm/mach-at91/board-usb-a9260.c b/arch/arm/mach-at91/board-usb-a9260.c index 8c4c1a02c4be..bac9b65cf551 100644 --- a/arch/arm/mach-at91/board-usb-a9260.c +++ b/arch/arm/mach-at91/board-usb-a9260.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/gpio.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -40,7 +41,6 @@ | |||
40 | 41 | ||
41 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
42 | #include <mach/board.h> | 43 | #include <mach/board.h> |
43 | #include <mach/gpio.h> | ||
44 | #include <mach/at91sam9_smc.h> | 44 | #include <mach/at91sam9_smc.h> |
45 | #include <mach/at91_shdwc.h> | 45 | #include <mach/at91_shdwc.h> |
46 | 46 | ||
diff --git a/arch/arm/mach-at91/board-usb-a9263.c b/arch/arm/mach-at91/board-usb-a9263.c index 25e793782a4e..5bd735787d6d 100644 --- a/arch/arm/mach-at91/board-usb-a9263.c +++ b/arch/arm/mach-at91/board-usb-a9263.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/gpio.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -39,7 +40,6 @@ | |||
39 | 40 | ||
40 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
41 | #include <mach/board.h> | 42 | #include <mach/board.h> |
42 | #include <mach/gpio.h> | ||
43 | #include <mach/at91sam9_smc.h> | 43 | #include <mach/at91sam9_smc.h> |
44 | #include <mach/at91_shdwc.h> | 44 | #include <mach/at91_shdwc.h> |
45 | 45 | ||
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index 95edcbd2aec6..3c288b396fc4 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/gpio.h> | ||
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
26 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
@@ -43,7 +44,6 @@ | |||
43 | 44 | ||
44 | #include <mach/hardware.h> | 45 | #include <mach/hardware.h> |
45 | #include <mach/board.h> | 46 | #include <mach/board.h> |
46 | #include <mach/gpio.h> | ||
47 | #include <mach/at91rm9200_mc.h> | 47 | #include <mach/at91rm9200_mc.h> |
48 | #include <mach/cpu.h> | 48 | #include <mach/cpu.h> |
49 | 49 | ||
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index 4615528205c8..224e9e2f8674 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/clk.h> | 12 | #include <linux/clk.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/gpio.h> | ||
14 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
15 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
16 | #include <linux/debugfs.h> | 17 | #include <linux/debugfs.h> |
@@ -22,9 +23,6 @@ | |||
22 | 23 | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <mach/at91_pio.h> | 25 | #include <mach/at91_pio.h> |
25 | #include <mach/gpio.h> | ||
26 | |||
27 | #include <asm/gpio.h> | ||
28 | 26 | ||
29 | #include "generic.h" | 27 | #include "generic.h" |
30 | 28 | ||
diff --git a/arch/arm/mach-at91/include/mach/debug-macro.S b/arch/arm/mach-at91/include/mach/debug-macro.S index bc1e0b2e2f4f..0ed8648c6452 100644 --- a/arch/arm/mach-at91/include/mach/debug-macro.S +++ b/arch/arm/mach-at91/include/mach/debug-macro.S | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <mach/at91_dbgu.h> | 15 | #include <mach/at91_dbgu.h> |
16 | 16 | ||
17 | .macro addruart, rp, rv | 17 | .macro addruart, rp, rv, tmp |
18 | ldr \rp, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address) | 18 | ldr \rp, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address) |
19 | ldr \rv, =(AT91_VA_BASE_SYS + AT91_DBGU) @ System peripherals (virt address) | 19 | ldr \rv, =(AT91_VA_BASE_SYS + AT91_DBGU) @ System peripherals (virt address) |
20 | .endm | 20 | .endm |
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h index 056dc6674b6b..2b9a1f51210f 100644 --- a/arch/arm/mach-at91/include/mach/gpio.h +++ b/arch/arm/mach-at91/include/mach/gpio.h | |||
@@ -214,11 +214,6 @@ extern void at91_gpio_resume(void); | |||
214 | */ | 214 | */ |
215 | 215 | ||
216 | #include <asm/errno.h> | 216 | #include <asm/errno.h> |
217 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
218 | |||
219 | #define gpio_get_value __gpio_get_value | ||
220 | #define gpio_set_value __gpio_set_value | ||
221 | #define gpio_cansleep __gpio_cansleep | ||
222 | 217 | ||
223 | #define gpio_to_irq(gpio) (gpio) | 218 | #define gpio_to_irq(gpio) (gpio) |
224 | #define irq_to_gpio(irq) (irq) | 219 | #define irq_to_gpio(irq) (irq) |
diff --git a/arch/arm/mach-at91/leds.c b/arch/arm/mach-at91/leds.c index 0415a839e1ad..8dfafe76ffe6 100644 --- a/arch/arm/mach-at91/leds.c +++ b/arch/arm/mach-at91/leds.c | |||
@@ -9,13 +9,13 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/gpio.h> | ||
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
16 | 17 | ||
17 | #include <mach/board.h> | 18 | #include <mach/board.h> |
18 | #include <mach/gpio.h> | ||
19 | 19 | ||
20 | 20 | ||
21 | /* ------------------------------------------------------------------------- */ | 21 | /* ------------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 4159eca78945..7046158109d7 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * (at your option) any later version. | 10 | * (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/gpio.h> | ||
13 | #include <linux/suspend.h> | 14 | #include <linux/suspend.h> |
14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
15 | #include <linux/proc_fs.h> | 16 | #include <linux/proc_fs.h> |
@@ -25,7 +26,6 @@ | |||
25 | #include <asm/mach/irq.h> | 26 | #include <asm/mach/irq.h> |
26 | 27 | ||
27 | #include <mach/at91_pmc.h> | 28 | #include <mach/at91_pmc.h> |
28 | #include <mach/gpio.h> | ||
29 | #include <mach/cpu.h> | 29 | #include <mach/cpu.h> |
30 | 30 | ||
31 | #include "generic.h" | 31 | #include "generic.h" |
diff --git a/arch/arm/mach-bcmring/include/mach/hardware.h b/arch/arm/mach-bcmring/include/mach/hardware.h index ed78aabb8e9f..6ae20a649a97 100644 --- a/arch/arm/mach-bcmring/include/mach/hardware.h +++ b/arch/arm/mach-bcmring/include/mach/hardware.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #define __ASM_ARCH_HARDWARE_H | 22 | #define __ASM_ARCH_HARDWARE_H |
23 | 23 | ||
24 | #include <asm/sizes.h> | 24 | #include <asm/sizes.h> |
25 | #include <mach/memory.h> | ||
26 | #include <cfg_global.h> | 25 | #include <cfg_global.h> |
27 | #include <mach/csp/mm_io.h> | 26 | #include <mach/csp/mm_io.h> |
28 | 27 | ||
@@ -31,7 +30,7 @@ | |||
31 | * *_SIZE is the size of the region | 30 | * *_SIZE is the size of the region |
32 | * *_BASE is the virtual address | 31 | * *_BASE is the virtual address |
33 | */ | 32 | */ |
34 | #define RAM_START PLAT_PHYS_OFFSET | 33 | #define RAM_START PHYS_OFFSET |
35 | 34 | ||
36 | #define RAM_SIZE (CFG_GLOBAL_RAM_SIZE-CFG_GLOBAL_RAM_SIZE_RESERVED) | 35 | #define RAM_SIZE (CFG_GLOBAL_RAM_SIZE-CFG_GLOBAL_RAM_SIZE_RESERVED) |
37 | #define RAM_BASE PAGE_OFFSET | 36 | #define RAM_BASE PAGE_OFFSET |
diff --git a/arch/arm/mach-bcmring/include/mach/memory.h b/arch/arm/mach-bcmring/include/mach/memory.h deleted file mode 100644 index 8848a5bb3445..000000000000 --- a/arch/arm/mach-bcmring/include/mach/memory.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /***************************************************************************** | ||
2 | * Copyright 2005 - 2008 Broadcom Corporation. All rights reserved. | ||
3 | * | ||
4 | * Unless you and Broadcom execute a separate written software license | ||
5 | * agreement governing use of this software, this software is licensed to you | ||
6 | * under the terms of the GNU General Public License version 2, available at | ||
7 | * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). | ||
8 | * | ||
9 | * Notwithstanding the above, under no circumstances may you combine this | ||
10 | * software in any way with any other Broadcom software provided under a | ||
11 | * license other than the GPL, without Broadcom's express prior written | ||
12 | * consent. | ||
13 | *****************************************************************************/ | ||
14 | |||
15 | #ifndef __ASM_ARCH_MEMORY_H | ||
16 | #define __ASM_ARCH_MEMORY_H | ||
17 | |||
18 | #include <cfg_global.h> | ||
19 | |||
20 | /* | ||
21 | * Physical vs virtual RAM address space conversion. These are | ||
22 | * private definitions which should NOT be used outside memory.h | ||
23 | * files. Use virt_to_phys/phys_to_virt/__pa/__va instead. | ||
24 | */ | ||
25 | |||
26 | #define PLAT_PHYS_OFFSET CFG_GLOBAL_RAM_BASE | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S index 507c6873b7ee..b802e8a51831 100644 --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <asm/hardware/clps7111.h> | 15 | #include <asm/hardware/clps7111.h> |
16 | 16 | ||
17 | .macro addruart, rp, rv | 17 | .macro addruart, rp, rv, tmp |
18 | #ifndef CONFIG_DEBUG_CLPS711X_UART2 | 18 | #ifndef CONFIG_DEBUG_CLPS711X_UART2 |
19 | mov \rp, #0x0000 @ UART1 | 19 | mov \rp, #0x0000 @ UART1 |
20 | #else | 20 | #else |
diff --git a/arch/arm/mach-cns3xxx/include/mach/debug-macro.S b/arch/arm/mach-cns3xxx/include/mach/debug-macro.S index 56d828634db5..d04c150baa1c 100644 --- a/arch/arm/mach-cns3xxx/include/mach/debug-macro.S +++ b/arch/arm/mach-cns3xxx/include/mach/debug-macro.S | |||
@@ -10,7 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | .macro addruart,rp,rv | 13 | .macro addruart,rp,rv,tmp |
14 | mov \rp, #0x00009000 | 14 | mov \rp, #0x00009000 |
15 | orr \rv, \rp, #0xf0000000 @ virtual base | 15 | orr \rv, \rp, #0xf0000000 @ virtual base |
16 | orr \rp, \rp, #0x10000000 | 16 | orr \rp, \rp, #0x10000000 |
diff --git a/arch/arm/mach-cns3xxx/include/mach/memory.h b/arch/arm/mach-cns3xxx/include/mach/memory.h deleted file mode 100644 index dc16c5c5d86b..000000000000 --- a/arch/arm/mach-cns3xxx/include/mach/memory.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2003 ARM Limited | ||
3 | * Copyright 2008 Cavium Networks | ||
4 | * | ||
5 | * This file is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License, Version 2, as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #ifndef __MACH_MEMORY_H | ||
11 | #define __MACH_MEMORY_H | ||
12 | |||
13 | /* | ||
14 | * Physical DRAM offset. | ||
15 | */ | ||
16 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
17 | |||
18 | #define __phys_to_bus(x) ((x) + PHYS_OFFSET) | ||
19 | #define __bus_to_phys(x) ((x) - PHYS_OFFSET) | ||
20 | |||
21 | #define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v)) | ||
22 | #define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b)) | ||
23 | #define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p)) | ||
24 | #define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b)) | ||
25 | |||
26 | #endif | ||
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index 0b87a1ca2bb3..495e31306fc0 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | # Common objects | 6 | # Common objects |
7 | obj-y := time.o clock.o serial.o io.o psc.o \ | 7 | obj-y := time.o clock.o serial.o io.o psc.o \ |
8 | gpio.o dma.o usb.o common.o sram.o aemif.o | 8 | dma.o usb.o common.o sram.o aemif.o |
9 | 9 | ||
10 | obj-$(CONFIG_DAVINCI_MUX) += mux.o | 10 | obj-$(CONFIG_DAVINCI_MUX) += mux.o |
11 | 11 | ||
@@ -17,7 +17,6 @@ obj-$(CONFIG_ARCH_DAVINCI_DM365) += dm365.o devices.o | |||
17 | obj-$(CONFIG_ARCH_DAVINCI_DA830) += da830.o devices-da8xx.o | 17 | obj-$(CONFIG_ARCH_DAVINCI_DA830) += da830.o devices-da8xx.o |
18 | obj-$(CONFIG_ARCH_DAVINCI_DA850) += da850.o devices-da8xx.o | 18 | obj-$(CONFIG_ARCH_DAVINCI_DA850) += da850.o devices-da8xx.o |
19 | obj-$(CONFIG_ARCH_DAVINCI_TNETV107X) += tnetv107x.o devices-tnetv107x.o | 19 | obj-$(CONFIG_ARCH_DAVINCI_TNETV107X) += tnetv107x.o devices-tnetv107x.o |
20 | obj-$(CONFIG_ARCH_DAVINCI_TNETV107X) += gpio-tnetv107x.o | ||
21 | 20 | ||
22 | obj-$(CONFIG_AINTC) += irq.o | 21 | obj-$(CONFIG_AINTC) += irq.o |
23 | obj-$(CONFIG_CP_INTC) += cp_intc.o | 22 | obj-$(CONFIG_CP_INTC) += cp_intc.o |
diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c index bd59f31b8a95..0b314bf16f7f 100644 --- a/arch/arm/mach-davinci/cpuidle.c +++ b/arch/arm/mach-davinci/cpuidle.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <asm/proc-fns.h> | 19 | #include <asm/proc-fns.h> |
20 | 20 | ||
21 | #include <mach/cpuidle.h> | 21 | #include <mach/cpuidle.h> |
22 | #include <mach/memory.h> | 22 | #include <mach/ddr2.h> |
23 | 23 | ||
24 | #define DAVINCI_CPUIDLE_MAX_STATES 2 | 24 | #define DAVINCI_CPUIDLE_MAX_STATES 2 |
25 | 25 | ||
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 2ed2f822fc40..a6bf5dcaef13 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * is licensed "as is" without any warranty of any kind, whether express | 8 | * is licensed "as is" without any warranty of any kind, whether express |
9 | * or implied. | 9 | * or implied. |
10 | */ | 10 | */ |
11 | #include <linux/gpio.h> | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/clk.h> | 13 | #include <linux/clk.h> |
13 | 14 | ||
@@ -19,7 +20,7 @@ | |||
19 | #include <mach/common.h> | 20 | #include <mach/common.h> |
20 | #include <mach/time.h> | 21 | #include <mach/time.h> |
21 | #include <mach/da8xx.h> | 22 | #include <mach/da8xx.h> |
22 | #include <mach/gpio.h> | 23 | #include <mach/gpio-davinci.h> |
23 | 24 | ||
24 | #include "clock.h" | 25 | #include "clock.h" |
25 | #include "mux.h" | 26 | #include "mux.h" |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 935dbed5c541..4aae01576aab 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * is licensed "as is" without any warranty of any kind, whether express | 11 | * is licensed "as is" without any warranty of any kind, whether express |
12 | * or implied. | 12 | * or implied. |
13 | */ | 13 | */ |
14 | #include <linux/gpio.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
@@ -27,7 +28,7 @@ | |||
27 | #include <mach/da8xx.h> | 28 | #include <mach/da8xx.h> |
28 | #include <mach/cpufreq.h> | 29 | #include <mach/cpufreq.h> |
29 | #include <mach/pm.h> | 30 | #include <mach/pm.h> |
30 | #include <mach/gpio.h> | 31 | #include <mach/gpio-davinci.h> |
31 | 32 | ||
32 | #include "clock.h" | 33 | #include "clock.h" |
33 | #include "mux.h" | 34 | #include "mux.h" |
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 68fb18162459..fe520d4167a2 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/serial_8250.h> | 13 | #include <linux/serial_8250.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
16 | #include <linux/gpio.h> | ||
17 | 16 | ||
18 | #include <linux/spi/spi.h> | 17 | #include <linux/spi/spi.h> |
19 | 18 | ||
@@ -30,6 +29,7 @@ | |||
30 | #include <mach/common.h> | 29 | #include <mach/common.h> |
31 | #include <mach/asp.h> | 30 | #include <mach/asp.h> |
32 | #include <mach/spi.h> | 31 | #include <mach/spi.h> |
32 | #include <mach/gpio-davinci.h> | ||
33 | 33 | ||
34 | #include "clock.h" | 34 | #include "clock.h" |
35 | #include "mux.h" | 35 | #include "mux.h" |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 4604e72d7d99..679e168dce34 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/serial_8250.h> | 17 | #include <linux/serial_8250.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/gpio.h> | ||
21 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
22 | 21 | ||
23 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
@@ -34,7 +33,7 @@ | |||
34 | #include <mach/asp.h> | 33 | #include <mach/asp.h> |
35 | #include <mach/keyscan.h> | 34 | #include <mach/keyscan.h> |
36 | #include <mach/spi.h> | 35 | #include <mach/spi.h> |
37 | 36 | #include <mach/gpio-davinci.h> | |
38 | 37 | ||
39 | #include "clock.h" | 38 | #include "clock.h" |
40 | #include "mux.h" | 39 | #include "mux.h" |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 555ff5bdb220..3470983aa343 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/clk.h> | 12 | #include <linux/clk.h> |
13 | #include <linux/serial_8250.h> | 13 | #include <linux/serial_8250.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/gpio.h> | ||
16 | 15 | ||
17 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
18 | 17 | ||
@@ -26,6 +25,7 @@ | |||
26 | #include <mach/serial.h> | 25 | #include <mach/serial.h> |
27 | #include <mach/common.h> | 26 | #include <mach/common.h> |
28 | #include <mach/asp.h> | 27 | #include <mach/asp.h> |
28 | #include <mach/gpio-davinci.h> | ||
29 | 29 | ||
30 | #include "clock.h" | 30 | #include "clock.h" |
31 | #include "mux.h" | 31 | #include "mux.h" |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index b0c350a02484..0b68ed534f8e 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/clk.h> | 13 | #include <linux/clk.h> |
14 | #include <linux/serial_8250.h> | 14 | #include <linux/serial_8250.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/gpio.h> | ||
17 | 16 | ||
18 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
19 | 18 | ||
@@ -27,6 +26,7 @@ | |||
27 | #include <mach/serial.h> | 26 | #include <mach/serial.h> |
28 | #include <mach/common.h> | 27 | #include <mach/common.h> |
29 | #include <mach/asp.h> | 28 | #include <mach/asp.h> |
29 | #include <mach/gpio-davinci.h> | ||
30 | 30 | ||
31 | #include "clock.h" | 31 | #include "clock.h" |
32 | #include "mux.h" | 32 | #include "mux.h" |
diff --git a/arch/arm/mach-davinci/gpio-tnetv107x.c b/arch/arm/mach-davinci/gpio-tnetv107x.c deleted file mode 100644 index 3fa3e2867e19..000000000000 --- a/arch/arm/mach-davinci/gpio-tnetv107x.c +++ /dev/null | |||
@@ -1,205 +0,0 @@ | |||
1 | /* | ||
2 | * Texas Instruments TNETV107X GPIO Controller | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License as | ||
8 | * published by the Free Software Foundation version 2. | ||
9 | * | ||
10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
11 | * kind, whether express or implied; without even the implied warranty | ||
12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/gpio.h> | ||
18 | |||
19 | #include <mach/common.h> | ||
20 | #include <mach/tnetv107x.h> | ||
21 | |||
22 | struct tnetv107x_gpio_regs { | ||
23 | u32 idver; | ||
24 | u32 data_in[3]; | ||
25 | u32 data_out[3]; | ||
26 | u32 direction[3]; | ||
27 | u32 enable[3]; | ||
28 | }; | ||
29 | |||
30 | #define gpio_reg_index(gpio) ((gpio) >> 5) | ||
31 | #define gpio_reg_bit(gpio) BIT((gpio) & 0x1f) | ||
32 | |||
33 | #define gpio_reg_rmw(reg, mask, val) \ | ||
34 | __raw_writel((__raw_readl(reg) & ~(mask)) | (val), (reg)) | ||
35 | |||
36 | #define gpio_reg_set_bit(reg, gpio) \ | ||
37 | gpio_reg_rmw((reg) + gpio_reg_index(gpio), 0, gpio_reg_bit(gpio)) | ||
38 | |||
39 | #define gpio_reg_clear_bit(reg, gpio) \ | ||
40 | gpio_reg_rmw((reg) + gpio_reg_index(gpio), gpio_reg_bit(gpio), 0) | ||
41 | |||
42 | #define gpio_reg_get_bit(reg, gpio) \ | ||
43 | (__raw_readl((reg) + gpio_reg_index(gpio)) & gpio_reg_bit(gpio)) | ||
44 | |||
45 | #define chip2controller(chip) \ | ||
46 | container_of(chip, struct davinci_gpio_controller, chip) | ||
47 | |||
48 | #define TNETV107X_GPIO_CTLRS DIV_ROUND_UP(TNETV107X_N_GPIO, 32) | ||
49 | |||
50 | static struct davinci_gpio_controller chips[TNETV107X_GPIO_CTLRS]; | ||
51 | |||
52 | static int tnetv107x_gpio_request(struct gpio_chip *chip, unsigned offset) | ||
53 | { | ||
54 | struct davinci_gpio_controller *ctlr = chip2controller(chip); | ||
55 | struct tnetv107x_gpio_regs __iomem *regs = ctlr->regs; | ||
56 | unsigned gpio = chip->base + offset; | ||
57 | unsigned long flags; | ||
58 | |||
59 | spin_lock_irqsave(&ctlr->lock, flags); | ||
60 | |||
61 | gpio_reg_set_bit(regs->enable, gpio); | ||
62 | |||
63 | spin_unlock_irqrestore(&ctlr->lock, flags); | ||
64 | |||
65 | return 0; | ||
66 | } | ||
67 | |||
68 | static void tnetv107x_gpio_free(struct gpio_chip *chip, unsigned offset) | ||
69 | { | ||
70 | struct davinci_gpio_controller *ctlr = chip2controller(chip); | ||
71 | struct tnetv107x_gpio_regs __iomem *regs = ctlr->regs; | ||
72 | unsigned gpio = chip->base + offset; | ||
73 | unsigned long flags; | ||
74 | |||
75 | spin_lock_irqsave(&ctlr->lock, flags); | ||
76 | |||
77 | gpio_reg_clear_bit(regs->enable, gpio); | ||
78 | |||
79 | spin_unlock_irqrestore(&ctlr->lock, flags); | ||
80 | } | ||
81 | |||
82 | static int tnetv107x_gpio_dir_in(struct gpio_chip *chip, unsigned offset) | ||
83 | { | ||
84 | struct davinci_gpio_controller *ctlr = chip2controller(chip); | ||
85 | struct tnetv107x_gpio_regs __iomem *regs = ctlr->regs; | ||
86 | unsigned gpio = chip->base + offset; | ||
87 | unsigned long flags; | ||
88 | |||
89 | spin_lock_irqsave(&ctlr->lock, flags); | ||
90 | |||
91 | gpio_reg_set_bit(regs->direction, gpio); | ||
92 | |||
93 | spin_unlock_irqrestore(&ctlr->lock, flags); | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | |||
98 | static int tnetv107x_gpio_dir_out(struct gpio_chip *chip, | ||
99 | unsigned offset, int value) | ||
100 | { | ||
101 | struct davinci_gpio_controller *ctlr = chip2controller(chip); | ||
102 | struct tnetv107x_gpio_regs __iomem *regs = ctlr->regs; | ||
103 | unsigned gpio = chip->base + offset; | ||
104 | unsigned long flags; | ||
105 | |||
106 | spin_lock_irqsave(&ctlr->lock, flags); | ||
107 | |||
108 | if (value) | ||
109 | gpio_reg_set_bit(regs->data_out, gpio); | ||
110 | else | ||
111 | gpio_reg_clear_bit(regs->data_out, gpio); | ||
112 | |||
113 | gpio_reg_clear_bit(regs->direction, gpio); | ||
114 | |||
115 | spin_unlock_irqrestore(&ctlr->lock, flags); | ||
116 | |||
117 | return 0; | ||
118 | } | ||
119 | |||
120 | static int tnetv107x_gpio_get(struct gpio_chip *chip, unsigned offset) | ||
121 | { | ||
122 | struct davinci_gpio_controller *ctlr = chip2controller(chip); | ||
123 | struct tnetv107x_gpio_regs __iomem *regs = ctlr->regs; | ||
124 | unsigned gpio = chip->base + offset; | ||
125 | int ret; | ||
126 | |||
127 | ret = gpio_reg_get_bit(regs->data_in, gpio); | ||
128 | |||
129 | return ret ? 1 : 0; | ||
130 | } | ||
131 | |||
132 | static void tnetv107x_gpio_set(struct gpio_chip *chip, | ||
133 | unsigned offset, int value) | ||
134 | { | ||
135 | struct davinci_gpio_controller *ctlr = chip2controller(chip); | ||
136 | struct tnetv107x_gpio_regs __iomem *regs = ctlr->regs; | ||
137 | unsigned gpio = chip->base + offset; | ||
138 | unsigned long flags; | ||
139 | |||
140 | spin_lock_irqsave(&ctlr->lock, flags); | ||
141 | |||
142 | if (value) | ||
143 | gpio_reg_set_bit(regs->data_out, gpio); | ||
144 | else | ||
145 | gpio_reg_clear_bit(regs->data_out, gpio); | ||
146 | |||
147 | spin_unlock_irqrestore(&ctlr->lock, flags); | ||
148 | } | ||
149 | |||
150 | static int __init tnetv107x_gpio_setup(void) | ||
151 | { | ||
152 | int i, base; | ||
153 | unsigned ngpio; | ||
154 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
155 | struct tnetv107x_gpio_regs *regs; | ||
156 | struct davinci_gpio_controller *ctlr; | ||
157 | |||
158 | if (soc_info->gpio_type != GPIO_TYPE_TNETV107X) | ||
159 | return 0; | ||
160 | |||
161 | ngpio = soc_info->gpio_num; | ||
162 | if (ngpio == 0) { | ||
163 | pr_err("GPIO setup: how many GPIOs?\n"); | ||
164 | return -EINVAL; | ||
165 | } | ||
166 | |||
167 | if (WARN_ON(TNETV107X_N_GPIO < ngpio)) | ||
168 | ngpio = TNETV107X_N_GPIO; | ||
169 | |||
170 | regs = ioremap(soc_info->gpio_base, SZ_4K); | ||
171 | if (WARN_ON(!regs)) | ||
172 | return -EINVAL; | ||
173 | |||
174 | for (i = 0, base = 0; base < ngpio; i++, base += 32) { | ||
175 | ctlr = &chips[i]; | ||
176 | |||
177 | ctlr->chip.label = "tnetv107x"; | ||
178 | ctlr->chip.can_sleep = 0; | ||
179 | ctlr->chip.base = base; | ||
180 | ctlr->chip.ngpio = ngpio - base; | ||
181 | if (ctlr->chip.ngpio > 32) | ||
182 | ctlr->chip.ngpio = 32; | ||
183 | |||
184 | ctlr->chip.request = tnetv107x_gpio_request; | ||
185 | ctlr->chip.free = tnetv107x_gpio_free; | ||
186 | ctlr->chip.direction_input = tnetv107x_gpio_dir_in; | ||
187 | ctlr->chip.get = tnetv107x_gpio_get; | ||
188 | ctlr->chip.direction_output = tnetv107x_gpio_dir_out; | ||
189 | ctlr->chip.set = tnetv107x_gpio_set; | ||
190 | |||
191 | spin_lock_init(&ctlr->lock); | ||
192 | |||
193 | ctlr->regs = regs; | ||
194 | ctlr->set_data = ®s->data_out[i]; | ||
195 | ctlr->clr_data = ®s->data_out[i]; | ||
196 | ctlr->in_data = ®s->data_in[i]; | ||
197 | |||
198 | gpiochip_add(&ctlr->chip); | ||
199 | } | ||
200 | |||
201 | soc_info->gpio_ctlrs = chips; | ||
202 | soc_info->gpio_ctlrs_num = DIV_ROUND_UP(ngpio, 32); | ||
203 | return 0; | ||
204 | } | ||
205 | pure_initcall(tnetv107x_gpio_setup); | ||
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c deleted file mode 100644 index cafbe13a82a5..000000000000 --- a/arch/arm/mach-davinci/gpio.c +++ /dev/null | |||
@@ -1,460 +0,0 @@ | |||
1 | /* | ||
2 | * TI DaVinci GPIO Support | ||
3 | * | ||
4 | * Copyright (c) 2006-2007 David Brownell | ||
5 | * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/errno.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/clk.h> | ||
16 | #include <linux/err.h> | ||
17 | #include <linux/io.h> | ||
18 | |||
19 | #include <mach/gpio.h> | ||
20 | |||
21 | #include <asm/mach/irq.h> | ||
22 | |||
23 | struct davinci_gpio_regs { | ||
24 | u32 dir; | ||
25 | u32 out_data; | ||
26 | u32 set_data; | ||
27 | u32 clr_data; | ||
28 | u32 in_data; | ||
29 | u32 set_rising; | ||
30 | u32 clr_rising; | ||
31 | u32 set_falling; | ||
32 | u32 clr_falling; | ||
33 | u32 intstat; | ||
34 | }; | ||
35 | |||
36 | #define chip2controller(chip) \ | ||
37 | container_of(chip, struct davinci_gpio_controller, chip) | ||
38 | |||
39 | static struct davinci_gpio_controller chips[DIV_ROUND_UP(DAVINCI_N_GPIO, 32)]; | ||
40 | static void __iomem *gpio_base; | ||
41 | |||
42 | static struct davinci_gpio_regs __iomem __init *gpio2regs(unsigned gpio) | ||
43 | { | ||
44 | void __iomem *ptr; | ||
45 | |||
46 | if (gpio < 32 * 1) | ||
47 | ptr = gpio_base + 0x10; | ||
48 | else if (gpio < 32 * 2) | ||
49 | ptr = gpio_base + 0x38; | ||
50 | else if (gpio < 32 * 3) | ||
51 | ptr = gpio_base + 0x60; | ||
52 | else if (gpio < 32 * 4) | ||
53 | ptr = gpio_base + 0x88; | ||
54 | else if (gpio < 32 * 5) | ||
55 | ptr = gpio_base + 0xb0; | ||
56 | else | ||
57 | ptr = NULL; | ||
58 | return ptr; | ||
59 | } | ||
60 | |||
61 | static inline struct davinci_gpio_regs __iomem *irq2regs(int irq) | ||
62 | { | ||
63 | struct davinci_gpio_regs __iomem *g; | ||
64 | |||
65 | g = (__force struct davinci_gpio_regs __iomem *)irq_get_chip_data(irq); | ||
66 | |||
67 | return g; | ||
68 | } | ||
69 | |||
70 | static int __init davinci_gpio_irq_setup(void); | ||
71 | |||
72 | /*--------------------------------------------------------------------------*/ | ||
73 | |||
74 | /* board setup code *MUST* setup pinmux and enable the GPIO clock. */ | ||
75 | static inline int __davinci_direction(struct gpio_chip *chip, | ||
76 | unsigned offset, bool out, int value) | ||
77 | { | ||
78 | struct davinci_gpio_controller *d = chip2controller(chip); | ||
79 | struct davinci_gpio_regs __iomem *g = d->regs; | ||
80 | unsigned long flags; | ||
81 | u32 temp; | ||
82 | u32 mask = 1 << offset; | ||
83 | |||
84 | spin_lock_irqsave(&d->lock, flags); | ||
85 | temp = __raw_readl(&g->dir); | ||
86 | if (out) { | ||
87 | temp &= ~mask; | ||
88 | __raw_writel(mask, value ? &g->set_data : &g->clr_data); | ||
89 | } else { | ||
90 | temp |= mask; | ||
91 | } | ||
92 | __raw_writel(temp, &g->dir); | ||
93 | spin_unlock_irqrestore(&d->lock, flags); | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | |||
98 | static int davinci_direction_in(struct gpio_chip *chip, unsigned offset) | ||
99 | { | ||
100 | return __davinci_direction(chip, offset, false, 0); | ||
101 | } | ||
102 | |||
103 | static int | ||
104 | davinci_direction_out(struct gpio_chip *chip, unsigned offset, int value) | ||
105 | { | ||
106 | return __davinci_direction(chip, offset, true, value); | ||
107 | } | ||
108 | |||
109 | /* | ||
110 | * Read the pin's value (works even if it's set up as output); | ||
111 | * returns zero/nonzero. | ||
112 | * | ||
113 | * Note that changes are synched to the GPIO clock, so reading values back | ||
114 | * right after you've set them may give old values. | ||
115 | */ | ||
116 | static int davinci_gpio_get(struct gpio_chip *chip, unsigned offset) | ||
117 | { | ||
118 | struct davinci_gpio_controller *d = chip2controller(chip); | ||
119 | struct davinci_gpio_regs __iomem *g = d->regs; | ||
120 | |||
121 | return (1 << offset) & __raw_readl(&g->in_data); | ||
122 | } | ||
123 | |||
124 | /* | ||
125 | * Assuming the pin is muxed as a gpio output, set its output value. | ||
126 | */ | ||
127 | static void | ||
128 | davinci_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | ||
129 | { | ||
130 | struct davinci_gpio_controller *d = chip2controller(chip); | ||
131 | struct davinci_gpio_regs __iomem *g = d->regs; | ||
132 | |||
133 | __raw_writel((1 << offset), value ? &g->set_data : &g->clr_data); | ||
134 | } | ||
135 | |||
136 | static int __init davinci_gpio_setup(void) | ||
137 | { | ||
138 | int i, base; | ||
139 | unsigned ngpio; | ||
140 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
141 | struct davinci_gpio_regs *regs; | ||
142 | |||
143 | if (soc_info->gpio_type != GPIO_TYPE_DAVINCI) | ||
144 | return 0; | ||
145 | |||
146 | /* | ||
147 | * The gpio banks conceptually expose a segmented bitmap, | ||
148 | * and "ngpio" is one more than the largest zero-based | ||
149 | * bit index that's valid. | ||
150 | */ | ||
151 | ngpio = soc_info->gpio_num; | ||
152 | if (ngpio == 0) { | ||
153 | pr_err("GPIO setup: how many GPIOs?\n"); | ||
154 | return -EINVAL; | ||
155 | } | ||
156 | |||
157 | if (WARN_ON(DAVINCI_N_GPIO < ngpio)) | ||
158 | ngpio = DAVINCI_N_GPIO; | ||
159 | |||
160 | gpio_base = ioremap(soc_info->gpio_base, SZ_4K); | ||
161 | if (WARN_ON(!gpio_base)) | ||
162 | return -ENOMEM; | ||
163 | |||
164 | for (i = 0, base = 0; base < ngpio; i++, base += 32) { | ||
165 | chips[i].chip.label = "DaVinci"; | ||
166 | |||
167 | chips[i].chip.direction_input = davinci_direction_in; | ||
168 | chips[i].chip.get = davinci_gpio_get; | ||
169 | chips[i].chip.direction_output = davinci_direction_out; | ||
170 | chips[i].chip.set = davinci_gpio_set; | ||
171 | |||
172 | chips[i].chip.base = base; | ||
173 | chips[i].chip.ngpio = ngpio - base; | ||
174 | if (chips[i].chip.ngpio > 32) | ||
175 | chips[i].chip.ngpio = 32; | ||
176 | |||
177 | spin_lock_init(&chips[i].lock); | ||
178 | |||
179 | regs = gpio2regs(base); | ||
180 | chips[i].regs = regs; | ||
181 | chips[i].set_data = ®s->set_data; | ||
182 | chips[i].clr_data = ®s->clr_data; | ||
183 | chips[i].in_data = ®s->in_data; | ||
184 | |||
185 | gpiochip_add(&chips[i].chip); | ||
186 | } | ||
187 | |||
188 | soc_info->gpio_ctlrs = chips; | ||
189 | soc_info->gpio_ctlrs_num = DIV_ROUND_UP(ngpio, 32); | ||
190 | |||
191 | davinci_gpio_irq_setup(); | ||
192 | return 0; | ||
193 | } | ||
194 | pure_initcall(davinci_gpio_setup); | ||
195 | |||
196 | /*--------------------------------------------------------------------------*/ | ||
197 | /* | ||
198 | * We expect irqs will normally be set up as input pins, but they can also be | ||
199 | * used as output pins ... which is convenient for testing. | ||
200 | * | ||
201 | * NOTE: The first few GPIOs also have direct INTC hookups in addition | ||
202 | * to their GPIOBNK0 irq, with a bit less overhead. | ||
203 | * | ||
204 | * All those INTC hookups (direct, plus several IRQ banks) can also | ||
205 | * serve as EDMA event triggers. | ||
206 | */ | ||
207 | |||
208 | static void gpio_irq_disable(struct irq_data *d) | ||
209 | { | ||
210 | struct davinci_gpio_regs __iomem *g = irq2regs(d->irq); | ||
211 | u32 mask = (u32) irq_data_get_irq_handler_data(d); | ||
212 | |||
213 | __raw_writel(mask, &g->clr_falling); | ||
214 | __raw_writel(mask, &g->clr_rising); | ||
215 | } | ||
216 | |||
217 | static void gpio_irq_enable(struct irq_data *d) | ||
218 | { | ||
219 | struct davinci_gpio_regs __iomem *g = irq2regs(d->irq); | ||
220 | u32 mask = (u32) irq_data_get_irq_handler_data(d); | ||
221 | unsigned status = irqd_get_trigger_type(d); | ||
222 | |||
223 | status &= IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING; | ||
224 | if (!status) | ||
225 | status = IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING; | ||
226 | |||
227 | if (status & IRQ_TYPE_EDGE_FALLING) | ||
228 | __raw_writel(mask, &g->set_falling); | ||
229 | if (status & IRQ_TYPE_EDGE_RISING) | ||
230 | __raw_writel(mask, &g->set_rising); | ||
231 | } | ||
232 | |||
233 | static int gpio_irq_type(struct irq_data *d, unsigned trigger) | ||
234 | { | ||
235 | struct davinci_gpio_regs __iomem *g = irq2regs(d->irq); | ||
236 | u32 mask = (u32) irq_data_get_irq_handler_data(d); | ||
237 | |||
238 | if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) | ||
239 | return -EINVAL; | ||
240 | |||
241 | return 0; | ||
242 | } | ||
243 | |||
244 | static struct irq_chip gpio_irqchip = { | ||
245 | .name = "GPIO", | ||
246 | .irq_enable = gpio_irq_enable, | ||
247 | .irq_disable = gpio_irq_disable, | ||
248 | .irq_set_type = gpio_irq_type, | ||
249 | .flags = IRQCHIP_SET_TYPE_MASKED, | ||
250 | }; | ||
251 | |||
252 | static void | ||
253 | gpio_irq_handler(unsigned irq, struct irq_desc *desc) | ||
254 | { | ||
255 | struct davinci_gpio_regs __iomem *g; | ||
256 | u32 mask = 0xffff; | ||
257 | struct davinci_gpio_controller *d; | ||
258 | |||
259 | d = (struct davinci_gpio_controller *)irq_desc_get_handler_data(desc); | ||
260 | g = (struct davinci_gpio_regs __iomem *)d->regs; | ||
261 | |||
262 | /* we only care about one bank */ | ||
263 | if (irq & 1) | ||
264 | mask <<= 16; | ||
265 | |||
266 | /* temporarily mask (level sensitive) parent IRQ */ | ||
267 | desc->irq_data.chip->irq_mask(&desc->irq_data); | ||
268 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
269 | while (1) { | ||
270 | u32 status; | ||
271 | int n; | ||
272 | int res; | ||
273 | |||
274 | /* ack any irqs */ | ||
275 | status = __raw_readl(&g->intstat) & mask; | ||
276 | if (!status) | ||
277 | break; | ||
278 | __raw_writel(status, &g->intstat); | ||
279 | |||
280 | /* now demux them to the right lowlevel handler */ | ||
281 | n = d->irq_base; | ||
282 | if (irq & 1) { | ||
283 | n += 16; | ||
284 | status >>= 16; | ||
285 | } | ||
286 | |||
287 | while (status) { | ||
288 | res = ffs(status); | ||
289 | n += res; | ||
290 | generic_handle_irq(n - 1); | ||
291 | status >>= res; | ||
292 | } | ||
293 | } | ||
294 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
295 | /* now it may re-trigger */ | ||
296 | } | ||
297 | |||
298 | static int gpio_to_irq_banked(struct gpio_chip *chip, unsigned offset) | ||
299 | { | ||
300 | struct davinci_gpio_controller *d = chip2controller(chip); | ||
301 | |||
302 | if (d->irq_base >= 0) | ||
303 | return d->irq_base + offset; | ||
304 | else | ||
305 | return -ENODEV; | ||
306 | } | ||
307 | |||
308 | static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset) | ||
309 | { | ||
310 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
311 | |||
312 | /* NOTE: we assume for now that only irqs in the first gpio_chip | ||
313 | * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs). | ||
314 | */ | ||
315 | if (offset < soc_info->gpio_unbanked) | ||
316 | return soc_info->gpio_irq + offset; | ||
317 | else | ||
318 | return -ENODEV; | ||
319 | } | ||
320 | |||
321 | static int gpio_irq_type_unbanked(struct irq_data *d, unsigned trigger) | ||
322 | { | ||
323 | struct davinci_gpio_regs __iomem *g = irq2regs(d->irq); | ||
324 | u32 mask = (u32) irq_data_get_irq_handler_data(d); | ||
325 | |||
326 | if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) | ||
327 | return -EINVAL; | ||
328 | |||
329 | __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_FALLING) | ||
330 | ? &g->set_falling : &g->clr_falling); | ||
331 | __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_RISING) | ||
332 | ? &g->set_rising : &g->clr_rising); | ||
333 | |||
334 | return 0; | ||
335 | } | ||
336 | |||
337 | /* | ||
338 | * NOTE: for suspend/resume, probably best to make a platform_device with | ||
339 | * suspend_late/resume_resume calls hooking into results of the set_wake() | ||
340 | * calls ... so if no gpios are wakeup events the clock can be disabled, | ||
341 | * with outputs left at previously set levels, and so that VDD3P3V.IOPWDN0 | ||
342 | * (dm6446) can be set appropriately for GPIOV33 pins. | ||
343 | */ | ||
344 | |||
345 | static int __init davinci_gpio_irq_setup(void) | ||
346 | { | ||
347 | unsigned gpio, irq, bank; | ||
348 | struct clk *clk; | ||
349 | u32 binten = 0; | ||
350 | unsigned ngpio, bank_irq; | ||
351 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
352 | struct davinci_gpio_regs __iomem *g; | ||
353 | |||
354 | ngpio = soc_info->gpio_num; | ||
355 | |||
356 | bank_irq = soc_info->gpio_irq; | ||
357 | if (bank_irq == 0) { | ||
358 | printk(KERN_ERR "Don't know first GPIO bank IRQ.\n"); | ||
359 | return -EINVAL; | ||
360 | } | ||
361 | |||
362 | clk = clk_get(NULL, "gpio"); | ||
363 | if (IS_ERR(clk)) { | ||
364 | printk(KERN_ERR "Error %ld getting gpio clock?\n", | ||
365 | PTR_ERR(clk)); | ||
366 | return PTR_ERR(clk); | ||
367 | } | ||
368 | clk_enable(clk); | ||
369 | |||
370 | /* Arrange gpio_to_irq() support, handling either direct IRQs or | ||
371 | * banked IRQs. Having GPIOs in the first GPIO bank use direct | ||
372 | * IRQs, while the others use banked IRQs, would need some setup | ||
373 | * tweaks to recognize hardware which can do that. | ||
374 | */ | ||
375 | for (gpio = 0, bank = 0; gpio < ngpio; bank++, gpio += 32) { | ||
376 | chips[bank].chip.to_irq = gpio_to_irq_banked; | ||
377 | chips[bank].irq_base = soc_info->gpio_unbanked | ||
378 | ? -EINVAL | ||
379 | : (soc_info->intc_irq_num + gpio); | ||
380 | } | ||
381 | |||
382 | /* | ||
383 | * AINTC can handle direct/unbanked IRQs for GPIOs, with the GPIO | ||
384 | * controller only handling trigger modes. We currently assume no | ||
385 | * IRQ mux conflicts; gpio_irq_type_unbanked() is only for GPIOs. | ||
386 | */ | ||
387 | if (soc_info->gpio_unbanked) { | ||
388 | static struct irq_chip gpio_irqchip_unbanked; | ||
389 | |||
390 | /* pass "bank 0" GPIO IRQs to AINTC */ | ||
391 | chips[0].chip.to_irq = gpio_to_irq_unbanked; | ||
392 | binten = BIT(0); | ||
393 | |||
394 | /* AINTC handles mask/unmask; GPIO handles triggering */ | ||
395 | irq = bank_irq; | ||
396 | gpio_irqchip_unbanked = *irq_get_chip(irq); | ||
397 | gpio_irqchip_unbanked.name = "GPIO-AINTC"; | ||
398 | gpio_irqchip_unbanked.irq_set_type = gpio_irq_type_unbanked; | ||
399 | |||
400 | /* default trigger: both edges */ | ||
401 | g = gpio2regs(0); | ||
402 | __raw_writel(~0, &g->set_falling); | ||
403 | __raw_writel(~0, &g->set_rising); | ||
404 | |||
405 | /* set the direct IRQs up to use that irqchip */ | ||
406 | for (gpio = 0; gpio < soc_info->gpio_unbanked; gpio++, irq++) { | ||
407 | irq_set_chip(irq, &gpio_irqchip_unbanked); | ||
408 | irq_set_handler_data(irq, (void *)__gpio_mask(gpio)); | ||
409 | irq_set_chip_data(irq, (__force void *)g); | ||
410 | irq_set_status_flags(irq, IRQ_TYPE_EDGE_BOTH); | ||
411 | } | ||
412 | |||
413 | goto done; | ||
414 | } | ||
415 | |||
416 | /* | ||
417 | * Or, AINTC can handle IRQs for banks of 16 GPIO IRQs, which we | ||
418 | * then chain through our own handler. | ||
419 | */ | ||
420 | for (gpio = 0, irq = gpio_to_irq(0), bank = 0; | ||
421 | gpio < ngpio; | ||
422 | bank++, bank_irq++) { | ||
423 | unsigned i; | ||
424 | |||
425 | /* disabled by default, enabled only as needed */ | ||
426 | g = gpio2regs(gpio); | ||
427 | __raw_writel(~0, &g->clr_falling); | ||
428 | __raw_writel(~0, &g->clr_rising); | ||
429 | |||
430 | /* set up all irqs in this bank */ | ||
431 | irq_set_chained_handler(bank_irq, gpio_irq_handler); | ||
432 | |||
433 | /* | ||
434 | * Each chip handles 32 gpios, and each irq bank consists of 16 | ||
435 | * gpio irqs. Pass the irq bank's corresponding controller to | ||
436 | * the chained irq handler. | ||
437 | */ | ||
438 | irq_set_handler_data(bank_irq, &chips[gpio / 32]); | ||
439 | |||
440 | for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) { | ||
441 | irq_set_chip(irq, &gpio_irqchip); | ||
442 | irq_set_chip_data(irq, (__force void *)g); | ||
443 | irq_set_handler_data(irq, (void *)__gpio_mask(gpio)); | ||
444 | irq_set_handler(irq, handle_simple_irq); | ||
445 | set_irq_flags(irq, IRQF_VALID); | ||
446 | } | ||
447 | |||
448 | binten |= BIT(bank); | ||
449 | } | ||
450 | |||
451 | done: | ||
452 | /* BINTEN -- per-bank interrupt enable. genirq would also let these | ||
453 | * bits be set/cleared dynamically. | ||
454 | */ | ||
455 | __raw_writel(binten, gpio_base + 0x08); | ||
456 | |||
457 | printk(KERN_INFO "DaVinci: %d gpio irqs\n", irq - gpio_to_irq(0)); | ||
458 | |||
459 | return 0; | ||
460 | } | ||
diff --git a/arch/arm/mach-davinci/include/mach/ddr2.h b/arch/arm/mach-davinci/include/mach/ddr2.h new file mode 100644 index 000000000000..c19e047d0e6a --- /dev/null +++ b/arch/arm/mach-davinci/include/mach/ddr2.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #define DDR2_SDRCR_OFFSET 0xc | ||
2 | #define DDR2_SRPD_BIT (1 << 23) | ||
3 | #define DDR2_MCLKSTOPEN_BIT (1 << 30) | ||
4 | #define DDR2_LPMODEN_BIT (1 << 31) | ||
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S index f8b7ea4f6235..cf94552d5274 100644 --- a/arch/arm/mach-davinci/include/mach/debug-macro.S +++ b/arch/arm/mach-davinci/include/mach/debug-macro.S | |||
@@ -18,56 +18,50 @@ | |||
18 | 18 | ||
19 | #include <linux/serial_reg.h> | 19 | #include <linux/serial_reg.h> |
20 | 20 | ||
21 | #include <asm/memory.h> | ||
22 | |||
23 | #include <mach/serial.h> | 21 | #include <mach/serial.h> |
24 | 22 | ||
25 | #define UART_SHIFT 2 | 23 | #define UART_SHIFT 2 |
26 | 24 | ||
27 | #define davinci_uart_v2p(x) ((x) - PAGE_OFFSET + PLAT_PHYS_OFFSET) | ||
28 | #define davinci_uart_p2v(x) ((x) - PLAT_PHYS_OFFSET + PAGE_OFFSET) | ||
29 | |||
30 | .pushsection .data | 25 | .pushsection .data |
31 | davinci_uart_phys: .word 0 | 26 | davinci_uart_phys: .word 0 |
32 | davinci_uart_virt: .word 0 | 27 | davinci_uart_virt: .word 0 |
33 | .popsection | 28 | .popsection |
34 | 29 | ||
35 | .macro addruart, rp, rv | 30 | .macro addruart, rp, rv, tmp |
36 | 31 | ||
37 | /* Use davinci_uart_phys/virt if already configured */ | 32 | /* Use davinci_uart_phys/virt if already configured */ |
38 | 10: mrc p15, 0, \rp, c1, c0 | 33 | 10: adr \rp, 99f @ get effective addr of 99f |
39 | tst \rp, #1 @ MMU enabled? | 34 | ldr \rv, [\rp] @ get absolute addr of 99f |
40 | ldreq \rp, =davinci_uart_v2p(davinci_uart_phys) | 35 | sub \rv, \rv, \rp @ offset between the two |
41 | ldrne \rp, =davinci_uart_phys | 36 | ldr \rp, [\rp, #4] @ abs addr of omap_uart_phys |
42 | add \rv, \rp, #4 @ davinci_uart_virt | 37 | sub \tmp, \rp, \rv @ make it effective |
43 | ldr \rp, [\rp, #0] | 38 | ldr \rp, [\tmp, #0] @ davinci_uart_phys |
44 | ldr \rv, [\rv, #0] | 39 | ldr \rv, [\tmp, #4] @ davinci_uart_virt |
45 | cmp \rp, #0 @ is port configured? | 40 | cmp \rp, #0 @ is port configured? |
46 | cmpne \rv, #0 | 41 | cmpne \rv, #0 |
47 | bne 99f @ already configured | 42 | bne 100f @ already configured |
48 | 43 | ||
49 | /* Check the debug UART address set in uncompress.h */ | 44 | /* Check the debug UART address set in uncompress.h */ |
50 | mrc p15, 0, \rp, c1, c0 | 45 | and \rp, pc, #0xff000000 |
51 | tst \rp, #1 @ MMU enabled? | 46 | ldr \rv, =DAVINCI_UART_INFO_OFS |
47 | add \rp, \rp, \rv | ||
52 | 48 | ||
53 | /* Copy uart phys address from decompressor uart info */ | 49 | /* Copy uart phys address from decompressor uart info */ |
54 | ldreq \rv, =davinci_uart_v2p(davinci_uart_phys) | 50 | ldr \rv, [\rp, #0] |
55 | ldrne \rv, =davinci_uart_phys | 51 | str \rv, [\tmp, #0] |
56 | ldreq \rp, =DAVINCI_UART_INFO | ||
57 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) | ||
58 | ldr \rp, [\rp, #0] | ||
59 | str \rp, [\rv] | ||
60 | 52 | ||
61 | /* Copy uart virt address from decompressor uart info */ | 53 | /* Copy uart virt address from decompressor uart info */ |
62 | ldreq \rv, =davinci_uart_v2p(davinci_uart_virt) | 54 | ldr \rv, [\rp, #4] |
63 | ldrne \rv, =davinci_uart_virt | 55 | str \rv, [\tmp, #4] |
64 | ldreq \rp, =DAVINCI_UART_INFO | ||
65 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) | ||
66 | ldr \rp, [\rp, #4] | ||
67 | str \rp, [\rv] | ||
68 | 56 | ||
69 | b 10b | 57 | b 10b |
70 | 99: | 58 | |
59 | .align | ||
60 | 99: .word . | ||
61 | .word davinci_uart_phys | ||
62 | .ltorg | ||
63 | |||
64 | 100: | ||
71 | .endm | 65 | .endm |
72 | 66 | ||
73 | .macro senduart,rd,rx | 67 | .macro senduart,rd,rx |
diff --git a/arch/arm/mach-davinci/include/mach/gpio-davinci.h b/arch/arm/mach-davinci/include/mach/gpio-davinci.h new file mode 100644 index 000000000000..1fdd1fd35448 --- /dev/null +++ b/arch/arm/mach-davinci/include/mach/gpio-davinci.h | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * TI DaVinci GPIO Support | ||
3 | * | ||
4 | * Copyright (c) 2006 David Brownell | ||
5 | * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef __DAVINCI_DAVINCI_GPIO_H | ||
14 | #define __DAVINCI_DAVINCI_GPIO_H | ||
15 | |||
16 | #include <linux/io.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | |||
19 | #include <asm-generic/gpio.h> | ||
20 | |||
21 | #include <mach/irqs.h> | ||
22 | #include <mach/common.h> | ||
23 | |||
24 | #define DAVINCI_GPIO_BASE 0x01C67000 | ||
25 | |||
26 | enum davinci_gpio_type { | ||
27 | GPIO_TYPE_DAVINCI = 0, | ||
28 | GPIO_TYPE_TNETV107X, | ||
29 | }; | ||
30 | |||
31 | /* | ||
32 | * basic gpio routines | ||
33 | * | ||
34 | * board-specific init should be done by arch/.../.../board-XXX.c (maybe | ||
35 | * initializing banks together) rather than boot loaders; kexec() won't | ||
36 | * go through boot loaders. | ||
37 | * | ||
38 | * the gpio clock will be turned on when gpios are used, and you may also | ||
39 | * need to pay attention to PINMUX registers to be sure those pins are | ||
40 | * used as gpios, not with other peripherals. | ||
41 | * | ||
42 | * On-chip GPIOs are numbered 0..(DAVINCI_N_GPIO-1). For documentation, | ||
43 | * and maybe for later updates, code may write GPIO(N). These may be | ||
44 | * all 1.8V signals, all 3.3V ones, or a mix of the two. A given chip | ||
45 | * may not support all the GPIOs in that range. | ||
46 | * | ||
47 | * GPIOs can also be on external chips, numbered after the ones built-in | ||
48 | * to the DaVinci chip. For now, they won't be usable as IRQ sources. | ||
49 | */ | ||
50 | #define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */ | ||
51 | |||
52 | /* Convert GPIO signal to GPIO pin number */ | ||
53 | #define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio)) | ||
54 | |||
55 | struct davinci_gpio_controller { | ||
56 | struct gpio_chip chip; | ||
57 | int irq_base; | ||
58 | spinlock_t lock; | ||
59 | void __iomem *regs; | ||
60 | void __iomem *set_data; | ||
61 | void __iomem *clr_data; | ||
62 | void __iomem *in_data; | ||
63 | }; | ||
64 | |||
65 | /* The __gpio_to_controller() and __gpio_mask() functions inline to constants | ||
66 | * with constant parameters; or in outlined code they execute at runtime. | ||
67 | * | ||
68 | * You'd access the controller directly when reading or writing more than | ||
69 | * one gpio value at a time, and to support wired logic where the value | ||
70 | * being driven by the cpu need not match the value read back. | ||
71 | * | ||
72 | * These are NOT part of the cross-platform GPIO interface | ||
73 | */ | ||
74 | static inline struct davinci_gpio_controller * | ||
75 | __gpio_to_controller(unsigned gpio) | ||
76 | { | ||
77 | struct davinci_gpio_controller *ctlrs = davinci_soc_info.gpio_ctlrs; | ||
78 | int index = gpio / 32; | ||
79 | |||
80 | if (!ctlrs || index >= davinci_soc_info.gpio_ctlrs_num) | ||
81 | return NULL; | ||
82 | |||
83 | return ctlrs + index; | ||
84 | } | ||
85 | |||
86 | static inline u32 __gpio_mask(unsigned gpio) | ||
87 | { | ||
88 | return 1 << (gpio % 32); | ||
89 | } | ||
90 | |||
91 | #endif /* __DAVINCI_DAVINCI_GPIO_H */ | ||
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h index fbece126c2bf..fbaae4772b91 100644 --- a/arch/arm/mach-davinci/include/mach/gpio.h +++ b/arch/arm/mach-davinci/include/mach/gpio.h | |||
@@ -13,80 +13,10 @@ | |||
13 | #ifndef __DAVINCI_GPIO_H | 13 | #ifndef __DAVINCI_GPIO_H |
14 | #define __DAVINCI_GPIO_H | 14 | #define __DAVINCI_GPIO_H |
15 | 15 | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | |||
19 | #include <asm-generic/gpio.h> | 16 | #include <asm-generic/gpio.h> |
20 | 17 | ||
21 | #include <mach/irqs.h> | 18 | /* The inline versions use the static inlines in the driver header */ |
22 | #include <mach/common.h> | 19 | #include "gpio-davinci.h" |
23 | |||
24 | #define DAVINCI_GPIO_BASE 0x01C67000 | ||
25 | |||
26 | enum davinci_gpio_type { | ||
27 | GPIO_TYPE_DAVINCI = 0, | ||
28 | GPIO_TYPE_TNETV107X, | ||
29 | }; | ||
30 | |||
31 | /* | ||
32 | * basic gpio routines | ||
33 | * | ||
34 | * board-specific init should be done by arch/.../.../board-XXX.c (maybe | ||
35 | * initializing banks together) rather than boot loaders; kexec() won't | ||
36 | * go through boot loaders. | ||
37 | * | ||
38 | * the gpio clock will be turned on when gpios are used, and you may also | ||
39 | * need to pay attention to PINMUX registers to be sure those pins are | ||
40 | * used as gpios, not with other peripherals. | ||
41 | * | ||
42 | * On-chip GPIOs are numbered 0..(DAVINCI_N_GPIO-1). For documentation, | ||
43 | * and maybe for later updates, code may write GPIO(N). These may be | ||
44 | * all 1.8V signals, all 3.3V ones, or a mix of the two. A given chip | ||
45 | * may not support all the GPIOs in that range. | ||
46 | * | ||
47 | * GPIOs can also be on external chips, numbered after the ones built-in | ||
48 | * to the DaVinci chip. For now, they won't be usable as IRQ sources. | ||
49 | */ | ||
50 | #define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */ | ||
51 | |||
52 | /* Convert GPIO signal to GPIO pin number */ | ||
53 | #define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio)) | ||
54 | |||
55 | struct davinci_gpio_controller { | ||
56 | struct gpio_chip chip; | ||
57 | int irq_base; | ||
58 | spinlock_t lock; | ||
59 | void __iomem *regs; | ||
60 | void __iomem *set_data; | ||
61 | void __iomem *clr_data; | ||
62 | void __iomem *in_data; | ||
63 | }; | ||
64 | |||
65 | /* The __gpio_to_controller() and __gpio_mask() functions inline to constants | ||
66 | * with constant parameters; or in outlined code they execute at runtime. | ||
67 | * | ||
68 | * You'd access the controller directly when reading or writing more than | ||
69 | * one gpio value at a time, and to support wired logic where the value | ||
70 | * being driven by the cpu need not match the value read back. | ||
71 | * | ||
72 | * These are NOT part of the cross-platform GPIO interface | ||
73 | */ | ||
74 | static inline struct davinci_gpio_controller * | ||
75 | __gpio_to_controller(unsigned gpio) | ||
76 | { | ||
77 | struct davinci_gpio_controller *ctlrs = davinci_soc_info.gpio_ctlrs; | ||
78 | int index = gpio / 32; | ||
79 | |||
80 | if (!ctlrs || index >= davinci_soc_info.gpio_ctlrs_num) | ||
81 | return NULL; | ||
82 | |||
83 | return ctlrs + index; | ||
84 | } | ||
85 | |||
86 | static inline u32 __gpio_mask(unsigned gpio) | ||
87 | { | ||
88 | return 1 << (gpio % 32); | ||
89 | } | ||
90 | 20 | ||
91 | /* | 21 | /* |
92 | * The get/set/clear functions will inline when called with constant | 22 | * The get/set/clear functions will inline when called with constant |
@@ -147,11 +77,6 @@ static inline int gpio_cansleep(unsigned gpio) | |||
147 | return __gpio_cansleep(gpio); | 77 | return __gpio_cansleep(gpio); |
148 | } | 78 | } |
149 | 79 | ||
150 | static inline int gpio_to_irq(unsigned gpio) | ||
151 | { | ||
152 | return __gpio_to_irq(gpio); | ||
153 | } | ||
154 | |||
155 | static inline int irq_to_gpio(unsigned irq) | 80 | static inline int irq_to_gpio(unsigned irq) |
156 | { | 81 | { |
157 | /* don't support the reverse mapping */ | 82 | /* don't support the reverse mapping */ |
diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h deleted file mode 100644 index 885d23319668..000000000000 --- a/arch/arm/mach-davinci/include/mach/memory.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * DaVinci memory space definitions | ||
3 | * | ||
4 | * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com> | ||
5 | * | ||
6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_MEMORY_H | ||
12 | #define __ASM_ARCH_MEMORY_H | ||
13 | |||
14 | /************************************************************************** | ||
15 | * Included Files | ||
16 | **************************************************************************/ | ||
17 | #include <asm/page.h> | ||
18 | #include <asm/sizes.h> | ||
19 | |||
20 | /************************************************************************** | ||
21 | * Definitions | ||
22 | **************************************************************************/ | ||
23 | #define DAVINCI_DDR_BASE 0x80000000 | ||
24 | #define DA8XX_DDR_BASE 0xc0000000 | ||
25 | |||
26 | #if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx) | ||
27 | #error Cannot enable DaVinci and DA8XX platforms concurrently | ||
28 | #elif defined(CONFIG_ARCH_DAVINCI_DA8XX) | ||
29 | #define PLAT_PHYS_OFFSET DA8XX_DDR_BASE | ||
30 | #else | ||
31 | #define PLAT_PHYS_OFFSET DAVINCI_DDR_BASE | ||
32 | #endif | ||
33 | |||
34 | #define DDR2_SDRCR_OFFSET 0xc | ||
35 | #define DDR2_SRPD_BIT BIT(23) | ||
36 | #define DDR2_MCLKSTOPEN_BIT BIT(30) | ||
37 | #define DDR2_LPMODEN_BIT BIT(31) | ||
38 | |||
39 | #endif /* __ASM_ARCH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index c9e6ce185a66..e347d88fef91 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -21,8 +21,9 @@ | |||
21 | * macros in debug-macro.S. | 21 | * macros in debug-macro.S. |
22 | * | 22 | * |
23 | * This area sits just below the page tables (see arch/arm/kernel/head.S). | 23 | * This area sits just below the page tables (see arch/arm/kernel/head.S). |
24 | * We define it as a relative offset from start of usable RAM. | ||
24 | */ | 25 | */ |
25 | #define DAVINCI_UART_INFO (PLAT_PHYS_OFFSET + 0x3ff8) | 26 | #define DAVINCI_UART_INFO_OFS 0x3ff8 |
26 | 27 | ||
27 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) | 28 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) |
28 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) | 29 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) |
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h index 78d80683cdc2..9dc7cf9664fe 100644 --- a/arch/arm/mach-davinci/include/mach/uncompress.h +++ b/arch/arm/mach-davinci/include/mach/uncompress.h | |||
@@ -43,7 +43,12 @@ static inline void flush(void) | |||
43 | 43 | ||
44 | static inline void set_uart_info(u32 phys, void * __iomem virt) | 44 | static inline void set_uart_info(u32 phys, void * __iomem virt) |
45 | { | 45 | { |
46 | u32 *uart_info = (u32 *)(DAVINCI_UART_INFO); | 46 | /* |
47 | * Get address of some.bss variable and round it down | ||
48 | * a la CONFIG_AUTO_ZRELADDR. | ||
49 | */ | ||
50 | u32 ram_start = (u32)&uart & 0xf8000000; | ||
51 | u32 *uart_info = (u32 *)(ram_start + DAVINCI_UART_INFO_OFS); | ||
47 | 52 | ||
48 | uart = (u32 *)phys; | 53 | uart = (u32 *)phys; |
49 | uart_info[0] = phys; | 54 | uart_info[0] = phys; |
diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S index 5f1e045a3ad1..d4e9316ecacb 100644 --- a/arch/arm/mach-davinci/sleep.S +++ b/arch/arm/mach-davinci/sleep.S | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/linkage.h> | 22 | #include <linux/linkage.h> |
23 | #include <asm/assembler.h> | 23 | #include <asm/assembler.h> |
24 | #include <mach/psc.h> | 24 | #include <mach/psc.h> |
25 | #include <mach/memory.h> | 25 | #include <mach/ddr2.h> |
26 | 26 | ||
27 | #include "clock.h" | 27 | #include "clock.h" |
28 | 28 | ||
diff --git a/arch/arm/mach-davinci/tnetv107x.c b/arch/arm/mach-davinci/tnetv107x.c index 1b28fdd892a6..409bb869c7c7 100644 --- a/arch/arm/mach-davinci/tnetv107x.c +++ b/arch/arm/mach-davinci/tnetv107x.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | */ | 14 | */ |
15 | #include <linux/gpio.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
@@ -27,9 +28,9 @@ | |||
27 | #include <mach/psc.h> | 28 | #include <mach/psc.h> |
28 | #include <mach/cp_intc.h> | 29 | #include <mach/cp_intc.h> |
29 | #include <mach/irqs.h> | 30 | #include <mach/irqs.h> |
30 | #include <mach/gpio.h> | ||
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <mach/tnetv107x.h> | 32 | #include <mach/tnetv107x.h> |
33 | #include <mach/gpio-davinci.h> | ||
33 | 34 | ||
34 | #include "clock.h" | 35 | #include "clock.h" |
35 | #include "mux.h" | 36 | #include "mux.h" |
diff --git a/arch/arm/mach-dove/include/mach/debug-macro.S b/arch/arm/mach-dove/include/mach/debug-macro.S index da8bf2bad3b1..5929cbc59161 100644 --- a/arch/arm/mach-dove/include/mach/debug-macro.S +++ b/arch/arm/mach-dove/include/mach/debug-macro.S | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #include <mach/bridge-regs.h> | 9 | #include <mach/bridge-regs.h> |
10 | 10 | ||
11 | .macro addruart, rp, rv | 11 | .macro addruart, rp, rv, tmp |
12 | ldr \rp, =DOVE_SB_REGS_PHYS_BASE | 12 | ldr \rp, =DOVE_SB_REGS_PHYS_BASE |
13 | ldr \rv, =DOVE_SB_REGS_VIRT_BASE | 13 | ldr \rv, =DOVE_SB_REGS_VIRT_BASE |
14 | orr \rp, \rp, #0x00012000 | 14 | orr \rp, \rp, #0x00012000 |
diff --git a/arch/arm/mach-dove/include/mach/memory.h b/arch/arm/mach-dove/include/mach/memory.h deleted file mode 100644 index bbc93fee6c75..000000000000 --- a/arch/arm/mach-dove/include/mach/memory.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-dove/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
9 | |||
10 | #endif | ||
diff --git a/arch/arm/mach-ebsa110/include/mach/debug-macro.S b/arch/arm/mach-ebsa110/include/mach/debug-macro.S index 7ef5690fd08c..bb02c05e6812 100644 --- a/arch/arm/mach-ebsa110/include/mach/debug-macro.S +++ b/arch/arm/mach-ebsa110/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * | 11 | * |
12 | **/ | 12 | **/ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0xf0000000 | 15 | mov \rp, #0xf0000000 |
16 | orr \rp, \rp, #0x00000be0 | 16 | orr \rp, \rp, #0x00000be0 |
17 | mov \rp, \rv | 17 | mov \rp, \rv |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index c60f081e930b..94c78bc66275 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <mach/fb.h> | 38 | #include <mach/fb.h> |
39 | #include <mach/ep93xx_keypad.h> | 39 | #include <mach/ep93xx_keypad.h> |
40 | #include <mach/ep93xx_spi.h> | 40 | #include <mach/ep93xx_spi.h> |
41 | #include <mach/gpio-ep93xx.h> | ||
41 | 42 | ||
42 | #include <asm/mach/map.h> | 43 | #include <asm/mach/map.h> |
43 | #include <asm/mach/time.h> | 44 | #include <asm/mach/time.h> |
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 257175edc575..c63a5ec1a8e3 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/fb.h> | 38 | #include <mach/fb.h> |
39 | #include <mach/ep93xx_spi.h> | 39 | #include <mach/ep93xx_spi.h> |
40 | #include <mach/gpio-ep93xx.h> | ||
40 | 41 | ||
41 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
42 | #include <asm/mach/arch.h> | 43 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-ep93xx/include/mach/debug-macro.S b/arch/arm/mach-ep93xx/include/mach/debug-macro.S index b25bc9076367..af54e43132cf 100644 --- a/arch/arm/mach-ep93xx/include/mach/debug-macro.S +++ b/arch/arm/mach-ep93xx/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <mach/ep93xx-regs.h> | 12 | #include <mach/ep93xx-regs.h> |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | ldr \rp, =EP93XX_APB_PHYS_BASE @ Physical base | 15 | ldr \rp, =EP93XX_APB_PHYS_BASE @ Physical base |
16 | ldr \rv, =EP93XX_APB_VIRT_BASE @ virtual base | 16 | ldr \rv, =EP93XX_APB_VIRT_BASE @ virtual base |
17 | orr \rp, \rp, #0x000c0000 | 17 | orr \rp, \rp, #0x000c0000 |
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h index c57152c231f1..8aff2ea35877 100644 --- a/arch/arm/mach-ep93xx/include/mach/gpio.h +++ b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h | |||
@@ -1,9 +1,7 @@ | |||
1 | /* | 1 | /* Include file for the EP93XX GPIO controller machine specifics */ |
2 | * arch/arm/mach-ep93xx/include/mach/gpio.h | ||
3 | */ | ||
4 | 2 | ||
5 | #ifndef __ASM_ARCH_GPIO_H | 3 | #ifndef __GPIO_EP93XX_H |
6 | #define __ASM_ARCH_GPIO_H | 4 | #define __GPIO_EP93XX_H |
7 | 5 | ||
8 | /* GPIO port A. */ | 6 | /* GPIO port A. */ |
9 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) | 7 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) |
@@ -99,22 +97,4 @@ | |||
99 | /* maximum value for irq capable line identifiers */ | 97 | /* maximum value for irq capable line identifiers */ |
100 | #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7) | 98 | #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7) |
101 | 99 | ||
102 | /* new generic GPIO API - see Documentation/gpio.txt */ | 100 | #endif /* __GPIO_EP93XX_H */ |
103 | |||
104 | #include <asm-generic/gpio.h> | ||
105 | |||
106 | #define gpio_get_value __gpio_get_value | ||
107 | #define gpio_set_value __gpio_set_value | ||
108 | #define gpio_cansleep __gpio_cansleep | ||
109 | |||
110 | /* | ||
111 | * Map GPIO A0..A7 (0..7) to irq 64..71, | ||
112 | * B0..B7 (7..15) to irq 72..79, and | ||
113 | * F0..F7 (16..24) to irq 80..87. | ||
114 | */ | ||
115 | #define gpio_to_irq(gpio) \ | ||
116 | (((gpio) <= EP93XX_GPIO_LINE_MAX_IRQ) ? (64 + (gpio)) : -EINVAL) | ||
117 | |||
118 | #define irq_to_gpio(irq) ((irq) - gpio_to_irq(0)) | ||
119 | |||
120 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index 238bc603da86..d6f286b4db9c 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c | |||
@@ -18,12 +18,12 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/gpio.h> | ||
22 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
23 | #include <linux/i2c-gpio.h> | 22 | #include <linux/i2c-gpio.h> |
24 | 23 | ||
25 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
26 | #include <mach/fb.h> | 25 | #include <mach/fb.h> |
26 | #include <mach/gpio-ep93xx.h> | ||
27 | 27 | ||
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c index 3bdf3a2e5ad0..2b4d4b0201df 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c +++ b/arch/arm/mach-ep93xx/snappercl15.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/gpio.h> | ||
24 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
25 | #include <linux/i2c-gpio.h> | 24 | #include <linux/i2c-gpio.h> |
26 | #include <linux/fb.h> | 25 | #include <linux/fb.h> |
@@ -30,6 +29,7 @@ | |||
30 | 29 | ||
31 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
32 | #include <mach/fb.h> | 31 | #include <mach/fb.h> |
32 | #include <mach/gpio-ep93xx.h> | ||
33 | 33 | ||
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-exynos4/include/mach/debug-macro.S b/arch/arm/mach-exynos4/include/mach/debug-macro.S index a442ef861167..6cacf16a67a6 100644 --- a/arch/arm/mach-exynos4/include/mach/debug-macro.S +++ b/arch/arm/mach-exynos4/include/mach/debug-macro.S | |||
@@ -20,7 +20,7 @@ | |||
20 | * aligned and add in the offset when we load the value here. | 20 | * aligned and add in the offset when we load the value here. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | .macro addruart, rp, rv | 23 | .macro addruart, rp, rv, tmp |
24 | ldr \rp, = S3C_PA_UART | 24 | ldr \rp, = S3C_PA_UART |
25 | ldr \rv, = S3C_VA_UART | 25 | ldr \rv, = S3C_VA_UART |
26 | #if CONFIG_DEBUG_S3C_UART != 0 | 26 | #if CONFIG_DEBUG_S3C_UART != 0 |
diff --git a/arch/arm/mach-exynos4/include/mach/gpio.h b/arch/arm/mach-exynos4/include/mach/gpio.h index be9266b10fdb..80523ca9bb49 100644 --- a/arch/arm/mach-exynos4/include/mach/gpio.h +++ b/arch/arm/mach-exynos4/include/mach/gpio.h | |||
@@ -13,11 +13,6 @@ | |||
13 | #ifndef __ASM_ARCH_GPIO_H | 13 | #ifndef __ASM_ARCH_GPIO_H |
14 | #define __ASM_ARCH_GPIO_H __FILE__ | 14 | #define __ASM_ARCH_GPIO_H __FILE__ |
15 | 15 | ||
16 | #define gpio_get_value __gpio_get_value | ||
17 | #define gpio_set_value __gpio_set_value | ||
18 | #define gpio_cansleep __gpio_cansleep | ||
19 | #define gpio_to_irq __gpio_to_irq | ||
20 | |||
21 | /* Practically, GPIO banks up to GPZ are the configurable gpio banks */ | 16 | /* Practically, GPIO banks up to GPZ are the configurable gpio banks */ |
22 | 17 | ||
23 | /* GPIO bank sizes */ | 18 | /* GPIO bank sizes */ |
@@ -151,6 +146,4 @@ enum s5p_gpio_number { | |||
151 | #define ARCH_NR_GPIOS (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) + \ | 146 | #define ARCH_NR_GPIOS (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) + \ |
152 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) | 147 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) |
153 | 148 | ||
154 | #include <asm-generic/gpio.h> | ||
155 | |||
156 | #endif /* __ASM_ARCH_GPIO_H */ | 149 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-footbridge/include/mach/debug-macro.S b/arch/arm/mach-footbridge/include/mach/debug-macro.S index 1be2eeb7a0a0..e5acde25ffc5 100644 --- a/arch/arm/mach-footbridge/include/mach/debug-macro.S +++ b/arch/arm/mach-footbridge/include/mach/debug-macro.S | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #ifndef CONFIG_DEBUG_DC21285_PORT | 16 | #ifndef CONFIG_DEBUG_DC21285_PORT |
17 | /* For NetWinder debugging */ | 17 | /* For NetWinder debugging */ |
18 | .macro addruart, rp, rv | 18 | .macro addruart, rp, rv, tmp |
19 | mov \rp, #0x000003f8 | 19 | mov \rp, #0x000003f8 |
20 | orr \rv, \rp, #0xff000000 @ virtual | 20 | orr \rv, \rp, #0xff000000 @ virtual |
21 | orr \rp, \rp, #0x7c000000 @ physical | 21 | orr \rp, \rp, #0x7c000000 @ physical |
@@ -31,7 +31,7 @@ | |||
31 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 | 31 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 |
32 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff | 32 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff |
33 | 33 | ||
34 | .macro addruart, rp, rv | 34 | .macro addruart, rp, rv, tmp |
35 | .if dc21285_low | 35 | .if dc21285_low |
36 | mov \rp, #dc21285_low | 36 | mov \rp, #dc21285_low |
37 | .else | 37 | .else |
diff --git a/arch/arm/mach-gemini/include/mach/debug-macro.S b/arch/arm/mach-gemini/include/mach/debug-macro.S index f40e006d296e..837670763b85 100644 --- a/arch/arm/mach-gemini/include/mach/debug-macro.S +++ b/arch/arm/mach-gemini/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <mach/hardware.h> | 12 | #include <mach/hardware.h> |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | ldr \rp, =GEMINI_UART_BASE @ physical | 15 | ldr \rp, =GEMINI_UART_BASE @ physical |
16 | ldr \rv, =IO_ADDRESS(GEMINI_UART_BASE) @ virtual | 16 | ldr \rv, =IO_ADDRESS(GEMINI_UART_BASE) @ virtual |
17 | .endm | 17 | .endm |
diff --git a/arch/arm/mach-gemini/include/mach/gpio.h b/arch/arm/mach-gemini/include/mach/gpio.h index 3bc2c70f2989..40a0527bada7 100644 --- a/arch/arm/mach-gemini/include/mach/gpio.h +++ b/arch/arm/mach-gemini/include/mach/gpio.h | |||
@@ -13,11 +13,6 @@ | |||
13 | #define __MACH_GPIO_H__ | 13 | #define __MACH_GPIO_H__ |
14 | 14 | ||
15 | #include <mach/irqs.h> | 15 | #include <mach/irqs.h> |
16 | #include <asm-generic/gpio.h> | ||
17 | |||
18 | #define gpio_get_value __gpio_get_value | ||
19 | #define gpio_set_value __gpio_set_value | ||
20 | #define gpio_cansleep __gpio_cansleep | ||
21 | 16 | ||
22 | #define gpio_to_irq(x) ((x) + GPIO_IRQ_BASE) | 17 | #define gpio_to_irq(x) ((x) + GPIO_IRQ_BASE) |
23 | #define irq_to_gpio(x) ((x) - GPIO_IRQ_BASE) | 18 | #define irq_to_gpio(x) ((x) - GPIO_IRQ_BASE) |
diff --git a/arch/arm/mach-gemini/include/mach/memory.h b/arch/arm/mach-gemini/include/mach/memory.h deleted file mode 100644 index a50915f764d8..000000000000 --- a/arch/arm/mach-gemini/include/mach/memory.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001-2006 Storlink, Corp. | ||
3 | * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | */ | ||
10 | #ifndef __MACH_MEMORY_H | ||
11 | #define __MACH_MEMORY_H | ||
12 | |||
13 | #ifdef CONFIG_GEMINI_MEM_SWAP | ||
14 | # define PLAT_PHYS_OFFSET UL(0x00000000) | ||
15 | #else | ||
16 | # define PLAT_PHYS_OFFSET UL(0x10000000) | ||
17 | #endif | ||
18 | |||
19 | #endif /* __MACH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-h720x/include/mach/debug-macro.S b/arch/arm/mach-h720x/include/mach/debug-macro.S index c2093e835720..8a46157b0582 100644 --- a/arch/arm/mach-h720x/include/mach/debug-macro.S +++ b/arch/arm/mach-h720x/include/mach/debug-macro.S | |||
@@ -16,7 +16,7 @@ | |||
16 | .equ io_virt, IO_VIRT | 16 | .equ io_virt, IO_VIRT |
17 | .equ io_phys, IO_PHYS | 17 | .equ io_phys, IO_PHYS |
18 | 18 | ||
19 | .macro addruart, rp, rv | 19 | .macro addruart, rp, rv, tmp |
20 | mov \rp, #0x00020000 @ UART1 | 20 | mov \rp, #0x00020000 @ UART1 |
21 | add \rv, \rp, #io_virt @ virtual address | 21 | add \rv, \rp, #io_virt @ virtual address |
22 | add \rp, \rp, #io_phys @ physical base address | 22 | add \rp, \rp, #io_phys @ physical base address |
diff --git a/arch/arm/mach-h720x/include/mach/memory.h b/arch/arm/mach-h720x/include/mach/memory.h deleted file mode 100644 index 96dcf50c51d3..000000000000 --- a/arch/arm/mach-h720x/include/mach/memory.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-h720x/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2000 Jungjun Kim | ||
5 | * | ||
6 | */ | ||
7 | #ifndef __ASM_ARCH_MEMORY_H | ||
8 | #define __ASM_ARCH_MEMORY_H | ||
9 | |||
10 | #define PLAT_PHYS_OFFSET UL(0x40000000) | ||
11 | #endif | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 0519dd7f034b..e9c2968005dc 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -449,6 +449,7 @@ config MACH_MX31_3DS | |||
449 | select IMX_HAVE_PLATFORM_IMX_UART | 449 | select IMX_HAVE_PLATFORM_IMX_UART |
450 | select IMX_HAVE_PLATFORM_IPU_CORE | 450 | select IMX_HAVE_PLATFORM_IPU_CORE |
451 | select IMX_HAVE_PLATFORM_MXC_EHCI | 451 | select IMX_HAVE_PLATFORM_MXC_EHCI |
452 | select IMX_HAVE_PLATFORM_MXC_MMC | ||
452 | select IMX_HAVE_PLATFORM_MXC_NAND | 453 | select IMX_HAVE_PLATFORM_MXC_NAND |
453 | select IMX_HAVE_PLATFORM_SPI_IMX | 454 | select IMX_HAVE_PLATFORM_SPI_IMX |
454 | select MXC_ULPI if USB_ULPI | 455 | select MXC_ULPI if USB_ULPI |
diff --git a/arch/arm/mach-imx/iomux-imx31.c b/arch/arm/mach-imx/iomux-imx31.c index cf8f8099ebd7..82bd4403b450 100644 --- a/arch/arm/mach-imx/iomux-imx31.c +++ b/arch/arm/mach-imx/iomux-imx31.c | |||
@@ -17,13 +17,12 @@ | |||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
18 | * MA 02110-1301, USA. | 18 | * MA 02110-1301, USA. |
19 | */ | 19 | */ |
20 | 20 | #include <linux/gpio.h> | |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | #include <mach/gpio.h> | ||
27 | #include <mach/iomux-mx3.h> | 26 | #include <mach/iomux-mx3.h> |
28 | 27 | ||
29 | /* | 28 | /* |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index efe6109099fd..635b0509068b 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | */ | 15 | */ |
16 | 16 | #include <linux/gpio.h> | |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/map.h> | 19 | #include <linux/mtd/map.h> |
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
29 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | #include <mach/gpio.h> | ||
31 | #include <mach/iomux-mx27.h> | 30 | #include <mach/iomux-mx27.h> |
32 | 31 | ||
33 | #include "devices-imx27.h" | 32 | #include "devices-imx27.h" |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 589066fb3316..712a7fb1cf01 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -542,7 +542,7 @@ static const struct mxc_nand_platform_data | |||
542 | mx31_3ds_nand_board_info __initconst = { | 542 | mx31_3ds_nand_board_info __initconst = { |
543 | .width = 1, | 543 | .width = 1, |
544 | .hw_ecc = 1, | 544 | .hw_ecc = 1, |
545 | #ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT | 545 | #ifdef CONFIG_MACH_MX31_3DS_MXC_NAND_USE_BBT |
546 | .flash_bbt = 1, | 546 | .flash_bbt = 1, |
547 | #endif | 547 | #endif |
548 | }; | 548 | }; |
diff --git a/arch/arm/mach-integrator/include/mach/debug-macro.S b/arch/arm/mach-integrator/include/mach/debug-macro.S index a1f598fd3a56..411b116077e4 100644 --- a/arch/arm/mach-integrator/include/mach/debug-macro.S +++ b/arch/arm/mach-integrator/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0x16000000 @ physical base address | 15 | mov \rp, #0x16000000 @ physical base address |
16 | mov \rv, #0xf0000000 @ virtual base | 16 | mov \rv, #0xf0000000 @ virtual base |
17 | add \rv, \rv, #0x16000000 >> 4 | 17 | add \rv, \rv, #0x16000000 >> 4 |
diff --git a/arch/arm/mach-iop13xx/include/mach/debug-macro.S b/arch/arm/mach-iop13xx/include/mach/debug-macro.S index e664466d51bf..d869a6f67e5c 100644 --- a/arch/arm/mach-iop13xx/include/mach/debug-macro.S +++ b/arch/arm/mach-iop13xx/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0x00002300 | 15 | mov \rp, #0x00002300 |
16 | orr \rp, \rp, #0x00000040 | 16 | orr \rp, \rp, #0x00000040 |
17 | orr \rv, \rp, #0xfe000000 @ virtual | 17 | orr \rv, \rp, #0xfe000000 @ virtual |
diff --git a/arch/arm/mach-iop32x/include/mach/debug-macro.S b/arch/arm/mach-iop32x/include/mach/debug-macro.S index ff9e76c09f35..363bdf90b34d 100644 --- a/arch/arm/mach-iop32x/include/mach/debug-macro.S +++ b/arch/arm/mach-iop32x/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0xfe000000 @ physical as well as virtual | 15 | mov \rp, #0xfe000000 @ physical as well as virtual |
16 | orr \rp, \rp, #0x00800000 @ location of the UART | 16 | orr \rp, \rp, #0x00800000 @ location of the UART |
17 | mov \rv, \rp | 17 | mov \rv, \rp |
diff --git a/arch/arm/mach-iop32x/include/mach/memory.h b/arch/arm/mach-iop32x/include/mach/memory.h deleted file mode 100644 index 169cc239f76c..000000000000 --- a/arch/arm/mach-iop32x/include/mach/memory.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop32x/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __MEMORY_H | ||
6 | #define __MEMORY_H | ||
7 | |||
8 | /* | ||
9 | * Physical DRAM offset. | ||
10 | */ | ||
11 | #define PLAT_PHYS_OFFSET UL(0xa0000000) | ||
12 | |||
13 | #endif | ||
diff --git a/arch/arm/mach-iop33x/include/mach/debug-macro.S b/arch/arm/mach-iop33x/include/mach/debug-macro.S index 40c500dd1fac..361be1f6026e 100644 --- a/arch/arm/mach-iop33x/include/mach/debug-macro.S +++ b/arch/arm/mach-iop33x/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0x00ff0000 | 15 | mov \rp, #0x00ff0000 |
16 | orr \rp, \rp, #0x0000f700 | 16 | orr \rp, \rp, #0x0000f700 |
17 | orr \rv, #0xfe000000 @ virtual | 17 | orr \rv, #0xfe000000 @ virtual |
diff --git a/arch/arm/mach-iop33x/include/mach/memory.h b/arch/arm/mach-iop33x/include/mach/memory.h deleted file mode 100644 index 8e1daf7006b6..000000000000 --- a/arch/arm/mach-iop33x/include/mach/memory.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop33x/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __MEMORY_H | ||
6 | #define __MEMORY_H | ||
7 | |||
8 | /* | ||
9 | * Physical DRAM offset. | ||
10 | */ | ||
11 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
12 | |||
13 | #endif | ||
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index 4068166c8993..59a512672bb9 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * License version 2. This program is licensed "as is" without any | 13 | * License version 2. This program is licensed "as is" without any |
14 | * warranty of any kind, whether express or implied. | 14 | * warranty of any kind, whether express or implied. |
15 | */ | 15 | */ |
16 | 16 | #include <linux/gpio.h> | |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
40 | #include <asm/mach/irq.h> | 40 | #include <asm/mach/irq.h> |
41 | 41 | ||
42 | #include <mach/gpio.h> | 42 | #include <mach/gpio-ixp2000.h> |
43 | 43 | ||
44 | static DEFINE_SPINLOCK(ixp2000_slowport_lock); | 44 | static DEFINE_SPINLOCK(ixp2000_slowport_lock); |
45 | static unsigned long ixp2000_slowport_irq_flags; | 45 | static unsigned long ixp2000_slowport_irq_flags; |
diff --git a/arch/arm/mach-ixp2000/include/mach/debug-macro.S b/arch/arm/mach-ixp2000/include/mach/debug-macro.S index 0ef533b20972..bdd3ccdc2890 100644 --- a/arch/arm/mach-ixp2000/include/mach/debug-macro.S +++ b/arch/arm/mach-ixp2000/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0x00030000 | 15 | mov \rp, #0x00030000 |
16 | #ifdef __ARMEB__ | 16 | #ifdef __ARMEB__ |
17 | orr \rp, \rp, #0x00000003 | 17 | orr \rp, \rp, #0x00000003 |
diff --git a/arch/arm/mach-ixp2000/include/mach/gpio.h b/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h index 4a88d2c33dac..af836c76c3f1 100644 --- a/arch/arm/mach-ixp2000/include/mach/gpio.h +++ b/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2002 Intel Corporation. | 4 | * Copyright (C) 2002 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software, you can redistribute it and/or modify | 6 | * This program is free software, you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
@@ -11,7 +11,7 @@ | |||
11 | /* | 11 | /* |
12 | * IXP2000 GPIO in/out, edge/level detection for IRQs: | 12 | * IXP2000 GPIO in/out, edge/level detection for IRQs: |
13 | * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High | 13 | * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High |
14 | * or both Falling-edge and Rising-edge. | 14 | * or both Falling-edge and Rising-edge. |
15 | * This must be called *before* the corresponding IRQ is registerd. | 15 | * This must be called *before* the corresponding IRQ is registerd. |
16 | * Use this instead of directly setting the GPIO registers. | 16 | * Use this instead of directly setting the GPIO registers. |
17 | * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb) | 17 | * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb) |
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index 235638f800e5..634b6c852f68 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * Free Software Foundation; either version 2 of the License, or (at your | 14 | * Free Software Foundation; either version 2 of the License, or (at your |
15 | * option) any later version. | 15 | * option) any later version. |
16 | */ | 16 | */ |
17 | #include <linux/gpio.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
@@ -40,8 +41,7 @@ | |||
40 | #include <asm/mach/flash.h> | 41 | #include <asm/mach/flash.h> |
41 | #include <asm/mach/arch.h> | 42 | #include <asm/mach/arch.h> |
42 | 43 | ||
43 | #include <mach/gpio.h> | 44 | #include <mach/gpio-ixp2000.h> |
44 | |||
45 | 45 | ||
46 | /************************************************************************* | 46 | /************************************************************************* |
47 | * IXDP2x00 IRQ Initialization | 47 | * IXDP2x00 IRQ Initialization |
diff --git a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S b/arch/arm/mach-ixp23xx/include/mach/debug-macro.S index f7c6eef7fa22..5ff524c13744 100644 --- a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S +++ b/arch/arm/mach-ixp23xx/include/mach/debug-macro.S | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <mach/ixp23xx.h> | 13 | #include <mach/ixp23xx.h> |
14 | 14 | ||
15 | .macro addruart, rp, rv | 15 | .macro addruart, rp, rv, tmp |
16 | ldr \rp, =IXP23XX_PERIPHERAL_PHYS @ physical | 16 | ldr \rp, =IXP23XX_PERIPHERAL_PHYS @ physical |
17 | ldr \rv, =IXP23XX_PERIPHERAL_VIRT @ virtual | 17 | ldr \rv, =IXP23XX_PERIPHERAL_VIRT @ virtual |
18 | #ifdef __ARMEB__ | 18 | #ifdef __ARMEB__ |
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c index 71607a7ecc7e..8837fbca27ce 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-setup.c +++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * Author: Rod Whitby <rod@whitby.id.au> | 16 | * Author: Rod Whitby <rod@whitby.id.au> |
17 | * Maintainers: http://www.nslu2-linux.org/ | 17 | * Maintainers: http://www.nslu2-linux.org/ |
18 | */ | 18 | */ |
19 | 19 | #include <linux/gpio.h> | |
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/jiffies.h> | 21 | #include <linux/jiffies.h> |
22 | #include <linux/timer.h> | 22 | #include <linux/timer.h> |
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/flash.h> | 32 | #include <asm/mach/flash.h> |
33 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
34 | #include <asm/gpio.h> | ||
35 | 34 | ||
36 | #define DSMG600_SDA_PIN 5 | 35 | #define DSMG600_SDA_PIN 5 |
37 | #define DSMG600_SCL_PIN 4 | 36 | #define DSMG600_SCL_PIN 4 |
diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c index a9540cd90375..2887c3578c17 100644 --- a/arch/arm/mach-ixp4xx/fsg-setup.c +++ b/arch/arm/mach-ixp4xx/fsg-setup.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * Maintainers: http://www.nslu2-linux.org/ | 14 | * Maintainers: http://www.nslu2-linux.org/ |
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | #include <linux/gpio.h> | |
18 | #include <linux/if_ether.h> | 18 | #include <linux/if_ether.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/serial.h> | 20 | #include <linux/serial.h> |
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/flash.h> | 29 | #include <asm/mach/flash.h> |
30 | #include <asm/gpio.h> | ||
31 | 30 | ||
32 | #define FSG_SDA_PIN 12 | 31 | #define FSG_SDA_PIN 12 |
33 | #define FSG_SCL_PIN 13 | 32 | #define FSG_SCL_PIN 13 |
diff --git a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S index b974a49c0aff..8c9f8d564492 100644 --- a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S +++ b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S | |||
@@ -10,7 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | .macro addruart, rp, rv | 13 | .macro addruart, rp, rv, tmp |
14 | #ifdef __ARMEB__ | 14 | #ifdef __ARMEB__ |
15 | mov \rp, #3 @ Uart regs are at off set of 3 if | 15 | mov \rp, #3 @ Uart regs are at off set of 3 if |
16 | @ byte writes used - Big Endian. | 16 | @ byte writes used - Big Endian. |
diff --git a/arch/arm/mach-ixp4xx/include/mach/gpio.h b/arch/arm/mach-ixp4xx/include/mach/gpio.h index a5f87ded2f28..83d6b4ed60bb 100644 --- a/arch/arm/mach-ixp4xx/include/mach/gpio.h +++ b/arch/arm/mach-ixp4xx/include/mach/gpio.h | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | 30 | ||
31 | #define __ARM_GPIOLIB_COMPLEX | ||
32 | |||
31 | static inline int gpio_request(unsigned gpio, const char *label) | 33 | static inline int gpio_request(unsigned gpio, const char *label) |
32 | { | 34 | { |
33 | return 0; | 35 | return 0; |
@@ -70,6 +72,7 @@ static inline void gpio_set_value(unsigned gpio, int value) | |||
70 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 72 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
71 | 73 | ||
72 | extern int gpio_to_irq(int gpio); | 74 | extern int gpio_to_irq(int gpio); |
75 | #define gpio_to_irq gpio_to_irq | ||
73 | extern int irq_to_gpio(unsigned int irq); | 76 | extern int irq_to_gpio(unsigned int irq); |
74 | 77 | ||
75 | #endif | 78 | #endif |
diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h deleted file mode 100644 index 4caf1761f1e2..000000000000 --- a/arch/arm/mach-ixp4xx/include/mach/memory.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp4xx/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2001-2004 MontaVista Software, Inc. | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_ARCH_MEMORY_H | ||
8 | #define __ASM_ARCH_MEMORY_H | ||
9 | |||
10 | #include <asm/sizes.h> | ||
11 | |||
12 | /* | ||
13 | * Physical DRAM offset. | ||
14 | */ | ||
15 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
16 | |||
17 | #endif | ||
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c index 9f4669260d4c..de716fa1aab6 100644 --- a/arch/arm/mach-ixp4xx/nas100d-setup.c +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * Maintainers: http://www.nslu2-linux.org/ | 17 | * Maintainers: http://www.nslu2-linux.org/ |
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | #include <linux/gpio.h> | |
21 | #include <linux/if_ether.h> | 21 | #include <linux/if_ether.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/flash.h> | 34 | #include <asm/mach/flash.h> |
35 | #include <asm/gpio.h> | ||
36 | 35 | ||
37 | #define NAS100D_SDA_PIN 5 | 36 | #define NAS100D_SDA_PIN 5 |
38 | #define NAS100D_SCL_PIN 6 | 37 | #define NAS100D_SCL_PIN 6 |
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index 3676fbf6ef9c..ac81ccb26bfe 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * Maintainers: http://www.nslu2-linux.org/ | 16 | * Maintainers: http://www.nslu2-linux.org/ |
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | #include <linux/gpio.h> | |
20 | #include <linux/if_ether.h> | 20 | #include <linux/if_ether.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/serial.h> | 22 | #include <linux/serial.h> |
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/flash.h> | 31 | #include <asm/mach/flash.h> |
32 | #include <asm/mach/time.h> | 32 | #include <asm/mach/time.h> |
33 | #include <asm/gpio.h> | ||
34 | 33 | ||
35 | #define NSLU2_SDA_PIN 7 | 34 | #define NSLU2_SDA_PIN 7 |
36 | #define NSLU2_SCL_PIN 6 | 35 | #define NSLU2_SCL_PIN 6 |
diff --git a/arch/arm/mach-kirkwood/include/mach/debug-macro.S b/arch/arm/mach-kirkwood/include/mach/debug-macro.S index db06ae437d08..f785d401a607 100644 --- a/arch/arm/mach-kirkwood/include/mach/debug-macro.S +++ b/arch/arm/mach-kirkwood/include/mach/debug-macro.S | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #include <mach/bridge-regs.h> | 9 | #include <mach/bridge-regs.h> |
10 | 10 | ||
11 | .macro addruart, rp, rv | 11 | .macro addruart, rp, rv, tmp |
12 | ldr \rp, =KIRKWOOD_REGS_PHYS_BASE | 12 | ldr \rp, =KIRKWOOD_REGS_PHYS_BASE |
13 | ldr \rv, =KIRKWOOD_REGS_VIRT_BASE | 13 | ldr \rv, =KIRKWOOD_REGS_VIRT_BASE |
14 | orr \rp, \rp, #0x00012000 | 14 | orr \rp, \rp, #0x00012000 |
diff --git a/arch/arm/mach-kirkwood/include/mach/memory.h b/arch/arm/mach-kirkwood/include/mach/memory.h deleted file mode 100644 index 4600b44e3ad3..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/memory.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
9 | |||
10 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/irq.c b/arch/arm/mach-kirkwood/irq.c index 05d193a25b25..c4c68e5b94f1 100644 --- a/arch/arm/mach-kirkwood/irq.c +++ b/arch/arm/mach-kirkwood/irq.c | |||
@@ -7,14 +7,13 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <mach/bridge-regs.h> | 15 | #include <mach/bridge-regs.h> |
16 | #include <plat/irq.h> | 16 | #include <plat/irq.h> |
17 | #include <asm/gpio.h> | ||
18 | #include "common.h" | 17 | #include "common.h" |
19 | 18 | ||
20 | static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | 19 | static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) |
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c index b0a7d979a8ed..cc431fa22ccb 100644 --- a/arch/arm/mach-kirkwood/mpp.c +++ b/arch/arm/mach-kirkwood/mpp.c | |||
@@ -7,12 +7,11 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mbus.h> | 13 | #include <linux/mbus.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <asm/gpio.h> | ||
16 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
17 | #include <plat/mpp.h> | 16 | #include <plat/mpp.h> |
18 | #include "common.h" | 17 | #include "common.h" |
diff --git a/arch/arm/mach-ks8695/Makefile b/arch/arm/mach-ks8695/Makefile index 7e3e8160ed30..853efd9133c6 100644 --- a/arch/arm/mach-ks8695/Makefile +++ b/arch/arm/mach-ks8695/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # Makefile for KS8695 architecture support | 3 | # Makefile for KS8695 architecture support |
4 | # | 4 | # |
5 | 5 | ||
6 | obj-y := cpu.o irq.o time.o gpio.o devices.o | 6 | obj-y := cpu.o irq.o time.o devices.o |
7 | obj-m := | 7 | obj-m := |
8 | obj-n := | 8 | obj-n := |
9 | obj- := | 9 | obj- := |
diff --git a/arch/arm/mach-ks8695/board-acs5k.c b/arch/arm/mach-ks8695/board-acs5k.c index a5fcc7c7fe18..a91f99d265aa 100644 --- a/arch/arm/mach-ks8695/board-acs5k.c +++ b/arch/arm/mach-ks8695/board-acs5k.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | #include <linux/gpio.h> | |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
@@ -34,7 +34,7 @@ | |||
34 | #include <asm/mach/irq.h> | 34 | #include <asm/mach/irq.h> |
35 | 35 | ||
36 | #include <mach/devices.h> | 36 | #include <mach/devices.h> |
37 | #include <mach/gpio.h> | 37 | #include <mach/gpio-ks8695.h> |
38 | 38 | ||
39 | #include "generic.h" | 39 | #include "generic.h" |
40 | 40 | ||
diff --git a/arch/arm/mach-ks8695/board-dsm320.c b/arch/arm/mach-ks8695/board-dsm320.c index fb91a716a7db..d24bcef2e2dd 100644 --- a/arch/arm/mach-ks8695/board-dsm320.c +++ b/arch/arm/mach-ks8695/board-dsm320.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | #include <linux/gpio.h> | |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
@@ -29,7 +29,7 @@ | |||
29 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
30 | 30 | ||
31 | #include <mach/devices.h> | 31 | #include <mach/devices.h> |
32 | #include <mach/gpio.h> | 32 | #include <mach/gpio-ks8695.h> |
33 | 33 | ||
34 | #include "generic.h" | 34 | #include "generic.h" |
35 | 35 | ||
diff --git a/arch/arm/mach-ks8695/board-micrel.c b/arch/arm/mach-ks8695/board-micrel.c index 8f67a750b6c7..16c95657f8fd 100644 --- a/arch/arm/mach-ks8695/board-micrel.c +++ b/arch/arm/mach-ks8695/board-micrel.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | #include <linux/gpio.h> | |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <asm/mach/irq.h> | 19 | #include <asm/mach/irq.h> |
20 | 20 | ||
21 | #include <mach/gpio.h> | 21 | #include <mach/gpio-ks8695.h> |
22 | #include <mach/devices.h> | 22 | #include <mach/devices.h> |
23 | 23 | ||
24 | #include "generic.h" | 24 | #include "generic.h" |
diff --git a/arch/arm/mach-ks8695/devices.c b/arch/arm/mach-ks8695/devices.c index b89fb6d46ccc..73bd63812878 100644 --- a/arch/arm/mach-ks8695/devices.c +++ b/arch/arm/mach-ks8695/devices.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
21 | #include <asm/mach/map.h> | 21 | #include <asm/mach/map.h> |
22 | 22 | ||
23 | #include <linux/gpio.h> | ||
23 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
24 | 25 | ||
25 | #include <mach/irqs.h> | 26 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-ks8695/gpio.c b/arch/arm/mach-ks8695/gpio.c deleted file mode 100644 index 31e456508a6f..000000000000 --- a/arch/arm/mach-ks8695/gpio.c +++ /dev/null | |||
@@ -1,319 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ks8695/gpio.c | ||
3 | * | ||
4 | * Copyright (C) 2006 Andrew Victor | ||
5 | * Updated to GPIOLIB, Copyright 2008 Simtec Electronics | ||
6 | * Daniel Silverstone <dsilvers@simtec.co.uk> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/mm.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/debugfs.h> | ||
26 | #include <linux/seq_file.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/io.h> | ||
29 | |||
30 | #include <mach/hardware.h> | ||
31 | #include <asm/mach/irq.h> | ||
32 | |||
33 | #include <mach/regs-gpio.h> | ||
34 | #include <mach/gpio.h> | ||
35 | |||
36 | /* | ||
37 | * Configure a GPIO line for either GPIO function, or its internal | ||
38 | * function (Interrupt, Timer, etc). | ||
39 | */ | ||
40 | static void ks8695_gpio_mode(unsigned int pin, short gpio) | ||
41 | { | ||
42 | unsigned int enable[] = { IOPC_IOEINT0EN, IOPC_IOEINT1EN, IOPC_IOEINT2EN, IOPC_IOEINT3EN, IOPC_IOTIM0EN, IOPC_IOTIM1EN }; | ||
43 | unsigned long x, flags; | ||
44 | |||
45 | if (pin > KS8695_GPIO_5) /* only GPIO 0..5 have internal functions */ | ||
46 | return; | ||
47 | |||
48 | local_irq_save(flags); | ||
49 | |||
50 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPC); | ||
51 | if (gpio) /* GPIO: set bit to 0 */ | ||
52 | x &= ~enable[pin]; | ||
53 | else /* Internal function: set bit to 1 */ | ||
54 | x |= enable[pin]; | ||
55 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPC); | ||
56 | |||
57 | local_irq_restore(flags); | ||
58 | } | ||
59 | |||
60 | |||
61 | static unsigned short gpio_irq[] = { KS8695_IRQ_EXTERN0, KS8695_IRQ_EXTERN1, KS8695_IRQ_EXTERN2, KS8695_IRQ_EXTERN3 }; | ||
62 | |||
63 | /* | ||
64 | * Configure GPIO pin as external interrupt source. | ||
65 | */ | ||
66 | int ks8695_gpio_interrupt(unsigned int pin, unsigned int type) | ||
67 | { | ||
68 | unsigned long x, flags; | ||
69 | |||
70 | if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */ | ||
71 | return -EINVAL; | ||
72 | |||
73 | local_irq_save(flags); | ||
74 | |||
75 | /* set pin as input */ | ||
76 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); | ||
77 | x &= ~IOPM(pin); | ||
78 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM); | ||
79 | |||
80 | local_irq_restore(flags); | ||
81 | |||
82 | /* Set IRQ triggering type */ | ||
83 | irq_set_irq_type(gpio_irq[pin], type); | ||
84 | |||
85 | /* enable interrupt mode */ | ||
86 | ks8695_gpio_mode(pin, 0); | ||
87 | |||
88 | return 0; | ||
89 | } | ||
90 | EXPORT_SYMBOL(ks8695_gpio_interrupt); | ||
91 | |||
92 | |||
93 | |||
94 | /* .... Generic GPIO interface .............................................. */ | ||
95 | |||
96 | /* | ||
97 | * Configure the GPIO line as an input. | ||
98 | */ | ||
99 | static int ks8695_gpio_direction_input(struct gpio_chip *gc, unsigned int pin) | ||
100 | { | ||
101 | unsigned long x, flags; | ||
102 | |||
103 | if (pin > KS8695_GPIO_15) | ||
104 | return -EINVAL; | ||
105 | |||
106 | /* set pin to GPIO mode */ | ||
107 | ks8695_gpio_mode(pin, 1); | ||
108 | |||
109 | local_irq_save(flags); | ||
110 | |||
111 | /* set pin as input */ | ||
112 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); | ||
113 | x &= ~IOPM(pin); | ||
114 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM); | ||
115 | |||
116 | local_irq_restore(flags); | ||
117 | |||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | |||
122 | /* | ||
123 | * Configure the GPIO line as an output, with default state. | ||
124 | */ | ||
125 | static int ks8695_gpio_direction_output(struct gpio_chip *gc, | ||
126 | unsigned int pin, int state) | ||
127 | { | ||
128 | unsigned long x, flags; | ||
129 | |||
130 | if (pin > KS8695_GPIO_15) | ||
131 | return -EINVAL; | ||
132 | |||
133 | /* set pin to GPIO mode */ | ||
134 | ks8695_gpio_mode(pin, 1); | ||
135 | |||
136 | local_irq_save(flags); | ||
137 | |||
138 | /* set line state */ | ||
139 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); | ||
140 | if (state) | ||
141 | x |= IOPD(pin); | ||
142 | else | ||
143 | x &= ~IOPD(pin); | ||
144 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD); | ||
145 | |||
146 | /* set pin as output */ | ||
147 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); | ||
148 | x |= IOPM(pin); | ||
149 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM); | ||
150 | |||
151 | local_irq_restore(flags); | ||
152 | |||
153 | return 0; | ||
154 | } | ||
155 | |||
156 | |||
157 | /* | ||
158 | * Set the state of an output GPIO line. | ||
159 | */ | ||
160 | static void ks8695_gpio_set_value(struct gpio_chip *gc, | ||
161 | unsigned int pin, int state) | ||
162 | { | ||
163 | unsigned long x, flags; | ||
164 | |||
165 | if (pin > KS8695_GPIO_15) | ||
166 | return; | ||
167 | |||
168 | local_irq_save(flags); | ||
169 | |||
170 | /* set output line state */ | ||
171 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); | ||
172 | if (state) | ||
173 | x |= IOPD(pin); | ||
174 | else | ||
175 | x &= ~IOPD(pin); | ||
176 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD); | ||
177 | |||
178 | local_irq_restore(flags); | ||
179 | } | ||
180 | |||
181 | |||
182 | /* | ||
183 | * Read the state of a GPIO line. | ||
184 | */ | ||
185 | static int ks8695_gpio_get_value(struct gpio_chip *gc, unsigned int pin) | ||
186 | { | ||
187 | unsigned long x; | ||
188 | |||
189 | if (pin > KS8695_GPIO_15) | ||
190 | return -EINVAL; | ||
191 | |||
192 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); | ||
193 | return (x & IOPD(pin)) != 0; | ||
194 | } | ||
195 | |||
196 | |||
197 | /* | ||
198 | * Map GPIO line to IRQ number. | ||
199 | */ | ||
200 | static int ks8695_gpio_to_irq(struct gpio_chip *gc, unsigned int pin) | ||
201 | { | ||
202 | if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */ | ||
203 | return -EINVAL; | ||
204 | |||
205 | return gpio_irq[pin]; | ||
206 | } | ||
207 | |||
208 | /* | ||
209 | * Map IRQ number to GPIO line. | ||
210 | */ | ||
211 | int irq_to_gpio(unsigned int irq) | ||
212 | { | ||
213 | if ((irq < KS8695_IRQ_EXTERN0) || (irq > KS8695_IRQ_EXTERN3)) | ||
214 | return -EINVAL; | ||
215 | |||
216 | return (irq - KS8695_IRQ_EXTERN0); | ||
217 | } | ||
218 | EXPORT_SYMBOL(irq_to_gpio); | ||
219 | |||
220 | /* GPIOLIB interface */ | ||
221 | |||
222 | static struct gpio_chip ks8695_gpio_chip = { | ||
223 | .label = "KS8695", | ||
224 | .direction_input = ks8695_gpio_direction_input, | ||
225 | .direction_output = ks8695_gpio_direction_output, | ||
226 | .get = ks8695_gpio_get_value, | ||
227 | .set = ks8695_gpio_set_value, | ||
228 | .to_irq = ks8695_gpio_to_irq, | ||
229 | .base = 0, | ||
230 | .ngpio = 16, | ||
231 | .can_sleep = 0, | ||
232 | }; | ||
233 | |||
234 | /* Register the GPIOs */ | ||
235 | void ks8695_register_gpios(void) | ||
236 | { | ||
237 | if (gpiochip_add(&ks8695_gpio_chip)) | ||
238 | printk(KERN_ERR "Unable to register core GPIOs\n"); | ||
239 | } | ||
240 | |||
241 | /* .... Debug interface ..................................................... */ | ||
242 | |||
243 | #ifdef CONFIG_DEBUG_FS | ||
244 | |||
245 | static int ks8695_gpio_show(struct seq_file *s, void *unused) | ||
246 | { | ||
247 | unsigned int enable[] = { IOPC_IOEINT0EN, IOPC_IOEINT1EN, IOPC_IOEINT2EN, IOPC_IOEINT3EN, IOPC_IOTIM0EN, IOPC_IOTIM1EN }; | ||
248 | unsigned int intmask[] = { IOPC_IOEINT0TM, IOPC_IOEINT1TM, IOPC_IOEINT2TM, IOPC_IOEINT3TM }; | ||
249 | unsigned long mode, ctrl, data; | ||
250 | int i; | ||
251 | |||
252 | mode = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); | ||
253 | ctrl = __raw_readl(KS8695_GPIO_VA + KS8695_IOPC); | ||
254 | data = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); | ||
255 | |||
256 | seq_printf(s, "Pin\tI/O\tFunction\tState\n\n"); | ||
257 | |||
258 | for (i = KS8695_GPIO_0; i <= KS8695_GPIO_15 ; i++) { | ||
259 | seq_printf(s, "%i:\t", i); | ||
260 | |||
261 | seq_printf(s, "%s\t", (mode & IOPM(i)) ? "Output" : "Input"); | ||
262 | |||
263 | if (i <= KS8695_GPIO_3) { | ||
264 | if (ctrl & enable[i]) { | ||
265 | seq_printf(s, "EXT%i ", i); | ||
266 | |||
267 | switch ((ctrl & intmask[i]) >> (4 * i)) { | ||
268 | case IOPC_TM_LOW: | ||
269 | seq_printf(s, "(Low)"); break; | ||
270 | case IOPC_TM_HIGH: | ||
271 | seq_printf(s, "(High)"); break; | ||
272 | case IOPC_TM_RISING: | ||
273 | seq_printf(s, "(Rising)"); break; | ||
274 | case IOPC_TM_FALLING: | ||
275 | seq_printf(s, "(Falling)"); break; | ||
276 | case IOPC_TM_EDGE: | ||
277 | seq_printf(s, "(Edges)"); break; | ||
278 | } | ||
279 | } | ||
280 | else | ||
281 | seq_printf(s, "GPIO\t"); | ||
282 | } | ||
283 | else if (i <= KS8695_GPIO_5) { | ||
284 | if (ctrl & enable[i]) | ||
285 | seq_printf(s, "TOUT%i\t", i - KS8695_GPIO_4); | ||
286 | else | ||
287 | seq_printf(s, "GPIO\t"); | ||
288 | } | ||
289 | else | ||
290 | seq_printf(s, "GPIO\t"); | ||
291 | |||
292 | seq_printf(s, "\t"); | ||
293 | |||
294 | seq_printf(s, "%i\n", (data & IOPD(i)) ? 1 : 0); | ||
295 | } | ||
296 | return 0; | ||
297 | } | ||
298 | |||
299 | static int ks8695_gpio_open(struct inode *inode, struct file *file) | ||
300 | { | ||
301 | return single_open(file, ks8695_gpio_show, NULL); | ||
302 | } | ||
303 | |||
304 | static const struct file_operations ks8695_gpio_operations = { | ||
305 | .open = ks8695_gpio_open, | ||
306 | .read = seq_read, | ||
307 | .llseek = seq_lseek, | ||
308 | .release = single_release, | ||
309 | }; | ||
310 | |||
311 | static int __init ks8695_gpio_debugfs_init(void) | ||
312 | { | ||
313 | /* /sys/kernel/debug/ks8695_gpio */ | ||
314 | (void) debugfs_create_file("ks8695_gpio", S_IFREG | S_IRUGO, NULL, NULL, &ks8695_gpio_operations); | ||
315 | return 0; | ||
316 | } | ||
317 | postcore_initcall(ks8695_gpio_debugfs_init); | ||
318 | |||
319 | #endif | ||
diff --git a/arch/arm/mach-ks8695/include/mach/debug-macro.S b/arch/arm/mach-ks8695/include/mach/debug-macro.S index bf516adf1925..a79e48981202 100644 --- a/arch/arm/mach-ks8695/include/mach/debug-macro.S +++ b/arch/arm/mach-ks8695/include/mach/debug-macro.S | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <mach/regs-uart.h> | 15 | #include <mach/regs-uart.h> |
16 | 16 | ||
17 | .macro addruart, rp, rv | 17 | .macro addruart, rp, rv, tmp |
18 | ldr \rp, =KS8695_UART_PA @ physical base address | 18 | ldr \rp, =KS8695_UART_PA @ physical base address |
19 | ldr \rv, =KS8695_UART_VA @ virtual base address | 19 | ldr \rv, =KS8695_UART_VA @ virtual base address |
20 | .endm | 20 | .endm |
diff --git a/arch/arm/mach-ks8695/include/mach/gpio-ks8695.h b/arch/arm/mach-ks8695/include/mach/gpio-ks8695.h new file mode 100644 index 000000000000..6eb034d60325 --- /dev/null +++ b/arch/arm/mach-ks8695/include/mach/gpio-ks8695.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Andrew Victor | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_KS8659_GPIO_H | ||
10 | #define __MACH_KS8659_GPIO_H | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | |||
14 | #define KS8695_GPIO_0 0 | ||
15 | #define KS8695_GPIO_1 1 | ||
16 | #define KS8695_GPIO_2 2 | ||
17 | #define KS8695_GPIO_3 3 | ||
18 | #define KS8695_GPIO_4 4 | ||
19 | #define KS8695_GPIO_5 5 | ||
20 | #define KS8695_GPIO_6 6 | ||
21 | #define KS8695_GPIO_7 7 | ||
22 | #define KS8695_GPIO_8 8 | ||
23 | #define KS8695_GPIO_9 9 | ||
24 | #define KS8695_GPIO_10 10 | ||
25 | #define KS8695_GPIO_11 11 | ||
26 | #define KS8695_GPIO_12 12 | ||
27 | #define KS8695_GPIO_13 13 | ||
28 | #define KS8695_GPIO_14 14 | ||
29 | #define KS8695_GPIO_15 15 | ||
30 | |||
31 | /* | ||
32 | * Configure GPIO pin as external interrupt source. | ||
33 | */ | ||
34 | extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type); | ||
35 | |||
36 | /* Register the GPIOs */ | ||
37 | extern void ks8695_register_gpios(void); | ||
38 | |||
39 | #endif /* __MACH_KS8659_GPIO_H */ | ||
diff --git a/arch/arm/mach-ks8695/include/mach/gpio.h b/arch/arm/mach-ks8695/include/mach/gpio.h index 86312d476bc6..f5fda36e4512 100644 --- a/arch/arm/mach-ks8695/include/mach/gpio.h +++ b/arch/arm/mach-ks8695/include/mach/gpio.h | |||
@@ -11,47 +11,9 @@ | |||
11 | #ifndef __ASM_ARCH_GPIO_H_ | 11 | #ifndef __ASM_ARCH_GPIO_H_ |
12 | #define __ASM_ARCH_GPIO_H_ | 12 | #define __ASM_ARCH_GPIO_H_ |
13 | 13 | ||
14 | #include <linux/kernel.h> | ||
15 | |||
16 | #define KS8695_GPIO_0 0 | ||
17 | #define KS8695_GPIO_1 1 | ||
18 | #define KS8695_GPIO_2 2 | ||
19 | #define KS8695_GPIO_3 3 | ||
20 | #define KS8695_GPIO_4 4 | ||
21 | #define KS8695_GPIO_5 5 | ||
22 | #define KS8695_GPIO_6 6 | ||
23 | #define KS8695_GPIO_7 7 | ||
24 | #define KS8695_GPIO_8 8 | ||
25 | #define KS8695_GPIO_9 9 | ||
26 | #define KS8695_GPIO_10 10 | ||
27 | #define KS8695_GPIO_11 11 | ||
28 | #define KS8695_GPIO_12 12 | ||
29 | #define KS8695_GPIO_13 13 | ||
30 | #define KS8695_GPIO_14 14 | ||
31 | #define KS8695_GPIO_15 15 | ||
32 | |||
33 | /* | ||
34 | * Configure GPIO pin as external interrupt source. | ||
35 | */ | ||
36 | extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type); | ||
37 | |||
38 | /* | 14 | /* |
39 | * Map IRQ number to GPIO line. | 15 | * Map IRQ number to GPIO line. |
40 | */ | 16 | */ |
41 | extern int irq_to_gpio(unsigned int irq); | 17 | extern int irq_to_gpio(unsigned int irq); |
42 | 18 | ||
43 | #include <asm-generic/gpio.h> | ||
44 | |||
45 | /* If it turns out that we need to optimise GPIO access for the | ||
46 | * Micrel's GPIOs, then these can be changed to check their argument | ||
47 | * directly as static inlines. However for now it's probably not | ||
48 | * worthwhile. | ||
49 | */ | ||
50 | #define gpio_get_value __gpio_get_value | ||
51 | #define gpio_set_value __gpio_set_value | ||
52 | #define gpio_to_irq __gpio_to_irq | ||
53 | |||
54 | /* Register the GPIOs */ | ||
55 | extern void ks8695_register_gpios(void); | ||
56 | |||
57 | #endif | 19 | #endif |
diff --git a/arch/arm/mach-ks8695/leds.c b/arch/arm/mach-ks8695/leds.c index 184ef74e4bee..d6f6502ac9b5 100644 --- a/arch/arm/mach-ks8695/leds.c +++ b/arch/arm/mach-ks8695/leds.c | |||
@@ -7,14 +7,14 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/gpio.h> | ||
14 | 15 | ||
15 | #include <asm/leds.h> | 16 | #include <asm/leds.h> |
16 | #include <mach/devices.h> | 17 | #include <mach/devices.h> |
17 | #include <mach/gpio.h> | ||
18 | 18 | ||
19 | 19 | ||
20 | static inline void ks8695_led_on(unsigned int led) | 20 | static inline void ks8695_led_on(unsigned int led) |
diff --git a/arch/arm/mach-l7200/include/mach/debug-macro.S b/arch/arm/mach-l7200/include/mach/debug-macro.S index b0a2db77d392..0b4e760159b9 100644 --- a/arch/arm/mach-l7200/include/mach/debug-macro.S +++ b/arch/arm/mach-l7200/include/mach/debug-macro.S | |||
@@ -14,7 +14,7 @@ | |||
14 | .equ io_virt, IO_BASE | 14 | .equ io_virt, IO_BASE |
15 | .equ io_phys, IO_START | 15 | .equ io_phys, IO_START |
16 | 16 | ||
17 | .macro addruart, rp, rv | 17 | .macro addruart, rp, rv, tmp |
18 | mov \rp, #0x00044000 @ UART1 | 18 | mov \rp, #0x00044000 @ UART1 |
19 | @ mov \rp, #0x00045000 @ UART2 | 19 | @ mov \rp, #0x00045000 @ UART2 |
20 | add \rv, \rp, #io_virt @ virtual address | 20 | add \rv, \rp, #io_virt @ virtual address |
diff --git a/arch/arm/mach-lpc32xx/Makefile b/arch/arm/mach-lpc32xx/Makefile index a5fc5d0eeaeb..f5db805ab958 100644 --- a/arch/arm/mach-lpc32xx/Makefile +++ b/arch/arm/mach-lpc32xx/Makefile | |||
@@ -3,6 +3,6 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := timer.o irq.o common.o serial.o clock.o | 5 | obj-y := timer.o irq.o common.o serial.o clock.o |
6 | obj-y += gpiolib.o pm.o suspend.o | 6 | obj-y += pm.o suspend.o |
7 | obj-y += phy3250.o | 7 | obj-y += phy3250.o |
8 | 8 | ||
diff --git a/arch/arm/mach-lpc32xx/gpiolib.c b/arch/arm/mach-lpc32xx/gpiolib.c deleted file mode 100644 index 69061ea8997a..000000000000 --- a/arch/arm/mach-lpc32xx/gpiolib.c +++ /dev/null | |||
@@ -1,446 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/gpiolib.c | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/errno.h> | ||
23 | #include <linux/gpio.h> | ||
24 | |||
25 | #include <mach/hardware.h> | ||
26 | #include <mach/platform.h> | ||
27 | #include "common.h" | ||
28 | |||
29 | #define LPC32XX_GPIO_P3_INP_STATE _GPREG(0x000) | ||
30 | #define LPC32XX_GPIO_P3_OUTP_SET _GPREG(0x004) | ||
31 | #define LPC32XX_GPIO_P3_OUTP_CLR _GPREG(0x008) | ||
32 | #define LPC32XX_GPIO_P3_OUTP_STATE _GPREG(0x00C) | ||
33 | #define LPC32XX_GPIO_P2_DIR_SET _GPREG(0x010) | ||
34 | #define LPC32XX_GPIO_P2_DIR_CLR _GPREG(0x014) | ||
35 | #define LPC32XX_GPIO_P2_DIR_STATE _GPREG(0x018) | ||
36 | #define LPC32XX_GPIO_P2_INP_STATE _GPREG(0x01C) | ||
37 | #define LPC32XX_GPIO_P2_OUTP_SET _GPREG(0x020) | ||
38 | #define LPC32XX_GPIO_P2_OUTP_CLR _GPREG(0x024) | ||
39 | #define LPC32XX_GPIO_P2_MUX_SET _GPREG(0x028) | ||
40 | #define LPC32XX_GPIO_P2_MUX_CLR _GPREG(0x02C) | ||
41 | #define LPC32XX_GPIO_P2_MUX_STATE _GPREG(0x030) | ||
42 | #define LPC32XX_GPIO_P0_INP_STATE _GPREG(0x040) | ||
43 | #define LPC32XX_GPIO_P0_OUTP_SET _GPREG(0x044) | ||
44 | #define LPC32XX_GPIO_P0_OUTP_CLR _GPREG(0x048) | ||
45 | #define LPC32XX_GPIO_P0_OUTP_STATE _GPREG(0x04C) | ||
46 | #define LPC32XX_GPIO_P0_DIR_SET _GPREG(0x050) | ||
47 | #define LPC32XX_GPIO_P0_DIR_CLR _GPREG(0x054) | ||
48 | #define LPC32XX_GPIO_P0_DIR_STATE _GPREG(0x058) | ||
49 | #define LPC32XX_GPIO_P1_INP_STATE _GPREG(0x060) | ||
50 | #define LPC32XX_GPIO_P1_OUTP_SET _GPREG(0x064) | ||
51 | #define LPC32XX_GPIO_P1_OUTP_CLR _GPREG(0x068) | ||
52 | #define LPC32XX_GPIO_P1_OUTP_STATE _GPREG(0x06C) | ||
53 | #define LPC32XX_GPIO_P1_DIR_SET _GPREG(0x070) | ||
54 | #define LPC32XX_GPIO_P1_DIR_CLR _GPREG(0x074) | ||
55 | #define LPC32XX_GPIO_P1_DIR_STATE _GPREG(0x078) | ||
56 | |||
57 | #define GPIO012_PIN_TO_BIT(x) (1 << (x)) | ||
58 | #define GPIO3_PIN_TO_BIT(x) (1 << ((x) + 25)) | ||
59 | #define GPO3_PIN_TO_BIT(x) (1 << (x)) | ||
60 | #define GPIO012_PIN_IN_SEL(x, y) (((x) >> (y)) & 1) | ||
61 | #define GPIO3_PIN_IN_SHIFT(x) ((x) == 5 ? 24 : 10 + (x)) | ||
62 | #define GPIO3_PIN_IN_SEL(x, y) ((x) >> GPIO3_PIN_IN_SHIFT(y)) | ||
63 | #define GPIO3_PIN5_IN_SEL(x) (((x) >> 24) & 1) | ||
64 | #define GPI3_PIN_IN_SEL(x, y) (((x) >> (y)) & 1) | ||
65 | |||
66 | struct gpio_regs { | ||
67 | void __iomem *inp_state; | ||
68 | void __iomem *outp_set; | ||
69 | void __iomem *outp_clr; | ||
70 | void __iomem *dir_set; | ||
71 | void __iomem *dir_clr; | ||
72 | }; | ||
73 | |||
74 | /* | ||
75 | * GPIO names | ||
76 | */ | ||
77 | static const char *gpio_p0_names[LPC32XX_GPIO_P0_MAX] = { | ||
78 | "p0.0", "p0.1", "p0.2", "p0.3", | ||
79 | "p0.4", "p0.5", "p0.6", "p0.7" | ||
80 | }; | ||
81 | |||
82 | static const char *gpio_p1_names[LPC32XX_GPIO_P1_MAX] = { | ||
83 | "p1.0", "p1.1", "p1.2", "p1.3", | ||
84 | "p1.4", "p1.5", "p1.6", "p1.7", | ||
85 | "p1.8", "p1.9", "p1.10", "p1.11", | ||
86 | "p1.12", "p1.13", "p1.14", "p1.15", | ||
87 | "p1.16", "p1.17", "p1.18", "p1.19", | ||
88 | "p1.20", "p1.21", "p1.22", "p1.23", | ||
89 | }; | ||
90 | |||
91 | static const char *gpio_p2_names[LPC32XX_GPIO_P2_MAX] = { | ||
92 | "p2.0", "p2.1", "p2.2", "p2.3", | ||
93 | "p2.4", "p2.5", "p2.6", "p2.7", | ||
94 | "p2.8", "p2.9", "p2.10", "p2.11", | ||
95 | "p2.12" | ||
96 | }; | ||
97 | |||
98 | static const char *gpio_p3_names[LPC32XX_GPIO_P3_MAX] = { | ||
99 | "gpi000", "gpio01", "gpio02", "gpio03", | ||
100 | "gpio04", "gpio05" | ||
101 | }; | ||
102 | |||
103 | static const char *gpi_p3_names[LPC32XX_GPI_P3_MAX] = { | ||
104 | "gpi00", "gpi01", "gpi02", "gpi03", | ||
105 | "gpi04", "gpi05", "gpi06", "gpi07", | ||
106 | "gpi08", "gpi09", NULL, NULL, | ||
107 | NULL, NULL, NULL, "gpi15", | ||
108 | "gpi16", "gpi17", "gpi18", "gpi19", | ||
109 | "gpi20", "gpi21", "gpi22", "gpi23", | ||
110 | "gpi24", "gpi25", "gpi26", "gpi27" | ||
111 | }; | ||
112 | |||
113 | static const char *gpo_p3_names[LPC32XX_GPO_P3_MAX] = { | ||
114 | "gpo00", "gpo01", "gpo02", "gpo03", | ||
115 | "gpo04", "gpo05", "gpo06", "gpo07", | ||
116 | "gpo08", "gpo09", "gpo10", "gpo11", | ||
117 | "gpo12", "gpo13", "gpo14", "gpo15", | ||
118 | "gpo16", "gpo17", "gpo18", "gpo19", | ||
119 | "gpo20", "gpo21", "gpo22", "gpo23" | ||
120 | }; | ||
121 | |||
122 | static struct gpio_regs gpio_grp_regs_p0 = { | ||
123 | .inp_state = LPC32XX_GPIO_P0_INP_STATE, | ||
124 | .outp_set = LPC32XX_GPIO_P0_OUTP_SET, | ||
125 | .outp_clr = LPC32XX_GPIO_P0_OUTP_CLR, | ||
126 | .dir_set = LPC32XX_GPIO_P0_DIR_SET, | ||
127 | .dir_clr = LPC32XX_GPIO_P0_DIR_CLR, | ||
128 | }; | ||
129 | |||
130 | static struct gpio_regs gpio_grp_regs_p1 = { | ||
131 | .inp_state = LPC32XX_GPIO_P1_INP_STATE, | ||
132 | .outp_set = LPC32XX_GPIO_P1_OUTP_SET, | ||
133 | .outp_clr = LPC32XX_GPIO_P1_OUTP_CLR, | ||
134 | .dir_set = LPC32XX_GPIO_P1_DIR_SET, | ||
135 | .dir_clr = LPC32XX_GPIO_P1_DIR_CLR, | ||
136 | }; | ||
137 | |||
138 | static struct gpio_regs gpio_grp_regs_p2 = { | ||
139 | .inp_state = LPC32XX_GPIO_P2_INP_STATE, | ||
140 | .outp_set = LPC32XX_GPIO_P2_OUTP_SET, | ||
141 | .outp_clr = LPC32XX_GPIO_P2_OUTP_CLR, | ||
142 | .dir_set = LPC32XX_GPIO_P2_DIR_SET, | ||
143 | .dir_clr = LPC32XX_GPIO_P2_DIR_CLR, | ||
144 | }; | ||
145 | |||
146 | static struct gpio_regs gpio_grp_regs_p3 = { | ||
147 | .inp_state = LPC32XX_GPIO_P3_INP_STATE, | ||
148 | .outp_set = LPC32XX_GPIO_P3_OUTP_SET, | ||
149 | .outp_clr = LPC32XX_GPIO_P3_OUTP_CLR, | ||
150 | .dir_set = LPC32XX_GPIO_P2_DIR_SET, | ||
151 | .dir_clr = LPC32XX_GPIO_P2_DIR_CLR, | ||
152 | }; | ||
153 | |||
154 | struct lpc32xx_gpio_chip { | ||
155 | struct gpio_chip chip; | ||
156 | struct gpio_regs *gpio_grp; | ||
157 | }; | ||
158 | |||
159 | static inline struct lpc32xx_gpio_chip *to_lpc32xx_gpio( | ||
160 | struct gpio_chip *gpc) | ||
161 | { | ||
162 | return container_of(gpc, struct lpc32xx_gpio_chip, chip); | ||
163 | } | ||
164 | |||
165 | static void __set_gpio_dir_p012(struct lpc32xx_gpio_chip *group, | ||
166 | unsigned pin, int input) | ||
167 | { | ||
168 | if (input) | ||
169 | __raw_writel(GPIO012_PIN_TO_BIT(pin), | ||
170 | group->gpio_grp->dir_clr); | ||
171 | else | ||
172 | __raw_writel(GPIO012_PIN_TO_BIT(pin), | ||
173 | group->gpio_grp->dir_set); | ||
174 | } | ||
175 | |||
176 | static void __set_gpio_dir_p3(struct lpc32xx_gpio_chip *group, | ||
177 | unsigned pin, int input) | ||
178 | { | ||
179 | u32 u = GPIO3_PIN_TO_BIT(pin); | ||
180 | |||
181 | if (input) | ||
182 | __raw_writel(u, group->gpio_grp->dir_clr); | ||
183 | else | ||
184 | __raw_writel(u, group->gpio_grp->dir_set); | ||
185 | } | ||
186 | |||
187 | static void __set_gpio_level_p012(struct lpc32xx_gpio_chip *group, | ||
188 | unsigned pin, int high) | ||
189 | { | ||
190 | if (high) | ||
191 | __raw_writel(GPIO012_PIN_TO_BIT(pin), | ||
192 | group->gpio_grp->outp_set); | ||
193 | else | ||
194 | __raw_writel(GPIO012_PIN_TO_BIT(pin), | ||
195 | group->gpio_grp->outp_clr); | ||
196 | } | ||
197 | |||
198 | static void __set_gpio_level_p3(struct lpc32xx_gpio_chip *group, | ||
199 | unsigned pin, int high) | ||
200 | { | ||
201 | u32 u = GPIO3_PIN_TO_BIT(pin); | ||
202 | |||
203 | if (high) | ||
204 | __raw_writel(u, group->gpio_grp->outp_set); | ||
205 | else | ||
206 | __raw_writel(u, group->gpio_grp->outp_clr); | ||
207 | } | ||
208 | |||
209 | static void __set_gpo_level_p3(struct lpc32xx_gpio_chip *group, | ||
210 | unsigned pin, int high) | ||
211 | { | ||
212 | if (high) | ||
213 | __raw_writel(GPO3_PIN_TO_BIT(pin), group->gpio_grp->outp_set); | ||
214 | else | ||
215 | __raw_writel(GPO3_PIN_TO_BIT(pin), group->gpio_grp->outp_clr); | ||
216 | } | ||
217 | |||
218 | static int __get_gpio_state_p012(struct lpc32xx_gpio_chip *group, | ||
219 | unsigned pin) | ||
220 | { | ||
221 | return GPIO012_PIN_IN_SEL(__raw_readl(group->gpio_grp->inp_state), | ||
222 | pin); | ||
223 | } | ||
224 | |||
225 | static int __get_gpio_state_p3(struct lpc32xx_gpio_chip *group, | ||
226 | unsigned pin) | ||
227 | { | ||
228 | int state = __raw_readl(group->gpio_grp->inp_state); | ||
229 | |||
230 | /* | ||
231 | * P3 GPIO pin input mapping is not contiguous, GPIOP3-0..4 is mapped | ||
232 | * to bits 10..14, while GPIOP3-5 is mapped to bit 24. | ||
233 | */ | ||
234 | return GPIO3_PIN_IN_SEL(state, pin); | ||
235 | } | ||
236 | |||
237 | static int __get_gpi_state_p3(struct lpc32xx_gpio_chip *group, | ||
238 | unsigned pin) | ||
239 | { | ||
240 | return GPI3_PIN_IN_SEL(__raw_readl(group->gpio_grp->inp_state), pin); | ||
241 | } | ||
242 | |||
243 | /* | ||
244 | * GENERIC_GPIO primitives. | ||
245 | */ | ||
246 | static int lpc32xx_gpio_dir_input_p012(struct gpio_chip *chip, | ||
247 | unsigned pin) | ||
248 | { | ||
249 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
250 | |||
251 | __set_gpio_dir_p012(group, pin, 1); | ||
252 | |||
253 | return 0; | ||
254 | } | ||
255 | |||
256 | static int lpc32xx_gpio_dir_input_p3(struct gpio_chip *chip, | ||
257 | unsigned pin) | ||
258 | { | ||
259 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
260 | |||
261 | __set_gpio_dir_p3(group, pin, 1); | ||
262 | |||
263 | return 0; | ||
264 | } | ||
265 | |||
266 | static int lpc32xx_gpio_dir_in_always(struct gpio_chip *chip, | ||
267 | unsigned pin) | ||
268 | { | ||
269 | return 0; | ||
270 | } | ||
271 | |||
272 | static int lpc32xx_gpio_get_value_p012(struct gpio_chip *chip, unsigned pin) | ||
273 | { | ||
274 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
275 | |||
276 | return __get_gpio_state_p012(group, pin); | ||
277 | } | ||
278 | |||
279 | static int lpc32xx_gpio_get_value_p3(struct gpio_chip *chip, unsigned pin) | ||
280 | { | ||
281 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
282 | |||
283 | return __get_gpio_state_p3(group, pin); | ||
284 | } | ||
285 | |||
286 | static int lpc32xx_gpi_get_value(struct gpio_chip *chip, unsigned pin) | ||
287 | { | ||
288 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
289 | |||
290 | return __get_gpi_state_p3(group, pin); | ||
291 | } | ||
292 | |||
293 | static int lpc32xx_gpio_dir_output_p012(struct gpio_chip *chip, unsigned pin, | ||
294 | int value) | ||
295 | { | ||
296 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
297 | |||
298 | __set_gpio_dir_p012(group, pin, 0); | ||
299 | |||
300 | return 0; | ||
301 | } | ||
302 | |||
303 | static int lpc32xx_gpio_dir_output_p3(struct gpio_chip *chip, unsigned pin, | ||
304 | int value) | ||
305 | { | ||
306 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
307 | |||
308 | __set_gpio_dir_p3(group, pin, 0); | ||
309 | |||
310 | return 0; | ||
311 | } | ||
312 | |||
313 | static int lpc32xx_gpio_dir_out_always(struct gpio_chip *chip, unsigned pin, | ||
314 | int value) | ||
315 | { | ||
316 | return 0; | ||
317 | } | ||
318 | |||
319 | static void lpc32xx_gpio_set_value_p012(struct gpio_chip *chip, unsigned pin, | ||
320 | int value) | ||
321 | { | ||
322 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
323 | |||
324 | __set_gpio_level_p012(group, pin, value); | ||
325 | } | ||
326 | |||
327 | static void lpc32xx_gpio_set_value_p3(struct gpio_chip *chip, unsigned pin, | ||
328 | int value) | ||
329 | { | ||
330 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
331 | |||
332 | __set_gpio_level_p3(group, pin, value); | ||
333 | } | ||
334 | |||
335 | static void lpc32xx_gpo_set_value(struct gpio_chip *chip, unsigned pin, | ||
336 | int value) | ||
337 | { | ||
338 | struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip); | ||
339 | |||
340 | __set_gpo_level_p3(group, pin, value); | ||
341 | } | ||
342 | |||
343 | static int lpc32xx_gpio_request(struct gpio_chip *chip, unsigned pin) | ||
344 | { | ||
345 | if (pin < chip->ngpio) | ||
346 | return 0; | ||
347 | |||
348 | return -EINVAL; | ||
349 | } | ||
350 | |||
351 | static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = { | ||
352 | { | ||
353 | .chip = { | ||
354 | .label = "gpio_p0", | ||
355 | .direction_input = lpc32xx_gpio_dir_input_p012, | ||
356 | .get = lpc32xx_gpio_get_value_p012, | ||
357 | .direction_output = lpc32xx_gpio_dir_output_p012, | ||
358 | .set = lpc32xx_gpio_set_value_p012, | ||
359 | .request = lpc32xx_gpio_request, | ||
360 | .base = LPC32XX_GPIO_P0_GRP, | ||
361 | .ngpio = LPC32XX_GPIO_P0_MAX, | ||
362 | .names = gpio_p0_names, | ||
363 | .can_sleep = 0, | ||
364 | }, | ||
365 | .gpio_grp = &gpio_grp_regs_p0, | ||
366 | }, | ||
367 | { | ||
368 | .chip = { | ||
369 | .label = "gpio_p1", | ||
370 | .direction_input = lpc32xx_gpio_dir_input_p012, | ||
371 | .get = lpc32xx_gpio_get_value_p012, | ||
372 | .direction_output = lpc32xx_gpio_dir_output_p012, | ||
373 | .set = lpc32xx_gpio_set_value_p012, | ||
374 | .request = lpc32xx_gpio_request, | ||
375 | .base = LPC32XX_GPIO_P1_GRP, | ||
376 | .ngpio = LPC32XX_GPIO_P1_MAX, | ||
377 | .names = gpio_p1_names, | ||
378 | .can_sleep = 0, | ||
379 | }, | ||
380 | .gpio_grp = &gpio_grp_regs_p1, | ||
381 | }, | ||
382 | { | ||
383 | .chip = { | ||
384 | .label = "gpio_p2", | ||
385 | .direction_input = lpc32xx_gpio_dir_input_p012, | ||
386 | .get = lpc32xx_gpio_get_value_p012, | ||
387 | .direction_output = lpc32xx_gpio_dir_output_p012, | ||
388 | .set = lpc32xx_gpio_set_value_p012, | ||
389 | .request = lpc32xx_gpio_request, | ||
390 | .base = LPC32XX_GPIO_P2_GRP, | ||
391 | .ngpio = LPC32XX_GPIO_P2_MAX, | ||
392 | .names = gpio_p2_names, | ||
393 | .can_sleep = 0, | ||
394 | }, | ||
395 | .gpio_grp = &gpio_grp_regs_p2, | ||
396 | }, | ||
397 | { | ||
398 | .chip = { | ||
399 | .label = "gpio_p3", | ||
400 | .direction_input = lpc32xx_gpio_dir_input_p3, | ||
401 | .get = lpc32xx_gpio_get_value_p3, | ||
402 | .direction_output = lpc32xx_gpio_dir_output_p3, | ||
403 | .set = lpc32xx_gpio_set_value_p3, | ||
404 | .request = lpc32xx_gpio_request, | ||
405 | .base = LPC32XX_GPIO_P3_GRP, | ||
406 | .ngpio = LPC32XX_GPIO_P3_MAX, | ||
407 | .names = gpio_p3_names, | ||
408 | .can_sleep = 0, | ||
409 | }, | ||
410 | .gpio_grp = &gpio_grp_regs_p3, | ||
411 | }, | ||
412 | { | ||
413 | .chip = { | ||
414 | .label = "gpi_p3", | ||
415 | .direction_input = lpc32xx_gpio_dir_in_always, | ||
416 | .get = lpc32xx_gpi_get_value, | ||
417 | .request = lpc32xx_gpio_request, | ||
418 | .base = LPC32XX_GPI_P3_GRP, | ||
419 | .ngpio = LPC32XX_GPI_P3_MAX, | ||
420 | .names = gpi_p3_names, | ||
421 | .can_sleep = 0, | ||
422 | }, | ||
423 | .gpio_grp = &gpio_grp_regs_p3, | ||
424 | }, | ||
425 | { | ||
426 | .chip = { | ||
427 | .label = "gpo_p3", | ||
428 | .direction_output = lpc32xx_gpio_dir_out_always, | ||
429 | .set = lpc32xx_gpo_set_value, | ||
430 | .request = lpc32xx_gpio_request, | ||
431 | .base = LPC32XX_GPO_P3_GRP, | ||
432 | .ngpio = LPC32XX_GPO_P3_MAX, | ||
433 | .names = gpo_p3_names, | ||
434 | .can_sleep = 0, | ||
435 | }, | ||
436 | .gpio_grp = &gpio_grp_regs_p3, | ||
437 | }, | ||
438 | }; | ||
439 | |||
440 | void __init lpc32xx_gpio_init(void) | ||
441 | { | ||
442 | int i; | ||
443 | |||
444 | for (i = 0; i < ARRAY_SIZE(lpc32xx_gpiochip); i++) | ||
445 | gpiochip_add(&lpc32xx_gpiochip[i].chip); | ||
446 | } | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/debug-macro.S b/arch/arm/mach-lpc32xx/include/mach/debug-macro.S index 629e744aeb9e..351bd6c84909 100644 --- a/arch/arm/mach-lpc32xx/include/mach/debug-macro.S +++ b/arch/arm/mach-lpc32xx/include/mach/debug-macro.S | |||
@@ -20,7 +20,7 @@ | |||
20 | * Debug output is hardcoded to standard UART 5 | 20 | * Debug output is hardcoded to standard UART 5 |
21 | */ | 21 | */ |
22 | 22 | ||
23 | .macro addruart, rp, rv | 23 | .macro addruart, rp, rv, tmp |
24 | ldreq \rp, =0x40090000 | 24 | ldreq \rp, =0x40090000 |
25 | ldrne \rv, =0xF4090000 | 25 | ldrne \rv, =0xF4090000 |
26 | .endm | 26 | .endm |
diff --git a/arch/arm/mach-lpc32xx/include/mach/gpio-lpc32xx.h b/arch/arm/mach-lpc32xx/include/mach/gpio-lpc32xx.h new file mode 100644 index 000000000000..1816e22a3479 --- /dev/null +++ b/arch/arm/mach-lpc32xx/include/mach/gpio-lpc32xx.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
3 | * | ||
4 | * Copyright (C) 2010 NXP Semiconductors | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __MACH_GPIO_LPC32XX_H | ||
18 | #define __MACH_GPIO_LPC32XX_H | ||
19 | |||
20 | /* | ||
21 | * Note! | ||
22 | * Muxed GP pins need to be setup to the GP state in the board level | ||
23 | * code prior to using this driver. | ||
24 | * GPI pins : 28xP3 group | ||
25 | * GPO pins : 24xP3 group | ||
26 | * GPIO pins: 8xP0 group, 24xP1 group, 13xP2 group, 6xP3 group | ||
27 | */ | ||
28 | |||
29 | #define LPC32XX_GPIO_P0_MAX 8 | ||
30 | #define LPC32XX_GPIO_P1_MAX 24 | ||
31 | #define LPC32XX_GPIO_P2_MAX 13 | ||
32 | #define LPC32XX_GPIO_P3_MAX 6 | ||
33 | #define LPC32XX_GPI_P3_MAX 28 | ||
34 | #define LPC32XX_GPO_P3_MAX 24 | ||
35 | |||
36 | #define LPC32XX_GPIO_P0_GRP 0 | ||
37 | #define LPC32XX_GPIO_P1_GRP (LPC32XX_GPIO_P0_GRP + LPC32XX_GPIO_P0_MAX) | ||
38 | #define LPC32XX_GPIO_P2_GRP (LPC32XX_GPIO_P1_GRP + LPC32XX_GPIO_P1_MAX) | ||
39 | #define LPC32XX_GPIO_P3_GRP (LPC32XX_GPIO_P2_GRP + LPC32XX_GPIO_P2_MAX) | ||
40 | #define LPC32XX_GPI_P3_GRP (LPC32XX_GPIO_P3_GRP + LPC32XX_GPIO_P3_MAX) | ||
41 | #define LPC32XX_GPO_P3_GRP (LPC32XX_GPI_P3_GRP + LPC32XX_GPI_P3_MAX) | ||
42 | |||
43 | /* | ||
44 | * A specific GPIO can be selected with this macro | ||
45 | * ie, GPIO_05 can be selected with LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5) | ||
46 | * See the LPC32x0 User's guide for GPIO group numbers | ||
47 | */ | ||
48 | #define LPC32XX_GPIO(x, y) ((x) + (y)) | ||
49 | |||
50 | #endif /* __MACH_GPIO_LPC32XX_H */ | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/gpio.h b/arch/arm/mach-lpc32xx/include/mach/gpio.h index 67d03da1eee9..e69de29bb2d1 100644 --- a/arch/arm/mach-lpc32xx/include/mach/gpio.h +++ b/arch/arm/mach-lpc32xx/include/mach/gpio.h | |||
@@ -1,74 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/gpio.h | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_GPIO_H | ||
20 | #define __ASM_ARCH_GPIO_H | ||
21 | |||
22 | #include <asm-generic/gpio.h> | ||
23 | |||
24 | /* | ||
25 | * Note! | ||
26 | * Muxed GP pins need to be setup to the GP state in the board level | ||
27 | * code prior to using this driver. | ||
28 | * GPI pins : 28xP3 group | ||
29 | * GPO pins : 24xP3 group | ||
30 | * GPIO pins: 8xP0 group, 24xP1 group, 13xP2 group, 6xP3 group | ||
31 | */ | ||
32 | |||
33 | #define LPC32XX_GPIO_P0_MAX 8 | ||
34 | #define LPC32XX_GPIO_P1_MAX 24 | ||
35 | #define LPC32XX_GPIO_P2_MAX 13 | ||
36 | #define LPC32XX_GPIO_P3_MAX 6 | ||
37 | #define LPC32XX_GPI_P3_MAX 28 | ||
38 | #define LPC32XX_GPO_P3_MAX 24 | ||
39 | |||
40 | #define LPC32XX_GPIO_P0_GRP 0 | ||
41 | #define LPC32XX_GPIO_P1_GRP (LPC32XX_GPIO_P0_GRP + LPC32XX_GPIO_P0_MAX) | ||
42 | #define LPC32XX_GPIO_P2_GRP (LPC32XX_GPIO_P1_GRP + LPC32XX_GPIO_P1_MAX) | ||
43 | #define LPC32XX_GPIO_P3_GRP (LPC32XX_GPIO_P2_GRP + LPC32XX_GPIO_P2_MAX) | ||
44 | #define LPC32XX_GPI_P3_GRP (LPC32XX_GPIO_P3_GRP + LPC32XX_GPIO_P3_MAX) | ||
45 | #define LPC32XX_GPO_P3_GRP (LPC32XX_GPI_P3_GRP + LPC32XX_GPI_P3_MAX) | ||
46 | |||
47 | /* | ||
48 | * A specific GPIO can be selected with this macro | ||
49 | * ie, GPIO_05 can be selected with LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5) | ||
50 | * See the LPC32x0 User's guide for GPIO group numbers | ||
51 | */ | ||
52 | #define LPC32XX_GPIO(x, y) ((x) + (y)) | ||
53 | |||
54 | static inline int gpio_get_value(unsigned gpio) | ||
55 | { | ||
56 | return __gpio_get_value(gpio); | ||
57 | } | ||
58 | |||
59 | static inline void gpio_set_value(unsigned gpio, int value) | ||
60 | { | ||
61 | __gpio_set_value(gpio, value); | ||
62 | } | ||
63 | |||
64 | static inline int gpio_cansleep(unsigned gpio) | ||
65 | { | ||
66 | return __gpio_cansleep(gpio); | ||
67 | } | ||
68 | |||
69 | static inline int gpio_to_irq(unsigned gpio) | ||
70 | { | ||
71 | return __gpio_to_irq(gpio); | ||
72 | } | ||
73 | |||
74 | #endif | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/memory.h b/arch/arm/mach-lpc32xx/include/mach/memory.h deleted file mode 100644 index a647dd624afa..000000000000 --- a/arch/arm/mach-lpc32xx/include/mach/memory.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/memory.h | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MEMORY_H | ||
20 | #define __ASM_ARCH_MEMORY_H | ||
21 | |||
22 | /* | ||
23 | * Physical DRAM offset of bank 0 | ||
24 | */ | ||
25 | #define PLAT_PHYS_OFFSET UL(0x80000000) | ||
26 | |||
27 | #endif | ||
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index 9b621e14d16a..6d2f0d1b9373 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
39 | #include <mach/platform.h> | 39 | #include <mach/platform.h> |
40 | #include <mach/gpio-lpc32xx.h> | ||
40 | #include "common.h" | 41 | #include "common.h" |
41 | 42 | ||
42 | /* | 43 | /* |
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index 56ef5f6c8116..323d4c9e9f44 100644 --- a/arch/arm/mach-mmp/Kconfig +++ b/arch/arm/mach-mmp/Kconfig | |||
@@ -77,7 +77,7 @@ config MACH_TETON_BGA | |||
77 | Say 'Y' here if you want to support the Marvell PXA168-based | 77 | Say 'Y' here if you want to support the Marvell PXA168-based |
78 | Teton BGA Development Board. | 78 | Teton BGA Development Board. |
79 | 79 | ||
80 | config MACH_SHEEVAD | 80 | config MACH_GPLUGD |
81 | bool "Marvell's PXA168 GuruPlug Display (gplugD) Board" | 81 | bool "Marvell's PXA168 GuruPlug Display (gplugD) Board" |
82 | select CPU_PXA168 | 82 | select CPU_PXA168 |
83 | help | 83 | help |
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile index b0ac942327aa..8f948f981646 100644 --- a/arch/arm/mach-mmp/Makefile +++ b/arch/arm/mach-mmp/Makefile | |||
@@ -19,4 +19,4 @@ obj-$(CONFIG_MACH_BROWNSTONE) += brownstone.o | |||
19 | obj-$(CONFIG_MACH_FLINT) += flint.o | 19 | obj-$(CONFIG_MACH_FLINT) += flint.o |
20 | obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o | 20 | obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o |
21 | obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o | 21 | obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o |
22 | obj-$(CONFIG_MACH_SHEEVAD) += gplugd.o | 22 | obj-$(CONFIG_MACH_GPLUGD) += gplugd.o |
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 06b5fa853c93..833c3a2784aa 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
9 | * publishhed by the Free Software Foundation. | 9 | * publishhed by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | #include <linux/gpio.h> | |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
@@ -17,13 +17,13 @@ | |||
17 | #include <linux/mtd/partitions.h> | 17 | #include <linux/mtd/partitions.h> |
18 | #include <linux/mtd/nand.h> | 18 | #include <linux/mtd/nand.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/gpio.h> | ||
20 | 21 | ||
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
23 | #include <mach/addr-map.h> | 24 | #include <mach/addr-map.h> |
24 | #include <mach/mfp-pxa168.h> | 25 | #include <mach/mfp-pxa168.h> |
25 | #include <mach/pxa168.h> | 26 | #include <mach/pxa168.h> |
26 | #include <mach/gpio.h> | ||
27 | #include <video/pxa168fb.h> | 27 | #include <video/pxa168fb.h> |
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <plat/pxa27x_keypad.h> | 29 | #include <plat/pxa27x_keypad.h> |
diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c index c79162a50f28..e411252e3d39 100644 --- a/arch/arm/mach-mmp/brownstone.c +++ b/arch/arm/mach-mmp/brownstone.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/gpio.h> | ||
18 | #include <linux/regulator/machine.h> | 17 | #include <linux/regulator/machine.h> |
19 | #include <linux/regulator/max8649.h> | 18 | #include <linux/regulator/max8649.h> |
20 | #include <linux/regulator/fixed.h> | 19 | #include <linux/regulator/fixed.h> |
diff --git a/arch/arm/mach-mmp/clock.h b/arch/arm/mach-mmp/clock.h index 3143e994e672..149b30cd1469 100644 --- a/arch/arm/mach-mmp/clock.h +++ b/arch/arm/mach-mmp/clock.h | |||
@@ -30,7 +30,7 @@ extern struct clkops apmu_clk_ops; | |||
30 | 30 | ||
31 | #define APBC_CLK(_name, _reg, _fnclksel, _rate) \ | 31 | #define APBC_CLK(_name, _reg, _fnclksel, _rate) \ |
32 | struct clk clk_##_name = { \ | 32 | struct clk clk_##_name = { \ |
33 | .clk_rst = (void __iomem *)APBC_##_reg, \ | 33 | .clk_rst = APBC_##_reg, \ |
34 | .fnclksel = _fnclksel, \ | 34 | .fnclksel = _fnclksel, \ |
35 | .rate = _rate, \ | 35 | .rate = _rate, \ |
36 | .ops = &apbc_clk_ops, \ | 36 | .ops = &apbc_clk_ops, \ |
@@ -38,7 +38,7 @@ struct clk clk_##_name = { \ | |||
38 | 38 | ||
39 | #define APBC_CLK_OPS(_name, _reg, _fnclksel, _rate, _ops) \ | 39 | #define APBC_CLK_OPS(_name, _reg, _fnclksel, _rate, _ops) \ |
40 | struct clk clk_##_name = { \ | 40 | struct clk clk_##_name = { \ |
41 | .clk_rst = (void __iomem *)APBC_##_reg, \ | 41 | .clk_rst = APBC_##_reg, \ |
42 | .fnclksel = _fnclksel, \ | 42 | .fnclksel = _fnclksel, \ |
43 | .rate = _rate, \ | 43 | .rate = _rate, \ |
44 | .ops = _ops, \ | 44 | .ops = _ops, \ |
@@ -46,7 +46,7 @@ struct clk clk_##_name = { \ | |||
46 | 46 | ||
47 | #define APMU_CLK(_name, _reg, _eval, _rate) \ | 47 | #define APMU_CLK(_name, _reg, _eval, _rate) \ |
48 | struct clk clk_##_name = { \ | 48 | struct clk clk_##_name = { \ |
49 | .clk_rst = (void __iomem *)APMU_##_reg, \ | 49 | .clk_rst = APMU_##_reg, \ |
50 | .enable_val = _eval, \ | 50 | .enable_val = _eval, \ |
51 | .rate = _rate, \ | 51 | .rate = _rate, \ |
52 | .ops = &apmu_clk_ops, \ | 52 | .ops = &apmu_clk_ops, \ |
@@ -54,7 +54,7 @@ struct clk clk_##_name = { \ | |||
54 | 54 | ||
55 | #define APMU_CLK_OPS(_name, _reg, _eval, _rate, _ops) \ | 55 | #define APMU_CLK_OPS(_name, _reg, _eval, _rate, _ops) \ |
56 | struct clk clk_##_name = { \ | 56 | struct clk clk_##_name = { \ |
57 | .clk_rst = (void __iomem *)APMU_##_reg, \ | 57 | .clk_rst = APMU_##_reg, \ |
58 | .enable_val = _eval, \ | 58 | .enable_val = _eval, \ |
59 | .rate = _rate, \ | 59 | .rate = _rate, \ |
60 | .ops = _ops, \ | 60 | .ops = _ops, \ |
diff --git a/arch/arm/mach-mmp/common.c b/arch/arm/mach-mmp/common.c index 0ec0ca80bb3e..5720674739f0 100644 --- a/arch/arm/mach-mmp/common.c +++ b/arch/arm/mach-mmp/common.c | |||
@@ -27,12 +27,12 @@ EXPORT_SYMBOL(mmp_chip_id); | |||
27 | static struct map_desc standard_io_desc[] __initdata = { | 27 | static struct map_desc standard_io_desc[] __initdata = { |
28 | { | 28 | { |
29 | .pfn = __phys_to_pfn(APB_PHYS_BASE), | 29 | .pfn = __phys_to_pfn(APB_PHYS_BASE), |
30 | .virtual = APB_VIRT_BASE, | 30 | .virtual = (unsigned long)APB_VIRT_BASE, |
31 | .length = APB_PHYS_SIZE, | 31 | .length = APB_PHYS_SIZE, |
32 | .type = MT_DEVICE, | 32 | .type = MT_DEVICE, |
33 | }, { | 33 | }, { |
34 | .pfn = __phys_to_pfn(AXI_PHYS_BASE), | 34 | .pfn = __phys_to_pfn(AXI_PHYS_BASE), |
35 | .virtual = AXI_VIRT_BASE, | 35 | .virtual = (unsigned long)AXI_VIRT_BASE, |
36 | .length = AXI_PHYS_SIZE, | 36 | .length = AXI_PHYS_SIZE, |
37 | .type = MT_DEVICE, | 37 | .type = MT_DEVICE, |
38 | }, | 38 | }, |
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c index 98e25d9aaab6..69156568bc41 100644 --- a/arch/arm/mach-mmp/gplugd.c +++ b/arch/arm/mach-mmp/gplugd.c | |||
@@ -9,11 +9,11 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/gpio.h> | ||
12 | 13 | ||
13 | #include <asm/mach/arch.h> | 14 | #include <asm/mach/arch.h> |
14 | #include <asm/mach-types.h> | 15 | #include <asm/mach-types.h> |
15 | 16 | ||
16 | #include <mach/gpio.h> | ||
17 | #include <mach/pxa168.h> | 17 | #include <mach/pxa168.h> |
18 | #include <mach/mfp-pxa168.h> | 18 | #include <mach/mfp-pxa168.h> |
19 | 19 | ||
@@ -188,7 +188,7 @@ static void __init gplugd_init(void) | |||
188 | pxa168_add_eth(&gplugd_eth_platform_data); | 188 | pxa168_add_eth(&gplugd_eth_platform_data); |
189 | } | 189 | } |
190 | 190 | ||
191 | MACHINE_START(SHEEVAD, "PXA168-based GuruPlug Display (gplugD) Platform") | 191 | MACHINE_START(GPLUGD, "PXA168-based GuruPlug Display (gplugD) Platform") |
192 | .map_io = mmp_map_io, | 192 | .map_io = mmp_map_io, |
193 | .nr_irqs = IRQ_BOARD_START, | 193 | .nr_irqs = IRQ_BOARD_START, |
194 | .init_irq = pxa168_init_irq, | 194 | .init_irq = pxa168_init_irq, |
diff --git a/arch/arm/mach-mmp/include/mach/addr-map.h b/arch/arm/mach-mmp/include/mach/addr-map.h index 3254089a644d..3e404acd6ff4 100644 --- a/arch/arm/mach-mmp/include/mach/addr-map.h +++ b/arch/arm/mach-mmp/include/mach/addr-map.h | |||
@@ -11,6 +11,12 @@ | |||
11 | #ifndef __ASM_MACH_ADDR_MAP_H | 11 | #ifndef __ASM_MACH_ADDR_MAP_H |
12 | #define __ASM_MACH_ADDR_MAP_H | 12 | #define __ASM_MACH_ADDR_MAP_H |
13 | 13 | ||
14 | #ifndef __ASSEMBLER__ | ||
15 | #define IOMEM(x) ((void __iomem *)(x)) | ||
16 | #else | ||
17 | #define IOMEM(x) (x) | ||
18 | #endif | ||
19 | |||
14 | /* APB - Application Subsystem Peripheral Bus | 20 | /* APB - Application Subsystem Peripheral Bus |
15 | * | 21 | * |
16 | * NOTE: the DMA controller registers are actually on the AXI fabric #1 | 22 | * NOTE: the DMA controller registers are actually on the AXI fabric #1 |
@@ -18,11 +24,11 @@ | |||
18 | * peripherals on APB, let's count it into the ABP mapping area. | 24 | * peripherals on APB, let's count it into the ABP mapping area. |
19 | */ | 25 | */ |
20 | #define APB_PHYS_BASE 0xd4000000 | 26 | #define APB_PHYS_BASE 0xd4000000 |
21 | #define APB_VIRT_BASE 0xfe000000 | 27 | #define APB_VIRT_BASE IOMEM(0xfe000000) |
22 | #define APB_PHYS_SIZE 0x00200000 | 28 | #define APB_PHYS_SIZE 0x00200000 |
23 | 29 | ||
24 | #define AXI_PHYS_BASE 0xd4200000 | 30 | #define AXI_PHYS_BASE 0xd4200000 |
25 | #define AXI_VIRT_BASE 0xfe200000 | 31 | #define AXI_VIRT_BASE IOMEM(0xfe200000) |
26 | #define AXI_PHYS_SIZE 0x00200000 | 32 | #define AXI_PHYS_SIZE 0x00200000 |
27 | 33 | ||
28 | /* Static Memory Controller - Chip Select 0 and 1 */ | 34 | /* Static Memory Controller - Chip Select 0 and 1 */ |
diff --git a/arch/arm/mach-mmp/include/mach/debug-macro.S b/arch/arm/mach-mmp/include/mach/debug-macro.S index 7e2ebd3efc7c..b6f14d203c25 100644 --- a/arch/arm/mach-mmp/include/mach/debug-macro.S +++ b/arch/arm/mach-mmp/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <mach/addr-map.h> | 12 | #include <mach/addr-map.h> |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | ldr \rp, =APB_PHYS_BASE @ physical | 15 | ldr \rp, =APB_PHYS_BASE @ physical |
16 | ldr \rv, =APB_VIRT_BASE @ virtual | 16 | ldr \rv, =APB_VIRT_BASE @ virtual |
17 | orr \rp, \rp, #0x00017000 | 17 | orr \rp, \rp, #0x00017000 |
diff --git a/arch/arm/mach-mmp/include/mach/gpio-pxa.h b/arch/arm/mach-mmp/include/mach/gpio-pxa.h new file mode 100644 index 000000000000..d14eeaf16322 --- /dev/null +++ b/arch/arm/mach-mmp/include/mach/gpio-pxa.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef __ASM_MACH_GPIO_PXA_H | ||
2 | #define __ASM_MACH_GPIO_PXA_H | ||
3 | |||
4 | #include <mach/addr-map.h> | ||
5 | #include <mach/irqs.h> | ||
6 | |||
7 | #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000) | ||
8 | |||
9 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | ||
10 | #define GPIO_REG(x) (GPIO_REGS_VIRT + (x)) | ||
11 | |||
12 | #define NR_BUILTIN_GPIO IRQ_GPIO_NUM | ||
13 | |||
14 | #define gpio_to_bank(gpio) ((gpio) >> 5) | ||
15 | |||
16 | /* NOTE: these macros are defined here to make optimization of | ||
17 | * gpio_{get,set}_value() to work when 'gpio' is a constant. | ||
18 | * Usage of these macros otherwise is no longer recommended, | ||
19 | * use generic GPIO API whenever possible. | ||
20 | */ | ||
21 | #define GPIO_bit(gpio) (1 << ((gpio) & 0x1f)) | ||
22 | |||
23 | #define GPLR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x00) | ||
24 | #define GPDR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x0c) | ||
25 | #define GPSR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x18) | ||
26 | #define GPCR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x24) | ||
27 | |||
28 | #include <plat/gpio-pxa.h> | ||
29 | |||
30 | #endif /* __ASM_MACH_GPIO_PXA_H */ | ||
diff --git a/arch/arm/mach-mmp/include/mach/gpio.h b/arch/arm/mach-mmp/include/mach/gpio.h index 7bfb827f3fe3..681262359d1c 100644 --- a/arch/arm/mach-mmp/include/mach/gpio.h +++ b/arch/arm/mach-mmp/include/mach/gpio.h | |||
@@ -1,36 +1,13 @@ | |||
1 | #ifndef __ASM_MACH_GPIO_H | 1 | #ifndef __ASM_MACH_GPIO_H |
2 | #define __ASM_MACH_GPIO_H | 2 | #define __ASM_MACH_GPIO_H |
3 | 3 | ||
4 | #include <mach/addr-map.h> | ||
5 | #include <mach/irqs.h> | ||
6 | #include <asm-generic/gpio.h> | 4 | #include <asm-generic/gpio.h> |
7 | 5 | ||
8 | #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000) | ||
9 | |||
10 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | ||
11 | #define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x)))) | ||
12 | |||
13 | #define NR_BUILTIN_GPIO IRQ_GPIO_NUM | ||
14 | |||
15 | #define gpio_to_bank(gpio) ((gpio) >> 5) | ||
16 | #define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) | 6 | #define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) |
17 | #define irq_to_gpio(irq) ((irq) - IRQ_GPIO_START) | 7 | #define irq_to_gpio(irq) ((irq) - IRQ_GPIO_START) |
18 | 8 | ||
19 | |||
20 | #define __gpio_is_inverted(gpio) (0) | 9 | #define __gpio_is_inverted(gpio) (0) |
21 | #define __gpio_is_occupied(gpio) (0) | 10 | #define __gpio_is_occupied(gpio) (0) |
22 | 11 | ||
23 | /* NOTE: these macros are defined here to make optimization of | ||
24 | * gpio_{get,set}_value() to work when 'gpio' is a constant. | ||
25 | * Usage of these macros otherwise is no longer recommended, | ||
26 | * use generic GPIO API whenever possible. | ||
27 | */ | ||
28 | #define GPIO_bit(gpio) (1 << ((gpio) & 0x1f)) | ||
29 | |||
30 | #define GPLR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x00) | ||
31 | #define GPDR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x0c) | ||
32 | #define GPSR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x18) | ||
33 | #define GPCR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x24) | ||
34 | |||
35 | #include <plat/gpio.h> | 12 | #include <plat/gpio.h> |
36 | #endif /* __ASM_MACH_GPIO_H */ | 13 | #endif /* __ASM_MACH_GPIO_H */ |
diff --git a/arch/arm/mach-mmp/include/mach/memory.h b/arch/arm/mach-mmp/include/mach/memory.h deleted file mode 100644 index d68b50a2d6a0..000000000000 --- a/arch/arm/mach-mmp/include/mach/memory.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/include/mach/memory.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_MACH_MEMORY_H | ||
10 | #define __ASM_MACH_MEMORY_H | ||
11 | |||
12 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
13 | |||
14 | #endif /* __ASM_MACH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-mmp/jasper.c b/arch/arm/mach-mmp/jasper.c index 5d6421d63254..8bfac6612623 100644 --- a/arch/arm/mach-mmp/jasper.c +++ b/arch/arm/mach-mmp/jasper.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/gpio.h> | ||
18 | #include <linux/regulator/machine.h> | 17 | #include <linux/regulator/machine.h> |
19 | #include <linux/regulator/max8649.h> | 18 | #include <linux/regulator/max8649.h> |
20 | #include <linux/mfd/max8925.h> | 19 | #include <linux/mfd/max8925.h> |
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index 079c18861d5c..7a7e8e4dde41 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | |||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
@@ -25,7 +24,7 @@ | |||
25 | #include <mach/irqs.h> | 24 | #include <mach/irqs.h> |
26 | #include <mach/dma.h> | 25 | #include <mach/dma.h> |
27 | #include <mach/mfp.h> | 26 | #include <mach/mfp.h> |
28 | #include <mach/gpio.h> | 27 | #include <mach/gpio-pxa.h> |
29 | #include <mach/devices.h> | 28 | #include <mach/devices.h> |
30 | #include <mach/mmp2.h> | 29 | #include <mach/mmp2.h> |
31 | 30 | ||
@@ -87,7 +86,8 @@ static struct mfp_addr_map mmp2_addr_map[] __initdata = { | |||
87 | 86 | ||
88 | void mmp2_clear_pmic_int(void) | 87 | void mmp2_clear_pmic_int(void) |
89 | { | 88 | { |
90 | unsigned long mfpr_pmic, data; | 89 | void __iomem *mfpr_pmic; |
90 | unsigned long data; | ||
91 | 91 | ||
92 | mfpr_pmic = APB_VIRT_BASE + 0x1e000 + 0x2c4; | 92 | mfpr_pmic = APB_VIRT_BASE + 0x1e000 + 0x2c4; |
93 | data = __raw_readl(mfpr_pmic); | 93 | data = __raw_readl(mfpr_pmic); |
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 0156f535dae7..50c1763911ff 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | |||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
@@ -21,7 +20,7 @@ | |||
21 | #include <mach/regs-apbc.h> | 20 | #include <mach/regs-apbc.h> |
22 | #include <mach/regs-apmu.h> | 21 | #include <mach/regs-apmu.h> |
23 | #include <mach/irqs.h> | 22 | #include <mach/irqs.h> |
24 | #include <mach/gpio.h> | 23 | #include <mach/gpio-pxa.h> |
25 | #include <mach/dma.h> | 24 | #include <mach/dma.h> |
26 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
27 | #include <mach/mfp.h> | 26 | #include <mach/mfp.h> |
diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c index 1464607aa60d..4ebbfbba39fc 100644 --- a/arch/arm/mach-mmp/pxa910.c +++ b/arch/arm/mach-mmp/pxa910.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | |||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
@@ -20,7 +19,7 @@ | |||
20 | #include <mach/regs-apmu.h> | 19 | #include <mach/regs-apmu.h> |
21 | #include <mach/cputype.h> | 20 | #include <mach/cputype.h> |
22 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
23 | #include <mach/gpio.h> | 22 | #include <mach/gpio-pxa.h> |
24 | #include <mach/dma.h> | 23 | #include <mach/dma.h> |
25 | #include <mach/mfp.h> | 24 | #include <mach/mfp.h> |
26 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c index c296b75c4453..eb5be879fd8c 100644 --- a/arch/arm/mach-mmp/tavorevb.c +++ b/arch/arm/mach-mmp/tavorevb.c | |||
@@ -7,18 +7,18 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * publishhed by the Free Software Foundation. | 8 | * publishhed by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/smc91x.h> | 14 | #include <linux/smc91x.h> |
15 | #include <linux/gpio.h> | ||
15 | 16 | ||
16 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
17 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
18 | #include <mach/addr-map.h> | 19 | #include <mach/addr-map.h> |
19 | #include <mach/mfp-pxa910.h> | 20 | #include <mach/mfp-pxa910.h> |
20 | #include <mach/pxa910.h> | 21 | #include <mach/pxa910.h> |
21 | #include <mach/gpio.h> | ||
22 | 22 | ||
23 | #include "common.h" | 23 | #include "common.h" |
24 | 24 | ||
diff --git a/arch/arm/mach-msm/board-msm7x27.c b/arch/arm/mach-msm/board-msm7x27.c index a80765533f13..6d84ee740df4 100644 --- a/arch/arm/mach-msm/board-msm7x27.c +++ b/arch/arm/mach-msm/board-msm7x27.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | #include <linux/gpio.h> | |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
@@ -34,7 +34,6 @@ | |||
34 | 34 | ||
35 | #include <mach/vreg.h> | 35 | #include <mach/vreg.h> |
36 | #include <mach/mpp.h> | 36 | #include <mach/mpp.h> |
37 | #include <mach/gpio.h> | ||
38 | #include <mach/board.h> | 37 | #include <mach/board.h> |
39 | #include <mach/msm_iomap.h> | 38 | #include <mach/msm_iomap.h> |
40 | 39 | ||
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index 5a2ab6855183..71de5062c71e 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
15 | * 02110-1301, USA. | 15 | * 02110-1301, USA. |
16 | */ | 16 | */ |
17 | 17 | #include <linux/gpio.h> | |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
@@ -24,13 +24,13 @@ | |||
24 | #include <linux/smsc911x.h> | 24 | #include <linux/smsc911x.h> |
25 | #include <linux/usb/msm_hsusb.h> | 25 | #include <linux/usb/msm_hsusb.h> |
26 | #include <linux/clkdev.h> | 26 | #include <linux/clkdev.h> |
27 | #include <linux/memblock.h> | ||
27 | 28 | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
30 | #include <asm/memory.h> | 31 | #include <asm/memory.h> |
31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
32 | 33 | ||
33 | #include <mach/gpio.h> | ||
34 | #include <mach/board.h> | 34 | #include <mach/board.h> |
35 | #include <mach/msm_iomap.h> | 35 | #include <mach/msm_iomap.h> |
36 | #include <mach/dma.h> | 36 | #include <mach/dma.h> |
@@ -42,6 +42,21 @@ | |||
42 | 42 | ||
43 | extern struct sys_timer msm_timer; | 43 | extern struct sys_timer msm_timer; |
44 | 44 | ||
45 | static void __init msm7x30_fixup(struct machine_desc *desc, struct tag *tag, | ||
46 | char **cmdline, struct meminfo *mi) | ||
47 | { | ||
48 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
49 | if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) { | ||
50 | tag->u.mem.start = 0; | ||
51 | tag->u.mem.size += SZ_2M; | ||
52 | } | ||
53 | } | ||
54 | |||
55 | static void __init msm7x30_reserve(void) | ||
56 | { | ||
57 | memblock_remove(0x0, SZ_2M); | ||
58 | } | ||
59 | |||
45 | static int hsusb_phy_init_seq[] = { | 60 | static int hsusb_phy_init_seq[] = { |
46 | 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ | 61 | 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ |
47 | 0x02, 0x36, /* Disable CDR Auto Reset feature */ | 62 | 0x02, 0x36, /* Disable CDR Auto Reset feature */ |
@@ -107,6 +122,8 @@ static void __init msm7x30_map_io(void) | |||
107 | 122 | ||
108 | MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") | 123 | MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") |
109 | .atag_offset = 0x100, | 124 | .atag_offset = 0x100, |
125 | .fixup = msm7x30_fixup, | ||
126 | .reserve = msm7x30_reserve, | ||
110 | .map_io = msm7x30_map_io, | 127 | .map_io = msm7x30_map_io, |
111 | .init_irq = msm7x30_init_irq, | 128 | .init_irq = msm7x30_init_irq, |
112 | .init_machine = msm7x30_init, | 129 | .init_machine = msm7x30_init, |
@@ -115,6 +132,8 @@ MACHINE_END | |||
115 | 132 | ||
116 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") | 133 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") |
117 | .atag_offset = 0x100, | 134 | .atag_offset = 0x100, |
135 | .fixup = msm7x30_fixup, | ||
136 | .reserve = msm7x30_reserve, | ||
118 | .map_io = msm7x30_map_io, | 137 | .map_io = msm7x30_map_io, |
119 | .init_irq = msm7x30_init_irq, | 138 | .init_irq = msm7x30_init_irq, |
120 | .init_machine = msm7x30_init, | 139 | .init_machine = msm7x30_init, |
@@ -123,6 +142,8 @@ MACHINE_END | |||
123 | 142 | ||
124 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") | 143 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") |
125 | .atag_offset = 0x100, | 144 | .atag_offset = 0x100, |
145 | .fixup = msm7x30_fixup, | ||
146 | .reserve = msm7x30_reserve, | ||
126 | .map_io = msm7x30_map_io, | 147 | .map_io = msm7x30_map_io, |
127 | .init_irq = msm7x30_init_irq, | 148 | .init_irq = msm7x30_init_irq, |
128 | .init_machine = msm7x30_init, | 149 | .init_machine = msm7x30_init, |
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c index 35c7ceeb3f29..b04468e7d00e 100644 --- a/arch/arm/mach-msm/board-msm8960.c +++ b/arch/arm/mach-msm/board-msm8960.c | |||
@@ -20,16 +20,34 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/clkdev.h> | 22 | #include <linux/clkdev.h> |
23 | #include <linux/memblock.h> | ||
23 | 24 | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/hardware/gic.h> | 27 | #include <asm/hardware/gic.h> |
28 | #include <asm/setup.h> | ||
27 | 29 | ||
28 | #include <mach/board.h> | 30 | #include <mach/board.h> |
29 | #include <mach/msm_iomap.h> | 31 | #include <mach/msm_iomap.h> |
30 | 32 | ||
31 | #include "devices.h" | 33 | #include "devices.h" |
32 | 34 | ||
35 | static void __init msm8960_fixup(struct machine_desc *desc, struct tag *tag, | ||
36 | char **cmdline, struct meminfo *mi) | ||
37 | { | ||
38 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
39 | if (tag->hdr.tag == ATAG_MEM && | ||
40 | tag->u.mem.start == 0x40200000) { | ||
41 | tag->u.mem.start = 0x40000000; | ||
42 | tag->u.mem.size += SZ_2M; | ||
43 | } | ||
44 | } | ||
45 | |||
46 | static void __init msm8960_reserve(void) | ||
47 | { | ||
48 | memblock_remove(0x40000000, SZ_2M); | ||
49 | } | ||
50 | |||
33 | static void __init msm8960_map_io(void) | 51 | static void __init msm8960_map_io(void) |
34 | { | 52 | { |
35 | msm_map_msm8960_io(); | 53 | msm_map_msm8960_io(); |
@@ -76,6 +94,8 @@ static void __init msm8960_rumi3_init(void) | |||
76 | } | 94 | } |
77 | 95 | ||
78 | MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") | 96 | MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") |
97 | .fixup = msm8960_fixup, | ||
98 | .reserve = msm8960_reserve, | ||
79 | .map_io = msm8960_map_io, | 99 | .map_io = msm8960_map_io, |
80 | .init_irq = msm8960_init_irq, | 100 | .init_irq = msm8960_init_irq, |
81 | .timer = &msm_timer, | 101 | .timer = &msm_timer, |
@@ -83,6 +103,8 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") | |||
83 | MACHINE_END | 103 | MACHINE_END |
84 | 104 | ||
85 | MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") | 105 | MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") |
106 | .fixup = msm8960_fixup, | ||
107 | .reserve = msm8960_reserve, | ||
86 | .map_io = msm8960_map_io, | 108 | .map_io = msm8960_map_io, |
87 | .init_irq = msm8960_init_irq, | 109 | .init_irq = msm8960_init_irq, |
88 | .timer = &msm_timer, | 110 | .timer = &msm_timer, |
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index 1163b6fd05d2..9221f54778be 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c | |||
@@ -20,14 +20,31 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/memblock.h> | ||
23 | 24 | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/hardware/gic.h> | 27 | #include <asm/hardware/gic.h> |
28 | #include <asm/setup.h> | ||
27 | 29 | ||
28 | #include <mach/board.h> | 30 | #include <mach/board.h> |
29 | #include <mach/msm_iomap.h> | 31 | #include <mach/msm_iomap.h> |
30 | 32 | ||
33 | static void __init msm8x60_fixup(struct machine_desc *desc, struct tag *tag, | ||
34 | char **cmdline, struct meminfo *mi) | ||
35 | { | ||
36 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
37 | if (tag->hdr.tag == ATAG_MEM && | ||
38 | tag->u.mem.start == 0x40200000) { | ||
39 | tag->u.mem.start = 0x40000000; | ||
40 | tag->u.mem.size += SZ_2M; | ||
41 | } | ||
42 | } | ||
43 | |||
44 | static void __init msm8x60_reserve(void) | ||
45 | { | ||
46 | memblock_remove(0x40000000, SZ_2M); | ||
47 | } | ||
31 | 48 | ||
32 | static void __init msm8x60_map_io(void) | 49 | static void __init msm8x60_map_io(void) |
33 | { | 50 | { |
@@ -65,6 +82,8 @@ static void __init msm8x60_init(void) | |||
65 | } | 82 | } |
66 | 83 | ||
67 | MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") | 84 | MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") |
85 | .fixup = msm8x60_fixup, | ||
86 | .reserve = msm8x60_reserve, | ||
68 | .map_io = msm8x60_map_io, | 87 | .map_io = msm8x60_map_io, |
69 | .init_irq = msm8x60_init_irq, | 88 | .init_irq = msm8x60_init_irq, |
70 | .init_machine = msm8x60_init, | 89 | .init_machine = msm8x60_init, |
@@ -72,6 +91,8 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") | |||
72 | MACHINE_END | 91 | MACHINE_END |
73 | 92 | ||
74 | MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") | 93 | MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") |
94 | .fixup = msm8x60_fixup, | ||
95 | .reserve = msm8x60_reserve, | ||
75 | .map_io = msm8x60_map_io, | 96 | .map_io = msm8x60_map_io, |
76 | .init_irq = msm8x60_init_irq, | 97 | .init_irq = msm8x60_init_irq, |
77 | .init_machine = msm8x60_init, | 98 | .init_machine = msm8x60_init, |
@@ -79,6 +100,8 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") | |||
79 | MACHINE_END | 100 | MACHINE_END |
80 | 101 | ||
81 | MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") | 102 | MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") |
103 | .fixup = msm8x60_fixup, | ||
104 | .reserve = msm8x60_reserve, | ||
82 | .map_io = msm8x60_map_io, | 105 | .map_io = msm8x60_map_io, |
83 | .init_irq = msm8x60_init_irq, | 106 | .init_irq = msm8x60_init_irq, |
84 | .init_machine = msm8x60_init, | 107 | .init_machine = msm8x60_init, |
@@ -86,6 +109,8 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") | |||
86 | MACHINE_END | 109 | MACHINE_END |
87 | 110 | ||
88 | MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") | 111 | MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") |
112 | .fixup = msm8x60_fixup, | ||
113 | .reserve = msm8x60_reserve, | ||
89 | .map_io = msm8x60_map_io, | 114 | .map_io = msm8x60_map_io, |
90 | .init_irq = msm8x60_init_irq, | 115 | .init_irq = msm8x60_init_irq, |
91 | .init_machine = msm8x60_init, | 116 | .init_machine = msm8x60_init, |
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 51109b1f4342..7e8909c978c3 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
15 | * 02110-1301, USA. | 15 | * 02110-1301, USA. |
16 | */ | 16 | */ |
17 | 17 | #include <linux/gpio.h> | |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
@@ -32,7 +32,6 @@ | |||
32 | #include <mach/board.h> | 32 | #include <mach/board.h> |
33 | #include <mach/irqs.h> | 33 | #include <mach/irqs.h> |
34 | #include <mach/sirc.h> | 34 | #include <mach/sirc.h> |
35 | #include <mach/gpio.h> | ||
36 | #include <mach/vreg.h> | 35 | #include <mach/vreg.h> |
37 | #include <mach/mmc.h> | 36 | #include <mach/mmc.h> |
38 | 37 | ||
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c index dc0bcb5a6b9a..afa9293d5800 100644 --- a/arch/arm/mach-msm/board-sapphire.c +++ b/arch/arm/mach-msm/board-sapphire.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | */ | 13 | */ |
14 | 14 | #include <linux/gpio.h> | |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | 24 | ||
25 | #include <asm/gpio.h> | ||
26 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
27 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-msm/board-trout-mmc.c b/arch/arm/mach-msm/board-trout-mmc.c index f7a9724788b0..8650342b7493 100644 --- a/arch/arm/mach-msm/board-trout-mmc.c +++ b/arch/arm/mach-msm/board-trout-mmc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* linux/arch/arm/mach-msm/board-trout-mmc.c | 1 | /* linux/arch/arm/mach-msm/board-trout-mmc.c |
2 | ** Author: Brian Swetland <swetland@google.com> | 2 | ** Author: Brian Swetland <swetland@google.com> |
3 | */ | 3 | */ |
4 | 4 | #include <linux/gpio.h> | |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
12 | #include <linux/debugfs.h> | 12 | #include <linux/debugfs.h> |
13 | 13 | ||
14 | #include <asm/gpio.h> | ||
15 | #include <asm/io.h> | 14 | #include <asm/io.h> |
16 | 15 | ||
17 | #include <mach/vreg.h> | 16 | #include <mach/vreg.h> |
diff --git a/arch/arm/mach-msm/board-trout-panel.c b/arch/arm/mach-msm/board-trout-panel.c index 729bb49a44ca..25105c1027fe 100644 --- a/arch/arm/mach-msm/board-trout-panel.c +++ b/arch/arm/mach-msm/board-trout-panel.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* linux/arch/arm/mach-msm/board-trout-mddi.c | 1 | /* linux/arch/arm/mach-msm/board-trout-mddi.c |
2 | ** Author: Brian Swetland <swetland@google.com> | 2 | ** Author: Brian Swetland <swetland@google.com> |
3 | */ | 3 | */ |
4 | 4 | #include <linux/gpio.h> | |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
12 | 12 | ||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/gpio.h> | ||
15 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
16 | 15 | ||
17 | #include <mach/msm_fb.h> | 16 | #include <mach/msm_fb.h> |
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/mach-msm/include/mach/debug-macro.S index 646b99ebc773..2dc73ccddb11 100644 --- a/arch/arm/mach-msm/include/mach/debug-macro.S +++ b/arch/arm/mach-msm/include/mach/debug-macro.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <mach/msm_iomap.h> | 20 | #include <mach/msm_iomap.h> |
21 | 21 | ||
22 | #if defined(CONFIG_HAS_MSM_DEBUG_UART_PHYS) && !defined(CONFIG_MSM_DEBUG_UART_NONE) | 22 | #if defined(CONFIG_HAS_MSM_DEBUG_UART_PHYS) && !defined(CONFIG_MSM_DEBUG_UART_NONE) |
23 | .macro addruart, rp, rv | 23 | .macro addruart, rp, rv, tmp |
24 | ldr \rp, =MSM_DEBUG_UART_PHYS | 24 | ldr \rp, =MSM_DEBUG_UART_PHYS |
25 | ldr \rv, =MSM_DEBUG_UART_BASE | 25 | ldr \rv, =MSM_DEBUG_UART_BASE |
26 | .endm | 26 | .endm |
@@ -37,7 +37,7 @@ | |||
37 | beq 1001b | 37 | beq 1001b |
38 | .endm | 38 | .endm |
39 | #else | 39 | #else |
40 | .macro addruart, rp, rv | 40 | .macro addruart, rp, rv, tmp |
41 | mov \rv, #0xff000000 | 41 | mov \rv, #0xff000000 |
42 | orr \rv, \rv, #0x00f00000 | 42 | orr \rv, \rv, #0x00f00000 |
43 | .endm | 43 | .endm |
diff --git a/arch/arm/mach-msm/include/mach/gpio.h b/arch/arm/mach-msm/include/mach/gpio.h index 36ad50d3bfaa..40a8c178f10d 100644 --- a/arch/arm/mach-msm/include/mach/gpio.h +++ b/arch/arm/mach-msm/include/mach/gpio.h | |||
@@ -1,26 +1 @@ | |||
1 | /* | /* empty */ | |
2 | * Copyright (C) 2007 Google, Inc. | ||
3 | * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved. | ||
4 | * Author: Mike Lockwood <lockwood@android.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | #ifndef __ASM_ARCH_MSM_GPIO_H | ||
17 | #define __ASM_ARCH_MSM_GPIO_H | ||
18 | |||
19 | #include <asm-generic/gpio.h> | ||
20 | |||
21 | #define gpio_get_value __gpio_get_value | ||
22 | #define gpio_set_value __gpio_set_value | ||
23 | #define gpio_cansleep __gpio_cansleep | ||
24 | #define gpio_to_irq __gpio_to_irq | ||
25 | |||
26 | #endif /* __ASM_ARCH_MSM_GPIO_H */ | ||
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h deleted file mode 100644 index f2f8d299ba95..000000000000 --- a/arch/arm/mach-msm/include/mach/memory.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* arch/arm/mach-msm/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MEMORY_H | ||
17 | #define __ASM_ARCH_MEMORY_H | ||
18 | |||
19 | /* physical offset of RAM */ | ||
20 | #if defined(CONFIG_ARCH_QSD8X50) && defined(CONFIG_MSM_SOC_REV_A) | ||
21 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
22 | #elif defined(CONFIG_ARCH_QSD8X50) | ||
23 | #define PLAT_PHYS_OFFSET UL(0x20000000) | ||
24 | #elif defined(CONFIG_ARCH_MSM7X30) | ||
25 | #define PLAT_PHYS_OFFSET UL(0x00200000) | ||
26 | #elif defined(CONFIG_ARCH_MSM8X60) | ||
27 | #define PLAT_PHYS_OFFSET UL(0x40200000) | ||
28 | #elif defined(CONFIG_ARCH_MSM8960) | ||
29 | #define PLAT_PHYS_OFFSET UL(0x40200000) | ||
30 | #else | ||
31 | #define PLAT_PHYS_OFFSET UL(0x10000000) | ||
32 | #endif | ||
33 | |||
34 | #endif | ||
35 | |||
diff --git a/arch/arm/mach-mv78xx0/include/mach/debug-macro.S b/arch/arm/mach-mv78xx0/include/mach/debug-macro.S index 04891428e48b..a7df02b049b7 100644 --- a/arch/arm/mach-mv78xx0/include/mach/debug-macro.S +++ b/arch/arm/mach-mv78xx0/include/mach/debug-macro.S | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #include <mach/mv78xx0.h> | 9 | #include <mach/mv78xx0.h> |
10 | 10 | ||
11 | .macro addruart, rp, rv | 11 | .macro addruart, rp, rv, tmp |
12 | ldr \rp, =MV78XX0_REGS_PHYS_BASE | 12 | ldr \rp, =MV78XX0_REGS_PHYS_BASE |
13 | ldr \rv, =MV78XX0_REGS_VIRT_BASE | 13 | ldr \rv, =MV78XX0_REGS_VIRT_BASE |
14 | orr \rp, \rp, #0x00012000 | 14 | orr \rp, \rp, #0x00012000 |
diff --git a/arch/arm/mach-mv78xx0/include/mach/memory.h b/arch/arm/mach-mv78xx0/include/mach/memory.h deleted file mode 100644 index a648c51f2e42..000000000000 --- a/arch/arm/mach-mv78xx0/include/mach/memory.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mv78xx0/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
9 | |||
10 | #endif | ||
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c index 3e24431bb5ea..e421b701663b 100644 --- a/arch/arm/mach-mv78xx0/irq.c +++ b/arch/arm/mach-mv78xx0/irq.c | |||
@@ -7,12 +7,11 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <asm/gpio.h> | ||
16 | #include <mach/bridge-regs.h> | 15 | #include <mach/bridge-regs.h> |
17 | #include <plat/irq.h> | 16 | #include <plat/irq.h> |
18 | #include "common.h" | 17 | #include "common.h" |
diff --git a/arch/arm/mach-mv78xx0/mpp.c b/arch/arm/mach-mv78xx0/mpp.c index 59b7686b9209..cf4e494d44bf 100644 --- a/arch/arm/mach-mv78xx0/mpp.c +++ b/arch/arm/mach-mv78xx0/mpp.c | |||
@@ -7,13 +7,12 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mbus.h> | 13 | #include <linux/mbus.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <plat/mpp.h> | 15 | #include <plat/mpp.h> |
16 | #include <asm/gpio.h> | ||
17 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
18 | #include "common.h" | 17 | #include "common.h" |
19 | #include "mpp.h" | 18 | #include "mpp.h" |
diff --git a/arch/arm/mach-mx5/pm-imx5.c b/arch/arm/mach-mx5/pm-imx5.c index 0624fb8edffb..98052fc852c7 100644 --- a/arch/arm/mach-mx5/pm-imx5.c +++ b/arch/arm/mach-mx5/pm-imx5.c | |||
@@ -20,9 +20,13 @@ | |||
20 | 20 | ||
21 | static struct clk *gpc_dvfs_clk; | 21 | static struct clk *gpc_dvfs_clk; |
22 | 22 | ||
23 | static int mx5_suspend_prepare(void) | ||
24 | { | ||
25 | return clk_enable(gpc_dvfs_clk); | ||
26 | } | ||
27 | |||
23 | static int mx5_suspend_enter(suspend_state_t state) | 28 | static int mx5_suspend_enter(suspend_state_t state) |
24 | { | 29 | { |
25 | clk_enable(gpc_dvfs_clk); | ||
26 | switch (state) { | 30 | switch (state) { |
27 | case PM_SUSPEND_MEM: | 31 | case PM_SUSPEND_MEM: |
28 | mx5_cpu_lp_set(STOP_POWER_OFF); | 32 | mx5_cpu_lp_set(STOP_POWER_OFF); |
@@ -43,11 +47,14 @@ static int mx5_suspend_enter(suspend_state_t state) | |||
43 | __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR); | 47 | __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR); |
44 | } | 48 | } |
45 | cpu_do_idle(); | 49 | cpu_do_idle(); |
46 | clk_disable(gpc_dvfs_clk); | ||
47 | |||
48 | return 0; | 50 | return 0; |
49 | } | 51 | } |
50 | 52 | ||
53 | static void mx5_suspend_finish(void) | ||
54 | { | ||
55 | clk_disable(gpc_dvfs_clk); | ||
56 | } | ||
57 | |||
51 | static int mx5_pm_valid(suspend_state_t state) | 58 | static int mx5_pm_valid(suspend_state_t state) |
52 | { | 59 | { |
53 | return (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX); | 60 | return (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX); |
@@ -55,7 +62,9 @@ static int mx5_pm_valid(suspend_state_t state) | |||
55 | 62 | ||
56 | static const struct platform_suspend_ops mx5_suspend_ops = { | 63 | static const struct platform_suspend_ops mx5_suspend_ops = { |
57 | .valid = mx5_pm_valid, | 64 | .valid = mx5_pm_valid, |
65 | .prepare = mx5_suspend_prepare, | ||
58 | .enter = mx5_suspend_enter, | 66 | .enter = mx5_suspend_enter, |
67 | .finish = mx5_suspend_finish, | ||
59 | }; | 68 | }; |
60 | 69 | ||
61 | static int __init mx5_pm_init(void) | 70 | static int __init mx5_pm_init(void) |
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index 5dcc59d5b9ec..ba532279d1a1 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c | |||
@@ -349,7 +349,7 @@ static int name##_set_rate(struct clk *clk, unsigned long rate) \ | |||
349 | \ | 349 | \ |
350 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_##fr); \ | 350 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_##fr); \ |
351 | reg &= ~BM_CLKCTRL_##fr##_##fs##FRAC; \ | 351 | reg &= ~BM_CLKCTRL_##fr##_##fs##FRAC; \ |
352 | reg |= frac; \ | 352 | reg |= frac << BP_CLKCTRL_##fr##_##fs##FRAC; \ |
353 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_##fr); \ | 353 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_##fr); \ |
354 | } \ | 354 | } \ |
355 | \ | 355 | \ |
diff --git a/arch/arm/mach-mxs/include/mach/debug-macro.S b/arch/arm/mach-mxs/include/mach/debug-macro.S index 79650a1ad78d..714570d83668 100644 --- a/arch/arm/mach-mxs/include/mach/debug-macro.S +++ b/arch/arm/mach-mxs/include/mach/debug-macro.S | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #define UART_VADDR MXS_IO_ADDRESS(UART_PADDR) | 31 | #define UART_VADDR MXS_IO_ADDRESS(UART_PADDR) |
32 | 32 | ||
33 | .macro addruart, rp, rv | 33 | .macro addruart, rp, rv, tmp |
34 | ldr \rp, =UART_PADDR @ physical | 34 | ldr \rp, =UART_PADDR @ physical |
35 | ldr \rv, =UART_VADDR @ virtual | 35 | ldr \rv, =UART_VADDR @ virtual |
36 | .endm | 36 | .endm |
diff --git a/arch/arm/mach-mxs/include/mach/gpio.h b/arch/arm/mach-mxs/include/mach/gpio.h index 56025aa0a639..40a8c178f10d 100644 --- a/arch/arm/mach-mxs/include/mach/gpio.h +++ b/arch/arm/mach-mxs/include/mach/gpio.h | |||
@@ -1,31 +1 @@ | |||
1 | /* | /* empty */ | |
2 | * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __MACH_MXS_GPIO_H__ | ||
21 | #define __MACH_MXS_GPIO_H__ | ||
22 | |||
23 | #include <asm-generic/gpio.h> | ||
24 | |||
25 | /* use gpiolib dispatchers */ | ||
26 | #define gpio_get_value __gpio_get_value | ||
27 | #define gpio_set_value __gpio_set_value | ||
28 | #define gpio_cansleep __gpio_cansleep | ||
29 | #define gpio_to_irq __gpio_to_irq | ||
30 | |||
31 | #endif /* __MACH_MXS_GPIO_H__ */ | ||
diff --git a/arch/arm/mach-mxs/include/mach/memory.h b/arch/arm/mach-mxs/include/mach/memory.h deleted file mode 100644 index b5420a5c2d4b..000000000000 --- a/arch/arm/mach-mxs/include/mach/memory.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __MACH_MXS_MEMORY_H__ | ||
20 | #define __MACH_MXS_MEMORY_H__ | ||
21 | |||
22 | #define PHYS_OFFSET UL(0x40000000) | ||
23 | |||
24 | #endif /* __MACH_MXS_MEMORY_H__ */ | ||
diff --git a/arch/arm/mach-netx/include/mach/debug-macro.S b/arch/arm/mach-netx/include/mach/debug-macro.S index 56a915228180..247781e096e2 100644 --- a/arch/arm/mach-netx/include/mach/debug-macro.S +++ b/arch/arm/mach-netx/include/mach/debug-macro.S | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include "hardware.h" | 14 | #include "hardware.h" |
15 | 15 | ||
16 | .macro addruart, rp, rv | 16 | .macro addruart, rp, rv, tmp |
17 | mov \rp, #0x00000a00 | 17 | mov \rp, #0x00000a00 |
18 | orr \rv, \rp, #io_p2v(0x00100000) @ virtual | 18 | orr \rv, \rp, #io_p2v(0x00100000) @ virtual |
19 | orr \rp, \rp, #0x00100000 @ physical | 19 | orr \rp, \rp, #0x00100000 @ physical |
diff --git a/arch/arm/mach-netx/include/mach/memory.h b/arch/arm/mach-netx/include/mach/memory.h deleted file mode 100644 index 59561496c36e..000000000000 --- a/arch/arm/mach-netx/include/mach/memory.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | #define PLAT_PHYS_OFFSET UL(0x80000000) | ||
24 | |||
25 | #endif | ||
26 | |||
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index 398a75f62bee..0cbb74c96ef7 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
28 | #include <asm/mach/flash.h> | 28 | #include <asm/mach/flash.h> |
29 | 29 | ||
30 | #include <plat/gpio-nomadik.h> | ||
30 | #include <plat/mtu.h> | 31 | #include <plat/mtu.h> |
31 | 32 | ||
32 | #include <mach/setup.h> | 33 | #include <mach/setup.h> |
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index ac58e3b03b1a..dc67717db6f0 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
@@ -21,8 +21,8 @@ | |||
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/amba/bus.h> | 22 | #include <linux/amba/bus.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/gpio.h> | ||
25 | 24 | ||
25 | #include <plat/gpio-nomadik.h> | ||
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-nomadik/i2c-8815nhk.c b/arch/arm/mach-nomadik/i2c-8815nhk.c index abfe25a08d6b..0fc2f6f1cc97 100644 --- a/arch/arm/mach-nomadik/i2c-8815nhk.c +++ b/arch/arm/mach-nomadik/i2c-8815nhk.c | |||
@@ -3,8 +3,8 @@ | |||
3 | #include <linux/i2c.h> | 3 | #include <linux/i2c.h> |
4 | #include <linux/i2c-algo-bit.h> | 4 | #include <linux/i2c-algo-bit.h> |
5 | #include <linux/i2c-gpio.h> | 5 | #include <linux/i2c-gpio.h> |
6 | #include <linux/gpio.h> | ||
7 | #include <linux/platform_device.h> | 6 | #include <linux/platform_device.h> |
7 | #include <plat/gpio-nomadik.h> | ||
8 | 8 | ||
9 | /* | 9 | /* |
10 | * There are two busses in the 8815NHK. | 10 | * There are two busses in the 8815NHK. |
diff --git a/arch/arm/mach-nomadik/include/mach/debug-macro.S b/arch/arm/mach-nomadik/include/mach/debug-macro.S index e7151b4b8889..735417922ce2 100644 --- a/arch/arm/mach-nomadik/include/mach/debug-macro.S +++ b/arch/arm/mach-nomadik/include/mach/debug-macro.S | |||
@@ -10,7 +10,7 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | .macro addruart, rp, rv | 13 | .macro addruart, rp, rv, tmp |
14 | mov \rp, #0x00100000 | 14 | mov \rp, #0x00100000 |
15 | add \rp, \rp, #0x000fb000 | 15 | add \rp, \rp, #0x000fb000 |
16 | add \rv, \rp, #0xf0000000 @ virtual base | 16 | add \rv, \rp, #0xf0000000 @ virtual base |
diff --git a/arch/arm/mach-nomadik/include/mach/gpio.h b/arch/arm/mach-nomadik/include/mach/gpio.h index 7a81a0420343..efdde0ae0a4f 100644 --- a/arch/arm/mach-nomadik/include/mach/gpio.h +++ b/arch/arm/mach-nomadik/include/mach/gpio.h | |||
@@ -1,6 +1,4 @@ | |||
1 | #ifndef __ASM_ARCH_GPIO_H | 1 | #ifndef __ASM_ARCH_GPIO_H |
2 | #define __ASM_ARCH_GPIO_H | 2 | #define __ASM_ARCH_GPIO_H |
3 | 3 | ||
4 | #include <plat/gpio.h> | ||
5 | |||
6 | #endif /* __ASM_ARCH_GPIO_H */ | 4 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-nomadik/include/mach/memory.h b/arch/arm/mach-nomadik/include/mach/memory.h deleted file mode 100644 index d3325211ba6a..000000000000 --- a/arch/arm/mach-nomadik/include/mach/memory.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * mach-nomadik/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | /* | ||
24 | * Physical DRAM offset. | ||
25 | */ | ||
26 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-nuc93x/include/mach/memory.h b/arch/arm/mach-nuc93x/include/mach/memory.h deleted file mode 100644 index ef9864b002a6..000000000000 --- a/arch/arm/mach-nuc93x/include/mach/memory.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-nuc93x/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MEMORY_H | ||
17 | #define __ASM_ARCH_MEMORY_H | ||
18 | |||
19 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
20 | |||
21 | #endif | ||
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index eb36b25450a0..4ea60e2038ea 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | #include <linux/gpio.h> | |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/input.h> | 17 | #include <linux/input.h> |
@@ -30,7 +30,6 @@ | |||
30 | 30 | ||
31 | #include <plat/io.h> | 31 | #include <plat/io.h> |
32 | #include <plat/board-ams-delta.h> | 32 | #include <plat/board-ams-delta.h> |
33 | #include <mach/gpio.h> | ||
34 | #include <plat/keypad.h> | 33 | #include <plat/keypad.h> |
35 | #include <plat/mux.h> | 34 | #include <plat/mux.h> |
36 | #include <plat/usb.h> | 35 | #include <plat/usb.h> |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 999789c4811d..31e089b6f03f 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | #include <linux/gpio.h> | |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | 29 | ||
30 | #include <plat/tc.h> | 30 | #include <plat/tc.h> |
31 | #include <mach/gpio.h> | ||
32 | #include <plat/mux.h> | 31 | #include <plat/mux.h> |
33 | #include <plat/flash.h> | 32 | #include <plat/flash.h> |
34 | #include <plat/fpga.h> | 33 | #include <plat/fpga.h> |
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index 23cc9e4ad50d..05c6e9d858f3 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | 15 | #include <linux/gpio.h> | |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
@@ -22,7 +22,6 @@ | |||
22 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
23 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
24 | 24 | ||
25 | #include <mach/gpio.h> | ||
26 | #include <plat/mux.h> | 25 | #include <plat/mux.h> |
27 | #include <plat/usb.h> | 26 | #include <plat/usb.h> |
28 | #include <plat/board.h> | 27 | #include <plat/board.h> |
diff --git a/arch/arm/mach-omap1/board-h2-mmc.c b/arch/arm/mach-omap1/board-h2-mmc.c index f2fc43d8382b..da0e37d40823 100644 --- a/arch/arm/mach-omap1/board-h2-mmc.c +++ b/arch/arm/mach-omap1/board-h2-mmc.c | |||
@@ -11,13 +11,12 @@ | |||
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | #include <linux/gpio.h> | |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | 16 | ||
17 | #include <linux/i2c/tps65010.h> | 17 | #include <linux/i2c/tps65010.h> |
18 | 18 | ||
19 | #include <plat/mmc.h> | 19 | #include <plat/mmc.h> |
20 | #include <mach/gpio.h> | ||
21 | 20 | ||
22 | #include "board-h2.h" | 21 | #include "board-h2.h" |
23 | 22 | ||
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 6c70c28d055c..c2e279173d42 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * it under the terms of the GNU General Public License version 2 as | 18 | * it under the terms of the GNU General Public License version 2 as |
19 | * published by the Free Software Foundation. | 19 | * published by the Free Software Foundation. |
20 | */ | 20 | */ |
21 | 21 | #include <linux/gpio.h> | |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/smc91x.h> | 32 | #include <linux/smc91x.h> |
33 | 33 | ||
34 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
35 | #include <asm/gpio.h> | ||
36 | 35 | ||
37 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
38 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-omap1/board-h3-mmc.c b/arch/arm/mach-omap1/board-h3-mmc.c index 2098525e7cc5..f8242aa9b763 100644 --- a/arch/arm/mach-omap1/board-h3-mmc.c +++ b/arch/arm/mach-omap1/board-h3-mmc.c | |||
@@ -11,13 +11,12 @@ | |||
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | #include <linux/gpio.h> | |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | 16 | ||
17 | #include <linux/i2c/tps65010.h> | 17 | #include <linux/i2c/tps65010.h> |
18 | 18 | ||
19 | #include <plat/mmc.h> | 19 | #include <plat/mmc.h> |
20 | #include <mach/gpio.h> | ||
21 | 20 | ||
22 | #include "board-h3.h" | 21 | #include "board-h3.h" |
23 | 22 | ||
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 8e2b64a46929..8f5b6af7ed59 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * it under the terms of the GNU General Public License version 2 as | 13 | * it under the terms of the GNU General Public License version 2 as |
14 | * published by the Free Software Foundation. | 14 | * published by the Free Software Foundation. |
15 | */ | 15 | */ |
16 | 16 | #include <linux/gpio.h> | |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/major.h> | 19 | #include <linux/major.h> |
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/setup.h> | 34 | #include <asm/setup.h> |
35 | #include <asm/page.h> | 35 | #include <asm/page.h> |
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <asm/gpio.h> | ||
38 | 37 | ||
39 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
40 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index e81ead1c89ea..fcd1a3c31896 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * 02110-1301, USA. | 23 | * 02110-1301, USA. |
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | |||
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
29 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 8b034594fbc7..c2234caf8a7a 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * it under the terms of the GNU General Public License version 2 as | 15 | * it under the terms of the GNU General Public License version 2 as |
16 | * published by the Free Software Foundation. | 16 | * published by the Free Software Foundation. |
17 | */ | 17 | */ |
18 | 18 | #include <linux/gpio.h> | |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
@@ -34,7 +34,6 @@ | |||
34 | #include <plat/mux.h> | 34 | #include <plat/mux.h> |
35 | #include <plat/flash.h> | 35 | #include <plat/flash.h> |
36 | #include <plat/fpga.h> | 36 | #include <plat/fpga.h> |
37 | #include <mach/gpio.h> | ||
38 | #include <plat/tc.h> | 37 | #include <plat/tc.h> |
39 | #include <plat/usb.h> | 38 | #include <plat/usb.h> |
40 | #include <plat/keypad.h> | 39 | #include <plat/keypad.h> |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 6825635ac681..02789c5d3703 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
@@ -26,7 +26,6 @@ | |||
26 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
28 | 28 | ||
29 | #include <mach/gpio.h> | ||
30 | #include <plat/mux.h> | 29 | #include <plat/mux.h> |
31 | #include <plat/usb.h> | 30 | #include <plat/usb.h> |
32 | #include <plat/board.h> | 31 | #include <plat/board.h> |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 44b8e9362bf4..e4dca1deebb4 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -25,7 +25,7 @@ | |||
25 | * with this program; if not, write to the Free Software Foundation, Inc., | 25 | * with this program; if not, write to the Free Software Foundation, Inc., |
26 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 26 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
27 | */ | 27 | */ |
28 | 28 | #include <linux/gpio.h> | |
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
@@ -42,7 +42,6 @@ | |||
42 | #include <linux/i2c/tps65010.h> | 42 | #include <linux/i2c/tps65010.h> |
43 | 43 | ||
44 | #include <mach/hardware.h> | 44 | #include <mach/hardware.h> |
45 | #include <asm/gpio.h> | ||
46 | 45 | ||
47 | #include <asm/mach-types.h> | 46 | #include <asm/mach-types.h> |
48 | #include <asm/mach/arch.h> | 47 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 3d8cd90b1dbb..50c4e398bcc8 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * it under the terms of the GNU General Public License version 2 as | 16 | * it under the terms of the GNU General Public License version 2 as |
17 | * published by the Free Software Foundation. | 17 | * published by the Free Software Foundation. |
18 | */ | 18 | */ |
19 | 19 | #include <linux/gpio.h> | |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
@@ -33,7 +33,6 @@ | |||
33 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
35 | 35 | ||
36 | #include <mach/gpio.h> | ||
37 | #include <plat/flash.h> | 36 | #include <plat/flash.h> |
38 | #include <plat/mux.h> | 37 | #include <plat/mux.h> |
39 | #include <plat/usb.h> | 38 | #include <plat/usb.h> |
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index d0eefe81cd1b..273771cb1b61 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/gpio.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
@@ -30,7 +31,6 @@ | |||
30 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
31 | 32 | ||
32 | #include <plat/led.h> | 33 | #include <plat/led.h> |
33 | #include <mach/gpio.h> | ||
34 | #include <plat/flash.h> | 34 | #include <plat/flash.h> |
35 | #include <plat/mux.h> | 35 | #include <plat/mux.h> |
36 | #include <plat/usb.h> | 36 | #include <plat/usb.h> |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index 98e79bc09213..de36ade38ef7 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/gpio.h> | ||
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
@@ -32,7 +33,6 @@ | |||
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
34 | 35 | ||
35 | #include <mach/gpio.h> | ||
36 | #include <plat/flash.h> | 36 | #include <plat/flash.h> |
37 | #include <plat/mux.h> | 37 | #include <plat/mux.h> |
38 | #include <plat/usb.h> | 38 | #include <plat/usb.h> |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index ad3a1567604e..04b1befaced6 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | #include <linux/gpio.h> | |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | 29 | ||
30 | #include <plat/tc.h> | 30 | #include <plat/tc.h> |
31 | #include <mach/gpio.h> | ||
32 | #include <plat/mux.h> | 31 | #include <plat/mux.h> |
33 | #include <plat/fpga.h> | 32 | #include <plat/fpga.h> |
34 | #include <plat/flash.h> | 33 | #include <plat/flash.h> |
diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c b/arch/arm/mach-omap1/board-sx1-mmc.c index e8ddd86e3fda..b59f78850e69 100644 --- a/arch/arm/mach-omap1/board-sx1-mmc.c +++ b/arch/arm/mach-omap1/board-sx1-mmc.c | |||
@@ -12,11 +12,11 @@ | |||
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/gpio.h> | ||
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
16 | 17 | ||
17 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
18 | #include <plat/mmc.h> | 19 | #include <plat/mmc.h> |
19 | #include <mach/gpio.h> | ||
20 | #include <plat/board-sx1.h> | 20 | #include <plat/board-sx1.h> |
21 | 21 | ||
22 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | 22 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 602b55c39d3d..2bea941741d5 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * it under the terms of the GNU General Public License version 2 as | 14 | * it under the terms of the GNU General Public License version 2 as |
15 | * published by the Free Software Foundation. | 15 | * published by the Free Software Foundation. |
16 | */ | 16 | */ |
17 | 17 | #include <linux/gpio.h> | |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/input.h> | 20 | #include <linux/input.h> |
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
34 | 34 | ||
35 | #include <mach/gpio.h> | ||
36 | #include <plat/flash.h> | 35 | #include <plat/flash.h> |
37 | #include <plat/mux.h> | 36 | #include <plat/mux.h> |
38 | #include <plat/dma.h> | 37 | #include <plat/dma.h> |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 80165154617a..940faed82be2 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
18 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
@@ -33,7 +34,6 @@ | |||
33 | 34 | ||
34 | #include <plat/board-voiceblue.h> | 35 | #include <plat/board-voiceblue.h> |
35 | #include <plat/common.h> | 36 | #include <plat/common.h> |
36 | #include <mach/gpio.h> | ||
37 | #include <plat/flash.h> | 37 | #include <plat/flash.h> |
38 | #include <plat/mux.h> | 38 | #include <plat/mux.h> |
39 | #include <plat/tc.h> | 39 | #include <plat/tc.h> |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 36f26c3fa25e..7c50ecf68123 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
13 | #include <linux/gpio.h> | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
@@ -24,7 +25,6 @@ | |||
24 | #include <plat/tc.h> | 25 | #include <plat/tc.h> |
25 | #include <plat/board.h> | 26 | #include <plat/board.h> |
26 | #include <plat/mux.h> | 27 | #include <plat/mux.h> |
27 | #include <mach/gpio.h> | ||
28 | #include <plat/mmc.h> | 28 | #include <plat/mmc.h> |
29 | #include <plat/omap7xx.h> | 29 | #include <plat/omap7xx.h> |
30 | #include <plat/mcbsp.h> | 30 | #include <plat/mcbsp.h> |
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index cddbf8b089ce..0a17a1a7e00d 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/gpio.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
22 | #include <linux/device.h> | 23 | #include <linux/device.h> |
@@ -28,7 +29,6 @@ | |||
28 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
29 | 30 | ||
30 | #include <plat/fpga.h> | 31 | #include <plat/fpga.h> |
31 | #include <mach/gpio.h> | ||
32 | 32 | ||
33 | static void fpga_mask_irq(struct irq_data *d) | 33 | static void fpga_mask_irq(struct irq_data *d) |
34 | { | 34 | { |
diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S index 62856044eb63..2b36a281dc84 100644 --- a/arch/arm/mach-omap1/include/mach/debug-macro.S +++ b/arch/arm/mach-omap1/include/mach/debug-macro.S | |||
@@ -13,13 +13,8 @@ | |||
13 | 13 | ||
14 | #include <linux/serial_reg.h> | 14 | #include <linux/serial_reg.h> |
15 | 15 | ||
16 | #include <asm/memory.h> | ||
17 | |||
18 | #include <plat/serial.h> | 16 | #include <plat/serial.h> |
19 | 17 | ||
20 | #define omap_uart_v2p(x) ((x) - PAGE_OFFSET + PLAT_PHYS_OFFSET) | ||
21 | #define omap_uart_p2v(x) ((x) - PLAT_PHYS_OFFSET + PAGE_OFFSET) | ||
22 | |||
23 | .pushsection .data | 18 | .pushsection .data |
24 | omap_uart_phys: .word 0x0 | 19 | omap_uart_phys: .word 0x0 |
25 | omap_uart_virt: .word 0x0 | 20 | omap_uart_virt: .word 0x0 |
@@ -31,26 +26,24 @@ omap_uart_virt: .word 0x0 | |||
31 | * the desired UART phys and virt addresses temporarily into | 26 | * the desired UART phys and virt addresses temporarily into |
32 | * the omap_uart_phys and omap_uart_virt above. | 27 | * the omap_uart_phys and omap_uart_virt above. |
33 | */ | 28 | */ |
34 | .macro addruart, rp, rv | 29 | .macro addruart, rp, rv, tmp |
35 | 30 | ||
36 | /* Use omap_uart_phys/virt if already configured */ | 31 | /* Use omap_uart_phys/virt if already configured */ |
37 | 9: mrc p15, 0, \rp, c1, c0 | 32 | 9: adr \rp, 99f @ get effective addr of 99f |
38 | tst \rp, #1 @ MMU enabled? | 33 | ldr \rv, [\rp] @ get absolute addr of 99f |
39 | ldreq \rp, =omap_uart_v2p(omap_uart_phys) @ MMU disabled | 34 | sub \rv, \rv, \rp @ offset between the two |
40 | ldrne \rp, =omap_uart_phys @ MMU enabled | 35 | ldr \rp, [\rp, #4] @ abs addr of omap_uart_phys |
41 | add \rv, \rp, #4 @ omap_uart_virt | 36 | sub \tmp, \rp, \rv @ make it effective |
42 | ldr \rp, [\rp, #0] | 37 | ldr \rp, [\tmp, #0] @ omap_uart_phys |
43 | ldr \rv, [\rv, #0] | 38 | ldr \rv, [\tmp, #4] @ omap_uart_virt |
44 | cmp \rp, #0 @ is port configured? | 39 | cmp \rp, #0 @ is port configured? |
45 | cmpne \rv, #0 | 40 | cmpne \rv, #0 |
46 | bne 99f @ already configured | 41 | bne 100f @ already configured |
47 | 42 | ||
48 | /* Check the debug UART configuration set in uncompress.h */ | 43 | /* Check the debug UART configuration set in uncompress.h */ |
49 | mrc p15, 0, \rp, c1, c0 | 44 | and \rp, pc, #0xff000000 |
50 | tst \rp, #1 @ MMU enabled? | 45 | ldr \rv, =OMAP_UART_INFO_OFS |
51 | ldreq \rp, =OMAP_UART_INFO @ MMU not enabled | 46 | ldr \rp, [\rp, \rv] |
52 | ldrne \rp, =omap_uart_p2v(OMAP_UART_INFO) @ MMU enabled | ||
53 | ldr \rp, [\rp, #0] | ||
54 | 47 | ||
55 | /* Select the UART to use based on the UART1 scratchpad value */ | 48 | /* Select the UART to use based on the UART1 scratchpad value */ |
56 | 10: cmp \rp, #0 @ no port configured? | 49 | 10: cmp \rp, #0 @ no port configured? |
@@ -74,17 +67,18 @@ omap_uart_virt: .word 0x0 | |||
74 | 67 | ||
75 | /* Store both phys and virt address for the uart */ | 68 | /* Store both phys and virt address for the uart */ |
76 | 98: add \rp, \rp, #0xff000000 @ phys base | 69 | 98: add \rp, \rp, #0xff000000 @ phys base |
77 | mrc p15, 0, \rv, c1, c0 | 70 | str \rp, [\tmp, #0] @ omap_uart_phys |
78 | tst \rv, #1 @ MMU enabled? | ||
79 | ldreq \rv, =omap_uart_v2p(omap_uart_phys) @ MMU disabled | ||
80 | ldrne \rv, =omap_uart_phys @ MMU enabled | ||
81 | str \rp, [\rv, #0] | ||
82 | sub \rp, \rp, #0xff000000 @ phys base | 71 | sub \rp, \rp, #0xff000000 @ phys base |
83 | add \rp, \rp, #0xfe000000 @ virt base | 72 | add \rp, \rp, #0xfe000000 @ virt base |
84 | add \rv, \rv, #4 @ omap_uart_lsr | 73 | str \rp, [\tmp, #4] @ omap_uart_virt |
85 | str \rp, [\rv, #0] | ||
86 | b 9b | 74 | b 9b |
87 | 99: | 75 | |
76 | .align | ||
77 | 99: .word . | ||
78 | .word omap_uart_phys | ||
79 | .ltorg | ||
80 | |||
81 | 100: | ||
88 | .endm | 82 | .endm |
89 | 83 | ||
90 | .macro senduart,rd,rx | 84 | .macro senduart,rd,rx |
diff --git a/arch/arm/mach-omap1/include/mach/memory.h b/arch/arm/mach-omap1/include/mach/memory.h index e9b600c113ef..c6337645ba8a 100644 --- a/arch/arm/mach-omap1/include/mach/memory.h +++ b/arch/arm/mach-omap1/include/mach/memory.h | |||
@@ -2,4 +2,55 @@ | |||
2 | * arch/arm/mach-omap1/include/mach/memory.h | 2 | * arch/arm/mach-omap1/include/mach/memory.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <plat/memory.h> | 5 | #ifndef __ASM_ARCH_MEMORY_H |
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | /* | ||
9 | * Physical DRAM offset. | ||
10 | */ | ||
11 | #define PLAT_PHYS_OFFSET UL(0x10000000) | ||
12 | |||
13 | /* | ||
14 | * Bus address is physical address, except for OMAP-1510 Local Bus. | ||
15 | * OMAP-1510 bus address is translated into a Local Bus address if the | ||
16 | * OMAP bus type is lbus. We do the address translation based on the | ||
17 | * device overriding the defaults used in the dma-mapping API. | ||
18 | * Note that the is_lbus_device() test is not very efficient on 1510 | ||
19 | * because of the strncmp(). | ||
20 | */ | ||
21 | #ifdef CONFIG_ARCH_OMAP15XX | ||
22 | |||
23 | /* | ||
24 | * OMAP-1510 Local Bus address offset | ||
25 | */ | ||
26 | #define OMAP1510_LB_OFFSET UL(0x30000000) | ||
27 | |||
28 | #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) | ||
29 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) | ||
30 | #define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev_name(dev), "ohci", 4) == 0)) | ||
31 | |||
32 | #define __arch_pfn_to_dma(dev, pfn) \ | ||
33 | ({ dma_addr_t __dma = __pfn_to_phys(pfn); \ | ||
34 | if (is_lbus_device(dev)) \ | ||
35 | __dma = __dma - PHYS_OFFSET + OMAP1510_LB_OFFSET; \ | ||
36 | __dma; }) | ||
37 | |||
38 | #define __arch_dma_to_pfn(dev, addr) \ | ||
39 | ({ dma_addr_t __dma = addr; \ | ||
40 | if (is_lbus_device(dev)) \ | ||
41 | __dma += PHYS_OFFSET - OMAP1510_LB_OFFSET; \ | ||
42 | __phys_to_pfn(__dma); \ | ||
43 | }) | ||
44 | |||
45 | #define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \ | ||
46 | lbus_to_virt(addr) : \ | ||
47 | __phys_to_virt(addr)); }) | ||
48 | |||
49 | #define __arch_virt_to_dma(dev, addr) ({ unsigned long __addr = (unsigned long)(addr); \ | ||
50 | (dma_addr_t) (is_lbus_device(dev) ? \ | ||
51 | virt_to_lbus(__addr) : \ | ||
52 | __virt_to_phys(__addr)); }) | ||
53 | |||
54 | #endif /* CONFIG_ARCH_OMAP15XX */ | ||
55 | |||
56 | #endif | ||
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index e2b9c901ab67..e5b104b7fce6 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -35,7 +35,7 @@ | |||
35 | * with this program; if not, write to the Free Software Foundation, Inc., | 35 | * with this program; if not, write to the Free Software Foundation, Inc., |
36 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 36 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
37 | */ | 37 | */ |
38 | 38 | #include <linux/gpio.h> | |
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/module.h> | 40 | #include <linux/module.h> |
41 | #include <linux/sched.h> | 41 | #include <linux/sched.h> |
@@ -45,7 +45,6 @@ | |||
45 | #include <mach/hardware.h> | 45 | #include <mach/hardware.h> |
46 | #include <asm/irq.h> | 46 | #include <asm/irq.h> |
47 | #include <asm/mach/irq.h> | 47 | #include <asm/mach/irq.h> |
48 | #include <mach/gpio.h> | ||
49 | #include <plat/cpu.h> | 48 | #include <plat/cpu.h> |
50 | 49 | ||
51 | #define IRQ_BANK(irq) ((irq) >> 5) | 50 | #define IRQ_BANK(irq) ((irq) >> 5) |
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c index b4f9be52e1e8..4b818eb9f911 100644 --- a/arch/arm/mach-omap1/leds-h2p2-debug.c +++ b/arch/arm/mach-omap1/leds-h2p2-debug.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * The "surfer" expansion board and H2 sample board also have two-color | 9 | * The "surfer" expansion board and H2 sample board also have two-color |
10 | * green+red LEDs (in parallel), used here for timer and idle indicators. | 10 | * green+red LEDs (in parallel), used here for timer and idle indicators. |
11 | */ | 11 | */ |
12 | #include <linux/gpio.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/kernel_stat.h> | 14 | #include <linux/kernel_stat.h> |
14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
@@ -20,7 +21,6 @@ | |||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | 22 | ||
22 | #include <plat/fpga.h> | 23 | #include <plat/fpga.h> |
23 | #include <mach/gpio.h> | ||
24 | 24 | ||
25 | #include "leds.h" | 25 | #include "leds.h" |
26 | 26 | ||
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c index 499d7ad8697d..da09f4364979 100644 --- a/arch/arm/mach-omap1/leds-osk.c +++ b/arch/arm/mach-omap1/leds-osk.c | |||
@@ -3,14 +3,13 @@ | |||
3 | * | 3 | * |
4 | * LED driver for OSK with optional Mistral QVGA board | 4 | * LED driver for OSK with optional Mistral QVGA board |
5 | */ | 5 | */ |
6 | #include <linux/gpio.h> | ||
6 | #include <linux/init.h> | 7 | #include <linux/init.h> |
7 | 8 | ||
8 | #include <mach/hardware.h> | 9 | #include <mach/hardware.h> |
9 | #include <asm/leds.h> | 10 | #include <asm/leds.h> |
10 | #include <asm/system.h> | 11 | #include <asm/system.h> |
11 | 12 | ||
12 | #include <mach/gpio.h> | ||
13 | |||
14 | #include "leds.h" | 13 | #include "leds.h" |
15 | 14 | ||
16 | 15 | ||
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c index 22eb11dde9e7..ae6dd93b8ddc 100644 --- a/arch/arm/mach-omap1/leds.c +++ b/arch/arm/mach-omap1/leds.c | |||
@@ -3,13 +3,13 @@ | |||
3 | * | 3 | * |
4 | * OMAP LEDs dispatcher | 4 | * OMAP LEDs dispatcher |
5 | */ | 5 | */ |
6 | #include <linux/gpio.h> | ||
6 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
7 | #include <linux/init.h> | 8 | #include <linux/init.h> |
8 | 9 | ||
9 | #include <asm/leds.h> | 10 | #include <asm/leds.h> |
10 | #include <asm/mach-types.h> | 11 | #include <asm/mach-types.h> |
11 | 12 | ||
12 | #include <mach/gpio.h> | ||
13 | #include <plat/mux.h> | 13 | #include <plat/mux.h> |
14 | 14 | ||
15 | #include "leds.h" | 15 | #include "leds.h" |
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 550ca9d9991d..93ae8f29727e 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <plat/board.h> | 25 | #include <plat/board.h> |
26 | #include <plat/mux.h> | 26 | #include <plat/mux.h> |
27 | #include <mach/gpio.h> | ||
28 | #include <plat/fpga.h> | 27 | #include <plat/fpga.h> |
29 | 28 | ||
30 | #include "pm.h" | 29 | #include "pm.h" |
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 69d698c6c5df..d704f0ac328d 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -238,7 +238,8 @@ static int __init omap2430_i2c_init(void) | |||
238 | { | 238 | { |
239 | omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo, | 239 | omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo, |
240 | ARRAY_SIZE(sdp2430_i2c1_boardinfo)); | 240 | ARRAY_SIZE(sdp2430_i2c1_boardinfo)); |
241 | omap2_pmic_init("twl4030", &sdp2430_twldata); | 241 | omap_pmic_init(2, 100, "twl4030", INT_24XX_SYS_NIRQ, |
242 | &sdp2430_twldata); | ||
242 | return 0; | 243 | return 0; |
243 | } | 244 | } |
244 | 245 | ||
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 32a3a7fe0e95..515646886b59 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -133,7 +133,7 @@ static const int sdp4430_keymap[] = { | |||
133 | KEY(7, 6, KEY_OK), | 133 | KEY(7, 6, KEY_OK), |
134 | KEY(7, 7, KEY_DOWN), | 134 | KEY(7, 7, KEY_DOWN), |
135 | }; | 135 | }; |
136 | static struct omap_device_pad keypad_pads[] __initdata = { | 136 | static struct omap_device_pad keypad_pads[] = { |
137 | { .name = "kpd_col1.kpd_col1", | 137 | { .name = "kpd_col1.kpd_col1", |
138 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | 138 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, |
139 | }, | 139 | }, |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index e8d45d3bd3e0..7ac546219e5d 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * it under the terms of the GNU General Public License version 2 as | 15 | * it under the terms of the GNU General Public License version 2 as |
16 | * published by the Free Software Foundation. | 16 | * published by the Free Software Foundation. |
17 | */ | 17 | */ |
18 | 18 | #include <linux/gpio.h> | |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
@@ -25,7 +25,6 @@ | |||
25 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | 27 | ||
28 | #include <mach/gpio.h> | ||
29 | #include <plat/usb.h> | 28 | #include <plat/usb.h> |
30 | #include <plat/board.h> | 29 | #include <plat/board.h> |
31 | #include <plat/common.h> | 30 | #include <plat/common.h> |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 9a114bd910b1..c12666ee7017 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | #include <linux/gpio.h> | |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
33 | 33 | ||
34 | #include <mach/gpio.h> | ||
35 | #include <plat/usb.h> | 34 | #include <plat/usb.h> |
36 | #include <plat/board.h> | 35 | #include <plat/board.h> |
37 | #include <plat/common.h> | 36 | #include <plat/common.h> |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 2a2545153d15..e179da0c4da5 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | #include <linux/gpio.h> | |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 10adf66be7ba..7279ec075737 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * the Free Software Foundation; either version 2 of the License, or | 8 | * the Free Software Foundation; either version 2 of the License, or |
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | #include <linux/gpio.h> | |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
@@ -26,7 +26,6 @@ | |||
26 | #include <plat/tc.h> | 26 | #include <plat/tc.h> |
27 | #include <plat/board.h> | 27 | #include <plat/board.h> |
28 | #include <plat/mcbsp.h> | 28 | #include <plat/mcbsp.h> |
29 | #include <mach/gpio.h> | ||
30 | #include <plat/mmc.h> | 29 | #include <plat/mmc.h> |
31 | #include <plat/dma.h> | 30 | #include <plat/dma.h> |
32 | #include <plat/omap_hwmod.h> | 31 | #include <plat/omap_hwmod.h> |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index cc8791952a05..2dc002a388b3 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -137,8 +137,7 @@ static void omap4_hsmmc1_before_set_reg(struct device *dev, int slot, | |||
137 | */ | 137 | */ |
138 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 138 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
139 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 139 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
140 | OMAP4_MMC1_PWRDNZ_MASK | | 140 | OMAP4_MMC1_PWRDNZ_MASK); |
141 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
142 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 141 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
143 | } | 142 | } |
144 | 143 | ||
@@ -156,8 +155,7 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
156 | else | 155 | else |
157 | reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK; | 156 | reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK; |
158 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 157 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
159 | OMAP4_MMC1_PWRDNZ_MASK | | 158 | OMAP4_MMC1_PWRDNZ_MASK); |
160 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
161 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 159 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
162 | 160 | ||
163 | timeout = jiffies + msecs_to_jiffies(5); | 161 | timeout = jiffies + msecs_to_jiffies(5); |
@@ -171,16 +169,14 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
171 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { | 169 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { |
172 | pr_err("Pbias Voltage is not same as LDO\n"); | 170 | pr_err("Pbias Voltage is not same as LDO\n"); |
173 | /* Caution : On VMODE_ERROR Power Down MMC IO */ | 171 | /* Caution : On VMODE_ERROR Power Down MMC IO */ |
174 | reg &= ~(OMAP4_MMC1_PWRDNZ_MASK | | 172 | reg &= ~(OMAP4_MMC1_PWRDNZ_MASK); |
175 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
176 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 173 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
177 | } | 174 | } |
178 | } else { | 175 | } else { |
179 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 176 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
180 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 177 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
181 | OMAP4_MMC1_PWRDNZ_MASK | | 178 | OMAP4_MMC1_PWRDNZ_MASK | |
182 | OMAP4_MMC1_PBIASLITE_VMODE_MASK | | 179 | OMAP4_MMC1_PBIASLITE_VMODE_MASK); |
183 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
184 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 180 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
185 | } | 181 | } |
186 | } | 182 | } |
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S index 48adfe9fe4f3..13f98e59cfef 100644 --- a/arch/arm/mach-omap2/include/mach/debug-macro.S +++ b/arch/arm/mach-omap2/include/mach/debug-macro.S | |||
@@ -13,15 +13,10 @@ | |||
13 | 13 | ||
14 | #include <linux/serial_reg.h> | 14 | #include <linux/serial_reg.h> |
15 | 15 | ||
16 | #include <asm/memory.h> | ||
17 | |||
18 | #include <plat/serial.h> | 16 | #include <plat/serial.h> |
19 | 17 | ||
20 | #define UART_OFFSET(addr) ((addr) & 0x00ffffff) | 18 | #define UART_OFFSET(addr) ((addr) & 0x00ffffff) |
21 | 19 | ||
22 | #define omap_uart_v2p(x) ((x) - PAGE_OFFSET + PLAT_PHYS_OFFSET) | ||
23 | #define omap_uart_p2v(x) ((x) - PLAT_PHYS_OFFSET + PAGE_OFFSET) | ||
24 | |||
25 | .pushsection .data | 20 | .pushsection .data |
26 | omap_uart_phys: .word 0 | 21 | omap_uart_phys: .word 0 |
27 | omap_uart_virt: .word 0 | 22 | omap_uart_virt: .word 0 |
@@ -34,26 +29,25 @@ omap_uart_lsr: .word 0 | |||
34 | * the desired UART phys and virt addresses temporarily into | 29 | * the desired UART phys and virt addresses temporarily into |
35 | * the omap_uart_phys and omap_uart_virt above. | 30 | * the omap_uart_phys and omap_uart_virt above. |
36 | */ | 31 | */ |
37 | .macro addruart, rp, rv | 32 | .macro addruart, rp, rv, tmp |
38 | 33 | ||
39 | /* Use omap_uart_phys/virt if already configured */ | 34 | /* Use omap_uart_phys/virt if already configured */ |
40 | 10: mrc p15, 0, \rp, c1, c0 | 35 | 10: adr \rp, 99f @ get effective addr of 99f |
41 | tst \rp, #1 @ MMU enabled? | 36 | ldr \rv, [\rp] @ get absolute addr of 99f |
42 | ldreq \rp, =omap_uart_v2p(omap_uart_phys) @ MMU disabled | 37 | sub \rv, \rv, \rp @ offset between the two |
43 | ldrne \rp, =omap_uart_phys @ MMU enabled | 38 | ldr \rp, [\rp, #4] @ abs addr of omap_uart_phys |
44 | add \rv, \rp, #4 @ omap_uart_virt | 39 | sub \tmp, \rp, \rv @ make it effective |
45 | ldr \rp, [\rp, #0] | 40 | ldr \rp, [\tmp, #0] @ omap_uart_phys |
46 | ldr \rv, [\rv, #0] | 41 | ldr \rv, [\tmp, #4] @ omap_uart_virt |
47 | cmp \rp, #0 @ is port configured? | 42 | cmp \rp, #0 @ is port configured? |
48 | cmpne \rv, #0 | 43 | cmpne \rv, #0 |
49 | bne 99f @ already configured | 44 | bne 100f @ already configured |
50 | 45 | ||
51 | /* Check the debug UART configuration set in uncompress.h */ | 46 | /* Check the debug UART configuration set in uncompress.h */ |
52 | mrc p15, 0, \rp, c1, c0 | 47 | mov \rp, pc |
53 | tst \rp, #1 @ MMU enabled? | 48 | ldr \rv, =OMAP_UART_INFO_OFS |
54 | ldreq \rp, =OMAP_UART_INFO @ MMU not enabled | 49 | and \rp, \rp, #0xff000000 |
55 | ldrne \rp, =omap_uart_p2v(OMAP_UART_INFO) @ MMU enabled | 50 | ldr \rp, [\rp, \rv] |
56 | ldr \rp, [\rp, #0] | ||
57 | 51 | ||
58 | /* Select the UART to use based on the UART1 scratchpad value */ | 52 | /* Select the UART to use based on the UART1 scratchpad value */ |
59 | cmp \rp, #0 @ no port configured? | 53 | cmp \rp, #0 @ no port configured? |
@@ -106,50 +100,47 @@ omap_uart_lsr: .word 0 | |||
106 | b 98f | 100 | b 98f |
107 | 83: mov \rp, #UART_OFFSET(TI816X_UART3_BASE) | 101 | 83: mov \rp, #UART_OFFSET(TI816X_UART3_BASE) |
108 | b 98f | 102 | b 98f |
103 | |||
109 | 95: ldr \rp, =ZOOM_UART_BASE | 104 | 95: ldr \rp, =ZOOM_UART_BASE |
110 | mrc p15, 0, \rv, c1, c0 | 105 | str \rp, [\tmp, #0] @ omap_uart_phys |
111 | tst \rv, #1 @ MMU enabled? | ||
112 | ldreq \rv, =omap_uart_v2p(omap_uart_phys) @ MMU disabled | ||
113 | ldrne \rv, =omap_uart_phys @ MMU enabled | ||
114 | str \rp, [\rv, #0] | ||
115 | ldr \rp, =ZOOM_UART_VIRT | 106 | ldr \rp, =ZOOM_UART_VIRT |
116 | add \rv, \rv, #4 @ omap_uart_virt | 107 | str \rp, [\tmp, #4] @ omap_uart_virt |
117 | str \rp, [\rv, #0] | ||
118 | mov \rp, #(UART_LSR << ZOOM_PORT_SHIFT) | 108 | mov \rp, #(UART_LSR << ZOOM_PORT_SHIFT) |
119 | add \rv, \rv, #4 @ omap_uart_lsr | 109 | str \rp, [\tmp, #8] @ omap_uart_lsr |
120 | str \rp, [\rv, #0] | ||
121 | b 10b | 110 | b 10b |
122 | 111 | ||
123 | /* Store both phys and virt address for the uart */ | 112 | /* Store both phys and virt address for the uart */ |
124 | 98: add \rp, \rp, #0x48000000 @ phys base | 113 | 98: add \rp, \rp, #0x48000000 @ phys base |
125 | mrc p15, 0, \rv, c1, c0 | 114 | str \rp, [\tmp, #0] @ omap_uart_phys |
126 | tst \rv, #1 @ MMU enabled? | ||
127 | ldreq \rv, =omap_uart_v2p(omap_uart_phys) @ MMU disabled | ||
128 | ldrne \rv, =omap_uart_phys @ MMU enabled | ||
129 | str \rp, [\rv, #0] | ||
130 | sub \rp, \rp, #0x48000000 @ phys base | 115 | sub \rp, \rp, #0x48000000 @ phys base |
131 | add \rp, \rp, #0xfa000000 @ virt base | 116 | add \rp, \rp, #0xfa000000 @ virt base |
132 | add \rv, \rv, #4 @ omap_uart_virt | 117 | str \rp, [\tmp, #4] @ omap_uart_virt |
133 | str \rp, [\rv, #0] | ||
134 | mov \rp, #(UART_LSR << OMAP_PORT_SHIFT) | 118 | mov \rp, #(UART_LSR << OMAP_PORT_SHIFT) |
135 | add \rv, \rv, #4 @ omap_uart_lsr | 119 | str \rp, [\tmp, #8] @ omap_uart_lsr |
136 | str \rp, [\rv, #0] | ||
137 | 120 | ||
138 | b 10b | 121 | b 10b |
139 | 99: | 122 | |
123 | .align | ||
124 | 99: .word . | ||
125 | .word omap_uart_phys | ||
126 | .ltorg | ||
127 | |||
128 | 100: /* Pass the UART_LSR reg address */ | ||
129 | ldr \tmp, [\tmp, #8] @ omap_uart_lsr | ||
130 | add \rp, \rp, \tmp | ||
131 | add \rv, \rv, \tmp | ||
140 | .endm | 132 | .endm |
141 | 133 | ||
142 | .macro senduart,rd,rx | 134 | .macro senduart,rd,rx |
143 | strb \rd, [\rx] | 135 | orr \rd, \rd, \rx, lsl #24 @ preserve LSR reg offset |
136 | bic \rx, \rx, #0xff @ get base (THR) reg address | ||
137 | strb \rd, [\rx] @ send lower byte of rd | ||
138 | orr \rx, \rx, \rd, lsr #24 @ restore original rx (LSR) | ||
139 | bic \rd, \rd, #(0xff << 24) @ restore original rd | ||
144 | .endm | 140 | .endm |
145 | 141 | ||
146 | .macro busyuart,rd,rx | 142 | .macro busyuart,rd,rx |
147 | 1001: mrc p15, 0, \rd, c1, c0 | 143 | 1001: ldrb \rd, [\rx] @ rx contains UART_LSR address |
148 | tst \rd, #1 @ MMU enabled? | ||
149 | ldreq \rd, =omap_uart_v2p(omap_uart_lsr) @ MMU disabled | ||
150 | ldrne \rd, =omap_uart_lsr @ MMU enabled | ||
151 | ldr \rd, [\rd, #0] | ||
152 | ldrb \rd, [\rx, \rd] | ||
153 | and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE) | 144 | and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE) |
154 | teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE) | 145 | teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE) |
155 | bne 1001b | 146 | bne 1001b |
diff --git a/arch/arm/mach-omap2/include/mach/memory.h b/arch/arm/mach-omap2/include/mach/memory.h deleted file mode 100644 index ca6d32a917dd..000000000000 --- a/arch/arm/mach-omap2/include/mach/memory.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/memory.h> | ||
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 3a12f7586a4c..65f1be6a182c 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -165,8 +165,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs) | |||
165 | 165 | ||
166 | omap_irq_bank_init_one(bank); | 166 | omap_irq_bank_init_one(bank); |
167 | 167 | ||
168 | for (i = 0, j = 0; i < bank->nr_irqs; i += 32, j += 0x20) | 168 | for (j = 0; j < bank->nr_irqs; j += 32) |
169 | omap_alloc_gc(bank->base_reg + j, i, 32); | 169 | omap_alloc_gc(bank->base_reg + j, j, 32); |
170 | 170 | ||
171 | nr_of_irqs += bank->nr_irqs; | 171 | nr_of_irqs += bank->nr_irqs; |
172 | nr_banks++; | 172 | nr_banks++; |
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index a65145b02a55..19e4dac62a8c 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c | |||
@@ -137,9 +137,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) | |||
137 | musb_plat.mode = board_data->mode; | 137 | musb_plat.mode = board_data->mode; |
138 | musb_plat.extvbus = board_data->extvbus; | 138 | musb_plat.extvbus = board_data->extvbus; |
139 | 139 | ||
140 | if (cpu_is_omap44xx()) | ||
141 | omap4430_phy_init(dev); | ||
142 | |||
143 | if (cpu_is_omap3517() || cpu_is_omap3505()) { | 140 | if (cpu_is_omap3517() || cpu_is_omap3505()) { |
144 | oh_name = "am35x_otg_hs"; | 141 | oh_name = "am35x_otg_hs"; |
145 | name = "musb-am35x"; | 142 | name = "musb-am35x"; |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index 88432aba972c..4b79a80d5e1f 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * License version 2. This program is licensed "as is" without any | 9 | * License version 2. This program is licensed "as is" without any |
10 | * warranty of any kind, whether express or implied. | 10 | * warranty of any kind, whether express or implied. |
11 | */ | 11 | */ |
12 | 12 | #include <linux/gpio.h> | |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/mv643xx_eth.h> | 21 | #include <linux/mv643xx_eth.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/gpio.h> | ||
25 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/pci.h> | 25 | #include <asm/mach/pci.h> |
27 | #include <mach/orion5x.h> | 26 | #include <mach/orion5x.h> |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 9e5c1663fc4f..343f60e9639f 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * License, or (at your option) any later version. | 13 | * License, or (at your option) any later version. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | #include <linux/gpio.h> | |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/phy.h> | 30 | #include <linux/phy.h> |
31 | #include <linux/marvell_phy.h> | 31 | #include <linux/marvell_phy.h> |
32 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
33 | #include <asm/gpio.h> | ||
34 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/pci.h> | 34 | #include <asm/mach/pci.h> |
36 | #include <mach/orion5x.h> | 35 | #include <mach/orion5x.h> |
diff --git a/arch/arm/mach-orion5x/include/mach/debug-macro.S b/arch/arm/mach-orion5x/include/mach/debug-macro.S index 5e3bf5b68aec..f340ed8f8dd0 100644 --- a/arch/arm/mach-orion5x/include/mach/debug-macro.S +++ b/arch/arm/mach-orion5x/include/mach/debug-macro.S | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <mach/orion5x.h> | 11 | #include <mach/orion5x.h> |
12 | 12 | ||
13 | .macro addruart, rp, rv | 13 | .macro addruart, rp, rv, tmp |
14 | ldr \rp, =ORION5X_REGS_PHYS_BASE | 14 | ldr \rp, =ORION5X_REGS_PHYS_BASE |
15 | ldr \rv, =ORION5X_REGS_VIRT_BASE | 15 | ldr \rv, =ORION5X_REGS_VIRT_BASE |
16 | orr \rp, \rp, #0x00012000 | 16 | orr \rp, \rp, #0x00012000 |
diff --git a/arch/arm/mach-orion5x/include/mach/memory.h b/arch/arm/mach-orion5x/include/mach/memory.h deleted file mode 100644 index 6769917882fe..000000000000 --- a/arch/arm/mach-orion5x/include/mach/memory.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-orion5x/include/mach/memory.h | ||
3 | * | ||
4 | * Marvell Orion memory definitions | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_ARCH_MEMORY_H | ||
8 | #define __ASM_ARCH_MEMORY_H | ||
9 | |||
10 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
11 | |||
12 | #endif | ||
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index 43cf8bc9767b..b1b45fff776e 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c | |||
@@ -9,12 +9,11 @@ | |||
9 | * License version 2. This program is licensed "as is" without any | 9 | * License version 2. This program is licensed "as is" without any |
10 | * warranty of any kind, whether express or implied. | 10 | * warranty of any kind, whether express or implied. |
11 | */ | 11 | */ |
12 | 12 | #include <linux/gpio.h> | |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <asm/gpio.h> | ||
18 | #include <mach/bridge-regs.h> | 17 | #include <mach/bridge-regs.h> |
19 | #include <plat/irq.h> | 18 | #include <plat/irq.h> |
20 | #include "common.h" | 19 | #include "common.h" |
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index 9115511dc035..d3cd3f63258a 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/serial_reg.h> | 21 | #include <linux/serial_reg.h> |
22 | #include <linux/ata_platform.h> | 22 | #include <linux/ata_platform.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/gpio.h> | ||
25 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/pci.h> | 25 | #include <asm/mach/pci.h> |
27 | #include <mach/orion5x.h> | 26 | #include <mach/orion5x.h> |
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c index b3356ada64b9..201ae3676289 100644 --- a/arch/arm/mach-orion5x/mv2120-setup.c +++ b/arch/arm/mach-orion5x/mv2120-setup.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * published by the Free Software Foundation; either version 2 of the | 7 | * published by the Free Software Foundation; either version 2 of the |
8 | * License, or (at your option) any later version. | 8 | * License, or (at your option) any later version. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/ata_platform.h> | 21 | #include <linux/ata_platform.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/gpio.h> | ||
24 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
25 | #include <mach/orion5x.h> | 24 | #include <mach/orion5x.h> |
26 | #include "common.h" | 25 | #include "common.h" |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index 8c876664f494..ebd6767d8e88 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/ethtool.h> | 18 | #include <linux/ethtool.h> |
19 | #include <net/dsa.h> | 19 | #include <net/dsa.h> |
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | #include <asm/gpio.h> | ||
22 | #include <asm/leds.h> | 21 | #include <asm/leds.h> |
23 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/pci.h> | 23 | #include <asm/mach/pci.h> |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index 994644f59d8d..05db2d336b08 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <net/dsa.h> | 20 | #include <net/dsa.h> |
21 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
22 | #include <asm/gpio.h> | ||
23 | #include <asm/leds.h> | 22 | #include <asm/leds.h> |
24 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/pci.h> | 24 | #include <asm/mach/pci.h> |
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index 1903d25ecae9..e47fa0578ae3 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * License version 2. This program is licensed "as is" without any | 9 | * License version 2. This program is licensed "as is" without any |
10 | * warranty of any kind, whether express or implied. | 10 | * warranty of any kind, whether express or implied. |
11 | */ | 11 | */ |
12 | 12 | #include <linux/gpio.h> | |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/ata_platform.h> | 20 | #include <linux/ata_platform.h> |
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/gpio.h> | ||
24 | #include <asm/leds.h> | 23 | #include <asm/leds.h> |
25 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/pci.h> | 25 | #include <asm/mach/pci.h> |
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index e06fdae77f0a..64317251ec00 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/ethtool.h> | 21 | #include <linux/ethtool.h> |
22 | #include <net/dsa.h> | 22 | #include <net/dsa.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/gpio.h> | ||
25 | #include <asm/leds.h> | 24 | #include <asm/leds.h> |
26 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/pci.h> | 26 | #include <asm/mach/pci.h> |
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index 306183273eb9..29f1526f7b70 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | #include <linux/gpio.h> | |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/serial_reg.h> | 21 | #include <linux/serial_reg.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/gpio.h> | ||
24 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/pci.h> | 24 | #include <asm/mach/pci.h> |
26 | #include <mach/orion5x.h> | 25 | #include <mach/orion5x.h> |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index 3dbcd5ed77ef..31e51f9b4b64 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | #include <linux/gpio.h> | |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/serial_reg.h> | 23 | #include <linux/serial_reg.h> |
24 | #include <linux/ata_platform.h> | 24 | #include <linux/ata_platform.h> |
25 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
26 | #include <asm/gpio.h> | ||
27 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/pci.h> | 27 | #include <asm/mach/pci.h> |
29 | #include <mach/orion5x.h> | 28 | #include <mach/orion5x.h> |
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 23c9e2e5e550..0fbcc14e09d7 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * as published by the Free Software Foundation; either version | 11 | * as published by the Free Software Foundation; either version |
12 | * 2 of the License, or (at your option) any later version. | 12 | * 2 of the License, or (at your option) any later version. |
13 | */ | 13 | */ |
14 | 14 | #include <linux/gpio.h> | |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/serial_reg.h> | 26 | #include <linux/serial_reg.h> |
27 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
28 | #include <asm/gpio.h> | ||
29 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/pci.h> | 29 | #include <asm/mach/pci.h> |
31 | #include <mach/orion5x.h> | 30 | #include <mach/orion5x.h> |
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 1c63a76f3ca3..b8be7d8d0cf4 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * License version 2. This program is licensed "as is" without any | 5 | * License version 2. This program is licensed "as is" without any |
6 | * warranty of any kind, whether express or implied. | 6 | * warranty of any kind, whether express or implied. |
7 | */ | 7 | */ |
8 | 8 | #include <linux/gpio.h> | |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/ethtool.h> | 17 | #include <linux/ethtool.h> |
18 | #include <net/dsa.h> | 18 | #include <net/dsa.h> |
19 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
20 | #include <asm/gpio.h> | ||
21 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
22 | #include <asm/mach/pci.h> | 21 | #include <asm/mach/pci.h> |
23 | #include <mach/orion5x.h> | 22 | #include <mach/orion5x.h> |
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 4fd9f18c9d5d..faf81a039360 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * License version 2. This program is licensed "as is" without any | 5 | * License version 2. This program is licensed "as is" without any |
6 | * warranty of any kind, whether express or implied. | 6 | * warranty of any kind, whether express or implied. |
7 | */ | 7 | */ |
8 | 8 | #include <linux/gpio.h> | |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/input.h> | 20 | #include <linux/input.h> |
21 | #include <net/dsa.h> | 21 | #include <net/dsa.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/gpio.h> | ||
24 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/pci.h> | 24 | #include <asm/mach/pci.h> |
26 | #include <mach/orion5x.h> | 25 | #include <mach/orion5x.h> |
diff --git a/arch/arm/mach-pnx4008/gpio.c b/arch/arm/mach-pnx4008/gpio.c index f219914f5b29..d3e71d3847b4 100644 --- a/arch/arm/mach-pnx4008/gpio.c +++ b/arch/arm/mach-pnx4008/gpio.c | |||
@@ -13,14 +13,13 @@ | |||
13 | * is licensed "as is" without any warranty of any kind, whether express | 13 | * is licensed "as is" without any warranty of any kind, whether express |
14 | * or implied. | 14 | * or implied. |
15 | */ | 15 | */ |
16 | |||
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/io.h> | 19 | #include <linux/io.h> |
21 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
22 | #include <mach/platform.h> | 21 | #include <mach/platform.h> |
23 | #include <mach/gpio.h> | 22 | #include <mach/gpio-pnx4008.h> |
24 | 23 | ||
25 | /* register definitions */ | 24 | /* register definitions */ |
26 | #define PIO_VA_BASE IO_ADDRESS(PNX4008_PIO_BASE) | 25 | #define PIO_VA_BASE IO_ADDRESS(PNX4008_PIO_BASE) |
diff --git a/arch/arm/mach-pnx4008/include/mach/debug-macro.S b/arch/arm/mach-pnx4008/include/mach/debug-macro.S index 931afebaf064..469d60d97f5c 100644 --- a/arch/arm/mach-pnx4008/include/mach/debug-macro.S +++ b/arch/arm/mach-pnx4008/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0x00090000 | 15 | mov \rp, #0x00090000 |
16 | add \rv, \rp, #0xf4000000 @ virtual | 16 | add \rv, \rp, #0xf4000000 @ virtual |
17 | add \rp, \rp, #0x40000000 @ physical | 17 | add \rp, \rp, #0x40000000 @ physical |
diff --git a/arch/arm/mach-pnx4008/include/mach/gpio.h b/arch/arm/mach-pnx4008/include/mach/gpio-pnx4008.h index 9591467eb9ec..41027dd7cf74 100644 --- a/arch/arm/mach-pnx4008/include/mach/gpio.h +++ b/arch/arm/mach-pnx4008/include/mach/gpio-pnx4008.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-pnx4008/include/mach/gpio.h | 2 | * arch/arm/mach-pnx4008/include/mach/gpio-pnx4008.h |
3 | * | 3 | * |
4 | * PNX4008 GPIO driver - header file | 4 | * PNX4008 GPIO driver - header file |
5 | * | 5 | * |
diff --git a/arch/arm/mach-pnx4008/include/mach/memory.h b/arch/arm/mach-pnx4008/include/mach/memory.h deleted file mode 100644 index 1275db61cee5..000000000000 --- a/arch/arm/mach-pnx4008/include/mach/memory.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-pnx4008/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Philips Semiconductors | ||
5 | * Copyright (c) 2005 MontaVista Software, Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H | ||
15 | |||
16 | /* | ||
17 | * Physical DRAM offset. | ||
18 | */ | ||
19 | #define PLAT_PHYS_OFFSET UL(0x80000000) | ||
20 | |||
21 | #endif | ||
diff --git a/arch/arm/mach-pnx4008/serial.c b/arch/arm/mach-pnx4008/serial.c index f40961e51914..374c138ac1ac 100644 --- a/arch/arm/mach-pnx4008/serial.c +++ b/arch/arm/mach-pnx4008/serial.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | |||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/io.h> | 14 | #include <linux/io.h> |
@@ -19,8 +18,8 @@ | |||
19 | 18 | ||
20 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
21 | #include <linux/serial_reg.h> | 20 | #include <linux/serial_reg.h> |
22 | #include <mach/gpio.h> | ||
23 | 21 | ||
22 | #include <mach/gpio-pnx4008.h> | ||
24 | #include <mach/clock.h> | 23 | #include <mach/clock.h> |
25 | 24 | ||
26 | #define UART_3 0 | 25 | #define UART_3 0 |
diff --git a/arch/arm/mach-prima2/include/mach/debug-macro.S b/arch/arm/mach-prima2/include/mach/debug-macro.S index bf75106333ff..cd97492bb075 100644 --- a/arch/arm/mach-prima2/include/mach/debug-macro.S +++ b/arch/arm/mach-prima2/include/mach/debug-macro.S | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <mach/hardware.h> | 9 | #include <mach/hardware.h> |
10 | #include <mach/uart.h> | 10 | #include <mach/uart.h> |
11 | 11 | ||
12 | .macro addruart, rp, rv | 12 | .macro addruart, rp, rv, tmp |
13 | ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical | 13 | ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical |
14 | ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual | 14 | ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual |
15 | .endm | 15 | .endm |
diff --git a/arch/arm/mach-prima2/include/mach/memory.h b/arch/arm/mach-prima2/include/mach/memory.h deleted file mode 100644 index 368cd5a0601a..000000000000 --- a/arch/arm/mach-prima2/include/mach/memory.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2010 – 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_MEMORY_H | ||
10 | #define __ASM_ARCH_MEMORY_H | ||
11 | |||
12 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
13 | |||
14 | /* | ||
15 | * Restrict DMA-able region to workaround silicon limitation. | ||
16 | * The limitation restricts buffers available for DMA to SD/MMC | ||
17 | * hardware to be below 256MB | ||
18 | */ | ||
19 | #define ARM_DMA_ZONE_SIZE (SZ_256M) | ||
20 | |||
21 | #endif | ||
diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c index 9cda2057bcfb..66c6387e5a04 100644 --- a/arch/arm/mach-prima2/l2x0.c +++ b/arch/arm/mach-prima2/l2x0.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/of.h> | 13 | #include <linux/of.h> |
14 | #include <linux/of_address.h> | 14 | #include <linux/of_address.h> |
15 | #include <asm/hardware/cache-l2x0.h> | 15 | #include <asm/hardware/cache-l2x0.h> |
16 | #include <mach/memory.h> | ||
17 | 16 | ||
18 | #define L2X0_ADDR_FILTERING_START 0xC00 | 17 | #define L2X0_ADDR_FILTERING_START 0xC00 |
19 | #define L2X0_ADDR_FILTERING_END 0xC04 | 18 | #define L2X0_ADDR_FILTERING_END 0xC04 |
@@ -41,9 +40,9 @@ static int __init sirfsoc_of_l2x_init(void) | |||
41 | /* | 40 | /* |
42 | * set the physical memory windows L2 cache will cover | 41 | * set the physical memory windows L2 cache will cover |
43 | */ | 42 | */ |
44 | writel_relaxed(PLAT_PHYS_OFFSET + 1024 * 1024 * 1024, | 43 | writel_relaxed(PHYS_OFFSET + 1024 * 1024 * 1024, |
45 | sirfsoc_l2x_base + L2X0_ADDR_FILTERING_END); | 44 | sirfsoc_l2x_base + L2X0_ADDR_FILTERING_END); |
46 | writel_relaxed(PLAT_PHYS_OFFSET | 0x1, | 45 | writel_relaxed(PHYS_OFFSET | 0x1, |
47 | sirfsoc_l2x_base + L2X0_ADDR_FILTERING_START); | 46 | sirfsoc_l2x_base + L2X0_ADDR_FILTERING_START); |
48 | 47 | ||
49 | writel_relaxed(0, | 48 | writel_relaxed(0, |
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/prima2.c index a3918d9994af..ef555c041962 100644 --- a/arch/arm/mach-prima2/prima2.c +++ b/arch/arm/mach-prima2/prima2.c | |||
@@ -36,6 +36,7 @@ MACHINE_START(PRIMA2_EVB, "prima2cb") | |||
36 | .map_io = sirfsoc_map_lluart, | 36 | .map_io = sirfsoc_map_lluart, |
37 | .init_irq = sirfsoc_of_irq_init, | 37 | .init_irq = sirfsoc_of_irq_init, |
38 | .timer = &sirfsoc_timer, | 38 | .timer = &sirfsoc_timer, |
39 | .dma_zone_size = SZ_256M, | ||
39 | .init_machine = sirfsoc_mach_init, | 40 | .init_machine = sirfsoc_mach_init, |
40 | .dt_compat = prima2cb_dt_match, | 41 | .dt_compat = prima2cb_dt_match, |
41 | MACHINE_END | 42 | MACHINE_END |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index cd19309fd3b8..61d3c72ded84 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -2,6 +2,27 @@ if ARCH_PXA | |||
2 | 2 | ||
3 | menu "Intel PXA2xx/PXA3xx Implementations" | 3 | menu "Intel PXA2xx/PXA3xx Implementations" |
4 | 4 | ||
5 | config ARCH_PXA_V7 | ||
6 | bool "ARMv7 (PXA95x) based systems" | ||
7 | |||
8 | if ARCH_PXA_V7 | ||
9 | comment "Marvell Dev Platforms (sorted by hardware release time)" | ||
10 | config MACH_TAVOREVB3 | ||
11 | bool "PXA95x Development Platform (aka TavorEVB III)" | ||
12 | select CPU_PXA955 | ||
13 | |||
14 | config MACH_SAARB | ||
15 | bool "PXA955 Handheld Platform (aka SAARB)" | ||
16 | select CPU_PXA955 | ||
17 | endif | ||
18 | |||
19 | config PXA_V7_MACH_AUTO | ||
20 | def_bool y | ||
21 | depends on ARCH_PXA_V7 | ||
22 | depends on !MACH_SAARB | ||
23 | select MACH_TAVOREVB3 | ||
24 | |||
25 | if !ARCH_PXA_V7 | ||
5 | comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" | 26 | comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" |
6 | 27 | ||
7 | config ARCH_LUBBOCK | 28 | config ARCH_LUBBOCK |
@@ -41,19 +62,11 @@ config MACH_TAVOREVB | |||
41 | select PXA3xx | 62 | select PXA3xx |
42 | select CPU_PXA930 | 63 | select CPU_PXA930 |
43 | 64 | ||
44 | config MACH_TAVOREVB3 | ||
45 | bool "PXA95x Development Platform (aka TavorEVB III)" | ||
46 | select CPU_PXA950 | ||
47 | |||
48 | config MACH_SAAR | 65 | config MACH_SAAR |
49 | bool "PXA930 Handheld Platform (aka SAAR)" | 66 | bool "PXA930 Handheld Platform (aka SAAR)" |
50 | select PXA3xx | 67 | select PXA3xx |
51 | select CPU_PXA930 | 68 | select CPU_PXA930 |
52 | 69 | ||
53 | config MACH_SAARB | ||
54 | bool "PXA955 Handheld Platform (aka SAARB)" | ||
55 | select CPU_PXA955 | ||
56 | |||
57 | comment "Third Party Dev Platforms (sorted by vendor name)" | 70 | comment "Third Party Dev Platforms (sorted by vendor name)" |
58 | 71 | ||
59 | config ARCH_PXA_IDP | 72 | config ARCH_PXA_IDP |
@@ -414,6 +427,7 @@ config MACH_CENTRO | |||
414 | bool "Palm Centro 685 (GSM)" | 427 | bool "Palm Centro 685 (GSM)" |
415 | default y | 428 | default y |
416 | depends on ARCH_PXA_PALM | 429 | depends on ARCH_PXA_PALM |
430 | select MACH_PALM27X | ||
417 | select PXA27x | 431 | select PXA27x |
418 | select IWMMXT | 432 | select IWMMXT |
419 | select PALM_TREO | 433 | select PALM_TREO |
@@ -425,6 +439,7 @@ config MACH_TREO680 | |||
425 | bool "Palm Treo 680" | 439 | bool "Palm Treo 680" |
426 | default y | 440 | default y |
427 | depends on ARCH_PXA_PALM | 441 | depends on ARCH_PXA_PALM |
442 | select MACH_PALM27X | ||
428 | select PXA27x | 443 | select PXA27x |
429 | select IWMMXT | 444 | select IWMMXT |
430 | select PALM_TREO | 445 | select PALM_TREO |
@@ -436,15 +451,18 @@ config MACH_RAUMFELD_RC | |||
436 | bool "Raumfeld Controller" | 451 | bool "Raumfeld Controller" |
437 | select PXA3xx | 452 | select PXA3xx |
438 | select CPU_PXA300 | 453 | select CPU_PXA300 |
454 | select POWER_SUPPLY | ||
439 | select HAVE_PWM | 455 | select HAVE_PWM |
440 | 456 | ||
441 | config MACH_RAUMFELD_CONNECTOR | 457 | config MACH_RAUMFELD_CONNECTOR |
442 | bool "Raumfeld Connector" | 458 | bool "Raumfeld Connector" |
459 | select POWER_SUPPLY | ||
443 | select PXA3xx | 460 | select PXA3xx |
444 | select CPU_PXA300 | 461 | select CPU_PXA300 |
445 | 462 | ||
446 | config MACH_RAUMFELD_SPEAKER | 463 | config MACH_RAUMFELD_SPEAKER |
447 | bool "Raumfeld Speaker" | 464 | bool "Raumfeld Speaker" |
465 | select POWER_SUPPLY | ||
448 | select PXA3xx | 466 | select PXA3xx |
449 | select CPU_PXA300 | 467 | select CPU_PXA300 |
450 | 468 | ||
@@ -598,7 +616,7 @@ config MACH_ZIPIT2 | |||
598 | bool "Zipit Z2 Handheld" | 616 | bool "Zipit Z2 Handheld" |
599 | select PXA27x | 617 | select PXA27x |
600 | select HAVE_PWM | 618 | select HAVE_PWM |
601 | 619 | endif | |
602 | endmenu | 620 | endmenu |
603 | 621 | ||
604 | config PXA25x | 622 | config PXA25x |
@@ -688,6 +706,8 @@ config SHARPSL_PM | |||
688 | config SHARPSL_PM_MAX1111 | 706 | config SHARPSL_PM_MAX1111 |
689 | bool | 707 | bool |
690 | select HWMON | 708 | select HWMON |
709 | select SPI | ||
710 | select SPI_MASTER | ||
691 | select SENSORS_MAX1111 | 711 | select SENSORS_MAX1111 |
692 | 712 | ||
693 | config PXA_HAVE_ISA_IRQS | 713 | config PXA_HAVE_ISA_IRQS |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index cc39d17b2e07..be0f7df8685c 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -19,7 +19,7 @@ endif | |||
19 | obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa25x.o | 19 | obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa25x.o |
20 | obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa27x.o | 20 | obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa27x.o |
21 | obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o clock-pxa3xx.o pxa3xx.o smemc.o pxa3xx-ulpi.o | 21 | obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o clock-pxa3xx.o pxa3xx.o smemc.o pxa3xx-ulpi.o |
22 | obj-$(CONFIG_PXA95x) += mfp-pxa3xx.o clock-pxa3xx.o pxa95x.o smemc.o | 22 | obj-$(CONFIG_PXA95x) += mfp-pxa3xx.o clock-pxa3xx.o pxa3xx.o pxa95x.o smemc.o |
23 | obj-$(CONFIG_CPU_PXA300) += pxa300.o | 23 | obj-$(CONFIG_CPU_PXA300) += pxa300.o |
24 | obj-$(CONFIG_CPU_PXA320) += pxa320.o | 24 | obj-$(CONFIG_CPU_PXA320) += pxa320.o |
25 | obj-$(CONFIG_CPU_PXA930) += pxa930.o | 25 | obj-$(CONFIG_CPU_PXA930) += pxa930.o |
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 7765d677adbb..fc0b8544e174 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
@@ -591,7 +591,7 @@ static void balloon3_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ct | |||
591 | BALLOON3_NAND_CONTROL_REG); | 591 | BALLOON3_NAND_CONTROL_REG); |
592 | if (balloon3_ctl_set) | 592 | if (balloon3_ctl_set) |
593 | __raw_writel(balloon3_ctl_set, | 593 | __raw_writel(balloon3_ctl_set, |
594 | BALLOON3_NAND_CONTROL_REG | | 594 | BALLOON3_NAND_CONTROL_REG + |
595 | BALLOON3_FPGA_SETnCLR); | 595 | BALLOON3_FPGA_SETnCLR); |
596 | } | 596 | } |
597 | 597 | ||
@@ -608,7 +608,7 @@ static void balloon3_nand_select_chip(struct mtd_info *mtd, int chip) | |||
608 | __raw_writew( | 608 | __raw_writew( |
609 | BALLOON3_NAND_CONTROL_FLCE0 | BALLOON3_NAND_CONTROL_FLCE1 | | 609 | BALLOON3_NAND_CONTROL_FLCE0 | BALLOON3_NAND_CONTROL_FLCE1 | |
610 | BALLOON3_NAND_CONTROL_FLCE2 | BALLOON3_NAND_CONTROL_FLCE3, | 610 | BALLOON3_NAND_CONTROL_FLCE2 | BALLOON3_NAND_CONTROL_FLCE3, |
611 | BALLOON3_NAND_CONTROL_REG | BALLOON3_FPGA_SETnCLR); | 611 | BALLOON3_NAND_CONTROL_REG + BALLOON3_FPGA_SETnCLR); |
612 | 612 | ||
613 | /* Deassert correct nCE line */ | 613 | /* Deassert correct nCE line */ |
614 | __raw_writew(BALLOON3_NAND_CONTROL_FLCE0 << chip, | 614 | __raw_writew(BALLOON3_NAND_CONTROL_FLCE0 << chip, |
@@ -626,7 +626,7 @@ static int balloon3_nand_probe(struct platform_device *pdev) | |||
626 | int ret; | 626 | int ret; |
627 | 627 | ||
628 | __raw_writew(BALLOON3_NAND_CONTROL2_16BIT, | 628 | __raw_writew(BALLOON3_NAND_CONTROL2_16BIT, |
629 | BALLOON3_NAND_CONTROL2_REG | BALLOON3_FPGA_SETnCLR); | 629 | BALLOON3_NAND_CONTROL2_REG + BALLOON3_FPGA_SETnCLR); |
630 | 630 | ||
631 | ver = __raw_readw(BALLOON3_FPGA_VER); | 631 | ver = __raw_readw(BALLOON3_FPGA_VER); |
632 | if (ver < 0x4f08) | 632 | if (ver < 0x4f08) |
@@ -649,7 +649,7 @@ static int balloon3_nand_probe(struct platform_device *pdev) | |||
649 | BALLOON3_NAND_CONTROL_FLCE0 | BALLOON3_NAND_CONTROL_FLCE1 | | 649 | BALLOON3_NAND_CONTROL_FLCE0 | BALLOON3_NAND_CONTROL_FLCE1 | |
650 | BALLOON3_NAND_CONTROL_FLCE2 | BALLOON3_NAND_CONTROL_FLCE3 | | 650 | BALLOON3_NAND_CONTROL_FLCE2 | BALLOON3_NAND_CONTROL_FLCE3 | |
651 | BALLOON3_NAND_CONTROL_FLWP, | 651 | BALLOON3_NAND_CONTROL_FLWP, |
652 | BALLOON3_NAND_CONTROL_REG | BALLOON3_FPGA_SETnCLR); | 652 | BALLOON3_NAND_CONTROL_REG + BALLOON3_FPGA_SETnCLR); |
653 | return 0; | 653 | return 0; |
654 | 654 | ||
655 | err2: | 655 | err2: |
@@ -807,7 +807,7 @@ static void __init balloon3_init(void) | |||
807 | 807 | ||
808 | static struct map_desc balloon3_io_desc[] __initdata = { | 808 | static struct map_desc balloon3_io_desc[] __initdata = { |
809 | { /* CPLD/FPGA */ | 809 | { /* CPLD/FPGA */ |
810 | .virtual = BALLOON3_FPGA_VIRT, | 810 | .virtual = (unsigned long)BALLOON3_FPGA_VIRT, |
811 | .pfn = __phys_to_pfn(BALLOON3_FPGA_PHYS), | 811 | .pfn = __phys_to_pfn(BALLOON3_FPGA_PHYS), |
812 | .length = BALLOON3_FPGA_LENGTH, | 812 | .length = BALLOON3_FPGA_LENGTH, |
813 | .type = MT_DEVICE, | 813 | .type = MT_DEVICE, |
diff --git a/arch/arm/mach-pxa/cm-x255.c b/arch/arm/mach-pxa/cm-x255.c index 93f59f877fc6..be751470d37b 100644 --- a/arch/arm/mach-pxa/cm-x255.c +++ b/arch/arm/mach-pxa/cm-x255.c | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/gpio.h> | ||
15 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
16 | #include <linux/mtd/physmap.h> | 15 | #include <linux/mtd/physmap.h> |
17 | #include <linux/mtd/nand-gpio.h> | 16 | #include <linux/mtd/nand-gpio.h> |
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c index 6bf479d9b5ac..ebd9259f5ac9 100644 --- a/arch/arm/mach-pxa/cm-x2xx-pci.c +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include <asm/hardware/it8152.h> | 27 | #include <asm/hardware/it8152.h> |
28 | 28 | ||
29 | unsigned long it8152_base_address; | 29 | void __iomem *it8152_base_address; |
30 | static int cmx2xx_it8152_irq_gpio; | 30 | static int cmx2xx_it8152_irq_gpio; |
31 | 31 | ||
32 | static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) | 32 | static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) |
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index 349896c53abd..f2e4190080cb 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c | |||
@@ -39,7 +39,7 @@ extern void cmx270_init(void); | |||
39 | #define CMX2XX_NR_IRQS (IRQ_BOARD_START + 40) | 39 | #define CMX2XX_NR_IRQS (IRQ_BOARD_START + 40) |
40 | 40 | ||
41 | /* virtual addresses for statically mapped regions */ | 41 | /* virtual addresses for statically mapped regions */ |
42 | #define CMX2XX_VIRT_BASE (0xe8000000) | 42 | #define CMX2XX_VIRT_BASE (void __iomem *)(0xe8000000) |
43 | #define CMX2XX_IT8152_VIRT (CMX2XX_VIRT_BASE) | 43 | #define CMX2XX_IT8152_VIRT (CMX2XX_VIRT_BASE) |
44 | 44 | ||
45 | /* physical address if local-bus attached devices */ | 45 | /* physical address if local-bus attached devices */ |
@@ -482,7 +482,7 @@ static void __init cmx2xx_init_irq(void) | |||
482 | /* Map PCI companion statically */ | 482 | /* Map PCI companion statically */ |
483 | static struct map_desc cmx2xx_io_desc[] __initdata = { | 483 | static struct map_desc cmx2xx_io_desc[] __initdata = { |
484 | [0] = { /* PCI bridge */ | 484 | [0] = { /* PCI bridge */ |
485 | .virtual = CMX2XX_IT8152_VIRT, | 485 | .virtual = (unsigned long)CMX2XX_IT8152_VIRT, |
486 | .pfn = __phys_to_pfn(PXA_CS4_PHYS), | 486 | .pfn = __phys_to_pfn(PXA_CS4_PHYS), |
487 | .length = SZ_64M, | 487 | .length = SZ_64M, |
488 | .type = MT_DEVICE | 488 | .type = MT_DEVICE |
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 9ac0225cd51b..e40dc47cf2f1 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -775,7 +775,6 @@ static struct gpio cm_x300_wi2wi_gpios[] __initdata = { | |||
775 | 775 | ||
776 | static void __init cm_x300_init_wi2wi(void) | 776 | static void __init cm_x300_init_wi2wi(void) |
777 | { | 777 | { |
778 | int bt_reset, wlan_en; | ||
779 | int err; | 778 | int err; |
780 | 779 | ||
781 | if (system_rev < 130) { | 780 | if (system_rev < 130) { |
@@ -791,12 +790,11 @@ static void __init cm_x300_init_wi2wi(void) | |||
791 | } | 790 | } |
792 | 791 | ||
793 | udelay(10); | 792 | udelay(10); |
794 | gpio_set_value(bt_reset, 0); | 793 | gpio_set_value(cm_x300_wi2wi_gpios[1].gpio, 0); |
795 | udelay(10); | 794 | udelay(10); |
796 | gpio_set_value(bt_reset, 1); | 795 | gpio_set_value(cm_x300_wi2wi_gpios[1].gpio, 1); |
797 | 796 | ||
798 | gpio_free(wlan_en); | 797 | gpio_free_array(ARRAY_AND_SIZE(cm_x300_wi2wi_gpios)); |
799 | gpio_free(bt_reset); | ||
800 | } | 798 | } |
801 | 799 | ||
802 | /* MFP */ | 800 | /* MFP */ |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index f5d91efc2965..5432ecb15def 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * initialization stuff for PXA machines which can be overridden later if | 16 | * initialization stuff for PXA machines which can be overridden later if |
17 | * need be. | 17 | * need be. |
18 | */ | 18 | */ |
19 | #include <linux/gpio.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
@@ -26,7 +27,6 @@ | |||
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
27 | 28 | ||
28 | #include <mach/reset.h> | 29 | #include <mach/reset.h> |
29 | #include <mach/gpio.h> | ||
30 | #include <mach/smemc.h> | 30 | #include <mach/smemc.h> |
31 | #include <mach/pxa3xx-regs.h> | 31 | #include <mach/pxa3xx-regs.h> |
32 | 32 | ||
diff --git a/arch/arm/mach-pxa/include/mach/addr-map.h b/arch/arm/mach-pxa/include/mach/addr-map.h index f4c03659168c..bbf9df37ad4b 100644 --- a/arch/arm/mach-pxa/include/mach/addr-map.h +++ b/arch/arm/mach-pxa/include/mach/addr-map.h | |||
@@ -20,7 +20,7 @@ | |||
20 | * Peripheral Bus | 20 | * Peripheral Bus |
21 | */ | 21 | */ |
22 | #define PERIPH_PHYS 0x40000000 | 22 | #define PERIPH_PHYS 0x40000000 |
23 | #define PERIPH_VIRT 0xf2000000 | 23 | #define PERIPH_VIRT IOMEM(0xf2000000) |
24 | #define PERIPH_SIZE 0x02000000 | 24 | #define PERIPH_SIZE 0x02000000 |
25 | 25 | ||
26 | /* | 26 | /* |
@@ -28,21 +28,21 @@ | |||
28 | */ | 28 | */ |
29 | #define PXA2XX_SMEMC_PHYS 0x48000000 | 29 | #define PXA2XX_SMEMC_PHYS 0x48000000 |
30 | #define PXA3XX_SMEMC_PHYS 0x4a000000 | 30 | #define PXA3XX_SMEMC_PHYS 0x4a000000 |
31 | #define SMEMC_VIRT 0xf6000000 | 31 | #define SMEMC_VIRT IOMEM(0xf6000000) |
32 | #define SMEMC_SIZE 0x00100000 | 32 | #define SMEMC_SIZE 0x00100000 |
33 | 33 | ||
34 | /* | 34 | /* |
35 | * Dynamic Memory Controller (only on PXA3xx) | 35 | * Dynamic Memory Controller (only on PXA3xx) |
36 | */ | 36 | */ |
37 | #define DMEMC_PHYS 0x48100000 | 37 | #define DMEMC_PHYS 0x48100000 |
38 | #define DMEMC_VIRT 0xf6100000 | 38 | #define DMEMC_VIRT IOMEM(0xf6100000) |
39 | #define DMEMC_SIZE 0x00100000 | 39 | #define DMEMC_SIZE 0x00100000 |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * Internal Memory Controller (PXA27x and later) | 42 | * Internal Memory Controller (PXA27x and later) |
43 | */ | 43 | */ |
44 | #define IMEMC_PHYS 0x58000000 | 44 | #define IMEMC_PHYS 0x58000000 |
45 | #define IMEMC_VIRT 0xfe000000 | 45 | #define IMEMC_VIRT IOMEM(0xfe000000) |
46 | #define IMEMC_SIZE 0x00100000 | 46 | #define IMEMC_SIZE 0x00100000 |
47 | 47 | ||
48 | #endif /* __ASM_MACH_ADDR_MAP_H */ | 48 | #endif /* __ASM_MACH_ADDR_MAP_H */ |
diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/include/mach/balloon3.h index 7074e76146c9..6d7eab3d0867 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/include/mach/balloon3.h | |||
@@ -23,7 +23,7 @@ enum balloon3_features { | |||
23 | }; | 23 | }; |
24 | 24 | ||
25 | #define BALLOON3_FPGA_PHYS PXA_CS4_PHYS | 25 | #define BALLOON3_FPGA_PHYS PXA_CS4_PHYS |
26 | #define BALLOON3_FPGA_VIRT (0xf1000000) /* as per balloon2 */ | 26 | #define BALLOON3_FPGA_VIRT IOMEM(0xf1000000) /* as per balloon2 */ |
27 | #define BALLOON3_FPGA_LENGTH 0x01000000 | 27 | #define BALLOON3_FPGA_LENGTH 0x01000000 |
28 | 28 | ||
29 | #define BALLOON3_FPGA_SETnCLR (0x1000) | 29 | #define BALLOON3_FPGA_SETnCLR (0x1000) |
diff --git a/arch/arm/mach-pxa/include/mach/debug-macro.S b/arch/arm/mach-pxa/include/mach/debug-macro.S index 7d5c75125d65..70b112e8ef68 100644 --- a/arch/arm/mach-pxa/include/mach/debug-macro.S +++ b/arch/arm/mach-pxa/include/mach/debug-macro.S | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include "hardware.h" | 14 | #include "hardware.h" |
15 | 15 | ||
16 | .macro addruart, rp, rv | 16 | .macro addruart, rp, rv, tmp |
17 | mov \rp, #0x00100000 | 17 | mov \rp, #0x00100000 |
18 | orr \rv, \rp, #io_p2v(0x40000000) @ virtual | 18 | orr \rv, \rp, #io_p2v(0x40000000) @ virtual |
19 | orr \rp, \rp, #0x40000000 @ physical | 19 | orr \rp, \rp, #0x40000000 @ physical |
diff --git a/arch/arm/mach-pxa/include/mach/gpio-pxa.h b/arch/arm/mach-pxa/include/mach/gpio-pxa.h new file mode 100644 index 000000000000..576868f8b8c5 --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/gpio-pxa.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* | ||
2 | * Written by Philipp Zabel <philipp.zabel@gmail.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | * | ||
18 | */ | ||
19 | #ifndef __MACH_PXA_GPIO_PXA_H | ||
20 | #define __MACH_PXA_GPIO_PXA_H | ||
21 | |||
22 | #include <mach/irqs.h> | ||
23 | #include <mach/hardware.h> | ||
24 | |||
25 | #define GPIO_REGS_VIRT io_p2v(0x40E00000) | ||
26 | |||
27 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | ||
28 | #define GPIO_REG(x) (GPIO_REGS_VIRT + (x)) | ||
29 | |||
30 | /* GPIO Pin Level Registers */ | ||
31 | #define GPLR0 GPIO_REG(BANK_OFF(0) + 0x00) | ||
32 | #define GPLR1 GPIO_REG(BANK_OFF(1) + 0x00) | ||
33 | #define GPLR2 GPIO_REG(BANK_OFF(2) + 0x00) | ||
34 | #define GPLR3 GPIO_REG(BANK_OFF(3) + 0x00) | ||
35 | |||
36 | /* GPIO Pin Direction Registers */ | ||
37 | #define GPDR0 GPIO_REG(BANK_OFF(0) + 0x0c) | ||
38 | #define GPDR1 GPIO_REG(BANK_OFF(1) + 0x0c) | ||
39 | #define GPDR2 GPIO_REG(BANK_OFF(2) + 0x0c) | ||
40 | #define GPDR3 GPIO_REG(BANK_OFF(3) + 0x0c) | ||
41 | |||
42 | /* GPIO Pin Output Set Registers */ | ||
43 | #define GPSR0 GPIO_REG(BANK_OFF(0) + 0x18) | ||
44 | #define GPSR1 GPIO_REG(BANK_OFF(1) + 0x18) | ||
45 | #define GPSR2 GPIO_REG(BANK_OFF(2) + 0x18) | ||
46 | #define GPSR3 GPIO_REG(BANK_OFF(3) + 0x18) | ||
47 | |||
48 | /* GPIO Pin Output Clear Registers */ | ||
49 | #define GPCR0 GPIO_REG(BANK_OFF(0) + 0x24) | ||
50 | #define GPCR1 GPIO_REG(BANK_OFF(1) + 0x24) | ||
51 | #define GPCR2 GPIO_REG(BANK_OFF(2) + 0x24) | ||
52 | #define GPCR3 GPIO_REG(BANK_OFF(3) + 0x24) | ||
53 | |||
54 | /* GPIO Rising Edge Detect Registers */ | ||
55 | #define GRER0 GPIO_REG(BANK_OFF(0) + 0x30) | ||
56 | #define GRER1 GPIO_REG(BANK_OFF(1) + 0x30) | ||
57 | #define GRER2 GPIO_REG(BANK_OFF(2) + 0x30) | ||
58 | #define GRER3 GPIO_REG(BANK_OFF(3) + 0x30) | ||
59 | |||
60 | /* GPIO Falling Edge Detect Registers */ | ||
61 | #define GFER0 GPIO_REG(BANK_OFF(0) + 0x3c) | ||
62 | #define GFER1 GPIO_REG(BANK_OFF(1) + 0x3c) | ||
63 | #define GFER2 GPIO_REG(BANK_OFF(2) + 0x3c) | ||
64 | #define GFER3 GPIO_REG(BANK_OFF(3) + 0x3c) | ||
65 | |||
66 | /* GPIO Edge Detect Status Registers */ | ||
67 | #define GEDR0 GPIO_REG(BANK_OFF(0) + 0x48) | ||
68 | #define GEDR1 GPIO_REG(BANK_OFF(1) + 0x48) | ||
69 | #define GEDR2 GPIO_REG(BANK_OFF(2) + 0x48) | ||
70 | #define GEDR3 GPIO_REG(BANK_OFF(3) + 0x48) | ||
71 | |||
72 | /* GPIO Alternate Function Select Registers */ | ||
73 | #define GAFR0_L GPIO_REG(0x0054) | ||
74 | #define GAFR0_U GPIO_REG(0x0058) | ||
75 | #define GAFR1_L GPIO_REG(0x005C) | ||
76 | #define GAFR1_U GPIO_REG(0x0060) | ||
77 | #define GAFR2_L GPIO_REG(0x0064) | ||
78 | #define GAFR2_U GPIO_REG(0x0068) | ||
79 | #define GAFR3_L GPIO_REG(0x006C) | ||
80 | #define GAFR3_U GPIO_REG(0x0070) | ||
81 | |||
82 | /* More handy macros. The argument is a literal GPIO number. */ | ||
83 | |||
84 | #define GPIO_bit(x) (1 << ((x) & 0x1f)) | ||
85 | |||
86 | #define GPLR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x00) | ||
87 | #define GPDR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x0c) | ||
88 | #define GPSR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x18) | ||
89 | #define GPCR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x24) | ||
90 | #define GRER(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x30) | ||
91 | #define GFER(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x3c) | ||
92 | #define GEDR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x48) | ||
93 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) | ||
94 | |||
95 | |||
96 | #define NR_BUILTIN_GPIO PXA_GPIO_IRQ_NUM | ||
97 | |||
98 | #define gpio_to_bank(gpio) ((gpio) >> 5) | ||
99 | |||
100 | #ifdef CONFIG_CPU_PXA26x | ||
101 | /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted, | ||
102 | * as well as their Alternate Function value being '1' for GPIO in GAFRx. | ||
103 | */ | ||
104 | static inline int __gpio_is_inverted(unsigned gpio) | ||
105 | { | ||
106 | return cpu_is_pxa25x() && gpio > 85; | ||
107 | } | ||
108 | #else | ||
109 | static inline int __gpio_is_inverted(unsigned gpio) { return 0; } | ||
110 | #endif | ||
111 | |||
112 | /* | ||
113 | * On PXA25x and PXA27x, GAFRx and GPDRx together decide the alternate | ||
114 | * function of a GPIO, and GPDRx cannot be altered once configured. It | ||
115 | * is attributed as "occupied" here (I know this terminology isn't | ||
116 | * accurate, you are welcome to propose a better one :-) | ||
117 | */ | ||
118 | static inline int __gpio_is_occupied(unsigned gpio) | ||
119 | { | ||
120 | if (cpu_is_pxa27x() || cpu_is_pxa25x()) { | ||
121 | int af = (GAFR(gpio) >> ((gpio & 0xf) * 2)) & 0x3; | ||
122 | int dir = GPDR(gpio) & GPIO_bit(gpio); | ||
123 | |||
124 | if (__gpio_is_inverted(gpio)) | ||
125 | return af != 1 || dir == 0; | ||
126 | else | ||
127 | return af != 0 || dir != 0; | ||
128 | } else | ||
129 | return GPDR(gpio) & GPIO_bit(gpio); | ||
130 | } | ||
131 | |||
132 | #include <plat/gpio-pxa.h> | ||
133 | #endif /* __MACH_PXA_GPIO_PXA_H */ | ||
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h index c4639502efca..004cade7bb13 100644 --- a/arch/arm/mach-pxa/include/mach/gpio.h +++ b/arch/arm/mach-pxa/include/mach/gpio.h | |||
@@ -24,84 +24,10 @@ | |||
24 | #ifndef __ASM_ARCH_PXA_GPIO_H | 24 | #ifndef __ASM_ARCH_PXA_GPIO_H |
25 | #define __ASM_ARCH_PXA_GPIO_H | 25 | #define __ASM_ARCH_PXA_GPIO_H |
26 | 26 | ||
27 | #include <mach/irqs.h> | ||
28 | #include <mach/hardware.h> | ||
29 | #include <asm-generic/gpio.h> | 27 | #include <asm-generic/gpio.h> |
28 | /* The defines for the driver are needed for the accelerated accessors */ | ||
29 | #include "gpio-pxa.h" | ||
30 | 30 | ||
31 | #define GPIO_REGS_VIRT io_p2v(0x40E00000) | ||
32 | |||
33 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | ||
34 | #define GPIO_REG(x) (*(volatile u32 *)(GPIO_REGS_VIRT + (x))) | ||
35 | |||
36 | /* GPIO Pin Level Registers */ | ||
37 | #define GPLR0 GPIO_REG(BANK_OFF(0) + 0x00) | ||
38 | #define GPLR1 GPIO_REG(BANK_OFF(1) + 0x00) | ||
39 | #define GPLR2 GPIO_REG(BANK_OFF(2) + 0x00) | ||
40 | #define GPLR3 GPIO_REG(BANK_OFF(3) + 0x00) | ||
41 | |||
42 | /* GPIO Pin Direction Registers */ | ||
43 | #define GPDR0 GPIO_REG(BANK_OFF(0) + 0x0c) | ||
44 | #define GPDR1 GPIO_REG(BANK_OFF(1) + 0x0c) | ||
45 | #define GPDR2 GPIO_REG(BANK_OFF(2) + 0x0c) | ||
46 | #define GPDR3 GPIO_REG(BANK_OFF(3) + 0x0c) | ||
47 | |||
48 | /* GPIO Pin Output Set Registers */ | ||
49 | #define GPSR0 GPIO_REG(BANK_OFF(0) + 0x18) | ||
50 | #define GPSR1 GPIO_REG(BANK_OFF(1) + 0x18) | ||
51 | #define GPSR2 GPIO_REG(BANK_OFF(2) + 0x18) | ||
52 | #define GPSR3 GPIO_REG(BANK_OFF(3) + 0x18) | ||
53 | |||
54 | /* GPIO Pin Output Clear Registers */ | ||
55 | #define GPCR0 GPIO_REG(BANK_OFF(0) + 0x24) | ||
56 | #define GPCR1 GPIO_REG(BANK_OFF(1) + 0x24) | ||
57 | #define GPCR2 GPIO_REG(BANK_OFF(2) + 0x24) | ||
58 | #define GPCR3 GPIO_REG(BANK_OFF(3) + 0x24) | ||
59 | |||
60 | /* GPIO Rising Edge Detect Registers */ | ||
61 | #define GRER0 GPIO_REG(BANK_OFF(0) + 0x30) | ||
62 | #define GRER1 GPIO_REG(BANK_OFF(1) + 0x30) | ||
63 | #define GRER2 GPIO_REG(BANK_OFF(2) + 0x30) | ||
64 | #define GRER3 GPIO_REG(BANK_OFF(3) + 0x30) | ||
65 | |||
66 | /* GPIO Falling Edge Detect Registers */ | ||
67 | #define GFER0 GPIO_REG(BANK_OFF(0) + 0x3c) | ||
68 | #define GFER1 GPIO_REG(BANK_OFF(1) + 0x3c) | ||
69 | #define GFER2 GPIO_REG(BANK_OFF(2) + 0x3c) | ||
70 | #define GFER3 GPIO_REG(BANK_OFF(3) + 0x3c) | ||
71 | |||
72 | /* GPIO Edge Detect Status Registers */ | ||
73 | #define GEDR0 GPIO_REG(BANK_OFF(0) + 0x48) | ||
74 | #define GEDR1 GPIO_REG(BANK_OFF(1) + 0x48) | ||
75 | #define GEDR2 GPIO_REG(BANK_OFF(2) + 0x48) | ||
76 | #define GEDR3 GPIO_REG(BANK_OFF(3) + 0x48) | ||
77 | |||
78 | /* GPIO Alternate Function Select Registers */ | ||
79 | #define GAFR0_L GPIO_REG(0x0054) | ||
80 | #define GAFR0_U GPIO_REG(0x0058) | ||
81 | #define GAFR1_L GPIO_REG(0x005C) | ||
82 | #define GAFR1_U GPIO_REG(0x0060) | ||
83 | #define GAFR2_L GPIO_REG(0x0064) | ||
84 | #define GAFR2_U GPIO_REG(0x0068) | ||
85 | #define GAFR3_L GPIO_REG(0x006C) | ||
86 | #define GAFR3_U GPIO_REG(0x0070) | ||
87 | |||
88 | /* More handy macros. The argument is a literal GPIO number. */ | ||
89 | |||
90 | #define GPIO_bit(x) (1 << ((x) & 0x1f)) | ||
91 | |||
92 | #define GPLR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x00) | ||
93 | #define GPDR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x0c) | ||
94 | #define GPSR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x18) | ||
95 | #define GPCR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x24) | ||
96 | #define GRER(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x30) | ||
97 | #define GFER(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x3c) | ||
98 | #define GEDR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x48) | ||
99 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) | ||
100 | |||
101 | |||
102 | #define NR_BUILTIN_GPIO PXA_GPIO_IRQ_NUM | ||
103 | |||
104 | #define gpio_to_bank(gpio) ((gpio) >> 5) | ||
105 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) | 31 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) |
106 | 32 | ||
107 | static inline int irq_to_gpio(unsigned int irq) | 33 | static inline int irq_to_gpio(unsigned int irq) |
@@ -118,37 +44,5 @@ static inline int irq_to_gpio(unsigned int irq) | |||
118 | return -1; | 44 | return -1; |
119 | } | 45 | } |
120 | 46 | ||
121 | #ifdef CONFIG_CPU_PXA26x | ||
122 | /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted, | ||
123 | * as well as their Alternate Function value being '1' for GPIO in GAFRx. | ||
124 | */ | ||
125 | static inline int __gpio_is_inverted(unsigned gpio) | ||
126 | { | ||
127 | return cpu_is_pxa25x() && gpio > 85; | ||
128 | } | ||
129 | #else | ||
130 | static inline int __gpio_is_inverted(unsigned gpio) { return 0; } | ||
131 | #endif | ||
132 | |||
133 | /* | ||
134 | * On PXA25x and PXA27x, GAFRx and GPDRx together decide the alternate | ||
135 | * function of a GPIO, and GPDRx cannot be altered once configured. It | ||
136 | * is attributed as "occupied" here (I know this terminology isn't | ||
137 | * accurate, you are welcome to propose a better one :-) | ||
138 | */ | ||
139 | static inline int __gpio_is_occupied(unsigned gpio) | ||
140 | { | ||
141 | if (cpu_is_pxa27x() || cpu_is_pxa25x()) { | ||
142 | int af = (GAFR(gpio) >> ((gpio & 0xf) * 2)) & 0x3; | ||
143 | int dir = GPDR(gpio) & GPIO_bit(gpio); | ||
144 | |||
145 | if (__gpio_is_inverted(gpio)) | ||
146 | return af != 1 || dir == 0; | ||
147 | else | ||
148 | return af != 0 || dir != 0; | ||
149 | } else | ||
150 | return GPDR(gpio) & GPIO_bit(gpio); | ||
151 | } | ||
152 | |||
153 | #include <plat/gpio.h> | 47 | #include <plat/gpio.h> |
154 | #endif | 48 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index de63ca3016b4..8184669dde28 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h | |||
@@ -36,22 +36,23 @@ | |||
36 | * Note that not all PXA2xx chips implement all those addresses, and the | 36 | * Note that not all PXA2xx chips implement all those addresses, and the |
37 | * kernel only maps the minimum needed range of this mapping. | 37 | * kernel only maps the minimum needed range of this mapping. |
38 | */ | 38 | */ |
39 | #define io_p2v(x) (0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1)) | ||
40 | #define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1)) | 39 | #define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1)) |
40 | #define io_p2v(x) IOMEM(0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1)) | ||
41 | 41 | ||
42 | #ifndef __ASSEMBLY__ | 42 | #ifndef __ASSEMBLY__ |
43 | 43 | # define IOMEM(x) ((void __iomem *)(x)) | |
44 | # define __REG(x) (*((volatile u32 *)io_p2v(x))) | 44 | # define __REG(x) (*((volatile u32 __iomem *)io_p2v(x))) |
45 | 45 | ||
46 | /* With indexed regs we don't want to feed the index through io_p2v() | 46 | /* With indexed regs we don't want to feed the index through io_p2v() |
47 | especially if it is a variable, otherwise horrible code will result. */ | 47 | especially if it is a variable, otherwise horrible code will result. */ |
48 | # define __REG2(x,y) \ | 48 | # define __REG2(x,y) \ |
49 | (*(volatile u32 *)((u32)&__REG(x) + (y))) | 49 | (*(volatile u32 __iomem*)((u32)&__REG(x) + (y))) |
50 | 50 | ||
51 | # define __PREG(x) (io_v2p((u32)&(x))) | 51 | # define __PREG(x) (io_v2p((u32)&(x))) |
52 | 52 | ||
53 | #else | 53 | #else |
54 | 54 | ||
55 | # define IOMEM(x) x | ||
55 | # define __REG(x) io_p2v(x) | 56 | # define __REG(x) io_p2v(x) |
56 | # define __PREG(x) io_v2p(x) | 57 | # define __PREG(x) io_v2p(x) |
57 | 58 | ||
diff --git a/arch/arm/mach-pxa/include/mach/littleton.h b/arch/arm/mach-pxa/include/mach/littleton.h index 2a5726c15e0e..b6238cbd8aea 100644 --- a/arch/arm/mach-pxa/include/mach/littleton.h +++ b/arch/arm/mach-pxa/include/mach/littleton.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_ARCH_LITTLETON_H | 1 | #ifndef __ASM_ARCH_LITTLETON_H |
2 | #define __ASM_ARCH_LITTLETON_H | 2 | #define __ASM_ARCH_LITTLETON_H |
3 | 3 | ||
4 | #include <mach/gpio.h> | 4 | #include <mach/gpio-pxa.h> |
5 | 5 | ||
6 | #define LITTLETON_ETH_PHYS 0x30000000 | 6 | #define LITTLETON_ETH_PHYS 0x30000000 |
7 | 7 | ||
diff --git a/arch/arm/mach-pxa/include/mach/lpd270.h b/arch/arm/mach-pxa/include/mach/lpd270.h index cd070092b6eb..4edc712a2de8 100644 --- a/arch/arm/mach-pxa/include/mach/lpd270.h +++ b/arch/arm/mach-pxa/include/mach/lpd270.h | |||
@@ -13,13 +13,13 @@ | |||
13 | #define __ASM_ARCH_LPD270_H | 13 | #define __ASM_ARCH_LPD270_H |
14 | 14 | ||
15 | #define LPD270_CPLD_PHYS PXA_CS2_PHYS | 15 | #define LPD270_CPLD_PHYS PXA_CS2_PHYS |
16 | #define LPD270_CPLD_VIRT 0xf0000000 | 16 | #define LPD270_CPLD_VIRT IOMEM(0xf0000000) |
17 | #define LPD270_CPLD_SIZE 0x00100000 | 17 | #define LPD270_CPLD_SIZE 0x00100000 |
18 | 18 | ||
19 | #define LPD270_ETH_PHYS (PXA_CS2_PHYS + 0x01000000) | 19 | #define LPD270_ETH_PHYS (PXA_CS2_PHYS + 0x01000000) |
20 | 20 | ||
21 | /* CPLD registers */ | 21 | /* CPLD registers */ |
22 | #define LPD270_CPLD_REG(x) ((unsigned long)(LPD270_CPLD_VIRT + (x))) | 22 | #define LPD270_CPLD_REG(x) (LPD270_CPLD_VIRT + (x)) |
23 | #define LPD270_CONTROL LPD270_CPLD_REG(0x00) | 23 | #define LPD270_CONTROL LPD270_CPLD_REG(0x00) |
24 | #define LPD270_PERIPHERAL0 LPD270_CPLD_REG(0x04) | 24 | #define LPD270_PERIPHERAL0 LPD270_CPLD_REG(0x04) |
25 | #define LPD270_PERIPHERAL1 LPD270_CPLD_REG(0x08) | 25 | #define LPD270_PERIPHERAL1 LPD270_CPLD_REG(0x08) |
diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h deleted file mode 100644 index d05a59727d66..000000000000 --- a/arch/arm/mach-pxa/include/mach/memory.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-pxa/include/mach/memory.h | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Copyright: (C) 2001 MontaVista Software Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_MEMORY_H | ||
13 | #define __ASM_ARCH_MEMORY_H | ||
14 | |||
15 | /* | ||
16 | * Physical DRAM offset. | ||
17 | */ | ||
18 | #define PLAT_PHYS_OFFSET UL(0xa0000000) | ||
19 | |||
20 | #endif | ||
diff --git a/arch/arm/mach-pxa/include/mach/mtd-xip.h b/arch/arm/mach-pxa/include/mach/mtd-xip.h index 297387ec3618..990d2bf2fb45 100644 --- a/arch/arm/mach-pxa/include/mach/mtd-xip.h +++ b/arch/arm/mach-pxa/include/mach/mtd-xip.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #define __ARCH_PXA_MTD_XIP_H__ | 16 | #define __ARCH_PXA_MTD_XIP_H__ |
17 | 17 | ||
18 | #include <mach/regs-ost.h> | 18 | #include <mach/regs-ost.h> |
19 | #include <mach/regs-intc.h> | ||
20 | 19 | ||
21 | #define xip_irqpending() (ICIP & ICMR) | 20 | #define xip_irqpending() (ICIP & ICMR) |
22 | 21 | ||
diff --git a/arch/arm/mach-pxa/include/mach/palm27x.h b/arch/arm/mach-pxa/include/mach/palm27x.h index 0a5e5eadebf5..f80bbe246afe 100644 --- a/arch/arm/mach-pxa/include/mach/palm27x.h +++ b/arch/arm/mach-pxa/include/mach/palm27x.h | |||
@@ -34,7 +34,7 @@ extern struct pxafb_mode_info palm_320x320_new_lcd_mode; | |||
34 | extern void __init palm27x_lcd_init(int power, | 34 | extern void __init palm27x_lcd_init(int power, |
35 | struct pxafb_mode_info *mode); | 35 | struct pxafb_mode_info *mode); |
36 | #else | 36 | #else |
37 | static inline void palm27x_lcd_init(int power, struct pxafb_mode_info *mode) {} | 37 | #define palm27x_lcd_init(power, mode) do {} while (0) |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #if defined(CONFIG_USB_GADGET_PXA27X) || \ | 40 | #if defined(CONFIG_USB_GADGET_PXA27X) || \ |
diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/include/mach/palmtx.h index 10abc4f2e8e4..7074a6ed46c6 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/include/mach/palmtx.h | |||
@@ -71,7 +71,7 @@ | |||
71 | 71 | ||
72 | /* Various addresses */ | 72 | /* Various addresses */ |
73 | #define PALMTX_PCMCIA_PHYS 0x28000000 | 73 | #define PALMTX_PCMCIA_PHYS 0x28000000 |
74 | #define PALMTX_PCMCIA_VIRT 0xf0000000 | 74 | #define PALMTX_PCMCIA_VIRT IOMEM(0xf0000000) |
75 | #define PALMTX_PCMCIA_SIZE 0x100000 | 75 | #define PALMTX_PCMCIA_SIZE 0x100000 |
76 | 76 | ||
77 | #define PALMTX_PHYS_RAM_START 0xa0000000 | 77 | #define PALMTX_PHYS_RAM_START 0xa0000000 |
@@ -84,8 +84,8 @@ | |||
84 | 84 | ||
85 | #define PALMTX_NAND_ALE_PHYS (PALMTX_PHYS_NAND_START | (1 << 24)) | 85 | #define PALMTX_NAND_ALE_PHYS (PALMTX_PHYS_NAND_START | (1 << 24)) |
86 | #define PALMTX_NAND_CLE_PHYS (PALMTX_PHYS_NAND_START | (1 << 25)) | 86 | #define PALMTX_NAND_CLE_PHYS (PALMTX_PHYS_NAND_START | (1 << 25)) |
87 | #define PALMTX_NAND_ALE_VIRT 0xff100000 | 87 | #define PALMTX_NAND_ALE_VIRT IOMEM(0xff100000) |
88 | #define PALMTX_NAND_CLE_VIRT 0xff200000 | 88 | #define PALMTX_NAND_CLE_VIRT IOMEM(0xff200000) |
89 | 89 | ||
90 | /* TOUCHSCREEN */ | 90 | /* TOUCHSCREEN */ |
91 | #define AC97_LINK_FRAME 21 | 91 | #define AC97_LINK_FRAME 21 |
diff --git a/arch/arm/mach-pxa/include/mach/pxa27x.h b/arch/arm/mach-pxa/include/mach/pxa27x.h index b9b1bdc4bacc..7cff640582b8 100644 --- a/arch/arm/mach-pxa/include/mach/pxa27x.h +++ b/arch/arm/mach-pxa/include/mach/pxa27x.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __MACH_PXA27x_H | 1 | #ifndef __MACH_PXA27x_H |
2 | #define __MACH_PXA27x_H | 2 | #define __MACH_PXA27x_H |
3 | 3 | ||
4 | #include <linux/suspend.h> | ||
4 | #include <mach/hardware.h> | 5 | #include <mach/hardware.h> |
5 | #include <mach/pxa2xx-regs.h> | 6 | #include <mach/pxa2xx-regs.h> |
6 | #include <mach/mfp-pxa27x.h> | 7 | #include <mach/mfp-pxa27x.h> |
@@ -21,6 +22,7 @@ | |||
21 | extern void __init pxa27x_map_io(void); | 22 | extern void __init pxa27x_map_io(void); |
22 | extern void __init pxa27x_init_irq(void); | 23 | extern void __init pxa27x_init_irq(void); |
23 | extern int __init pxa27x_set_pwrmode(unsigned int mode); | 24 | extern int __init pxa27x_set_pwrmode(unsigned int mode); |
25 | extern void pxa27x_cpu_pm_enter(suspend_state_t state); | ||
24 | 26 | ||
25 | #define pxa27x_handle_irq ichp_handle_irq | 27 | #define pxa27x_handle_irq ichp_handle_irq |
26 | 28 | ||
diff --git a/arch/arm/mach-pxa/include/mach/pxa95x.h b/arch/arm/mach-pxa/include/mach/pxa95x.h new file mode 100644 index 000000000000..cbb097c4cb1f --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/pxa95x.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __MACH_PXA95X_H | ||
2 | #define __MACH_PXA95X_H | ||
3 | |||
4 | #include <mach/pxa3xx.h> | ||
5 | #include <mach/mfp-pxa930.h> | ||
6 | |||
7 | #endif /* __MACH_PXA95X_H */ | ||
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h index 01a45ac48114..486b4c519ae2 100644 --- a/arch/arm/mach-pxa/include/mach/pxafb.h +++ b/arch/arm/mach-pxa/include/mach/pxafb.h | |||
@@ -158,5 +158,18 @@ struct pxafb_mach_info { | |||
158 | void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); | 158 | void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); |
159 | unsigned long pxafb_get_hsync_time(struct device *dev); | 159 | unsigned long pxafb_get_hsync_time(struct device *dev); |
160 | 160 | ||
161 | #ifdef CONFIG_FB_PXA_SMARTPANEL | ||
161 | extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); | 162 | extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); |
162 | extern int pxafb_smart_flush(struct fb_info *info); | 163 | extern int pxafb_smart_flush(struct fb_info *info); |
164 | #else | ||
165 | static inline int pxafb_smart_queue(struct fb_info *info, | ||
166 | uint16_t *cmds, int n) | ||
167 | { | ||
168 | return 0; | ||
169 | } | ||
170 | |||
171 | static inline int pxafb_smart_flush(struct fb_info *info) | ||
172 | { | ||
173 | return 0; | ||
174 | } | ||
175 | #endif | ||
diff --git a/arch/arm/mach-pxa/include/mach/smemc.h b/arch/arm/mach-pxa/include/mach/smemc.h index 654adc90c9a0..b7de471b273a 100644 --- a/arch/arm/mach-pxa/include/mach/smemc.h +++ b/arch/arm/mach-pxa/include/mach/smemc.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #define PXA2XX_SMEMC_BASE 0x48000000 | 14 | #define PXA2XX_SMEMC_BASE 0x48000000 |
15 | #define PXA3XX_SMEMC_BASE 0x4a000000 | 15 | #define PXA3XX_SMEMC_BASE 0x4a000000 |
16 | #define SMEMC_VIRT 0xf6000000 | 16 | #define SMEMC_VIRT IOMEM(0xf6000000) |
17 | 17 | ||
18 | #define MDCNFG (SMEMC_VIRT + 0x00) /* SDRAM Configuration Register 0 */ | 18 | #define MDCNFG (SMEMC_VIRT + 0x00) /* SDRAM Configuration Register 0 */ |
19 | #define MDREFR (SMEMC_VIRT + 0x04) /* SDRAM Refresh Control Register */ | 19 | #define MDREFR (SMEMC_VIRT + 0x04) /* SDRAM Refresh Control Register */ |
diff --git a/arch/arm/mach-pxa/include/mach/zeus.h b/arch/arm/mach-pxa/include/mach/zeus.h index 0641f31a56b7..56024f81d57e 100644 --- a/arch/arm/mach-pxa/include/mach/zeus.h +++ b/arch/arm/mach-pxa/include/mach/zeus.h | |||
@@ -68,7 +68,7 @@ | |||
68 | * Be gentle, and remap that over 32kB... | 68 | * Be gentle, and remap that over 32kB... |
69 | */ | 69 | */ |
70 | 70 | ||
71 | #define ZEUS_CPLD (0xf0000000) | 71 | #define ZEUS_CPLD IOMEM(0xf0000000) |
72 | #define ZEUS_CPLD_VERSION (ZEUS_CPLD + 0x0000) | 72 | #define ZEUS_CPLD_VERSION (ZEUS_CPLD + 0x0000) |
73 | #define ZEUS_CPLD_ISA_IRQ (ZEUS_CPLD + 0x1000) | 73 | #define ZEUS_CPLD_ISA_IRQ (ZEUS_CPLD + 0x1000) |
74 | #define ZEUS_CPLD_CONTROL (ZEUS_CPLD + 0x2000) | 74 | #define ZEUS_CPLD_CONTROL (ZEUS_CPLD + 0x2000) |
@@ -76,7 +76,7 @@ | |||
76 | /* CPLD register bits */ | 76 | /* CPLD register bits */ |
77 | #define ZEUS_CPLD_CONTROL_CF_RST 0x01 | 77 | #define ZEUS_CPLD_CONTROL_CF_RST 0x01 |
78 | 78 | ||
79 | #define ZEUS_PC104IO (0xf1000000) | 79 | #define ZEUS_PC104IO IOMEM(0xf1000000) |
80 | 80 | ||
81 | #define ZEUS_SRAM_SIZE (256 * 1024) | 81 | #define ZEUS_SRAM_SIZE (256 * 1024) |
82 | 82 | ||
diff --git a/arch/arm/mach-pxa/include/mach/zylonite.h b/arch/arm/mach-pxa/include/mach/zylonite.h index ea24998b923c..ecca976f03d2 100644 --- a/arch/arm/mach-pxa/include/mach/zylonite.h +++ b/arch/arm/mach-pxa/include/mach/zylonite.h | |||
@@ -19,7 +19,7 @@ extern int wm9713_irq; | |||
19 | extern int lcd_id; | 19 | extern int lcd_id; |
20 | extern int lcd_orientation; | 20 | extern int lcd_orientation; |
21 | 21 | ||
22 | #ifdef CONFIG_CPU_PXA300 | 22 | #ifdef CONFIG_MACH_ZYLONITE300 |
23 | extern void zylonite_pxa300_init(void); | 23 | extern void zylonite_pxa300_init(void); |
24 | #else | 24 | #else |
25 | static inline void zylonite_pxa300_init(void) | 25 | static inline void zylonite_pxa300_init(void) |
@@ -29,7 +29,7 @@ static inline void zylonite_pxa300_init(void) | |||
29 | } | 29 | } |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifdef CONFIG_CPU_PXA320 | 32 | #ifdef CONFIG_MACH_ZYLONITE320 |
33 | extern void zylonite_pxa320_init(void); | 33 | extern void zylonite_pxa320_init(void); |
34 | #else | 34 | #else |
35 | static inline void zylonite_pxa320_init(void) | 35 | static inline void zylonite_pxa320_init(void) |
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index b09e848eb6c6..25f29adf5114 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | |||
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
@@ -21,11 +20,11 @@ | |||
21 | 20 | ||
22 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
23 | #include <mach/irqs.h> | 22 | #include <mach/irqs.h> |
24 | #include <mach/gpio.h> | 23 | #include <mach/gpio-pxa.h> |
25 | 24 | ||
26 | #include "generic.h" | 25 | #include "generic.h" |
27 | 26 | ||
28 | #define IRQ_BASE (void __iomem *)io_p2v(0x40d00000) | 27 | #define IRQ_BASE io_p2v(0x40d00000) |
29 | 28 | ||
30 | #define ICIP (0x000) | 29 | #define ICIP (0x000) |
31 | #define ICMR (0x004) | 30 | #define ICMR (0x004) |
@@ -63,7 +62,7 @@ static inline void __iomem *irq_base(int i) | |||
63 | 0x40d00130, | 62 | 0x40d00130, |
64 | }; | 63 | }; |
65 | 64 | ||
66 | return (void __iomem *)io_p2v(phys_base[i]); | 65 | return io_p2v(phys_base[i]); |
67 | } | 66 | } |
68 | 67 | ||
69 | void pxa_mask_irq(struct irq_data *d) | 68 | void pxa_mask_irq(struct irq_data *d) |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 16df0fc0879a..1dd530279e0b 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | 15 | #include <linux/gpio.h> | |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/syscore_ops.h> | 18 | #include <linux/syscore_ops.h> |
@@ -39,7 +39,6 @@ | |||
39 | #include <asm/mach/flash.h> | 39 | #include <asm/mach/flash.h> |
40 | 40 | ||
41 | #include <mach/pxa27x.h> | 41 | #include <mach/pxa27x.h> |
42 | #include <mach/gpio.h> | ||
43 | #include <mach/lpd270.h> | 42 | #include <mach/lpd270.h> |
44 | #include <mach/audio.h> | 43 | #include <mach/audio.h> |
45 | #include <mach/pxafb.h> | 44 | #include <mach/pxafb.h> |
@@ -480,7 +479,7 @@ static void __init lpd270_init(void) | |||
480 | 479 | ||
481 | static struct map_desc lpd270_io_desc[] __initdata = { | 480 | static struct map_desc lpd270_io_desc[] __initdata = { |
482 | { | 481 | { |
483 | .virtual = LPD270_CPLD_VIRT, | 482 | .virtual = (unsigned long)LPD270_CPLD_VIRT, |
484 | .pfn = __phys_to_pfn(LPD270_CPLD_PHYS), | 483 | .pfn = __phys_to_pfn(LPD270_CPLD_PHYS), |
485 | .length = LPD270_CPLD_SIZE, | 484 | .length = LPD270_CPLD_SIZE, |
486 | .type = MT_DEVICE, | 485 | .type = MT_DEVICE, |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index a8c696bfc132..c48ce6da9184 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | #include <linux/gpio.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
@@ -42,7 +43,6 @@ | |||
42 | #include <asm/hardware/sa1111.h> | 43 | #include <asm/hardware/sa1111.h> |
43 | 44 | ||
44 | #include <mach/pxa25x.h> | 45 | #include <mach/pxa25x.h> |
45 | #include <mach/gpio.h> | ||
46 | #include <mach/audio.h> | 46 | #include <mach/audio.h> |
47 | #include <mach/lubbock.h> | 47 | #include <mach/lubbock.h> |
48 | #include <mach/udc.h> | 48 | #include <mach/udc.h> |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index cc6e14f6d114..0567d3965fda 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | 15 | #include <linux/gpio.h> | |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/syscore_ops.h> | 18 | #include <linux/syscore_ops.h> |
@@ -43,7 +43,6 @@ | |||
43 | #include <asm/mach/flash.h> | 43 | #include <asm/mach/flash.h> |
44 | 44 | ||
45 | #include <mach/pxa27x.h> | 45 | #include <mach/pxa27x.h> |
46 | #include <mach/gpio.h> | ||
47 | #include <mach/mainstone.h> | 46 | #include <mach/mainstone.h> |
48 | #include <mach/audio.h> | 47 | #include <mach/audio.h> |
49 | #include <mach/pxafb.h> | 48 | #include <mach/pxafb.h> |
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index b27544bcafcb..43a5f6861ca3 100644 --- a/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c | |||
@@ -12,15 +12,15 @@ | |||
12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | 15 | #include <linux/gpio.h> | |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/syscore_ops.h> | 19 | #include <linux/syscore_ops.h> |
20 | 20 | ||
21 | #include <mach/gpio.h> | ||
22 | #include <mach/pxa2xx-regs.h> | 21 | #include <mach/pxa2xx-regs.h> |
23 | #include <mach/mfp-pxa2xx.h> | 22 | #include <mach/mfp-pxa2xx.h> |
23 | #include <mach/gpio-pxa.h> | ||
24 | 24 | ||
25 | #include "generic.h" | 25 | #include "generic.h" |
26 | 26 | ||
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index 7346fbfa8101..94e9708b349d 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c | |||
@@ -423,6 +423,7 @@ static void __init palmphone_common_init(void) | |||
423 | palmtreo_leds_init(); | 423 | palmtreo_leds_init(); |
424 | } | 424 | } |
425 | 425 | ||
426 | #ifdef CONFIG_MACH_TREO680 | ||
426 | static void __init treo680_init(void) | 427 | static void __init treo680_init(void) |
427 | { | 428 | { |
428 | pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config)); | 429 | pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config)); |
@@ -430,7 +431,9 @@ static void __init treo680_init(void) | |||
430 | palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY, | 431 | palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY, |
431 | GPIO_NR_TREO680_SD_POWER, 0); | 432 | GPIO_NR_TREO680_SD_POWER, 0); |
432 | } | 433 | } |
434 | #endif | ||
433 | 435 | ||
436 | #ifdef CONFIG_MACH_CENTRO | ||
434 | static void __init centro_init(void) | 437 | static void __init centro_init(void) |
435 | { | 438 | { |
436 | pxa2xx_mfp_config(ARRAY_AND_SIZE(centro685_pin_config)); | 439 | pxa2xx_mfp_config(ARRAY_AND_SIZE(centro685_pin_config)); |
@@ -438,7 +441,9 @@ static void __init centro_init(void) | |||
438 | palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, -1, | 441 | palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, -1, |
439 | GPIO_NR_CENTRO_SD_POWER, 1); | 442 | GPIO_NR_CENTRO_SD_POWER, 1); |
440 | } | 443 | } |
444 | #endif | ||
441 | 445 | ||
446 | #ifdef CONFIG_MACH_TREO680 | ||
442 | MACHINE_START(TREO680, "Palm Treo 680") | 447 | MACHINE_START(TREO680, "Palm Treo 680") |
443 | .atag_offset = 0x100, | 448 | .atag_offset = 0x100, |
444 | .map_io = pxa27x_map_io, | 449 | .map_io = pxa27x_map_io, |
@@ -448,7 +453,9 @@ MACHINE_START(TREO680, "Palm Treo 680") | |||
448 | .timer = &pxa_timer, | 453 | .timer = &pxa_timer, |
449 | .init_machine = treo680_init, | 454 | .init_machine = treo680_init, |
450 | MACHINE_END | 455 | MACHINE_END |
456 | #endif | ||
451 | 457 | ||
458 | #ifdef CONFIG_MACH_CENTRO | ||
452 | MACHINE_START(CENTRO, "Palm Centro 685") | 459 | MACHINE_START(CENTRO, "Palm Centro 685") |
453 | .atag_offset = 0x100, | 460 | .atag_offset = 0x100, |
454 | .map_io = pxa27x_map_io, | 461 | .map_io = pxa27x_map_io, |
@@ -458,3 +465,4 @@ MACHINE_START(CENTRO, "Palm Centro 685") | |||
458 | .timer = &pxa_timer, | 465 | .timer = &pxa_timer, |
459 | .init_machine = centro_init, | 466 | .init_machine = centro_init, |
460 | MACHINE_END | 467 | MACHINE_END |
468 | #endif | ||
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 2b9e76fc2c90..4e3e45927e95 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c | |||
@@ -247,7 +247,7 @@ static void palmtx_nand_cmd_ctl(struct mtd_info *mtd, int cmd, | |||
247 | unsigned int ctrl) | 247 | unsigned int ctrl) |
248 | { | 248 | { |
249 | struct nand_chip *this = mtd->priv; | 249 | struct nand_chip *this = mtd->priv; |
250 | unsigned long nandaddr = (unsigned long)this->IO_ADDR_W; | 250 | char __iomem *nandaddr = this->IO_ADDR_W; |
251 | 251 | ||
252 | if (cmd == NAND_CMD_NONE) | 252 | if (cmd == NAND_CMD_NONE) |
253 | return; | 253 | return; |
@@ -315,17 +315,17 @@ static inline void palmtx_nand_init(void) {} | |||
315 | ******************************************************************************/ | 315 | ******************************************************************************/ |
316 | static struct map_desc palmtx_io_desc[] __initdata = { | 316 | static struct map_desc palmtx_io_desc[] __initdata = { |
317 | { | 317 | { |
318 | .virtual = PALMTX_PCMCIA_VIRT, | 318 | .virtual = (unsigned long)PALMTX_PCMCIA_VIRT, |
319 | .pfn = __phys_to_pfn(PALMTX_PCMCIA_PHYS), | 319 | .pfn = __phys_to_pfn(PALMTX_PCMCIA_PHYS), |
320 | .length = PALMTX_PCMCIA_SIZE, | 320 | .length = PALMTX_PCMCIA_SIZE, |
321 | .type = MT_DEVICE, | 321 | .type = MT_DEVICE, |
322 | }, { | 322 | }, { |
323 | .virtual = PALMTX_NAND_ALE_VIRT, | 323 | .virtual = (unsigned long)PALMTX_NAND_ALE_VIRT, |
324 | .pfn = __phys_to_pfn(PALMTX_NAND_ALE_PHYS), | 324 | .pfn = __phys_to_pfn(PALMTX_NAND_ALE_PHYS), |
325 | .length = SZ_1M, | 325 | .length = SZ_1M, |
326 | .type = MT_DEVICE, | 326 | .type = MT_DEVICE, |
327 | }, { | 327 | }, { |
328 | .virtual = PALMTX_NAND_CLE_VIRT, | 328 | .virtual = (unsigned long)PALMTX_NAND_CLE_VIRT, |
329 | .pfn = __phys_to_pfn(PALMTX_NAND_CLE_PHYS), | 329 | .pfn = __phys_to_pfn(PALMTX_NAND_CLE_PHYS), |
330 | .length = SZ_1M, | 330 | .length = SZ_1M, |
331 | .type = MT_DEVICE, | 331 | .type = MT_DEVICE, |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 6d5b7e062124..9a9c539f6c01 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * it under the terms of the GNU General Public License version 2 as | 19 | * it under the terms of the GNU General Public License version 2 as |
20 | * published by the Free Software Foundation. | 20 | * published by the Free Software Foundation. |
21 | */ | 21 | */ |
22 | 22 | #include <linux/gpio.h> | |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <media/soc_camera.h> | 29 | #include <media/soc_camera.h> |
30 | 30 | ||
31 | #include <asm/gpio.h> | ||
32 | #include <mach/camera.h> | 31 | #include <mach/camera.h> |
33 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
34 | #include <mach/pxa27x.h> | 33 | #include <mach/pxa27x.h> |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 9c434d21a271..f05f9486b0cb 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * initialization stuff for PXA machines which can be overridden later if | 16 | * initialization stuff for PXA machines which can be overridden later if |
17 | * need be. | 17 | * need be. |
18 | */ | 18 | */ |
19 | #include <linux/gpio.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
@@ -23,12 +24,12 @@ | |||
23 | #include <linux/suspend.h> | 24 | #include <linux/suspend.h> |
24 | #include <linux/syscore_ops.h> | 25 | #include <linux/syscore_ops.h> |
25 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
27 | #include <linux/gpio.h> | ||
26 | 28 | ||
27 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
28 | #include <asm/suspend.h> | 30 | #include <asm/suspend.h> |
29 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
30 | #include <mach/irqs.h> | 32 | #include <mach/irqs.h> |
31 | #include <mach/gpio.h> | ||
32 | #include <mach/pxa25x.h> | 33 | #include <mach/pxa25x.h> |
33 | #include <mach/reset.h> | 34 | #include <mach/reset.h> |
34 | #include <mach/pm.h> | 35 | #include <mach/pm.h> |
@@ -324,7 +325,7 @@ void __init pxa26x_init_irq(void) | |||
324 | 325 | ||
325 | static struct map_desc pxa25x_io_desc[] __initdata = { | 326 | static struct map_desc pxa25x_io_desc[] __initdata = { |
326 | { /* Mem Ctl */ | 327 | { /* Mem Ctl */ |
327 | .virtual = SMEMC_VIRT, | 328 | .virtual = (unsigned long)SMEMC_VIRT, |
328 | .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), | 329 | .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), |
329 | .length = 0x00200000, | 330 | .length = 0x00200000, |
330 | .type = MT_DEVICE | 331 | .type = MT_DEVICE |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 9d2400b5f503..bc5a98ebaa72 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | #include <linux/gpio.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
@@ -20,13 +21,13 @@ | |||
20 | #include <linux/io.h> | 21 | #include <linux/io.h> |
21 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
22 | #include <linux/i2c/pxa-i2c.h> | 23 | #include <linux/i2c/pxa-i2c.h> |
24 | #include <linux/gpio.h> | ||
23 | 25 | ||
24 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
25 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
26 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
27 | #include <asm/suspend.h> | 29 | #include <asm/suspend.h> |
28 | #include <mach/irqs.h> | 30 | #include <mach/irqs.h> |
29 | #include <mach/gpio.h> | ||
30 | #include <mach/pxa27x.h> | 31 | #include <mach/pxa27x.h> |
31 | #include <mach/reset.h> | 32 | #include <mach/reset.h> |
32 | #include <mach/ohci.h> | 33 | #include <mach/ohci.h> |
@@ -390,7 +391,7 @@ void __init pxa27x_init_irq(void) | |||
390 | 391 | ||
391 | static struct map_desc pxa27x_io_desc[] __initdata = { | 392 | static struct map_desc pxa27x_io_desc[] __initdata = { |
392 | { /* Mem Ctl */ | 393 | { /* Mem Ctl */ |
393 | .virtual = SMEMC_VIRT, | 394 | .virtual = (unsigned long)SMEMC_VIRT, |
394 | .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), | 395 | .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), |
395 | .length = 0x00200000, | 396 | .length = 0x00200000, |
396 | .type = MT_DEVICE | 397 | .type = MT_DEVICE |
diff --git a/arch/arm/mach-pxa/pxa3xx-ulpi.c b/arch/arm/mach-pxa/pxa3xx-ulpi.c index ce7168b233e2..e28dfb88827f 100644 --- a/arch/arm/mach-pxa/pxa3xx-ulpi.c +++ b/arch/arm/mach-pxa/pxa3xx-ulpi.c | |||
@@ -265,6 +265,7 @@ int pxa3xx_u2d_start_hc(struct usb_bus *host) | |||
265 | 265 | ||
266 | return err; | 266 | return err; |
267 | } | 267 | } |
268 | EXPORT_SYMBOL_GPL(pxa3xx_u2d_start_hc); | ||
268 | 269 | ||
269 | void pxa3xx_u2d_stop_hc(struct usb_bus *host) | 270 | void pxa3xx_u2d_stop_hc(struct usb_bus *host) |
270 | { | 271 | { |
@@ -277,6 +278,7 @@ void pxa3xx_u2d_stop_hc(struct usb_bus *host) | |||
277 | 278 | ||
278 | clk_disable(u2d->clk); | 279 | clk_disable(u2d->clk); |
279 | } | 280 | } |
281 | EXPORT_SYMBOL_GPL(pxa3xx_u2d_stop_hc); | ||
280 | 282 | ||
281 | static int pxa3xx_u2d_probe(struct platform_device *pdev) | 283 | static int pxa3xx_u2d_probe(struct platform_device *pdev) |
282 | { | 284 | { |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index b5cd9e5aba31..0737c59b88ae 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | |||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
@@ -26,7 +25,7 @@ | |||
26 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
27 | #include <asm/suspend.h> | 26 | #include <asm/suspend.h> |
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
29 | #include <mach/gpio.h> | 28 | #include <mach/gpio-pxa.h> |
30 | #include <mach/pxa3xx-regs.h> | 29 | #include <mach/pxa3xx-regs.h> |
31 | #include <mach/reset.h> | 30 | #include <mach/reset.h> |
32 | #include <mach/ohci.h> | 31 | #include <mach/ohci.h> |
@@ -394,7 +393,7 @@ void __init pxa3xx_init_irq(void) | |||
394 | 393 | ||
395 | static struct map_desc pxa3xx_io_desc[] __initdata = { | 394 | static struct map_desc pxa3xx_io_desc[] __initdata = { |
396 | { /* Mem Ctl */ | 395 | { /* Mem Ctl */ |
397 | .virtual = SMEMC_VIRT, | 396 | .virtual = (unsigned long)SMEMC_VIRT, |
398 | .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE), | 397 | .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE), |
399 | .length = 0x00200000, | 398 | .length = 0x00200000, |
400 | .type = MT_DEVICE | 399 | .type = MT_DEVICE |
diff --git a/arch/arm/mach-pxa/pxa95x.c b/arch/arm/mach-pxa/pxa95x.c index 0ee166b61f81..51371b39d2a3 100644 --- a/arch/arm/mach-pxa/pxa95x.c +++ b/arch/arm/mach-pxa/pxa95x.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | |||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
@@ -21,7 +20,7 @@ | |||
21 | #include <linux/syscore_ops.h> | 20 | #include <linux/syscore_ops.h> |
22 | 21 | ||
23 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
24 | #include <mach/gpio.h> | 23 | #include <mach/gpio-pxa.h> |
25 | #include <mach/pxa3xx-regs.h> | 24 | #include <mach/pxa3xx-regs.h> |
26 | #include <mach/pxa930.h> | 25 | #include <mach/pxa930.h> |
27 | #include <mach/reset.h> | 26 | #include <mach/reset.h> |
diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c index 5ce340320ab9..3e999e308a2d 100644 --- a/arch/arm/mach-pxa/saarb.c +++ b/arch/arm/mach-pxa/saarb.c | |||
@@ -9,12 +9,13 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * publishhed by the Free Software Foundation. | 10 | * publishhed by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | #include <linux/gpio.h> | |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/i2c/pxa-i2c.h> | 16 | #include <linux/i2c/pxa-i2c.h> |
17 | #include <linux/mfd/88pm860x.h> | 17 | #include <linux/mfd/88pm860x.h> |
18 | #include <linux/gpio.h> | ||
18 | 19 | ||
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
@@ -23,7 +24,7 @@ | |||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <mach/mfp.h> | 25 | #include <mach/mfp.h> |
25 | #include <mach/mfp-pxa930.h> | 26 | #include <mach/mfp-pxa930.h> |
26 | #include <mach/gpio.h> | 27 | #include <mach/pxa95x.h> |
27 | 28 | ||
28 | #include "generic.h" | 29 | #include "generic.h" |
29 | 30 | ||
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index 65fed3753fa2..ead32c90fec1 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
@@ -686,7 +686,8 @@ static void z2_power_off(void) | |||
686 | */ | 686 | */ |
687 | PSPR = 0x0; | 687 | PSPR = 0x0; |
688 | local_irq_disable(); | 688 | local_irq_disable(); |
689 | pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP, PLAT_PHYS_OFFSET - PAGE_OFFSET); | 689 | pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP); |
690 | pxa27x_cpu_pm_enter(PM_SUSPEND_MEM); | ||
690 | } | 691 | } |
691 | #else | 692 | #else |
692 | #define z2_power_off NULL | 693 | #define z2_power_off NULL |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index c424e7d85ce3..498b83b089f3 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
@@ -860,25 +860,25 @@ static void __init zeus_init(void) | |||
860 | 860 | ||
861 | static struct map_desc zeus_io_desc[] __initdata = { | 861 | static struct map_desc zeus_io_desc[] __initdata = { |
862 | { | 862 | { |
863 | .virtual = ZEUS_CPLD_VERSION, | 863 | .virtual = (unsigned long)ZEUS_CPLD_VERSION, |
864 | .pfn = __phys_to_pfn(ZEUS_CPLD_VERSION_PHYS), | 864 | .pfn = __phys_to_pfn(ZEUS_CPLD_VERSION_PHYS), |
865 | .length = 0x1000, | 865 | .length = 0x1000, |
866 | .type = MT_DEVICE, | 866 | .type = MT_DEVICE, |
867 | }, | 867 | }, |
868 | { | 868 | { |
869 | .virtual = ZEUS_CPLD_ISA_IRQ, | 869 | .virtual = (unsigned long)ZEUS_CPLD_ISA_IRQ, |
870 | .pfn = __phys_to_pfn(ZEUS_CPLD_ISA_IRQ_PHYS), | 870 | .pfn = __phys_to_pfn(ZEUS_CPLD_ISA_IRQ_PHYS), |
871 | .length = 0x1000, | 871 | .length = 0x1000, |
872 | .type = MT_DEVICE, | 872 | .type = MT_DEVICE, |
873 | }, | 873 | }, |
874 | { | 874 | { |
875 | .virtual = ZEUS_CPLD_CONTROL, | 875 | .virtual = (unsigned long)ZEUS_CPLD_CONTROL, |
876 | .pfn = __phys_to_pfn(ZEUS_CPLD_CONTROL_PHYS), | 876 | .pfn = __phys_to_pfn(ZEUS_CPLD_CONTROL_PHYS), |
877 | .length = 0x1000, | 877 | .length = 0x1000, |
878 | .type = MT_DEVICE, | 878 | .type = MT_DEVICE, |
879 | }, | 879 | }, |
880 | { | 880 | { |
881 | .virtual = ZEUS_PC104IO, | 881 | .virtual = (unsigned long)ZEUS_PC104IO, |
882 | .pfn = __phys_to_pfn(ZEUS_PC104IO_PHYS), | 882 | .pfn = __phys_to_pfn(ZEUS_PC104IO_PHYS), |
883 | .length = 0x00800000, | 883 | .length = 0x00800000, |
884 | .type = MT_DEVICE, | 884 | .type = MT_DEVICE, |
diff --git a/arch/arm/mach-realview/include/mach/debug-macro.S b/arch/arm/mach-realview/include/mach/debug-macro.S index 90b687cbe04e..fb4901c4ef04 100644 --- a/arch/arm/mach-realview/include/mach/debug-macro.S +++ b/arch/arm/mach-realview/include/mach/debug-macro.S | |||
@@ -33,7 +33,7 @@ | |||
33 | #error "Unknown RealView platform" | 33 | #error "Unknown RealView platform" |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | .macro addruart, rp, rv | 36 | .macro addruart, rp, rv, tmp |
37 | mov \rp, #DEBUG_LL_UART_OFFSET | 37 | mov \rp, #DEBUG_LL_UART_OFFSET |
38 | orr \rv, \rp, #0xfb000000 @ virtual base | 38 | orr \rv, \rp, #0xfb000000 @ virtual base |
39 | orr \rp, \rp, #0x10000000 @ physical base | 39 | orr \rp, \rp, #0x10000000 @ physical base |
diff --git a/arch/arm/mach-realview/include/mach/gpio.h b/arch/arm/mach-realview/include/mach/gpio.h index 94ff27678a46..40a8c178f10d 100644 --- a/arch/arm/mach-realview/include/mach/gpio.h +++ b/arch/arm/mach-realview/include/mach/gpio.h | |||
@@ -1,6 +1 @@ | |||
1 | #include <asm-generic/gpio.h> | /* empty */ | |
2 | |||
3 | #define gpio_get_value __gpio_get_value | ||
4 | #define gpio_set_value __gpio_set_value | ||
5 | #define gpio_cansleep __gpio_cansleep | ||
6 | #define gpio_to_irq __gpio_to_irq | ||
diff --git a/arch/arm/mach-rpc/include/mach/debug-macro.S b/arch/arm/mach-rpc/include/mach/debug-macro.S index 85effffdc2b2..6d28cc99b124 100644 --- a/arch/arm/mach-rpc/include/mach/debug-macro.S +++ b/arch/arm/mach-rpc/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0x00010000 | 15 | mov \rp, #0x00010000 |
16 | orr \rp, \rp, #0x00000fe0 | 16 | orr \rp, \rp, #0x00000fe0 |
17 | orr \rv, \rp, #0xe0000000 @ virtual | 17 | orr \rv, \rp, #0xe0000000 @ virtual |
diff --git a/arch/arm/mach-s3c2400/include/mach/memory.h b/arch/arm/mach-s3c2400/include/mach/memory.h deleted file mode 100644 index 3f33670dd012..000000000000 --- a/arch/arm/mach-s3c2400/include/mach/memory.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c2400/include/mach/memory.h | ||
2 | * from arch/arm/mach-rpc/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright 2007 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * Copyright (C) 1996,1997,1998 Russell King. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_MEMORY_H | ||
16 | #define __ASM_ARCH_MEMORY_H | ||
17 | |||
18 | #define PLAT_PHYS_OFFSET UL(0x0C000000) | ||
19 | |||
20 | #endif | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/debug-macro.S b/arch/arm/mach-s3c2410/include/mach/debug-macro.S index 5882deaa56be..4135de87d1f7 100644 --- a/arch/arm/mach-s3c2410/include/mach/debug-macro.S +++ b/arch/arm/mach-s3c2410/include/mach/debug-macro.S | |||
@@ -19,7 +19,7 @@ | |||
19 | #define S3C2410_UART1_OFF (0x4000) | 19 | #define S3C2410_UART1_OFF (0x4000) |
20 | #define SHIFT_2440TXF (14-9) | 20 | #define SHIFT_2440TXF (14-9) |
21 | 21 | ||
22 | .macro addruart, rp, rv | 22 | .macro addruart, rp, rv, tmp |
23 | ldr \rp, = S3C24XX_PA_UART | 23 | ldr \rp, = S3C24XX_PA_UART |
24 | ldr \rv, = S3C24XX_VA_UART | 24 | ldr \rv, = S3C24XX_VA_UART |
25 | #if CONFIG_DEBUG_S3C_UART != 0 | 25 | #if CONFIG_DEBUG_S3C_UART != 0 |
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-s3c2410/include/mach/gpio.h index f7f6b07df30e..6fac70f3484e 100644 --- a/arch/arm/mach-s3c2410/include/mach/gpio.h +++ b/arch/arm/mach-s3c2410/include/mach/gpio.h | |||
@@ -11,11 +11,6 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define gpio_get_value __gpio_get_value | ||
15 | #define gpio_set_value __gpio_set_value | ||
16 | #define gpio_cansleep __gpio_cansleep | ||
17 | #define gpio_to_irq __gpio_to_irq | ||
18 | |||
19 | /* some boards require extra gpio capacity to support external | 14 | /* some boards require extra gpio capacity to support external |
20 | * devices that need GPIO. | 15 | * devices that need GPIO. |
21 | */ | 16 | */ |
@@ -28,7 +23,6 @@ | |||
28 | #define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA) | 23 | #define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA) |
29 | #endif | 24 | #endif |
30 | 25 | ||
31 | #include <asm-generic/gpio.h> | ||
32 | #include <mach/gpio-nrs.h> | 26 | #include <mach/gpio-nrs.h> |
33 | #include <mach/gpio-fns.h> | 27 | #include <mach/gpio-fns.h> |
34 | 28 | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/h1940-latch.h b/arch/arm/mach-s3c2410/include/mach/h1940-latch.h index 97e42bfce81e..fc897d3a056c 100644 --- a/arch/arm/mach-s3c2410/include/mach/h1940-latch.h +++ b/arch/arm/mach-s3c2410/include/mach/h1940-latch.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #ifndef __ASM_ARCH_H1940_LATCH_H | 14 | #ifndef __ASM_ARCH_H1940_LATCH_H |
15 | #define __ASM_ARCH_H1940_LATCH_H | 15 | #define __ASM_ARCH_H1940_LATCH_H |
16 | 16 | ||
17 | #include <mach/gpio.h> | 17 | #include <asm/gpio.h> |
18 | 18 | ||
19 | #define H1940_LATCH_GPIO(x) (S3C_GPIO_END + (x)) | 19 | #define H1940_LATCH_GPIO(x) (S3C_GPIO_END + (x)) |
20 | 20 | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/memory.h b/arch/arm/mach-s3c2410/include/mach/memory.h deleted file mode 100644 index f92b97b89c0c..000000000000 --- a/arch/arm/mach-s3c2410/include/mach/memory.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/memory.h | ||
2 | * from arch/arm/mach-rpc/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 1996,1997,1998 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_MEMORY_H | ||
12 | #define __ASM_ARCH_MEMORY_H | ||
13 | |||
14 | #define PLAT_PHYS_OFFSET UL(0x30000000) | ||
15 | |||
16 | #endif | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/debug-macro.S b/arch/arm/mach-s3c64xx/include/mach/debug-macro.S index a29e70550c70..c0c076a90f27 100644 --- a/arch/arm/mach-s3c64xx/include/mach/debug-macro.S +++ b/arch/arm/mach-s3c64xx/include/mach/debug-macro.S | |||
@@ -21,7 +21,7 @@ | |||
21 | * aligned and add in the offset when we load the value here. | 21 | * aligned and add in the offset when we load the value here. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | .macro addruart, rp, rv | 24 | .macro addruart, rp, rv, tmp |
25 | ldr \rp, = S3C_PA_UART | 25 | ldr \rp, = S3C_PA_UART |
26 | ldr \rv, = (S3C_VA_UART + S3C_PA_UART & 0xfffff) | 26 | ldr \rv, = (S3C_VA_UART + S3C_PA_UART & 0xfffff) |
27 | #if CONFIG_DEBUG_S3C_UART != 0 | 27 | #if CONFIG_DEBUG_S3C_UART != 0 |
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-s3c64xx/include/mach/gpio.h index 0d46e994048a..6e34c2f6e670 100644 --- a/arch/arm/mach-s3c64xx/include/mach/gpio.h +++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h | |||
@@ -12,11 +12,6 @@ | |||
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #define gpio_get_value __gpio_get_value | ||
16 | #define gpio_set_value __gpio_set_value | ||
17 | #define gpio_cansleep __gpio_cansleep | ||
18 | #define gpio_to_irq __gpio_to_irq | ||
19 | |||
20 | /* GPIO bank sizes */ | 15 | /* GPIO bank sizes */ |
21 | #define S3C64XX_GPIO_A_NR (8) | 16 | #define S3C64XX_GPIO_A_NR (8) |
22 | #define S3C64XX_GPIO_B_NR (7) | 17 | #define S3C64XX_GPIO_B_NR (7) |
@@ -96,5 +91,3 @@ enum s3c_gpio_number { | |||
96 | #define BOARD_NR_GPIOS 16 | 91 | #define BOARD_NR_GPIOS 16 |
97 | 92 | ||
98 | #define ARCH_NR_GPIOS (GPIO_BOARD_START + BOARD_NR_GPIOS) | 93 | #define ARCH_NR_GPIOS (GPIO_BOARD_START + BOARD_NR_GPIOS) |
99 | |||
100 | #include <asm-generic/gpio.h> | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/memory.h b/arch/arm/mach-s3c64xx/include/mach/memory.h deleted file mode 100644 index b704669f95ff..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/memory.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H | ||
15 | |||
16 | #define PLAT_PHYS_OFFSET UL(0x50000000) | ||
17 | |||
18 | #endif | ||
diff --git a/arch/arm/mach-s5p64x0/include/mach/debug-macro.S b/arch/arm/mach-s5p64x0/include/mach/debug-macro.S index 79b04e6a6f8e..e80ba3c69814 100644 --- a/arch/arm/mach-s5p64x0/include/mach/debug-macro.S +++ b/arch/arm/mach-s5p64x0/include/mach/debug-macro.S | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <plat/regs-serial.h> | 16 | #include <plat/regs-serial.h> |
17 | 17 | ||
18 | .macro addruart, rp, rv | 18 | .macro addruart, rp, rv, tmp |
19 | mov \rp, #0xE0000000 | 19 | mov \rp, #0xE0000000 |
20 | orr \rp, \rp, #0x00100000 | 20 | orr \rp, \rp, #0x00100000 |
21 | ldr \rp, [\rp, #0x118 ] | 21 | ldr \rp, [\rp, #0x118 ] |
diff --git a/arch/arm/mach-s5p64x0/include/mach/gpio.h b/arch/arm/mach-s5p64x0/include/mach/gpio.h index adb5f298ead8..06cd3c9b16ac 100644 --- a/arch/arm/mach-s5p64x0/include/mach/gpio.h +++ b/arch/arm/mach-s5p64x0/include/mach/gpio.h | |||
@@ -13,11 +13,6 @@ | |||
13 | #ifndef __ASM_ARCH_GPIO_H | 13 | #ifndef __ASM_ARCH_GPIO_H |
14 | #define __ASM_ARCH_GPIO_H __FILE__ | 14 | #define __ASM_ARCH_GPIO_H __FILE__ |
15 | 15 | ||
16 | #define gpio_get_value __gpio_get_value | ||
17 | #define gpio_set_value __gpio_set_value | ||
18 | #define gpio_cansleep __gpio_cansleep | ||
19 | #define gpio_to_irq __gpio_to_irq | ||
20 | |||
21 | /* GPIO bank sizes */ | 16 | /* GPIO bank sizes */ |
22 | 17 | ||
23 | #define S5P6440_GPIO_A_NR (6) | 18 | #define S5P6440_GPIO_A_NR (6) |
@@ -134,6 +129,4 @@ enum s5p6450_gpio_number { | |||
134 | 129 | ||
135 | #define ARCH_NR_GPIOS (S5P64X0_GPIO_END + CONFIG_SAMSUNG_GPIO_EXTRA) | 130 | #define ARCH_NR_GPIOS (S5P64X0_GPIO_END + CONFIG_SAMSUNG_GPIO_EXTRA) |
136 | 131 | ||
137 | #include <asm-generic/gpio.h> | ||
138 | |||
139 | #endif /* __ASM_ARCH_GPIO_H */ | 132 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-s5p64x0/include/mach/memory.h b/arch/arm/mach-s5p64x0/include/mach/memory.h deleted file mode 100644 index b14cbc3f521b..000000000000 --- a/arch/arm/mach-s5p64x0/include/mach/memory.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p64x0/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5P64X0 - Memory definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H __FILE__ | ||
15 | |||
16 | #define PLAT_PHYS_OFFSET UL(0x20000000) | ||
17 | |||
18 | #endif /* __ASM_ARCH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-s5pc100/include/mach/debug-macro.S b/arch/arm/mach-s5pc100/include/mach/debug-macro.S index b2ba95ddf8e0..694f75937000 100644 --- a/arch/arm/mach-s5pc100/include/mach/debug-macro.S +++ b/arch/arm/mach-s5pc100/include/mach/debug-macro.S | |||
@@ -22,7 +22,7 @@ | |||
22 | * aligned and add in the offset when we load the value here. | 22 | * aligned and add in the offset when we load the value here. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | .macro addruart, rp, rv | 25 | .macro addruart, rp, rv, tmp |
26 | ldr \rp, = S3C_PA_UART | 26 | ldr \rp, = S3C_PA_UART |
27 | ldr \rv, = S3C_VA_UART | 27 | ldr \rv, = S3C_VA_UART |
28 | #if CONFIG_DEBUG_S3C_UART != 0 | 28 | #if CONFIG_DEBUG_S3C_UART != 0 |
diff --git a/arch/arm/mach-s5pc100/include/mach/gpio.h b/arch/arm/mach-s5pc100/include/mach/gpio.h index 29a8a12d9b4f..5e1a924b595f 100644 --- a/arch/arm/mach-s5pc100/include/mach/gpio.h +++ b/arch/arm/mach-s5pc100/include/mach/gpio.h | |||
@@ -15,11 +15,6 @@ | |||
15 | #ifndef __ASM_ARCH_GPIO_H | 15 | #ifndef __ASM_ARCH_GPIO_H |
16 | #define __ASM_ARCH_GPIO_H __FILE__ | 16 | #define __ASM_ARCH_GPIO_H __FILE__ |
17 | 17 | ||
18 | #define gpio_get_value __gpio_get_value | ||
19 | #define gpio_set_value __gpio_set_value | ||
20 | #define gpio_cansleep __gpio_cansleep | ||
21 | #define gpio_to_irq __gpio_to_irq | ||
22 | |||
23 | /* GPIO bank sizes */ | 18 | /* GPIO bank sizes */ |
24 | #define S5PC100_GPIO_A0_NR (8) | 19 | #define S5PC100_GPIO_A0_NR (8) |
25 | #define S5PC100_GPIO_A1_NR (5) | 20 | #define S5PC100_GPIO_A1_NR (5) |
@@ -146,6 +141,4 @@ enum s5p_gpio_number { | |||
146 | /* define the number of gpios we need to the one after the MP04() range */ | 141 | /* define the number of gpios we need to the one after the MP04() range */ |
147 | #define ARCH_NR_GPIOS (S5PC100_GPIO_END + 1) | 142 | #define ARCH_NR_GPIOS (S5PC100_GPIO_END + 1) |
148 | 143 | ||
149 | #include <asm-generic/gpio.h> | ||
150 | |||
151 | #endif /* __ASM_ARCH_GPIO_H */ | 144 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-s5pc100/include/mach/memory.h b/arch/arm/mach-s5pc100/include/mach/memory.h deleted file mode 100644 index bda4e79fd5fc..000000000000 --- a/arch/arm/mach-s5pc100/include/mach/memory.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* arch/arm/mach-s5pc100/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright 2008 Samsung Electronics Co. | ||
4 | * Byungho Min <bhmin@samsung.com> | ||
5 | * | ||
6 | * Based on mach-s3c6400/include/mach/memory.h | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H | ||
15 | |||
16 | #define PLAT_PHYS_OFFSET UL(0x20000000) | ||
17 | |||
18 | #endif | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/debug-macro.S b/arch/arm/mach-s5pv210/include/mach/debug-macro.S index 169fe654a59e..79e55597ab63 100644 --- a/arch/arm/mach-s5pv210/include/mach/debug-macro.S +++ b/arch/arm/mach-s5pv210/include/mach/debug-macro.S | |||
@@ -21,7 +21,7 @@ | |||
21 | * aligned and add in the offset when we load the value here. | 21 | * aligned and add in the offset when we load the value here. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | .macro addruart, rp, rv | 24 | .macro addruart, rp, rv, tmp |
25 | ldr \rp, = S3C_PA_UART | 25 | ldr \rp, = S3C_PA_UART |
26 | ldr \rv, = S3C_VA_UART | 26 | ldr \rv, = S3C_VA_UART |
27 | #if CONFIG_DEBUG_S3C_UART != 0 | 27 | #if CONFIG_DEBUG_S3C_UART != 0 |
diff --git a/arch/arm/mach-s5pv210/include/mach/gpio.h b/arch/arm/mach-s5pv210/include/mach/gpio.h index a5a1e331f8ed..6c8b903c02e4 100644 --- a/arch/arm/mach-s5pv210/include/mach/gpio.h +++ b/arch/arm/mach-s5pv210/include/mach/gpio.h | |||
@@ -13,11 +13,6 @@ | |||
13 | #ifndef __ASM_ARCH_GPIO_H | 13 | #ifndef __ASM_ARCH_GPIO_H |
14 | #define __ASM_ARCH_GPIO_H __FILE__ | 14 | #define __ASM_ARCH_GPIO_H __FILE__ |
15 | 15 | ||
16 | #define gpio_get_value __gpio_get_value | ||
17 | #define gpio_set_value __gpio_set_value | ||
18 | #define gpio_cansleep __gpio_cansleep | ||
19 | #define gpio_to_irq __gpio_to_irq | ||
20 | |||
21 | /* Practically, GPIO banks up to MP03 are the configurable gpio banks */ | 16 | /* Practically, GPIO banks up to MP03 are the configurable gpio banks */ |
22 | 17 | ||
23 | /* GPIO bank sizes */ | 18 | /* GPIO bank sizes */ |
@@ -142,6 +137,4 @@ enum s5p_gpio_number { | |||
142 | #define ARCH_NR_GPIOS (S5PV210_MP05(S5PV210_GPIO_MP05_NR) + \ | 137 | #define ARCH_NR_GPIOS (S5PV210_MP05(S5PV210_GPIO_MP05_NR) + \ |
143 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) | 138 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) |
144 | 139 | ||
145 | #include <asm-generic/gpio.h> | ||
146 | |||
147 | #endif /* __ASM_ARCH_GPIO_H */ | 140 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile index 41252d22e659..73a5c6431792 100644 --- a/arch/arm/mach-sa1100/Makefile +++ b/arch/arm/mach-sa1100/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := clock.o generic.o gpio.o irq.o dma.o time.o #nmi-oopser.o | 6 | obj-y := clock.o generic.o irq.o dma.o time.o #nmi-oopser.o |
7 | obj-m := | 7 | obj-m := |
8 | obj-n := | 8 | obj-n := |
9 | obj- := | 9 | obj- := |
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index e21f3470eece..5fa5ae1f39e1 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | #include <linux/gpio.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
@@ -24,7 +25,6 @@ | |||
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
25 | #include <asm/mach/flash.h> | 26 | #include <asm/mach/flash.h> |
26 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
27 | #include <asm/gpio.h> | ||
28 | 28 | ||
29 | #include "generic.h" | 29 | #include "generic.h" |
30 | 30 | ||
diff --git a/arch/arm/mach-sa1100/gpio.c b/arch/arm/mach-sa1100/gpio.c deleted file mode 100644 index 0d3829a8c2c1..000000000000 --- a/arch/arm/mach-sa1100/gpio.c +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-sa1100/gpio.c | ||
3 | * | ||
4 | * Generic SA-1100 GPIO handling | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/init.h> | ||
12 | #include <linux/module.h> | ||
13 | |||
14 | #include <asm/gpio.h> | ||
15 | #include <mach/hardware.h> | ||
16 | #include "generic.h" | ||
17 | |||
18 | static int sa1100_gpio_get(struct gpio_chip *chip, unsigned offset) | ||
19 | { | ||
20 | return GPLR & GPIO_GPIO(offset); | ||
21 | } | ||
22 | |||
23 | static void sa1100_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | ||
24 | { | ||
25 | if (value) | ||
26 | GPSR = GPIO_GPIO(offset); | ||
27 | else | ||
28 | GPCR = GPIO_GPIO(offset); | ||
29 | } | ||
30 | |||
31 | static int sa1100_direction_input(struct gpio_chip *chip, unsigned offset) | ||
32 | { | ||
33 | unsigned long flags; | ||
34 | |||
35 | local_irq_save(flags); | ||
36 | GPDR &= ~GPIO_GPIO(offset); | ||
37 | local_irq_restore(flags); | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | static int sa1100_direction_output(struct gpio_chip *chip, unsigned offset, int value) | ||
42 | { | ||
43 | unsigned long flags; | ||
44 | |||
45 | local_irq_save(flags); | ||
46 | sa1100_gpio_set(chip, offset, value); | ||
47 | GPDR |= GPIO_GPIO(offset); | ||
48 | local_irq_restore(flags); | ||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | static struct gpio_chip sa1100_gpio_chip = { | ||
53 | .label = "gpio", | ||
54 | .direction_input = sa1100_direction_input, | ||
55 | .direction_output = sa1100_direction_output, | ||
56 | .set = sa1100_gpio_set, | ||
57 | .get = sa1100_gpio_get, | ||
58 | .base = 0, | ||
59 | .ngpio = GPIO_MAX + 1, | ||
60 | }; | ||
61 | |||
62 | void __init sa1100_init_gpio(void) | ||
63 | { | ||
64 | gpiochip_add(&sa1100_gpio_chip); | ||
65 | } | ||
diff --git a/arch/arm/mach-sa1100/include/mach/debug-macro.S b/arch/arm/mach-sa1100/include/mach/debug-macro.S index 0cd0fc9635b6..530772d937ad 100644 --- a/arch/arm/mach-sa1100/include/mach/debug-macro.S +++ b/arch/arm/mach-sa1100/include/mach/debug-macro.S | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | 14 | ||
15 | .macro addruart, rp, rv | 15 | .macro addruart, rp, rv, tmp |
16 | mrc p15, 0, \rp, c1, c0 | 16 | mrc p15, 0, \rp, c1, c0 |
17 | tst \rp, #1 @ MMU enabled? | 17 | tst \rp, #1 @ MMU enabled? |
18 | moveq \rp, #0x80000000 @ physical base address | 18 | moveq \rp, #0x80000000 @ physical base address |
diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h index 7befc104e9a9..703631887c94 100644 --- a/arch/arm/mach-sa1100/include/mach/gpio.h +++ b/arch/arm/mach-sa1100/include/mach/gpio.h | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | #include <asm-generic/gpio.h> | 29 | #include <asm-generic/gpio.h> |
30 | 30 | ||
31 | #define __ARM_GPIOLIB_COMPLEX | ||
32 | |||
31 | static inline int gpio_get_value(unsigned gpio) | 33 | static inline int gpio_get_value(unsigned gpio) |
32 | { | 34 | { |
33 | if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX)) | 35 | if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX)) |
@@ -51,7 +53,5 @@ static inline void gpio_set_value(unsigned gpio, int value) | |||
51 | 53 | ||
52 | #define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \ | 54 | #define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \ |
53 | (IRQ_GPIO11 - 11 + gpio)) | 55 | (IRQ_GPIO11 - 11 + gpio)) |
54 | #define irq_to_gpio(irq) ((irq < IRQ_GPIO11_27) ? (irq - IRQ_GPIO0) : \ | ||
55 | (irq - IRQ_GPIO11 + 11)) | ||
56 | 56 | ||
57 | #endif | 57 | #endif |
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S index a473f55dc71f..20eb2bf2a42b 100644 --- a/arch/arm/mach-shark/include/mach/debug-macro.S +++ b/arch/arm/mach-shark/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0xe0000000 | 15 | mov \rp, #0xe0000000 |
16 | orr \rp, \rp, #0x000003f8 | 16 | orr \rp, \rp, #0x000003f8 |
17 | mov \rv, \rp | 17 | mov \rv, \rp |
diff --git a/arch/arm/mach-shmobile/include/mach/gpio.h b/arch/arm/mach-shmobile/include/mach/gpio.h index 2b1bb9e43dda..7bf0890e16ba 100644 --- a/arch/arm/mach-shmobile/include/mach/gpio.h +++ b/arch/arm/mach-shmobile/include/mach/gpio.h | |||
@@ -18,31 +18,15 @@ | |||
18 | 18 | ||
19 | #ifdef CONFIG_GPIOLIB | 19 | #ifdef CONFIG_GPIOLIB |
20 | 20 | ||
21 | static inline int gpio_get_value(unsigned gpio) | ||
22 | { | ||
23 | return __gpio_get_value(gpio); | ||
24 | } | ||
25 | |||
26 | static inline void gpio_set_value(unsigned gpio, int value) | ||
27 | { | ||
28 | __gpio_set_value(gpio, value); | ||
29 | } | ||
30 | |||
31 | static inline int gpio_cansleep(unsigned gpio) | ||
32 | { | ||
33 | return __gpio_cansleep(gpio); | ||
34 | } | ||
35 | |||
36 | static inline int gpio_to_irq(unsigned gpio) | ||
37 | { | ||
38 | return __gpio_to_irq(gpio); | ||
39 | } | ||
40 | |||
41 | static inline int irq_to_gpio(unsigned int irq) | 21 | static inline int irq_to_gpio(unsigned int irq) |
42 | { | 22 | { |
43 | return -ENOSYS; | 23 | return -ENOSYS; |
44 | } | 24 | } |
45 | 25 | ||
26 | #else | ||
27 | |||
28 | #define __ARM_GPIOLIB_COMPLEX | ||
29 | |||
46 | #endif /* CONFIG_GPIOLIB */ | 30 | #endif /* CONFIG_GPIOLIB */ |
47 | 31 | ||
48 | #endif /* __ASM_ARCH_GPIO_H */ | 32 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-spear3xx/include/mach/memory.h b/arch/arm/mach-spear3xx/include/mach/memory.h deleted file mode 100644 index 51735221ea19..000000000000 --- a/arch/arm/mach-spear3xx/include/mach/memory.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/memory.h | ||
3 | * | ||
4 | * Memory map for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_MEMORY_H | ||
15 | #define __MACH_MEMORY_H | ||
16 | |||
17 | #include <plat/memory.h> | ||
18 | |||
19 | #endif /* __MACH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/memory.h b/arch/arm/mach-spear6xx/include/mach/memory.h deleted file mode 100644 index 781f088fc228..000000000000 --- a/arch/arm/mach-spear6xx/include/mach/memory.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/memory.h | ||
3 | * | ||
4 | * Memory map for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_MEMORY_H | ||
15 | #define __MACH_MEMORY_H | ||
16 | |||
17 | #include <plat/memory.h> | ||
18 | |||
19 | #endif /* __MACH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-tegra/board-harmony-pcie.c b/arch/arm/mach-tegra/board-harmony-pcie.c index 9c27b95b8d86..6db7d699ef1c 100644 --- a/arch/arm/mach-tegra/board-harmony-pcie.c +++ b/arch/arm/mach-tegra/board-harmony-pcie.c | |||
@@ -24,12 +24,10 @@ | |||
24 | 24 | ||
25 | #include <mach/pinmux.h> | 25 | #include <mach/pinmux.h> |
26 | #include "board.h" | 26 | #include "board.h" |
27 | #include "board-harmony.h" | ||
27 | 28 | ||
28 | #ifdef CONFIG_TEGRA_PCI | 29 | #ifdef CONFIG_TEGRA_PCI |
29 | 30 | ||
30 | /* GPIO 3 of the PMIC */ | ||
31 | #define EN_VDD_1V05_GPIO (TEGRA_NR_GPIOS + 2) | ||
32 | |||
33 | static int __init harmony_pcie_init(void) | 31 | static int __init harmony_pcie_init(void) |
34 | { | 32 | { |
35 | struct regulator *regulator = NULL; | 33 | struct regulator *regulator = NULL; |
@@ -38,11 +36,11 @@ static int __init harmony_pcie_init(void) | |||
38 | if (!machine_is_harmony()) | 36 | if (!machine_is_harmony()) |
39 | return 0; | 37 | return 0; |
40 | 38 | ||
41 | err = gpio_request(EN_VDD_1V05_GPIO, "EN_VDD_1V05"); | 39 | err = gpio_request(TEGRA_GPIO_EN_VDD_1V05_GPIO, "EN_VDD_1V05"); |
42 | if (err) | 40 | if (err) |
43 | return err; | 41 | return err; |
44 | 42 | ||
45 | gpio_direction_output(EN_VDD_1V05_GPIO, 1); | 43 | gpio_direction_output(TEGRA_GPIO_EN_VDD_1V05_GPIO, 1); |
46 | 44 | ||
47 | regulator = regulator_get(NULL, "pex_clk"); | 45 | regulator = regulator_get(NULL, "pex_clk"); |
48 | if (IS_ERR_OR_NULL(regulator)) | 46 | if (IS_ERR_OR_NULL(regulator)) |
@@ -68,7 +66,7 @@ err_pcie: | |||
68 | regulator_disable(regulator); | 66 | regulator_disable(regulator); |
69 | regulator_put(regulator); | 67 | regulator_put(regulator); |
70 | err_reg: | 68 | err_reg: |
71 | gpio_free(EN_VDD_1V05_GPIO); | 69 | gpio_free(TEGRA_GPIO_EN_VDD_1V05_GPIO); |
72 | 70 | ||
73 | return err; | 71 | return err; |
74 | } | 72 | } |
diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h index d85142edaf6b..139d96c93843 100644 --- a/arch/arm/mach-tegra/board-harmony.h +++ b/arch/arm/mach-tegra/board-harmony.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #ifndef _MACH_TEGRA_BOARD_HARMONY_H | 17 | #ifndef _MACH_TEGRA_BOARD_HARMONY_H |
18 | #define _MACH_TEGRA_BOARD_HARMONY_H | 18 | #define _MACH_TEGRA_BOARD_HARMONY_H |
19 | 19 | ||
20 | #include <mach/gpio-tegra.h> | ||
21 | |||
20 | #define HARMONY_GPIO_TPS6586X(_x_) (TEGRA_NR_GPIOS + (_x_)) | 22 | #define HARMONY_GPIO_TPS6586X(_x_) (TEGRA_NR_GPIOS + (_x_)) |
21 | #define HARMONY_GPIO_WM8903(_x_) (HARMONY_GPIO_TPS6586X(4) + (_x_)) | 23 | #define HARMONY_GPIO_WM8903(_x_) (HARMONY_GPIO_TPS6586X(4) + (_x_)) |
22 | 24 | ||
@@ -31,6 +33,7 @@ | |||
31 | #define TEGRA_GPIO_HP_DET TEGRA_GPIO_PW2 | 33 | #define TEGRA_GPIO_HP_DET TEGRA_GPIO_PW2 |
32 | #define TEGRA_GPIO_INT_MIC_EN TEGRA_GPIO_PX0 | 34 | #define TEGRA_GPIO_INT_MIC_EN TEGRA_GPIO_PX0 |
33 | #define TEGRA_GPIO_EXT_MIC_EN TEGRA_GPIO_PX1 | 35 | #define TEGRA_GPIO_EXT_MIC_EN TEGRA_GPIO_PX1 |
36 | #define TEGRA_GPIO_EN_VDD_1V05_GPIO HARMONY_GPIO_TPS6586X(2) | ||
34 | 37 | ||
35 | void harmony_pinmux_init(void); | 38 | void harmony_pinmux_init(void); |
36 | int harmony_regulator_init(void); | 39 | int harmony_regulator_init(void); |
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h index d4ff39ddaeb3..42ce8639b90c 100644 --- a/arch/arm/mach-tegra/board-paz00.h +++ b/arch/arm/mach-tegra/board-paz00.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #ifndef _MACH_TEGRA_BOARD_PAZ00_H | 17 | #ifndef _MACH_TEGRA_BOARD_PAZ00_H |
18 | #define _MACH_TEGRA_BOARD_PAZ00_H | 18 | #define _MACH_TEGRA_BOARD_PAZ00_H |
19 | 19 | ||
20 | #include <mach/gpio-tegra.h> | ||
21 | |||
20 | #define TEGRA_GPIO_SD1_CD TEGRA_GPIO_PV5 | 22 | #define TEGRA_GPIO_SD1_CD TEGRA_GPIO_PV5 |
21 | #define TEGRA_GPIO_SD1_WP TEGRA_GPIO_PH1 | 23 | #define TEGRA_GPIO_SD1_WP TEGRA_GPIO_PH1 |
22 | #define TEGRA_GPIO_SD1_POWER TEGRA_GPIO_PT3 | 24 | #define TEGRA_GPIO_SD1_POWER TEGRA_GPIO_PT3 |
diff --git a/arch/arm/mach-tegra/board-seaboard.h b/arch/arm/mach-tegra/board-seaboard.h index d8415e1a8434..15b6c57361be 100644 --- a/arch/arm/mach-tegra/board-seaboard.h +++ b/arch/arm/mach-tegra/board-seaboard.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #ifndef _MACH_TEGRA_BOARD_SEABOARD_H | 17 | #ifndef _MACH_TEGRA_BOARD_SEABOARD_H |
18 | #define _MACH_TEGRA_BOARD_SEABOARD_H | 18 | #define _MACH_TEGRA_BOARD_SEABOARD_H |
19 | 19 | ||
20 | #include <mach/gpio-tegra.h> | ||
21 | |||
20 | #define TEGRA_GPIO_SD2_CD TEGRA_GPIO_PI5 | 22 | #define TEGRA_GPIO_SD2_CD TEGRA_GPIO_PI5 |
21 | #define TEGRA_GPIO_SD2_WP TEGRA_GPIO_PH1 | 23 | #define TEGRA_GPIO_SD2_WP TEGRA_GPIO_PH1 |
22 | #define TEGRA_GPIO_SD2_POWER TEGRA_GPIO_PI6 | 24 | #define TEGRA_GPIO_SD2_POWER TEGRA_GPIO_PI6 |
diff --git a/arch/arm/mach-tegra/board-trimslice-pinmux.c b/arch/arm/mach-tegra/board-trimslice-pinmux.c index 47c596cdbf32..bcb1916e68b9 100644 --- a/arch/arm/mach-tegra/board-trimslice-pinmux.c +++ b/arch/arm/mach-tegra/board-trimslice-pinmux.c | |||
@@ -13,12 +13,11 @@ | |||
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | #include <linux/gpio.h> | |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | 19 | ||
20 | #include <mach/pinmux.h> | 20 | #include <mach/pinmux.h> |
21 | #include <mach/gpio.h> | ||
22 | 21 | ||
23 | #include "gpio-names.h" | 22 | #include "gpio-names.h" |
24 | #include "board-trimslice.h" | 23 | #include "board-trimslice.h" |
diff --git a/arch/arm/mach-tegra/board-trimslice.h b/arch/arm/mach-tegra/board-trimslice.h index 7a7dee86b4da..50f128d87779 100644 --- a/arch/arm/mach-tegra/board-trimslice.h +++ b/arch/arm/mach-tegra/board-trimslice.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #ifndef _MACH_TEGRA_BOARD_TRIMSLICE_H | 17 | #ifndef _MACH_TEGRA_BOARD_TRIMSLICE_H |
18 | #define _MACH_TEGRA_BOARD_TRIMSLICE_H | 18 | #define _MACH_TEGRA_BOARD_TRIMSLICE_H |
19 | 19 | ||
20 | #include <mach/gpio-tegra.h> | ||
21 | |||
20 | #define TRIMSLICE_GPIO_SD4_CD TEGRA_GPIO_PP1 /* mmc4 cd */ | 22 | #define TRIMSLICE_GPIO_SD4_CD TEGRA_GPIO_PP1 /* mmc4 cd */ |
21 | #define TRIMSLICE_GPIO_SD4_WP TEGRA_GPIO_PP2 /* mmc4 wp */ | 23 | #define TRIMSLICE_GPIO_SD4_WP TEGRA_GPIO_PP2 /* mmc4 wp */ |
22 | 24 | ||
diff --git a/arch/arm/mach-tegra/include/mach/debug-macro.S b/arch/arm/mach-tegra/include/mach/debug-macro.S index e0ebe65c1657..619abc63aee8 100644 --- a/arch/arm/mach-tegra/include/mach/debug-macro.S +++ b/arch/arm/mach-tegra/include/mach/debug-macro.S | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <mach/io.h> | 21 | #include <mach/io.h> |
22 | #include <mach/iomap.h> | 22 | #include <mach/iomap.h> |
23 | 23 | ||
24 | .macro addruart, rp, rv | 24 | .macro addruart, rp, rv, tmp |
25 | ldr \rp, =IO_APB_PHYS @ physical | 25 | ldr \rp, =IO_APB_PHYS @ physical |
26 | ldr \rv, =IO_APB_VIRT @ virtual | 26 | ldr \rv, =IO_APB_VIRT @ virtual |
27 | orr \rp, \rp, #(TEGRA_DEBUG_UART_BASE & 0xFF) | 27 | orr \rp, \rp, #(TEGRA_DEBUG_UART_BASE & 0xFF) |
diff --git a/arch/arm/mach-tegra/include/mach/memory.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h index 537db3aa81a7..87d37fdf5084 100644 --- a/arch/arm/mach-tegra/include/mach/memory.h +++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h | |||
@@ -1,10 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-tegra/include/mach/memory.h | 2 | * arch/arm/mach-tegra/include/mach/gpio.h |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Google, Inc. | 4 | * Copyright (C) 2010 Google, Inc. |
5 | * | 5 | * |
6 | * Author: | 6 | * Author: |
7 | * Colin Cross <ccross@google.com> | ||
8 | * Erik Gilling <konkers@google.com> | 7 | * Erik Gilling <konkers@google.com> |
9 | * | 8 | * |
10 | * This software is licensed under the terms of the GNU General Public | 9 | * This software is licensed under the terms of the GNU General Public |
@@ -18,11 +17,23 @@ | |||
18 | * | 17 | * |
19 | */ | 18 | */ |
20 | 19 | ||
21 | #ifndef __MACH_TEGRA_MEMORY_H | 20 | #ifndef __MACH_TEGRA_GPIO_TEGRA_H |
22 | #define __MACH_TEGRA_MEMORY_H | 21 | #define __MACH_TEGRA_GPIO_TEGRA_H |
23 | 22 | ||
24 | /* physical offset of RAM */ | 23 | #include <linux/types.h> |
25 | #define PLAT_PHYS_OFFSET UL(0) | 24 | #include <mach/irqs.h> |
26 | 25 | ||
27 | #endif | 26 | #define TEGRA_NR_GPIOS INT_GPIO_NR |
27 | |||
28 | #define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio)) | ||
29 | |||
30 | struct tegra_gpio_table { | ||
31 | int gpio; /* GPIO number */ | ||
32 | bool enable; /* Enable for GPIO at init? */ | ||
33 | }; | ||
28 | 34 | ||
35 | void tegra_gpio_config(struct tegra_gpio_table *table, int num); | ||
36 | void tegra_gpio_enable(int gpio); | ||
37 | void tegra_gpio_disable(int gpio); | ||
38 | |||
39 | #endif | ||
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h index 196f114dc241..e69de29bb2d1 100644 --- a/arch/arm/mach-tegra/include/mach/gpio.h +++ b/arch/arm/mach-tegra/include/mach/gpio.h | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/include/mach/gpio.h | ||
3 | * | ||
4 | * Copyright (C) 2010 Google, Inc. | ||
5 | * | ||
6 | * Author: | ||
7 | * Erik Gilling <konkers@google.com> | ||
8 | * | ||
9 | * This software is licensed under the terms of the GNU General Public | ||
10 | * License version 2, as published by the Free Software Foundation, and | ||
11 | * may be copied, distributed, and modified under those terms. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef __MACH_TEGRA_GPIO_H | ||
21 | #define __MACH_TEGRA_GPIO_H | ||
22 | |||
23 | #include <linux/init.h> | ||
24 | #include <mach/irqs.h> | ||
25 | |||
26 | #define TEGRA_NR_GPIOS INT_GPIO_NR | ||
27 | |||
28 | #include <asm-generic/gpio.h> | ||
29 | |||
30 | #define gpio_get_value __gpio_get_value | ||
31 | #define gpio_set_value __gpio_set_value | ||
32 | #define gpio_cansleep __gpio_cansleep | ||
33 | |||
34 | #define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio)) | ||
35 | #define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE) | ||
36 | |||
37 | static inline int gpio_to_irq(unsigned int gpio) | ||
38 | { | ||
39 | if (gpio < TEGRA_NR_GPIOS) | ||
40 | return INT_GPIO_BASE + gpio; | ||
41 | return -EINVAL; | ||
42 | } | ||
43 | |||
44 | static inline int irq_to_gpio(unsigned int irq) | ||
45 | { | ||
46 | if ((irq >= INT_GPIO_BASE) && (irq < INT_GPIO_BASE + INT_GPIO_NR)) | ||
47 | return irq - INT_GPIO_BASE; | ||
48 | return -EINVAL; | ||
49 | } | ||
50 | |||
51 | struct tegra_gpio_table { | ||
52 | int gpio; /* GPIO number */ | ||
53 | bool enable; /* Enable for GPIO at init? */ | ||
54 | }; | ||
55 | |||
56 | void tegra_gpio_config(struct tegra_gpio_table *table, int num); | ||
57 | void tegra_gpio_enable(int gpio); | ||
58 | void tegra_gpio_disable(int gpio); | ||
59 | |||
60 | #endif | ||
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index 88081bb3ec52..37576a721aeb 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/usb/otg.h> | 28 | #include <linux/usb/otg.h> |
29 | #include <linux/usb/ulpi.h> | 29 | #include <linux/usb/ulpi.h> |
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
31 | #include <mach/gpio-tegra.h> | ||
31 | #include <mach/usb_phy.h> | 32 | #include <mach/usb_phy.h> |
32 | #include <mach/iomap.h> | 33 | #include <mach/iomap.h> |
33 | 34 | ||
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig index 966a5a06a58c..39e077e2f243 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig | |||
@@ -6,6 +6,7 @@ comment "ST-Ericsson Mobile Platform Products" | |||
6 | 6 | ||
7 | config MACH_U300 | 7 | config MACH_U300 |
8 | bool "U300" | 8 | bool "U300" |
9 | select GPIO_U300 | ||
9 | 10 | ||
10 | comment "ST-Ericsson U300/U330/U335/U365 Feature Selections" | 11 | comment "ST-Ericsson U300/U330/U335/U365 Feature Selections" |
11 | 12 | ||
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 724037e2de3d..2f1d758133a7 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
39 | #include <mach/syscon.h> | 39 | #include <mach/syscon.h> |
40 | #include <mach/dma_channels.h> | 40 | #include <mach/dma_channels.h> |
41 | #include <mach/gpio-u300.h> | ||
41 | 42 | ||
42 | #include "clock.h" | 43 | #include "clock.h" |
43 | #include "mmc.h" | 44 | #include "mmc.h" |
@@ -223,7 +224,7 @@ static struct resource gpio_resources[] = { | |||
223 | .end = IRQ_U300_GPIO_PORT2, | 224 | .end = IRQ_U300_GPIO_PORT2, |
224 | .flags = IORESOURCE_IRQ, | 225 | .flags = IORESOURCE_IRQ, |
225 | }, | 226 | }, |
226 | #ifdef U300_COH901571_3 | 227 | #if defined(CONFIG_MACH_U300_BS365) || defined(CONFIG_MACH_U300_BS335) |
227 | { | 228 | { |
228 | .name = "gpio3", | 229 | .name = "gpio3", |
229 | .start = IRQ_U300_GPIO_PORT3, | 230 | .start = IRQ_U300_GPIO_PORT3, |
@@ -236,6 +237,7 @@ static struct resource gpio_resources[] = { | |||
236 | .end = IRQ_U300_GPIO_PORT4, | 237 | .end = IRQ_U300_GPIO_PORT4, |
237 | .flags = IORESOURCE_IRQ, | 238 | .flags = IORESOURCE_IRQ, |
238 | }, | 239 | }, |
240 | #endif | ||
239 | #ifdef CONFIG_MACH_U300_BS335 | 241 | #ifdef CONFIG_MACH_U300_BS335 |
240 | { | 242 | { |
241 | .name = "gpio5", | 243 | .name = "gpio5", |
@@ -250,7 +252,6 @@ static struct resource gpio_resources[] = { | |||
250 | .flags = IORESOURCE_IRQ, | 252 | .flags = IORESOURCE_IRQ, |
251 | }, | 253 | }, |
252 | #endif /* CONFIG_MACH_U300_BS335 */ | 254 | #endif /* CONFIG_MACH_U300_BS335 */ |
253 | #endif /* U300_COH901571_3 */ | ||
254 | }; | 255 | }; |
255 | 256 | ||
256 | static struct resource keypad_resources[] = { | 257 | static struct resource keypad_resources[] = { |
@@ -1495,11 +1496,35 @@ static struct platform_device i2c1_device = { | |||
1495 | .resource = i2c1_resources, | 1496 | .resource = i2c1_resources, |
1496 | }; | 1497 | }; |
1497 | 1498 | ||
1499 | /* | ||
1500 | * The different variants have a few different versions of the | ||
1501 | * GPIO block, with different number of ports. | ||
1502 | */ | ||
1503 | static struct u300_gpio_platform u300_gpio_plat = { | ||
1504 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) | ||
1505 | .variant = U300_GPIO_COH901335, | ||
1506 | .ports = 3, | ||
1507 | #endif | ||
1508 | #ifdef CONFIG_MACH_U300_BS335 | ||
1509 | .variant = U300_GPIO_COH901571_3_BS335, | ||
1510 | .ports = 7, | ||
1511 | #endif | ||
1512 | #ifdef CONFIG_MACH_U300_BS365 | ||
1513 | .variant = U300_GPIO_COH901571_3_BS365, | ||
1514 | .ports = 5, | ||
1515 | #endif | ||
1516 | .gpio_base = 0, | ||
1517 | .gpio_irq_base = IRQ_U300_GPIO_BASE, | ||
1518 | }; | ||
1519 | |||
1498 | static struct platform_device gpio_device = { | 1520 | static struct platform_device gpio_device = { |
1499 | .name = "u300-gpio", | 1521 | .name = "u300-gpio", |
1500 | .id = -1, | 1522 | .id = -1, |
1501 | .num_resources = ARRAY_SIZE(gpio_resources), | 1523 | .num_resources = ARRAY_SIZE(gpio_resources), |
1502 | .resource = gpio_resources, | 1524 | .resource = gpio_resources, |
1525 | .dev = { | ||
1526 | .platform_data = &u300_gpio_plat, | ||
1527 | }, | ||
1503 | }; | 1528 | }; |
1504 | 1529 | ||
1505 | static struct platform_device keypad_device = { | 1530 | static struct platform_device keypad_device = { |
@@ -1596,7 +1621,7 @@ void __init u300_init_irq(void) | |||
1596 | BUG_ON(IS_ERR(clk)); | 1621 | BUG_ON(IS_ERR(clk)); |
1597 | clk_enable(clk); | 1622 | clk_enable(clk); |
1598 | 1623 | ||
1599 | for (i = 0; i < NR_IRQS; i++) | 1624 | for (i = 0; i < U300_VIC_IRQS_END; i++) |
1600 | set_bit(i, (unsigned long *) &mask[0]); | 1625 | set_bit(i, (unsigned long *) &mask[0]); |
1601 | vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], mask[0]); | 1626 | vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], mask[0]); |
1602 | vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], mask[1]); | 1627 | vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], mask[1]); |
diff --git a/arch/arm/mach-u300/include/mach/debug-macro.S b/arch/arm/mach-u300/include/mach/debug-macro.S index df715707bead..8ae8e4ab34b0 100644 --- a/arch/arm/mach-u300/include/mach/debug-macro.S +++ b/arch/arm/mach-u300/include/mach/debug-macro.S | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <mach/hardware.h> | 11 | #include <mach/hardware.h> |
12 | 12 | ||
13 | .macro addruart, rp, rv | 13 | .macro addruart, rp, rv, tmp |
14 | /* If we move the address using MMU, use this. */ | 14 | /* If we move the address using MMU, use this. */ |
15 | ldr \rp, = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address | 15 | ldr \rp, = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address |
16 | ldr \rv, = U300_SLOW_PER_VIRT_BASE @ MMU on, virtual address | 16 | ldr \rv, = U300_SLOW_PER_VIRT_BASE @ MMU on, virtual address |
diff --git a/arch/arm/mach-u300/include/mach/gpio-u300.h b/arch/arm/mach-u300/include/mach/gpio-u300.h new file mode 100644 index 000000000000..0c2b2021951a --- /dev/null +++ b/arch/arm/mach-u300/include/mach/gpio-u300.h | |||
@@ -0,0 +1,150 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2011 ST-Ericsson AB | ||
3 | * License terms: GNU General Public License (GPL) version 2 | ||
4 | * GPIO block resgister definitions and inline macros for | ||
5 | * U300 GPIO COH 901 335 or COH 901 571/3 | ||
6 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_U300_GPIO_U300_H | ||
10 | #define __MACH_U300_GPIO_U300_H | ||
11 | |||
12 | /* | ||
13 | * Individual pin assignments for the B26/S26. Notice that the | ||
14 | * actual usage of these pins depends on the PAD MUX settings, that | ||
15 | * is why the same number can potentially appear several times. | ||
16 | * In the reference design each pin is only used for one purpose. | ||
17 | * These were determined by inspecting the B26/S26 schematic: | ||
18 | * 2/1911-ROA 128 1603 | ||
19 | */ | ||
20 | #ifdef CONFIG_MACH_U300_BS2X | ||
21 | #define U300_GPIO_PIN_UART_RX 0 | ||
22 | #define U300_GPIO_PIN_UART_TX 1 | ||
23 | #define U300_GPIO_PIN_GPIO02 2 /* Unrouted */ | ||
24 | #define U300_GPIO_PIN_GPIO03 3 /* Unrouted */ | ||
25 | #define U300_GPIO_PIN_CAM_SLEEP 4 | ||
26 | #define U300_GPIO_PIN_CAM_REG_EN 5 | ||
27 | #define U300_GPIO_PIN_GPIO06 6 /* Unrouted */ | ||
28 | #define U300_GPIO_PIN_GPIO07 7 /* Unrouted */ | ||
29 | |||
30 | #define U300_GPIO_PIN_GPIO08 8 /* Service point SP2321 */ | ||
31 | #define U300_GPIO_PIN_GPIO09 9 /* Service point SP2322 */ | ||
32 | #define U300_GPIO_PIN_PHFSENSE 10 /* Headphone jack sensing */ | ||
33 | #define U300_GPIO_PIN_MMC_CLKRET 11 /* Clock return from MMC/SD card */ | ||
34 | #define U300_GPIO_PIN_MMC_CD 12 /* MMC Card insertion detection */ | ||
35 | #define U300_GPIO_PIN_FLIPSENSE 13 /* Mechanical flip sensing */ | ||
36 | #define U300_GPIO_PIN_GPIO14 14 /* DSP JTAG Port RTCK */ | ||
37 | #define U300_GPIO_PIN_GPIO15 15 /* Unrouted */ | ||
38 | |||
39 | #define U300_GPIO_PIN_GPIO16 16 /* Unrouted */ | ||
40 | #define U300_GPIO_PIN_GPIO17 17 /* Unrouted */ | ||
41 | #define U300_GPIO_PIN_GPIO18 18 /* Unrouted */ | ||
42 | #define U300_GPIO_PIN_GPIO19 19 /* Unrouted */ | ||
43 | #define U300_GPIO_PIN_GPIO20 20 /* Unrouted */ | ||
44 | #define U300_GPIO_PIN_GPIO21 21 /* Unrouted */ | ||
45 | #define U300_GPIO_PIN_GPIO22 22 /* Unrouted */ | ||
46 | #define U300_GPIO_PIN_GPIO23 23 /* Unrouted */ | ||
47 | #endif | ||
48 | |||
49 | /* | ||
50 | * Individual pin assignments for the B330/S330 and B365/S365. | ||
51 | * Notice that the actual usage of these pins depends on the | ||
52 | * PAD MUX settings, that is why the same number can potentially | ||
53 | * appear several times. In the reference design each pin is only | ||
54 | * used for one purpose. These were determined by inspecting the | ||
55 | * S365 schematic. | ||
56 | */ | ||
57 | #if defined(CONFIG_MACH_U300_BS330) || defined(CONFIG_MACH_U300_BS365) || \ | ||
58 | defined(CONFIG_MACH_U300_BS335) | ||
59 | #define U300_GPIO_PIN_UART_RX 0 | ||
60 | #define U300_GPIO_PIN_UART_TX 1 | ||
61 | #define U300_GPIO_PIN_UART_CTS 2 | ||
62 | #define U300_GPIO_PIN_UART_RTS 3 | ||
63 | #define U300_GPIO_PIN_CAM_MAIN_STANDBY 4 /* Camera MAIN standby */ | ||
64 | #define U300_GPIO_PIN_GPIO05 5 /* Unrouted */ | ||
65 | #define U300_GPIO_PIN_MS_CD 6 /* Memory Stick Card insertion */ | ||
66 | #define U300_GPIO_PIN_GPIO07 7 /* Test point TP2430 */ | ||
67 | |||
68 | #define U300_GPIO_PIN_GPIO08 8 /* Test point TP2437 */ | ||
69 | #define U300_GPIO_PIN_GPIO09 9 /* Test point TP2431 */ | ||
70 | #define U300_GPIO_PIN_GPIO10 10 /* Test point TP2432 */ | ||
71 | #define U300_GPIO_PIN_MMC_CLKRET 11 /* Clock return from MMC/SD card */ | ||
72 | #define U300_GPIO_PIN_MMC_CD 12 /* MMC Card insertion detection */ | ||
73 | #define U300_GPIO_PIN_CAM_SUB_STANDBY 13 /* Camera SUB standby */ | ||
74 | #define U300_GPIO_PIN_GPIO14 14 /* Test point TP2436 */ | ||
75 | #define U300_GPIO_PIN_GPIO15 15 /* Unrouted */ | ||
76 | |||
77 | #define U300_GPIO_PIN_GPIO16 16 /* Test point TP2438 */ | ||
78 | #define U300_GPIO_PIN_PHFSENSE 17 /* Headphone jack sensing */ | ||
79 | #define U300_GPIO_PIN_GPIO18 18 /* Test point TP2439 */ | ||
80 | #define U300_GPIO_PIN_GPIO19 19 /* Routed somewhere */ | ||
81 | #define U300_GPIO_PIN_GPIO20 20 /* Unrouted */ | ||
82 | #define U300_GPIO_PIN_GPIO21 21 /* Unrouted */ | ||
83 | #define U300_GPIO_PIN_GPIO22 22 /* Unrouted */ | ||
84 | #define U300_GPIO_PIN_GPIO23 23 /* Unrouted */ | ||
85 | |||
86 | #define U300_GPIO_PIN_GPIO24 24 /* Unrouted */ | ||
87 | #define U300_GPIO_PIN_GPIO25 25 /* Unrouted */ | ||
88 | #define U300_GPIO_PIN_GPIO26 26 /* Unrouted */ | ||
89 | #define U300_GPIO_PIN_GPIO27 27 /* Unrouted */ | ||
90 | #define U300_GPIO_PIN_GPIO28 28 /* Unrouted */ | ||
91 | #define U300_GPIO_PIN_GPIO29 29 /* Unrouted */ | ||
92 | #define U300_GPIO_PIN_GPIO30 30 /* Unrouted */ | ||
93 | #define U300_GPIO_PIN_GPIO31 31 /* Unrouted */ | ||
94 | |||
95 | #define U300_GPIO_PIN_GPIO32 32 /* Unrouted */ | ||
96 | #define U300_GPIO_PIN_GPIO33 33 /* Unrouted */ | ||
97 | #define U300_GPIO_PIN_GPIO34 34 /* Unrouted */ | ||
98 | #define U300_GPIO_PIN_GPIO35 35 /* Unrouted */ | ||
99 | #define U300_GPIO_PIN_GPIO36 36 /* Unrouted */ | ||
100 | #define U300_GPIO_PIN_GPIO37 37 /* Unrouted */ | ||
101 | #define U300_GPIO_PIN_GPIO38 38 /* Unrouted */ | ||
102 | #define U300_GPIO_PIN_GPIO39 39 /* Unrouted */ | ||
103 | |||
104 | #ifdef CONFIG_MACH_U300_BS335 | ||
105 | |||
106 | #define U300_GPIO_PIN_GPIO40 40 /* Unrouted */ | ||
107 | #define U300_GPIO_PIN_GPIO41 41 /* Unrouted */ | ||
108 | #define U300_GPIO_PIN_GPIO42 42 /* Unrouted */ | ||
109 | #define U300_GPIO_PIN_GPIO43 43 /* Unrouted */ | ||
110 | #define U300_GPIO_PIN_GPIO44 44 /* Unrouted */ | ||
111 | #define U300_GPIO_PIN_GPIO45 45 /* Unrouted */ | ||
112 | #define U300_GPIO_PIN_GPIO46 46 /* Unrouted */ | ||
113 | #define U300_GPIO_PIN_GPIO47 47 /* Unrouted */ | ||
114 | |||
115 | #define U300_GPIO_PIN_GPIO48 48 /* Unrouted */ | ||
116 | #define U300_GPIO_PIN_GPIO49 49 /* Unrouted */ | ||
117 | #define U300_GPIO_PIN_GPIO50 50 /* Unrouted */ | ||
118 | #define U300_GPIO_PIN_GPIO51 51 /* Unrouted */ | ||
119 | #define U300_GPIO_PIN_GPIO52 52 /* Unrouted */ | ||
120 | #define U300_GPIO_PIN_GPIO53 53 /* Unrouted */ | ||
121 | #define U300_GPIO_PIN_GPIO54 54 /* Unrouted */ | ||
122 | #define U300_GPIO_PIN_GPIO55 55 /* Unrouted */ | ||
123 | #endif | ||
124 | |||
125 | #endif | ||
126 | |||
127 | /** | ||
128 | * enum u300_gpio_variant - the type of U300 GPIO employed | ||
129 | */ | ||
130 | enum u300_gpio_variant { | ||
131 | U300_GPIO_COH901335, | ||
132 | U300_GPIO_COH901571_3_BS335, | ||
133 | U300_GPIO_COH901571_3_BS365, | ||
134 | }; | ||
135 | |||
136 | /** | ||
137 | * struct u300_gpio_platform - U300 GPIO platform data | ||
138 | * @variant: IP block variant | ||
139 | * @ports: number of GPIO block ports | ||
140 | * @gpio_base: first GPIO number for this block (use a free range) | ||
141 | * @gpio_irq_base: first GPIO IRQ number for this block (use a free range) | ||
142 | */ | ||
143 | struct u300_gpio_platform { | ||
144 | enum u300_gpio_variant variant; | ||
145 | u8 ports; | ||
146 | int gpio_base; | ||
147 | int gpio_irq_base; | ||
148 | }; | ||
149 | |||
150 | #endif /* __MACH_U300_GPIO_U300_H */ | ||
diff --git a/arch/arm/mach-u300/include/mach/gpio.h b/arch/arm/mach-u300/include/mach/gpio.h index d5a71abcbaea..e69de29bb2d1 100644 --- a/arch/arm/mach-u300/include/mach/gpio.h +++ b/arch/arm/mach-u300/include/mach/gpio.h | |||
@@ -1,294 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * arch/arm/mach-u300/include/mach/gpio.h | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2007-2009 ST-Ericsson AB | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * GPIO block resgister definitions and inline macros for | ||
9 | * U300 GPIO COH 901 335 or COH 901 571/3 | ||
10 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_U300_GPIO_H | ||
14 | #define __MACH_U300_GPIO_H | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <mach/hardware.h> | ||
19 | #include <asm/irq.h> | ||
20 | |||
21 | /* Switch type depending on platform/chip variant */ | ||
22 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) | ||
23 | #define U300_COH901335 | ||
24 | #endif | ||
25 | #if defined(CONFIG_MACH_U300_BS365) || defined(CONFIG_MACH_U300_BS335) | ||
26 | #define U300_COH901571_3 | ||
27 | #endif | ||
28 | |||
29 | /* Get base address for regs here */ | ||
30 | #include "u300-regs.h" | ||
31 | /* IRQ numbers */ | ||
32 | #include "irqs.h" | ||
33 | |||
34 | /* | ||
35 | * This is the GPIO block definitions. GPIO (General Purpose I/O) can be | ||
36 | * used for anything, and often is. The event/enable etc figures are for | ||
37 | * the lowermost pin (pin 0 on each port), shift this left to match your | ||
38 | * pin if you're gonna use these values. | ||
39 | */ | ||
40 | #ifdef U300_COH901335 | ||
41 | #define U300_GPIO_PORTX_SPACING (0x1C) | ||
42 | /* Port X Pin Data Register 32bit, this is both input and output (R/W) */ | ||
43 | #define U300_GPIO_PXPDIR (0x00) | ||
44 | #define U300_GPIO_PXPDOR (0x00) | ||
45 | /* Port X Pin Config Register 32bit (R/W) */ | ||
46 | #define U300_GPIO_PXPCR (0x04) | ||
47 | #define U300_GPIO_PXPCR_ALL_PINS_MODE_MASK (0x0000FFFFUL) | ||
48 | #define U300_GPIO_PXPCR_PIN_MODE_MASK (0x00000003UL) | ||
49 | #define U300_GPIO_PXPCR_PIN_MODE_SHIFT (0x00000002UL) | ||
50 | #define U300_GPIO_PXPCR_PIN_MODE_INPUT (0x00000000UL) | ||
51 | #define U300_GPIO_PXPCR_PIN_MODE_OUTPUT_PUSH_PULL (0x00000001UL) | ||
52 | #define U300_GPIO_PXPCR_PIN_MODE_OUTPUT_OPEN_DRAIN (0x00000002UL) | ||
53 | #define U300_GPIO_PXPCR_PIN_MODE_OUTPUT_OPEN_SOURCE (0x00000003UL) | ||
54 | /* Port X Interrupt Event Register 32bit (R/W) */ | ||
55 | #define U300_GPIO_PXIEV (0x08) | ||
56 | #define U300_GPIO_PXIEV_ALL_IRQ_EVENT_MASK (0x000000FFUL) | ||
57 | #define U300_GPIO_PXIEV_IRQ_EVENT (0x00000001UL) | ||
58 | /* Port X Interrupt Enable Register 32bit (R/W) */ | ||
59 | #define U300_GPIO_PXIEN (0x0C) | ||
60 | #define U300_GPIO_PXIEN_ALL_IRQ_ENABLE_MASK (0x000000FFUL) | ||
61 | #define U300_GPIO_PXIEN_IRQ_ENABLE (0x00000001UL) | ||
62 | /* Port X Interrupt Force Register 32bit (R/W) */ | ||
63 | #define U300_GPIO_PXIFR (0x10) | ||
64 | #define U300_GPIO_PXIFR_ALL_IRQ_FORCE_MASK (0x000000FFUL) | ||
65 | #define U300_GPIO_PXIFR_IRQ_FORCE (0x00000001UL) | ||
66 | /* Port X Interrupt Config Register 32bit (R/W) */ | ||
67 | #define U300_GPIO_PXICR (0x14) | ||
68 | #define U300_GPIO_PXICR_ALL_IRQ_CONFIG_MASK (0x000000FFUL) | ||
69 | #define U300_GPIO_PXICR_IRQ_CONFIG_MASK (0x00000001UL) | ||
70 | #define U300_GPIO_PXICR_IRQ_CONFIG_FALLING_EDGE (0x00000000UL) | ||
71 | #define U300_GPIO_PXICR_IRQ_CONFIG_RISING_EDGE (0x00000001UL) | ||
72 | /* Port X Pull-up Enable Register 32bit (R/W) */ | ||
73 | #define U300_GPIO_PXPER (0x18) | ||
74 | #define U300_GPIO_PXPER_ALL_PULL_UP_DISABLE_MASK (0x000000FFUL) | ||
75 | #define U300_GPIO_PXPER_PULL_UP_DISABLE (0x00000001UL) | ||
76 | /* Control Register 32bit (R/W) */ | ||
77 | #define U300_GPIO_CR (0x54) | ||
78 | #define U300_GPIO_CR_BLOCK_CLOCK_ENABLE (0x00000001UL) | ||
79 | /* three ports of 8 bits each = GPIO pins 0..23 */ | ||
80 | #define U300_GPIO_NUM_PORTS 3 | ||
81 | #define U300_GPIO_PINS_PER_PORT 8 | ||
82 | #define U300_GPIO_MAX (U300_GPIO_PINS_PER_PORT * U300_GPIO_NUM_PORTS - 1) | ||
83 | #endif | ||
84 | |||
85 | #ifdef U300_COH901571_3 | ||
86 | /* | ||
87 | * Control Register 32bit (R/W) | ||
88 | * bit 15-9 (mask 0x0000FE00) contains the number of cores. 8*cores | ||
89 | * gives the number of GPIO pins. | ||
90 | * bit 8-2 (mask 0x000001FC) contains the core version ID. | ||
91 | */ | ||
92 | #define U300_GPIO_CR (0x00) | ||
93 | #define U300_GPIO_CR_SYNC_SEL_ENABLE (0x00000002UL) | ||
94 | #define U300_GPIO_CR_BLOCK_CLKRQ_ENABLE (0x00000001UL) | ||
95 | #define U300_GPIO_PORTX_SPACING (0x30) | ||
96 | /* Port X Pin Data INPUT Register 32bit (R/W) */ | ||
97 | #define U300_GPIO_PXPDIR (0x04) | ||
98 | /* Port X Pin Data OUTPUT Register 32bit (R/W) */ | ||
99 | #define U300_GPIO_PXPDOR (0x08) | ||
100 | /* Port X Pin Config Register 32bit (R/W) */ | ||
101 | #define U300_GPIO_PXPCR (0x0C) | ||
102 | #define U300_GPIO_PXPCR_ALL_PINS_MODE_MASK (0x0000FFFFUL) | ||
103 | #define U300_GPIO_PXPCR_PIN_MODE_MASK (0x00000003UL) | ||
104 | #define U300_GPIO_PXPCR_PIN_MODE_SHIFT (0x00000002UL) | ||
105 | #define U300_GPIO_PXPCR_PIN_MODE_INPUT (0x00000000UL) | ||
106 | #define U300_GPIO_PXPCR_PIN_MODE_OUTPUT_PUSH_PULL (0x00000001UL) | ||
107 | #define U300_GPIO_PXPCR_PIN_MODE_OUTPUT_OPEN_DRAIN (0x00000002UL) | ||
108 | #define U300_GPIO_PXPCR_PIN_MODE_OUTPUT_OPEN_SOURCE (0x00000003UL) | ||
109 | /* Port X Pull-up Enable Register 32bit (R/W) */ | ||
110 | #define U300_GPIO_PXPER (0x10) | ||
111 | #define U300_GPIO_PXPER_ALL_PULL_UP_DISABLE_MASK (0x000000FFUL) | ||
112 | #define U300_GPIO_PXPER_PULL_UP_DISABLE (0x00000001UL) | ||
113 | /* Port X Interrupt Event Register 32bit (R/W) */ | ||
114 | #define U300_GPIO_PXIEV (0x14) | ||
115 | #define U300_GPIO_PXIEV_ALL_IRQ_EVENT_MASK (0x000000FFUL) | ||
116 | #define U300_GPIO_PXIEV_IRQ_EVENT (0x00000001UL) | ||
117 | /* Port X Interrupt Enable Register 32bit (R/W) */ | ||
118 | #define U300_GPIO_PXIEN (0x18) | ||
119 | #define U300_GPIO_PXIEN_ALL_IRQ_ENABLE_MASK (0x000000FFUL) | ||
120 | #define U300_GPIO_PXIEN_IRQ_ENABLE (0x00000001UL) | ||
121 | /* Port X Interrupt Force Register 32bit (R/W) */ | ||
122 | #define U300_GPIO_PXIFR (0x1C) | ||
123 | #define U300_GPIO_PXIFR_ALL_IRQ_FORCE_MASK (0x000000FFUL) | ||
124 | #define U300_GPIO_PXIFR_IRQ_FORCE (0x00000001UL) | ||
125 | /* Port X Interrupt Config Register 32bit (R/W) */ | ||
126 | #define U300_GPIO_PXICR (0x20) | ||
127 | #define U300_GPIO_PXICR_ALL_IRQ_CONFIG_MASK (0x000000FFUL) | ||
128 | #define U300_GPIO_PXICR_IRQ_CONFIG_MASK (0x00000001UL) | ||
129 | #define U300_GPIO_PXICR_IRQ_CONFIG_FALLING_EDGE (0x00000000UL) | ||
130 | #define U300_GPIO_PXICR_IRQ_CONFIG_RISING_EDGE (0x00000001UL) | ||
131 | #ifdef CONFIG_MACH_U300_BS335 | ||
132 | /* seven ports of 8 bits each = GPIO pins 0..55 */ | ||
133 | #define U300_GPIO_NUM_PORTS 7 | ||
134 | #else | ||
135 | /* five ports of 8 bits each = GPIO pins 0..39 */ | ||
136 | #define U300_GPIO_NUM_PORTS 5 | ||
137 | #endif | ||
138 | #define U300_GPIO_PINS_PER_PORT 8 | ||
139 | #define U300_GPIO_MAX (U300_GPIO_PINS_PER_PORT * U300_GPIO_NUM_PORTS - 1) | ||
140 | #endif | ||
141 | |||
142 | /* | ||
143 | * Individual pin assignments for the B26/S26. Notice that the | ||
144 | * actual usage of these pins depends on the PAD MUX settings, that | ||
145 | * is why the same number can potentially appear several times. | ||
146 | * In the reference design each pin is only used for one purpose. | ||
147 | * These were determined by inspecting the B26/S26 schematic: | ||
148 | * 2/1911-ROA 128 1603 | ||
149 | */ | ||
150 | #ifdef CONFIG_MACH_U300_BS2X | ||
151 | #define U300_GPIO_PIN_UART_RX 0 | ||
152 | #define U300_GPIO_PIN_UART_TX 1 | ||
153 | #define U300_GPIO_PIN_GPIO02 2 /* Unrouted */ | ||
154 | #define U300_GPIO_PIN_GPIO03 3 /* Unrouted */ | ||
155 | #define U300_GPIO_PIN_CAM_SLEEP 4 | ||
156 | #define U300_GPIO_PIN_CAM_REG_EN 5 | ||
157 | #define U300_GPIO_PIN_GPIO06 6 /* Unrouted */ | ||
158 | #define U300_GPIO_PIN_GPIO07 7 /* Unrouted */ | ||
159 | |||
160 | #define U300_GPIO_PIN_GPIO08 8 /* Service point SP2321 */ | ||
161 | #define U300_GPIO_PIN_GPIO09 9 /* Service point SP2322 */ | ||
162 | #define U300_GPIO_PIN_PHFSENSE 10 /* Headphone jack sensing */ | ||
163 | #define U300_GPIO_PIN_MMC_CLKRET 11 /* Clock return from MMC/SD card */ | ||
164 | #define U300_GPIO_PIN_MMC_CD 12 /* MMC Card insertion detection */ | ||
165 | #define U300_GPIO_PIN_FLIPSENSE 13 /* Mechanical flip sensing */ | ||
166 | #define U300_GPIO_PIN_GPIO14 14 /* DSP JTAG Port RTCK */ | ||
167 | #define U300_GPIO_PIN_GPIO15 15 /* Unrouted */ | ||
168 | |||
169 | #define U300_GPIO_PIN_GPIO16 16 /* Unrouted */ | ||
170 | #define U300_GPIO_PIN_GPIO17 17 /* Unrouted */ | ||
171 | #define U300_GPIO_PIN_GPIO18 18 /* Unrouted */ | ||
172 | #define U300_GPIO_PIN_GPIO19 19 /* Unrouted */ | ||
173 | #define U300_GPIO_PIN_GPIO20 20 /* Unrouted */ | ||
174 | #define U300_GPIO_PIN_GPIO21 21 /* Unrouted */ | ||
175 | #define U300_GPIO_PIN_GPIO22 22 /* Unrouted */ | ||
176 | #define U300_GPIO_PIN_GPIO23 23 /* Unrouted */ | ||
177 | #endif | ||
178 | |||
179 | /* | ||
180 | * Individual pin assignments for the B330/S330 and B365/S365. | ||
181 | * Notice that the actual usage of these pins depends on the | ||
182 | * PAD MUX settings, that is why the same number can potentially | ||
183 | * appear several times. In the reference design each pin is only | ||
184 | * used for one purpose. These were determined by inspecting the | ||
185 | * S365 schematic. | ||
186 | */ | ||
187 | #if defined(CONFIG_MACH_U300_BS330) || defined(CONFIG_MACH_U300_BS365) || \ | ||
188 | defined(CONFIG_MACH_U300_BS335) | ||
189 | #define U300_GPIO_PIN_UART_RX 0 | ||
190 | #define U300_GPIO_PIN_UART_TX 1 | ||
191 | #define U300_GPIO_PIN_UART_CTS 2 | ||
192 | #define U300_GPIO_PIN_UART_RTS 3 | ||
193 | #define U300_GPIO_PIN_CAM_MAIN_STANDBY 4 /* Camera MAIN standby */ | ||
194 | #define U300_GPIO_PIN_GPIO05 5 /* Unrouted */ | ||
195 | #define U300_GPIO_PIN_MS_CD 6 /* Memory Stick Card insertion */ | ||
196 | #define U300_GPIO_PIN_GPIO07 7 /* Test point TP2430 */ | ||
197 | |||
198 | #define U300_GPIO_PIN_GPIO08 8 /* Test point TP2437 */ | ||
199 | #define U300_GPIO_PIN_GPIO09 9 /* Test point TP2431 */ | ||
200 | #define U300_GPIO_PIN_GPIO10 10 /* Test point TP2432 */ | ||
201 | #define U300_GPIO_PIN_MMC_CLKRET 11 /* Clock return from MMC/SD card */ | ||
202 | #define U300_GPIO_PIN_MMC_CD 12 /* MMC Card insertion detection */ | ||
203 | #define U300_GPIO_PIN_CAM_SUB_STANDBY 13 /* Camera SUB standby */ | ||
204 | #define U300_GPIO_PIN_GPIO14 14 /* Test point TP2436 */ | ||
205 | #define U300_GPIO_PIN_GPIO15 15 /* Unrouted */ | ||
206 | |||
207 | #define U300_GPIO_PIN_GPIO16 16 /* Test point TP2438 */ | ||
208 | #define U300_GPIO_PIN_PHFSENSE 17 /* Headphone jack sensing */ | ||
209 | #define U300_GPIO_PIN_GPIO18 18 /* Test point TP2439 */ | ||
210 | #define U300_GPIO_PIN_GPIO19 19 /* Routed somewhere */ | ||
211 | #define U300_GPIO_PIN_GPIO20 20 /* Unrouted */ | ||
212 | #define U300_GPIO_PIN_GPIO21 21 /* Unrouted */ | ||
213 | #define U300_GPIO_PIN_GPIO22 22 /* Unrouted */ | ||
214 | #define U300_GPIO_PIN_GPIO23 23 /* Unrouted */ | ||
215 | |||
216 | #define U300_GPIO_PIN_GPIO24 24 /* Unrouted */ | ||
217 | #define U300_GPIO_PIN_GPIO25 25 /* Unrouted */ | ||
218 | #define U300_GPIO_PIN_GPIO26 26 /* Unrouted */ | ||
219 | #define U300_GPIO_PIN_GPIO27 27 /* Unrouted */ | ||
220 | #define U300_GPIO_PIN_GPIO28 28 /* Unrouted */ | ||
221 | #define U300_GPIO_PIN_GPIO29 29 /* Unrouted */ | ||
222 | #define U300_GPIO_PIN_GPIO30 30 /* Unrouted */ | ||
223 | #define U300_GPIO_PIN_GPIO31 31 /* Unrouted */ | ||
224 | |||
225 | #define U300_GPIO_PIN_GPIO32 32 /* Unrouted */ | ||
226 | #define U300_GPIO_PIN_GPIO33 33 /* Unrouted */ | ||
227 | #define U300_GPIO_PIN_GPIO34 34 /* Unrouted */ | ||
228 | #define U300_GPIO_PIN_GPIO35 35 /* Unrouted */ | ||
229 | #define U300_GPIO_PIN_GPIO36 36 /* Unrouted */ | ||
230 | #define U300_GPIO_PIN_GPIO37 37 /* Unrouted */ | ||
231 | #define U300_GPIO_PIN_GPIO38 38 /* Unrouted */ | ||
232 | #define U300_GPIO_PIN_GPIO39 39 /* Unrouted */ | ||
233 | |||
234 | #ifdef CONFIG_MACH_U300_BS335 | ||
235 | |||
236 | #define U300_GPIO_PIN_GPIO40 40 /* Unrouted */ | ||
237 | #define U300_GPIO_PIN_GPIO41 41 /* Unrouted */ | ||
238 | #define U300_GPIO_PIN_GPIO42 42 /* Unrouted */ | ||
239 | #define U300_GPIO_PIN_GPIO43 43 /* Unrouted */ | ||
240 | #define U300_GPIO_PIN_GPIO44 44 /* Unrouted */ | ||
241 | #define U300_GPIO_PIN_GPIO45 45 /* Unrouted */ | ||
242 | #define U300_GPIO_PIN_GPIO46 46 /* Unrouted */ | ||
243 | #define U300_GPIO_PIN_GPIO47 47 /* Unrouted */ | ||
244 | |||
245 | #define U300_GPIO_PIN_GPIO48 48 /* Unrouted */ | ||
246 | #define U300_GPIO_PIN_GPIO49 49 /* Unrouted */ | ||
247 | #define U300_GPIO_PIN_GPIO50 50 /* Unrouted */ | ||
248 | #define U300_GPIO_PIN_GPIO51 51 /* Unrouted */ | ||
249 | #define U300_GPIO_PIN_GPIO52 52 /* Unrouted */ | ||
250 | #define U300_GPIO_PIN_GPIO53 53 /* Unrouted */ | ||
251 | #define U300_GPIO_PIN_GPIO54 54 /* Unrouted */ | ||
252 | #define U300_GPIO_PIN_GPIO55 55 /* Unrouted */ | ||
253 | #endif | ||
254 | |||
255 | #endif | ||
256 | |||
257 | /* translates a pin number to a port number */ | ||
258 | #define PIN_TO_PORT(val) (val >> 3) | ||
259 | |||
260 | /* These can be found in arch/arm/mach-u300/gpio.c */ | ||
261 | extern int gpio_is_valid(int number); | ||
262 | extern int gpio_request(unsigned gpio, const char *label); | ||
263 | extern void gpio_free(unsigned gpio); | ||
264 | extern int gpio_direction_input(unsigned gpio); | ||
265 | extern int gpio_direction_output(unsigned gpio, int value); | ||
266 | extern int gpio_register_callback(unsigned gpio, | ||
267 | int (*func)(void *arg), | ||
268 | void *); | ||
269 | extern int gpio_unregister_callback(unsigned gpio); | ||
270 | extern void enable_irq_on_gpio_pin(unsigned gpio, int edge); | ||
271 | extern void disable_irq_on_gpio_pin(unsigned gpio); | ||
272 | extern void gpio_pullup(unsigned gpio, int value); | ||
273 | extern int gpio_get_value(unsigned gpio); | ||
274 | extern void gpio_set_value(unsigned gpio, int value); | ||
275 | |||
276 | #define gpio_get_value_cansleep gpio_get_value | ||
277 | #define gpio_set_value_cansleep gpio_set_value | ||
278 | |||
279 | /* wrappers to sleep-enable the previous two functions */ | ||
280 | static inline unsigned gpio_to_irq(unsigned gpio) | ||
281 | { | ||
282 | return PIN_TO_PORT(gpio) + IRQ_U300_GPIO_PORT0; | ||
283 | } | ||
284 | |||
285 | static inline unsigned irq_to_gpio(unsigned irq) | ||
286 | { | ||
287 | /* | ||
288 | * FIXME: This is no 1-1 mapping at all, it points to the | ||
289 | * whole block of 8 pins. | ||
290 | */ | ||
291 | return (irq - IRQ_U300_GPIO_PORT0) << 3; | ||
292 | } | ||
293 | |||
294 | #endif | ||
diff --git a/arch/arm/mach-u300/include/mach/irqs.h b/arch/arm/mach-u300/include/mach/irqs.h index 09b1b28fa8fd..d270fea32926 100644 --- a/arch/arm/mach-u300/include/mach/irqs.h +++ b/arch/arm/mach-u300/include/mach/irqs.h | |||
@@ -72,7 +72,7 @@ | |||
72 | 72 | ||
73 | /* DB3150 and DB3200 have only 45 IRQs */ | 73 | /* DB3150 and DB3200 have only 45 IRQs */ |
74 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) | 74 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) |
75 | #define U300_NR_IRQS 45 | 75 | #define U300_VIC_IRQS_END 45 |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | /* The DB3350-specific interrupt lines */ | 78 | /* The DB3350-specific interrupt lines */ |
@@ -88,7 +88,7 @@ | |||
88 | #define IRQ_U300_GPIO_PORT4 53 | 88 | #define IRQ_U300_GPIO_PORT4 53 |
89 | #define IRQ_U300_GPIO_PORT5 54 | 89 | #define IRQ_U300_GPIO_PORT5 54 |
90 | #define IRQ_U300_GPIO_PORT6 55 | 90 | #define IRQ_U300_GPIO_PORT6 55 |
91 | #define U300_NR_IRQS 56 | 91 | #define U300_VIC_IRQS_END 56 |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | /* The DB3210-specific interrupt lines */ | 94 | /* The DB3210-specific interrupt lines */ |
@@ -106,16 +106,25 @@ | |||
106 | #define IRQ_U300_NFIF 45 | 106 | #define IRQ_U300_NFIF 45 |
107 | #define IRQ_U300_NFIF2 46 | 107 | #define IRQ_U300_NFIF2 46 |
108 | #define IRQ_U300_SYSCON_PLL_LOCK 47 | 108 | #define IRQ_U300_SYSCON_PLL_LOCK 47 |
109 | #define U300_NR_IRQS 48 | 109 | #define U300_VIC_IRQS_END 48 |
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | #ifdef CONFIG_AB3550_CORE | 112 | /* Maximum 8*7 GPIO lines */ |
113 | #define IRQ_AB3550_BASE (U300_NR_IRQS) | 113 | #ifdef CONFIG_GPIO_U300 |
114 | #define IRQ_AB3550_END (IRQ_AB3550_BASE + 37) | 114 | #define IRQ_U300_GPIO_BASE (U300_VIC_IRQS_END) |
115 | #define IRQ_U300_GPIO_END (IRQ_U300_GPIO_BASE + 56) | ||
116 | #else | ||
117 | #define IRQ_U300_GPIO_END (U300_VIC_IRQS_END) | ||
118 | #endif | ||
115 | 119 | ||
116 | #define NR_IRQS (IRQ_AB3550_END + 1) | 120 | /* Optional AB3550 mixsig chip */ |
121 | #ifdef CONFIG_AB3550_CORE | ||
122 | #define IRQ_AB3550_BASE (IRQ_U300_GPIO_END) | ||
123 | #define IRQ_AB3550_END (IRQ_AB3550_BASE + 38) | ||
117 | #else | 124 | #else |
118 | #define NR_IRQS U300_NR_IRQS | 125 | #define IRQ_AB3550_END (IRQ_U300_GPIO_END) |
119 | #endif | 126 | #endif |
120 | 127 | ||
128 | #define NR_IRQS (IRQ_AB3550_END) | ||
129 | |||
121 | #endif | 130 | #endif |
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c index 677ccef5cd32..d9a5c92db74a 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c | |||
@@ -13,12 +13,12 @@ | |||
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/amba/bus.h> | 14 | #include <linux/amba/bus.h> |
15 | #include <linux/mmc/host.h> | 15 | #include <linux/mmc/host.h> |
16 | #include <linux/gpio.h> | ||
17 | #include <linux/dmaengine.h> | 16 | #include <linux/dmaengine.h> |
18 | #include <linux/amba/mmci.h> | 17 | #include <linux/amba/mmci.h> |
19 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
20 | #include <mach/coh901318.h> | 19 | #include <mach/coh901318.h> |
21 | #include <mach/dma_channels.h> | 20 | #include <mach/dma_channels.h> |
21 | #include <mach/gpio-u300.h> | ||
22 | 22 | ||
23 | #include "mmc.h" | 23 | #include "mmc.h" |
24 | #include "padmux.h" | 24 | #include "padmux.h" |
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index 4108c7bf324e..74bfcff2bdf3 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c | |||
@@ -6,10 +6,10 @@ | |||
6 | 6 | ||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/gpio.h> | ||
10 | 9 | ||
11 | #include <asm/mach-types.h> | 10 | #include <asm/mach-types.h> |
12 | #include <plat/pincfg.h> | 11 | #include <plat/pincfg.h> |
12 | #include <plat/gpio-nomadik.h> | ||
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | 14 | ||
15 | #include "pins-db8500.h" | 15 | #include "pins-db8500.h" |
diff --git a/arch/arm/mach-ux500/board-mop500-u8500uib.c b/arch/arm/mach-ux500/board-mop500-u8500uib.c index 8ce46c0fdfd5..feb5744d98b7 100644 --- a/arch/arm/mach-ux500/board-mop500-u8500uib.c +++ b/arch/arm/mach-ux500/board-mop500-u8500uib.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Board data for the U8500 UIB, also known as the New UIB | 4 | * Board data for the U8500 UIB, also known as the New UIB |
5 | * License terms: GNU General Public License (GPL), version 2 | 5 | * License terms: GNU General Public License (GPL), version 2 |
6 | */ | 6 | */ |
7 | 7 | #include <linux/gpio.h> | |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/i2c.h> | 10 | #include <linux/i2c.h> |
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/mfd/tc3589x.h> | 13 | #include <linux/mfd/tc3589x.h> |
14 | #include <linux/input/matrix_keypad.h> | 14 | #include <linux/input/matrix_keypad.h> |
15 | 15 | ||
16 | #include <mach/gpio.h> | ||
17 | #include <mach/irqs.h> | 16 | #include <mach/irqs.h> |
18 | 17 | ||
19 | #include "board-mop500.h" | 18 | #include "board-mop500.h" |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 4810968b672c..bdd7b80dd7ad 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <plat/i2c.h> | 37 | #include <plat/i2c.h> |
38 | #include <plat/ste_dma40.h> | 38 | #include <plat/ste_dma40.h> |
39 | #include <plat/pincfg.h> | 39 | #include <plat/pincfg.h> |
40 | #include <plat/gpio-nomadik.h> | ||
40 | 41 | ||
41 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
42 | #include <mach/setup.h> | 43 | #include <mach/setup.h> |
diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c index 739fb4c5b160..63c3f8058ffc 100644 --- a/arch/arm/mach-ux500/board-u5500-sdi.c +++ b/arch/arm/mach-ux500/board-u5500-sdi.c | |||
@@ -7,9 +7,9 @@ | |||
7 | 7 | ||
8 | #include <linux/amba/mmci.h> | 8 | #include <linux/amba/mmci.h> |
9 | #include <linux/mmc/host.h> | 9 | #include <linux/mmc/host.h> |
10 | #include <linux/gpio.h> | ||
11 | 10 | ||
12 | #include <plat/pincfg.h> | 11 | #include <plat/pincfg.h> |
12 | #include <plat/gpio-nomadik.h> | ||
13 | #include <mach/db5500-regs.h> | 13 | #include <mach/db5500-regs.h> |
14 | #include <plat/ste_dma40.h> | 14 | #include <plat/ste_dma40.h> |
15 | 15 | ||
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index 166d47a5f4f3..e014aa749b03 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/platform_device.h> | 9 | #include <linux/platform_device.h> |
10 | #include <linux/amba/bus.h> | 10 | #include <linux/amba/bus.h> |
11 | #include <linux/gpio.h> | ||
12 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
13 | #include <linux/i2c.h> | 12 | #include <linux/i2c.h> |
14 | 13 | ||
@@ -17,6 +16,7 @@ | |||
17 | 16 | ||
18 | #include <plat/pincfg.h> | 17 | #include <plat/pincfg.h> |
19 | #include <plat/i2c.h> | 18 | #include <plat/i2c.h> |
19 | #include <plat/gpio-nomadik.h> | ||
20 | 20 | ||
21 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
22 | #include <mach/devices.h> | 22 | #include <mach/devices.h> |
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index 22705d246fc7..9de1af008094 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/mach/map.h> | 13 | #include <asm/mach/map.h> |
14 | #include <asm/pmu.h> | 14 | #include <asm/pmu.h> |
15 | 15 | ||
16 | #include <plat/gpio.h> | 16 | #include <plat/gpio-nomadik.h> |
17 | 17 | ||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | #include <mach/devices.h> | 19 | #include <mach/devices.h> |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 4598b06c8c55..13e8890a8b8a 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -14,12 +14,12 @@ | |||
14 | #include <linux/amba/bus.h> | 14 | #include <linux/amba/bus.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/gpio.h> | ||
18 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
19 | #include <linux/io.h> | 18 | #include <linux/io.h> |
20 | 19 | ||
21 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
22 | #include <asm/pmu.h> | 21 | #include <asm/pmu.h> |
22 | #include <plat/gpio-nomadik.h> | ||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/setup.h> | 24 | #include <mach/setup.h> |
25 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c index 13a4ce046ae5..c563e5418d80 100644 --- a/arch/arm/mach-ux500/devices-common.c +++ b/arch/arm/mach-ux500/devices-common.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/amba/bus.h> | 14 | #include <linux/amba/bus.h> |
15 | 15 | ||
16 | #include <plat/gpio.h> | 16 | #include <plat/gpio-nomadik.h> |
17 | 17 | ||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | 19 | ||
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S index 700fb05ee815..8d74d927d4e2 100644 --- a/arch/arm/mach-ux500/include/mach/debug-macro.S +++ b/arch/arm/mach-ux500/include/mach/debug-macro.S | |||
@@ -35,7 +35,7 @@ | |||
35 | #define UX500_UART(n) __UX500_UART(n) | 35 | #define UX500_UART(n) __UX500_UART(n) |
36 | #define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) | 36 | #define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) |
37 | 37 | ||
38 | .macro addruart, rp, rv | 38 | .macro addruart, rp, rv, tmp |
39 | ldr \rp, =UART_BASE @ no, physical address | 39 | ldr \rp, =UART_BASE @ no, physical address |
40 | ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address | 40 | ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address |
41 | .endm | 41 | .endm |
diff --git a/arch/arm/mach-ux500/include/mach/gpio.h b/arch/arm/mach-ux500/include/mach/gpio.h index 3c4cd31ad9f7..7389df911b1a 100644 --- a/arch/arm/mach-ux500/include/mach/gpio.h +++ b/arch/arm/mach-ux500/include/mach/gpio.h | |||
@@ -7,6 +7,4 @@ | |||
7 | */ | 7 | */ |
8 | #define ARCH_NR_GPIOS 350 | 8 | #define ARCH_NR_GPIOS 350 |
9 | 9 | ||
10 | #include <plat/gpio.h> | ||
11 | |||
12 | #endif /* __ASM_ARCH_GPIO_H */ | 10 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-ux500/include/mach/memory.h b/arch/arm/mach-ux500/include/mach/memory.h deleted file mode 100644 index 2ef697a67006..000000000000 --- a/arch/arm/mach-ux500/include/mach/memory.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 ST-Ericsson | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | */ | ||
9 | #ifndef __ASM_ARCH_MEMORY_H | ||
10 | #define __ASM_ARCH_MEMORY_H | ||
11 | |||
12 | /* | ||
13 | * Physical DRAM offset. | ||
14 | */ | ||
15 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
16 | #define BUS_OFFSET UL(0x00000000) | ||
17 | |||
18 | #endif | ||
diff --git a/arch/arm/mach-versatile/include/mach/debug-macro.S b/arch/arm/mach-versatile/include/mach/debug-macro.S index eb2cf7dc5c44..d0fbd7f1cb00 100644 --- a/arch/arm/mach-versatile/include/mach/debug-macro.S +++ b/arch/arm/mach-versatile/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0x001F0000 | 15 | mov \rp, #0x001F0000 |
16 | orr \rp, \rp, #0x00001000 | 16 | orr \rp, \rp, #0x00001000 |
17 | orr \rv, \rp, #0xf1000000 @ virtual base | 17 | orr \rv, \rp, #0xf1000000 @ virtual base |
diff --git a/arch/arm/mach-versatile/include/mach/gpio.h b/arch/arm/mach-versatile/include/mach/gpio.h index 94ff27678a46..40a8c178f10d 100644 --- a/arch/arm/mach-versatile/include/mach/gpio.h +++ b/arch/arm/mach-versatile/include/mach/gpio.h | |||
@@ -1,6 +1 @@ | |||
1 | #include <asm-generic/gpio.h> | /* empty */ | |
2 | |||
3 | #define gpio_get_value __gpio_get_value | ||
4 | #define gpio_set_value __gpio_set_value | ||
5 | #define gpio_cansleep __gpio_cansleep | ||
6 | #define gpio_to_irq __gpio_to_irq | ||
diff --git a/arch/arm/mach-versatile/include/mach/memory.h b/arch/arm/mach-versatile/include/mach/memory.h deleted file mode 100644 index dacc9d8e4e6a..000000000000 --- a/arch/arm/mach-versatile/include/mach/memory.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-versatile/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | /* | ||
24 | * Physical DRAM offset. | ||
25 | */ | ||
26 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-vexpress/include/mach/debug-macro.S b/arch/arm/mach-vexpress/include/mach/debug-macro.S index 050d65e02a42..fd9e6c7ea49f 100644 --- a/arch/arm/mach-vexpress/include/mach/debug-macro.S +++ b/arch/arm/mach-vexpress/include/mach/debug-macro.S | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #define DEBUG_LL_UART_OFFSET 0x00009000 | 13 | #define DEBUG_LL_UART_OFFSET 0x00009000 |
14 | 14 | ||
15 | .macro addruart,rp,rv | 15 | .macro addruart,rp,rv,tmp |
16 | mov \rp, #DEBUG_LL_UART_OFFSET | 16 | mov \rp, #DEBUG_LL_UART_OFFSET |
17 | orr \rv, \rp, #0xf8000000 @ virtual base | 17 | orr \rv, \rp, #0xf8000000 @ virtual base |
18 | orr \rp, \rp, #0x10000000 @ physical base | 18 | orr \rp, \rp, #0x10000000 @ physical base |
diff --git a/arch/arm/mach-vexpress/include/mach/memory.h b/arch/arm/mach-vexpress/include/mach/memory.h deleted file mode 100644 index 5b7fcd439d87..000000000000 --- a/arch/arm/mach-vexpress/include/mach/memory.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | #define PLAT_PHYS_OFFSET UL(0x60000000) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/arm/mach-vt8500/include/mach/debug-macro.S b/arch/arm/mach-vt8500/include/mach/debug-macro.S index f1191626ad51..ca292f29d4a3 100644 --- a/arch/arm/mach-vt8500/include/mach/debug-macro.S +++ b/arch/arm/mach-vt8500/include/mach/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart, rp, rv | 14 | .macro addruart, rp, rv, tmp |
15 | mov \rp, #0x00200000 | 15 | mov \rp, #0x00200000 |
16 | orr \rv, \rp, #0xf8000000 | 16 | orr \rv, \rp, #0xf8000000 |
17 | orr \rp, \rp, #0xd8000000 | 17 | orr \rp, \rp, #0xd8000000 |
diff --git a/arch/arm/mach-vt8500/include/mach/gpio.h b/arch/arm/mach-vt8500/include/mach/gpio.h index 94ff27678a46..40a8c178f10d 100644 --- a/arch/arm/mach-vt8500/include/mach/gpio.h +++ b/arch/arm/mach-vt8500/include/mach/gpio.h | |||
@@ -1,6 +1 @@ | |||
1 | #include <asm-generic/gpio.h> | /* empty */ | |
2 | |||
3 | #define gpio_get_value __gpio_get_value | ||
4 | #define gpio_set_value __gpio_set_value | ||
5 | #define gpio_cansleep __gpio_cansleep | ||
6 | #define gpio_to_irq __gpio_to_irq | ||
diff --git a/arch/arm/mach-vt8500/include/mach/memory.h b/arch/arm/mach-vt8500/include/mach/memory.h deleted file mode 100644 index 175f914eff93..000000000000 --- a/arch/arm/mach-vt8500/include/mach/memory.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vt8500/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | /* | ||
24 | * Physical DRAM offset. | ||
25 | */ | ||
26 | #define PHYS_OFFSET UL(0x00000000) | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-w90x900/include/mach/gpio.h b/arch/arm/mach-w90x900/include/mach/gpio.h index 034da3e390c9..5385a4203277 100644 --- a/arch/arm/mach-w90x900/include/mach/gpio.h +++ b/arch/arm/mach-w90x900/include/mach/gpio.h | |||
@@ -15,16 +15,12 @@ | |||
15 | 15 | ||
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
18 | #include <asm-generic/gpio.h> | ||
19 | |||
20 | #define gpio_get_value __gpio_get_value | ||
21 | #define gpio_set_value __gpio_set_value | ||
22 | #define gpio_cansleep __gpio_cansleep | ||
23 | 18 | ||
24 | static inline int gpio_to_irq(unsigned gpio) | 19 | static inline int gpio_to_irq(unsigned gpio) |
25 | { | 20 | { |
26 | return gpio; | 21 | return gpio; |
27 | } | 22 | } |
23 | #define gpio_to_irq gpio_to_irq | ||
28 | 24 | ||
29 | static inline int irq_to_gpio(unsigned irq) | 25 | static inline int irq_to_gpio(unsigned irq) |
30 | { | 26 | { |
diff --git a/arch/arm/mach-w90x900/include/mach/memory.h b/arch/arm/mach-w90x900/include/mach/memory.h deleted file mode 100644 index f02905ba7746..000000000000 --- a/arch/arm/mach-w90x900/include/mach/memory.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/memory.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_MEMORY_H | ||
19 | #define __ASM_ARCH_MEMORY_H | ||
20 | |||
21 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
22 | |||
23 | #endif | ||
diff --git a/arch/arm/mach-zynq/include/mach/debug-macro.S b/arch/arm/mach-zynq/include/mach/debug-macro.S index 9f664d5eb81d..3ab0be1f6191 100644 --- a/arch/arm/mach-zynq/include/mach/debug-macro.S +++ b/arch/arm/mach-zynq/include/mach/debug-macro.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <mach/zynq_soc.h> | 17 | #include <mach/zynq_soc.h> |
18 | #include <mach/uart.h> | 18 | #include <mach/uart.h> |
19 | 19 | ||
20 | .macro addruart, rp, rv | 20 | .macro addruart, rp, rv, tmp |
21 | ldr \rp, =LL_UART_PADDR @ physical | 21 | ldr \rp, =LL_UART_PADDR @ physical |
22 | ldr \rv, =LL_UART_VADDR @ virtual | 22 | ldr \rv, =LL_UART_VADDR @ virtual |
23 | .endm | 23 | .endm |
diff --git a/arch/arm/mach-zynq/include/mach/memory.h b/arch/arm/mach-zynq/include/mach/memory.h deleted file mode 100644 index 35a92634dcc1..000000000000 --- a/arch/arm/mach-zynq/include/mach/memory.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* arch/arm/mach-zynq/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright (C) 2011 Xilinx | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef __MACH_MEMORY_H__ | ||
16 | #define __MACH_MEMORY_H__ | ||
17 | |||
18 | #include <asm/sizes.h> | ||
19 | |||
20 | #define PLAT_PHYS_OFFSET UL(0x0) | ||
21 | |||
22 | #endif | ||
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index e4dde91f0231..a3045937fc2f 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -54,7 +54,7 @@ | |||
54 | 54 | ||
55 | #define UART_VADDR IMX_IO_ADDRESS(UART_PADDR) | 55 | #define UART_VADDR IMX_IO_ADDRESS(UART_PADDR) |
56 | 56 | ||
57 | .macro addruart, rp, rv | 57 | .macro addruart, rp, rv, tmp |
58 | ldr \rp, =UART_PADDR @ physical | 58 | ldr \rp, =UART_PADDR @ physical |
59 | ldr \rv, =UART_VADDR @ virtual | 59 | ldr \rv, =UART_VADDR @ virtual |
60 | .endm | 60 | .endm |
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index 44af0064ba1a..40a8c178f10d 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h | |||
@@ -1,32 +1 @@ | |||
1 | /* | /* empty */ | |
2 | * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MXC_GPIO_H__ | ||
20 | #define __ASM_ARCH_MXC_GPIO_H__ | ||
21 | |||
22 | #include <linux/spinlock.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm-generic/gpio.h> | ||
25 | |||
26 | /* use gpiolib dispatchers */ | ||
27 | #define gpio_get_value __gpio_get_value | ||
28 | #define gpio_set_value __gpio_set_value | ||
29 | #define gpio_cansleep __gpio_cansleep | ||
30 | #define gpio_to_irq __gpio_to_irq | ||
31 | |||
32 | #endif | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h index 35e0df224caa..2fa3b5430102 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h | |||
@@ -90,11 +90,11 @@ typedef u64 iomux_v3_cfg_t; | |||
90 | #define PAD_CTL_HYS (1 << 8) | 90 | #define PAD_CTL_HYS (1 << 8) |
91 | 91 | ||
92 | #define PAD_CTL_PKE (1 << 7) | 92 | #define PAD_CTL_PKE (1 << 7) |
93 | #define PAD_CTL_PUE (1 << 6) | 93 | #define PAD_CTL_PUE (1 << 6 | PAD_CTL_PKE) |
94 | #define PAD_CTL_PUS_100K_DOWN (0 << 4) | 94 | #define PAD_CTL_PUS_100K_DOWN (0 << 4 | PAD_CTL_PUE) |
95 | #define PAD_CTL_PUS_47K_UP (1 << 4) | 95 | #define PAD_CTL_PUS_47K_UP (1 << 4 | PAD_CTL_PUE) |
96 | #define PAD_CTL_PUS_100K_UP (2 << 4) | 96 | #define PAD_CTL_PUS_100K_UP (2 << 4 | PAD_CTL_PUE) |
97 | #define PAD_CTL_PUS_22K_UP (3 << 4) | 97 | #define PAD_CTL_PUS_22K_UP (3 << 4 | PAD_CTL_PUE) |
98 | 98 | ||
99 | #define PAD_CTL_ODE (1 << 3) | 99 | #define PAD_CTL_ODE (1 << 3) |
100 | 100 | ||
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h deleted file mode 100644 index 3ec84b902243..000000000000 --- a/arch/arm/plat-mxc/include/mach/memory.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_MXC_MEMORY_H__ | ||
12 | #define __ASM_ARCH_MXC_MEMORY_H__ | ||
13 | |||
14 | #define MX1_PHYS_OFFSET UL(0x08000000) | ||
15 | #define MX21_PHYS_OFFSET UL(0xc0000000) | ||
16 | #define MX25_PHYS_OFFSET UL(0x80000000) | ||
17 | #define MX27_PHYS_OFFSET UL(0xa0000000) | ||
18 | #define MX3x_PHYS_OFFSET UL(0x80000000) | ||
19 | #define MX50_PHYS_OFFSET UL(0x70000000) | ||
20 | #define MX51_PHYS_OFFSET UL(0x90000000) | ||
21 | #define MX53_PHYS_OFFSET UL(0x70000000) | ||
22 | |||
23 | #if !defined(CONFIG_RUNTIME_PHYS_OFFSET) | ||
24 | # if defined CONFIG_ARCH_MX1 | ||
25 | # define PLAT_PHYS_OFFSET MX1_PHYS_OFFSET | ||
26 | # elif defined CONFIG_MACH_MX21 | ||
27 | # define PLAT_PHYS_OFFSET MX21_PHYS_OFFSET | ||
28 | # elif defined CONFIG_ARCH_MX25 | ||
29 | # define PLAT_PHYS_OFFSET MX25_PHYS_OFFSET | ||
30 | # elif defined CONFIG_MACH_MX27 | ||
31 | # define PLAT_PHYS_OFFSET MX27_PHYS_OFFSET | ||
32 | # elif defined CONFIG_ARCH_MX3 | ||
33 | # define PLAT_PHYS_OFFSET MX3x_PHYS_OFFSET | ||
34 | # elif defined CONFIG_ARCH_MX50 | ||
35 | # define PLAT_PHYS_OFFSET MX50_PHYS_OFFSET | ||
36 | # elif defined CONFIG_ARCH_MX51 | ||
37 | # define PLAT_PHYS_OFFSET MX51_PHYS_OFFSET | ||
38 | # elif defined CONFIG_ARCH_MX53 | ||
39 | # define PLAT_PHYS_OFFSET MX53_PHYS_OFFSET | ||
40 | # endif | ||
41 | #endif | ||
42 | |||
43 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ | ||
diff --git a/arch/arm/plat-nomadik/include/plat/gpio.h b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h index d5d7e651269c..3ba4d8f8073b 100644 --- a/arch/arm/plat-nomadik/include/plat/gpio.h +++ b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h | |||
@@ -9,20 +9,9 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | #ifndef __ASM_PLAT_GPIO_H | ||
13 | #define __ASM_PLAT_GPIO_H | ||
14 | 12 | ||
15 | #include <asm-generic/gpio.h> | 13 | #ifndef __PLAT_NOMADIK_GPIO |
16 | 14 | #define __PLAT_NOMADIK_GPIO | |
17 | /* | ||
18 | * These currently cause a function call to happen, they may be optimized | ||
19 | * if needed by adding cpu-specific defines to identify blocks | ||
20 | * (see mach-pxa/include/mach/gpio.h as an example using GPLR etc) | ||
21 | */ | ||
22 | #define gpio_get_value __gpio_get_value | ||
23 | #define gpio_set_value __gpio_set_value | ||
24 | #define gpio_cansleep __gpio_cansleep | ||
25 | #define gpio_to_irq __gpio_to_irq | ||
26 | 15 | ||
27 | /* | 16 | /* |
28 | * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving | 17 | * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving |
@@ -93,4 +82,4 @@ struct nmk_gpio_platform_data { | |||
93 | bool supports_sleepmode; | 82 | bool supports_sleepmode; |
94 | }; | 83 | }; |
95 | 84 | ||
96 | #endif /* __ASM_PLAT_GPIO_H */ | 85 | #endif /* __PLAT_NOMADIK_GPIO */ |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index bb8f4a6b3e37..95732af7b208 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -14,6 +14,7 @@ config ARCH_OMAP1 | |||
14 | select CLKDEV_LOOKUP | 14 | select CLKDEV_LOOKUP |
15 | select CLKSRC_MMIO | 15 | select CLKSRC_MMIO |
16 | select GENERIC_IRQ_CHIP | 16 | select GENERIC_IRQ_CHIP |
17 | select NEED_MACH_MEMORY_H | ||
17 | help | 18 | help |
18 | "Systems based on omap7xx, omap15xx or omap16xx" | 19 | "Systems based on omap7xx, omap15xx or omap16xx" |
19 | 20 | ||
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c index 923c9621096b..caa1f7b6cc21 100644 --- a/arch/arm/plat-omap/debug-devices.c +++ b/arch/arm/plat-omap/debug-devices.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | #include <linux/gpio.h> | |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
@@ -18,7 +18,6 @@ | |||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | 19 | ||
20 | #include <plat/board.h> | 20 | #include <plat/board.h> |
21 | #include <mach/gpio.h> | ||
22 | 21 | ||
23 | 22 | ||
24 | /* Many OMAP development platforms reuse the same "debug board"; these | 23 | /* Many OMAP development platforms reuse the same "debug board"; these |
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index fc05b1022602..61a1ec2a6af4 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | #include <linux/gpio.h> | |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/leds.h> | 13 | #include <linux/leds.h> |
@@ -19,7 +19,6 @@ | |||
19 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
20 | 20 | ||
21 | #include <plat/fpga.h> | 21 | #include <plat/fpga.h> |
22 | #include <mach/gpio.h> | ||
23 | 22 | ||
24 | 23 | ||
25 | /* Many OMAP development platforms reuse the same "debug board"; these | 24 | /* Many OMAP development platforms reuse the same "debug board"; these |
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index bd9a06b3ee89..acd132c29647 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * the Free Software Foundation; either version 2 of the License, or | 8 | * the Free Software Foundation; either version 2 of the License, or |
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | #include <linux/gpio.h> | |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
@@ -24,7 +24,6 @@ | |||
24 | #include <plat/tc.h> | 24 | #include <plat/tc.h> |
25 | #include <plat/board.h> | 25 | #include <plat/board.h> |
26 | #include <plat/mmc.h> | 26 | #include <plat/mmc.h> |
27 | #include <mach/gpio.h> | ||
28 | #include <plat/menelaus.h> | 27 | #include <plat/menelaus.h> |
29 | #include <plat/omap44xx.h> | 28 | #include <plat/omap44xx.h> |
30 | 29 | ||
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index 91e8de3db085..9e86ee0aed0a 100644 --- a/arch/arm/plat-omap/include/plat/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h | |||
@@ -222,26 +222,6 @@ extern void omap_gpio_restore_context(void); | |||
222 | #include <linux/errno.h> | 222 | #include <linux/errno.h> |
223 | #include <asm-generic/gpio.h> | 223 | #include <asm-generic/gpio.h> |
224 | 224 | ||
225 | static inline int gpio_get_value(unsigned gpio) | ||
226 | { | ||
227 | return __gpio_get_value(gpio); | ||
228 | } | ||
229 | |||
230 | static inline void gpio_set_value(unsigned gpio, int value) | ||
231 | { | ||
232 | __gpio_set_value(gpio, value); | ||
233 | } | ||
234 | |||
235 | static inline int gpio_cansleep(unsigned gpio) | ||
236 | { | ||
237 | return __gpio_cansleep(gpio); | ||
238 | } | ||
239 | |||
240 | static inline int gpio_to_irq(unsigned gpio) | ||
241 | { | ||
242 | return __gpio_to_irq(gpio); | ||
243 | } | ||
244 | |||
245 | static inline int irq_to_gpio(unsigned irq) | 225 | static inline int irq_to_gpio(unsigned irq) |
246 | { | 226 | { |
247 | int tmp; | 227 | int tmp; |
diff --git a/arch/arm/plat-omap/include/plat/memory.h b/arch/arm/plat-omap/include/plat/memory.h deleted file mode 100644 index 7f9df6f1e113..000000000000 --- a/arch/arm/plat-omap/include/plat/memory.h +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/mach/memory.h | ||
3 | * | ||
4 | * Memory map for OMAP-1510 and 1610 | ||
5 | * | ||
6 | * Copyright (C) 2000 RidgeRun, Inc. | ||
7 | * Author: Greg Lonnon <glonnon@ridgerun.com> | ||
8 | * | ||
9 | * This file was derived from arch/arm/mach-intergrator/include/mach/memory.h | ||
10 | * Copyright (C) 1999 ARM Limited | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | * | ||
17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
20 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
23 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
24 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
27 | * | ||
28 | * You should have received a copy of the GNU General Public License along | ||
29 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
30 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
31 | */ | ||
32 | |||
33 | #ifndef __ASM_ARCH_MEMORY_H | ||
34 | #define __ASM_ARCH_MEMORY_H | ||
35 | |||
36 | /* | ||
37 | * Physical DRAM offset. | ||
38 | */ | ||
39 | #if defined(CONFIG_ARCH_OMAP1) | ||
40 | #define PLAT_PHYS_OFFSET UL(0x10000000) | ||
41 | #else | ||
42 | #define PLAT_PHYS_OFFSET UL(0x80000000) | ||
43 | #endif | ||
44 | |||
45 | /* | ||
46 | * Bus address is physical address, except for OMAP-1510 Local Bus. | ||
47 | * OMAP-1510 bus address is translated into a Local Bus address if the | ||
48 | * OMAP bus type is lbus. We do the address translation based on the | ||
49 | * device overriding the defaults used in the dma-mapping API. | ||
50 | * Note that the is_lbus_device() test is not very efficient on 1510 | ||
51 | * because of the strncmp(). | ||
52 | */ | ||
53 | #ifdef CONFIG_ARCH_OMAP15XX | ||
54 | |||
55 | /* | ||
56 | * OMAP-1510 Local Bus address offset | ||
57 | */ | ||
58 | #define OMAP1510_LB_OFFSET UL(0x30000000) | ||
59 | |||
60 | #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) | ||
61 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) | ||
62 | #define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev_name(dev), "ohci", 4) == 0)) | ||
63 | |||
64 | #define __arch_pfn_to_dma(dev, pfn) \ | ||
65 | ({ dma_addr_t __dma = __pfn_to_phys(pfn); \ | ||
66 | if (is_lbus_device(dev)) \ | ||
67 | __dma = __dma - PHYS_OFFSET + OMAP1510_LB_OFFSET; \ | ||
68 | __dma; }) | ||
69 | |||
70 | #define __arch_dma_to_pfn(dev, addr) \ | ||
71 | ({ dma_addr_t __dma = addr; \ | ||
72 | if (is_lbus_device(dev)) \ | ||
73 | __dma += PHYS_OFFSET - OMAP1510_LB_OFFSET; \ | ||
74 | __phys_to_pfn(__dma); \ | ||
75 | }) | ||
76 | |||
77 | #define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \ | ||
78 | lbus_to_virt(addr) : \ | ||
79 | __phys_to_virt(addr)); }) | ||
80 | |||
81 | #define __arch_virt_to_dma(dev, addr) ({ unsigned long __addr = (unsigned long)(addr); \ | ||
82 | (dma_addr_t) (is_lbus_device(dev) ? \ | ||
83 | virt_to_lbus(__addr) : \ | ||
84 | __virt_to_phys(__addr)); }) | ||
85 | |||
86 | #endif /* CONFIG_ARCH_OMAP15XX */ | ||
87 | |||
88 | #endif | ||
89 | |||
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h index de3b10c18127..1ab9fd6abe6d 100644 --- a/arch/arm/plat-omap/include/plat/serial.h +++ b/arch/arm/plat-omap/include/plat/serial.h | |||
@@ -16,8 +16,8 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Memory entry used for the DEBUG_LL UART configuration. See also | 19 | * Memory entry used for the DEBUG_LL UART configuration, relative to |
20 | * uncompress.h and debug-macro.S. | 20 | * start of RAM. See also uncompress.h and debug-macro.S. |
21 | * | 21 | * |
22 | * Note that using a memory location for storing the UART configuration | 22 | * Note that using a memory location for storing the UART configuration |
23 | * has at least two limitations: | 23 | * has at least two limitations: |
@@ -27,7 +27,7 @@ | |||
27 | * 2. We assume printascii is called at least once before paging_init, | 27 | * 2. We assume printascii is called at least once before paging_init, |
28 | * and addruart has a chance to read OMAP_UART_INFO | 28 | * and addruart has a chance to read OMAP_UART_INFO |
29 | */ | 29 | */ |
30 | #define OMAP_UART_INFO (PLAT_PHYS_OFFSET + 0x3ffc) | 30 | #define OMAP_UART_INFO_OFS 0x3ffc |
31 | 31 | ||
32 | /* OMAP1 serial ports */ | 32 | /* OMAP1 serial ports */ |
33 | #define OMAP1_UART1_BASE 0xfffb0000 | 33 | #define OMAP1_UART1_BASE 0xfffb0000 |
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index a067484cc4a2..2f472e989ec6 100644 --- a/arch/arm/plat-omap/include/plat/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h | |||
@@ -36,7 +36,13 @@ int uart_shift; | |||
36 | */ | 36 | */ |
37 | static void set_omap_uart_info(unsigned char port) | 37 | static void set_omap_uart_info(unsigned char port) |
38 | { | 38 | { |
39 | *(volatile u32 *)OMAP_UART_INFO = port; | 39 | /* |
40 | * Get address of some.bss variable and round it down | ||
41 | * a la CONFIG_AUTO_ZRELADDR. | ||
42 | */ | ||
43 | u32 ram_start = (u32)&uart_shift & 0xf8000000; | ||
44 | u32 *uart_info = (u32 *)(ram_start + OMAP_UART_INFO_OFS); | ||
45 | *uart_info = port; | ||
40 | } | 46 | } |
41 | 47 | ||
42 | static void putc(int c) | 48 | static void putc(int c) |
diff --git a/arch/arm/plat-orion/include/plat/gpio.h b/arch/arm/plat-orion/include/plat/gpio.h index 3075b9fdde83..3abf30428bee 100644 --- a/arch/arm/plat-orion/include/plat/gpio.h +++ b/arch/arm/plat-orion/include/plat/gpio.h | |||
@@ -12,15 +12,7 @@ | |||
12 | #define __PLAT_GPIO_H | 12 | #define __PLAT_GPIO_H |
13 | 13 | ||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <asm-generic/gpio.h> | 15 | #include <linux/types.h> |
16 | |||
17 | /* | ||
18 | * GENERIC_GPIO primitives. | ||
19 | */ | ||
20 | #define gpio_get_value __gpio_get_value | ||
21 | #define gpio_set_value __gpio_set_value | ||
22 | #define gpio_cansleep __gpio_cansleep | ||
23 | #define gpio_to_irq __gpio_to_irq | ||
24 | 16 | ||
25 | /* | 17 | /* |
26 | * Orion-specific GPIO API extensions. | 18 | * Orion-specific GPIO API extensions. |
diff --git a/arch/arm/plat-pxa/Makefile b/arch/arm/plat-pxa/Makefile index 3aca5ba0f876..f302d048392d 100644 --- a/arch/arm/plat-pxa/Makefile +++ b/arch/arm/plat-pxa/Makefile | |||
@@ -4,7 +4,6 @@ | |||
4 | 4 | ||
5 | obj-y := dma.o | 5 | obj-y := dma.o |
6 | 6 | ||
7 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o | ||
8 | obj-$(CONFIG_PXA3xx) += mfp.o | 7 | obj-$(CONFIG_PXA3xx) += mfp.o |
9 | obj-$(CONFIG_PXA95x) += mfp.o | 8 | obj-$(CONFIG_PXA95x) += mfp.o |
10 | obj-$(CONFIG_ARCH_MMP) += mfp.o | 9 | obj-$(CONFIG_ARCH_MMP) += mfp.o |
diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c deleted file mode 100644 index a11dc3670505..000000000000 --- a/arch/arm/plat-pxa/gpio.c +++ /dev/null | |||
@@ -1,338 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/plat-pxa/gpio.c | ||
3 | * | ||
4 | * Generic PXA GPIO handling | ||
5 | * | ||
6 | * Author: Nicolas Pitre | ||
7 | * Created: Jun 15, 2001 | ||
8 | * Copyright: MontaVista Software Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/syscore_ops.h> | ||
19 | #include <linux/slab.h> | ||
20 | |||
21 | #include <mach/gpio.h> | ||
22 | |||
23 | int pxa_last_gpio; | ||
24 | |||
25 | struct pxa_gpio_chip { | ||
26 | struct gpio_chip chip; | ||
27 | void __iomem *regbase; | ||
28 | char label[10]; | ||
29 | |||
30 | unsigned long irq_mask; | ||
31 | unsigned long irq_edge_rise; | ||
32 | unsigned long irq_edge_fall; | ||
33 | |||
34 | #ifdef CONFIG_PM | ||
35 | unsigned long saved_gplr; | ||
36 | unsigned long saved_gpdr; | ||
37 | unsigned long saved_grer; | ||
38 | unsigned long saved_gfer; | ||
39 | #endif | ||
40 | }; | ||
41 | |||
42 | static DEFINE_SPINLOCK(gpio_lock); | ||
43 | static struct pxa_gpio_chip *pxa_gpio_chips; | ||
44 | |||
45 | #define for_each_gpio_chip(i, c) \ | ||
46 | for (i = 0, c = &pxa_gpio_chips[0]; i <= pxa_last_gpio; i += 32, c++) | ||
47 | |||
48 | static inline void __iomem *gpio_chip_base(struct gpio_chip *c) | ||
49 | { | ||
50 | return container_of(c, struct pxa_gpio_chip, chip)->regbase; | ||
51 | } | ||
52 | |||
53 | static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio) | ||
54 | { | ||
55 | return &pxa_gpio_chips[gpio_to_bank(gpio)]; | ||
56 | } | ||
57 | |||
58 | static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset) | ||
59 | { | ||
60 | void __iomem *base = gpio_chip_base(chip); | ||
61 | uint32_t value, mask = 1 << offset; | ||
62 | unsigned long flags; | ||
63 | |||
64 | spin_lock_irqsave(&gpio_lock, flags); | ||
65 | |||
66 | value = __raw_readl(base + GPDR_OFFSET); | ||
67 | if (__gpio_is_inverted(chip->base + offset)) | ||
68 | value |= mask; | ||
69 | else | ||
70 | value &= ~mask; | ||
71 | __raw_writel(value, base + GPDR_OFFSET); | ||
72 | |||
73 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static int pxa_gpio_direction_output(struct gpio_chip *chip, | ||
78 | unsigned offset, int value) | ||
79 | { | ||
80 | void __iomem *base = gpio_chip_base(chip); | ||
81 | uint32_t tmp, mask = 1 << offset; | ||
82 | unsigned long flags; | ||
83 | |||
84 | __raw_writel(mask, base + (value ? GPSR_OFFSET : GPCR_OFFSET)); | ||
85 | |||
86 | spin_lock_irqsave(&gpio_lock, flags); | ||
87 | |||
88 | tmp = __raw_readl(base + GPDR_OFFSET); | ||
89 | if (__gpio_is_inverted(chip->base + offset)) | ||
90 | tmp &= ~mask; | ||
91 | else | ||
92 | tmp |= mask; | ||
93 | __raw_writel(tmp, base + GPDR_OFFSET); | ||
94 | |||
95 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset) | ||
100 | { | ||
101 | return __raw_readl(gpio_chip_base(chip) + GPLR_OFFSET) & (1 << offset); | ||
102 | } | ||
103 | |||
104 | static void pxa_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | ||
105 | { | ||
106 | __raw_writel(1 << offset, gpio_chip_base(chip) + | ||
107 | (value ? GPSR_OFFSET : GPCR_OFFSET)); | ||
108 | } | ||
109 | |||
110 | static int __init pxa_init_gpio_chip(int gpio_end) | ||
111 | { | ||
112 | int i, gpio, nbanks = gpio_to_bank(gpio_end) + 1; | ||
113 | struct pxa_gpio_chip *chips; | ||
114 | |||
115 | chips = kzalloc(nbanks * sizeof(struct pxa_gpio_chip), GFP_KERNEL); | ||
116 | if (chips == NULL) { | ||
117 | pr_err("%s: failed to allocate GPIO chips\n", __func__); | ||
118 | return -ENOMEM; | ||
119 | } | ||
120 | |||
121 | for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) { | ||
122 | struct gpio_chip *c = &chips[i].chip; | ||
123 | |||
124 | sprintf(chips[i].label, "gpio-%d", i); | ||
125 | chips[i].regbase = (void __iomem *)GPIO_BANK(i); | ||
126 | |||
127 | c->base = gpio; | ||
128 | c->label = chips[i].label; | ||
129 | |||
130 | c->direction_input = pxa_gpio_direction_input; | ||
131 | c->direction_output = pxa_gpio_direction_output; | ||
132 | c->get = pxa_gpio_get; | ||
133 | c->set = pxa_gpio_set; | ||
134 | |||
135 | /* number of GPIOs on last bank may be less than 32 */ | ||
136 | c->ngpio = (gpio + 31 > gpio_end) ? (gpio_end - gpio + 1) : 32; | ||
137 | gpiochip_add(c); | ||
138 | } | ||
139 | pxa_gpio_chips = chips; | ||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | /* Update only those GRERx and GFERx edge detection register bits if those | ||
144 | * bits are set in c->irq_mask | ||
145 | */ | ||
146 | static inline void update_edge_detect(struct pxa_gpio_chip *c) | ||
147 | { | ||
148 | uint32_t grer, gfer; | ||
149 | |||
150 | grer = __raw_readl(c->regbase + GRER_OFFSET) & ~c->irq_mask; | ||
151 | gfer = __raw_readl(c->regbase + GFER_OFFSET) & ~c->irq_mask; | ||
152 | grer |= c->irq_edge_rise & c->irq_mask; | ||
153 | gfer |= c->irq_edge_fall & c->irq_mask; | ||
154 | __raw_writel(grer, c->regbase + GRER_OFFSET); | ||
155 | __raw_writel(gfer, c->regbase + GFER_OFFSET); | ||
156 | } | ||
157 | |||
158 | static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) | ||
159 | { | ||
160 | struct pxa_gpio_chip *c; | ||
161 | int gpio = irq_to_gpio(d->irq); | ||
162 | unsigned long gpdr, mask = GPIO_bit(gpio); | ||
163 | |||
164 | c = gpio_to_pxachip(gpio); | ||
165 | |||
166 | if (type == IRQ_TYPE_PROBE) { | ||
167 | /* Don't mess with enabled GPIOs using preconfigured edges or | ||
168 | * GPIOs set to alternate function or to output during probe | ||
169 | */ | ||
170 | if ((c->irq_edge_rise | c->irq_edge_fall) & GPIO_bit(gpio)) | ||
171 | return 0; | ||
172 | |||
173 | if (__gpio_is_occupied(gpio)) | ||
174 | return 0; | ||
175 | |||
176 | type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; | ||
177 | } | ||
178 | |||
179 | gpdr = __raw_readl(c->regbase + GPDR_OFFSET); | ||
180 | |||
181 | if (__gpio_is_inverted(gpio)) | ||
182 | __raw_writel(gpdr | mask, c->regbase + GPDR_OFFSET); | ||
183 | else | ||
184 | __raw_writel(gpdr & ~mask, c->regbase + GPDR_OFFSET); | ||
185 | |||
186 | if (type & IRQ_TYPE_EDGE_RISING) | ||
187 | c->irq_edge_rise |= mask; | ||
188 | else | ||
189 | c->irq_edge_rise &= ~mask; | ||
190 | |||
191 | if (type & IRQ_TYPE_EDGE_FALLING) | ||
192 | c->irq_edge_fall |= mask; | ||
193 | else | ||
194 | c->irq_edge_fall &= ~mask; | ||
195 | |||
196 | update_edge_detect(c); | ||
197 | |||
198 | pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, d->irq, gpio, | ||
199 | ((type & IRQ_TYPE_EDGE_RISING) ? " rising" : ""), | ||
200 | ((type & IRQ_TYPE_EDGE_FALLING) ? " falling" : "")); | ||
201 | return 0; | ||
202 | } | ||
203 | |||
204 | static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) | ||
205 | { | ||
206 | struct pxa_gpio_chip *c; | ||
207 | int loop, gpio, gpio_base, n; | ||
208 | unsigned long gedr; | ||
209 | |||
210 | do { | ||
211 | loop = 0; | ||
212 | for_each_gpio_chip(gpio, c) { | ||
213 | gpio_base = c->chip.base; | ||
214 | |||
215 | gedr = __raw_readl(c->regbase + GEDR_OFFSET); | ||
216 | gedr = gedr & c->irq_mask; | ||
217 | __raw_writel(gedr, c->regbase + GEDR_OFFSET); | ||
218 | |||
219 | n = find_first_bit(&gedr, BITS_PER_LONG); | ||
220 | while (n < BITS_PER_LONG) { | ||
221 | loop = 1; | ||
222 | |||
223 | generic_handle_irq(gpio_to_irq(gpio_base + n)); | ||
224 | n = find_next_bit(&gedr, BITS_PER_LONG, n + 1); | ||
225 | } | ||
226 | } | ||
227 | } while (loop); | ||
228 | } | ||
229 | |||
230 | static void pxa_ack_muxed_gpio(struct irq_data *d) | ||
231 | { | ||
232 | int gpio = irq_to_gpio(d->irq); | ||
233 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); | ||
234 | |||
235 | __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); | ||
236 | } | ||
237 | |||
238 | static void pxa_mask_muxed_gpio(struct irq_data *d) | ||
239 | { | ||
240 | int gpio = irq_to_gpio(d->irq); | ||
241 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); | ||
242 | uint32_t grer, gfer; | ||
243 | |||
244 | c->irq_mask &= ~GPIO_bit(gpio); | ||
245 | |||
246 | grer = __raw_readl(c->regbase + GRER_OFFSET) & ~GPIO_bit(gpio); | ||
247 | gfer = __raw_readl(c->regbase + GFER_OFFSET) & ~GPIO_bit(gpio); | ||
248 | __raw_writel(grer, c->regbase + GRER_OFFSET); | ||
249 | __raw_writel(gfer, c->regbase + GFER_OFFSET); | ||
250 | } | ||
251 | |||
252 | static void pxa_unmask_muxed_gpio(struct irq_data *d) | ||
253 | { | ||
254 | int gpio = irq_to_gpio(d->irq); | ||
255 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); | ||
256 | |||
257 | c->irq_mask |= GPIO_bit(gpio); | ||
258 | update_edge_detect(c); | ||
259 | } | ||
260 | |||
261 | static struct irq_chip pxa_muxed_gpio_chip = { | ||
262 | .name = "GPIO", | ||
263 | .irq_ack = pxa_ack_muxed_gpio, | ||
264 | .irq_mask = pxa_mask_muxed_gpio, | ||
265 | .irq_unmask = pxa_unmask_muxed_gpio, | ||
266 | .irq_set_type = pxa_gpio_irq_type, | ||
267 | }; | ||
268 | |||
269 | void __init pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn) | ||
270 | { | ||
271 | struct pxa_gpio_chip *c; | ||
272 | int gpio, irq; | ||
273 | |||
274 | pxa_last_gpio = end; | ||
275 | |||
276 | /* Initialize GPIO chips */ | ||
277 | pxa_init_gpio_chip(end); | ||
278 | |||
279 | /* clear all GPIO edge detects */ | ||
280 | for_each_gpio_chip(gpio, c) { | ||
281 | __raw_writel(0, c->regbase + GFER_OFFSET); | ||
282 | __raw_writel(0, c->regbase + GRER_OFFSET); | ||
283 | __raw_writel(~0,c->regbase + GEDR_OFFSET); | ||
284 | } | ||
285 | |||
286 | for (irq = gpio_to_irq(start); irq <= gpio_to_irq(end); irq++) { | ||
287 | irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, | ||
288 | handle_edge_irq); | ||
289 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
290 | } | ||
291 | |||
292 | /* Install handler for GPIO>=2 edge detect interrupts */ | ||
293 | irq_set_chained_handler(mux_irq, pxa_gpio_demux_handler); | ||
294 | pxa_muxed_gpio_chip.irq_set_wake = fn; | ||
295 | } | ||
296 | |||
297 | #ifdef CONFIG_PM | ||
298 | static int pxa_gpio_suspend(void) | ||
299 | { | ||
300 | struct pxa_gpio_chip *c; | ||
301 | int gpio; | ||
302 | |||
303 | for_each_gpio_chip(gpio, c) { | ||
304 | c->saved_gplr = __raw_readl(c->regbase + GPLR_OFFSET); | ||
305 | c->saved_gpdr = __raw_readl(c->regbase + GPDR_OFFSET); | ||
306 | c->saved_grer = __raw_readl(c->regbase + GRER_OFFSET); | ||
307 | c->saved_gfer = __raw_readl(c->regbase + GFER_OFFSET); | ||
308 | |||
309 | /* Clear GPIO transition detect bits */ | ||
310 | __raw_writel(0xffffffff, c->regbase + GEDR_OFFSET); | ||
311 | } | ||
312 | return 0; | ||
313 | } | ||
314 | |||
315 | static void pxa_gpio_resume(void) | ||
316 | { | ||
317 | struct pxa_gpio_chip *c; | ||
318 | int gpio; | ||
319 | |||
320 | for_each_gpio_chip(gpio, c) { | ||
321 | /* restore level with set/clear */ | ||
322 | __raw_writel( c->saved_gplr, c->regbase + GPSR_OFFSET); | ||
323 | __raw_writel(~c->saved_gplr, c->regbase + GPCR_OFFSET); | ||
324 | |||
325 | __raw_writel(c->saved_grer, c->regbase + GRER_OFFSET); | ||
326 | __raw_writel(c->saved_gfer, c->regbase + GFER_OFFSET); | ||
327 | __raw_writel(c->saved_gpdr, c->regbase + GPDR_OFFSET); | ||
328 | } | ||
329 | } | ||
330 | #else | ||
331 | #define pxa_gpio_suspend NULL | ||
332 | #define pxa_gpio_resume NULL | ||
333 | #endif | ||
334 | |||
335 | struct syscore_ops pxa_gpio_syscore_ops = { | ||
336 | .suspend = pxa_gpio_suspend, | ||
337 | .resume = pxa_gpio_resume, | ||
338 | }; | ||
diff --git a/arch/arm/plat-pxa/include/plat/gpio-pxa.h b/arch/arm/plat-pxa/include/plat/gpio-pxa.h new file mode 100644 index 000000000000..b6390beff323 --- /dev/null +++ b/arch/arm/plat-pxa/include/plat/gpio-pxa.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef __PLAT_PXA_GPIO_H | ||
2 | #define __PLAT_PXA_GPIO_H | ||
3 | |||
4 | struct irq_data; | ||
5 | |||
6 | /* | ||
7 | * We handle the GPIOs by banks, each bank covers up to 32 GPIOs with | ||
8 | * one set of registers. The register offsets are organized below: | ||
9 | * | ||
10 | * GPLR GPDR GPSR GPCR GRER GFER GEDR | ||
11 | * BANK 0 - 0x0000 0x000C 0x0018 0x0024 0x0030 0x003C 0x0048 | ||
12 | * BANK 1 - 0x0004 0x0010 0x001C 0x0028 0x0034 0x0040 0x004C | ||
13 | * BANK 2 - 0x0008 0x0014 0x0020 0x002C 0x0038 0x0044 0x0050 | ||
14 | * | ||
15 | * BANK 3 - 0x0100 0x010C 0x0118 0x0124 0x0130 0x013C 0x0148 | ||
16 | * BANK 4 - 0x0104 0x0110 0x011C 0x0128 0x0134 0x0140 0x014C | ||
17 | * BANK 5 - 0x0108 0x0114 0x0120 0x012C 0x0138 0x0144 0x0150 | ||
18 | * | ||
19 | * NOTE: | ||
20 | * BANK 3 is only available on PXA27x and later processors. | ||
21 | * BANK 4 and 5 are only available on PXA935 | ||
22 | */ | ||
23 | |||
24 | #define GPIO_BANK(n) (GPIO_REGS_VIRT + BANK_OFF(n)) | ||
25 | |||
26 | #define GPLR_OFFSET 0x00 | ||
27 | #define GPDR_OFFSET 0x0C | ||
28 | #define GPSR_OFFSET 0x18 | ||
29 | #define GPCR_OFFSET 0x24 | ||
30 | #define GRER_OFFSET 0x30 | ||
31 | #define GFER_OFFSET 0x3C | ||
32 | #define GEDR_OFFSET 0x48 | ||
33 | |||
34 | /* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85). | ||
35 | * Those cases currently cause holes in the GPIO number space, the | ||
36 | * actual number of the last GPIO is recorded by 'pxa_last_gpio'. | ||
37 | */ | ||
38 | extern int pxa_last_gpio; | ||
39 | |||
40 | typedef int (*set_wake_t)(struct irq_data *d, unsigned int on); | ||
41 | |||
42 | extern void pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn); | ||
43 | |||
44 | #endif /* __PLAT_PXA_GPIO_H */ | ||
diff --git a/arch/arm/plat-pxa/include/plat/gpio.h b/arch/arm/plat-pxa/include/plat/gpio.h index 1ddd2b97a729..258f77210b02 100644 --- a/arch/arm/plat-pxa/include/plat/gpio.h +++ b/arch/arm/plat-pxa/include/plat/gpio.h | |||
@@ -1,35 +1,10 @@ | |||
1 | #ifndef __PLAT_GPIO_H | 1 | #ifndef __PLAT_GPIO_H |
2 | #define __PLAT_GPIO_H | 2 | #define __PLAT_GPIO_H |
3 | 3 | ||
4 | struct irq_data; | 4 | #define __ARM_GPIOLIB_COMPLEX |
5 | 5 | ||
6 | /* | 6 | /* The individual machine provides register offsets and NR_BUILTIN_GPIO */ |
7 | * We handle the GPIOs by banks, each bank covers up to 32 GPIOs with | 7 | #include <mach/gpio-pxa.h> |
8 | * one set of registers. The register offsets are organized below: | ||
9 | * | ||
10 | * GPLR GPDR GPSR GPCR GRER GFER GEDR | ||
11 | * BANK 0 - 0x0000 0x000C 0x0018 0x0024 0x0030 0x003C 0x0048 | ||
12 | * BANK 1 - 0x0004 0x0010 0x001C 0x0028 0x0034 0x0040 0x004C | ||
13 | * BANK 2 - 0x0008 0x0014 0x0020 0x002C 0x0038 0x0044 0x0050 | ||
14 | * | ||
15 | * BANK 3 - 0x0100 0x010C 0x0118 0x0124 0x0130 0x013C 0x0148 | ||
16 | * BANK 4 - 0x0104 0x0110 0x011C 0x0128 0x0134 0x0140 0x014C | ||
17 | * BANK 5 - 0x0108 0x0114 0x0120 0x012C 0x0138 0x0144 0x0150 | ||
18 | * | ||
19 | * NOTE: | ||
20 | * BANK 3 is only available on PXA27x and later processors. | ||
21 | * BANK 4 and 5 are only available on PXA935 | ||
22 | */ | ||
23 | |||
24 | #define GPIO_BANK(n) (GPIO_REGS_VIRT + BANK_OFF(n)) | ||
25 | |||
26 | #define GPLR_OFFSET 0x00 | ||
27 | #define GPDR_OFFSET 0x0C | ||
28 | #define GPSR_OFFSET 0x18 | ||
29 | #define GPCR_OFFSET 0x24 | ||
30 | #define GRER_OFFSET 0x30 | ||
31 | #define GFER_OFFSET 0x3C | ||
32 | #define GEDR_OFFSET 0x48 | ||
33 | 8 | ||
34 | static inline int gpio_get_value(unsigned gpio) | 9 | static inline int gpio_get_value(unsigned gpio) |
35 | { | 10 | { |
@@ -52,13 +27,4 @@ static inline void gpio_set_value(unsigned gpio, int value) | |||
52 | 27 | ||
53 | #define gpio_cansleep __gpio_cansleep | 28 | #define gpio_cansleep __gpio_cansleep |
54 | 29 | ||
55 | /* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85). | ||
56 | * Those cases currently cause holes in the GPIO number space, the | ||
57 | * actual number of the last GPIO is recorded by 'pxa_last_gpio'. | ||
58 | */ | ||
59 | extern int pxa_last_gpio; | ||
60 | |||
61 | typedef int (*set_wake_t)(struct irq_data *d, unsigned int on); | ||
62 | |||
63 | extern void pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn); | ||
64 | #endif /* __PLAT_GPIO_H */ | 30 | #endif /* __PLAT_GPIO_H */ |
diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h index 89e68e07b0a8..5c79c29f2833 100644 --- a/arch/arm/plat-pxa/include/plat/mfp.h +++ b/arch/arm/plat-pxa/include/plat/mfp.h | |||
@@ -456,7 +456,7 @@ struct mfp_addr_map { | |||
456 | 456 | ||
457 | #define MFP_ADDR_END { MFP_PIN_INVALID, 0 } | 457 | #define MFP_ADDR_END { MFP_PIN_INVALID, 0 } |
458 | 458 | ||
459 | void __init mfp_init_base(unsigned long mfpr_base); | 459 | void __init mfp_init_base(void __iomem *mfpr_base); |
460 | void __init mfp_init_addr(struct mfp_addr_map *map); | 460 | void __init mfp_init_addr(struct mfp_addr_map *map); |
461 | 461 | ||
462 | /* | 462 | /* |
diff --git a/arch/arm/plat-pxa/mfp.c b/arch/arm/plat-pxa/mfp.c index be12eadcce20..2c4dbb1f4236 100644 --- a/arch/arm/plat-pxa/mfp.c +++ b/arch/arm/plat-pxa/mfp.c | |||
@@ -229,7 +229,7 @@ void mfp_write(int mfp, unsigned long val) | |||
229 | spin_unlock_irqrestore(&mfp_spin_lock, flags); | 229 | spin_unlock_irqrestore(&mfp_spin_lock, flags); |
230 | } | 230 | } |
231 | 231 | ||
232 | void __init mfp_init_base(unsigned long mfpr_base) | 232 | void __init mfp_init_base(void __iomem *mfpr_base) |
233 | { | 233 | { |
234 | int i; | 234 | int i; |
235 | 235 | ||
@@ -237,7 +237,7 @@ void __init mfp_init_base(unsigned long mfpr_base) | |||
237 | for (i = 0; i < ARRAY_SIZE(mfp_table); i++) | 237 | for (i = 0; i < ARRAY_SIZE(mfp_table); i++) |
238 | mfp_table[i].config = -1; | 238 | mfp_table[i].config = -1; |
239 | 239 | ||
240 | mfpr_mmio_base = (void __iomem *)mfpr_base; | 240 | mfpr_mmio_base = mfpr_base; |
241 | } | 241 | } |
242 | 242 | ||
243 | void __init mfp_init_addr(struct mfp_addr_map *map) | 243 | void __init mfp_init_addr(struct mfp_addr_map *map) |
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S index 8501bbf2c092..02b160a1ec9b 100644 --- a/arch/arm/plat-spear/include/plat/debug-macro.S +++ b/arch/arm/plat-spear/include/plat/debug-macro.S | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/amba/serial.h> | 14 | #include <linux/amba/serial.h> |
15 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
16 | 16 | ||
17 | .macro addruart, rp, rv | 17 | .macro addruart, rp, rv, tmp |
18 | mov \rp, #SPEAR_DBG_UART_BASE @ Physical base | 18 | mov \rp, #SPEAR_DBG_UART_BASE @ Physical base |
19 | mov \rv, #VA_SPEAR_DBG_UART_BASE @ Virtual base | 19 | mov \rv, #VA_SPEAR_DBG_UART_BASE @ Virtual base |
20 | .endm | 20 | .endm |
diff --git a/arch/arm/plat-spear/include/plat/gpio.h b/arch/arm/plat-spear/include/plat/gpio.h index b857c91257dd..40a8c178f10d 100644 --- a/arch/arm/plat-spear/include/plat/gpio.h +++ b/arch/arm/plat-spear/include/plat/gpio.h | |||
@@ -1,24 +1 @@ | |||
1 | /* | /* empty */ | |
2 | * arch/arm/plat-spear/include/plat/gpio.h | ||
3 | * | ||
4 | * GPIO macros for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_GPIO_H | ||
15 | #define __PLAT_GPIO_H | ||
16 | |||
17 | #include <asm-generic/gpio.h> | ||
18 | |||
19 | #define gpio_get_value __gpio_get_value | ||
20 | #define gpio_set_value __gpio_set_value | ||
21 | #define gpio_cansleep __gpio_cansleep | ||
22 | #define gpio_to_irq __gpio_to_irq | ||
23 | |||
24 | #endif /* __PLAT_GPIO_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/memory.h b/arch/arm/plat-spear/include/plat/memory.h deleted file mode 100644 index 7e3599e1104e..000000000000 --- a/arch/arm/plat-spear/include/plat/memory.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/memory.h | ||
3 | * | ||
4 | * Memory map for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_MEMORY_H | ||
15 | #define __PLAT_MEMORY_H | ||
16 | |||
17 | /* Physical DRAM offset */ | ||
18 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
19 | |||
20 | #endif /* __PLAT_MEMORY_H */ | ||
diff --git a/arch/arm/plat-tcc/include/mach/debug-macro.S b/arch/arm/plat-tcc/include/mach/debug-macro.S index 7662f736e42b..cf17d04ec30d 100644 --- a/arch/arm/plat-tcc/include/mach/debug-macro.S +++ b/arch/arm/plat-tcc/include/mach/debug-macro.S | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | .macro addruart, rp, rv | 12 | .macro addruart, rp, rv, tmp |
13 | moveq \rp, #0x90000000 @ physical base address | 13 | moveq \rp, #0x90000000 @ physical base address |
14 | movne \rv, #0xF1000000 @ virtual base | 14 | movne \rv, #0xF1000000 @ virtual base |
15 | orr \rp, \rp, #0x00007000 @ UART0 | 15 | orr \rp, \rp, #0x00007000 @ UART0 |
diff --git a/arch/arm/plat-tcc/include/mach/memory.h b/arch/arm/plat-tcc/include/mach/memory.h deleted file mode 100644 index 28a6e0cd13b3..000000000000 --- a/arch/arm/plat-tcc/include/mach/memory.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999 ARM Limited | ||
3 | * Copyright (C) 2000 RidgeRun, Inc. | ||
4 | * Copyright (C) 2008-2009 Telechips | ||
5 | * Copyright (C) 2010 Hans J. Koch <hjk@linutronix.de> | ||
6 | * | ||
7 | * Licensed under the terms of the GPL v2. | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASM_ARCH_MEMORY_H | ||
11 | #define __ASM_ARCH_MEMORY_H | ||
12 | |||
13 | /* | ||
14 | * Physical DRAM offset. | ||
15 | */ | ||
16 | #define PLAT_PHYS_OFFSET UL(0x20000000) | ||
17 | |||
18 | #endif | ||