diff options
85 files changed, 1269 insertions, 3607 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9dd61014864b..43449305961e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -197,15 +197,21 @@ config ARM_PATCH_PHYS_VIRT | |||
197 | depends on !XIP_KERNEL && MMU | 197 | depends on !XIP_KERNEL && MMU |
198 | depends on !ARCH_REALVIEW || !SPARSEMEM | 198 | depends on !ARCH_REALVIEW || !SPARSEMEM |
199 | help | 199 | help |
200 | Patch phys-to-virt translation functions at runtime according to | 200 | Patch phys-to-virt and virt-to-phys translation functions at |
201 | the position of the kernel in system memory. | 201 | boot and module load time according to the position of the |
202 | kernel in system memory. | ||
202 | 203 | ||
203 | This can only be used with non-XIP with MMU kernels where | 204 | This can only be used with non-XIP MMU kernels where the base |
204 | the base of physical memory is at a 16MB boundary. | 205 | of physical memory is at a 16MB boundary, or theoretically 64K |
206 | for the MSM machine class. | ||
205 | 207 | ||
206 | config ARM_PATCH_PHYS_VIRT_16BIT | 208 | config ARM_PATCH_PHYS_VIRT_16BIT |
207 | def_bool y | 209 | def_bool y |
208 | depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM | 210 | depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM |
211 | help | ||
212 | This option extends the physical to virtual translation patching | ||
213 | to allow physical memory down to a theoretical minimum of 64K | ||
214 | boundaries. | ||
209 | 215 | ||
210 | source "init/Kconfig" | 216 | source "init/Kconfig" |
211 | 217 | ||
@@ -550,18 +556,6 @@ config ARCH_KS8695 | |||
550 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based | 556 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based |
551 | System-on-Chip devices. | 557 | System-on-Chip devices. |
552 | 558 | ||
553 | config ARCH_NS9XXX | ||
554 | bool "NetSilicon NS9xxx" | ||
555 | select CPU_ARM926T | ||
556 | select GENERIC_GPIO | ||
557 | select GENERIC_CLOCKEVENTS | ||
558 | select HAVE_CLK | ||
559 | help | ||
560 | Say Y here if you intend to run this kernel on a NetSilicon NS9xxx | ||
561 | System. | ||
562 | |||
563 | <http://www.digi.com/products/microprocessors/index.jsp> | ||
564 | |||
565 | config ARCH_W90X900 | 559 | config ARCH_W90X900 |
566 | bool "Nuvoton W90X900 CPU" | 560 | bool "Nuvoton W90X900 CPU" |
567 | select CPU_ARM926T | 561 | select CPU_ARM926T |
@@ -954,8 +948,6 @@ source "arch/arm/mach-netx/Kconfig" | |||
954 | source "arch/arm/mach-nomadik/Kconfig" | 948 | source "arch/arm/mach-nomadik/Kconfig" |
955 | source "arch/arm/plat-nomadik/Kconfig" | 949 | source "arch/arm/plat-nomadik/Kconfig" |
956 | 950 | ||
957 | source "arch/arm/mach-ns9xxx/Kconfig" | ||
958 | |||
959 | source "arch/arm/mach-nuc93x/Kconfig" | 951 | source "arch/arm/mach-nuc93x/Kconfig" |
960 | 952 | ||
961 | source "arch/arm/plat-omap/Kconfig" | 953 | source "arch/arm/plat-omap/Kconfig" |
@@ -1321,8 +1313,7 @@ menu "Kernel Features" | |||
1321 | source "kernel/time/Kconfig" | 1313 | source "kernel/time/Kconfig" |
1322 | 1314 | ||
1323 | config SMP | 1315 | config SMP |
1324 | bool "Symmetric Multi-Processing (EXPERIMENTAL)" | 1316 | bool "Symmetric Multi-Processing" |
1325 | depends on EXPERIMENTAL | ||
1326 | depends on CPU_V6K || CPU_V7 | 1317 | depends on CPU_V6K || CPU_V7 |
1327 | depends on GENERIC_CLOCKEVENTS | 1318 | depends on GENERIC_CLOCKEVENTS |
1328 | depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \ | 1319 | depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \ |
@@ -1524,8 +1515,8 @@ config ARCH_SELECT_MEMORY_MODEL | |||
1524 | def_bool ARCH_SPARSEMEM_ENABLE | 1515 | def_bool ARCH_SPARSEMEM_ENABLE |
1525 | 1516 | ||
1526 | config HIGHMEM | 1517 | config HIGHMEM |
1527 | bool "High Memory Support (EXPERIMENTAL)" | 1518 | bool "High Memory Support" |
1528 | depends on MMU && EXPERIMENTAL | 1519 | depends on MMU |
1529 | help | 1520 | help |
1530 | The address space of ARM processors is only 4 Gigabytes large | 1521 | The address space of ARM processors is only 4 Gigabytes large |
1531 | and it has to accommodate user address space, kernel address | 1522 | and it has to accommodate user address space, kernel address |
@@ -1745,16 +1736,31 @@ config CMDLINE | |||
1745 | time by entering them here. As a minimum, you should specify the | 1736 | time by entering them here. As a minimum, you should specify the |
1746 | memory size and the root device (e.g., mem=64M root=/dev/nfs). | 1737 | memory size and the root device (e.g., mem=64M root=/dev/nfs). |
1747 | 1738 | ||
1739 | choice | ||
1740 | prompt "Kernel command line type" if CMDLINE != "" | ||
1741 | default CMDLINE_FROM_BOOTLOADER | ||
1742 | |||
1743 | config CMDLINE_FROM_BOOTLOADER | ||
1744 | bool "Use bootloader kernel arguments if available" | ||
1745 | help | ||
1746 | Uses the command-line options passed by the boot loader. If | ||
1747 | the boot loader doesn't provide any, the default kernel command | ||
1748 | string provided in CMDLINE will be used. | ||
1749 | |||
1750 | config CMDLINE_EXTEND | ||
1751 | bool "Extend bootloader kernel arguments" | ||
1752 | help | ||
1753 | The command-line arguments provided by the boot loader will be | ||
1754 | appended to the default kernel command string. | ||
1755 | |||
1748 | config CMDLINE_FORCE | 1756 | config CMDLINE_FORCE |
1749 | bool "Always use the default kernel command string" | 1757 | bool "Always use the default kernel command string" |
1750 | depends on CMDLINE != "" | ||
1751 | help | 1758 | help |
1752 | Always use the default kernel command string, even if the boot | 1759 | Always use the default kernel command string, even if the boot |
1753 | loader passes other arguments to the kernel. | 1760 | loader passes other arguments to the kernel. |
1754 | This is useful if you cannot or don't want to change the | 1761 | This is useful if you cannot or don't want to change the |
1755 | command-line options your boot loader passes to the kernel. | 1762 | command-line options your boot loader passes to the kernel. |
1756 | 1763 | endchoice | |
1757 | If unsure, say N. | ||
1758 | 1764 | ||
1759 | config XIP_KERNEL | 1765 | config XIP_KERNEL |
1760 | bool "Kernel Execute-In-Place from ROM" | 1766 | bool "Kernel Execute-In-Place from ROM" |
@@ -2013,7 +2019,7 @@ menu "Power management options" | |||
2013 | source "kernel/power/Kconfig" | 2019 | source "kernel/power/Kconfig" |
2014 | 2020 | ||
2015 | config ARCH_SUSPEND_POSSIBLE | 2021 | config ARCH_SUSPEND_POSSIBLE |
2016 | depends on !ARCH_S5P64X0 && !ARCH_S5P6442 | 2022 | depends on !ARCH_S5P64X0 && !ARCH_S5P6442 && !ARCH_S5PC100 |
2017 | depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ | 2023 | depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ |
2018 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE | 2024 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE |
2019 | def_bool y | 2025 | def_bool y |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 692c481196bd..458a01516676 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -164,7 +164,6 @@ machine-$(CONFIG_ARCH_MXC91231) := mxc91231 | |||
164 | machine-$(CONFIG_ARCH_MXS) := mxs | 164 | machine-$(CONFIG_ARCH_MXS) := mxs |
165 | machine-$(CONFIG_ARCH_NETX) := netx | 165 | machine-$(CONFIG_ARCH_NETX) := netx |
166 | machine-$(CONFIG_ARCH_NOMADIK) := nomadik | 166 | machine-$(CONFIG_ARCH_NOMADIK) := nomadik |
167 | machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx | ||
168 | machine-$(CONFIG_ARCH_OMAP1) := omap1 | 167 | machine-$(CONFIG_ARCH_OMAP1) := omap1 |
169 | machine-$(CONFIG_ARCH_OMAP2) := omap2 | 168 | machine-$(CONFIG_ARCH_OMAP2) := omap2 |
170 | machine-$(CONFIG_ARCH_OMAP3) := omap2 | 169 | machine-$(CONFIG_ARCH_OMAP3) := omap2 |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 49f5b2eaaa87..6fdf4abb718b 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -459,7 +459,11 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
459 | orr r1, r1, #3 << 10 | 459 | orr r1, r1, #3 << 10 |
460 | add r2, r3, #16384 | 460 | add r2, r3, #16384 |
461 | 1: cmp r1, r9 @ if virt > start of RAM | 461 | 1: cmp r1, r9 @ if virt > start of RAM |
462 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
463 | orrhs r1, r1, #0x08 @ set cacheable | ||
464 | #else | ||
462 | orrhs r1, r1, #0x0c @ set cacheable, bufferable | 465 | orrhs r1, r1, #0x0c @ set cacheable, bufferable |
466 | #endif | ||
463 | cmp r1, r10 @ if virt > end of RAM | 467 | cmp r1, r10 @ if virt > end of RAM |
464 | bichs r1, r1, #0x0c @ clear cacheable, bufferable | 468 | bichs r1, r1, #0x0c @ clear cacheable, bufferable |
465 | str r1, [r0], #4 @ 1:1 mapping | 469 | str r1, [r0], #4 @ 1:1 mapping |
@@ -484,6 +488,12 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
484 | mov pc, lr | 488 | mov pc, lr |
485 | ENDPROC(__setup_mmu) | 489 | ENDPROC(__setup_mmu) |
486 | 490 | ||
491 | __arm926ejs_mmu_cache_on: | ||
492 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
493 | mov r0, #4 @ put dcache in WT mode | ||
494 | mcr p15, 7, r0, c15, c0, 0 | ||
495 | #endif | ||
496 | |||
487 | __armv4_mmu_cache_on: | 497 | __armv4_mmu_cache_on: |
488 | mov r12, lr | 498 | mov r12, lr |
489 | #ifdef CONFIG_MMU | 499 | #ifdef CONFIG_MMU |
@@ -665,6 +675,12 @@ proc_types: | |||
665 | W(b) __armv4_mpu_cache_off | 675 | W(b) __armv4_mpu_cache_off |
666 | W(b) __armv4_mpu_cache_flush | 676 | W(b) __armv4_mpu_cache_flush |
667 | 677 | ||
678 | .word 0x41069260 @ ARM926EJ-S (v5TEJ) | ||
679 | .word 0xff0ffff0 | ||
680 | b __arm926ejs_mmu_cache_on | ||
681 | b __armv4_mmu_cache_off | ||
682 | b __armv5tej_mmu_cache_flush | ||
683 | |||
668 | .word 0x00007000 @ ARM7 IDs | 684 | .word 0x00007000 @ ARM7 IDs |
669 | .word 0x0000f000 | 685 | .word 0x0000f000 |
670 | mov pc, lr | 686 | mov pc, lr |
diff --git a/arch/arm/configs/ns9xxx_defconfig b/arch/arm/configs/ns9xxx_defconfig deleted file mode 100644 index 1f528a002983..000000000000 --- a/arch/arm/configs/ns9xxx_defconfig +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | CONFIG_IKCONFIG=y | ||
2 | CONFIG_IKCONFIG_PROC=y | ||
3 | CONFIG_BLK_DEV_INITRD=y | ||
4 | CONFIG_MODULES=y | ||
5 | CONFIG_MODULE_UNLOAD=y | ||
6 | # CONFIG_IOSCHED_DEADLINE is not set | ||
7 | # CONFIG_IOSCHED_CFQ is not set | ||
8 | CONFIG_ARCH_NS9XXX=y | ||
9 | CONFIG_MACH_CC9P9360DEV=y | ||
10 | CONFIG_MACH_CC9P9360JS=y | ||
11 | CONFIG_NO_HZ=y | ||
12 | CONFIG_HIGH_RES_TIMERS=y | ||
13 | CONFIG_FPE_NWFPE=y | ||
14 | CONFIG_NET=y | ||
15 | CONFIG_PACKET=m | ||
16 | CONFIG_INET=y | ||
17 | CONFIG_IP_PNP=y | ||
18 | CONFIG_SYN_COOKIES=y | ||
19 | CONFIG_MTD=m | ||
20 | CONFIG_MTD_CONCAT=m | ||
21 | CONFIG_MTD_CHAR=m | ||
22 | CONFIG_MTD_BLOCK=m | ||
23 | CONFIG_MTD_CFI=m | ||
24 | CONFIG_MTD_JEDECPROBE=m | ||
25 | CONFIG_MTD_CFI_AMDSTD=m | ||
26 | CONFIG_MTD_PHYSMAP=m | ||
27 | CONFIG_BLK_DEV_LOOP=m | ||
28 | CONFIG_NETDEVICES=y | ||
29 | CONFIG_NET_ETHERNET=y | ||
30 | # CONFIG_SERIO_SERPORT is not set | ||
31 | CONFIG_SERIAL_8250=y | ||
32 | CONFIG_SERIAL_8250_CONSOLE=y | ||
33 | # CONFIG_LEGACY_PTYS is not set | ||
34 | # CONFIG_HW_RANDOM is not set | ||
35 | CONFIG_I2C=m | ||
36 | CONFIG_I2C_GPIO=m | ||
37 | # CONFIG_HWMON is not set | ||
38 | # CONFIG_VGA_CONSOLE is not set | ||
39 | # CONFIG_USB_SUPPORT is not set | ||
40 | CONFIG_NEW_LEDS=y | ||
41 | CONFIG_LEDS_CLASS=m | ||
42 | CONFIG_LEDS_GPIO=m | ||
43 | CONFIG_LEDS_TRIGGERS=y | ||
44 | CONFIG_LEDS_TRIGGER_TIMER=m | ||
45 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | ||
46 | CONFIG_RTC_CLASS=m | ||
47 | CONFIG_EXT2_FS=m | ||
48 | CONFIG_TMPFS=y | ||
49 | CONFIG_JFFS2_FS=m | ||
50 | CONFIG_NFS_FS=y | ||
51 | CONFIG_ROOT_NFS=y | ||
52 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
53 | CONFIG_DEBUG_KERNEL=y | ||
54 | CONFIG_DEBUG_INFO=y | ||
55 | CONFIG_DEBUG_USER=y | ||
56 | CONFIG_DEBUG_ERRORS=y | ||
diff --git a/arch/arm/configs/spear310_defconfig b/arch/arm/configs/spear310_defconfig deleted file mode 100644 index 824e44418b18..000000000000 --- a/arch/arm/configs/spear310_defconfig +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_BSD_PROCESS_ACCT=y | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
6 | CONFIG_MODULES=y | ||
7 | CONFIG_MODULE_UNLOAD=y | ||
8 | CONFIG_MODVERSIONS=y | ||
9 | CONFIG_PLAT_SPEAR=y | ||
10 | CONFIG_MACH_SPEAR310=y | ||
11 | CONFIG_BINFMT_MISC=y | ||
12 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
13 | CONFIG_BLK_DEV_RAM=y | ||
14 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
15 | CONFIG_INPUT_FF_MEMLESS=y | ||
16 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
17 | # CONFIG_INPUT_KEYBOARD is not set | ||
18 | # CONFIG_INPUT_MOUSE is not set | ||
19 | CONFIG_SERIAL_AMBA_PL011=y | ||
20 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | ||
21 | # CONFIG_LEGACY_PTYS is not set | ||
22 | # CONFIG_HW_RANDOM is not set | ||
23 | CONFIG_RAW_DRIVER=y | ||
24 | CONFIG_MAX_RAW_DEVS=8192 | ||
25 | CONFIG_GPIO_SYSFS=y | ||
26 | CONFIG_GPIO_PL061=y | ||
27 | # CONFIG_HWMON is not set | ||
28 | # CONFIG_VGA_CONSOLE is not set | ||
29 | # CONFIG_HID_SUPPORT is not set | ||
30 | # CONFIG_USB_SUPPORT is not set | ||
31 | CONFIG_EXT2_FS=y | ||
32 | CONFIG_EXT2_FS_XATTR=y | ||
33 | CONFIG_EXT2_FS_SECURITY=y | ||
34 | CONFIG_EXT3_FS=y | ||
35 | CONFIG_EXT3_FS_SECURITY=y | ||
36 | CONFIG_AUTOFS4_FS=m | ||
37 | CONFIG_MSDOS_FS=m | ||
38 | CONFIG_VFAT_FS=m | ||
39 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" | ||
40 | CONFIG_TMPFS=y | ||
41 | CONFIG_PARTITION_ADVANCED=y | ||
42 | CONFIG_NLS=y | ||
43 | CONFIG_NLS_DEFAULT="utf8" | ||
44 | CONFIG_NLS_CODEPAGE_437=y | ||
45 | CONFIG_NLS_ASCII=m | ||
46 | CONFIG_MAGIC_SYSRQ=y | ||
47 | CONFIG_DEBUG_FS=y | ||
48 | CONFIG_DEBUG_KERNEL=y | ||
49 | CONFIG_DEBUG_SPINLOCK=y | ||
50 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
51 | CONFIG_DEBUG_INFO=y | ||
52 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/configs/spear320_defconfig b/arch/arm/configs/spear320_defconfig deleted file mode 100644 index 842f7f3c512a..000000000000 --- a/arch/arm/configs/spear320_defconfig +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_BSD_PROCESS_ACCT=y | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
6 | CONFIG_MODULES=y | ||
7 | CONFIG_MODULE_UNLOAD=y | ||
8 | CONFIG_MODVERSIONS=y | ||
9 | CONFIG_PLAT_SPEAR=y | ||
10 | CONFIG_MACH_SPEAR320=y | ||
11 | CONFIG_BINFMT_MISC=y | ||
12 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
13 | CONFIG_BLK_DEV_RAM=y | ||
14 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
15 | CONFIG_INPUT_FF_MEMLESS=y | ||
16 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
17 | # CONFIG_INPUT_KEYBOARD is not set | ||
18 | # CONFIG_INPUT_MOUSE is not set | ||
19 | CONFIG_SERIAL_AMBA_PL011=y | ||
20 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | ||
21 | # CONFIG_LEGACY_PTYS is not set | ||
22 | # CONFIG_HW_RANDOM is not set | ||
23 | CONFIG_RAW_DRIVER=y | ||
24 | CONFIG_MAX_RAW_DEVS=8192 | ||
25 | CONFIG_GPIO_SYSFS=y | ||
26 | CONFIG_GPIO_PL061=y | ||
27 | # CONFIG_HWMON is not set | ||
28 | # CONFIG_VGA_CONSOLE is not set | ||
29 | # CONFIG_HID_SUPPORT is not set | ||
30 | # CONFIG_USB_SUPPORT is not set | ||
31 | CONFIG_EXT2_FS=y | ||
32 | CONFIG_EXT2_FS_XATTR=y | ||
33 | CONFIG_EXT2_FS_SECURITY=y | ||
34 | CONFIG_EXT3_FS=y | ||
35 | CONFIG_EXT3_FS_SECURITY=y | ||
36 | CONFIG_AUTOFS4_FS=m | ||
37 | CONFIG_MSDOS_FS=m | ||
38 | CONFIG_VFAT_FS=m | ||
39 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" | ||
40 | CONFIG_TMPFS=y | ||
41 | CONFIG_PARTITION_ADVANCED=y | ||
42 | CONFIG_NLS=y | ||
43 | CONFIG_NLS_DEFAULT="utf8" | ||
44 | CONFIG_NLS_CODEPAGE_437=y | ||
45 | CONFIG_NLS_ASCII=m | ||
46 | CONFIG_MAGIC_SYSRQ=y | ||
47 | CONFIG_DEBUG_FS=y | ||
48 | CONFIG_DEBUG_KERNEL=y | ||
49 | CONFIG_DEBUG_SPINLOCK=y | ||
50 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
51 | CONFIG_DEBUG_INFO=y | ||
52 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/configs/spear300_defconfig b/arch/arm/configs/spear3xx_defconfig index cf29f3e56922..fea7e1f026a3 100644 --- a/arch/arm/configs/spear300_defconfig +++ b/arch/arm/configs/spear3xx_defconfig | |||
@@ -7,6 +7,9 @@ CONFIG_MODULES=y | |||
7 | CONFIG_MODULE_UNLOAD=y | 7 | CONFIG_MODULE_UNLOAD=y |
8 | CONFIG_MODVERSIONS=y | 8 | CONFIG_MODVERSIONS=y |
9 | CONFIG_PLAT_SPEAR=y | 9 | CONFIG_PLAT_SPEAR=y |
10 | CONFIG_BOARD_SPEAR300_EVB=y | ||
11 | CONFIG_BOARD_SPEAR310_EVB=y | ||
12 | CONFIG_BOARD_SPEAR320_EVB=y | ||
10 | CONFIG_BINFMT_MISC=y | 13 | CONFIG_BINFMT_MISC=y |
11 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 14 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
12 | CONFIG_BLK_DEV_RAM=y | 15 | CONFIG_BLK_DEV_RAM=y |
@@ -24,7 +27,6 @@ CONFIG_MAX_RAW_DEVS=8192 | |||
24 | CONFIG_GPIO_SYSFS=y | 27 | CONFIG_GPIO_SYSFS=y |
25 | CONFIG_GPIO_PL061=y | 28 | CONFIG_GPIO_PL061=y |
26 | # CONFIG_HWMON is not set | 29 | # CONFIG_HWMON is not set |
27 | # CONFIG_VGA_CONSOLE is not set | ||
28 | # CONFIG_HID_SUPPORT is not set | 30 | # CONFIG_HID_SUPPORT is not set |
29 | # CONFIG_USB_SUPPORT is not set | 31 | # CONFIG_USB_SUPPORT is not set |
30 | CONFIG_EXT2_FS=y | 32 | CONFIG_EXT2_FS=y |
diff --git a/arch/arm/configs/spear600_defconfig b/arch/arm/configs/spear6xx_defconfig index 6777c11f63e7..cef2e836afd2 100644 --- a/arch/arm/configs/spear600_defconfig +++ b/arch/arm/configs/spear6xx_defconfig | |||
@@ -8,6 +8,7 @@ CONFIG_MODULE_UNLOAD=y | |||
8 | CONFIG_MODVERSIONS=y | 8 | CONFIG_MODVERSIONS=y |
9 | CONFIG_PLAT_SPEAR=y | 9 | CONFIG_PLAT_SPEAR=y |
10 | CONFIG_ARCH_SPEAR6XX=y | 10 | CONFIG_ARCH_SPEAR6XX=y |
11 | CONFIG_BOARD_SPEAR600_EVB=y | ||
11 | CONFIG_BINFMT_MISC=y | 12 | CONFIG_BINFMT_MISC=y |
12 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 13 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
13 | CONFIG_BLK_DEV_RAM=y | 14 | CONFIG_BLK_DEV_RAM=y |
@@ -22,7 +23,6 @@ CONFIG_MAX_RAW_DEVS=8192 | |||
22 | CONFIG_GPIO_SYSFS=y | 23 | CONFIG_GPIO_SYSFS=y |
23 | CONFIG_GPIO_PL061=y | 24 | CONFIG_GPIO_PL061=y |
24 | # CONFIG_HWMON is not set | 25 | # CONFIG_HWMON is not set |
25 | # CONFIG_VGA_CONSOLE is not set | ||
26 | # CONFIG_HID_SUPPORT is not set | 26 | # CONFIG_HID_SUPPORT is not set |
27 | # CONFIG_USB_SUPPORT is not set | 27 | # CONFIG_USB_SUPPORT is not set |
28 | CONFIG_EXT2_FS=y | 28 | CONFIG_EXT2_FS=y |
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index c3cd8755e648..0e9ce8d9686e 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
@@ -108,6 +108,7 @@ struct task_struct; | |||
108 | int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); | 108 | int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); |
109 | #define ELF_CORE_COPY_TASK_REGS dump_task_regs | 109 | #define ELF_CORE_COPY_TASK_REGS dump_task_regs |
110 | 110 | ||
111 | #define CORE_DUMP_USE_REGSET | ||
111 | #define ELF_EXEC_PAGESIZE 4096 | 112 | #define ELF_EXEC_PAGESIZE 4096 |
112 | 113 | ||
113 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | 114 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical |
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h index 199a6b6de7f4..8c73900da9ed 100644 --- a/arch/arm/include/asm/futex.h +++ b/arch/arm/include/asm/futex.h | |||
@@ -3,16 +3,74 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #if defined(CONFIG_CPU_USE_DOMAINS) && defined(CONFIG_SMP) | ||
7 | /* ARM doesn't provide unprivileged exclusive memory accessors */ | ||
8 | #include <asm-generic/futex.h> | ||
9 | #else | ||
10 | |||
11 | #include <linux/futex.h> | ||
12 | #include <linux/uaccess.h> | ||
13 | #include <asm/errno.h> | ||
14 | |||
15 | #define __futex_atomic_ex_table(err_reg) \ | ||
16 | "3:\n" \ | ||
17 | " .pushsection __ex_table,\"a\"\n" \ | ||
18 | " .align 3\n" \ | ||
19 | " .long 1b, 4f, 2b, 4f\n" \ | ||
20 | " .popsection\n" \ | ||
21 | " .pushsection .fixup,\"ax\"\n" \ | ||
22 | "4: mov %0, " err_reg "\n" \ | ||
23 | " b 3b\n" \ | ||
24 | " .popsection" | ||
25 | |||
6 | #ifdef CONFIG_SMP | 26 | #ifdef CONFIG_SMP |
7 | 27 | ||
8 | #include <asm-generic/futex.h> | 28 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ |
29 | smp_mb(); \ | ||
30 | __asm__ __volatile__( \ | ||
31 | "1: ldrex %1, [%2]\n" \ | ||
32 | " " insn "\n" \ | ||
33 | "2: strex %1, %0, [%2]\n" \ | ||
34 | " teq %1, #0\n" \ | ||
35 | " bne 1b\n" \ | ||
36 | " mov %0, #0\n" \ | ||
37 | __futex_atomic_ex_table("%4") \ | ||
38 | : "=&r" (ret), "=&r" (oldval) \ | ||
39 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ | ||
40 | : "cc", "memory") | ||
41 | |||
42 | static inline int | ||
43 | futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | ||
44 | u32 oldval, u32 newval) | ||
45 | { | ||
46 | int ret; | ||
47 | u32 val; | ||
48 | |||
49 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) | ||
50 | return -EFAULT; | ||
51 | |||
52 | smp_mb(); | ||
53 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" | ||
54 | "1: ldrex %1, [%4]\n" | ||
55 | " teq %1, %2\n" | ||
56 | " ite eq @ explicit IT needed for the 2b label\n" | ||
57 | "2: strexeq %0, %3, [%4]\n" | ||
58 | " movne %0, #0\n" | ||
59 | " teq %0, #0\n" | ||
60 | " bne 1b\n" | ||
61 | __futex_atomic_ex_table("%5") | ||
62 | : "=&r" (ret), "=&r" (val) | ||
63 | : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) | ||
64 | : "cc", "memory"); | ||
65 | smp_mb(); | ||
66 | |||
67 | *uval = val; | ||
68 | return ret; | ||
69 | } | ||
9 | 70 | ||
10 | #else /* !SMP, we can work around lack of atomic ops by disabling preemption */ | 71 | #else /* !SMP, we can work around lack of atomic ops by disabling preemption */ |
11 | 72 | ||
12 | #include <linux/futex.h> | ||
13 | #include <linux/preempt.h> | 73 | #include <linux/preempt.h> |
14 | #include <linux/uaccess.h> | ||
15 | #include <asm/errno.h> | ||
16 | #include <asm/domain.h> | 74 | #include <asm/domain.h> |
17 | 75 | ||
18 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 76 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ |
@@ -21,20 +79,38 @@ | |||
21 | " " insn "\n" \ | 79 | " " insn "\n" \ |
22 | "2: " T(str) " %0, [%2]\n" \ | 80 | "2: " T(str) " %0, [%2]\n" \ |
23 | " mov %0, #0\n" \ | 81 | " mov %0, #0\n" \ |
24 | "3:\n" \ | 82 | __futex_atomic_ex_table("%4") \ |
25 | " .pushsection __ex_table,\"a\"\n" \ | ||
26 | " .align 3\n" \ | ||
27 | " .long 1b, 4f, 2b, 4f\n" \ | ||
28 | " .popsection\n" \ | ||
29 | " .pushsection .fixup,\"ax\"\n" \ | ||
30 | "4: mov %0, %4\n" \ | ||
31 | " b 3b\n" \ | ||
32 | " .popsection" \ | ||
33 | : "=&r" (ret), "=&r" (oldval) \ | 83 | : "=&r" (ret), "=&r" (oldval) \ |
34 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ | 84 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ |
35 | : "cc", "memory") | 85 | : "cc", "memory") |
36 | 86 | ||
37 | static inline int | 87 | static inline int |
88 | futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | ||
89 | u32 oldval, u32 newval) | ||
90 | { | ||
91 | int ret = 0; | ||
92 | u32 val; | ||
93 | |||
94 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) | ||
95 | return -EFAULT; | ||
96 | |||
97 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" | ||
98 | "1: " T(ldr) " %1, [%4]\n" | ||
99 | " teq %1, %2\n" | ||
100 | " it eq @ explicit IT needed for the 2b label\n" | ||
101 | "2: " T(streq) " %3, [%4]\n" | ||
102 | __futex_atomic_ex_table("%5") | ||
103 | : "+r" (ret), "=&r" (val) | ||
104 | : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) | ||
105 | : "cc", "memory"); | ||
106 | |||
107 | *uval = val; | ||
108 | return ret; | ||
109 | } | ||
110 | |||
111 | #endif /* !SMP */ | ||
112 | |||
113 | static inline int | ||
38 | futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | 114 | futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) |
39 | { | 115 | { |
40 | int op = (encoded_op >> 28) & 7; | 116 | int op = (encoded_op >> 28) & 7; |
@@ -87,39 +163,6 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | |||
87 | return ret; | 163 | return ret; |
88 | } | 164 | } |
89 | 165 | ||
90 | static inline int | 166 | #endif /* !(CPU_USE_DOMAINS && SMP) */ |
91 | futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | ||
92 | u32 oldval, u32 newval) | ||
93 | { | ||
94 | int ret = 0; | ||
95 | u32 val; | ||
96 | |||
97 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) | ||
98 | return -EFAULT; | ||
99 | |||
100 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" | ||
101 | "1: " T(ldr) " %1, [%4]\n" | ||
102 | " teq %1, %2\n" | ||
103 | " it eq @ explicit IT needed for the 2b label\n" | ||
104 | "2: " T(streq) " %3, [%4]\n" | ||
105 | "3:\n" | ||
106 | " .pushsection __ex_table,\"a\"\n" | ||
107 | " .align 3\n" | ||
108 | " .long 1b, 4f, 2b, 4f\n" | ||
109 | " .popsection\n" | ||
110 | " .pushsection .fixup,\"ax\"\n" | ||
111 | "4: mov %0, %5\n" | ||
112 | " b 3b\n" | ||
113 | " .popsection" | ||
114 | : "+r" (ret), "=&r" (val) | ||
115 | : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) | ||
116 | : "cc", "memory"); | ||
117 | |||
118 | *uval = val; | ||
119 | return ret; | ||
120 | } | ||
121 | |||
122 | #endif /* !SMP */ | ||
123 | |||
124 | #endif /* __KERNEL__ */ | 167 | #endif /* __KERNEL__ */ |
125 | #endif /* _ASM_ARM_FUTEX_H */ | 168 | #endif /* _ASM_ARM_FUTEX_H */ |
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index a8ff22b2a391..312d10877bd7 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -128,6 +128,12 @@ struct pt_regs { | |||
128 | #define ARM_r0 uregs[0] | 128 | #define ARM_r0 uregs[0] |
129 | #define ARM_ORIG_r0 uregs[17] | 129 | #define ARM_ORIG_r0 uregs[17] |
130 | 130 | ||
131 | /* | ||
132 | * The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS | ||
133 | * and core dumps. | ||
134 | */ | ||
135 | #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) | ||
136 | |||
131 | #ifdef __KERNEL__ | 137 | #ifdef __KERNEL__ |
132 | 138 | ||
133 | #define user_mode(regs) \ | 139 | #define user_mode(regs) \ |
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h index fdd3820edff8..65fa3c88095c 100644 --- a/arch/arm/include/asm/spinlock.h +++ b/arch/arm/include/asm/spinlock.h | |||
@@ -5,6 +5,8 @@ | |||
5 | #error SMP not supported on pre-ARMv6 CPUs | 5 | #error SMP not supported on pre-ARMv6 CPUs |
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | #include <asm/processor.h> | ||
9 | |||
8 | /* | 10 | /* |
9 | * sev and wfe are ARMv6K extensions. Uniprocessor ARMv6 may not have the K | 11 | * sev and wfe are ARMv6K extensions. Uniprocessor ARMv6 may not have the K |
10 | * extensions, so when running on UP, we have to patch these instructions away. | 12 | * extensions, so when running on UP, we have to patch these instructions away. |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 139e3c827369..d53c0abc4dd3 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -560,11 +560,6 @@ static int armpmu_event_init(struct perf_event *event) | |||
560 | event->destroy = hw_perf_event_destroy; | 560 | event->destroy = hw_perf_event_destroy; |
561 | 561 | ||
562 | if (!atomic_inc_not_zero(&active_events)) { | 562 | if (!atomic_inc_not_zero(&active_events)) { |
563 | if (atomic_read(&active_events) > armpmu->num_events) { | ||
564 | atomic_dec(&active_events); | ||
565 | return -ENOSPC; | ||
566 | } | ||
567 | |||
568 | mutex_lock(&pmu_reserve_mutex); | 563 | mutex_lock(&pmu_reserve_mutex); |
569 | if (atomic_read(&active_events) == 0) { | 564 | if (atomic_read(&active_events) == 0) { |
570 | err = armpmu_reserve_hardware(); | 565 | err = armpmu_reserve_hardware(); |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 8182f45ca493..97260060bf26 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
22 | #include <linux/perf_event.h> | 22 | #include <linux/perf_event.h> |
23 | #include <linux/hw_breakpoint.h> | 23 | #include <linux/hw_breakpoint.h> |
24 | #include <linux/regset.h> | ||
24 | 25 | ||
25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
@@ -308,58 +309,6 @@ static int ptrace_write_user(struct task_struct *tsk, unsigned long off, | |||
308 | return put_user_reg(tsk, off >> 2, val); | 309 | return put_user_reg(tsk, off >> 2, val); |
309 | } | 310 | } |
310 | 311 | ||
311 | /* | ||
312 | * Get all user integer registers. | ||
313 | */ | ||
314 | static int ptrace_getregs(struct task_struct *tsk, void __user *uregs) | ||
315 | { | ||
316 | struct pt_regs *regs = task_pt_regs(tsk); | ||
317 | |||
318 | return copy_to_user(uregs, regs, sizeof(struct pt_regs)) ? -EFAULT : 0; | ||
319 | } | ||
320 | |||
321 | /* | ||
322 | * Set all user integer registers. | ||
323 | */ | ||
324 | static int ptrace_setregs(struct task_struct *tsk, void __user *uregs) | ||
325 | { | ||
326 | struct pt_regs newregs; | ||
327 | int ret; | ||
328 | |||
329 | ret = -EFAULT; | ||
330 | if (copy_from_user(&newregs, uregs, sizeof(struct pt_regs)) == 0) { | ||
331 | struct pt_regs *regs = task_pt_regs(tsk); | ||
332 | |||
333 | ret = -EINVAL; | ||
334 | if (valid_user_regs(&newregs)) { | ||
335 | *regs = newregs; | ||
336 | ret = 0; | ||
337 | } | ||
338 | } | ||
339 | |||
340 | return ret; | ||
341 | } | ||
342 | |||
343 | /* | ||
344 | * Get the child FPU state. | ||
345 | */ | ||
346 | static int ptrace_getfpregs(struct task_struct *tsk, void __user *ufp) | ||
347 | { | ||
348 | return copy_to_user(ufp, &task_thread_info(tsk)->fpstate, | ||
349 | sizeof(struct user_fp)) ? -EFAULT : 0; | ||
350 | } | ||
351 | |||
352 | /* | ||
353 | * Set the child FPU state. | ||
354 | */ | ||
355 | static int ptrace_setfpregs(struct task_struct *tsk, void __user *ufp) | ||
356 | { | ||
357 | struct thread_info *thread = task_thread_info(tsk); | ||
358 | thread->used_cp[1] = thread->used_cp[2] = 1; | ||
359 | return copy_from_user(&thread->fpstate, ufp, | ||
360 | sizeof(struct user_fp)) ? -EFAULT : 0; | ||
361 | } | ||
362 | |||
363 | #ifdef CONFIG_IWMMXT | 312 | #ifdef CONFIG_IWMMXT |
364 | 313 | ||
365 | /* | 314 | /* |
@@ -418,56 +367,6 @@ static int ptrace_setcrunchregs(struct task_struct *tsk, void __user *ufp) | |||
418 | } | 367 | } |
419 | #endif | 368 | #endif |
420 | 369 | ||
421 | #ifdef CONFIG_VFP | ||
422 | /* | ||
423 | * Get the child VFP state. | ||
424 | */ | ||
425 | static int ptrace_getvfpregs(struct task_struct *tsk, void __user *data) | ||
426 | { | ||
427 | struct thread_info *thread = task_thread_info(tsk); | ||
428 | union vfp_state *vfp = &thread->vfpstate; | ||
429 | struct user_vfp __user *ufp = data; | ||
430 | |||
431 | vfp_sync_hwstate(thread); | ||
432 | |||
433 | /* copy the floating point registers */ | ||
434 | if (copy_to_user(&ufp->fpregs, &vfp->hard.fpregs, | ||
435 | sizeof(vfp->hard.fpregs))) | ||
436 | return -EFAULT; | ||
437 | |||
438 | /* copy the status and control register */ | ||
439 | if (put_user(vfp->hard.fpscr, &ufp->fpscr)) | ||
440 | return -EFAULT; | ||
441 | |||
442 | return 0; | ||
443 | } | ||
444 | |||
445 | /* | ||
446 | * Set the child VFP state. | ||
447 | */ | ||
448 | static int ptrace_setvfpregs(struct task_struct *tsk, void __user *data) | ||
449 | { | ||
450 | struct thread_info *thread = task_thread_info(tsk); | ||
451 | union vfp_state *vfp = &thread->vfpstate; | ||
452 | struct user_vfp __user *ufp = data; | ||
453 | |||
454 | vfp_sync_hwstate(thread); | ||
455 | |||
456 | /* copy the floating point registers */ | ||
457 | if (copy_from_user(&vfp->hard.fpregs, &ufp->fpregs, | ||
458 | sizeof(vfp->hard.fpregs))) | ||
459 | return -EFAULT; | ||
460 | |||
461 | /* copy the status and control register */ | ||
462 | if (get_user(vfp->hard.fpscr, &ufp->fpscr)) | ||
463 | return -EFAULT; | ||
464 | |||
465 | vfp_flush_hwstate(thread); | ||
466 | |||
467 | return 0; | ||
468 | } | ||
469 | #endif | ||
470 | |||
471 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 370 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
472 | /* | 371 | /* |
473 | * Convert a virtual register number into an index for a thread_info | 372 | * Convert a virtual register number into an index for a thread_info |
@@ -694,6 +593,219 @@ out: | |||
694 | } | 593 | } |
695 | #endif | 594 | #endif |
696 | 595 | ||
596 | /* regset get/set implementations */ | ||
597 | |||
598 | static int gpr_get(struct task_struct *target, | ||
599 | const struct user_regset *regset, | ||
600 | unsigned int pos, unsigned int count, | ||
601 | void *kbuf, void __user *ubuf) | ||
602 | { | ||
603 | struct pt_regs *regs = task_pt_regs(target); | ||
604 | |||
605 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, | ||
606 | regs, | ||
607 | 0, sizeof(*regs)); | ||
608 | } | ||
609 | |||
610 | static int gpr_set(struct task_struct *target, | ||
611 | const struct user_regset *regset, | ||
612 | unsigned int pos, unsigned int count, | ||
613 | const void *kbuf, const void __user *ubuf) | ||
614 | { | ||
615 | int ret; | ||
616 | struct pt_regs newregs; | ||
617 | |||
618 | ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, | ||
619 | &newregs, | ||
620 | 0, sizeof(newregs)); | ||
621 | if (ret) | ||
622 | return ret; | ||
623 | |||
624 | if (!valid_user_regs(&newregs)) | ||
625 | return -EINVAL; | ||
626 | |||
627 | *task_pt_regs(target) = newregs; | ||
628 | return 0; | ||
629 | } | ||
630 | |||
631 | static int fpa_get(struct task_struct *target, | ||
632 | const struct user_regset *regset, | ||
633 | unsigned int pos, unsigned int count, | ||
634 | void *kbuf, void __user *ubuf) | ||
635 | { | ||
636 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, | ||
637 | &task_thread_info(target)->fpstate, | ||
638 | 0, sizeof(struct user_fp)); | ||
639 | } | ||
640 | |||
641 | static int fpa_set(struct task_struct *target, | ||
642 | const struct user_regset *regset, | ||
643 | unsigned int pos, unsigned int count, | ||
644 | const void *kbuf, const void __user *ubuf) | ||
645 | { | ||
646 | struct thread_info *thread = task_thread_info(target); | ||
647 | |||
648 | thread->used_cp[1] = thread->used_cp[2] = 1; | ||
649 | |||
650 | return user_regset_copyin(&pos, &count, &kbuf, &ubuf, | ||
651 | &thread->fpstate, | ||
652 | 0, sizeof(struct user_fp)); | ||
653 | } | ||
654 | |||
655 | #ifdef CONFIG_VFP | ||
656 | /* | ||
657 | * VFP register get/set implementations. | ||
658 | * | ||
659 | * With respect to the kernel, struct user_fp is divided into three chunks: | ||
660 | * 16 or 32 real VFP registers (d0-d15 or d0-31) | ||
661 | * These are transferred to/from the real registers in the task's | ||
662 | * vfp_hard_struct. The number of registers depends on the kernel | ||
663 | * configuration. | ||
664 | * | ||
665 | * 16 or 0 fake VFP registers (d16-d31 or empty) | ||
666 | * i.e., the user_vfp structure has space for 32 registers even if | ||
667 | * the kernel doesn't have them all. | ||
668 | * | ||
669 | * vfp_get() reads this chunk as zero where applicable | ||
670 | * vfp_set() ignores this chunk | ||
671 | * | ||
672 | * 1 word for the FPSCR | ||
673 | * | ||
674 | * The bounds-checking logic built into user_regset_copyout and friends | ||
675 | * means that we can make a simple sequence of calls to map the relevant data | ||
676 | * to/from the specified slice of the user regset structure. | ||
677 | */ | ||
678 | static int vfp_get(struct task_struct *target, | ||
679 | const struct user_regset *regset, | ||
680 | unsigned int pos, unsigned int count, | ||
681 | void *kbuf, void __user *ubuf) | ||
682 | { | ||
683 | int ret; | ||
684 | struct thread_info *thread = task_thread_info(target); | ||
685 | struct vfp_hard_struct const *vfp = &thread->vfpstate.hard; | ||
686 | const size_t user_fpregs_offset = offsetof(struct user_vfp, fpregs); | ||
687 | const size_t user_fpscr_offset = offsetof(struct user_vfp, fpscr); | ||
688 | |||
689 | vfp_sync_hwstate(thread); | ||
690 | |||
691 | ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, | ||
692 | &vfp->fpregs, | ||
693 | user_fpregs_offset, | ||
694 | user_fpregs_offset + sizeof(vfp->fpregs)); | ||
695 | if (ret) | ||
696 | return ret; | ||
697 | |||
698 | ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, | ||
699 | user_fpregs_offset + sizeof(vfp->fpregs), | ||
700 | user_fpscr_offset); | ||
701 | if (ret) | ||
702 | return ret; | ||
703 | |||
704 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, | ||
705 | &vfp->fpscr, | ||
706 | user_fpscr_offset, | ||
707 | user_fpscr_offset + sizeof(vfp->fpscr)); | ||
708 | } | ||
709 | |||
710 | /* | ||
711 | * For vfp_set() a read-modify-write is done on the VFP registers, | ||
712 | * in order to avoid writing back a half-modified set of registers on | ||
713 | * failure. | ||
714 | */ | ||
715 | static int vfp_set(struct task_struct *target, | ||
716 | const struct user_regset *regset, | ||
717 | unsigned int pos, unsigned int count, | ||
718 | const void *kbuf, const void __user *ubuf) | ||
719 | { | ||
720 | int ret; | ||
721 | struct thread_info *thread = task_thread_info(target); | ||
722 | struct vfp_hard_struct new_vfp = thread->vfpstate.hard; | ||
723 | const size_t user_fpregs_offset = offsetof(struct user_vfp, fpregs); | ||
724 | const size_t user_fpscr_offset = offsetof(struct user_vfp, fpscr); | ||
725 | |||
726 | ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, | ||
727 | &new_vfp.fpregs, | ||
728 | user_fpregs_offset, | ||
729 | user_fpregs_offset + sizeof(new_vfp.fpregs)); | ||
730 | if (ret) | ||
731 | return ret; | ||
732 | |||
733 | ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, | ||
734 | user_fpregs_offset + sizeof(new_vfp.fpregs), | ||
735 | user_fpscr_offset); | ||
736 | if (ret) | ||
737 | return ret; | ||
738 | |||
739 | ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, | ||
740 | &new_vfp.fpscr, | ||
741 | user_fpscr_offset, | ||
742 | user_fpscr_offset + sizeof(new_vfp.fpscr)); | ||
743 | if (ret) | ||
744 | return ret; | ||
745 | |||
746 | vfp_sync_hwstate(thread); | ||
747 | thread->vfpstate.hard = new_vfp; | ||
748 | vfp_flush_hwstate(thread); | ||
749 | |||
750 | return 0; | ||
751 | } | ||
752 | #endif /* CONFIG_VFP */ | ||
753 | |||
754 | enum arm_regset { | ||
755 | REGSET_GPR, | ||
756 | REGSET_FPR, | ||
757 | #ifdef CONFIG_VFP | ||
758 | REGSET_VFP, | ||
759 | #endif | ||
760 | }; | ||
761 | |||
762 | static const struct user_regset arm_regsets[] = { | ||
763 | [REGSET_GPR] = { | ||
764 | .core_note_type = NT_PRSTATUS, | ||
765 | .n = ELF_NGREG, | ||
766 | .size = sizeof(u32), | ||
767 | .align = sizeof(u32), | ||
768 | .get = gpr_get, | ||
769 | .set = gpr_set | ||
770 | }, | ||
771 | [REGSET_FPR] = { | ||
772 | /* | ||
773 | * For the FPA regs in fpstate, the real fields are a mixture | ||
774 | * of sizes, so pretend that the registers are word-sized: | ||
775 | */ | ||
776 | .core_note_type = NT_PRFPREG, | ||
777 | .n = sizeof(struct user_fp) / sizeof(u32), | ||
778 | .size = sizeof(u32), | ||
779 | .align = sizeof(u32), | ||
780 | .get = fpa_get, | ||
781 | .set = fpa_set | ||
782 | }, | ||
783 | #ifdef CONFIG_VFP | ||
784 | [REGSET_VFP] = { | ||
785 | /* | ||
786 | * Pretend that the VFP regs are word-sized, since the FPSCR is | ||
787 | * a single word dangling at the end of struct user_vfp: | ||
788 | */ | ||
789 | .core_note_type = NT_ARM_VFP, | ||
790 | .n = ARM_VFPREGS_SIZE / sizeof(u32), | ||
791 | .size = sizeof(u32), | ||
792 | .align = sizeof(u32), | ||
793 | .get = vfp_get, | ||
794 | .set = vfp_set | ||
795 | }, | ||
796 | #endif /* CONFIG_VFP */ | ||
797 | }; | ||
798 | |||
799 | static const struct user_regset_view user_arm_view = { | ||
800 | .name = "arm", .e_machine = ELF_ARCH, .ei_osabi = ELF_OSABI, | ||
801 | .regsets = arm_regsets, .n = ARRAY_SIZE(arm_regsets) | ||
802 | }; | ||
803 | |||
804 | const struct user_regset_view *task_user_regset_view(struct task_struct *task) | ||
805 | { | ||
806 | return &user_arm_view; | ||
807 | } | ||
808 | |||
697 | long arch_ptrace(struct task_struct *child, long request, | 809 | long arch_ptrace(struct task_struct *child, long request, |
698 | unsigned long addr, unsigned long data) | 810 | unsigned long addr, unsigned long data) |
699 | { | 811 | { |
@@ -710,19 +822,31 @@ long arch_ptrace(struct task_struct *child, long request, | |||
710 | break; | 822 | break; |
711 | 823 | ||
712 | case PTRACE_GETREGS: | 824 | case PTRACE_GETREGS: |
713 | ret = ptrace_getregs(child, datap); | 825 | ret = copy_regset_to_user(child, |
826 | &user_arm_view, REGSET_GPR, | ||
827 | 0, sizeof(struct pt_regs), | ||
828 | datap); | ||
714 | break; | 829 | break; |
715 | 830 | ||
716 | case PTRACE_SETREGS: | 831 | case PTRACE_SETREGS: |
717 | ret = ptrace_setregs(child, datap); | 832 | ret = copy_regset_from_user(child, |
833 | &user_arm_view, REGSET_GPR, | ||
834 | 0, sizeof(struct pt_regs), | ||
835 | datap); | ||
718 | break; | 836 | break; |
719 | 837 | ||
720 | case PTRACE_GETFPREGS: | 838 | case PTRACE_GETFPREGS: |
721 | ret = ptrace_getfpregs(child, datap); | 839 | ret = copy_regset_to_user(child, |
840 | &user_arm_view, REGSET_FPR, | ||
841 | 0, sizeof(union fp_state), | ||
842 | datap); | ||
722 | break; | 843 | break; |
723 | 844 | ||
724 | case PTRACE_SETFPREGS: | 845 | case PTRACE_SETFPREGS: |
725 | ret = ptrace_setfpregs(child, datap); | 846 | ret = copy_regset_from_user(child, |
847 | &user_arm_view, REGSET_FPR, | ||
848 | 0, sizeof(union fp_state), | ||
849 | datap); | ||
726 | break; | 850 | break; |
727 | 851 | ||
728 | #ifdef CONFIG_IWMMXT | 852 | #ifdef CONFIG_IWMMXT |
@@ -757,11 +881,17 @@ long arch_ptrace(struct task_struct *child, long request, | |||
757 | 881 | ||
758 | #ifdef CONFIG_VFP | 882 | #ifdef CONFIG_VFP |
759 | case PTRACE_GETVFPREGS: | 883 | case PTRACE_GETVFPREGS: |
760 | ret = ptrace_getvfpregs(child, datap); | 884 | ret = copy_regset_to_user(child, |
885 | &user_arm_view, REGSET_VFP, | ||
886 | 0, ARM_VFPREGS_SIZE, | ||
887 | datap); | ||
761 | break; | 888 | break; |
762 | 889 | ||
763 | case PTRACE_SETVFPREGS: | 890 | case PTRACE_SETVFPREGS: |
764 | ret = ptrace_setvfpregs(child, datap); | 891 | ret = copy_regset_from_user(child, |
892 | &user_arm_view, REGSET_VFP, | ||
893 | 0, ARM_VFPREGS_SIZE, | ||
894 | datap); | ||
765 | break; | 895 | break; |
766 | #endif | 896 | #endif |
767 | 897 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 006c1e884eaf..6dce209a623b 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -672,11 +672,16 @@ __tagtable(ATAG_REVISION, parse_tag_revision); | |||
672 | 672 | ||
673 | static int __init parse_tag_cmdline(const struct tag *tag) | 673 | static int __init parse_tag_cmdline(const struct tag *tag) |
674 | { | 674 | { |
675 | #ifndef CONFIG_CMDLINE_FORCE | 675 | #if defined(CONFIG_CMDLINE_EXTEND) |
676 | strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE); | 676 | strlcat(default_command_line, " ", COMMAND_LINE_SIZE); |
677 | #else | 677 | strlcat(default_command_line, tag->u.cmdline.cmdline, |
678 | COMMAND_LINE_SIZE); | ||
679 | #elif defined(CONFIG_CMDLINE_FORCE) | ||
678 | pr_warning("Ignoring tag cmdline (using the default kernel command line)\n"); | 680 | pr_warning("Ignoring tag cmdline (using the default kernel command line)\n"); |
679 | #endif /* CONFIG_CMDLINE_FORCE */ | 681 | #else |
682 | strlcpy(default_command_line, tag->u.cmdline.cmdline, | ||
683 | COMMAND_LINE_SIZE); | ||
684 | #endif | ||
680 | return 0; | 685 | return 0; |
681 | } | 686 | } |
682 | 687 | ||
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index a5a9ff70b198..415dce37b88c 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
@@ -356,29 +356,6 @@ static int ep93xx_gpio_set_debounce(struct gpio_chip *chip, | |||
356 | return 0; | 356 | return 0; |
357 | } | 357 | } |
358 | 358 | ||
359 | static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | ||
360 | { | ||
361 | struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip); | ||
362 | u8 data_reg, data_dir_reg; | ||
363 | int gpio, i; | ||
364 | |||
365 | data_reg = __raw_readb(ep93xx_chip->data_reg); | ||
366 | data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg); | ||
367 | |||
368 | gpio = ep93xx_chip->chip.base; | ||
369 | for (i = 0; i < chip->ngpio; i++, gpio++) { | ||
370 | int is_out = data_dir_reg & (1 << i); | ||
371 | int irq = gpio_to_irq(gpio); | ||
372 | |||
373 | seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n", | ||
374 | chip->label, i, gpio, | ||
375 | gpiochip_is_requested(chip, i) ? : "", | ||
376 | is_out ? "out" : "in ", | ||
377 | (data_reg & (1<< i)) ? "hi" : "lo", | ||
378 | (!is_out && irq>= 0) ? "(interrupt)" : ""); | ||
379 | } | ||
380 | } | ||
381 | |||
382 | #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio) \ | 359 | #define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio) \ |
383 | { \ | 360 | { \ |
384 | .chip = { \ | 361 | .chip = { \ |
@@ -387,7 +364,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
387 | .direction_output = ep93xx_gpio_direction_output, \ | 364 | .direction_output = ep93xx_gpio_direction_output, \ |
388 | .get = ep93xx_gpio_get, \ | 365 | .get = ep93xx_gpio_get, \ |
389 | .set = ep93xx_gpio_set, \ | 366 | .set = ep93xx_gpio_set, \ |
390 | .dbg_show = ep93xx_gpio_dbg_show, \ | ||
391 | .base = base_gpio, \ | 367 | .base = base_gpio, \ |
392 | .ngpio = 8, \ | 368 | .ngpio = 8, \ |
393 | }, \ | 369 | }, \ |
diff --git a/arch/arm/mach-ns9xxx/Kconfig b/arch/arm/mach-ns9xxx/Kconfig deleted file mode 100644 index dd0cd5ac4b8b..000000000000 --- a/arch/arm/mach-ns9xxx/Kconfig +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | if ARCH_NS9XXX | ||
2 | |||
3 | menu "NS9xxx Implementations" | ||
4 | |||
5 | config NS9XXX_HAVE_SERIAL8250 | ||
6 | bool | ||
7 | |||
8 | config PROCESSOR_NS9360 | ||
9 | bool | ||
10 | |||
11 | config MODULE_CC9P9360 | ||
12 | bool | ||
13 | select PROCESSOR_NS9360 | ||
14 | |||
15 | config BOARD_A9M9750DEV | ||
16 | select NS9XXX_HAVE_SERIAL8250 | ||
17 | bool | ||
18 | |||
19 | config BOARD_JSCC9P9360 | ||
20 | bool | ||
21 | |||
22 | config MACH_CC9P9360DEV | ||
23 | bool "ConnectCore 9P 9360 on an A9M9750 Devboard" | ||
24 | select MODULE_CC9P9360 | ||
25 | select BOARD_A9M9750DEV | ||
26 | help | ||
27 | Say Y here if you are using the Digi ConnectCore 9P 9360 | ||
28 | on an A9M9750 Development Board. | ||
29 | |||
30 | config MACH_CC9P9360JS | ||
31 | bool "ConnectCore 9P 9360 on a JSCC9P9360 Devboard" | ||
32 | select MODULE_CC9P9360 | ||
33 | select BOARD_JSCC9P9360 | ||
34 | help | ||
35 | Say Y here if you are using the Digi ConnectCore 9P 9360 | ||
36 | on an JSCC9P9360 Development Board. | ||
37 | |||
38 | endmenu | ||
39 | |||
40 | endif | ||
diff --git a/arch/arm/mach-ns9xxx/Makefile b/arch/arm/mach-ns9xxx/Makefile deleted file mode 100644 index 41efaf9ad50b..000000000000 --- a/arch/arm/mach-ns9xxx/Makefile +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | obj-y := clock.o generic.o gpio.o irq.o | ||
2 | |||
3 | obj-$(CONFIG_MACH_CC9P9360DEV) += mach-cc9p9360dev.o | ||
4 | obj-$(CONFIG_MACH_CC9P9360JS) += mach-cc9p9360js.o | ||
5 | |||
6 | obj-$(CONFIG_PROCESSOR_NS9360) += gpio-ns9360.o processor-ns9360.o time-ns9360.o | ||
7 | |||
8 | obj-$(CONFIG_BOARD_A9M9750DEV) += board-a9m9750dev.o | ||
9 | obj-$(CONFIG_BOARD_JSCC9P9360) += board-jscc9p9360.o | ||
10 | |||
11 | # platform devices | ||
12 | obj-$(CONFIG_NS9XXX_HAVE_SERIAL8250) += plat-serial8250.o | ||
diff --git a/arch/arm/mach-ns9xxx/Makefile.boot b/arch/arm/mach-ns9xxx/Makefile.boot deleted file mode 100644 index 54654919229b..000000000000 --- a/arch/arm/mach-ns9xxx/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-y := 0x8000 | ||
2 | params_phys-y := 0x100 | ||
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/arch/arm/mach-ns9xxx/board-a9m9750dev.c deleted file mode 100644 index e27687d53504..000000000000 --- a/arch/arm/mach-ns9xxx/board-a9m9750dev.c +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/board-a9m9750dev.c | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/irq.h> | ||
12 | |||
13 | #include <asm/mach/map.h> | ||
14 | #include <asm/gpio.h> | ||
15 | |||
16 | #include <mach/board.h> | ||
17 | #include <mach/processor-ns9360.h> | ||
18 | #include <mach/regs-sys-ns9360.h> | ||
19 | #include <mach/regs-mem.h> | ||
20 | #include <mach/regs-bbu.h> | ||
21 | #include <mach/regs-board-a9m9750dev.h> | ||
22 | |||
23 | #include "board-a9m9750dev.h" | ||
24 | |||
25 | static struct map_desc board_a9m9750dev_io_desc[] __initdata = { | ||
26 | { /* FPGA on CS0 */ | ||
27 | .virtual = io_p2v(NS9XXX_CSxSTAT_PHYS(0)), | ||
28 | .pfn = __phys_to_pfn(NS9XXX_CSxSTAT_PHYS(0)), | ||
29 | .length = NS9XXX_CS0STAT_LENGTH, | ||
30 | .type = MT_DEVICE, | ||
31 | }, | ||
32 | }; | ||
33 | |||
34 | void __init board_a9m9750dev_map_io(void) | ||
35 | { | ||
36 | iotable_init(board_a9m9750dev_io_desc, | ||
37 | ARRAY_SIZE(board_a9m9750dev_io_desc)); | ||
38 | } | ||
39 | |||
40 | static void a9m9750dev_fpga_ack_irq(struct irq_data *d) | ||
41 | { | ||
42 | /* nothing */ | ||
43 | } | ||
44 | |||
45 | static void a9m9750dev_fpga_mask_irq(struct irq_data *d) | ||
46 | { | ||
47 | u8 ier; | ||
48 | |||
49 | ier = __raw_readb(FPGA_IER); | ||
50 | |||
51 | ier &= ~(1 << (d->irq - FPGA_IRQ(0))); | ||
52 | |||
53 | __raw_writeb(ier, FPGA_IER); | ||
54 | } | ||
55 | |||
56 | static void a9m9750dev_fpga_maskack_irq(struct irq_data *d) | ||
57 | { | ||
58 | a9m9750dev_fpga_mask_irq(d); | ||
59 | a9m9750dev_fpga_ack_irq(d); | ||
60 | } | ||
61 | |||
62 | static void a9m9750dev_fpga_unmask_irq(struct irq_data *d) | ||
63 | { | ||
64 | u8 ier; | ||
65 | |||
66 | ier = __raw_readb(FPGA_IER); | ||
67 | |||
68 | ier |= 1 << (d->irq - FPGA_IRQ(0)); | ||
69 | |||
70 | __raw_writeb(ier, FPGA_IER); | ||
71 | } | ||
72 | |||
73 | static struct irq_chip a9m9750dev_fpga_chip = { | ||
74 | .irq_ack = a9m9750dev_fpga_ack_irq, | ||
75 | .irq_mask = a9m9750dev_fpga_mask_irq, | ||
76 | .irq_mask_ack = a9m9750dev_fpga_maskack_irq, | ||
77 | .irq_unmask = a9m9750dev_fpga_unmask_irq, | ||
78 | }; | ||
79 | |||
80 | static void a9m9750dev_fpga_demux_handler(unsigned int irq, | ||
81 | struct irq_desc *desc) | ||
82 | { | ||
83 | u8 stat = __raw_readb(FPGA_ISR); | ||
84 | |||
85 | desc->irq_data.chip->irq_mask_ack(&desc->irq_data); | ||
86 | |||
87 | while (stat != 0) { | ||
88 | int irqno = fls(stat) - 1; | ||
89 | |||
90 | stat &= ~(1 << irqno); | ||
91 | |||
92 | generic_handle_irq(FPGA_IRQ(irqno)); | ||
93 | } | ||
94 | |||
95 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
96 | } | ||
97 | |||
98 | void __init board_a9m9750dev_init_irq(void) | ||
99 | { | ||
100 | u32 eic; | ||
101 | int i; | ||
102 | |||
103 | if (gpio_request(11, "board a9m9750dev extirq2") == 0) | ||
104 | ns9360_gpio_configure(11, 0, 1); | ||
105 | else | ||
106 | printk(KERN_ERR "%s: cannot get gpio 11 for IRQ_NS9XXX_EXT2\n", | ||
107 | __func__); | ||
108 | |||
109 | for (i = FPGA_IRQ(0); i <= FPGA_IRQ(7); ++i) { | ||
110 | irq_set_chip_and_handler(i, &a9m9750dev_fpga_chip, | ||
111 | handle_level_irq); | ||
112 | set_irq_flags(i, IRQF_VALID); | ||
113 | } | ||
114 | |||
115 | /* IRQ_NS9XXX_EXT2: level sensitive + active low */ | ||
116 | eic = __raw_readl(SYS_EIC(2)); | ||
117 | REGSET(eic, SYS_EIC, PLTY, AL); | ||
118 | REGSET(eic, SYS_EIC, LVEDG, LEVEL); | ||
119 | __raw_writel(eic, SYS_EIC(2)); | ||
120 | |||
121 | irq_set_chained_handler(IRQ_NS9XXX_EXT2, | ||
122 | a9m9750dev_fpga_demux_handler); | ||
123 | } | ||
124 | |||
125 | void __init board_a9m9750dev_init_machine(void) | ||
126 | { | ||
127 | u32 reg; | ||
128 | |||
129 | /* setup static CS0: memory base ... */ | ||
130 | reg = __raw_readl(SYS_SMCSSMB(0)); | ||
131 | REGSETIM(reg, SYS_SMCSSMB, CSxB, NS9XXX_CSxSTAT_PHYS(0) >> 12); | ||
132 | __raw_writel(reg, SYS_SMCSSMB(0)); | ||
133 | |||
134 | /* ... and mask */ | ||
135 | reg = __raw_readl(SYS_SMCSSMM(0)); | ||
136 | REGSETIM(reg, SYS_SMCSSMM, CSxM, 0xfffff); | ||
137 | REGSET(reg, SYS_SMCSSMM, CSEx, EN); | ||
138 | __raw_writel(reg, SYS_SMCSSMM(0)); | ||
139 | |||
140 | /* setup static CS0: memory configuration */ | ||
141 | reg = __raw_readl(MEM_SMC(0)); | ||
142 | REGSET(reg, MEM_SMC, PSMC, OFF); | ||
143 | REGSET(reg, MEM_SMC, BSMC, OFF); | ||
144 | REGSET(reg, MEM_SMC, EW, OFF); | ||
145 | REGSET(reg, MEM_SMC, PB, 1); | ||
146 | REGSET(reg, MEM_SMC, PC, AL); | ||
147 | REGSET(reg, MEM_SMC, PM, DIS); | ||
148 | REGSET(reg, MEM_SMC, MW, 8); | ||
149 | __raw_writel(reg, MEM_SMC(0)); | ||
150 | |||
151 | /* setup static CS0: timing */ | ||
152 | __raw_writel(0x2, MEM_SMWED(0)); | ||
153 | __raw_writel(0x2, MEM_SMOED(0)); | ||
154 | __raw_writel(0x6, MEM_SMRD(0)); | ||
155 | __raw_writel(0x6, MEM_SMWD(0)); | ||
156 | } | ||
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.h b/arch/arm/mach-ns9xxx/board-a9m9750dev.h deleted file mode 100644 index edc75abbc5dd..000000000000 --- a/arch/arm/mach-ns9xxx/board-a9m9750dev.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/board-a9m9750dev.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/init.h> | ||
12 | |||
13 | void __init board_a9m9750dev_map_io(void); | ||
14 | void __init board_a9m9750dev_init_machine(void); | ||
15 | void __init board_a9m9750dev_init_irq(void); | ||
diff --git a/arch/arm/mach-ns9xxx/board-jscc9p9360.c b/arch/arm/mach-ns9xxx/board-jscc9p9360.c deleted file mode 100644 index 4bd3eec04bfe..000000000000 --- a/arch/arm/mach-ns9xxx/board-jscc9p9360.c +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/board-jscc9p9360.c | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include "board-jscc9p9360.h" | ||
12 | |||
13 | void __init board_jscc9p9360_init_machine(void) | ||
14 | { | ||
15 | /* TODO: reserve GPIOs for push buttons, etc pp */ | ||
16 | } | ||
17 | |||
diff --git a/arch/arm/mach-ns9xxx/board-jscc9p9360.h b/arch/arm/mach-ns9xxx/board-jscc9p9360.h deleted file mode 100644 index 1a81a074df45..000000000000 --- a/arch/arm/mach-ns9xxx/board-jscc9p9360.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/board-jscc9p9360.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/init.h> | ||
12 | |||
13 | void __init board_jscc9p9360_init_machine(void); | ||
diff --git a/arch/arm/mach-ns9xxx/clock.c b/arch/arm/mach-ns9xxx/clock.c deleted file mode 100644 index cf81cbc57544..000000000000 --- a/arch/arm/mach-ns9xxx/clock.c +++ /dev/null | |||
@@ -1,215 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/clock.c | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/err.h> | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/list.h> | ||
14 | #include <linux/clk.h> | ||
15 | #include <linux/string.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/semaphore.h> | ||
18 | |||
19 | #include "clock.h" | ||
20 | |||
21 | static LIST_HEAD(clocks); | ||
22 | static DEFINE_SPINLOCK(clk_lock); | ||
23 | |||
24 | struct clk *clk_get(struct device *dev, const char *id) | ||
25 | { | ||
26 | struct clk *p, *ret = NULL, *retgen = NULL; | ||
27 | unsigned long flags; | ||
28 | int idno; | ||
29 | |||
30 | if (dev == NULL || dev->bus != &platform_bus_type) | ||
31 | idno = -1; | ||
32 | else | ||
33 | idno = to_platform_device(dev)->id; | ||
34 | |||
35 | spin_lock_irqsave(&clk_lock, flags); | ||
36 | list_for_each_entry(p, &clocks, node) { | ||
37 | if (strcmp(id, p->name) == 0) { | ||
38 | if (p->id == idno) { | ||
39 | if (!try_module_get(p->owner)) | ||
40 | continue; | ||
41 | ret = p; | ||
42 | break; | ||
43 | } else if (p->id == -1) | ||
44 | /* remember match with id == -1 in case there is | ||
45 | * no clock for idno */ | ||
46 | retgen = p; | ||
47 | } | ||
48 | } | ||
49 | |||
50 | if (!ret && retgen && try_module_get(retgen->owner)) | ||
51 | ret = retgen; | ||
52 | |||
53 | if (ret) | ||
54 | ++ret->refcount; | ||
55 | |||
56 | spin_unlock_irqrestore(&clk_lock, flags); | ||
57 | |||
58 | return ret ? ret : ERR_PTR(-ENOENT); | ||
59 | } | ||
60 | EXPORT_SYMBOL(clk_get); | ||
61 | |||
62 | void clk_put(struct clk *clk) | ||
63 | { | ||
64 | module_put(clk->owner); | ||
65 | --clk->refcount; | ||
66 | } | ||
67 | EXPORT_SYMBOL(clk_put); | ||
68 | |||
69 | static int clk_enable_unlocked(struct clk *clk) | ||
70 | { | ||
71 | int ret = 0; | ||
72 | if (clk->parent) { | ||
73 | ret = clk_enable_unlocked(clk->parent); | ||
74 | if (ret) | ||
75 | return ret; | ||
76 | } | ||
77 | |||
78 | if (clk->usage++ == 0 && clk->endisable) | ||
79 | ret = clk->endisable(clk, 1); | ||
80 | |||
81 | return ret; | ||
82 | } | ||
83 | |||
84 | int clk_enable(struct clk *clk) | ||
85 | { | ||
86 | int ret; | ||
87 | unsigned long flags; | ||
88 | |||
89 | spin_lock_irqsave(&clk_lock, flags); | ||
90 | |||
91 | ret = clk_enable_unlocked(clk); | ||
92 | |||
93 | spin_unlock_irqrestore(&clk_lock, flags); | ||
94 | |||
95 | return ret; | ||
96 | } | ||
97 | EXPORT_SYMBOL(clk_enable); | ||
98 | |||
99 | static void clk_disable_unlocked(struct clk *clk) | ||
100 | { | ||
101 | if (--clk->usage == 0 && clk->endisable) | ||
102 | clk->endisable(clk, 0); | ||
103 | |||
104 | if (clk->parent) | ||
105 | clk_disable_unlocked(clk->parent); | ||
106 | } | ||
107 | |||
108 | void clk_disable(struct clk *clk) | ||
109 | { | ||
110 | unsigned long flags; | ||
111 | |||
112 | spin_lock_irqsave(&clk_lock, flags); | ||
113 | |||
114 | clk_disable_unlocked(clk); | ||
115 | |||
116 | spin_unlock_irqrestore(&clk_lock, flags); | ||
117 | } | ||
118 | EXPORT_SYMBOL(clk_disable); | ||
119 | |||
120 | unsigned long clk_get_rate(struct clk *clk) | ||
121 | { | ||
122 | if (clk->get_rate) | ||
123 | return clk->get_rate(clk); | ||
124 | |||
125 | if (clk->rate) | ||
126 | return clk->rate; | ||
127 | |||
128 | if (clk->parent) | ||
129 | return clk_get_rate(clk->parent); | ||
130 | |||
131 | return 0; | ||
132 | } | ||
133 | EXPORT_SYMBOL(clk_get_rate); | ||
134 | |||
135 | int clk_register(struct clk *clk) | ||
136 | { | ||
137 | unsigned long flags; | ||
138 | |||
139 | spin_lock_irqsave(&clk_lock, flags); | ||
140 | |||
141 | list_add(&clk->node, &clocks); | ||
142 | |||
143 | if (clk->parent) | ||
144 | ++clk->parent->refcount; | ||
145 | |||
146 | spin_unlock_irqrestore(&clk_lock, flags); | ||
147 | |||
148 | return 0; | ||
149 | } | ||
150 | |||
151 | int clk_unregister(struct clk *clk) | ||
152 | { | ||
153 | int ret = 0; | ||
154 | unsigned long flags; | ||
155 | |||
156 | spin_lock_irqsave(&clk_lock, flags); | ||
157 | |||
158 | if (clk->usage || clk->refcount) | ||
159 | ret = -EBUSY; | ||
160 | else | ||
161 | list_del(&clk->node); | ||
162 | |||
163 | if (clk->parent) | ||
164 | --clk->parent->refcount; | ||
165 | |||
166 | spin_unlock_irqrestore(&clk_lock, flags); | ||
167 | |||
168 | return ret; | ||
169 | } | ||
170 | |||
171 | #if defined CONFIG_DEBUG_FS | ||
172 | |||
173 | #include <linux/debugfs.h> | ||
174 | #include <linux/seq_file.h> | ||
175 | |||
176 | static int clk_debugfs_show(struct seq_file *s, void *null) | ||
177 | { | ||
178 | unsigned long flags; | ||
179 | struct clk *p; | ||
180 | |||
181 | spin_lock_irqsave(&clk_lock, flags); | ||
182 | |||
183 | list_for_each_entry(p, &clocks, node) | ||
184 | seq_printf(s, "%s.%d: usage=%lu refcount=%lu rate=%lu\n", | ||
185 | p->name, p->id, p->usage, p->refcount, | ||
186 | p->usage ? clk_get_rate(p) : 0); | ||
187 | |||
188 | spin_unlock_irqrestore(&clk_lock, flags); | ||
189 | |||
190 | return 0; | ||
191 | } | ||
192 | |||
193 | static int clk_debugfs_open(struct inode *inode, struct file *file) | ||
194 | { | ||
195 | return single_open(file, clk_debugfs_show, NULL); | ||
196 | } | ||
197 | |||
198 | static const struct file_operations clk_debugfs_operations = { | ||
199 | .open = clk_debugfs_open, | ||
200 | .read = seq_read, | ||
201 | .llseek = seq_lseek, | ||
202 | .release = single_release, | ||
203 | }; | ||
204 | |||
205 | static int __init clk_debugfs_init(void) | ||
206 | { | ||
207 | struct dentry *dentry; | ||
208 | |||
209 | dentry = debugfs_create_file("clk", S_IFREG | S_IRUGO, NULL, NULL, | ||
210 | &clk_debugfs_operations); | ||
211 | return IS_ERR(dentry) ? PTR_ERR(dentry) : 0; | ||
212 | } | ||
213 | subsys_initcall(clk_debugfs_init); | ||
214 | |||
215 | #endif /* if defined CONFIG_DEBUG_FS */ | ||
diff --git a/arch/arm/mach-ns9xxx/clock.h b/arch/arm/mach-ns9xxx/clock.h deleted file mode 100644 index b86c30dd79eb..000000000000 --- a/arch/arm/mach-ns9xxx/clock.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/clock.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __NS9XXX_CLOCK_H | ||
12 | #define __NS9XXX_CLOCK_H | ||
13 | |||
14 | #include <linux/list.h> | ||
15 | |||
16 | struct clk { | ||
17 | struct module *owner; | ||
18 | const char *name; | ||
19 | int id; | ||
20 | |||
21 | struct clk *parent; | ||
22 | |||
23 | unsigned long rate; | ||
24 | int (*endisable)(struct clk *, int enable); | ||
25 | unsigned long (*get_rate)(struct clk *); | ||
26 | |||
27 | struct list_head node; | ||
28 | unsigned long refcount; | ||
29 | unsigned long usage; | ||
30 | }; | ||
31 | |||
32 | int clk_register(struct clk *clk); | ||
33 | int clk_unregister(struct clk *clk); | ||
34 | |||
35 | #endif /* ifndef __NS9XXX_CLOCK_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/generic.c b/arch/arm/mach-ns9xxx/generic.c deleted file mode 100644 index 1e0f467879cc..000000000000 --- a/arch/arm/mach-ns9xxx/generic.c +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/generic.c | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <asm/memory.h> | ||
14 | |||
15 | #include "generic.h" | ||
16 | |||
17 | void __init ns9xxx_init_machine(void) | ||
18 | { | ||
19 | } | ||
diff --git a/arch/arm/mach-ns9xxx/generic.h b/arch/arm/mach-ns9xxx/generic.h deleted file mode 100644 index 82493191aad6..000000000000 --- a/arch/arm/mach-ns9xxx/generic.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/generic.h | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/time.h> | ||
12 | #include <asm/mach/time.h> | ||
13 | #include <linux/init.h> | ||
14 | |||
15 | void __init ns9xxx_init_irq(void); | ||
16 | void __init ns9xxx_init_machine(void); | ||
diff --git a/arch/arm/mach-ns9xxx/gpio-ns9360.c b/arch/arm/mach-ns9xxx/gpio-ns9360.c deleted file mode 100644 index 377330c1b250..000000000000 --- a/arch/arm/mach-ns9xxx/gpio-ns9360.c +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/gpio-ns9360.c | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/bug.h> | ||
12 | #include <linux/errno.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/module.h> | ||
16 | |||
17 | #include <mach/regs-bbu.h> | ||
18 | #include <mach/processor-ns9360.h> | ||
19 | |||
20 | #include "gpio-ns9360.h" | ||
21 | |||
22 | static inline int ns9360_valid_gpio(unsigned gpio) | ||
23 | { | ||
24 | return gpio <= 72; | ||
25 | } | ||
26 | |||
27 | static inline void __iomem *ns9360_gpio_get_gconfaddr(unsigned gpio) | ||
28 | { | ||
29 | if (gpio < 56) | ||
30 | return BBU_GCONFb1(gpio / 8); | ||
31 | else | ||
32 | /* | ||
33 | * this could be optimised away on | ||
34 | * ns9750 only builds, but it isn't ... | ||
35 | */ | ||
36 | return BBU_GCONFb2((gpio - 56) / 8); | ||
37 | } | ||
38 | |||
39 | static inline void __iomem *ns9360_gpio_get_gctrladdr(unsigned gpio) | ||
40 | { | ||
41 | if (gpio < 32) | ||
42 | return BBU_GCTRL1; | ||
43 | else if (gpio < 64) | ||
44 | return BBU_GCTRL2; | ||
45 | else | ||
46 | /* this could be optimised away on ns9750 only builds */ | ||
47 | return BBU_GCTRL3; | ||
48 | } | ||
49 | |||
50 | static inline void __iomem *ns9360_gpio_get_gstataddr(unsigned gpio) | ||
51 | { | ||
52 | if (gpio < 32) | ||
53 | return BBU_GSTAT1; | ||
54 | else if (gpio < 64) | ||
55 | return BBU_GSTAT2; | ||
56 | else | ||
57 | /* this could be optimised away on ns9750 only builds */ | ||
58 | return BBU_GSTAT3; | ||
59 | } | ||
60 | |||
61 | /* | ||
62 | * each gpio can serve for 4 different purposes [0..3]. These are called | ||
63 | * "functions" and passed in the parameter func. Functions 0-2 are always some | ||
64 | * special things, function 3 is GPIO. If func == 3 dir specifies input or | ||
65 | * output, and with inv you can enable an inverter (independent of func). | ||
66 | */ | ||
67 | int __ns9360_gpio_configure(unsigned gpio, int dir, int inv, int func) | ||
68 | { | ||
69 | void __iomem *conf = ns9360_gpio_get_gconfaddr(gpio); | ||
70 | u32 confval; | ||
71 | |||
72 | confval = __raw_readl(conf); | ||
73 | REGSETIM_IDX(confval, BBU_GCONFx, DIR, gpio & 7, dir); | ||
74 | REGSETIM_IDX(confval, BBU_GCONFx, INV, gpio & 7, inv); | ||
75 | REGSETIM_IDX(confval, BBU_GCONFx, FUNC, gpio & 7, func); | ||
76 | __raw_writel(confval, conf); | ||
77 | |||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | int ns9360_gpio_configure(unsigned gpio, int inv, int func) | ||
82 | { | ||
83 | if (likely(ns9360_valid_gpio(gpio))) { | ||
84 | if (func == 3) { | ||
85 | printk(KERN_WARNING "use gpio_direction_input " | ||
86 | "or gpio_direction_output\n"); | ||
87 | return -EINVAL; | ||
88 | } else | ||
89 | return __ns9360_gpio_configure(gpio, 0, inv, func); | ||
90 | } else | ||
91 | return -EINVAL; | ||
92 | } | ||
93 | EXPORT_SYMBOL(ns9360_gpio_configure); | ||
94 | |||
95 | int ns9360_gpio_get_value(unsigned gpio) | ||
96 | { | ||
97 | void __iomem *stat = ns9360_gpio_get_gstataddr(gpio); | ||
98 | int ret; | ||
99 | |||
100 | ret = 1 & (__raw_readl(stat) >> (gpio & 31)); | ||
101 | |||
102 | return ret; | ||
103 | } | ||
104 | |||
105 | void ns9360_gpio_set_value(unsigned gpio, int value) | ||
106 | { | ||
107 | void __iomem *ctrl = ns9360_gpio_get_gctrladdr(gpio); | ||
108 | u32 ctrlval; | ||
109 | |||
110 | ctrlval = __raw_readl(ctrl); | ||
111 | |||
112 | if (value) | ||
113 | ctrlval |= 1 << (gpio & 31); | ||
114 | else | ||
115 | ctrlval &= ~(1 << (gpio & 31)); | ||
116 | |||
117 | __raw_writel(ctrlval, ctrl); | ||
118 | } | ||
diff --git a/arch/arm/mach-ns9xxx/gpio-ns9360.h b/arch/arm/mach-ns9xxx/gpio-ns9360.h deleted file mode 100644 index 131cd1715caa..000000000000 --- a/arch/arm/mach-ns9xxx/gpio-ns9360.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/gpio-ns9360.h | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | int __ns9360_gpio_configure(unsigned gpio, int dir, int inv, int func); | ||
12 | int ns9360_gpio_get_value(unsigned gpio); | ||
13 | void ns9360_gpio_set_value(unsigned gpio, int value); | ||
diff --git a/arch/arm/mach-ns9xxx/gpio.c b/arch/arm/mach-ns9xxx/gpio.c deleted file mode 100644 index 5503ca09c4ae..000000000000 --- a/arch/arm/mach-ns9xxx/gpio.c +++ /dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/gpio.c | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/compiler.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/spinlock.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/bitops.h> | ||
17 | |||
18 | #include <mach/gpio.h> | ||
19 | #include <mach/processor.h> | ||
20 | #include <mach/processor-ns9360.h> | ||
21 | #include <asm/bug.h> | ||
22 | #include <asm/types.h> | ||
23 | |||
24 | #include "gpio-ns9360.h" | ||
25 | |||
26 | #if defined(CONFIG_PROCESSOR_NS9360) | ||
27 | #define GPIO_MAX 72 | ||
28 | #elif defined(CONFIG_PROCESSOR_NS9750) | ||
29 | #define GPIO_MAX 49 | ||
30 | #endif | ||
31 | |||
32 | /* protects BBU_GCONFx and BBU_GCTRLx */ | ||
33 | static spinlock_t gpio_lock = __SPIN_LOCK_UNLOCKED(gpio_lock); | ||
34 | |||
35 | /* only access gpiores with atomic ops */ | ||
36 | static DECLARE_BITMAP(gpiores, GPIO_MAX + 1); | ||
37 | |||
38 | static inline int ns9xxx_valid_gpio(unsigned gpio) | ||
39 | { | ||
40 | #if defined(CONFIG_PROCESSOR_NS9360) | ||
41 | if (processor_is_ns9360()) | ||
42 | return gpio <= 72; | ||
43 | else | ||
44 | #endif | ||
45 | #if defined(CONFIG_PROCESSOR_NS9750) | ||
46 | if (processor_is_ns9750()) | ||
47 | return gpio <= 49; | ||
48 | else | ||
49 | #endif | ||
50 | { | ||
51 | BUG(); | ||
52 | return 0; | ||
53 | } | ||
54 | } | ||
55 | |||
56 | int gpio_request(unsigned gpio, const char *label) | ||
57 | { | ||
58 | if (likely(ns9xxx_valid_gpio(gpio))) | ||
59 | return test_and_set_bit(gpio, gpiores) ? -EBUSY : 0; | ||
60 | else | ||
61 | return -EINVAL; | ||
62 | } | ||
63 | EXPORT_SYMBOL(gpio_request); | ||
64 | |||
65 | void gpio_free(unsigned gpio) | ||
66 | { | ||
67 | might_sleep(); | ||
68 | clear_bit(gpio, gpiores); | ||
69 | return; | ||
70 | } | ||
71 | EXPORT_SYMBOL(gpio_free); | ||
72 | |||
73 | int gpio_direction_input(unsigned gpio) | ||
74 | { | ||
75 | if (likely(ns9xxx_valid_gpio(gpio))) { | ||
76 | int ret = -EINVAL; | ||
77 | unsigned long flags; | ||
78 | |||
79 | spin_lock_irqsave(&gpio_lock, flags); | ||
80 | #if defined(CONFIG_PROCESSOR_NS9360) | ||
81 | if (processor_is_ns9360()) | ||
82 | ret = __ns9360_gpio_configure(gpio, 0, 0, 3); | ||
83 | else | ||
84 | #endif | ||
85 | BUG(); | ||
86 | |||
87 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
88 | |||
89 | return ret; | ||
90 | |||
91 | } else | ||
92 | return -EINVAL; | ||
93 | } | ||
94 | EXPORT_SYMBOL(gpio_direction_input); | ||
95 | |||
96 | int gpio_direction_output(unsigned gpio, int value) | ||
97 | { | ||
98 | if (likely(ns9xxx_valid_gpio(gpio))) { | ||
99 | int ret = -EINVAL; | ||
100 | unsigned long flags; | ||
101 | |||
102 | gpio_set_value(gpio, value); | ||
103 | |||
104 | spin_lock_irqsave(&gpio_lock, flags); | ||
105 | #if defined(CONFIG_PROCESSOR_NS9360) | ||
106 | if (processor_is_ns9360()) | ||
107 | ret = __ns9360_gpio_configure(gpio, 1, 0, 3); | ||
108 | else | ||
109 | #endif | ||
110 | BUG(); | ||
111 | |||
112 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
113 | |||
114 | return ret; | ||
115 | } else | ||
116 | return -EINVAL; | ||
117 | } | ||
118 | EXPORT_SYMBOL(gpio_direction_output); | ||
119 | |||
120 | int gpio_get_value(unsigned gpio) | ||
121 | { | ||
122 | #if defined(CONFIG_PROCESSOR_NS9360) | ||
123 | if (processor_is_ns9360()) | ||
124 | return ns9360_gpio_get_value(gpio); | ||
125 | else | ||
126 | #endif | ||
127 | { | ||
128 | BUG(); | ||
129 | return -EINVAL; | ||
130 | } | ||
131 | } | ||
132 | EXPORT_SYMBOL(gpio_get_value); | ||
133 | |||
134 | void gpio_set_value(unsigned gpio, int value) | ||
135 | { | ||
136 | unsigned long flags; | ||
137 | spin_lock_irqsave(&gpio_lock, flags); | ||
138 | #if defined(CONFIG_PROCESSOR_NS9360) | ||
139 | if (processor_is_ns9360()) | ||
140 | ns9360_gpio_set_value(gpio, value); | ||
141 | else | ||
142 | #endif | ||
143 | BUG(); | ||
144 | |||
145 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
146 | } | ||
147 | EXPORT_SYMBOL(gpio_set_value); | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/board.h b/arch/arm/mach-ns9xxx/include/mach/board.h deleted file mode 100644 index 19ca6de46a45..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/board.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/board.h | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_BOARD_H | ||
12 | #define __ASM_ARCH_BOARD_H | ||
13 | |||
14 | #include <asm/mach-types.h> | ||
15 | |||
16 | #define board_is_a9m9750dev() (0 \ | ||
17 | || machine_is_cc9p9750dev() \ | ||
18 | ) | ||
19 | |||
20 | #define board_is_a9mvali() (0 \ | ||
21 | || machine_is_cc9p9750val() \ | ||
22 | ) | ||
23 | |||
24 | #define board_is_jscc9p9210() (0 \ | ||
25 | || machine_is_cc9p9210js() \ | ||
26 | ) | ||
27 | |||
28 | #define board_is_jscc9p9215() (0 \ | ||
29 | || machine_is_cc9p9215js() \ | ||
30 | ) | ||
31 | |||
32 | #define board_is_jscc9p9360() (0 \ | ||
33 | || machine_is_cc9p9360js() \ | ||
34 | ) | ||
35 | |||
36 | #define board_is_uncbas() (0 \ | ||
37 | || machine_is_cc7ucamry() \ | ||
38 | ) | ||
39 | |||
40 | #endif /* ifndef __ASM_ARCH_BOARD_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S deleted file mode 100644 index 5a2acbdc3d67..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/debug-macro.S | ||
3 | * Copyright (C) 2006 by Digi International Inc. | ||
4 | * All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published by | ||
8 | * the Free Software Foundation. | ||
9 | */ | ||
10 | #include <mach/hardware.h> | ||
11 | #include <asm/memory.h> | ||
12 | |||
13 | #include <mach/regs-board-a9m9750dev.h> | ||
14 | |||
15 | .macro addruart, rp, rv | ||
16 | ldr \rp, =NS9XXX_CSxSTAT_PHYS(0) | ||
17 | ldr \rv, =io_p2v(NS9XXX_CSxSTAT_PHYS(0)) | ||
18 | .endm | ||
19 | |||
20 | #define UART_SHIFT 2 | ||
21 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/entry-macro.S b/arch/arm/mach-ns9xxx/include/mach/entry-macro.S deleted file mode 100644 index 71ca0319b547..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <mach/hardware.h> | ||
12 | #include <mach/regs-sys-common.h> | ||
13 | |||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | ldr \base, =SYS_ISRADDR | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
22 | ldr \irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)] | ||
23 | cmp \irqstat, #0 | ||
24 | ldrne \irqnr, [\base] | ||
25 | .endm | ||
26 | |||
27 | .macro disable_fiq | ||
28 | .endm | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/gpio.h b/arch/arm/mach-ns9xxx/include/mach/gpio.h deleted file mode 100644 index 5eb349032579..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/gpio.h +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/gpio.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_GPIO_H | ||
12 | #define __ASM_ARCH_GPIO_H | ||
13 | |||
14 | #include <asm/errno.h> | ||
15 | |||
16 | int gpio_request(unsigned gpio, const char *label); | ||
17 | |||
18 | void gpio_free(unsigned gpio); | ||
19 | |||
20 | int ns9xxx_gpio_configure(unsigned gpio, int inv, int func); | ||
21 | |||
22 | int gpio_direction_input(unsigned gpio); | ||
23 | |||
24 | int gpio_direction_output(unsigned gpio, int value); | ||
25 | |||
26 | int gpio_get_value(unsigned gpio); | ||
27 | |||
28 | void gpio_set_value(unsigned gpio, int value); | ||
29 | |||
30 | /* | ||
31 | * ns9xxx can use gpio pins to trigger an irq, but it's not generic | ||
32 | * enough to be supported by the gpio_to_irq/irq_to_gpio interface | ||
33 | */ | ||
34 | static inline int gpio_to_irq(unsigned gpio) | ||
35 | { | ||
36 | return -EINVAL; | ||
37 | } | ||
38 | |||
39 | static inline int irq_to_gpio(unsigned irq) | ||
40 | { | ||
41 | return -EINVAL; | ||
42 | } | ||
43 | |||
44 | /* get the cansleep() stubs */ | ||
45 | #include <asm-generic/gpio.h> | ||
46 | |||
47 | #endif /* ifndef __ASM_ARCH_GPIO_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/hardware.h b/arch/arm/mach-ns9xxx/include/mach/hardware.h deleted file mode 100644 index 76631128e11c..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/hardware.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_HARDWARE_H | ||
12 | #define __ASM_ARCH_HARDWARE_H | ||
13 | |||
14 | /* | ||
15 | * NetSilicon NS9xxx internal mapping: | ||
16 | * | ||
17 | * physical <--> virtual | ||
18 | * 0x90000000 - 0x906fffff <--> 0xf9000000 - 0xf96fffff | ||
19 | * 0xa0100000 - 0xa0afffff <--> 0xfa100000 - 0xfaafffff | ||
20 | */ | ||
21 | #define io_p2v(x) (0xf0000000 \ | ||
22 | + (((x) & 0xf0000000) >> 4) \ | ||
23 | + ((x) & 0x00ffffff)) | ||
24 | |||
25 | #define io_v2p(x) ((((x) & 0x0f000000) << 4) \ | ||
26 | + ((x) & 0x00ffffff)) | ||
27 | |||
28 | #define __REGSHIFT(mask) ((mask) & (-(mask))) | ||
29 | |||
30 | #define __REGBIT(bit) ((u32)1 << (bit)) | ||
31 | #define __REGBITS(hbit, lbit) ((((u32)1 << ((hbit) - (lbit) + 1)) - 1) << (lbit)) | ||
32 | #define __REGVAL(mask, value) (((value) * __REGSHIFT(mask)) & (mask)) | ||
33 | |||
34 | #ifndef __ASSEMBLY__ | ||
35 | |||
36 | # define __REG(x) ((void __iomem __force *)io_p2v((x))) | ||
37 | # define __REG2(x, y) ((void __iomem __force *)(io_p2v((x)) + 4 * (y))) | ||
38 | |||
39 | # define __REGSET(var, field, value) \ | ||
40 | ((var) = (((var) & ~((field) & ~(value))) | (value))) | ||
41 | |||
42 | # define REGSET(var, reg, field, value) \ | ||
43 | __REGSET(var, reg ## _ ## field, reg ## _ ## field ## _ ## value) | ||
44 | |||
45 | # define REGSET_IDX(var, reg, field, idx, value) \ | ||
46 | __REGSET(var, reg ## _ ## field((idx)), reg ## _ ## field ## _ ## value((idx))) | ||
47 | |||
48 | # define REGSETIM(var, reg, field, value) \ | ||
49 | __REGSET(var, reg ## _ ## field, __REGVAL(reg ## _ ## field, (value))) | ||
50 | |||
51 | # define REGSETIM_IDX(var, reg, field, idx, value) \ | ||
52 | __REGSET(var, reg ## _ ## field((idx)), __REGVAL(reg ## _ ## field((idx)), (value))) | ||
53 | |||
54 | # define __REGGET(var, field) \ | ||
55 | (((var) & (field))) | ||
56 | |||
57 | # define REGGET(var, reg, field) \ | ||
58 | __REGGET(var, reg ## _ ## field) | ||
59 | |||
60 | # define REGGET_IDX(var, reg, field, idx) \ | ||
61 | __REGGET(var, reg ## _ ## field((idx))) | ||
62 | |||
63 | # define REGGETIM(var, reg, field) \ | ||
64 | __REGGET(var, reg ## _ ## field) / __REGSHIFT(reg ## _ ## field) | ||
65 | |||
66 | # define REGGETIM_IDX(var, reg, field, idx) \ | ||
67 | __REGGET(var, reg ## _ ## field((idx))) / \ | ||
68 | __REGSHIFT(reg ## _ ## field((idx))) | ||
69 | |||
70 | #else | ||
71 | |||
72 | # define __REG(x) io_p2v(x) | ||
73 | # define __REG2(x, y) io_p2v((x) + 4 * (y)) | ||
74 | |||
75 | #endif | ||
76 | |||
77 | #endif /* ifndef __ASM_ARCH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/io.h b/arch/arm/mach-ns9xxx/include/mach/io.h deleted file mode 100644 index f08451d2e1bc..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/io.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/io.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_IO_H | ||
12 | #define __ASM_ARCH_IO_H | ||
13 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff /* XXX */ | ||
15 | |||
16 | #define __io(a) __typesafe_io(a) | ||
17 | #define __mem_pci(a) (a) | ||
18 | #define __mem_isa(a) (IO_BASE + (a)) | ||
19 | |||
20 | #endif /* ifndef __ASM_ARCH_IO_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/irqs.h b/arch/arm/mach-ns9xxx/include/mach/irqs.h deleted file mode 100644 index 13483949e210..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/irqs.h +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_IRQS_H | ||
12 | #define __ASM_ARCH_IRQS_H | ||
13 | |||
14 | /* NetSilicon 9360 */ | ||
15 | #define IRQ_NS9XXX_WATCHDOG 0 | ||
16 | #define IRQ_NS9XXX_AHBBUSERR 1 | ||
17 | #define IRQ_NS9360_BBUSAGG 2 | ||
18 | /* irq 3 is reserved for NS9360 */ | ||
19 | #define IRQ_NS9XXX_ETHRX 4 | ||
20 | #define IRQ_NS9XXX_ETHTX 5 | ||
21 | #define IRQ_NS9XXX_ETHPHY 6 | ||
22 | #define IRQ_NS9360_LCD 7 | ||
23 | #define IRQ_NS9360_SERBRX 8 | ||
24 | #define IRQ_NS9360_SERBTX 9 | ||
25 | #define IRQ_NS9360_SERARX 10 | ||
26 | #define IRQ_NS9360_SERATX 11 | ||
27 | #define IRQ_NS9360_SERCRX 12 | ||
28 | #define IRQ_NS9360_SERCTX 13 | ||
29 | #define IRQ_NS9360_I2C 14 | ||
30 | #define IRQ_NS9360_BBUSDMA 15 | ||
31 | #define IRQ_NS9360_TIMER0 16 | ||
32 | #define IRQ_NS9360_TIMER1 17 | ||
33 | #define IRQ_NS9360_TIMER2 18 | ||
34 | #define IRQ_NS9360_TIMER3 19 | ||
35 | #define IRQ_NS9360_TIMER4 20 | ||
36 | #define IRQ_NS9360_TIMER5 21 | ||
37 | #define IRQ_NS9360_TIMER6 22 | ||
38 | #define IRQ_NS9360_TIMER7 23 | ||
39 | #define IRQ_NS9360_RTC 24 | ||
40 | #define IRQ_NS9360_USBHOST 25 | ||
41 | #define IRQ_NS9360_USBDEVICE 26 | ||
42 | #define IRQ_NS9360_IEEE1284 27 | ||
43 | #define IRQ_NS9XXX_EXT0 28 | ||
44 | #define IRQ_NS9XXX_EXT1 29 | ||
45 | #define IRQ_NS9XXX_EXT2 30 | ||
46 | #define IRQ_NS9XXX_EXT3 31 | ||
47 | |||
48 | #define BBUS_IRQ(irq) (32 + irq) | ||
49 | |||
50 | #define IRQ_BBUS_DMA BBUS_IRQ(0) | ||
51 | #define IRQ_BBUS_SERBRX BBUS_IRQ(2) | ||
52 | #define IRQ_BBUS_SERBTX BBUS_IRQ(3) | ||
53 | #define IRQ_BBUS_SERARX BBUS_IRQ(4) | ||
54 | #define IRQ_BBUS_SERATX BBUS_IRQ(5) | ||
55 | #define IRQ_BBUS_SERCRX BBUS_IRQ(6) | ||
56 | #define IRQ_BBUS_SERCTX BBUS_IRQ(7) | ||
57 | #define IRQ_BBUS_SERDRX BBUS_IRQ(8) | ||
58 | #define IRQ_BBUS_SERDTX BBUS_IRQ(9) | ||
59 | #define IRQ_BBUS_I2C BBUS_IRQ(10) | ||
60 | #define IRQ_BBUS_1284 BBUS_IRQ(11) | ||
61 | #define IRQ_BBUS_UTIL BBUS_IRQ(12) | ||
62 | #define IRQ_BBUS_RTC BBUS_IRQ(13) | ||
63 | #define IRQ_BBUS_USBHST BBUS_IRQ(14) | ||
64 | #define IRQ_BBUS_USBDEV BBUS_IRQ(15) | ||
65 | #define IRQ_BBUS_AHBDMA1 BBUS_IRQ(24) | ||
66 | #define IRQ_BBUS_AHBDMA2 BBUS_IRQ(25) | ||
67 | |||
68 | /* | ||
69 | * these Interrupts are specific for the a9m9750dev board. | ||
70 | * They are generated by an FPGA that interrupts the CPU on | ||
71 | * IRQ_NS9360_EXT2 | ||
72 | */ | ||
73 | #define FPGA_IRQ(irq) (64 + irq) | ||
74 | |||
75 | #define IRQ_FPGA_UARTA FPGA_IRQ(0) | ||
76 | #define IRQ_FPGA_UARTB FPGA_IRQ(1) | ||
77 | #define IRQ_FPGA_UARTC FPGA_IRQ(2) | ||
78 | #define IRQ_FPGA_UARTD FPGA_IRQ(3) | ||
79 | #define IRQ_FPGA_TOUCH FPGA_IRQ(4) | ||
80 | #define IRQ_FPGA_CF FPGA_IRQ(5) | ||
81 | #define IRQ_FPGA_CAN0 FPGA_IRQ(6) | ||
82 | #define IRQ_FPGA_CAN1 FPGA_IRQ(7) | ||
83 | |||
84 | #define NR_IRQS 72 | ||
85 | |||
86 | #endif /* __ASM_ARCH_IRQS_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/memory.h b/arch/arm/mach-ns9xxx/include/mach/memory.h deleted file mode 100644 index 5c65aee6e7a9..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/memory.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_MEMORY_H | ||
12 | #define __ASM_ARCH_MEMORY_H | ||
13 | |||
14 | /* x in [0..3] */ | ||
15 | #define NS9XXX_CSxSTAT_PHYS(x) UL(((x) + 4) << 28) | ||
16 | |||
17 | #define NS9XXX_CS0STAT_LENGTH UL(0x1000) | ||
18 | #define NS9XXX_CS1STAT_LENGTH UL(0x1000) | ||
19 | #define NS9XXX_CS2STAT_LENGTH UL(0x1000) | ||
20 | #define NS9XXX_CS3STAT_LENGTH UL(0x1000) | ||
21 | |||
22 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
23 | |||
24 | #endif | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/module.h b/arch/arm/mach-ns9xxx/include/mach/module.h deleted file mode 100644 index 628e9752589b..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/module.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/module.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_MODULE_H | ||
12 | #define __ASM_ARCH_MODULE_H | ||
13 | |||
14 | #include <asm/mach-types.h> | ||
15 | |||
16 | #define module_is_cc7ucamry() (0 \ | ||
17 | || machine_is_cc7ucamry() \ | ||
18 | ) | ||
19 | |||
20 | #define module_is_cc9c() (0 \ | ||
21 | ) | ||
22 | |||
23 | #define module_is_cc9p9210() (0 \ | ||
24 | || machine_is_cc9p9210() \ | ||
25 | || machine_is_cc9p9210js() \ | ||
26 | ) | ||
27 | |||
28 | #define module_is_cc9p9215() (0 \ | ||
29 | || machine_is_cc9p9215() \ | ||
30 | || machine_is_cc9p9215js() \ | ||
31 | ) | ||
32 | |||
33 | #define module_is_cc9p9360() (0 \ | ||
34 | || machine_is_cc9p9360dev() \ | ||
35 | || machine_is_cc9p9360js() \ | ||
36 | ) | ||
37 | |||
38 | #define module_is_cc9p9750() (0 \ | ||
39 | || machine_is_a9m9750() \ | ||
40 | || machine_is_cc9p9750js() \ | ||
41 | || machine_is_cc9p9750val() \ | ||
42 | ) | ||
43 | |||
44 | #define module_is_ccw9c() (0 \ | ||
45 | ) | ||
46 | |||
47 | #define module_is_inc20otter() (0 \ | ||
48 | || machine_is_inc20otter() \ | ||
49 | ) | ||
50 | |||
51 | #define module_is_otter() (0 \ | ||
52 | || machine_is_otter() \ | ||
53 | ) | ||
54 | |||
55 | #endif /* ifndef __ASM_ARCH_MODULE_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h b/arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h deleted file mode 100644 index f41deda5129e..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_PROCESSORNS9360_H | ||
12 | #define __ASM_ARCH_PROCESSORNS9360_H | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | |||
16 | void ns9360_reset(char mode); | ||
17 | |||
18 | unsigned long ns9360_systemclock(void) __attribute__((const)); | ||
19 | |||
20 | static inline unsigned long ns9360_cpuclock(void) __attribute__((const)); | ||
21 | static inline unsigned long ns9360_cpuclock(void) | ||
22 | { | ||
23 | return ns9360_systemclock() / 2; | ||
24 | } | ||
25 | |||
26 | void __init ns9360_map_io(void); | ||
27 | |||
28 | extern struct sys_timer ns9360_timer; | ||
29 | |||
30 | int ns9360_gpio_configure(unsigned gpio, int inv, int func); | ||
31 | |||
32 | #endif /* ifndef __ASM_ARCH_PROCESSORNS9360_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/processor.h b/arch/arm/mach-ns9xxx/include/mach/processor.h deleted file mode 100644 index 9f77f746a386..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/processor.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/processor.h | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_PROCESSOR_H | ||
12 | #define __ASM_ARCH_PROCESSOR_H | ||
13 | |||
14 | #include <mach/module.h> | ||
15 | |||
16 | #define processor_is_ns9210() (0 \ | ||
17 | || module_is_cc7ucamry() \ | ||
18 | || module_is_cc9p9210() \ | ||
19 | || module_is_inc20otter() \ | ||
20 | || module_is_otter() \ | ||
21 | ) | ||
22 | |||
23 | #define processor_is_ns9215() (0 \ | ||
24 | || module_is_cc9p9215() \ | ||
25 | ) | ||
26 | |||
27 | #define processor_is_ns9360() (0 \ | ||
28 | || module_is_cc9p9360() \ | ||
29 | || module_is_cc9c() \ | ||
30 | || module_is_ccw9c() \ | ||
31 | ) | ||
32 | |||
33 | #define processor_is_ns9750() (0 \ | ||
34 | || module_is_cc9p9750() \ | ||
35 | ) | ||
36 | |||
37 | #define processor_is_ns921x() (0 \ | ||
38 | || processor_is_ns9210() \ | ||
39 | || processor_is_ns9215() \ | ||
40 | ) | ||
41 | |||
42 | #endif /* ifndef __ASM_ARCH_PROCESSOR_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-bbu.h b/arch/arm/mach-ns9xxx/include/mach/regs-bbu.h deleted file mode 100644 index af227c058fb9..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/regs-bbu.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/regs-bbu.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_REGSBBU_H | ||
12 | #define __ASM_ARCH_REGSBBU_H | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | |||
16 | /* BBus Utility */ | ||
17 | |||
18 | /* GPIO Configuration Registers block 1 */ | ||
19 | /* NOTE: the HRM starts counting at 1 for the GPIO registers, here the start is | ||
20 | * at 0 for each block. That is, BBU_GCONFb1(0) is GPIO Configuration Register | ||
21 | * #1, BBU_GCONFb2(0) is GPIO Configuration Register #8. */ | ||
22 | #define BBU_GCONFb1(x) __REG2(0x90600010, (x)) | ||
23 | #define BBU_GCONFb2(x) __REG2(0x90600100, (x)) | ||
24 | |||
25 | #define BBU_GCONFx_DIR(m) __REGBIT(3 + (((m) & 7) << 2)) | ||
26 | #define BBU_GCONFx_DIR_INPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 0) | ||
27 | #define BBU_GCONFx_DIR_OUTPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 1) | ||
28 | #define BBU_GCONFx_INV(m) __REGBIT(2 + (((m) & 7) << 2)) | ||
29 | #define BBU_GCONFx_INV_NO(m) __REGVAL(BBU_GCONFx_INV(m), 0) | ||
30 | #define BBU_GCONFx_INV_YES(m) __REGVAL(BBU_GCONFx_INV(m), 1) | ||
31 | #define BBU_GCONFx_FUNC(m) __REGBITS(1 + (((m) & 7) << 2), ((m) & 7) << 2) | ||
32 | #define BBU_GCONFx_FUNC_0(m) __REGVAL(BBU_GCONFx_FUNC(m), 0) | ||
33 | #define BBU_GCONFx_FUNC_1(m) __REGVAL(BBU_GCONFx_FUNC(m), 1) | ||
34 | #define BBU_GCONFx_FUNC_2(m) __REGVAL(BBU_GCONFx_FUNC(m), 2) | ||
35 | #define BBU_GCONFx_FUNC_3(m) __REGVAL(BBU_GCONFx_FUNC(m), 3) | ||
36 | |||
37 | #define BBU_GCTRL1 __REG(0x90600030) | ||
38 | #define BBU_GCTRL2 __REG(0x90600034) | ||
39 | #define BBU_GCTRL3 __REG(0x90600120) | ||
40 | |||
41 | #define BBU_GSTAT1 __REG(0x90600040) | ||
42 | #define BBU_GSTAT2 __REG(0x90600044) | ||
43 | #define BBU_GSTAT3 __REG(0x90600130) | ||
44 | |||
45 | #endif /* ifndef __ASM_ARCH_REGSBBU_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h b/arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h deleted file mode 100644 index cd1593693f56..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_REGSBOARDA9M9750_H | ||
12 | #define __ASM_ARCH_REGSBOARDA9M9750_H | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | |||
16 | #define FPGA_UARTA_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0)) | ||
17 | #define FPGA_UARTB_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x08) | ||
18 | #define FPGA_UARTC_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x10) | ||
19 | #define FPGA_UARTD_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x18) | ||
20 | |||
21 | #define FPGA_IER __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x50) | ||
22 | #define FPGA_ISR __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x60) | ||
23 | |||
24 | #endif /* ifndef __ASM_ARCH_REGSBOARDA9M9750_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-mem.h b/arch/arm/mach-ns9xxx/include/mach/regs-mem.h deleted file mode 100644 index f1625bf8cdce..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/regs-mem.h +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/regs-mem.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_REGSMEM_H | ||
12 | #define __ASM_ARCH_REGSMEM_H | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | |||
16 | /* Memory Module */ | ||
17 | |||
18 | /* Control register */ | ||
19 | #define MEM_CTRL __REG(0xa0700000) | ||
20 | |||
21 | /* Status register */ | ||
22 | #define MEM_STAT __REG(0xa0700004) | ||
23 | |||
24 | /* Configuration register */ | ||
25 | #define MEM_CONF __REG(0xa0700008) | ||
26 | |||
27 | /* Dynamic Memory Control register */ | ||
28 | #define MEM_DMCTRL __REG(0xa0700020) | ||
29 | |||
30 | /* Dynamic Memory Refresh Timer */ | ||
31 | #define MEM_DMRT __REG(0xa0700024) | ||
32 | |||
33 | /* Dynamic Memory Read Configuration register */ | ||
34 | #define MEM_DMRC __REG(0xa0700028) | ||
35 | |||
36 | /* Dynamic Memory Precharge Command Period (tRP) */ | ||
37 | #define MEM_DMPCP __REG(0xa0700030) | ||
38 | |||
39 | /* Dynamic Memory Active to Precharge Command Period (tRAS) */ | ||
40 | #define MEM_DMAPCP __REG(0xa0700034) | ||
41 | |||
42 | /* Dynamic Memory Self-Refresh Exit Time (tSREX) */ | ||
43 | #define MEM_DMSRET __REG(0xa0700038) | ||
44 | |||
45 | /* Dynamic Memory Last Data Out to Active Time (tAPR) */ | ||
46 | #define MEM_DMLDOAT __REG(0xa070003c) | ||
47 | |||
48 | /* Dynamic Memory Data-in to Active Command Time (tDAL or TAPW) */ | ||
49 | #define MEM_DMDIACT __REG(0xa0700040) | ||
50 | |||
51 | /* Dynamic Memory Write Recovery Time (tWR, tDPL, tRWL, tRDL) */ | ||
52 | #define MEM_DMWRT __REG(0xa0700044) | ||
53 | |||
54 | /* Dynamic Memory Active to Active Command Period (tRC) */ | ||
55 | #define MEM_DMAACP __REG(0xa0700048) | ||
56 | |||
57 | /* Dynamic Memory Auto Refresh Period, and Auto Refresh to Active Command Period (tRFC) */ | ||
58 | #define MEM_DMARP __REG(0xa070004c) | ||
59 | |||
60 | /* Dynamic Memory Exit Self-Refresh to Active Command (tXSR) */ | ||
61 | #define MEM_DMESRAC __REG(0xa0700050) | ||
62 | |||
63 | /* Dynamic Memory Active Bank A to Active B Time (tRRD) */ | ||
64 | #define MEM_DMABAABT __REG(0xa0700054) | ||
65 | |||
66 | /* Dynamic Memory Load Mode register to Active Command Time (tMRD) */ | ||
67 | #define MEM_DMLMACT __REG(0xa0700058) | ||
68 | |||
69 | /* Static Memory Extended Wait */ | ||
70 | #define MEM_SMEW __REG(0xa0700080) | ||
71 | |||
72 | /* Dynamic Memory Configuration Register x */ | ||
73 | #define MEM_DMCONF(x) __REG2(0xa0700100, (x) << 3) | ||
74 | |||
75 | /* Dynamic Memory RAS and CAS Delay x */ | ||
76 | #define MEM_DMRCD(x) __REG2(0xa0700104, (x) << 3) | ||
77 | |||
78 | /* Static Memory Configuration Register x */ | ||
79 | #define MEM_SMC(x) __REG2(0xa0700200, (x) << 3) | ||
80 | |||
81 | /* Static Memory Configuration Register x: Write protect */ | ||
82 | #define MEM_SMC_PSMC __REGBIT(20) | ||
83 | #define MEM_SMC_PSMC_OFF __REGVAL(MEM_SMC_PSMC, 0) | ||
84 | #define MEM_SMC_PSMC_ON __REGVAL(MEM_SMC_PSMC, 1) | ||
85 | |||
86 | /* Static Memory Configuration Register x: Buffer enable */ | ||
87 | #define MEM_SMC_BSMC __REGBIT(19) | ||
88 | #define MEM_SMC_BSMC_OFF __REGVAL(MEM_SMC_BSMC, 0) | ||
89 | #define MEM_SMC_BSMC_ON __REGVAL(MEM_SMC_BSMC, 1) | ||
90 | |||
91 | /* Static Memory Configuration Register x: Extended Wait */ | ||
92 | #define MEM_SMC_EW __REGBIT(8) | ||
93 | #define MEM_SMC_EW_OFF __REGVAL(MEM_SMC_EW, 0) | ||
94 | #define MEM_SMC_EW_ON __REGVAL(MEM_SMC_EW, 1) | ||
95 | |||
96 | /* Static Memory Configuration Register x: Byte lane state */ | ||
97 | #define MEM_SMC_PB __REGBIT(7) | ||
98 | #define MEM_SMC_PB_0 __REGVAL(MEM_SMC_PB, 0) | ||
99 | #define MEM_SMC_PB_1 __REGVAL(MEM_SMC_PB, 1) | ||
100 | |||
101 | /* Static Memory Configuration Register x: Chip select polarity */ | ||
102 | #define MEM_SMC_PC __REGBIT(6) | ||
103 | #define MEM_SMC_PC_AL __REGVAL(MEM_SMC_PC, 0) | ||
104 | #define MEM_SMC_PC_AH __REGVAL(MEM_SMC_PC, 1) | ||
105 | |||
106 | /* static memory configuration register x: page mode*/ | ||
107 | #define MEM_SMC_PM __REGBIT(3) | ||
108 | #define MEM_SMC_PM_DIS __REGVAL(MEM_SMC_PM, 0) | ||
109 | #define MEM_SMC_PM_ASYNC __REGVAL(MEM_SMC_PM, 1) | ||
110 | |||
111 | /* static memory configuration register x: Memory width */ | ||
112 | #define MEM_SMC_MW __REGBITS(1, 0) | ||
113 | #define MEM_SMC_MW_8 __REGVAL(MEM_SMC_MW, 0) | ||
114 | #define MEM_SMC_MW_16 __REGVAL(MEM_SMC_MW, 1) | ||
115 | #define MEM_SMC_MW_32 __REGVAL(MEM_SMC_MW, 2) | ||
116 | |||
117 | /* Static Memory Write Enable Delay x */ | ||
118 | #define MEM_SMWED(x) __REG2(0xa0700204, (x) << 3) | ||
119 | |||
120 | /* Static Memory Output Enable Delay x */ | ||
121 | #define MEM_SMOED(x) __REG2(0xa0700208, (x) << 3) | ||
122 | |||
123 | /* Static Memory Read Delay x */ | ||
124 | #define MEM_SMRD(x) __REG2(0xa070020c, (x) << 3) | ||
125 | |||
126 | /* Static Memory Page Mode Read Delay 0 */ | ||
127 | #define MEM_SMPMRD(x) __REG2(0xa0700210, (x) << 3) | ||
128 | |||
129 | /* Static Memory Write Delay */ | ||
130 | #define MEM_SMWD(x) __REG2(0xa0700214, (x) << 3) | ||
131 | |||
132 | /* Static Memory Turn Round Delay x */ | ||
133 | #define MEM_SWT(x) __REG2(0xa0700218, (x) << 3) | ||
134 | |||
135 | #endif /* ifndef __ASM_ARCH_REGSMEM_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h b/arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h deleted file mode 100644 index 14f91dfd5736..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_REGSSYSCOMMON_H | ||
13 | #define __ASM_ARCH_REGSSYSCOMMON_H | ||
14 | #include <mach/hardware.h> | ||
15 | |||
16 | /* Interrupt Vector Address Register Level x */ | ||
17 | #define SYS_IVA(x) __REG2(0xa09000c4, (x)) | ||
18 | |||
19 | /* Interrupt Configuration registers */ | ||
20 | #define SYS_IC(x) __REG2(0xa0900144, (x)) | ||
21 | |||
22 | /* ISRADDR */ | ||
23 | #define SYS_ISRADDR __REG(0xa0900164) | ||
24 | |||
25 | /* Interrupt Status Active */ | ||
26 | #define SYS_ISA __REG(0xa0900168) | ||
27 | |||
28 | /* Interrupt Status Raw */ | ||
29 | #define SYS_ISR __REG(0xa090016c) | ||
30 | |||
31 | #endif /* ifndef __ASM_ARCH_REGSSYSCOMMON_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h b/arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h deleted file mode 100644 index 8ff254d9901c..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_REGSSYSNS9360_H | ||
12 | #define __ASM_ARCH_REGSSYSNS9360_H | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | |||
16 | /* System Control Module */ | ||
17 | |||
18 | /* AHB Arbiter Gen Configuration */ | ||
19 | #define SYS_AHBAGENCONF __REG(0xa0900000) | ||
20 | |||
21 | /* BRC */ | ||
22 | #define SYS_BRC(x) __REG2(0xa0900004, (x)) | ||
23 | |||
24 | /* Timer x Reload Count register */ | ||
25 | #define SYS_TRC(x) __REG2(0xa0900044, (x)) | ||
26 | |||
27 | /* Timer x Read register */ | ||
28 | #define SYS_TR(x) __REG2(0xa0900084, (x)) | ||
29 | |||
30 | /* Timer Interrupt Status register */ | ||
31 | #define SYS_TIS __REG(0xa0900170) | ||
32 | |||
33 | /* PLL Configuration register */ | ||
34 | #define SYS_PLL __REG(0xa0900188) | ||
35 | |||
36 | /* PLL FS status */ | ||
37 | #define SYS_PLL_FS __REGBITS(24, 23) | ||
38 | |||
39 | /* PLL ND status */ | ||
40 | #define SYS_PLL_ND __REGBITS(20, 16) | ||
41 | |||
42 | /* PLL Configuration register: PLL SW change */ | ||
43 | #define SYS_PLL_SWC __REGBIT(15) | ||
44 | #define SYS_PLL_SWC_NO __REGVAL(SYS_PLL_SWC, 0) | ||
45 | #define SYS_PLL_SWC_YES __REGVAL(SYS_PLL_SWC, 1) | ||
46 | |||
47 | /* Timer x Control register */ | ||
48 | #define SYS_TC(x) __REG2(0xa0900190, (x)) | ||
49 | |||
50 | /* Timer x Control register: Timer enable */ | ||
51 | #define SYS_TCx_TEN __REGBIT(15) | ||
52 | #define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 0) | ||
53 | #define SYS_TCx_TEN_EN __REGVAL(SYS_TCx_TEN, 1) | ||
54 | |||
55 | /* Timer x Control register: CPU debug mode */ | ||
56 | #define SYS_TCx_TDBG __REGBIT(10) | ||
57 | #define SYS_TCx_TDBG_CONT __REGVAL(SYS_TCx_TDBG, 0) | ||
58 | #define SYS_TCx_TDBG_STOP __REGVAL(SYS_TCx_TDBG, 1) | ||
59 | |||
60 | /* Timer x Control register: Interrupt clear */ | ||
61 | #define SYS_TCx_INTC __REGBIT(9) | ||
62 | #define SYS_TCx_INTC_UNSET __REGVAL(SYS_TCx_INTC, 0) | ||
63 | #define SYS_TCx_INTC_SET __REGVAL(SYS_TCx_INTC, 1) | ||
64 | |||
65 | /* Timer x Control register: Timer clock select */ | ||
66 | #define SYS_TCx_TLCS __REGBITS(8, 6) | ||
67 | #define SYS_TCx_TLCS_CPU __REGVAL(SYS_TCx_TLCS, 0) /* CPU clock */ | ||
68 | #define SYS_TCx_TLCS_DIV2 __REGVAL(SYS_TCx_TLCS, 1) /* CPU clock / 2 */ | ||
69 | #define SYS_TCx_TLCS_DIV4 __REGVAL(SYS_TCx_TLCS, 2) /* CPU clock / 4 */ | ||
70 | #define SYS_TCx_TLCS_DIV8 __REGVAL(SYS_TCx_TLCS, 3) /* CPU clock / 8 */ | ||
71 | #define SYS_TCx_TLCS_DIV16 __REGVAL(SYS_TCx_TLCS, 4) /* CPU clock / 16 */ | ||
72 | #define SYS_TCx_TLCS_DIV32 __REGVAL(SYS_TCx_TLCS, 5) /* CPU clock / 32 */ | ||
73 | #define SYS_TCx_TLCS_DIV64 __REGVAL(SYS_TCx_TLCS, 6) /* CPU clock / 64 */ | ||
74 | #define SYS_TCx_TLCS_EXT __REGVAL(SYS_TCx_TLCS, 7) | ||
75 | |||
76 | /* Timer x Control register: Timer mode */ | ||
77 | #define SYS_TCx_TM __REGBITS(5, 4) | ||
78 | #define SYS_TCx_TM_IEE __REGVAL(SYS_TCx_TM, 0) /* Internal timer or external event */ | ||
79 | #define SYS_TCx_TM_ELL __REGVAL(SYS_TCx_TM, 1) /* External low-level, gated timer */ | ||
80 | #define SYS_TCx_TM_EHL __REGVAL(SYS_TCx_TM, 2) /* External high-level, gated timer */ | ||
81 | #define SYS_TCx_TM_CONCAT __REGVAL(SYS_TCx_TM, 3) /* Concatenate the lower timer. */ | ||
82 | |||
83 | /* Timer x Control register: Interrupt select */ | ||
84 | #define SYS_TCx_INTS __REGBIT(3) | ||
85 | #define SYS_TCx_INTS_DIS __REGVAL(SYS_TCx_INTS, 0) | ||
86 | #define SYS_TCx_INTS_EN __REGVAL(SYS_TCx_INTS, 1) | ||
87 | |||
88 | /* Timer x Control register: Up/down select */ | ||
89 | #define SYS_TCx_UDS __REGBIT(2) | ||
90 | #define SYS_TCx_UDS_UP __REGVAL(SYS_TCx_UDS, 0) | ||
91 | #define SYS_TCx_UDS_DOWN __REGVAL(SYS_TCx_UDS, 1) | ||
92 | |||
93 | /* Timer x Control register: 32- or 16-bit timer */ | ||
94 | #define SYS_TCx_TSZ __REGBIT(1) | ||
95 | #define SYS_TCx_TSZ_16 __REGVAL(SYS_TCx_TSZ, 0) | ||
96 | #define SYS_TCx_TSZ_32 __REGVAL(SYS_TCx_TSZ, 1) | ||
97 | |||
98 | /* Timer x Control register: Reload enable */ | ||
99 | #define SYS_TCx_REN __REGBIT(0) | ||
100 | #define SYS_TCx_REN_DIS __REGVAL(SYS_TCx_REN, 0) | ||
101 | #define SYS_TCx_REN_EN __REGVAL(SYS_TCx_REN, 1) | ||
102 | |||
103 | /* System Memory Chip Select x Dynamic Memory Base */ | ||
104 | #define SYS_SMCSDMB(x) __REG2(0xa09001d0, (x) << 1) | ||
105 | |||
106 | /* System Memory Chip Select x Dynamic Memory Mask */ | ||
107 | #define SYS_SMCSDMM(x) __REG2(0xa09001d4, (x) << 1) | ||
108 | |||
109 | /* System Memory Chip Select x Static Memory Base */ | ||
110 | #define SYS_SMCSSMB(x) __REG2(0xa09001f0, (x) << 1) | ||
111 | |||
112 | /* System Memory Chip Select x Static Memory Base: Chip select x base */ | ||
113 | #define SYS_SMCSSMB_CSxB __REGBITS(31, 12) | ||
114 | |||
115 | /* System Memory Chip Select x Static Memory Mask */ | ||
116 | #define SYS_SMCSSMM(x) __REG2(0xa09001f4, (x) << 1) | ||
117 | |||
118 | /* System Memory Chip Select x Static Memory Mask: Chip select x mask */ | ||
119 | #define SYS_SMCSSMM_CSxM __REGBITS(31, 12) | ||
120 | |||
121 | /* System Memory Chip Select x Static Memory Mask: Chip select x enable */ | ||
122 | #define SYS_SMCSSMM_CSEx __REGBIT(0) | ||
123 | #define SYS_SMCSSMM_CSEx_DIS __REGVAL(SYS_SMCSSMM_CSEx, 0) | ||
124 | #define SYS_SMCSSMM_CSEx_EN __REGVAL(SYS_SMCSSMM_CSEx, 1) | ||
125 | |||
126 | /* General purpose, user-defined ID register */ | ||
127 | #define SYS_GENID __REG(0xa0900210) | ||
128 | |||
129 | /* External Interrupt x Control register */ | ||
130 | #define SYS_EIC(x) __REG2(0xa0900214, (x)) | ||
131 | |||
132 | /* External Interrupt x Control register: Status */ | ||
133 | #define SYS_EIC_STS __REGBIT(3) | ||
134 | |||
135 | /* External Interrupt x Control register: Clear */ | ||
136 | #define SYS_EIC_CLR __REGBIT(2) | ||
137 | |||
138 | /* External Interrupt x Control register: Polarity */ | ||
139 | #define SYS_EIC_PLTY __REGBIT(1) | ||
140 | #define SYS_EIC_PLTY_AH __REGVAL(SYS_EIC_PLTY, 0) | ||
141 | #define SYS_EIC_PLTY_AL __REGVAL(SYS_EIC_PLTY, 1) | ||
142 | |||
143 | /* External Interrupt x Control register: Level edge */ | ||
144 | #define SYS_EIC_LVEDG __REGBIT(0) | ||
145 | #define SYS_EIC_LVEDG_LEVEL __REGVAL(SYS_EIC_LVEDG, 0) | ||
146 | #define SYS_EIC_LVEDG_EDGE __REGVAL(SYS_EIC_LVEDG, 1) | ||
147 | |||
148 | #endif /* ifndef __ASM_ARCH_REGSSYSNS9360_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/system.h b/arch/arm/mach-ns9xxx/include/mach/system.h deleted file mode 100644 index 1561588ca364..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/system.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_SYSTEM_H | ||
12 | #define __ASM_ARCH_SYSTEM_H | ||
13 | |||
14 | #include <asm/proc-fns.h> | ||
15 | #include <mach/processor.h> | ||
16 | #include <mach/processor-ns9360.h> | ||
17 | |||
18 | static inline void arch_idle(void) | ||
19 | { | ||
20 | cpu_do_idle(); | ||
21 | } | ||
22 | |||
23 | static inline void arch_reset(char mode, const char *cmd) | ||
24 | { | ||
25 | #ifdef CONFIG_PROCESSOR_NS9360 | ||
26 | if (processor_is_ns9360()) | ||
27 | ns9360_reset(mode); | ||
28 | else | ||
29 | #endif | ||
30 | BUG(); | ||
31 | |||
32 | BUG(); | ||
33 | } | ||
34 | |||
35 | #endif /* ifndef __ASM_ARCH_SYSTEM_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/timex.h b/arch/arm/mach-ns9xxx/include/mach/timex.h deleted file mode 100644 index 734a8d8bd578..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/timex.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/timex.h | ||
3 | * | ||
4 | * Copyright (C) 2005-2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_TIMEX_H | ||
12 | #define __ASM_ARCH_TIMEX_H | ||
13 | |||
14 | /* | ||
15 | * value for CLOCK_TICK_RATE stolen from arch/arm/mach-s3c2410/include/mach/timex.h. | ||
16 | * See there for an explanation. | ||
17 | */ | ||
18 | #define CLOCK_TICK_RATE 12000000 | ||
19 | |||
20 | #endif /* ifndef __ASM_ARCH_TIMEX_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/uncompress.h b/arch/arm/mach-ns9xxx/include/mach/uncompress.h deleted file mode 100644 index 770a68c46e81..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,164 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
12 | #define __ASM_ARCH_UNCOMPRESS_H | ||
13 | |||
14 | #include <linux/io.h> | ||
15 | |||
16 | #define __REG(x) ((void __iomem __force *)(x)) | ||
17 | |||
18 | static void putc_dummy(char c, void __iomem *base) | ||
19 | { | ||
20 | /* nothing */ | ||
21 | } | ||
22 | |||
23 | static int timeout; | ||
24 | |||
25 | static void putc_ns9360(char c, void __iomem *base) | ||
26 | { | ||
27 | do { | ||
28 | if (timeout) | ||
29 | --timeout; | ||
30 | |||
31 | if (__raw_readl(base + 8) & (1 << 3)) { | ||
32 | __raw_writeb(c, base + 16); | ||
33 | timeout = 0x10000; | ||
34 | break; | ||
35 | } | ||
36 | } while (timeout); | ||
37 | } | ||
38 | |||
39 | static void putc_a9m9750dev(char c, void __iomem *base) | ||
40 | { | ||
41 | do { | ||
42 | if (timeout) | ||
43 | --timeout; | ||
44 | |||
45 | if (__raw_readb(base + 5) & (1 << 5)) { | ||
46 | __raw_writeb(c, base); | ||
47 | timeout = 0x10000; | ||
48 | break; | ||
49 | } | ||
50 | } while (timeout); | ||
51 | |||
52 | } | ||
53 | |||
54 | static void putc_ns921x(char c, void __iomem *base) | ||
55 | { | ||
56 | do { | ||
57 | if (timeout) | ||
58 | --timeout; | ||
59 | |||
60 | if (!(__raw_readl(base) & (1 << 11))) { | ||
61 | __raw_writeb(c, base + 0x0028); | ||
62 | timeout = 0x10000; | ||
63 | break; | ||
64 | } | ||
65 | } while (timeout); | ||
66 | } | ||
67 | |||
68 | #define MSCS __REG(0xA0900184) | ||
69 | |||
70 | #define NS9360_UARTA __REG(0x90200040) | ||
71 | #define NS9360_UARTB __REG(0x90200000) | ||
72 | #define NS9360_UARTC __REG(0x90300000) | ||
73 | #define NS9360_UARTD __REG(0x90300040) | ||
74 | |||
75 | #define NS9360_UART_ENABLED(base) \ | ||
76 | (__raw_readl(NS9360_UARTA) & (1 << 31)) | ||
77 | |||
78 | #define A9M9750DEV_UARTA __REG(0x40000000) | ||
79 | |||
80 | #define NS921XSYS_CLOCK __REG(0xa090017c) | ||
81 | #define NS921X_UARTA __REG(0x90010000) | ||
82 | #define NS921X_UARTB __REG(0x90018000) | ||
83 | #define NS921X_UARTC __REG(0x90020000) | ||
84 | #define NS921X_UARTD __REG(0x90028000) | ||
85 | |||
86 | #define NS921X_UART_ENABLED(base) \ | ||
87 | (__raw_readl((base) + 0x1000) & (1 << 29)) | ||
88 | |||
89 | static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base) | ||
90 | { | ||
91 | timeout = 0x10000; | ||
92 | if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) { | ||
93 | /* ns9360 or ns9750 */ | ||
94 | if (NS9360_UART_ENABLED(NS9360_UARTA)) { | ||
95 | *putc = putc_ns9360; | ||
96 | *base = NS9360_UARTA; | ||
97 | return; | ||
98 | } else if (NS9360_UART_ENABLED(NS9360_UARTB)) { | ||
99 | *putc = putc_ns9360; | ||
100 | *base = NS9360_UARTB; | ||
101 | return; | ||
102 | } else if (NS9360_UART_ENABLED(NS9360_UARTC)) { | ||
103 | *putc = putc_ns9360; | ||
104 | *base = NS9360_UARTC; | ||
105 | return; | ||
106 | } else if (NS9360_UART_ENABLED(NS9360_UARTD)) { | ||
107 | *putc = putc_ns9360; | ||
108 | *base = NS9360_UARTD; | ||
109 | return; | ||
110 | } else if (__raw_readl(__REG(0xa09001f4)) == 0xfffff001) { | ||
111 | *putc = putc_a9m9750dev; | ||
112 | *base = A9M9750DEV_UARTA; | ||
113 | return; | ||
114 | } | ||
115 | } else if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x02) { | ||
116 | /* ns921x */ | ||
117 | u32 clock = __raw_readl(NS921XSYS_CLOCK); | ||
118 | |||
119 | if ((clock & (1 << 1)) && | ||
120 | NS921X_UART_ENABLED(NS921X_UARTA)) { | ||
121 | *putc = putc_ns921x; | ||
122 | *base = NS921X_UARTA; | ||
123 | return; | ||
124 | } else if ((clock & (1 << 2)) && | ||
125 | NS921X_UART_ENABLED(NS921X_UARTB)) { | ||
126 | *putc = putc_ns921x; | ||
127 | *base = NS921X_UARTB; | ||
128 | return; | ||
129 | } else if ((clock & (1 << 3)) && | ||
130 | NS921X_UART_ENABLED(NS921X_UARTC)) { | ||
131 | *putc = putc_ns921x; | ||
132 | *base = NS921X_UARTC; | ||
133 | return; | ||
134 | } else if ((clock & (1 << 4)) && | ||
135 | NS921X_UART_ENABLED(NS921X_UARTD)) { | ||
136 | *putc = putc_ns921x; | ||
137 | *base = NS921X_UARTD; | ||
138 | return; | ||
139 | } | ||
140 | } | ||
141 | |||
142 | *putc = putc_dummy; | ||
143 | } | ||
144 | |||
145 | void (*myputc)(char, void __iomem *); | ||
146 | void __iomem *base; | ||
147 | |||
148 | static void putc(char c) | ||
149 | { | ||
150 | myputc(c, base); | ||
151 | } | ||
152 | |||
153 | static void arch_decomp_setup(void) | ||
154 | { | ||
155 | autodetect(&myputc, &base); | ||
156 | } | ||
157 | #define arch_decomp_wdog() | ||
158 | |||
159 | static void flush(void) | ||
160 | { | ||
161 | /* nothing */ | ||
162 | } | ||
163 | |||
164 | #endif /* ifndef __ASM_ARCH_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/vmalloc.h b/arch/arm/mach-ns9xxx/include/mach/vmalloc.h deleted file mode 100644 index c8651974c4b0..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_VMALLOC_H | ||
12 | #define __ASM_ARCH_VMALLOC_H | ||
13 | |||
14 | #define VMALLOC_END (0xf0000000UL) | ||
15 | |||
16 | #endif /* ifndef __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c deleted file mode 100644 index 37ab0a2b83ad..000000000000 --- a/arch/arm/mach-ns9xxx/irq.c +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/irq.c | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/interrupt.h> | ||
12 | #include <linux/kernel_stat.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <asm/mach/irq.h> | ||
15 | #include <mach/regs-sys-common.h> | ||
16 | #include <mach/irqs.h> | ||
17 | #include <mach/board.h> | ||
18 | |||
19 | #include "generic.h" | ||
20 | |||
21 | /* simple interrupt prio table: prio(x) < prio(y) <=> x < y */ | ||
22 | #define irq2prio(i) (i) | ||
23 | #define prio2irq(p) (p) | ||
24 | |||
25 | static void ns9xxx_mask_irq(struct irq_data *d) | ||
26 | { | ||
27 | /* XXX: better use cpp symbols */ | ||
28 | int prio = irq2prio(d->irq); | ||
29 | u32 ic = __raw_readl(SYS_IC(prio / 4)); | ||
30 | ic &= ~(1 << (7 + 8 * (3 - (prio & 3)))); | ||
31 | __raw_writel(ic, SYS_IC(prio / 4)); | ||
32 | } | ||
33 | |||
34 | static void ns9xxx_eoi_irq(struct irq_data *d) | ||
35 | { | ||
36 | __raw_writel(0, SYS_ISRADDR); | ||
37 | } | ||
38 | |||
39 | static void ns9xxx_unmask_irq(struct irq_data *d) | ||
40 | { | ||
41 | /* XXX: better use cpp symbols */ | ||
42 | int prio = irq2prio(d->irq); | ||
43 | u32 ic = __raw_readl(SYS_IC(prio / 4)); | ||
44 | ic |= 1 << (7 + 8 * (3 - (prio & 3))); | ||
45 | __raw_writel(ic, SYS_IC(prio / 4)); | ||
46 | } | ||
47 | |||
48 | static struct irq_chip ns9xxx_chip = { | ||
49 | .irq_eoi = ns9xxx_eoi_irq, | ||
50 | .irq_mask = ns9xxx_mask_irq, | ||
51 | .irq_unmask = ns9xxx_unmask_irq, | ||
52 | }; | ||
53 | |||
54 | void __init ns9xxx_init_irq(void) | ||
55 | { | ||
56 | int i; | ||
57 | |||
58 | /* disable all IRQs */ | ||
59 | for (i = 0; i < 8; ++i) | ||
60 | __raw_writel(prio2irq(4 * i) << 24 | | ||
61 | prio2irq(4 * i + 1) << 16 | | ||
62 | prio2irq(4 * i + 2) << 8 | | ||
63 | prio2irq(4 * i + 3), | ||
64 | SYS_IC(i)); | ||
65 | |||
66 | for (i = 0; i < 32; ++i) | ||
67 | __raw_writel(prio2irq(i), SYS_IVA(i)); | ||
68 | |||
69 | for (i = 0; i <= 31; ++i) { | ||
70 | irq_set_chip_and_handler(i, &ns9xxx_chip, handle_fasteoi_irq); | ||
71 | set_irq_flags(i, IRQF_VALID); | ||
72 | irq_set_status_flags(i, IRQ_LEVEL); | ||
73 | } | ||
74 | } | ||
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c deleted file mode 100644 index 2858417d8d8a..000000000000 --- a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/mach-cc9p9360dev.c | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <asm/mach/arch.h> | ||
12 | #include <asm/mach-types.h> | ||
13 | |||
14 | #include <mach/processor-ns9360.h> | ||
15 | |||
16 | #include "board-a9m9750dev.h" | ||
17 | #include "generic.h" | ||
18 | |||
19 | static void __init mach_cc9p9360dev_map_io(void) | ||
20 | { | ||
21 | ns9360_map_io(); | ||
22 | board_a9m9750dev_map_io(); | ||
23 | } | ||
24 | |||
25 | static void __init mach_cc9p9360dev_init_irq(void) | ||
26 | { | ||
27 | ns9xxx_init_irq(); | ||
28 | board_a9m9750dev_init_irq(); | ||
29 | } | ||
30 | |||
31 | static void __init mach_cc9p9360dev_init_machine(void) | ||
32 | { | ||
33 | ns9xxx_init_machine(); | ||
34 | board_a9m9750dev_init_machine(); | ||
35 | } | ||
36 | |||
37 | MACHINE_START(CC9P9360DEV, "Digi ConnectCore 9P 9360 on an A9M9750 Devboard") | ||
38 | .map_io = mach_cc9p9360dev_map_io, | ||
39 | .init_irq = mach_cc9p9360dev_init_irq, | ||
40 | .init_machine = mach_cc9p9360dev_init_machine, | ||
41 | .timer = &ns9360_timer, | ||
42 | .boot_params = 0x100, | ||
43 | MACHINE_END | ||
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360js.c b/arch/arm/mach-ns9xxx/mach-cc9p9360js.c deleted file mode 100644 index 729f68da4293..000000000000 --- a/arch/arm/mach-ns9xxx/mach-cc9p9360js.c +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/mach-cc9p9360js.c | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <asm/mach/arch.h> | ||
12 | #include <asm/mach-types.h> | ||
13 | |||
14 | #include <mach/processor-ns9360.h> | ||
15 | |||
16 | #include "board-jscc9p9360.h" | ||
17 | #include "generic.h" | ||
18 | |||
19 | static void __init mach_cc9p9360js_init_machine(void) | ||
20 | { | ||
21 | ns9xxx_init_machine(); | ||
22 | board_jscc9p9360_init_machine(); | ||
23 | } | ||
24 | |||
25 | MACHINE_START(CC9P9360JS, "Digi ConnectCore 9P 9360 on an JSCC9P9360 Devboard") | ||
26 | .map_io = ns9360_map_io, | ||
27 | .init_irq = ns9xxx_init_irq, | ||
28 | .init_machine = mach_cc9p9360js_init_machine, | ||
29 | .timer = &ns9360_timer, | ||
30 | .boot_params = 0x100, | ||
31 | MACHINE_END | ||
diff --git a/arch/arm/mach-ns9xxx/plat-serial8250.c b/arch/arm/mach-ns9xxx/plat-serial8250.c deleted file mode 100644 index 463e92465fda..000000000000 --- a/arch/arm/mach-ns9xxx/plat-serial8250.c +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/plat-serial8250.c | ||
3 | * | ||
4 | * Copyright (C) 2008 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/serial_8250.h> | ||
13 | #include <linux/slab.h> | ||
14 | |||
15 | #include <mach/regs-board-a9m9750dev.h> | ||
16 | #include <mach/board.h> | ||
17 | |||
18 | #define DRIVER_NAME "serial8250" | ||
19 | |||
20 | static int __init ns9xxx_plat_serial8250_init(void) | ||
21 | { | ||
22 | struct plat_serial8250_port *pdata; | ||
23 | struct platform_device *pdev; | ||
24 | int ret = -ENOMEM; | ||
25 | int i; | ||
26 | |||
27 | if (!board_is_a9m9750dev()) | ||
28 | return -ENODEV; | ||
29 | |||
30 | pdev = platform_device_alloc(DRIVER_NAME, 0); | ||
31 | if (!pdev) | ||
32 | goto err; | ||
33 | |||
34 | pdata = kzalloc(5 * sizeof(*pdata), GFP_KERNEL); | ||
35 | if (!pdata) | ||
36 | goto err; | ||
37 | |||
38 | pdev->dev.platform_data = pdata; | ||
39 | |||
40 | pdata[0].iobase = FPGA_UARTA_BASE; | ||
41 | pdata[1].iobase = FPGA_UARTB_BASE; | ||
42 | pdata[2].iobase = FPGA_UARTC_BASE; | ||
43 | pdata[3].iobase = FPGA_UARTD_BASE; | ||
44 | |||
45 | for (i = 0; i < 4; ++i) { | ||
46 | pdata[i].membase = (void __iomem *)pdata[i].iobase; | ||
47 | pdata[i].mapbase = pdata[i].iobase; | ||
48 | pdata[i].iotype = UPIO_MEM; | ||
49 | pdata[i].uartclk = 18432000; | ||
50 | pdata[i].flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ; | ||
51 | } | ||
52 | |||
53 | pdata[0].irq = IRQ_FPGA_UARTA; | ||
54 | pdata[1].irq = IRQ_FPGA_UARTB; | ||
55 | pdata[2].irq = IRQ_FPGA_UARTC; | ||
56 | pdata[3].irq = IRQ_FPGA_UARTD; | ||
57 | |||
58 | ret = platform_device_add(pdev); | ||
59 | if (ret) { | ||
60 | err: | ||
61 | platform_device_put(pdev); | ||
62 | |||
63 | printk(KERN_WARNING "Could not add %s (errno=%d)\n", | ||
64 | DRIVER_NAME, ret); | ||
65 | } | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | |||
70 | arch_initcall(ns9xxx_plat_serial8250_init); | ||
diff --git a/arch/arm/mach-ns9xxx/processor-ns9360.c b/arch/arm/mach-ns9xxx/processor-ns9360.c deleted file mode 100644 index aed1999d24fc..000000000000 --- a/arch/arm/mach-ns9xxx/processor-ns9360.c +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/processor-ns9360.c | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/io.h> | ||
12 | #include <linux/kernel.h> | ||
13 | |||
14 | #include <asm/page.h> | ||
15 | #include <asm/mach/map.h> | ||
16 | #include <mach/processor-ns9360.h> | ||
17 | #include <mach/regs-sys-ns9360.h> | ||
18 | |||
19 | void ns9360_reset(char mode) | ||
20 | { | ||
21 | u32 reg; | ||
22 | |||
23 | reg = __raw_readl(SYS_PLL) >> 16; | ||
24 | REGSET(reg, SYS_PLL, SWC, YES); | ||
25 | __raw_writel(reg, SYS_PLL); | ||
26 | } | ||
27 | |||
28 | #define CRYSTAL 29491200 /* Hz */ | ||
29 | unsigned long ns9360_systemclock(void) | ||
30 | { | ||
31 | u32 pll = __raw_readl(SYS_PLL); | ||
32 | return CRYSTAL * (REGGETIM(pll, SYS_PLL, ND) + 1) | ||
33 | >> REGGETIM(pll, SYS_PLL, FS); | ||
34 | } | ||
35 | |||
36 | static struct map_desc ns9360_io_desc[] __initdata = { | ||
37 | { /* BBus */ | ||
38 | .virtual = io_p2v(0x90000000), | ||
39 | .pfn = __phys_to_pfn(0x90000000), | ||
40 | .length = 0x00700000, | ||
41 | .type = MT_DEVICE, | ||
42 | }, { /* AHB */ | ||
43 | .virtual = io_p2v(0xa0100000), | ||
44 | .pfn = __phys_to_pfn(0xa0100000), | ||
45 | .length = 0x00900000, | ||
46 | .type = MT_DEVICE, | ||
47 | }, | ||
48 | }; | ||
49 | |||
50 | void __init ns9360_map_io(void) | ||
51 | { | ||
52 | iotable_init(ns9360_io_desc, ARRAY_SIZE(ns9360_io_desc)); | ||
53 | } | ||
diff --git a/arch/arm/mach-ns9xxx/time-ns9360.c b/arch/arm/mach-ns9xxx/time-ns9360.c deleted file mode 100644 index 9ca32f55728b..000000000000 --- a/arch/arm/mach-ns9xxx/time-ns9360.c +++ /dev/null | |||
@@ -1,181 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/time-ns9360.c | ||
3 | * | ||
4 | * Copyright (C) 2006,2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/jiffies.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <linux/irq.h> | ||
14 | #include <linux/stringify.h> | ||
15 | #include <linux/clocksource.h> | ||
16 | #include <linux/clockchips.h> | ||
17 | |||
18 | #include <mach/processor-ns9360.h> | ||
19 | #include <mach/regs-sys-ns9360.h> | ||
20 | #include <mach/irqs.h> | ||
21 | #include <mach/system.h> | ||
22 | #include "generic.h" | ||
23 | |||
24 | #define TIMER_CLOCKSOURCE 0 | ||
25 | #define TIMER_CLOCKEVENT 1 | ||
26 | static u32 latch; | ||
27 | |||
28 | static cycle_t ns9360_clocksource_read(struct clocksource *cs) | ||
29 | { | ||
30 | return __raw_readl(SYS_TR(TIMER_CLOCKSOURCE)); | ||
31 | } | ||
32 | |||
33 | static struct clocksource ns9360_clocksource = { | ||
34 | .name = "ns9360-timer" __stringify(TIMER_CLOCKSOURCE), | ||
35 | .rating = 300, | ||
36 | .read = ns9360_clocksource_read, | ||
37 | .mask = CLOCKSOURCE_MASK(32), | ||
38 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
39 | }; | ||
40 | |||
41 | static void ns9360_clockevent_setmode(enum clock_event_mode mode, | ||
42 | struct clock_event_device *clk) | ||
43 | { | ||
44 | u32 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT)); | ||
45 | |||
46 | switch (mode) { | ||
47 | case CLOCK_EVT_MODE_PERIODIC: | ||
48 | __raw_writel(latch, SYS_TRC(TIMER_CLOCKEVENT)); | ||
49 | REGSET(tc, SYS_TCx, REN, EN); | ||
50 | REGSET(tc, SYS_TCx, INTS, EN); | ||
51 | REGSET(tc, SYS_TCx, TEN, EN); | ||
52 | break; | ||
53 | |||
54 | case CLOCK_EVT_MODE_ONESHOT: | ||
55 | REGSET(tc, SYS_TCx, REN, DIS); | ||
56 | REGSET(tc, SYS_TCx, INTS, EN); | ||
57 | |||
58 | /* fall through */ | ||
59 | |||
60 | case CLOCK_EVT_MODE_UNUSED: | ||
61 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
62 | case CLOCK_EVT_MODE_RESUME: | ||
63 | default: | ||
64 | REGSET(tc, SYS_TCx, TEN, DIS); | ||
65 | break; | ||
66 | } | ||
67 | |||
68 | __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT)); | ||
69 | } | ||
70 | |||
71 | static int ns9360_clockevent_setnextevent(unsigned long evt, | ||
72 | struct clock_event_device *clk) | ||
73 | { | ||
74 | u32 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT)); | ||
75 | |||
76 | if (REGGET(tc, SYS_TCx, TEN)) { | ||
77 | REGSET(tc, SYS_TCx, TEN, DIS); | ||
78 | __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT)); | ||
79 | } | ||
80 | |||
81 | REGSET(tc, SYS_TCx, TEN, EN); | ||
82 | |||
83 | __raw_writel(evt, SYS_TRC(TIMER_CLOCKEVENT)); | ||
84 | |||
85 | __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT)); | ||
86 | |||
87 | return 0; | ||
88 | } | ||
89 | |||
90 | static struct clock_event_device ns9360_clockevent_device = { | ||
91 | .name = "ns9360-timer" __stringify(TIMER_CLOCKEVENT), | ||
92 | .shift = 20, | ||
93 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | ||
94 | .set_mode = ns9360_clockevent_setmode, | ||
95 | .set_next_event = ns9360_clockevent_setnextevent, | ||
96 | }; | ||
97 | |||
98 | static irqreturn_t ns9360_clockevent_handler(int irq, void *dev_id) | ||
99 | { | ||
100 | int timerno = irq - IRQ_NS9360_TIMER0; | ||
101 | u32 tc; | ||
102 | |||
103 | struct clock_event_device *evt = &ns9360_clockevent_device; | ||
104 | |||
105 | /* clear irq */ | ||
106 | tc = __raw_readl(SYS_TC(timerno)); | ||
107 | if (REGGET(tc, SYS_TCx, REN) == SYS_TCx_REN_DIS) { | ||
108 | REGSET(tc, SYS_TCx, TEN, DIS); | ||
109 | __raw_writel(tc, SYS_TC(timerno)); | ||
110 | } | ||
111 | REGSET(tc, SYS_TCx, INTC, SET); | ||
112 | __raw_writel(tc, SYS_TC(timerno)); | ||
113 | REGSET(tc, SYS_TCx, INTC, UNSET); | ||
114 | __raw_writel(tc, SYS_TC(timerno)); | ||
115 | |||
116 | evt->event_handler(evt); | ||
117 | |||
118 | return IRQ_HANDLED; | ||
119 | } | ||
120 | |||
121 | static struct irqaction ns9360_clockevent_action = { | ||
122 | .name = "ns9360-timer" __stringify(TIMER_CLOCKEVENT), | ||
123 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
124 | .handler = ns9360_clockevent_handler, | ||
125 | }; | ||
126 | |||
127 | static void __init ns9360_timer_init(void) | ||
128 | { | ||
129 | int tc; | ||
130 | |||
131 | tc = __raw_readl(SYS_TC(TIMER_CLOCKSOURCE)); | ||
132 | if (REGGET(tc, SYS_TCx, TEN)) { | ||
133 | REGSET(tc, SYS_TCx, TEN, DIS); | ||
134 | __raw_writel(tc, SYS_TC(TIMER_CLOCKSOURCE)); | ||
135 | } | ||
136 | |||
137 | __raw_writel(0, SYS_TRC(TIMER_CLOCKSOURCE)); | ||
138 | |||
139 | REGSET(tc, SYS_TCx, TEN, EN); | ||
140 | REGSET(tc, SYS_TCx, TDBG, STOP); | ||
141 | REGSET(tc, SYS_TCx, TLCS, CPU); | ||
142 | REGSET(tc, SYS_TCx, TM, IEE); | ||
143 | REGSET(tc, SYS_TCx, INTS, DIS); | ||
144 | REGSET(tc, SYS_TCx, UDS, UP); | ||
145 | REGSET(tc, SYS_TCx, TSZ, 32); | ||
146 | REGSET(tc, SYS_TCx, REN, EN); | ||
147 | |||
148 | __raw_writel(tc, SYS_TC(TIMER_CLOCKSOURCE)); | ||
149 | |||
150 | clocksource_register_hz(&ns9360_clocksource, ns9360_cpuclock()); | ||
151 | |||
152 | latch = SH_DIV(ns9360_cpuclock(), HZ, 0); | ||
153 | |||
154 | tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT)); | ||
155 | REGSET(tc, SYS_TCx, TEN, DIS); | ||
156 | REGSET(tc, SYS_TCx, TDBG, STOP); | ||
157 | REGSET(tc, SYS_TCx, TLCS, CPU); | ||
158 | REGSET(tc, SYS_TCx, TM, IEE); | ||
159 | REGSET(tc, SYS_TCx, INTS, DIS); | ||
160 | REGSET(tc, SYS_TCx, UDS, DOWN); | ||
161 | REGSET(tc, SYS_TCx, TSZ, 32); | ||
162 | REGSET(tc, SYS_TCx, REN, EN); | ||
163 | __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT)); | ||
164 | |||
165 | ns9360_clockevent_device.mult = div_sc(ns9360_cpuclock(), | ||
166 | NSEC_PER_SEC, ns9360_clockevent_device.shift); | ||
167 | ns9360_clockevent_device.max_delta_ns = | ||
168 | clockevent_delta2ns(-1, &ns9360_clockevent_device); | ||
169 | ns9360_clockevent_device.min_delta_ns = | ||
170 | clockevent_delta2ns(1, &ns9360_clockevent_device); | ||
171 | |||
172 | ns9360_clockevent_device.cpumask = cpumask_of(0); | ||
173 | clockevents_register_device(&ns9360_clockevent_device); | ||
174 | |||
175 | setup_irq(IRQ_NS9360_TIMER0 + TIMER_CLOCKEVENT, | ||
176 | &ns9360_clockevent_action); | ||
177 | } | ||
178 | |||
179 | struct sys_timer ns9360_timer = { | ||
180 | .init = ns9360_timer_init, | ||
181 | }; | ||
diff --git a/arch/arm/mach-spear3xx/Kconfig b/arch/arm/mach-spear3xx/Kconfig index 20d1317cc486..2cee6b0de371 100644 --- a/arch/arm/mach-spear3xx/Kconfig +++ b/arch/arm/mach-spear3xx/Kconfig | |||
@@ -4,9 +4,26 @@ | |||
4 | 4 | ||
5 | if ARCH_SPEAR3XX | 5 | if ARCH_SPEAR3XX |
6 | 6 | ||
7 | choice | 7 | menu "SPEAr3xx Implementations" |
8 | prompt "SPEAr3XX Family" | 8 | config BOARD_SPEAR300_EVB |
9 | default MACH_SPEAR300 | 9 | bool "SPEAr300 Evaluation Board" |
10 | select MACH_SPEAR300 | ||
11 | help | ||
12 | Supports ST SPEAr300 Evaluation Board | ||
13 | |||
14 | config BOARD_SPEAR310_EVB | ||
15 | bool "SPEAr310 Evaluation Board" | ||
16 | select MACH_SPEAR310 | ||
17 | help | ||
18 | Supports ST SPEAr310 Evaluation Board | ||
19 | |||
20 | config BOARD_SPEAR320_EVB | ||
21 | bool "SPEAr320 Evaluation Board" | ||
22 | select MACH_SPEAR320 | ||
23 | help | ||
24 | Supports ST SPEAr320 Evaluation Board | ||
25 | |||
26 | endmenu | ||
10 | 27 | ||
11 | config MACH_SPEAR300 | 28 | config MACH_SPEAR300 |
12 | bool "SPEAr300" | 29 | bool "SPEAr300" |
@@ -23,11 +40,4 @@ config MACH_SPEAR320 | |||
23 | help | 40 | help |
24 | Supports ST SPEAr320 Machine | 41 | Supports ST SPEAr320 Machine |
25 | 42 | ||
26 | endchoice | ||
27 | |||
28 | # Adding SPEAr3XX machine specific configuration files | ||
29 | source "arch/arm/mach-spear3xx/Kconfig300" | ||
30 | source "arch/arm/mach-spear3xx/Kconfig310" | ||
31 | source "arch/arm/mach-spear3xx/Kconfig320" | ||
32 | |||
33 | endif #ARCH_SPEAR3XX | 43 | endif #ARCH_SPEAR3XX |
diff --git a/arch/arm/mach-spear3xx/Kconfig300 b/arch/arm/mach-spear3xx/Kconfig300 deleted file mode 100644 index c519a05b4ab4..000000000000 --- a/arch/arm/mach-spear3xx/Kconfig300 +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | # | ||
2 | # SPEAr300 machine configuration file | ||
3 | # | ||
4 | |||
5 | if MACH_SPEAR300 | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr300 Boards" | ||
9 | default BOARD_SPEAR300_EVB | ||
10 | |||
11 | config BOARD_SPEAR300_EVB | ||
12 | bool "SPEAr300 Evaluation Board" | ||
13 | help | ||
14 | Supports ST SPEAr300 Evaluation Board | ||
15 | endchoice | ||
16 | |||
17 | endif #MACH_SPEAR300 | ||
diff --git a/arch/arm/mach-spear3xx/Kconfig310 b/arch/arm/mach-spear3xx/Kconfig310 deleted file mode 100644 index 60e7442d75bd..000000000000 --- a/arch/arm/mach-spear3xx/Kconfig310 +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | # | ||
2 | # SPEAr310 machine configuration file | ||
3 | # | ||
4 | |||
5 | if MACH_SPEAR310 | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr310 Boards" | ||
9 | default BOARD_SPEAR310_EVB | ||
10 | |||
11 | config BOARD_SPEAR310_EVB | ||
12 | bool "SPEAr310 Evaluation Board" | ||
13 | help | ||
14 | Supports ST SPEAr310 Evaluation Board | ||
15 | endchoice | ||
16 | |||
17 | endif #MACH_SPEAR310 | ||
diff --git a/arch/arm/mach-spear3xx/Kconfig320 b/arch/arm/mach-spear3xx/Kconfig320 deleted file mode 100644 index 1c1d438399b8..000000000000 --- a/arch/arm/mach-spear3xx/Kconfig320 +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | # | ||
2 | # SPEAr320 machine configuration file | ||
3 | # | ||
4 | |||
5 | if MACH_SPEAR320 | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr320 Boards" | ||
9 | default BOARD_SPEAR320_EVB | ||
10 | |||
11 | config BOARD_SPEAR320_EVB | ||
12 | bool "SPEAr320 Evaluation Board" | ||
13 | help | ||
14 | Supports ST SPEAr320 Evaluation Board | ||
15 | endchoice | ||
16 | |||
17 | endif #MACH_SPEAR320 | ||
diff --git a/arch/arm/mach-spear3xx/clock.c b/arch/arm/mach-spear3xx/clock.c index 98bc7edc95a6..f67860cd649f 100644 --- a/arch/arm/mach-spear3xx/clock.c +++ b/arch/arm/mach-spear3xx/clock.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <asm/mach-types.h> | ||
16 | #include <plat/clock.h> | 17 | #include <plat/clock.h> |
17 | #include <mach/misc_regs.h> | 18 | #include <mach/misc_regs.h> |
18 | 19 | ||
@@ -688,56 +689,71 @@ static struct clk_lookup spear_clk_lookups[] = { | |||
688 | { .dev_id = "adc", .clk = &adc_clk}, | 689 | { .dev_id = "adc", .clk = &adc_clk}, |
689 | { .dev_id = "ssp-pl022.0", .clk = &ssp0_clk}, | 690 | { .dev_id = "ssp-pl022.0", .clk = &ssp0_clk}, |
690 | { .dev_id = "gpio", .clk = &gpio_clk}, | 691 | { .dev_id = "gpio", .clk = &gpio_clk}, |
691 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | 692 | }; |
692 | { .dev_id = "physmap-flash", .clk = &emi_clk}, | ||
693 | #endif | ||
694 | #if defined(CONFIG_MACH_SPEAR300) || defined(CONFIG_MACH_SPEAR310) || \ | ||
695 | defined(CONFIG_MACH_SPEAR320) | ||
696 | { .con_id = "fsmc", .clk = &fsmc_clk}, | ||
697 | #endif | ||
698 | |||
699 | /* common clocks to spear310 and spear320 */ | ||
700 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | ||
701 | { .dev_id = "uart1", .clk = &uart1_clk}, | ||
702 | { .dev_id = "uart2", .clk = &uart2_clk}, | ||
703 | #endif | ||
704 | |||
705 | /* common clock to spear300 and spear320 */ | ||
706 | #if defined(CONFIG_MACH_SPEAR300) || defined(CONFIG_MACH_SPEAR320) | ||
707 | { .dev_id = "clcd", .clk = &clcd_clk}, | ||
708 | { .dev_id = "sdhci", .clk = &sdhci_clk}, | ||
709 | #endif /* CONFIG_MACH_SPEAR300 || CONFIG_MACH_SPEAR320 */ | ||
710 | 693 | ||
711 | /* spear300 machine specific clock structures */ | 694 | /* array of all spear 300 clock lookups */ |
712 | #ifdef CONFIG_MACH_SPEAR300 | 695 | #ifdef CONFIG_MACH_SPEAR300 |
696 | static struct clk_lookup spear300_clk_lookups[] = { | ||
697 | { .dev_id = "clcd", .clk = &clcd_clk}, | ||
698 | { .con_id = "fsmc", .clk = &fsmc_clk}, | ||
713 | { .dev_id = "gpio1", .clk = &gpio1_clk}, | 699 | { .dev_id = "gpio1", .clk = &gpio1_clk}, |
714 | { .dev_id = "keyboard", .clk = &kbd_clk}, | 700 | { .dev_id = "keyboard", .clk = &kbd_clk}, |
701 | { .dev_id = "sdhci", .clk = &sdhci_clk}, | ||
702 | }; | ||
715 | #endif | 703 | #endif |
716 | 704 | ||
717 | /* spear310 machine specific clock structures */ | 705 | /* array of all spear 310 clock lookups */ |
718 | #ifdef CONFIG_MACH_SPEAR310 | 706 | #ifdef CONFIG_MACH_SPEAR310 |
707 | static struct clk_lookup spear310_clk_lookups[] = { | ||
708 | { .con_id = "fsmc", .clk = &fsmc_clk}, | ||
709 | { .con_id = "emi", .clk = &emi_clk}, | ||
710 | { .dev_id = "uart1", .clk = &uart1_clk}, | ||
711 | { .dev_id = "uart2", .clk = &uart2_clk}, | ||
719 | { .dev_id = "uart3", .clk = &uart3_clk}, | 712 | { .dev_id = "uart3", .clk = &uart3_clk}, |
720 | { .dev_id = "uart4", .clk = &uart4_clk}, | 713 | { .dev_id = "uart4", .clk = &uart4_clk}, |
721 | { .dev_id = "uart5", .clk = &uart5_clk}, | 714 | { .dev_id = "uart5", .clk = &uart5_clk}, |
722 | 715 | }; | |
723 | #endif | 716 | #endif |
724 | /* spear320 machine specific clock structures */ | 717 | |
718 | /* array of all spear 320 clock lookups */ | ||
725 | #ifdef CONFIG_MACH_SPEAR320 | 719 | #ifdef CONFIG_MACH_SPEAR320 |
720 | static struct clk_lookup spear320_clk_lookups[] = { | ||
721 | { .dev_id = "clcd", .clk = &clcd_clk}, | ||
722 | { .con_id = "fsmc", .clk = &fsmc_clk}, | ||
723 | { .dev_id = "i2c_designware.1", .clk = &i2c1_clk}, | ||
724 | { .con_id = "emi", .clk = &emi_clk}, | ||
725 | { .dev_id = "pwm", .clk = &pwm_clk}, | ||
726 | { .dev_id = "sdhci", .clk = &sdhci_clk}, | ||
726 | { .dev_id = "c_can_platform.0", .clk = &can0_clk}, | 727 | { .dev_id = "c_can_platform.0", .clk = &can0_clk}, |
727 | { .dev_id = "c_can_platform.1", .clk = &can1_clk}, | 728 | { .dev_id = "c_can_platform.1", .clk = &can1_clk}, |
728 | { .dev_id = "i2c_designware.1", .clk = &i2c1_clk}, | ||
729 | { .dev_id = "ssp-pl022.1", .clk = &ssp1_clk}, | 729 | { .dev_id = "ssp-pl022.1", .clk = &ssp1_clk}, |
730 | { .dev_id = "ssp-pl022.2", .clk = &ssp2_clk}, | 730 | { .dev_id = "ssp-pl022.2", .clk = &ssp2_clk}, |
731 | { .dev_id = "pwm", .clk = &pwm_clk}, | 731 | { .dev_id = "uart1", .clk = &uart1_clk}, |
732 | #endif | 732 | { .dev_id = "uart2", .clk = &uart2_clk}, |
733 | }; | 733 | }; |
734 | #endif | ||
734 | 735 | ||
735 | void __init clk_init(void) | 736 | void __init spear3xx_clk_init(void) |
736 | { | 737 | { |
737 | int i; | 738 | int i, cnt; |
739 | struct clk_lookup *lookups; | ||
740 | |||
741 | if (machine_is_spear300()) { | ||
742 | cnt = ARRAY_SIZE(spear300_clk_lookups); | ||
743 | lookups = spear300_clk_lookups; | ||
744 | } else if (machine_is_spear310()) { | ||
745 | cnt = ARRAY_SIZE(spear310_clk_lookups); | ||
746 | lookups = spear310_clk_lookups; | ||
747 | } else { | ||
748 | cnt = ARRAY_SIZE(spear320_clk_lookups); | ||
749 | lookups = spear320_clk_lookups; | ||
750 | } | ||
738 | 751 | ||
739 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) | 752 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) |
740 | clk_register(&spear_clk_lookups[i]); | 753 | clk_register(&spear_clk_lookups[i]); |
741 | 754 | ||
742 | recalc_root_clocks(); | 755 | for (i = 0; i < cnt; i++) |
756 | clk_register(&lookups[i]); | ||
757 | |||
758 | clk_init(); | ||
743 | } | 759 | } |
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index 8e30636909ef..b8f31c3935f7 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h | |||
@@ -27,16 +27,16 @@ | |||
27 | * Following GPT channels will be used as clock source and clockevent | 27 | * Following GPT channels will be used as clock source and clockevent |
28 | */ | 28 | */ |
29 | #define SPEAR_GPT0_BASE SPEAR3XX_ML1_TMR_BASE | 29 | #define SPEAR_GPT0_BASE SPEAR3XX_ML1_TMR_BASE |
30 | #define SPEAR_GPT0_CHAN0_IRQ IRQ_CPU_GPT1_1 | 30 | #define SPEAR_GPT0_CHAN0_IRQ SPEAR3XX_IRQ_CPU_GPT1_1 |
31 | #define SPEAR_GPT0_CHAN1_IRQ IRQ_CPU_GPT1_2 | 31 | #define SPEAR_GPT0_CHAN1_IRQ SPEAR3XX_IRQ_CPU_GPT1_2 |
32 | 32 | ||
33 | /* Add spear3xx family device structure declarations here */ | 33 | /* Add spear3xx family device structure declarations here */ |
34 | extern struct amba_device gpio_device; | 34 | extern struct amba_device spear3xx_gpio_device; |
35 | extern struct amba_device uart_device; | 35 | extern struct amba_device spear3xx_uart_device; |
36 | extern struct sys_timer spear3xx_timer; | 36 | extern struct sys_timer spear3xx_timer; |
37 | 37 | ||
38 | /* Add spear3xx family function declarations here */ | 38 | /* Add spear3xx family function declarations here */ |
39 | void __init clk_init(void); | 39 | void __init spear3xx_clk_init(void); |
40 | void __init spear_setup_timer(void); | 40 | void __init spear_setup_timer(void); |
41 | void __init spear3xx_map_io(void); | 41 | void __init spear3xx_map_io(void); |
42 | void __init spear3xx_init_irq(void); | 42 | void __init spear3xx_init_irq(void); |
@@ -60,81 +60,80 @@ void __init spear3xx_init(void); | |||
60 | #define PMX_TIMER_1_2_MASK (1 << 0) | 60 | #define PMX_TIMER_1_2_MASK (1 << 0) |
61 | 61 | ||
62 | /* pad mux devices */ | 62 | /* pad mux devices */ |
63 | extern struct pmx_dev pmx_firda; | 63 | extern struct pmx_dev spear3xx_pmx_firda; |
64 | extern struct pmx_dev pmx_i2c; | 64 | extern struct pmx_dev spear3xx_pmx_i2c; |
65 | extern struct pmx_dev pmx_ssp_cs; | 65 | extern struct pmx_dev spear3xx_pmx_ssp_cs; |
66 | extern struct pmx_dev pmx_ssp; | 66 | extern struct pmx_dev spear3xx_pmx_ssp; |
67 | extern struct pmx_dev pmx_mii; | 67 | extern struct pmx_dev spear3xx_pmx_mii; |
68 | extern struct pmx_dev pmx_gpio_pin0; | 68 | extern struct pmx_dev spear3xx_pmx_gpio_pin0; |
69 | extern struct pmx_dev pmx_gpio_pin1; | 69 | extern struct pmx_dev spear3xx_pmx_gpio_pin1; |
70 | extern struct pmx_dev pmx_gpio_pin2; | 70 | extern struct pmx_dev spear3xx_pmx_gpio_pin2; |
71 | extern struct pmx_dev pmx_gpio_pin3; | 71 | extern struct pmx_dev spear3xx_pmx_gpio_pin3; |
72 | extern struct pmx_dev pmx_gpio_pin4; | 72 | extern struct pmx_dev spear3xx_pmx_gpio_pin4; |
73 | extern struct pmx_dev pmx_gpio_pin5; | 73 | extern struct pmx_dev spear3xx_pmx_gpio_pin5; |
74 | extern struct pmx_dev pmx_uart0_modem; | 74 | extern struct pmx_dev spear3xx_pmx_uart0_modem; |
75 | extern struct pmx_dev pmx_uart0; | 75 | extern struct pmx_dev spear3xx_pmx_uart0; |
76 | extern struct pmx_dev pmx_timer_3_4; | 76 | extern struct pmx_dev spear3xx_pmx_timer_3_4; |
77 | extern struct pmx_dev pmx_timer_1_2; | 77 | extern struct pmx_dev spear3xx_pmx_timer_1_2; |
78 | 78 | ||
79 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | 79 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) |
80 | /* padmux plgpio devices */ | 80 | /* padmux plgpio devices */ |
81 | extern struct pmx_dev pmx_plgpio_0_1; | 81 | extern struct pmx_dev spear3xx_pmx_plgpio_0_1; |
82 | extern struct pmx_dev pmx_plgpio_2_3; | 82 | extern struct pmx_dev spear3xx_pmx_plgpio_2_3; |
83 | extern struct pmx_dev pmx_plgpio_4_5; | 83 | extern struct pmx_dev spear3xx_pmx_plgpio_4_5; |
84 | extern struct pmx_dev pmx_plgpio_6_9; | 84 | extern struct pmx_dev spear3xx_pmx_plgpio_6_9; |
85 | extern struct pmx_dev pmx_plgpio_10_27; | 85 | extern struct pmx_dev spear3xx_pmx_plgpio_10_27; |
86 | extern struct pmx_dev pmx_plgpio_28; | 86 | extern struct pmx_dev spear3xx_pmx_plgpio_28; |
87 | extern struct pmx_dev pmx_plgpio_29; | 87 | extern struct pmx_dev spear3xx_pmx_plgpio_29; |
88 | extern struct pmx_dev pmx_plgpio_30; | 88 | extern struct pmx_dev spear3xx_pmx_plgpio_30; |
89 | extern struct pmx_dev pmx_plgpio_31; | 89 | extern struct pmx_dev spear3xx_pmx_plgpio_31; |
90 | extern struct pmx_dev pmx_plgpio_32; | 90 | extern struct pmx_dev spear3xx_pmx_plgpio_32; |
91 | extern struct pmx_dev pmx_plgpio_33; | 91 | extern struct pmx_dev spear3xx_pmx_plgpio_33; |
92 | extern struct pmx_dev pmx_plgpio_34_36; | 92 | extern struct pmx_dev spear3xx_pmx_plgpio_34_36; |
93 | extern struct pmx_dev pmx_plgpio_37_42; | 93 | extern struct pmx_dev spear3xx_pmx_plgpio_37_42; |
94 | extern struct pmx_dev pmx_plgpio_43_44_47_48; | 94 | extern struct pmx_dev spear3xx_pmx_plgpio_43_44_47_48; |
95 | extern struct pmx_dev pmx_plgpio_45_46_49_50; | 95 | extern struct pmx_dev spear3xx_pmx_plgpio_45_46_49_50; |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | extern struct pmx_driver pmx_driver; | ||
99 | |||
100 | /* spear300 declarations */ | 98 | /* spear300 declarations */ |
101 | #ifdef CONFIG_MACH_SPEAR300 | 99 | #ifdef CONFIG_MACH_SPEAR300 |
102 | /* Add spear300 machine device structure declarations here */ | 100 | /* Add spear300 machine device structure declarations here */ |
103 | extern struct amba_device gpio1_device; | 101 | extern struct amba_device spear300_gpio1_device; |
104 | 102 | ||
105 | /* pad mux modes */ | 103 | /* pad mux modes */ |
106 | extern struct pmx_mode nand_mode; | 104 | extern struct pmx_mode spear300_nand_mode; |
107 | extern struct pmx_mode nor_mode; | 105 | extern struct pmx_mode spear300_nor_mode; |
108 | extern struct pmx_mode photo_frame_mode; | 106 | extern struct pmx_mode spear300_photo_frame_mode; |
109 | extern struct pmx_mode lend_ip_phone_mode; | 107 | extern struct pmx_mode spear300_lend_ip_phone_mode; |
110 | extern struct pmx_mode hend_ip_phone_mode; | 108 | extern struct pmx_mode spear300_hend_ip_phone_mode; |
111 | extern struct pmx_mode lend_wifi_phone_mode; | 109 | extern struct pmx_mode spear300_lend_wifi_phone_mode; |
112 | extern struct pmx_mode hend_wifi_phone_mode; | 110 | extern struct pmx_mode spear300_hend_wifi_phone_mode; |
113 | extern struct pmx_mode ata_pabx_wi2s_mode; | 111 | extern struct pmx_mode spear300_ata_pabx_wi2s_mode; |
114 | extern struct pmx_mode ata_pabx_i2s_mode; | 112 | extern struct pmx_mode spear300_ata_pabx_i2s_mode; |
115 | extern struct pmx_mode caml_lcdw_mode; | 113 | extern struct pmx_mode spear300_caml_lcdw_mode; |
116 | extern struct pmx_mode camu_lcd_mode; | 114 | extern struct pmx_mode spear300_camu_lcd_mode; |
117 | extern struct pmx_mode camu_wlcd_mode; | 115 | extern struct pmx_mode spear300_camu_wlcd_mode; |
118 | extern struct pmx_mode caml_lcd_mode; | 116 | extern struct pmx_mode spear300_caml_lcd_mode; |
119 | 117 | ||
120 | /* pad mux devices */ | 118 | /* pad mux devices */ |
121 | extern struct pmx_dev pmx_fsmc_2_chips; | 119 | extern struct pmx_dev spear300_pmx_fsmc_2_chips; |
122 | extern struct pmx_dev pmx_fsmc_4_chips; | 120 | extern struct pmx_dev spear300_pmx_fsmc_4_chips; |
123 | extern struct pmx_dev pmx_keyboard; | 121 | extern struct pmx_dev spear300_pmx_keyboard; |
124 | extern struct pmx_dev pmx_clcd; | 122 | extern struct pmx_dev spear300_pmx_clcd; |
125 | extern struct pmx_dev pmx_telecom_gpio; | 123 | extern struct pmx_dev spear300_pmx_telecom_gpio; |
126 | extern struct pmx_dev pmx_telecom_tdm; | 124 | extern struct pmx_dev spear300_pmx_telecom_tdm; |
127 | extern struct pmx_dev pmx_telecom_spi_cs_i2c_clk; | 125 | extern struct pmx_dev spear300_pmx_telecom_spi_cs_i2c_clk; |
128 | extern struct pmx_dev pmx_telecom_camera; | 126 | extern struct pmx_dev spear300_pmx_telecom_camera; |
129 | extern struct pmx_dev pmx_telecom_dac; | 127 | extern struct pmx_dev spear300_pmx_telecom_dac; |
130 | extern struct pmx_dev pmx_telecom_i2s; | 128 | extern struct pmx_dev spear300_pmx_telecom_i2s; |
131 | extern struct pmx_dev pmx_telecom_boot_pins; | 129 | extern struct pmx_dev spear300_pmx_telecom_boot_pins; |
132 | extern struct pmx_dev pmx_telecom_sdhci_4bit; | 130 | extern struct pmx_dev spear300_pmx_telecom_sdhci_4bit; |
133 | extern struct pmx_dev pmx_telecom_sdhci_8bit; | 131 | extern struct pmx_dev spear300_pmx_telecom_sdhci_8bit; |
134 | extern struct pmx_dev pmx_gpio1; | 132 | extern struct pmx_dev spear300_pmx_gpio1; |
135 | 133 | ||
136 | /* Add spear300 machine function declarations here */ | 134 | /* Add spear300 machine function declarations here */ |
137 | void __init spear300_init(void); | 135 | void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, |
136 | u8 pmx_dev_count); | ||
138 | 137 | ||
139 | #endif /* CONFIG_MACH_SPEAR300 */ | 138 | #endif /* CONFIG_MACH_SPEAR300 */ |
140 | 139 | ||
@@ -143,17 +142,18 @@ void __init spear300_init(void); | |||
143 | /* Add spear310 machine device structure declarations here */ | 142 | /* Add spear310 machine device structure declarations here */ |
144 | 143 | ||
145 | /* pad mux devices */ | 144 | /* pad mux devices */ |
146 | extern struct pmx_dev pmx_emi_cs_0_1_4_5; | 145 | extern struct pmx_dev spear310_pmx_emi_cs_0_1_4_5; |
147 | extern struct pmx_dev pmx_emi_cs_2_3; | 146 | extern struct pmx_dev spear310_pmx_emi_cs_2_3; |
148 | extern struct pmx_dev pmx_uart1; | 147 | extern struct pmx_dev spear310_pmx_uart1; |
149 | extern struct pmx_dev pmx_uart2; | 148 | extern struct pmx_dev spear310_pmx_uart2; |
150 | extern struct pmx_dev pmx_uart3_4_5; | 149 | extern struct pmx_dev spear310_pmx_uart3_4_5; |
151 | extern struct pmx_dev pmx_fsmc; | 150 | extern struct pmx_dev spear310_pmx_fsmc; |
152 | extern struct pmx_dev pmx_rs485_0_1; | 151 | extern struct pmx_dev spear310_pmx_rs485_0_1; |
153 | extern struct pmx_dev pmx_tdm0; | 152 | extern struct pmx_dev spear310_pmx_tdm0; |
154 | 153 | ||
155 | /* Add spear310 machine function declarations here */ | 154 | /* Add spear310 machine function declarations here */ |
156 | void __init spear310_init(void); | 155 | void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, |
156 | u8 pmx_dev_count); | ||
157 | 157 | ||
158 | #endif /* CONFIG_MACH_SPEAR310 */ | 158 | #endif /* CONFIG_MACH_SPEAR310 */ |
159 | 159 | ||
@@ -162,37 +162,38 @@ void __init spear310_init(void); | |||
162 | /* Add spear320 machine device structure declarations here */ | 162 | /* Add spear320 machine device structure declarations here */ |
163 | 163 | ||
164 | /* pad mux modes */ | 164 | /* pad mux modes */ |
165 | extern struct pmx_mode auto_net_smii_mode; | 165 | extern struct pmx_mode spear320_auto_net_smii_mode; |
166 | extern struct pmx_mode auto_net_mii_mode; | 166 | extern struct pmx_mode spear320_auto_net_mii_mode; |
167 | extern struct pmx_mode auto_exp_mode; | 167 | extern struct pmx_mode spear320_auto_exp_mode; |
168 | extern struct pmx_mode small_printers_mode; | 168 | extern struct pmx_mode spear320_small_printers_mode; |
169 | 169 | ||
170 | /* pad mux devices */ | 170 | /* pad mux devices */ |
171 | extern struct pmx_dev pmx_clcd; | 171 | extern struct pmx_dev spear320_pmx_clcd; |
172 | extern struct pmx_dev pmx_emi; | 172 | extern struct pmx_dev spear320_pmx_emi; |
173 | extern struct pmx_dev pmx_fsmc; | 173 | extern struct pmx_dev spear320_pmx_fsmc; |
174 | extern struct pmx_dev pmx_spp; | 174 | extern struct pmx_dev spear320_pmx_spp; |
175 | extern struct pmx_dev pmx_sdhci; | 175 | extern struct pmx_dev spear320_pmx_sdhci; |
176 | extern struct pmx_dev pmx_i2s; | 176 | extern struct pmx_dev spear320_pmx_i2s; |
177 | extern struct pmx_dev pmx_uart1; | 177 | extern struct pmx_dev spear320_pmx_uart1; |
178 | extern struct pmx_dev pmx_uart1_modem; | 178 | extern struct pmx_dev spear320_pmx_uart1_modem; |
179 | extern struct pmx_dev pmx_uart2; | 179 | extern struct pmx_dev spear320_pmx_uart2; |
180 | extern struct pmx_dev pmx_touchscreen; | 180 | extern struct pmx_dev spear320_pmx_touchscreen; |
181 | extern struct pmx_dev pmx_can; | 181 | extern struct pmx_dev spear320_pmx_can; |
182 | extern struct pmx_dev pmx_sdhci_led; | 182 | extern struct pmx_dev spear320_pmx_sdhci_led; |
183 | extern struct pmx_dev pmx_pwm0; | 183 | extern struct pmx_dev spear320_pmx_pwm0; |
184 | extern struct pmx_dev pmx_pwm1; | 184 | extern struct pmx_dev spear320_pmx_pwm1; |
185 | extern struct pmx_dev pmx_pwm2; | 185 | extern struct pmx_dev spear320_pmx_pwm2; |
186 | extern struct pmx_dev pmx_pwm3; | 186 | extern struct pmx_dev spear320_pmx_pwm3; |
187 | extern struct pmx_dev pmx_ssp1; | 187 | extern struct pmx_dev spear320_pmx_ssp1; |
188 | extern struct pmx_dev pmx_ssp2; | 188 | extern struct pmx_dev spear320_pmx_ssp2; |
189 | extern struct pmx_dev pmx_mii1; | 189 | extern struct pmx_dev spear320_pmx_mii1; |
190 | extern struct pmx_dev pmx_smii0; | 190 | extern struct pmx_dev spear320_pmx_smii0; |
191 | extern struct pmx_dev pmx_smii1; | 191 | extern struct pmx_dev spear320_pmx_smii1; |
192 | extern struct pmx_dev pmx_i2c1; | 192 | extern struct pmx_dev spear320_pmx_i2c1; |
193 | 193 | ||
194 | /* Add spear320 machine function declarations here */ | 194 | /* Add spear320 machine function declarations here */ |
195 | void __init spear320_init(void); | 195 | void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, |
196 | u8 pmx_dev_count); | ||
196 | 197 | ||
197 | #endif /* CONFIG_MACH_SPEAR320 */ | 198 | #endif /* CONFIG_MACH_SPEAR320 */ |
198 | 199 | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/irqs.h b/arch/arm/mach-spear3xx/include/mach/irqs.h index a1a7f481866d..6e265442808e 100644 --- a/arch/arm/mach-spear3xx/include/mach/irqs.h +++ b/arch/arm/mach-spear3xx/include/mach/irqs.h | |||
@@ -15,138 +15,140 @@ | |||
15 | #define __MACH_IRQS_H | 15 | #define __MACH_IRQS_H |
16 | 16 | ||
17 | /* SPEAr3xx IRQ definitions */ | 17 | /* SPEAr3xx IRQ definitions */ |
18 | #define IRQ_HW_ACCEL_MOD_0 0 | 18 | #define SPEAR3XX_IRQ_HW_ACCEL_MOD_0 0 |
19 | #define IRQ_INTRCOMM_RAS_ARM 1 | 19 | #define SPEAR3XX_IRQ_INTRCOMM_RAS_ARM 1 |
20 | #define IRQ_CPU_GPT1_1 2 | 20 | #define SPEAR3XX_IRQ_CPU_GPT1_1 2 |
21 | #define IRQ_CPU_GPT1_2 3 | 21 | #define SPEAR3XX_IRQ_CPU_GPT1_2 3 |
22 | #define IRQ_BASIC_GPT1_1 4 | 22 | #define SPEAR3XX_IRQ_BASIC_GPT1_1 4 |
23 | #define IRQ_BASIC_GPT1_2 5 | 23 | #define SPEAR3XX_IRQ_BASIC_GPT1_2 5 |
24 | #define IRQ_BASIC_GPT2_1 6 | 24 | #define SPEAR3XX_IRQ_BASIC_GPT2_1 6 |
25 | #define IRQ_BASIC_GPT2_2 7 | 25 | #define SPEAR3XX_IRQ_BASIC_GPT2_2 7 |
26 | #define IRQ_BASIC_DMA 8 | 26 | #define SPEAR3XX_IRQ_BASIC_DMA 8 |
27 | #define IRQ_BASIC_SMI 9 | 27 | #define SPEAR3XX_IRQ_BASIC_SMI 9 |
28 | #define IRQ_BASIC_RTC 10 | 28 | #define SPEAR3XX_IRQ_BASIC_RTC 10 |
29 | #define IRQ_BASIC_GPIO 11 | 29 | #define SPEAR3XX_IRQ_BASIC_GPIO 11 |
30 | #define IRQ_BASIC_WDT 12 | 30 | #define SPEAR3XX_IRQ_BASIC_WDT 12 |
31 | #define IRQ_DDR_CONTROLLER 13 | 31 | #define SPEAR3XX_IRQ_DDR_CONTROLLER 13 |
32 | #define IRQ_SYS_ERROR 14 | 32 | #define SPEAR3XX_IRQ_SYS_ERROR 14 |
33 | #define IRQ_WAKEUP_RCV 15 | 33 | #define SPEAR3XX_IRQ_WAKEUP_RCV 15 |
34 | #define IRQ_JPEG 16 | 34 | #define SPEAR3XX_IRQ_JPEG 16 |
35 | #define IRQ_IRDA 17 | 35 | #define SPEAR3XX_IRQ_IRDA 17 |
36 | #define IRQ_ADC 18 | 36 | #define SPEAR3XX_IRQ_ADC 18 |
37 | #define IRQ_UART 19 | 37 | #define SPEAR3XX_IRQ_UART 19 |
38 | #define IRQ_SSP 20 | 38 | #define SPEAR3XX_IRQ_SSP 20 |
39 | #define IRQ_I2C 21 | 39 | #define SPEAR3XX_IRQ_I2C 21 |
40 | #define IRQ_MAC_1 22 | 40 | #define SPEAR3XX_IRQ_MAC_1 22 |
41 | #define IRQ_MAC_2 23 | 41 | #define SPEAR3XX_IRQ_MAC_2 23 |
42 | #define IRQ_USB_DEV 24 | 42 | #define SPEAR3XX_IRQ_USB_DEV 24 |
43 | #define IRQ_USB_H_OHCI_0 25 | 43 | #define SPEAR3XX_IRQ_USB_H_OHCI_0 25 |
44 | #define IRQ_USB_H_EHCI_0 26 | 44 | #define SPEAR3XX_IRQ_USB_H_EHCI_0 26 |
45 | #define IRQ_USB_H_EHCI_1 IRQ_USB_H_EHCI_0 | 45 | #define SPEAR3XX_IRQ_USB_H_EHCI_1 SPEAR3XX_IRQ_USB_H_EHCI_0 |
46 | #define IRQ_USB_H_OHCI_1 27 | 46 | #define SPEAR3XX_IRQ_USB_H_OHCI_1 27 |
47 | #define IRQ_GEN_RAS_1 28 | 47 | #define SPEAR3XX_IRQ_GEN_RAS_1 28 |
48 | #define IRQ_GEN_RAS_2 29 | 48 | #define SPEAR3XX_IRQ_GEN_RAS_2 29 |
49 | #define IRQ_GEN_RAS_3 30 | 49 | #define SPEAR3XX_IRQ_GEN_RAS_3 30 |
50 | #define IRQ_HW_ACCEL_MOD_1 31 | 50 | #define SPEAR3XX_IRQ_HW_ACCEL_MOD_1 31 |
51 | #define IRQ_VIC_END 32 | 51 | #define SPEAR3XX_IRQ_VIC_END 32 |
52 | 52 | ||
53 | #define VIRQ_START IRQ_VIC_END | 53 | #define SPEAR3XX_VIRQ_START SPEAR3XX_IRQ_VIC_END |
54 | 54 | ||
55 | /* SPEAr300 Virtual irq definitions */ | 55 | /* SPEAr300 Virtual irq definitions */ |
56 | #ifdef CONFIG_MACH_SPEAR300 | ||
57 | /* IRQs sharing IRQ_GEN_RAS_1 */ | 56 | /* IRQs sharing IRQ_GEN_RAS_1 */ |
58 | #define VIRQ_IT_PERS_S (VIRQ_START + 0) | 57 | #define SPEAR300_VIRQ_IT_PERS_S (SPEAR3XX_VIRQ_START + 0) |
59 | #define VIRQ_IT_CHANGE_S (VIRQ_START + 1) | 58 | #define SPEAR300_VIRQ_IT_CHANGE_S (SPEAR3XX_VIRQ_START + 1) |
60 | #define VIRQ_I2S (VIRQ_START + 2) | 59 | #define SPEAR300_VIRQ_I2S (SPEAR3XX_VIRQ_START + 2) |
61 | #define VIRQ_TDM (VIRQ_START + 3) | 60 | #define SPEAR300_VIRQ_TDM (SPEAR3XX_VIRQ_START + 3) |
62 | #define VIRQ_CAMERA_L (VIRQ_START + 4) | 61 | #define SPEAR300_VIRQ_CAMERA_L (SPEAR3XX_VIRQ_START + 4) |
63 | #define VIRQ_CAMERA_F (VIRQ_START + 5) | 62 | #define SPEAR300_VIRQ_CAMERA_F (SPEAR3XX_VIRQ_START + 5) |
64 | #define VIRQ_CAMERA_V (VIRQ_START + 6) | 63 | #define SPEAR300_VIRQ_CAMERA_V (SPEAR3XX_VIRQ_START + 6) |
65 | #define VIRQ_KEYBOARD (VIRQ_START + 7) | 64 | #define SPEAR300_VIRQ_KEYBOARD (SPEAR3XX_VIRQ_START + 7) |
66 | #define VIRQ_GPIO1 (VIRQ_START + 8) | 65 | #define SPEAR300_VIRQ_GPIO1 (SPEAR3XX_VIRQ_START + 8) |
67 | 66 | ||
68 | /* IRQs sharing IRQ_GEN_RAS_3 */ | 67 | /* IRQs sharing IRQ_GEN_RAS_3 */ |
69 | #define IRQ_CLCD IRQ_GEN_RAS_3 | 68 | #define SPEAR300_IRQ_CLCD SPEAR3XX_IRQ_GEN_RAS_3 |
70 | 69 | ||
71 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | 70 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ |
72 | #define IRQ_SDHCI IRQ_INTRCOMM_RAS_ARM | 71 | #define SPEAR300_IRQ_SDHCI SPEAR3XX_IRQ_INTRCOMM_RAS_ARM |
73 | |||
74 | /* GPIO pins virtual irqs */ | ||
75 | #define SPEAR_GPIO_INT_BASE (VIRQ_START + 9) | ||
76 | #define SPEAR_GPIO1_INT_BASE (SPEAR_GPIO_INT_BASE + 8) | ||
77 | #define SPEAR_GPIO_INT_END (SPEAR_GPIO1_INT_BASE + 8) | ||
78 | 72 | ||
79 | /* SPEAr310 Virtual irq definitions */ | 73 | /* SPEAr310 Virtual irq definitions */ |
80 | #elif defined(CONFIG_MACH_SPEAR310) | ||
81 | /* IRQs sharing IRQ_GEN_RAS_1 */ | 74 | /* IRQs sharing IRQ_GEN_RAS_1 */ |
82 | #define VIRQ_SMII0 (VIRQ_START + 0) | 75 | #define SPEAR310_VIRQ_SMII0 (SPEAR3XX_VIRQ_START + 0) |
83 | #define VIRQ_SMII1 (VIRQ_START + 1) | 76 | #define SPEAR310_VIRQ_SMII1 (SPEAR3XX_VIRQ_START + 1) |
84 | #define VIRQ_SMII2 (VIRQ_START + 2) | 77 | #define SPEAR310_VIRQ_SMII2 (SPEAR3XX_VIRQ_START + 2) |
85 | #define VIRQ_SMII3 (VIRQ_START + 3) | 78 | #define SPEAR310_VIRQ_SMII3 (SPEAR3XX_VIRQ_START + 3) |
86 | #define VIRQ_WAKEUP_SMII0 (VIRQ_START + 4) | 79 | #define SPEAR310_VIRQ_WAKEUP_SMII0 (SPEAR3XX_VIRQ_START + 4) |
87 | #define VIRQ_WAKEUP_SMII1 (VIRQ_START + 5) | 80 | #define SPEAR310_VIRQ_WAKEUP_SMII1 (SPEAR3XX_VIRQ_START + 5) |
88 | #define VIRQ_WAKEUP_SMII2 (VIRQ_START + 6) | 81 | #define SPEAR310_VIRQ_WAKEUP_SMII2 (SPEAR3XX_VIRQ_START + 6) |
89 | #define VIRQ_WAKEUP_SMII3 (VIRQ_START + 7) | 82 | #define SPEAR310_VIRQ_WAKEUP_SMII3 (SPEAR3XX_VIRQ_START + 7) |
90 | 83 | ||
91 | /* IRQs sharing IRQ_GEN_RAS_2 */ | 84 | /* IRQs sharing IRQ_GEN_RAS_2 */ |
92 | #define VIRQ_UART1 (VIRQ_START + 8) | 85 | #define SPEAR310_VIRQ_UART1 (SPEAR3XX_VIRQ_START + 8) |
93 | #define VIRQ_UART2 (VIRQ_START + 9) | 86 | #define SPEAR310_VIRQ_UART2 (SPEAR3XX_VIRQ_START + 9) |
94 | #define VIRQ_UART3 (VIRQ_START + 10) | 87 | #define SPEAR310_VIRQ_UART3 (SPEAR3XX_VIRQ_START + 10) |
95 | #define VIRQ_UART4 (VIRQ_START + 11) | 88 | #define SPEAR310_VIRQ_UART4 (SPEAR3XX_VIRQ_START + 11) |
96 | #define VIRQ_UART5 (VIRQ_START + 12) | 89 | #define SPEAR310_VIRQ_UART5 (SPEAR3XX_VIRQ_START + 12) |
97 | 90 | ||
98 | /* IRQs sharing IRQ_GEN_RAS_3 */ | 91 | /* IRQs sharing IRQ_GEN_RAS_3 */ |
99 | #define VIRQ_EMI (VIRQ_START + 13) | 92 | #define SPEAR310_VIRQ_EMI (SPEAR3XX_VIRQ_START + 13) |
100 | #define VIRQ_PLGPIO (VIRQ_START + 14) | 93 | #define SPEAR310_VIRQ_PLGPIO (SPEAR3XX_VIRQ_START + 14) |
101 | 94 | ||
102 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | 95 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ |
103 | #define VIRQ_TDM_HDLC (VIRQ_START + 15) | 96 | #define SPEAR310_VIRQ_TDM_HDLC (SPEAR3XX_VIRQ_START + 15) |
104 | #define VIRQ_RS485_0 (VIRQ_START + 16) | 97 | #define SPEAR310_VIRQ_RS485_0 (SPEAR3XX_VIRQ_START + 16) |
105 | #define VIRQ_RS485_1 (VIRQ_START + 17) | 98 | #define SPEAR310_VIRQ_RS485_1 (SPEAR3XX_VIRQ_START + 17) |
106 | |||
107 | /* GPIO pins virtual irqs */ | ||
108 | #define SPEAR_GPIO_INT_BASE (VIRQ_START + 18) | ||
109 | 99 | ||
110 | /* SPEAr320 Virtual irq definitions */ | 100 | /* SPEAr320 Virtual irq definitions */ |
111 | #else | ||
112 | /* IRQs sharing IRQ_GEN_RAS_1 */ | 101 | /* IRQs sharing IRQ_GEN_RAS_1 */ |
113 | #define VIRQ_EMI (VIRQ_START + 0) | 102 | #define SPEAR320_VIRQ_EMI (SPEAR3XX_VIRQ_START + 0) |
114 | #define VIRQ_CLCD (VIRQ_START + 1) | 103 | #define SPEAR320_VIRQ_CLCD (SPEAR3XX_VIRQ_START + 1) |
115 | #define VIRQ_SPP (VIRQ_START + 2) | 104 | #define SPEAR320_VIRQ_SPP (SPEAR3XX_VIRQ_START + 2) |
116 | 105 | ||
117 | /* IRQs sharing IRQ_GEN_RAS_2 */ | 106 | /* IRQs sharing IRQ_GEN_RAS_2 */ |
118 | #define IRQ_SDHCI IRQ_GEN_RAS_2 | 107 | #define SPEAR320_IRQ_SDHCI SPEAR3XX_IRQ_GEN_RAS_2 |
119 | 108 | ||
120 | /* IRQs sharing IRQ_GEN_RAS_3 */ | 109 | /* IRQs sharing IRQ_GEN_RAS_3 */ |
121 | #define VIRQ_PLGPIO (VIRQ_START + 3) | 110 | #define SPEAR320_VIRQ_PLGPIO (SPEAR3XX_VIRQ_START + 3) |
122 | #define VIRQ_I2S_PLAY (VIRQ_START + 4) | 111 | #define SPEAR320_VIRQ_I2S_PLAY (SPEAR3XX_VIRQ_START + 4) |
123 | #define VIRQ_I2S_REC (VIRQ_START + 5) | 112 | #define SPEAR320_VIRQ_I2S_REC (SPEAR3XX_VIRQ_START + 5) |
124 | 113 | ||
125 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | 114 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ |
126 | #define VIRQ_CANU (VIRQ_START + 6) | 115 | #define SPEAR320_VIRQ_CANU (SPEAR3XX_VIRQ_START + 6) |
127 | #define VIRQ_CANL (VIRQ_START + 7) | 116 | #define SPEAR320_VIRQ_CANL (SPEAR3XX_VIRQ_START + 7) |
128 | #define VIRQ_UART1 (VIRQ_START + 8) | 117 | #define SPEAR320_VIRQ_UART1 (SPEAR3XX_VIRQ_START + 8) |
129 | #define VIRQ_UART2 (VIRQ_START + 9) | 118 | #define SPEAR320_VIRQ_UART2 (SPEAR3XX_VIRQ_START + 9) |
130 | #define VIRQ_SSP1 (VIRQ_START + 10) | 119 | #define SPEAR320_VIRQ_SSP1 (SPEAR3XX_VIRQ_START + 10) |
131 | #define VIRQ_SSP2 (VIRQ_START + 11) | 120 | #define SPEAR320_VIRQ_SSP2 (SPEAR3XX_VIRQ_START + 11) |
132 | #define VIRQ_SMII0 (VIRQ_START + 12) | 121 | #define SPEAR320_VIRQ_SMII0 (SPEAR3XX_VIRQ_START + 12) |
133 | #define VIRQ_MII1_SMII1 (VIRQ_START + 13) | 122 | #define SPEAR320_VIRQ_MII1_SMII1 (SPEAR3XX_VIRQ_START + 13) |
134 | #define VIRQ_WAKEUP_SMII0 (VIRQ_START + 14) | 123 | #define SPEAR320_VIRQ_WAKEUP_SMII0 (SPEAR3XX_VIRQ_START + 14) |
135 | #define VIRQ_WAKEUP_MII1_SMII1 (VIRQ_START + 15) | 124 | #define SPEAR320_VIRQ_WAKEUP_MII1_SMII1 (SPEAR3XX_VIRQ_START + 15) |
136 | #define VIRQ_I2C (VIRQ_START + 16) | 125 | #define SPEAR320_VIRQ_I2C1 (SPEAR3XX_VIRQ_START + 16) |
137 | |||
138 | /* GPIO pins virtual irqs */ | ||
139 | #define SPEAR_GPIO_INT_BASE (VIRQ_START + 17) | ||
140 | 126 | ||
127 | /* | ||
128 | * GPIO pins virtual irqs | ||
129 | * Use the lowest number for the GPIO virtual IRQs base on which subarchs | ||
130 | * we have compiled in | ||
131 | */ | ||
132 | #if defined(CONFIG_MACH_SPEAR310) | ||
133 | #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 18) | ||
134 | #elif defined(CONFIG_MACH_SPEAR320) | ||
135 | #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 17) | ||
136 | #else | ||
137 | #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 9) | ||
141 | #endif | 138 | #endif |
142 | 139 | ||
143 | /* PLGPIO Virtual IRQs */ | 140 | #define SPEAR300_GPIO1_INT_BASE (SPEAR3XX_GPIO_INT_BASE + 8) |
141 | #define SPEAR3XX_PLGPIO_COUNT 102 | ||
142 | |||
144 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | 143 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) |
145 | #define SPEAR_PLGPIO_INT_BASE (SPEAR_GPIO_INT_BASE + 8) | 144 | #define SPEAR3XX_PLGPIO_INT_BASE (SPEAR3XX_GPIO_INT_BASE + 8) |
146 | #define SPEAR_GPIO_INT_END (SPEAR_PLGPIO_INT_BASE + 102) | 145 | #define SPEAR3XX_GPIO_INT_END (SPEAR3XX_PLGPIO_INT_BASE + \ |
146 | SPEAR3XX_PLGPIO_COUNT) | ||
147 | #else | ||
148 | #define SPEAR3XX_GPIO_INT_END (SPEAR300_GPIO1_INT_BASE + 8) | ||
147 | #endif | 149 | #endif |
148 | 150 | ||
149 | #define VIRQ_END SPEAR_GPIO_INT_END | 151 | #define SPEAR3XX_VIRQ_END SPEAR3XX_GPIO_INT_END |
150 | #define NR_IRQS VIRQ_END | 152 | #define NR_IRQS SPEAR3XX_VIRQ_END |
151 | 153 | ||
152 | #endif /* __MACH_IRQS_H */ | 154 | #endif /* __MACH_IRQS_H */ |
diff --git a/arch/arm/mach-spear3xx/include/mach/spear300.h b/arch/arm/mach-spear3xx/include/mach/spear300.h index c723515f8853..3b6ea0729040 100644 --- a/arch/arm/mach-spear3xx/include/mach/spear300.h +++ b/arch/arm/mach-spear3xx/include/mach/spear300.h | |||
@@ -20,19 +20,19 @@ | |||
20 | #define SPEAR300_TELECOM_BASE UL(0x50000000) | 20 | #define SPEAR300_TELECOM_BASE UL(0x50000000) |
21 | 21 | ||
22 | /* Interrupt registers offsets and masks */ | 22 | /* Interrupt registers offsets and masks */ |
23 | #define INT_ENB_MASK_REG 0x54 | 23 | #define SPEAR300_INT_ENB_MASK_REG 0x54 |
24 | #define INT_STS_MASK_REG 0x58 | 24 | #define SPEAR300_INT_STS_MASK_REG 0x58 |
25 | #define IT_PERS_S_IRQ_MASK (1 << 0) | 25 | #define SPEAR300_IT_PERS_S_IRQ_MASK (1 << 0) |
26 | #define IT_CHANGE_S_IRQ_MASK (1 << 1) | 26 | #define SPEAR300_IT_CHANGE_S_IRQ_MASK (1 << 1) |
27 | #define I2S_IRQ_MASK (1 << 2) | 27 | #define SPEAR300_I2S_IRQ_MASK (1 << 2) |
28 | #define TDM_IRQ_MASK (1 << 3) | 28 | #define SPEAR300_TDM_IRQ_MASK (1 << 3) |
29 | #define CAMERA_L_IRQ_MASK (1 << 4) | 29 | #define SPEAR300_CAMERA_L_IRQ_MASK (1 << 4) |
30 | #define CAMERA_F_IRQ_MASK (1 << 5) | 30 | #define SPEAR300_CAMERA_F_IRQ_MASK (1 << 5) |
31 | #define CAMERA_V_IRQ_MASK (1 << 6) | 31 | #define SPEAR300_CAMERA_V_IRQ_MASK (1 << 6) |
32 | #define KEYBOARD_IRQ_MASK (1 << 7) | 32 | #define SPEAR300_KEYBOARD_IRQ_MASK (1 << 7) |
33 | #define GPIO1_IRQ_MASK (1 << 8) | 33 | #define SPEAR300_GPIO1_IRQ_MASK (1 << 8) |
34 | 34 | ||
35 | #define SHIRQ_RAS1_MASK 0x1FF | 35 | #define SPEAR300_SHIRQ_RAS1_MASK 0x1FF |
36 | 36 | ||
37 | #define SPEAR300_CLCD_BASE UL(0x60000000) | 37 | #define SPEAR300_CLCD_BASE UL(0x60000000) |
38 | #define SPEAR300_SDHCI_BASE UL(0x70000000) | 38 | #define SPEAR300_SDHCI_BASE UL(0x70000000) |
diff --git a/arch/arm/mach-spear3xx/include/mach/spear310.h b/arch/arm/mach-spear3xx/include/mach/spear310.h index 1e853479b8cd..1567d0da725f 100644 --- a/arch/arm/mach-spear3xx/include/mach/spear310.h +++ b/arch/arm/mach-spear3xx/include/mach/spear310.h | |||
@@ -29,29 +29,29 @@ | |||
29 | #define SPEAR310_SOC_CONFIG_BASE UL(0xB4000000) | 29 | #define SPEAR310_SOC_CONFIG_BASE UL(0xB4000000) |
30 | 30 | ||
31 | /* Interrupt registers offsets and masks */ | 31 | /* Interrupt registers offsets and masks */ |
32 | #define INT_STS_MASK_REG 0x04 | 32 | #define SPEAR310_INT_STS_MASK_REG 0x04 |
33 | #define SMII0_IRQ_MASK (1 << 0) | 33 | #define SPEAR310_SMII0_IRQ_MASK (1 << 0) |
34 | #define SMII1_IRQ_MASK (1 << 1) | 34 | #define SPEAR310_SMII1_IRQ_MASK (1 << 1) |
35 | #define SMII2_IRQ_MASK (1 << 2) | 35 | #define SPEAR310_SMII2_IRQ_MASK (1 << 2) |
36 | #define SMII3_IRQ_MASK (1 << 3) | 36 | #define SPEAR310_SMII3_IRQ_MASK (1 << 3) |
37 | #define WAKEUP_SMII0_IRQ_MASK (1 << 4) | 37 | #define SPEAR310_WAKEUP_SMII0_IRQ_MASK (1 << 4) |
38 | #define WAKEUP_SMII1_IRQ_MASK (1 << 5) | 38 | #define SPEAR310_WAKEUP_SMII1_IRQ_MASK (1 << 5) |
39 | #define WAKEUP_SMII2_IRQ_MASK (1 << 6) | 39 | #define SPEAR310_WAKEUP_SMII2_IRQ_MASK (1 << 6) |
40 | #define WAKEUP_SMII3_IRQ_MASK (1 << 7) | 40 | #define SPEAR310_WAKEUP_SMII3_IRQ_MASK (1 << 7) |
41 | #define UART1_IRQ_MASK (1 << 8) | 41 | #define SPEAR310_UART1_IRQ_MASK (1 << 8) |
42 | #define UART2_IRQ_MASK (1 << 9) | 42 | #define SPEAR310_UART2_IRQ_MASK (1 << 9) |
43 | #define UART3_IRQ_MASK (1 << 10) | 43 | #define SPEAR310_UART3_IRQ_MASK (1 << 10) |
44 | #define UART4_IRQ_MASK (1 << 11) | 44 | #define SPEAR310_UART4_IRQ_MASK (1 << 11) |
45 | #define UART5_IRQ_MASK (1 << 12) | 45 | #define SPEAR310_UART5_IRQ_MASK (1 << 12) |
46 | #define EMI_IRQ_MASK (1 << 13) | 46 | #define SPEAR310_EMI_IRQ_MASK (1 << 13) |
47 | #define TDM_HDLC_IRQ_MASK (1 << 14) | 47 | #define SPEAR310_TDM_HDLC_IRQ_MASK (1 << 14) |
48 | #define RS485_0_IRQ_MASK (1 << 15) | 48 | #define SPEAR310_RS485_0_IRQ_MASK (1 << 15) |
49 | #define RS485_1_IRQ_MASK (1 << 16) | 49 | #define SPEAR310_RS485_1_IRQ_MASK (1 << 16) |
50 | 50 | ||
51 | #define SHIRQ_RAS1_MASK 0x000FF | 51 | #define SPEAR310_SHIRQ_RAS1_MASK 0x000FF |
52 | #define SHIRQ_RAS2_MASK 0x01F00 | 52 | #define SPEAR310_SHIRQ_RAS2_MASK 0x01F00 |
53 | #define SHIRQ_RAS3_MASK 0x02000 | 53 | #define SPEAR310_SHIRQ_RAS3_MASK 0x02000 |
54 | #define SHIRQ_INTRCOMM_RAS_MASK 0x1C000 | 54 | #define SPEAR310_SHIRQ_INTRCOMM_RAS_MASK 0x1C000 |
55 | 55 | ||
56 | #endif /* __MACH_SPEAR310_H */ | 56 | #endif /* __MACH_SPEAR310_H */ |
57 | 57 | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/spear320.h b/arch/arm/mach-spear3xx/include/mach/spear320.h index 940f0d85d959..8cfa83fa1296 100644 --- a/arch/arm/mach-spear3xx/include/mach/spear320.h +++ b/arch/arm/mach-spear3xx/include/mach/spear320.h | |||
@@ -36,31 +36,31 @@ | |||
36 | #define SPEAR320_SOC_CONFIG_BASE UL(0xB3000000) | 36 | #define SPEAR320_SOC_CONFIG_BASE UL(0xB3000000) |
37 | 37 | ||
38 | /* Interrupt registers offsets and masks */ | 38 | /* Interrupt registers offsets and masks */ |
39 | #define INT_STS_MASK_REG 0x04 | 39 | #define SPEAR320_INT_STS_MASK_REG 0x04 |
40 | #define INT_CLR_MASK_REG 0x04 | 40 | #define SPEAR320_INT_CLR_MASK_REG 0x04 |
41 | #define INT_ENB_MASK_REG 0x08 | 41 | #define SPEAR320_INT_ENB_MASK_REG 0x08 |
42 | #define GPIO_IRQ_MASK (1 << 0) | 42 | #define SPEAR320_GPIO_IRQ_MASK (1 << 0) |
43 | #define I2S_PLAY_IRQ_MASK (1 << 1) | 43 | #define SPEAR320_I2S_PLAY_IRQ_MASK (1 << 1) |
44 | #define I2S_REC_IRQ_MASK (1 << 2) | 44 | #define SPEAR320_I2S_REC_IRQ_MASK (1 << 2) |
45 | #define EMI_IRQ_MASK (1 << 7) | 45 | #define SPEAR320_EMI_IRQ_MASK (1 << 7) |
46 | #define CLCD_IRQ_MASK (1 << 8) | 46 | #define SPEAR320_CLCD_IRQ_MASK (1 << 8) |
47 | #define SPP_IRQ_MASK (1 << 9) | 47 | #define SPEAR320_SPP_IRQ_MASK (1 << 9) |
48 | #define SDHCI_IRQ_MASK (1 << 10) | 48 | #define SPEAR320_SDHCI_IRQ_MASK (1 << 10) |
49 | #define CAN_U_IRQ_MASK (1 << 11) | 49 | #define SPEAR320_CAN_U_IRQ_MASK (1 << 11) |
50 | #define CAN_L_IRQ_MASK (1 << 12) | 50 | #define SPEAR320_CAN_L_IRQ_MASK (1 << 12) |
51 | #define UART1_IRQ_MASK (1 << 13) | 51 | #define SPEAR320_UART1_IRQ_MASK (1 << 13) |
52 | #define UART2_IRQ_MASK (1 << 14) | 52 | #define SPEAR320_UART2_IRQ_MASK (1 << 14) |
53 | #define SSP1_IRQ_MASK (1 << 15) | 53 | #define SPEAR320_SSP1_IRQ_MASK (1 << 15) |
54 | #define SSP2_IRQ_MASK (1 << 16) | 54 | #define SPEAR320_SSP2_IRQ_MASK (1 << 16) |
55 | #define SMII0_IRQ_MASK (1 << 17) | 55 | #define SPEAR320_SMII0_IRQ_MASK (1 << 17) |
56 | #define MII1_SMII1_IRQ_MASK (1 << 18) | 56 | #define SPEAR320_MII1_SMII1_IRQ_MASK (1 << 18) |
57 | #define WAKEUP_SMII0_IRQ_MASK (1 << 19) | 57 | #define SPEAR320_WAKEUP_SMII0_IRQ_MASK (1 << 19) |
58 | #define WAKEUP_MII1_SMII1_IRQ_MASK (1 << 20) | 58 | #define SPEAR320_WAKEUP_MII1_SMII1_IRQ_MASK (1 << 20) |
59 | #define I2C1_IRQ_MASK (1 << 21) | 59 | #define SPEAR320_I2C1_IRQ_MASK (1 << 21) |
60 | 60 | ||
61 | #define SHIRQ_RAS1_MASK 0x000380 | 61 | #define SPEAR320_SHIRQ_RAS1_MASK 0x000380 |
62 | #define SHIRQ_RAS3_MASK 0x000007 | 62 | #define SPEAR320_SHIRQ_RAS3_MASK 0x000007 |
63 | #define SHIRQ_INTRCOMM_RAS_MASK 0x3FF800 | 63 | #define SPEAR320_SHIRQ_INTRCOMM_RAS_MASK 0x3FF800 |
64 | 64 | ||
65 | #endif /* __MACH_SPEAR320_H */ | 65 | #endif /* __MACH_SPEAR320_H */ |
66 | 66 | ||
diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c index 2697e65adf86..a5e46b4ade20 100644 --- a/arch/arm/mach-spear3xx/spear300.c +++ b/arch/arm/mach-spear3xx/spear300.c | |||
@@ -40,86 +40,86 @@ | |||
40 | #define CAML_LCD_MODE (1 << 12) | 40 | #define CAML_LCD_MODE (1 << 12) |
41 | #define ALL_MODES 0x1FFF | 41 | #define ALL_MODES 0x1FFF |
42 | 42 | ||
43 | struct pmx_mode nand_mode = { | 43 | struct pmx_mode spear300_nand_mode = { |
44 | .id = NAND_MODE, | 44 | .id = NAND_MODE, |
45 | .name = "nand mode", | 45 | .name = "nand mode", |
46 | .mask = 0x00, | 46 | .mask = 0x00, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | struct pmx_mode nor_mode = { | 49 | struct pmx_mode spear300_nor_mode = { |
50 | .id = NOR_MODE, | 50 | .id = NOR_MODE, |
51 | .name = "nor mode", | 51 | .name = "nor mode", |
52 | .mask = 0x01, | 52 | .mask = 0x01, |
53 | }; | 53 | }; |
54 | 54 | ||
55 | struct pmx_mode photo_frame_mode = { | 55 | struct pmx_mode spear300_photo_frame_mode = { |
56 | .id = PHOTO_FRAME_MODE, | 56 | .id = PHOTO_FRAME_MODE, |
57 | .name = "photo frame mode", | 57 | .name = "photo frame mode", |
58 | .mask = 0x02, | 58 | .mask = 0x02, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | struct pmx_mode lend_ip_phone_mode = { | 61 | struct pmx_mode spear300_lend_ip_phone_mode = { |
62 | .id = LEND_IP_PHONE_MODE, | 62 | .id = LEND_IP_PHONE_MODE, |
63 | .name = "lend ip phone mode", | 63 | .name = "lend ip phone mode", |
64 | .mask = 0x03, | 64 | .mask = 0x03, |
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct pmx_mode hend_ip_phone_mode = { | 67 | struct pmx_mode spear300_hend_ip_phone_mode = { |
68 | .id = HEND_IP_PHONE_MODE, | 68 | .id = HEND_IP_PHONE_MODE, |
69 | .name = "hend ip phone mode", | 69 | .name = "hend ip phone mode", |
70 | .mask = 0x04, | 70 | .mask = 0x04, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | struct pmx_mode lend_wifi_phone_mode = { | 73 | struct pmx_mode spear300_lend_wifi_phone_mode = { |
74 | .id = LEND_WIFI_PHONE_MODE, | 74 | .id = LEND_WIFI_PHONE_MODE, |
75 | .name = "lend wifi phone mode", | 75 | .name = "lend wifi phone mode", |
76 | .mask = 0x05, | 76 | .mask = 0x05, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | struct pmx_mode hend_wifi_phone_mode = { | 79 | struct pmx_mode spear300_hend_wifi_phone_mode = { |
80 | .id = HEND_WIFI_PHONE_MODE, | 80 | .id = HEND_WIFI_PHONE_MODE, |
81 | .name = "hend wifi phone mode", | 81 | .name = "hend wifi phone mode", |
82 | .mask = 0x06, | 82 | .mask = 0x06, |
83 | }; | 83 | }; |
84 | 84 | ||
85 | struct pmx_mode ata_pabx_wi2s_mode = { | 85 | struct pmx_mode spear300_ata_pabx_wi2s_mode = { |
86 | .id = ATA_PABX_WI2S_MODE, | 86 | .id = ATA_PABX_WI2S_MODE, |
87 | .name = "ata pabx wi2s mode", | 87 | .name = "ata pabx wi2s mode", |
88 | .mask = 0x07, | 88 | .mask = 0x07, |
89 | }; | 89 | }; |
90 | 90 | ||
91 | struct pmx_mode ata_pabx_i2s_mode = { | 91 | struct pmx_mode spear300_ata_pabx_i2s_mode = { |
92 | .id = ATA_PABX_I2S_MODE, | 92 | .id = ATA_PABX_I2S_MODE, |
93 | .name = "ata pabx i2s mode", | 93 | .name = "ata pabx i2s mode", |
94 | .mask = 0x08, | 94 | .mask = 0x08, |
95 | }; | 95 | }; |
96 | 96 | ||
97 | struct pmx_mode caml_lcdw_mode = { | 97 | struct pmx_mode spear300_caml_lcdw_mode = { |
98 | .id = CAML_LCDW_MODE, | 98 | .id = CAML_LCDW_MODE, |
99 | .name = "caml lcdw mode", | 99 | .name = "caml lcdw mode", |
100 | .mask = 0x0C, | 100 | .mask = 0x0C, |
101 | }; | 101 | }; |
102 | 102 | ||
103 | struct pmx_mode camu_lcd_mode = { | 103 | struct pmx_mode spear300_camu_lcd_mode = { |
104 | .id = CAMU_LCD_MODE, | 104 | .id = CAMU_LCD_MODE, |
105 | .name = "camu lcd mode", | 105 | .name = "camu lcd mode", |
106 | .mask = 0x0D, | 106 | .mask = 0x0D, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | struct pmx_mode camu_wlcd_mode = { | 109 | struct pmx_mode spear300_camu_wlcd_mode = { |
110 | .id = CAMU_WLCD_MODE, | 110 | .id = CAMU_WLCD_MODE, |
111 | .name = "camu wlcd mode", | 111 | .name = "camu wlcd mode", |
112 | .mask = 0x0E, | 112 | .mask = 0x0E, |
113 | }; | 113 | }; |
114 | 114 | ||
115 | struct pmx_mode caml_lcd_mode = { | 115 | struct pmx_mode spear300_caml_lcd_mode = { |
116 | .id = CAML_LCD_MODE, | 116 | .id = CAML_LCD_MODE, |
117 | .name = "caml lcd mode", | 117 | .name = "caml lcd mode", |
118 | .mask = 0x0F, | 118 | .mask = 0x0F, |
119 | }; | 119 | }; |
120 | 120 | ||
121 | /* devices */ | 121 | /* devices */ |
122 | struct pmx_dev_mode pmx_fsmc_2_chips_modes[] = { | 122 | static struct pmx_dev_mode pmx_fsmc_2_chips_modes[] = { |
123 | { | 123 | { |
124 | .ids = NAND_MODE | NOR_MODE | PHOTO_FRAME_MODE | | 124 | .ids = NAND_MODE | NOR_MODE | PHOTO_FRAME_MODE | |
125 | ATA_PABX_WI2S_MODE | ATA_PABX_I2S_MODE, | 125 | ATA_PABX_WI2S_MODE | ATA_PABX_I2S_MODE, |
@@ -127,14 +127,14 @@ struct pmx_dev_mode pmx_fsmc_2_chips_modes[] = { | |||
127 | }, | 127 | }, |
128 | }; | 128 | }; |
129 | 129 | ||
130 | struct pmx_dev pmx_fsmc_2_chips = { | 130 | struct pmx_dev spear300_pmx_fsmc_2_chips = { |
131 | .name = "fsmc_2_chips", | 131 | .name = "fsmc_2_chips", |
132 | .modes = pmx_fsmc_2_chips_modes, | 132 | .modes = pmx_fsmc_2_chips_modes, |
133 | .mode_count = ARRAY_SIZE(pmx_fsmc_2_chips_modes), | 133 | .mode_count = ARRAY_SIZE(pmx_fsmc_2_chips_modes), |
134 | .enb_on_reset = 1, | 134 | .enb_on_reset = 1, |
135 | }; | 135 | }; |
136 | 136 | ||
137 | struct pmx_dev_mode pmx_fsmc_4_chips_modes[] = { | 137 | static struct pmx_dev_mode pmx_fsmc_4_chips_modes[] = { |
138 | { | 138 | { |
139 | .ids = NAND_MODE | NOR_MODE | PHOTO_FRAME_MODE | | 139 | .ids = NAND_MODE | NOR_MODE | PHOTO_FRAME_MODE | |
140 | ATA_PABX_WI2S_MODE | ATA_PABX_I2S_MODE, | 140 | ATA_PABX_WI2S_MODE | ATA_PABX_I2S_MODE, |
@@ -142,14 +142,14 @@ struct pmx_dev_mode pmx_fsmc_4_chips_modes[] = { | |||
142 | }, | 142 | }, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | struct pmx_dev pmx_fsmc_4_chips = { | 145 | struct pmx_dev spear300_pmx_fsmc_4_chips = { |
146 | .name = "fsmc_4_chips", | 146 | .name = "fsmc_4_chips", |
147 | .modes = pmx_fsmc_4_chips_modes, | 147 | .modes = pmx_fsmc_4_chips_modes, |
148 | .mode_count = ARRAY_SIZE(pmx_fsmc_4_chips_modes), | 148 | .mode_count = ARRAY_SIZE(pmx_fsmc_4_chips_modes), |
149 | .enb_on_reset = 1, | 149 | .enb_on_reset = 1, |
150 | }; | 150 | }; |
151 | 151 | ||
152 | struct pmx_dev_mode pmx_keyboard_modes[] = { | 152 | static struct pmx_dev_mode pmx_keyboard_modes[] = { |
153 | { | 153 | { |
154 | .ids = LEND_IP_PHONE_MODE | HEND_IP_PHONE_MODE | | 154 | .ids = LEND_IP_PHONE_MODE | HEND_IP_PHONE_MODE | |
155 | LEND_WIFI_PHONE_MODE | HEND_WIFI_PHONE_MODE | | 155 | LEND_WIFI_PHONE_MODE | HEND_WIFI_PHONE_MODE | |
@@ -159,14 +159,14 @@ struct pmx_dev_mode pmx_keyboard_modes[] = { | |||
159 | }, | 159 | }, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | struct pmx_dev pmx_keyboard = { | 162 | struct pmx_dev spear300_pmx_keyboard = { |
163 | .name = "keyboard", | 163 | .name = "keyboard", |
164 | .modes = pmx_keyboard_modes, | 164 | .modes = pmx_keyboard_modes, |
165 | .mode_count = ARRAY_SIZE(pmx_keyboard_modes), | 165 | .mode_count = ARRAY_SIZE(pmx_keyboard_modes), |
166 | .enb_on_reset = 1, | 166 | .enb_on_reset = 1, |
167 | }; | 167 | }; |
168 | 168 | ||
169 | struct pmx_dev_mode pmx_clcd_modes[] = { | 169 | static struct pmx_dev_mode pmx_clcd_modes[] = { |
170 | { | 170 | { |
171 | .ids = PHOTO_FRAME_MODE, | 171 | .ids = PHOTO_FRAME_MODE, |
172 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK , | 172 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK , |
@@ -177,14 +177,14 @@ struct pmx_dev_mode pmx_clcd_modes[] = { | |||
177 | }, | 177 | }, |
178 | }; | 178 | }; |
179 | 179 | ||
180 | struct pmx_dev pmx_clcd = { | 180 | struct pmx_dev spear300_pmx_clcd = { |
181 | .name = "clcd", | 181 | .name = "clcd", |
182 | .modes = pmx_clcd_modes, | 182 | .modes = pmx_clcd_modes, |
183 | .mode_count = ARRAY_SIZE(pmx_clcd_modes), | 183 | .mode_count = ARRAY_SIZE(pmx_clcd_modes), |
184 | .enb_on_reset = 1, | 184 | .enb_on_reset = 1, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | struct pmx_dev_mode pmx_telecom_gpio_modes[] = { | 187 | static struct pmx_dev_mode pmx_telecom_gpio_modes[] = { |
188 | { | 188 | { |
189 | .ids = PHOTO_FRAME_MODE | CAMU_LCD_MODE | CAML_LCD_MODE, | 189 | .ids = PHOTO_FRAME_MODE | CAMU_LCD_MODE | CAML_LCD_MODE, |
190 | .mask = PMX_MII_MASK, | 190 | .mask = PMX_MII_MASK, |
@@ -204,14 +204,14 @@ struct pmx_dev_mode pmx_telecom_gpio_modes[] = { | |||
204 | }, | 204 | }, |
205 | }; | 205 | }; |
206 | 206 | ||
207 | struct pmx_dev pmx_telecom_gpio = { | 207 | struct pmx_dev spear300_pmx_telecom_gpio = { |
208 | .name = "telecom_gpio", | 208 | .name = "telecom_gpio", |
209 | .modes = pmx_telecom_gpio_modes, | 209 | .modes = pmx_telecom_gpio_modes, |
210 | .mode_count = ARRAY_SIZE(pmx_telecom_gpio_modes), | 210 | .mode_count = ARRAY_SIZE(pmx_telecom_gpio_modes), |
211 | .enb_on_reset = 1, | 211 | .enb_on_reset = 1, |
212 | }; | 212 | }; |
213 | 213 | ||
214 | struct pmx_dev_mode pmx_telecom_tdm_modes[] = { | 214 | static struct pmx_dev_mode pmx_telecom_tdm_modes[] = { |
215 | { | 215 | { |
216 | .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | | 216 | .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | |
217 | HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | 217 | HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE |
@@ -222,14 +222,14 @@ struct pmx_dev_mode pmx_telecom_tdm_modes[] = { | |||
222 | }, | 222 | }, |
223 | }; | 223 | }; |
224 | 224 | ||
225 | struct pmx_dev pmx_telecom_tdm = { | 225 | struct pmx_dev spear300_pmx_telecom_tdm = { |
226 | .name = "telecom_tdm", | 226 | .name = "telecom_tdm", |
227 | .modes = pmx_telecom_tdm_modes, | 227 | .modes = pmx_telecom_tdm_modes, |
228 | .mode_count = ARRAY_SIZE(pmx_telecom_tdm_modes), | 228 | .mode_count = ARRAY_SIZE(pmx_telecom_tdm_modes), |
229 | .enb_on_reset = 1, | 229 | .enb_on_reset = 1, |
230 | }; | 230 | }; |
231 | 231 | ||
232 | struct pmx_dev_mode pmx_telecom_spi_cs_i2c_clk_modes[] = { | 232 | static struct pmx_dev_mode pmx_telecom_spi_cs_i2c_clk_modes[] = { |
233 | { | 233 | { |
234 | .ids = LEND_IP_PHONE_MODE | HEND_IP_PHONE_MODE | | 234 | .ids = LEND_IP_PHONE_MODE | HEND_IP_PHONE_MODE | |
235 | LEND_WIFI_PHONE_MODE | HEND_WIFI_PHONE_MODE | 235 | LEND_WIFI_PHONE_MODE | HEND_WIFI_PHONE_MODE |
@@ -239,14 +239,14 @@ struct pmx_dev_mode pmx_telecom_spi_cs_i2c_clk_modes[] = { | |||
239 | }, | 239 | }, |
240 | }; | 240 | }; |
241 | 241 | ||
242 | struct pmx_dev pmx_telecom_spi_cs_i2c_clk = { | 242 | struct pmx_dev spear300_pmx_telecom_spi_cs_i2c_clk = { |
243 | .name = "telecom_spi_cs_i2c_clk", | 243 | .name = "telecom_spi_cs_i2c_clk", |
244 | .modes = pmx_telecom_spi_cs_i2c_clk_modes, | 244 | .modes = pmx_telecom_spi_cs_i2c_clk_modes, |
245 | .mode_count = ARRAY_SIZE(pmx_telecom_spi_cs_i2c_clk_modes), | 245 | .mode_count = ARRAY_SIZE(pmx_telecom_spi_cs_i2c_clk_modes), |
246 | .enb_on_reset = 1, | 246 | .enb_on_reset = 1, |
247 | }; | 247 | }; |
248 | 248 | ||
249 | struct pmx_dev_mode pmx_telecom_camera_modes[] = { | 249 | static struct pmx_dev_mode pmx_telecom_camera_modes[] = { |
250 | { | 250 | { |
251 | .ids = CAML_LCDW_MODE | CAML_LCD_MODE, | 251 | .ids = CAML_LCDW_MODE | CAML_LCD_MODE, |
252 | .mask = PMX_MII_MASK, | 252 | .mask = PMX_MII_MASK, |
@@ -256,14 +256,14 @@ struct pmx_dev_mode pmx_telecom_camera_modes[] = { | |||
256 | }, | 256 | }, |
257 | }; | 257 | }; |
258 | 258 | ||
259 | struct pmx_dev pmx_telecom_camera = { | 259 | struct pmx_dev spear300_pmx_telecom_camera = { |
260 | .name = "telecom_camera", | 260 | .name = "telecom_camera", |
261 | .modes = pmx_telecom_camera_modes, | 261 | .modes = pmx_telecom_camera_modes, |
262 | .mode_count = ARRAY_SIZE(pmx_telecom_camera_modes), | 262 | .mode_count = ARRAY_SIZE(pmx_telecom_camera_modes), |
263 | .enb_on_reset = 1, | 263 | .enb_on_reset = 1, |
264 | }; | 264 | }; |
265 | 265 | ||
266 | struct pmx_dev_mode pmx_telecom_dac_modes[] = { | 266 | static struct pmx_dev_mode pmx_telecom_dac_modes[] = { |
267 | { | 267 | { |
268 | .ids = ATA_PABX_I2S_MODE | CAML_LCDW_MODE | CAMU_LCD_MODE | 268 | .ids = ATA_PABX_I2S_MODE | CAML_LCDW_MODE | CAMU_LCD_MODE |
269 | | CAMU_WLCD_MODE | CAML_LCD_MODE, | 269 | | CAMU_WLCD_MODE | CAML_LCD_MODE, |
@@ -271,14 +271,14 @@ struct pmx_dev_mode pmx_telecom_dac_modes[] = { | |||
271 | }, | 271 | }, |
272 | }; | 272 | }; |
273 | 273 | ||
274 | struct pmx_dev pmx_telecom_dac = { | 274 | struct pmx_dev spear300_pmx_telecom_dac = { |
275 | .name = "telecom_dac", | 275 | .name = "telecom_dac", |
276 | .modes = pmx_telecom_dac_modes, | 276 | .modes = pmx_telecom_dac_modes, |
277 | .mode_count = ARRAY_SIZE(pmx_telecom_dac_modes), | 277 | .mode_count = ARRAY_SIZE(pmx_telecom_dac_modes), |
278 | .enb_on_reset = 1, | 278 | .enb_on_reset = 1, |
279 | }; | 279 | }; |
280 | 280 | ||
281 | struct pmx_dev_mode pmx_telecom_i2s_modes[] = { | 281 | static struct pmx_dev_mode pmx_telecom_i2s_modes[] = { |
282 | { | 282 | { |
283 | .ids = LEND_IP_PHONE_MODE | HEND_IP_PHONE_MODE | 283 | .ids = LEND_IP_PHONE_MODE | HEND_IP_PHONE_MODE |
284 | | LEND_WIFI_PHONE_MODE | HEND_WIFI_PHONE_MODE | | 284 | | LEND_WIFI_PHONE_MODE | HEND_WIFI_PHONE_MODE | |
@@ -288,14 +288,14 @@ struct pmx_dev_mode pmx_telecom_i2s_modes[] = { | |||
288 | }, | 288 | }, |
289 | }; | 289 | }; |
290 | 290 | ||
291 | struct pmx_dev pmx_telecom_i2s = { | 291 | struct pmx_dev spear300_pmx_telecom_i2s = { |
292 | .name = "telecom_i2s", | 292 | .name = "telecom_i2s", |
293 | .modes = pmx_telecom_i2s_modes, | 293 | .modes = pmx_telecom_i2s_modes, |
294 | .mode_count = ARRAY_SIZE(pmx_telecom_i2s_modes), | 294 | .mode_count = ARRAY_SIZE(pmx_telecom_i2s_modes), |
295 | .enb_on_reset = 1, | 295 | .enb_on_reset = 1, |
296 | }; | 296 | }; |
297 | 297 | ||
298 | struct pmx_dev_mode pmx_telecom_boot_pins_modes[] = { | 298 | static struct pmx_dev_mode pmx_telecom_boot_pins_modes[] = { |
299 | { | 299 | { |
300 | .ids = NAND_MODE | NOR_MODE, | 300 | .ids = NAND_MODE | NOR_MODE, |
301 | .mask = PMX_UART0_MODEM_MASK | PMX_TIMER_1_2_MASK | | 301 | .mask = PMX_UART0_MODEM_MASK | PMX_TIMER_1_2_MASK | |
@@ -303,14 +303,14 @@ struct pmx_dev_mode pmx_telecom_boot_pins_modes[] = { | |||
303 | }, | 303 | }, |
304 | }; | 304 | }; |
305 | 305 | ||
306 | struct pmx_dev pmx_telecom_boot_pins = { | 306 | struct pmx_dev spear300_pmx_telecom_boot_pins = { |
307 | .name = "telecom_boot_pins", | 307 | .name = "telecom_boot_pins", |
308 | .modes = pmx_telecom_boot_pins_modes, | 308 | .modes = pmx_telecom_boot_pins_modes, |
309 | .mode_count = ARRAY_SIZE(pmx_telecom_boot_pins_modes), | 309 | .mode_count = ARRAY_SIZE(pmx_telecom_boot_pins_modes), |
310 | .enb_on_reset = 1, | 310 | .enb_on_reset = 1, |
311 | }; | 311 | }; |
312 | 312 | ||
313 | struct pmx_dev_mode pmx_telecom_sdhci_4bit_modes[] = { | 313 | static struct pmx_dev_mode pmx_telecom_sdhci_4bit_modes[] = { |
314 | { | 314 | { |
315 | .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | | 315 | .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | |
316 | HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | | 316 | HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | |
@@ -323,14 +323,14 @@ struct pmx_dev_mode pmx_telecom_sdhci_4bit_modes[] = { | |||
323 | }, | 323 | }, |
324 | }; | 324 | }; |
325 | 325 | ||
326 | struct pmx_dev pmx_telecom_sdhci_4bit = { | 326 | struct pmx_dev spear300_pmx_telecom_sdhci_4bit = { |
327 | .name = "telecom_sdhci_4bit", | 327 | .name = "telecom_sdhci_4bit", |
328 | .modes = pmx_telecom_sdhci_4bit_modes, | 328 | .modes = pmx_telecom_sdhci_4bit_modes, |
329 | .mode_count = ARRAY_SIZE(pmx_telecom_sdhci_4bit_modes), | 329 | .mode_count = ARRAY_SIZE(pmx_telecom_sdhci_4bit_modes), |
330 | .enb_on_reset = 1, | 330 | .enb_on_reset = 1, |
331 | }; | 331 | }; |
332 | 332 | ||
333 | struct pmx_dev_mode pmx_telecom_sdhci_8bit_modes[] = { | 333 | static struct pmx_dev_mode pmx_telecom_sdhci_8bit_modes[] = { |
334 | { | 334 | { |
335 | .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | | 335 | .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | |
336 | HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | | 336 | HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | |
@@ -342,14 +342,14 @@ struct pmx_dev_mode pmx_telecom_sdhci_8bit_modes[] = { | |||
342 | }, | 342 | }, |
343 | }; | 343 | }; |
344 | 344 | ||
345 | struct pmx_dev pmx_telecom_sdhci_8bit = { | 345 | struct pmx_dev spear300_pmx_telecom_sdhci_8bit = { |
346 | .name = "telecom_sdhci_8bit", | 346 | .name = "telecom_sdhci_8bit", |
347 | .modes = pmx_telecom_sdhci_8bit_modes, | 347 | .modes = pmx_telecom_sdhci_8bit_modes, |
348 | .mode_count = ARRAY_SIZE(pmx_telecom_sdhci_8bit_modes), | 348 | .mode_count = ARRAY_SIZE(pmx_telecom_sdhci_8bit_modes), |
349 | .enb_on_reset = 1, | 349 | .enb_on_reset = 1, |
350 | }; | 350 | }; |
351 | 351 | ||
352 | struct pmx_dev_mode pmx_gpio1_modes[] = { | 352 | static struct pmx_dev_mode pmx_gpio1_modes[] = { |
353 | { | 353 | { |
354 | .ids = PHOTO_FRAME_MODE, | 354 | .ids = PHOTO_FRAME_MODE, |
355 | .mask = PMX_UART0_MODEM_MASK | PMX_TIMER_1_2_MASK | | 355 | .mask = PMX_UART0_MODEM_MASK | PMX_TIMER_1_2_MASK | |
@@ -357,7 +357,7 @@ struct pmx_dev_mode pmx_gpio1_modes[] = { | |||
357 | }, | 357 | }, |
358 | }; | 358 | }; |
359 | 359 | ||
360 | struct pmx_dev pmx_gpio1 = { | 360 | struct pmx_dev spear300_pmx_gpio1 = { |
361 | .name = "arm gpio1", | 361 | .name = "arm gpio1", |
362 | .modes = pmx_gpio1_modes, | 362 | .modes = pmx_gpio1_modes, |
363 | .mode_count = ARRAY_SIZE(pmx_gpio1_modes), | 363 | .mode_count = ARRAY_SIZE(pmx_gpio1_modes), |
@@ -365,60 +365,60 @@ struct pmx_dev pmx_gpio1 = { | |||
365 | }; | 365 | }; |
366 | 366 | ||
367 | /* pmx driver structure */ | 367 | /* pmx driver structure */ |
368 | struct pmx_driver pmx_driver = { | 368 | static struct pmx_driver pmx_driver = { |
369 | .mode_reg = {.offset = MODE_CONFIG_REG, .mask = 0x0000000f}, | 369 | .mode_reg = {.offset = MODE_CONFIG_REG, .mask = 0x0000000f}, |
370 | .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, | 370 | .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, |
371 | }; | 371 | }; |
372 | 372 | ||
373 | /* spear3xx shared irq */ | 373 | /* spear3xx shared irq */ |
374 | struct shirq_dev_config shirq_ras1_config[] = { | 374 | static struct shirq_dev_config shirq_ras1_config[] = { |
375 | { | 375 | { |
376 | .virq = VIRQ_IT_PERS_S, | 376 | .virq = SPEAR300_VIRQ_IT_PERS_S, |
377 | .enb_mask = IT_PERS_S_IRQ_MASK, | 377 | .enb_mask = SPEAR300_IT_PERS_S_IRQ_MASK, |
378 | .status_mask = IT_PERS_S_IRQ_MASK, | 378 | .status_mask = SPEAR300_IT_PERS_S_IRQ_MASK, |
379 | }, { | 379 | }, { |
380 | .virq = VIRQ_IT_CHANGE_S, | 380 | .virq = SPEAR300_VIRQ_IT_CHANGE_S, |
381 | .enb_mask = IT_CHANGE_S_IRQ_MASK, | 381 | .enb_mask = SPEAR300_IT_CHANGE_S_IRQ_MASK, |
382 | .status_mask = IT_CHANGE_S_IRQ_MASK, | 382 | .status_mask = SPEAR300_IT_CHANGE_S_IRQ_MASK, |
383 | }, { | 383 | }, { |
384 | .virq = VIRQ_I2S, | 384 | .virq = SPEAR300_VIRQ_I2S, |
385 | .enb_mask = I2S_IRQ_MASK, | 385 | .enb_mask = SPEAR300_I2S_IRQ_MASK, |
386 | .status_mask = I2S_IRQ_MASK, | 386 | .status_mask = SPEAR300_I2S_IRQ_MASK, |
387 | }, { | 387 | }, { |
388 | .virq = VIRQ_TDM, | 388 | .virq = SPEAR300_VIRQ_TDM, |
389 | .enb_mask = TDM_IRQ_MASK, | 389 | .enb_mask = SPEAR300_TDM_IRQ_MASK, |
390 | .status_mask = TDM_IRQ_MASK, | 390 | .status_mask = SPEAR300_TDM_IRQ_MASK, |
391 | }, { | 391 | }, { |
392 | .virq = VIRQ_CAMERA_L, | 392 | .virq = SPEAR300_VIRQ_CAMERA_L, |
393 | .enb_mask = CAMERA_L_IRQ_MASK, | 393 | .enb_mask = SPEAR300_CAMERA_L_IRQ_MASK, |
394 | .status_mask = CAMERA_L_IRQ_MASK, | 394 | .status_mask = SPEAR300_CAMERA_L_IRQ_MASK, |
395 | }, { | 395 | }, { |
396 | .virq = VIRQ_CAMERA_F, | 396 | .virq = SPEAR300_VIRQ_CAMERA_F, |
397 | .enb_mask = CAMERA_F_IRQ_MASK, | 397 | .enb_mask = SPEAR300_CAMERA_F_IRQ_MASK, |
398 | .status_mask = CAMERA_F_IRQ_MASK, | 398 | .status_mask = SPEAR300_CAMERA_F_IRQ_MASK, |
399 | }, { | 399 | }, { |
400 | .virq = VIRQ_CAMERA_V, | 400 | .virq = SPEAR300_VIRQ_CAMERA_V, |
401 | .enb_mask = CAMERA_V_IRQ_MASK, | 401 | .enb_mask = SPEAR300_CAMERA_V_IRQ_MASK, |
402 | .status_mask = CAMERA_V_IRQ_MASK, | 402 | .status_mask = SPEAR300_CAMERA_V_IRQ_MASK, |
403 | }, { | 403 | }, { |
404 | .virq = VIRQ_KEYBOARD, | 404 | .virq = SPEAR300_VIRQ_KEYBOARD, |
405 | .enb_mask = KEYBOARD_IRQ_MASK, | 405 | .enb_mask = SPEAR300_KEYBOARD_IRQ_MASK, |
406 | .status_mask = KEYBOARD_IRQ_MASK, | 406 | .status_mask = SPEAR300_KEYBOARD_IRQ_MASK, |
407 | }, { | 407 | }, { |
408 | .virq = VIRQ_GPIO1, | 408 | .virq = SPEAR300_VIRQ_GPIO1, |
409 | .enb_mask = GPIO1_IRQ_MASK, | 409 | .enb_mask = SPEAR300_GPIO1_IRQ_MASK, |
410 | .status_mask = GPIO1_IRQ_MASK, | 410 | .status_mask = SPEAR300_GPIO1_IRQ_MASK, |
411 | }, | 411 | }, |
412 | }; | 412 | }; |
413 | 413 | ||
414 | struct spear_shirq shirq_ras1 = { | 414 | static struct spear_shirq shirq_ras1 = { |
415 | .irq = IRQ_GEN_RAS_1, | 415 | .irq = SPEAR3XX_IRQ_GEN_RAS_1, |
416 | .dev_config = shirq_ras1_config, | 416 | .dev_config = shirq_ras1_config, |
417 | .dev_count = ARRAY_SIZE(shirq_ras1_config), | 417 | .dev_count = ARRAY_SIZE(shirq_ras1_config), |
418 | .regs = { | 418 | .regs = { |
419 | .enb_reg = INT_ENB_MASK_REG, | 419 | .enb_reg = SPEAR300_INT_ENB_MASK_REG, |
420 | .status_reg = INT_STS_MASK_REG, | 420 | .status_reg = SPEAR300_INT_STS_MASK_REG, |
421 | .status_reg_mask = SHIRQ_RAS1_MASK, | 421 | .status_reg_mask = SPEAR300_SHIRQ_RAS1_MASK, |
422 | .clear_reg = -1, | 422 | .clear_reg = -1, |
423 | }, | 423 | }, |
424 | }; | 424 | }; |
@@ -427,10 +427,10 @@ struct spear_shirq shirq_ras1 = { | |||
427 | /* arm gpio1 device registration */ | 427 | /* arm gpio1 device registration */ |
428 | static struct pl061_platform_data gpio1_plat_data = { | 428 | static struct pl061_platform_data gpio1_plat_data = { |
429 | .gpio_base = 8, | 429 | .gpio_base = 8, |
430 | .irq_base = SPEAR_GPIO1_INT_BASE, | 430 | .irq_base = SPEAR300_GPIO1_INT_BASE, |
431 | }; | 431 | }; |
432 | 432 | ||
433 | struct amba_device gpio1_device = { | 433 | struct amba_device spear300_gpio1_device = { |
434 | .dev = { | 434 | .dev = { |
435 | .init_name = "gpio1", | 435 | .init_name = "gpio1", |
436 | .platform_data = &gpio1_plat_data, | 436 | .platform_data = &gpio1_plat_data, |
@@ -440,11 +440,12 @@ struct amba_device gpio1_device = { | |||
440 | .end = SPEAR300_GPIO_BASE + SZ_4K - 1, | 440 | .end = SPEAR300_GPIO_BASE + SZ_4K - 1, |
441 | .flags = IORESOURCE_MEM, | 441 | .flags = IORESOURCE_MEM, |
442 | }, | 442 | }, |
443 | .irq = {VIRQ_GPIO1, NO_IRQ}, | 443 | .irq = {SPEAR300_VIRQ_GPIO1, NO_IRQ}, |
444 | }; | 444 | }; |
445 | 445 | ||
446 | /* spear300 routines */ | 446 | /* spear300 routines */ |
447 | void __init spear300_init(void) | 447 | void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, |
448 | u8 pmx_dev_count) | ||
448 | { | 449 | { |
449 | int ret = 0; | 450 | int ret = 0; |
450 | 451 | ||
@@ -460,6 +461,10 @@ void __init spear300_init(void) | |||
460 | } | 461 | } |
461 | 462 | ||
462 | /* pmx initialization */ | 463 | /* pmx initialization */ |
464 | pmx_driver.mode = pmx_mode; | ||
465 | pmx_driver.devs = pmx_devs; | ||
466 | pmx_driver.devs_count = pmx_dev_count; | ||
467 | |||
463 | pmx_driver.base = ioremap(SPEAR300_SOC_CONFIG_BASE, SZ_4K); | 468 | pmx_driver.base = ioremap(SPEAR300_SOC_CONFIG_BASE, SZ_4K); |
464 | if (pmx_driver.base) { | 469 | if (pmx_driver.base) { |
465 | ret = pmx_register(&pmx_driver); | 470 | ret = pmx_register(&pmx_driver); |
diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c index 42d2253ef540..69006f694220 100644 --- a/arch/arm/mach-spear3xx/spear300_evb.c +++ b/arch/arm/mach-spear3xx/spear300_evb.c | |||
@@ -19,26 +19,26 @@ | |||
19 | /* padmux devices to enable */ | 19 | /* padmux devices to enable */ |
20 | static struct pmx_dev *pmx_devs[] = { | 20 | static struct pmx_dev *pmx_devs[] = { |
21 | /* spear3xx specific devices */ | 21 | /* spear3xx specific devices */ |
22 | &pmx_i2c, | 22 | &spear3xx_pmx_i2c, |
23 | &pmx_ssp_cs, | 23 | &spear3xx_pmx_ssp_cs, |
24 | &pmx_ssp, | 24 | &spear3xx_pmx_ssp, |
25 | &pmx_mii, | 25 | &spear3xx_pmx_mii, |
26 | &pmx_uart0, | 26 | &spear3xx_pmx_uart0, |
27 | 27 | ||
28 | /* spear300 specific devices */ | 28 | /* spear300 specific devices */ |
29 | &pmx_fsmc_2_chips, | 29 | &spear300_pmx_fsmc_2_chips, |
30 | &pmx_clcd, | 30 | &spear300_pmx_clcd, |
31 | &pmx_telecom_sdhci_4bit, | 31 | &spear300_pmx_telecom_sdhci_4bit, |
32 | &pmx_gpio1, | 32 | &spear300_pmx_gpio1, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | static struct amba_device *amba_devs[] __initdata = { | 35 | static struct amba_device *amba_devs[] __initdata = { |
36 | /* spear3xx specific devices */ | 36 | /* spear3xx specific devices */ |
37 | &gpio_device, | 37 | &spear3xx_gpio_device, |
38 | &uart_device, | 38 | &spear3xx_uart_device, |
39 | 39 | ||
40 | /* spear300 specific devices */ | 40 | /* spear300 specific devices */ |
41 | &gpio1_device, | 41 | &spear300_gpio1_device, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static struct platform_device *plat_devs[] __initdata = { | 44 | static struct platform_device *plat_devs[] __initdata = { |
@@ -51,13 +51,9 @@ static void __init spear300_evb_init(void) | |||
51 | { | 51 | { |
52 | unsigned int i; | 52 | unsigned int i; |
53 | 53 | ||
54 | /* padmux initialization, must be done before spear300_init */ | ||
55 | pmx_driver.mode = &photo_frame_mode; | ||
56 | pmx_driver.devs = pmx_devs; | ||
57 | pmx_driver.devs_count = ARRAY_SIZE(pmx_devs); | ||
58 | |||
59 | /* call spear300 machine init function */ | 54 | /* call spear300 machine init function */ |
60 | spear300_init(); | 55 | spear300_init(&spear300_photo_frame_mode, pmx_devs, |
56 | ARRAY_SIZE(pmx_devs)); | ||
61 | 57 | ||
62 | /* Add Platform Devices */ | 58 | /* Add Platform Devices */ |
63 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | 59 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); |
diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear3xx/spear310.c index 5c0a67b60c2a..9004cf9f01bf 100644 --- a/arch/arm/mach-spear3xx/spear310.c +++ b/arch/arm/mach-spear3xx/spear310.c | |||
@@ -22,112 +22,112 @@ | |||
22 | #define PAD_MUX_CONFIG_REG 0x08 | 22 | #define PAD_MUX_CONFIG_REG 0x08 |
23 | 23 | ||
24 | /* devices */ | 24 | /* devices */ |
25 | struct pmx_dev_mode pmx_emi_cs_0_1_4_5_modes[] = { | 25 | static struct pmx_dev_mode pmx_emi_cs_0_1_4_5_modes[] = { |
26 | { | 26 | { |
27 | .ids = 0x00, | 27 | .ids = 0x00, |
28 | .mask = PMX_TIMER_3_4_MASK, | 28 | .mask = PMX_TIMER_3_4_MASK, |
29 | }, | 29 | }, |
30 | }; | 30 | }; |
31 | 31 | ||
32 | struct pmx_dev pmx_emi_cs_0_1_4_5 = { | 32 | struct pmx_dev spear310_pmx_emi_cs_0_1_4_5 = { |
33 | .name = "emi_cs_0_1_4_5", | 33 | .name = "emi_cs_0_1_4_5", |
34 | .modes = pmx_emi_cs_0_1_4_5_modes, | 34 | .modes = pmx_emi_cs_0_1_4_5_modes, |
35 | .mode_count = ARRAY_SIZE(pmx_emi_cs_0_1_4_5_modes), | 35 | .mode_count = ARRAY_SIZE(pmx_emi_cs_0_1_4_5_modes), |
36 | .enb_on_reset = 1, | 36 | .enb_on_reset = 1, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | struct pmx_dev_mode pmx_emi_cs_2_3_modes[] = { | 39 | static struct pmx_dev_mode pmx_emi_cs_2_3_modes[] = { |
40 | { | 40 | { |
41 | .ids = 0x00, | 41 | .ids = 0x00, |
42 | .mask = PMX_TIMER_1_2_MASK, | 42 | .mask = PMX_TIMER_1_2_MASK, |
43 | }, | 43 | }, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | struct pmx_dev pmx_emi_cs_2_3 = { | 46 | struct pmx_dev spear310_pmx_emi_cs_2_3 = { |
47 | .name = "emi_cs_2_3", | 47 | .name = "emi_cs_2_3", |
48 | .modes = pmx_emi_cs_2_3_modes, | 48 | .modes = pmx_emi_cs_2_3_modes, |
49 | .mode_count = ARRAY_SIZE(pmx_emi_cs_2_3_modes), | 49 | .mode_count = ARRAY_SIZE(pmx_emi_cs_2_3_modes), |
50 | .enb_on_reset = 1, | 50 | .enb_on_reset = 1, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | struct pmx_dev_mode pmx_uart1_modes[] = { | 53 | static struct pmx_dev_mode pmx_uart1_modes[] = { |
54 | { | 54 | { |
55 | .ids = 0x00, | 55 | .ids = 0x00, |
56 | .mask = PMX_FIRDA_MASK, | 56 | .mask = PMX_FIRDA_MASK, |
57 | }, | 57 | }, |
58 | }; | 58 | }; |
59 | 59 | ||
60 | struct pmx_dev pmx_uart1 = { | 60 | struct pmx_dev spear310_pmx_uart1 = { |
61 | .name = "uart1", | 61 | .name = "uart1", |
62 | .modes = pmx_uart1_modes, | 62 | .modes = pmx_uart1_modes, |
63 | .mode_count = ARRAY_SIZE(pmx_uart1_modes), | 63 | .mode_count = ARRAY_SIZE(pmx_uart1_modes), |
64 | .enb_on_reset = 1, | 64 | .enb_on_reset = 1, |
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct pmx_dev_mode pmx_uart2_modes[] = { | 67 | static struct pmx_dev_mode pmx_uart2_modes[] = { |
68 | { | 68 | { |
69 | .ids = 0x00, | 69 | .ids = 0x00, |
70 | .mask = PMX_TIMER_1_2_MASK, | 70 | .mask = PMX_TIMER_1_2_MASK, |
71 | }, | 71 | }, |
72 | }; | 72 | }; |
73 | 73 | ||
74 | struct pmx_dev pmx_uart2 = { | 74 | struct pmx_dev spear310_pmx_uart2 = { |
75 | .name = "uart2", | 75 | .name = "uart2", |
76 | .modes = pmx_uart2_modes, | 76 | .modes = pmx_uart2_modes, |
77 | .mode_count = ARRAY_SIZE(pmx_uart2_modes), | 77 | .mode_count = ARRAY_SIZE(pmx_uart2_modes), |
78 | .enb_on_reset = 1, | 78 | .enb_on_reset = 1, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | struct pmx_dev_mode pmx_uart3_4_5_modes[] = { | 81 | static struct pmx_dev_mode pmx_uart3_4_5_modes[] = { |
82 | { | 82 | { |
83 | .ids = 0x00, | 83 | .ids = 0x00, |
84 | .mask = PMX_UART0_MODEM_MASK, | 84 | .mask = PMX_UART0_MODEM_MASK, |
85 | }, | 85 | }, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | struct pmx_dev pmx_uart3_4_5 = { | 88 | struct pmx_dev spear310_pmx_uart3_4_5 = { |
89 | .name = "uart3_4_5", | 89 | .name = "uart3_4_5", |
90 | .modes = pmx_uart3_4_5_modes, | 90 | .modes = pmx_uart3_4_5_modes, |
91 | .mode_count = ARRAY_SIZE(pmx_uart3_4_5_modes), | 91 | .mode_count = ARRAY_SIZE(pmx_uart3_4_5_modes), |
92 | .enb_on_reset = 1, | 92 | .enb_on_reset = 1, |
93 | }; | 93 | }; |
94 | 94 | ||
95 | struct pmx_dev_mode pmx_fsmc_modes[] = { | 95 | static struct pmx_dev_mode pmx_fsmc_modes[] = { |
96 | { | 96 | { |
97 | .ids = 0x00, | 97 | .ids = 0x00, |
98 | .mask = PMX_SSP_CS_MASK, | 98 | .mask = PMX_SSP_CS_MASK, |
99 | }, | 99 | }, |
100 | }; | 100 | }; |
101 | 101 | ||
102 | struct pmx_dev pmx_fsmc = { | 102 | struct pmx_dev spear310_pmx_fsmc = { |
103 | .name = "fsmc", | 103 | .name = "fsmc", |
104 | .modes = pmx_fsmc_modes, | 104 | .modes = pmx_fsmc_modes, |
105 | .mode_count = ARRAY_SIZE(pmx_fsmc_modes), | 105 | .mode_count = ARRAY_SIZE(pmx_fsmc_modes), |
106 | .enb_on_reset = 1, | 106 | .enb_on_reset = 1, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | struct pmx_dev_mode pmx_rs485_0_1_modes[] = { | 109 | static struct pmx_dev_mode pmx_rs485_0_1_modes[] = { |
110 | { | 110 | { |
111 | .ids = 0x00, | 111 | .ids = 0x00, |
112 | .mask = PMX_MII_MASK, | 112 | .mask = PMX_MII_MASK, |
113 | }, | 113 | }, |
114 | }; | 114 | }; |
115 | 115 | ||
116 | struct pmx_dev pmx_rs485_0_1 = { | 116 | struct pmx_dev spear310_pmx_rs485_0_1 = { |
117 | .name = "rs485_0_1", | 117 | .name = "rs485_0_1", |
118 | .modes = pmx_rs485_0_1_modes, | 118 | .modes = pmx_rs485_0_1_modes, |
119 | .mode_count = ARRAY_SIZE(pmx_rs485_0_1_modes), | 119 | .mode_count = ARRAY_SIZE(pmx_rs485_0_1_modes), |
120 | .enb_on_reset = 1, | 120 | .enb_on_reset = 1, |
121 | }; | 121 | }; |
122 | 122 | ||
123 | struct pmx_dev_mode pmx_tdm0_modes[] = { | 123 | static struct pmx_dev_mode pmx_tdm0_modes[] = { |
124 | { | 124 | { |
125 | .ids = 0x00, | 125 | .ids = 0x00, |
126 | .mask = PMX_MII_MASK, | 126 | .mask = PMX_MII_MASK, |
127 | }, | 127 | }, |
128 | }; | 128 | }; |
129 | 129 | ||
130 | struct pmx_dev pmx_tdm0 = { | 130 | struct pmx_dev spear310_pmx_tdm0 = { |
131 | .name = "tdm0", | 131 | .name = "tdm0", |
132 | .modes = pmx_tdm0_modes, | 132 | .modes = pmx_tdm0_modes, |
133 | .mode_count = ARRAY_SIZE(pmx_tdm0_modes), | 133 | .mode_count = ARRAY_SIZE(pmx_tdm0_modes), |
@@ -135,122 +135,122 @@ struct pmx_dev pmx_tdm0 = { | |||
135 | }; | 135 | }; |
136 | 136 | ||
137 | /* pmx driver structure */ | 137 | /* pmx driver structure */ |
138 | struct pmx_driver pmx_driver = { | 138 | static struct pmx_driver pmx_driver = { |
139 | .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, | 139 | .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, |
140 | }; | 140 | }; |
141 | 141 | ||
142 | /* spear3xx shared irq */ | 142 | /* spear3xx shared irq */ |
143 | struct shirq_dev_config shirq_ras1_config[] = { | 143 | static struct shirq_dev_config shirq_ras1_config[] = { |
144 | { | 144 | { |
145 | .virq = VIRQ_SMII0, | 145 | .virq = SPEAR310_VIRQ_SMII0, |
146 | .status_mask = SMII0_IRQ_MASK, | 146 | .status_mask = SPEAR310_SMII0_IRQ_MASK, |
147 | }, { | 147 | }, { |
148 | .virq = VIRQ_SMII1, | 148 | .virq = SPEAR310_VIRQ_SMII1, |
149 | .status_mask = SMII1_IRQ_MASK, | 149 | .status_mask = SPEAR310_SMII1_IRQ_MASK, |
150 | }, { | 150 | }, { |
151 | .virq = VIRQ_SMII2, | 151 | .virq = SPEAR310_VIRQ_SMII2, |
152 | .status_mask = SMII2_IRQ_MASK, | 152 | .status_mask = SPEAR310_SMII2_IRQ_MASK, |
153 | }, { | 153 | }, { |
154 | .virq = VIRQ_SMII3, | 154 | .virq = SPEAR310_VIRQ_SMII3, |
155 | .status_mask = SMII3_IRQ_MASK, | 155 | .status_mask = SPEAR310_SMII3_IRQ_MASK, |
156 | }, { | 156 | }, { |
157 | .virq = VIRQ_WAKEUP_SMII0, | 157 | .virq = SPEAR310_VIRQ_WAKEUP_SMII0, |
158 | .status_mask = WAKEUP_SMII0_IRQ_MASK, | 158 | .status_mask = SPEAR310_WAKEUP_SMII0_IRQ_MASK, |
159 | }, { | 159 | }, { |
160 | .virq = VIRQ_WAKEUP_SMII1, | 160 | .virq = SPEAR310_VIRQ_WAKEUP_SMII1, |
161 | .status_mask = WAKEUP_SMII1_IRQ_MASK, | 161 | .status_mask = SPEAR310_WAKEUP_SMII1_IRQ_MASK, |
162 | }, { | 162 | }, { |
163 | .virq = VIRQ_WAKEUP_SMII2, | 163 | .virq = SPEAR310_VIRQ_WAKEUP_SMII2, |
164 | .status_mask = WAKEUP_SMII2_IRQ_MASK, | 164 | .status_mask = SPEAR310_WAKEUP_SMII2_IRQ_MASK, |
165 | }, { | 165 | }, { |
166 | .virq = VIRQ_WAKEUP_SMII3, | 166 | .virq = SPEAR310_VIRQ_WAKEUP_SMII3, |
167 | .status_mask = WAKEUP_SMII3_IRQ_MASK, | 167 | .status_mask = SPEAR310_WAKEUP_SMII3_IRQ_MASK, |
168 | }, | 168 | }, |
169 | }; | 169 | }; |
170 | 170 | ||
171 | struct spear_shirq shirq_ras1 = { | 171 | static struct spear_shirq shirq_ras1 = { |
172 | .irq = IRQ_GEN_RAS_1, | 172 | .irq = SPEAR3XX_IRQ_GEN_RAS_1, |
173 | .dev_config = shirq_ras1_config, | 173 | .dev_config = shirq_ras1_config, |
174 | .dev_count = ARRAY_SIZE(shirq_ras1_config), | 174 | .dev_count = ARRAY_SIZE(shirq_ras1_config), |
175 | .regs = { | 175 | .regs = { |
176 | .enb_reg = -1, | 176 | .enb_reg = -1, |
177 | .status_reg = INT_STS_MASK_REG, | 177 | .status_reg = SPEAR310_INT_STS_MASK_REG, |
178 | .status_reg_mask = SHIRQ_RAS1_MASK, | 178 | .status_reg_mask = SPEAR310_SHIRQ_RAS1_MASK, |
179 | .clear_reg = -1, | 179 | .clear_reg = -1, |
180 | }, | 180 | }, |
181 | }; | 181 | }; |
182 | 182 | ||
183 | struct shirq_dev_config shirq_ras2_config[] = { | 183 | static struct shirq_dev_config shirq_ras2_config[] = { |
184 | { | 184 | { |
185 | .virq = VIRQ_UART1, | 185 | .virq = SPEAR310_VIRQ_UART1, |
186 | .status_mask = UART1_IRQ_MASK, | 186 | .status_mask = SPEAR310_UART1_IRQ_MASK, |
187 | }, { | 187 | }, { |
188 | .virq = VIRQ_UART2, | 188 | .virq = SPEAR310_VIRQ_UART2, |
189 | .status_mask = UART2_IRQ_MASK, | 189 | .status_mask = SPEAR310_UART2_IRQ_MASK, |
190 | }, { | 190 | }, { |
191 | .virq = VIRQ_UART3, | 191 | .virq = SPEAR310_VIRQ_UART3, |
192 | .status_mask = UART3_IRQ_MASK, | 192 | .status_mask = SPEAR310_UART3_IRQ_MASK, |
193 | }, { | 193 | }, { |
194 | .virq = VIRQ_UART4, | 194 | .virq = SPEAR310_VIRQ_UART4, |
195 | .status_mask = UART4_IRQ_MASK, | 195 | .status_mask = SPEAR310_UART4_IRQ_MASK, |
196 | }, { | 196 | }, { |
197 | .virq = VIRQ_UART5, | 197 | .virq = SPEAR310_VIRQ_UART5, |
198 | .status_mask = UART5_IRQ_MASK, | 198 | .status_mask = SPEAR310_UART5_IRQ_MASK, |
199 | }, | 199 | }, |
200 | }; | 200 | }; |
201 | 201 | ||
202 | struct spear_shirq shirq_ras2 = { | 202 | static struct spear_shirq shirq_ras2 = { |
203 | .irq = IRQ_GEN_RAS_2, | 203 | .irq = SPEAR3XX_IRQ_GEN_RAS_2, |
204 | .dev_config = shirq_ras2_config, | 204 | .dev_config = shirq_ras2_config, |
205 | .dev_count = ARRAY_SIZE(shirq_ras2_config), | 205 | .dev_count = ARRAY_SIZE(shirq_ras2_config), |
206 | .regs = { | 206 | .regs = { |
207 | .enb_reg = -1, | 207 | .enb_reg = -1, |
208 | .status_reg = INT_STS_MASK_REG, | 208 | .status_reg = SPEAR310_INT_STS_MASK_REG, |
209 | .status_reg_mask = SHIRQ_RAS2_MASK, | 209 | .status_reg_mask = SPEAR310_SHIRQ_RAS2_MASK, |
210 | .clear_reg = -1, | 210 | .clear_reg = -1, |
211 | }, | 211 | }, |
212 | }; | 212 | }; |
213 | 213 | ||
214 | struct shirq_dev_config shirq_ras3_config[] = { | 214 | static struct shirq_dev_config shirq_ras3_config[] = { |
215 | { | 215 | { |
216 | .virq = VIRQ_EMI, | 216 | .virq = SPEAR310_VIRQ_EMI, |
217 | .status_mask = EMI_IRQ_MASK, | 217 | .status_mask = SPEAR310_EMI_IRQ_MASK, |
218 | }, | 218 | }, |
219 | }; | 219 | }; |
220 | 220 | ||
221 | struct spear_shirq shirq_ras3 = { | 221 | static struct spear_shirq shirq_ras3 = { |
222 | .irq = IRQ_GEN_RAS_3, | 222 | .irq = SPEAR3XX_IRQ_GEN_RAS_3, |
223 | .dev_config = shirq_ras3_config, | 223 | .dev_config = shirq_ras3_config, |
224 | .dev_count = ARRAY_SIZE(shirq_ras3_config), | 224 | .dev_count = ARRAY_SIZE(shirq_ras3_config), |
225 | .regs = { | 225 | .regs = { |
226 | .enb_reg = -1, | 226 | .enb_reg = -1, |
227 | .status_reg = INT_STS_MASK_REG, | 227 | .status_reg = SPEAR310_INT_STS_MASK_REG, |
228 | .status_reg_mask = SHIRQ_RAS3_MASK, | 228 | .status_reg_mask = SPEAR310_SHIRQ_RAS3_MASK, |
229 | .clear_reg = -1, | 229 | .clear_reg = -1, |
230 | }, | 230 | }, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | struct shirq_dev_config shirq_intrcomm_ras_config[] = { | 233 | static struct shirq_dev_config shirq_intrcomm_ras_config[] = { |
234 | { | 234 | { |
235 | .virq = VIRQ_TDM_HDLC, | 235 | .virq = SPEAR310_VIRQ_TDM_HDLC, |
236 | .status_mask = TDM_HDLC_IRQ_MASK, | 236 | .status_mask = SPEAR310_TDM_HDLC_IRQ_MASK, |
237 | }, { | 237 | }, { |
238 | .virq = VIRQ_RS485_0, | 238 | .virq = SPEAR310_VIRQ_RS485_0, |
239 | .status_mask = RS485_0_IRQ_MASK, | 239 | .status_mask = SPEAR310_RS485_0_IRQ_MASK, |
240 | }, { | 240 | }, { |
241 | .virq = VIRQ_RS485_1, | 241 | .virq = SPEAR310_VIRQ_RS485_1, |
242 | .status_mask = RS485_1_IRQ_MASK, | 242 | .status_mask = SPEAR310_RS485_1_IRQ_MASK, |
243 | }, | 243 | }, |
244 | }; | 244 | }; |
245 | 245 | ||
246 | struct spear_shirq shirq_intrcomm_ras = { | 246 | static struct spear_shirq shirq_intrcomm_ras = { |
247 | .irq = IRQ_INTRCOMM_RAS_ARM, | 247 | .irq = SPEAR3XX_IRQ_INTRCOMM_RAS_ARM, |
248 | .dev_config = shirq_intrcomm_ras_config, | 248 | .dev_config = shirq_intrcomm_ras_config, |
249 | .dev_count = ARRAY_SIZE(shirq_intrcomm_ras_config), | 249 | .dev_count = ARRAY_SIZE(shirq_intrcomm_ras_config), |
250 | .regs = { | 250 | .regs = { |
251 | .enb_reg = -1, | 251 | .enb_reg = -1, |
252 | .status_reg = INT_STS_MASK_REG, | 252 | .status_reg = SPEAR310_INT_STS_MASK_REG, |
253 | .status_reg_mask = SHIRQ_INTRCOMM_RAS_MASK, | 253 | .status_reg_mask = SPEAR310_SHIRQ_INTRCOMM_RAS_MASK, |
254 | .clear_reg = -1, | 254 | .clear_reg = -1, |
255 | }, | 255 | }, |
256 | }; | 256 | }; |
@@ -258,7 +258,8 @@ struct spear_shirq shirq_intrcomm_ras = { | |||
258 | /* Add spear310 specific devices here */ | 258 | /* Add spear310 specific devices here */ |
259 | 259 | ||
260 | /* spear310 routines */ | 260 | /* spear310 routines */ |
261 | void __init spear310_init(void) | 261 | void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, |
262 | u8 pmx_dev_count) | ||
262 | { | 263 | { |
263 | void __iomem *base; | 264 | void __iomem *base; |
264 | int ret = 0; | 265 | int ret = 0; |
@@ -296,6 +297,10 @@ void __init spear310_init(void) | |||
296 | 297 | ||
297 | /* pmx initialization */ | 298 | /* pmx initialization */ |
298 | pmx_driver.base = base; | 299 | pmx_driver.base = base; |
300 | pmx_driver.mode = pmx_mode; | ||
301 | pmx_driver.devs = pmx_devs; | ||
302 | pmx_driver.devs_count = pmx_dev_count; | ||
303 | |||
299 | ret = pmx_register(&pmx_driver); | 304 | ret = pmx_register(&pmx_driver); |
300 | if (ret) | 305 | if (ret) |
301 | printk(KERN_ERR "padmux: registeration failed. err no: %d\n", | 306 | printk(KERN_ERR "padmux: registeration failed. err no: %d\n", |
diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c index 2d7f333bd67b..c8684ce1f9b3 100644 --- a/arch/arm/mach-spear3xx/spear310_evb.c +++ b/arch/arm/mach-spear3xx/spear310_evb.c | |||
@@ -19,31 +19,31 @@ | |||
19 | /* padmux devices to enable */ | 19 | /* padmux devices to enable */ |
20 | static struct pmx_dev *pmx_devs[] = { | 20 | static struct pmx_dev *pmx_devs[] = { |
21 | /* spear3xx specific devices */ | 21 | /* spear3xx specific devices */ |
22 | &pmx_i2c, | 22 | &spear3xx_pmx_i2c, |
23 | &pmx_ssp, | 23 | &spear3xx_pmx_ssp, |
24 | &pmx_gpio_pin0, | 24 | &spear3xx_pmx_gpio_pin0, |
25 | &pmx_gpio_pin1, | 25 | &spear3xx_pmx_gpio_pin1, |
26 | &pmx_gpio_pin2, | 26 | &spear3xx_pmx_gpio_pin2, |
27 | &pmx_gpio_pin3, | 27 | &spear3xx_pmx_gpio_pin3, |
28 | &pmx_gpio_pin4, | 28 | &spear3xx_pmx_gpio_pin4, |
29 | &pmx_gpio_pin5, | 29 | &spear3xx_pmx_gpio_pin5, |
30 | &pmx_uart0, | 30 | &spear3xx_pmx_uart0, |
31 | 31 | ||
32 | /* spear310 specific devices */ | 32 | /* spear310 specific devices */ |
33 | &pmx_emi_cs_0_1_4_5, | 33 | &spear310_pmx_emi_cs_0_1_4_5, |
34 | &pmx_emi_cs_2_3, | 34 | &spear310_pmx_emi_cs_2_3, |
35 | &pmx_uart1, | 35 | &spear310_pmx_uart1, |
36 | &pmx_uart2, | 36 | &spear310_pmx_uart2, |
37 | &pmx_uart3_4_5, | 37 | &spear310_pmx_uart3_4_5, |
38 | &pmx_fsmc, | 38 | &spear310_pmx_fsmc, |
39 | &pmx_rs485_0_1, | 39 | &spear310_pmx_rs485_0_1, |
40 | &pmx_tdm0, | 40 | &spear310_pmx_tdm0, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static struct amba_device *amba_devs[] __initdata = { | 43 | static struct amba_device *amba_devs[] __initdata = { |
44 | /* spear3xx specific devices */ | 44 | /* spear3xx specific devices */ |
45 | &gpio_device, | 45 | &spear3xx_gpio_device, |
46 | &uart_device, | 46 | &spear3xx_uart_device, |
47 | 47 | ||
48 | /* spear310 specific devices */ | 48 | /* spear310 specific devices */ |
49 | }; | 49 | }; |
@@ -58,13 +58,8 @@ static void __init spear310_evb_init(void) | |||
58 | { | 58 | { |
59 | unsigned int i; | 59 | unsigned int i; |
60 | 60 | ||
61 | /* padmux initialization, must be done before spear310_init */ | ||
62 | pmx_driver.mode = NULL; | ||
63 | pmx_driver.devs = pmx_devs; | ||
64 | pmx_driver.devs_count = ARRAY_SIZE(pmx_devs); | ||
65 | |||
66 | /* call spear310 machine init function */ | 61 | /* call spear310 machine init function */ |
67 | spear310_init(); | 62 | spear310_init(NULL, pmx_devs, ARRAY_SIZE(pmx_devs)); |
68 | 63 | ||
69 | /* Add Platform Devices */ | 64 | /* Add Platform Devices */ |
70 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | 65 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); |
diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c index 741c1f414cbd..ee29bef43074 100644 --- a/arch/arm/mach-spear3xx/spear320.c +++ b/arch/arm/mach-spear3xx/spear320.c | |||
@@ -29,88 +29,88 @@ | |||
29 | #define SMALL_PRINTERS_MODE (1 << 3) | 29 | #define SMALL_PRINTERS_MODE (1 << 3) |
30 | #define ALL_MODES 0xF | 30 | #define ALL_MODES 0xF |
31 | 31 | ||
32 | struct pmx_mode auto_net_smii_mode = { | 32 | struct pmx_mode spear320_auto_net_smii_mode = { |
33 | .id = AUTO_NET_SMII_MODE, | 33 | .id = AUTO_NET_SMII_MODE, |
34 | .name = "Automation Networking SMII Mode", | 34 | .name = "Automation Networking SMII Mode", |
35 | .mask = 0x00, | 35 | .mask = 0x00, |
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct pmx_mode auto_net_mii_mode = { | 38 | struct pmx_mode spear320_auto_net_mii_mode = { |
39 | .id = AUTO_NET_MII_MODE, | 39 | .id = AUTO_NET_MII_MODE, |
40 | .name = "Automation Networking MII Mode", | 40 | .name = "Automation Networking MII Mode", |
41 | .mask = 0x01, | 41 | .mask = 0x01, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | struct pmx_mode auto_exp_mode = { | 44 | struct pmx_mode spear320_auto_exp_mode = { |
45 | .id = AUTO_EXP_MODE, | 45 | .id = AUTO_EXP_MODE, |
46 | .name = "Automation Expanded Mode", | 46 | .name = "Automation Expanded Mode", |
47 | .mask = 0x02, | 47 | .mask = 0x02, |
48 | }; | 48 | }; |
49 | 49 | ||
50 | struct pmx_mode small_printers_mode = { | 50 | struct pmx_mode spear320_small_printers_mode = { |
51 | .id = SMALL_PRINTERS_MODE, | 51 | .id = SMALL_PRINTERS_MODE, |
52 | .name = "Small Printers Mode", | 52 | .name = "Small Printers Mode", |
53 | .mask = 0x03, | 53 | .mask = 0x03, |
54 | }; | 54 | }; |
55 | 55 | ||
56 | /* devices */ | 56 | /* devices */ |
57 | struct pmx_dev_mode pmx_clcd_modes[] = { | 57 | static struct pmx_dev_mode pmx_clcd_modes[] = { |
58 | { | 58 | { |
59 | .ids = AUTO_NET_SMII_MODE, | 59 | .ids = AUTO_NET_SMII_MODE, |
60 | .mask = 0x0, | 60 | .mask = 0x0, |
61 | }, | 61 | }, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | struct pmx_dev pmx_clcd = { | 64 | struct pmx_dev spear320_pmx_clcd = { |
65 | .name = "clcd", | 65 | .name = "clcd", |
66 | .modes = pmx_clcd_modes, | 66 | .modes = pmx_clcd_modes, |
67 | .mode_count = ARRAY_SIZE(pmx_clcd_modes), | 67 | .mode_count = ARRAY_SIZE(pmx_clcd_modes), |
68 | .enb_on_reset = 1, | 68 | .enb_on_reset = 1, |
69 | }; | 69 | }; |
70 | 70 | ||
71 | struct pmx_dev_mode pmx_emi_modes[] = { | 71 | static struct pmx_dev_mode pmx_emi_modes[] = { |
72 | { | 72 | { |
73 | .ids = AUTO_EXP_MODE, | 73 | .ids = AUTO_EXP_MODE, |
74 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK, | 74 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK, |
75 | }, | 75 | }, |
76 | }; | 76 | }; |
77 | 77 | ||
78 | struct pmx_dev pmx_emi = { | 78 | struct pmx_dev spear320_pmx_emi = { |
79 | .name = "emi", | 79 | .name = "emi", |
80 | .modes = pmx_emi_modes, | 80 | .modes = pmx_emi_modes, |
81 | .mode_count = ARRAY_SIZE(pmx_emi_modes), | 81 | .mode_count = ARRAY_SIZE(pmx_emi_modes), |
82 | .enb_on_reset = 1, | 82 | .enb_on_reset = 1, |
83 | }; | 83 | }; |
84 | 84 | ||
85 | struct pmx_dev_mode pmx_fsmc_modes[] = { | 85 | static struct pmx_dev_mode pmx_fsmc_modes[] = { |
86 | { | 86 | { |
87 | .ids = ALL_MODES, | 87 | .ids = ALL_MODES, |
88 | .mask = 0x0, | 88 | .mask = 0x0, |
89 | }, | 89 | }, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | struct pmx_dev pmx_fsmc = { | 92 | struct pmx_dev spear320_pmx_fsmc = { |
93 | .name = "fsmc", | 93 | .name = "fsmc", |
94 | .modes = pmx_fsmc_modes, | 94 | .modes = pmx_fsmc_modes, |
95 | .mode_count = ARRAY_SIZE(pmx_fsmc_modes), | 95 | .mode_count = ARRAY_SIZE(pmx_fsmc_modes), |
96 | .enb_on_reset = 1, | 96 | .enb_on_reset = 1, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | struct pmx_dev_mode pmx_spp_modes[] = { | 99 | static struct pmx_dev_mode pmx_spp_modes[] = { |
100 | { | 100 | { |
101 | .ids = SMALL_PRINTERS_MODE, | 101 | .ids = SMALL_PRINTERS_MODE, |
102 | .mask = 0x0, | 102 | .mask = 0x0, |
103 | }, | 103 | }, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | struct pmx_dev pmx_spp = { | 106 | struct pmx_dev spear320_pmx_spp = { |
107 | .name = "spp", | 107 | .name = "spp", |
108 | .modes = pmx_spp_modes, | 108 | .modes = pmx_spp_modes, |
109 | .mode_count = ARRAY_SIZE(pmx_spp_modes), | 109 | .mode_count = ARRAY_SIZE(pmx_spp_modes), |
110 | .enb_on_reset = 1, | 110 | .enb_on_reset = 1, |
111 | }; | 111 | }; |
112 | 112 | ||
113 | struct pmx_dev_mode pmx_sdhci_modes[] = { | 113 | static struct pmx_dev_mode pmx_sdhci_modes[] = { |
114 | { | 114 | { |
115 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE | | 115 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE | |
116 | SMALL_PRINTERS_MODE, | 116 | SMALL_PRINTERS_MODE, |
@@ -118,42 +118,42 @@ struct pmx_dev_mode pmx_sdhci_modes[] = { | |||
118 | }, | 118 | }, |
119 | }; | 119 | }; |
120 | 120 | ||
121 | struct pmx_dev pmx_sdhci = { | 121 | struct pmx_dev spear320_pmx_sdhci = { |
122 | .name = "sdhci", | 122 | .name = "sdhci", |
123 | .modes = pmx_sdhci_modes, | 123 | .modes = pmx_sdhci_modes, |
124 | .mode_count = ARRAY_SIZE(pmx_sdhci_modes), | 124 | .mode_count = ARRAY_SIZE(pmx_sdhci_modes), |
125 | .enb_on_reset = 1, | 125 | .enb_on_reset = 1, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | struct pmx_dev_mode pmx_i2s_modes[] = { | 128 | static struct pmx_dev_mode pmx_i2s_modes[] = { |
129 | { | 129 | { |
130 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | 130 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, |
131 | .mask = PMX_UART0_MODEM_MASK, | 131 | .mask = PMX_UART0_MODEM_MASK, |
132 | }, | 132 | }, |
133 | }; | 133 | }; |
134 | 134 | ||
135 | struct pmx_dev pmx_i2s = { | 135 | struct pmx_dev spear320_pmx_i2s = { |
136 | .name = "i2s", | 136 | .name = "i2s", |
137 | .modes = pmx_i2s_modes, | 137 | .modes = pmx_i2s_modes, |
138 | .mode_count = ARRAY_SIZE(pmx_i2s_modes), | 138 | .mode_count = ARRAY_SIZE(pmx_i2s_modes), |
139 | .enb_on_reset = 1, | 139 | .enb_on_reset = 1, |
140 | }; | 140 | }; |
141 | 141 | ||
142 | struct pmx_dev_mode pmx_uart1_modes[] = { | 142 | static struct pmx_dev_mode pmx_uart1_modes[] = { |
143 | { | 143 | { |
144 | .ids = ALL_MODES, | 144 | .ids = ALL_MODES, |
145 | .mask = PMX_GPIO_PIN0_MASK | PMX_GPIO_PIN1_MASK, | 145 | .mask = PMX_GPIO_PIN0_MASK | PMX_GPIO_PIN1_MASK, |
146 | }, | 146 | }, |
147 | }; | 147 | }; |
148 | 148 | ||
149 | struct pmx_dev pmx_uart1 = { | 149 | struct pmx_dev spear320_pmx_uart1 = { |
150 | .name = "uart1", | 150 | .name = "uart1", |
151 | .modes = pmx_uart1_modes, | 151 | .modes = pmx_uart1_modes, |
152 | .mode_count = ARRAY_SIZE(pmx_uart1_modes), | 152 | .mode_count = ARRAY_SIZE(pmx_uart1_modes), |
153 | .enb_on_reset = 1, | 153 | .enb_on_reset = 1, |
154 | }; | 154 | }; |
155 | 155 | ||
156 | struct pmx_dev_mode pmx_uart1_modem_modes[] = { | 156 | static struct pmx_dev_mode pmx_uart1_modem_modes[] = { |
157 | { | 157 | { |
158 | .ids = AUTO_EXP_MODE, | 158 | .ids = AUTO_EXP_MODE, |
159 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK | | 159 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK | |
@@ -165,42 +165,42 @@ struct pmx_dev_mode pmx_uart1_modem_modes[] = { | |||
165 | }, | 165 | }, |
166 | }; | 166 | }; |
167 | 167 | ||
168 | struct pmx_dev pmx_uart1_modem = { | 168 | struct pmx_dev spear320_pmx_uart1_modem = { |
169 | .name = "uart1_modem", | 169 | .name = "uart1_modem", |
170 | .modes = pmx_uart1_modem_modes, | 170 | .modes = pmx_uart1_modem_modes, |
171 | .mode_count = ARRAY_SIZE(pmx_uart1_modem_modes), | 171 | .mode_count = ARRAY_SIZE(pmx_uart1_modem_modes), |
172 | .enb_on_reset = 1, | 172 | .enb_on_reset = 1, |
173 | }; | 173 | }; |
174 | 174 | ||
175 | struct pmx_dev_mode pmx_uart2_modes[] = { | 175 | static struct pmx_dev_mode pmx_uart2_modes[] = { |
176 | { | 176 | { |
177 | .ids = ALL_MODES, | 177 | .ids = ALL_MODES, |
178 | .mask = PMX_FIRDA_MASK, | 178 | .mask = PMX_FIRDA_MASK, |
179 | }, | 179 | }, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | struct pmx_dev pmx_uart2 = { | 182 | struct pmx_dev spear320_pmx_uart2 = { |
183 | .name = "uart2", | 183 | .name = "uart2", |
184 | .modes = pmx_uart2_modes, | 184 | .modes = pmx_uart2_modes, |
185 | .mode_count = ARRAY_SIZE(pmx_uart2_modes), | 185 | .mode_count = ARRAY_SIZE(pmx_uart2_modes), |
186 | .enb_on_reset = 1, | 186 | .enb_on_reset = 1, |
187 | }; | 187 | }; |
188 | 188 | ||
189 | struct pmx_dev_mode pmx_touchscreen_modes[] = { | 189 | static struct pmx_dev_mode pmx_touchscreen_modes[] = { |
190 | { | 190 | { |
191 | .ids = AUTO_NET_SMII_MODE, | 191 | .ids = AUTO_NET_SMII_MODE, |
192 | .mask = PMX_SSP_CS_MASK, | 192 | .mask = PMX_SSP_CS_MASK, |
193 | }, | 193 | }, |
194 | }; | 194 | }; |
195 | 195 | ||
196 | struct pmx_dev pmx_touchscreen = { | 196 | struct pmx_dev spear320_pmx_touchscreen = { |
197 | .name = "touchscreen", | 197 | .name = "touchscreen", |
198 | .modes = pmx_touchscreen_modes, | 198 | .modes = pmx_touchscreen_modes, |
199 | .mode_count = ARRAY_SIZE(pmx_touchscreen_modes), | 199 | .mode_count = ARRAY_SIZE(pmx_touchscreen_modes), |
200 | .enb_on_reset = 1, | 200 | .enb_on_reset = 1, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | struct pmx_dev_mode pmx_can_modes[] = { | 203 | static struct pmx_dev_mode pmx_can_modes[] = { |
204 | { | 204 | { |
205 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE | AUTO_EXP_MODE, | 205 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE | AUTO_EXP_MODE, |
206 | .mask = PMX_GPIO_PIN2_MASK | PMX_GPIO_PIN3_MASK | | 206 | .mask = PMX_GPIO_PIN2_MASK | PMX_GPIO_PIN3_MASK | |
@@ -208,28 +208,28 @@ struct pmx_dev_mode pmx_can_modes[] = { | |||
208 | }, | 208 | }, |
209 | }; | 209 | }; |
210 | 210 | ||
211 | struct pmx_dev pmx_can = { | 211 | struct pmx_dev spear320_pmx_can = { |
212 | .name = "can", | 212 | .name = "can", |
213 | .modes = pmx_can_modes, | 213 | .modes = pmx_can_modes, |
214 | .mode_count = ARRAY_SIZE(pmx_can_modes), | 214 | .mode_count = ARRAY_SIZE(pmx_can_modes), |
215 | .enb_on_reset = 1, | 215 | .enb_on_reset = 1, |
216 | }; | 216 | }; |
217 | 217 | ||
218 | struct pmx_dev_mode pmx_sdhci_led_modes[] = { | 218 | static struct pmx_dev_mode pmx_sdhci_led_modes[] = { |
219 | { | 219 | { |
220 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | 220 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, |
221 | .mask = PMX_SSP_CS_MASK, | 221 | .mask = PMX_SSP_CS_MASK, |
222 | }, | 222 | }, |
223 | }; | 223 | }; |
224 | 224 | ||
225 | struct pmx_dev pmx_sdhci_led = { | 225 | struct pmx_dev spear320_pmx_sdhci_led = { |
226 | .name = "sdhci_led", | 226 | .name = "sdhci_led", |
227 | .modes = pmx_sdhci_led_modes, | 227 | .modes = pmx_sdhci_led_modes, |
228 | .mode_count = ARRAY_SIZE(pmx_sdhci_led_modes), | 228 | .mode_count = ARRAY_SIZE(pmx_sdhci_led_modes), |
229 | .enb_on_reset = 1, | 229 | .enb_on_reset = 1, |
230 | }; | 230 | }; |
231 | 231 | ||
232 | struct pmx_dev_mode pmx_pwm0_modes[] = { | 232 | static struct pmx_dev_mode pmx_pwm0_modes[] = { |
233 | { | 233 | { |
234 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | 234 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, |
235 | .mask = PMX_UART0_MODEM_MASK, | 235 | .mask = PMX_UART0_MODEM_MASK, |
@@ -239,14 +239,14 @@ struct pmx_dev_mode pmx_pwm0_modes[] = { | |||
239 | }, | 239 | }, |
240 | }; | 240 | }; |
241 | 241 | ||
242 | struct pmx_dev pmx_pwm0 = { | 242 | struct pmx_dev spear320_pmx_pwm0 = { |
243 | .name = "pwm0", | 243 | .name = "pwm0", |
244 | .modes = pmx_pwm0_modes, | 244 | .modes = pmx_pwm0_modes, |
245 | .mode_count = ARRAY_SIZE(pmx_pwm0_modes), | 245 | .mode_count = ARRAY_SIZE(pmx_pwm0_modes), |
246 | .enb_on_reset = 1, | 246 | .enb_on_reset = 1, |
247 | }; | 247 | }; |
248 | 248 | ||
249 | struct pmx_dev_mode pmx_pwm1_modes[] = { | 249 | static struct pmx_dev_mode pmx_pwm1_modes[] = { |
250 | { | 250 | { |
251 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | 251 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, |
252 | .mask = PMX_UART0_MODEM_MASK, | 252 | .mask = PMX_UART0_MODEM_MASK, |
@@ -256,14 +256,14 @@ struct pmx_dev_mode pmx_pwm1_modes[] = { | |||
256 | }, | 256 | }, |
257 | }; | 257 | }; |
258 | 258 | ||
259 | struct pmx_dev pmx_pwm1 = { | 259 | struct pmx_dev spear320_pmx_pwm1 = { |
260 | .name = "pwm1", | 260 | .name = "pwm1", |
261 | .modes = pmx_pwm1_modes, | 261 | .modes = pmx_pwm1_modes, |
262 | .mode_count = ARRAY_SIZE(pmx_pwm1_modes), | 262 | .mode_count = ARRAY_SIZE(pmx_pwm1_modes), |
263 | .enb_on_reset = 1, | 263 | .enb_on_reset = 1, |
264 | }; | 264 | }; |
265 | 265 | ||
266 | struct pmx_dev_mode pmx_pwm2_modes[] = { | 266 | static struct pmx_dev_mode pmx_pwm2_modes[] = { |
267 | { | 267 | { |
268 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | 268 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, |
269 | .mask = PMX_SSP_CS_MASK, | 269 | .mask = PMX_SSP_CS_MASK, |
@@ -273,105 +273,105 @@ struct pmx_dev_mode pmx_pwm2_modes[] = { | |||
273 | }, | 273 | }, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | struct pmx_dev pmx_pwm2 = { | 276 | struct pmx_dev spear320_pmx_pwm2 = { |
277 | .name = "pwm2", | 277 | .name = "pwm2", |
278 | .modes = pmx_pwm2_modes, | 278 | .modes = pmx_pwm2_modes, |
279 | .mode_count = ARRAY_SIZE(pmx_pwm2_modes), | 279 | .mode_count = ARRAY_SIZE(pmx_pwm2_modes), |
280 | .enb_on_reset = 1, | 280 | .enb_on_reset = 1, |
281 | }; | 281 | }; |
282 | 282 | ||
283 | struct pmx_dev_mode pmx_pwm3_modes[] = { | 283 | static struct pmx_dev_mode pmx_pwm3_modes[] = { |
284 | { | 284 | { |
285 | .ids = AUTO_EXP_MODE | SMALL_PRINTERS_MODE | AUTO_NET_SMII_MODE, | 285 | .ids = AUTO_EXP_MODE | SMALL_PRINTERS_MODE | AUTO_NET_SMII_MODE, |
286 | .mask = PMX_MII_MASK, | 286 | .mask = PMX_MII_MASK, |
287 | }, | 287 | }, |
288 | }; | 288 | }; |
289 | 289 | ||
290 | struct pmx_dev pmx_pwm3 = { | 290 | struct pmx_dev spear320_pmx_pwm3 = { |
291 | .name = "pwm3", | 291 | .name = "pwm3", |
292 | .modes = pmx_pwm3_modes, | 292 | .modes = pmx_pwm3_modes, |
293 | .mode_count = ARRAY_SIZE(pmx_pwm3_modes), | 293 | .mode_count = ARRAY_SIZE(pmx_pwm3_modes), |
294 | .enb_on_reset = 1, | 294 | .enb_on_reset = 1, |
295 | }; | 295 | }; |
296 | 296 | ||
297 | struct pmx_dev_mode pmx_ssp1_modes[] = { | 297 | static struct pmx_dev_mode pmx_ssp1_modes[] = { |
298 | { | 298 | { |
299 | .ids = SMALL_PRINTERS_MODE | AUTO_NET_SMII_MODE, | 299 | .ids = SMALL_PRINTERS_MODE | AUTO_NET_SMII_MODE, |
300 | .mask = PMX_MII_MASK, | 300 | .mask = PMX_MII_MASK, |
301 | }, | 301 | }, |
302 | }; | 302 | }; |
303 | 303 | ||
304 | struct pmx_dev pmx_ssp1 = { | 304 | struct pmx_dev spear320_pmx_ssp1 = { |
305 | .name = "ssp1", | 305 | .name = "ssp1", |
306 | .modes = pmx_ssp1_modes, | 306 | .modes = pmx_ssp1_modes, |
307 | .mode_count = ARRAY_SIZE(pmx_ssp1_modes), | 307 | .mode_count = ARRAY_SIZE(pmx_ssp1_modes), |
308 | .enb_on_reset = 1, | 308 | .enb_on_reset = 1, |
309 | }; | 309 | }; |
310 | 310 | ||
311 | struct pmx_dev_mode pmx_ssp2_modes[] = { | 311 | static struct pmx_dev_mode pmx_ssp2_modes[] = { |
312 | { | 312 | { |
313 | .ids = AUTO_NET_SMII_MODE, | 313 | .ids = AUTO_NET_SMII_MODE, |
314 | .mask = PMX_MII_MASK, | 314 | .mask = PMX_MII_MASK, |
315 | }, | 315 | }, |
316 | }; | 316 | }; |
317 | 317 | ||
318 | struct pmx_dev pmx_ssp2 = { | 318 | struct pmx_dev spear320_pmx_ssp2 = { |
319 | .name = "ssp2", | 319 | .name = "ssp2", |
320 | .modes = pmx_ssp2_modes, | 320 | .modes = pmx_ssp2_modes, |
321 | .mode_count = ARRAY_SIZE(pmx_ssp2_modes), | 321 | .mode_count = ARRAY_SIZE(pmx_ssp2_modes), |
322 | .enb_on_reset = 1, | 322 | .enb_on_reset = 1, |
323 | }; | 323 | }; |
324 | 324 | ||
325 | struct pmx_dev_mode pmx_mii1_modes[] = { | 325 | static struct pmx_dev_mode pmx_mii1_modes[] = { |
326 | { | 326 | { |
327 | .ids = AUTO_NET_MII_MODE, | 327 | .ids = AUTO_NET_MII_MODE, |
328 | .mask = 0x0, | 328 | .mask = 0x0, |
329 | }, | 329 | }, |
330 | }; | 330 | }; |
331 | 331 | ||
332 | struct pmx_dev pmx_mii1 = { | 332 | struct pmx_dev spear320_pmx_mii1 = { |
333 | .name = "mii1", | 333 | .name = "mii1", |
334 | .modes = pmx_mii1_modes, | 334 | .modes = pmx_mii1_modes, |
335 | .mode_count = ARRAY_SIZE(pmx_mii1_modes), | 335 | .mode_count = ARRAY_SIZE(pmx_mii1_modes), |
336 | .enb_on_reset = 1, | 336 | .enb_on_reset = 1, |
337 | }; | 337 | }; |
338 | 338 | ||
339 | struct pmx_dev_mode pmx_smii0_modes[] = { | 339 | static struct pmx_dev_mode pmx_smii0_modes[] = { |
340 | { | 340 | { |
341 | .ids = AUTO_NET_SMII_MODE | AUTO_EXP_MODE | SMALL_PRINTERS_MODE, | 341 | .ids = AUTO_NET_SMII_MODE | AUTO_EXP_MODE | SMALL_PRINTERS_MODE, |
342 | .mask = PMX_MII_MASK, | 342 | .mask = PMX_MII_MASK, |
343 | }, | 343 | }, |
344 | }; | 344 | }; |
345 | 345 | ||
346 | struct pmx_dev pmx_smii0 = { | 346 | struct pmx_dev spear320_pmx_smii0 = { |
347 | .name = "smii0", | 347 | .name = "smii0", |
348 | .modes = pmx_smii0_modes, | 348 | .modes = pmx_smii0_modes, |
349 | .mode_count = ARRAY_SIZE(pmx_smii0_modes), | 349 | .mode_count = ARRAY_SIZE(pmx_smii0_modes), |
350 | .enb_on_reset = 1, | 350 | .enb_on_reset = 1, |
351 | }; | 351 | }; |
352 | 352 | ||
353 | struct pmx_dev_mode pmx_smii1_modes[] = { | 353 | static struct pmx_dev_mode pmx_smii1_modes[] = { |
354 | { | 354 | { |
355 | .ids = AUTO_NET_SMII_MODE | SMALL_PRINTERS_MODE, | 355 | .ids = AUTO_NET_SMII_MODE | SMALL_PRINTERS_MODE, |
356 | .mask = PMX_MII_MASK, | 356 | .mask = PMX_MII_MASK, |
357 | }, | 357 | }, |
358 | }; | 358 | }; |
359 | 359 | ||
360 | struct pmx_dev pmx_smii1 = { | 360 | struct pmx_dev spear320_pmx_smii1 = { |
361 | .name = "smii1", | 361 | .name = "smii1", |
362 | .modes = pmx_smii1_modes, | 362 | .modes = pmx_smii1_modes, |
363 | .mode_count = ARRAY_SIZE(pmx_smii1_modes), | 363 | .mode_count = ARRAY_SIZE(pmx_smii1_modes), |
364 | .enb_on_reset = 1, | 364 | .enb_on_reset = 1, |
365 | }; | 365 | }; |
366 | 366 | ||
367 | struct pmx_dev_mode pmx_i2c1_modes[] = { | 367 | static struct pmx_dev_mode pmx_i2c1_modes[] = { |
368 | { | 368 | { |
369 | .ids = AUTO_EXP_MODE, | 369 | .ids = AUTO_EXP_MODE, |
370 | .mask = 0x0, | 370 | .mask = 0x0, |
371 | }, | 371 | }, |
372 | }; | 372 | }; |
373 | 373 | ||
374 | struct pmx_dev pmx_i2c1 = { | 374 | struct pmx_dev spear320_pmx_i2c1 = { |
375 | .name = "i2c1", | 375 | .name = "i2c1", |
376 | .modes = pmx_i2c1_modes, | 376 | .modes = pmx_i2c1_modes, |
377 | .mode_count = ARRAY_SIZE(pmx_i2c1_modes), | 377 | .mode_count = ARRAY_SIZE(pmx_i2c1_modes), |
@@ -379,131 +379,131 @@ struct pmx_dev pmx_i2c1 = { | |||
379 | }; | 379 | }; |
380 | 380 | ||
381 | /* pmx driver structure */ | 381 | /* pmx driver structure */ |
382 | struct pmx_driver pmx_driver = { | 382 | static struct pmx_driver pmx_driver = { |
383 | .mode_reg = {.offset = MODE_CONFIG_REG, .mask = 0x00000007}, | 383 | .mode_reg = {.offset = MODE_CONFIG_REG, .mask = 0x00000007}, |
384 | .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, | 384 | .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, |
385 | }; | 385 | }; |
386 | 386 | ||
387 | /* spear3xx shared irq */ | 387 | /* spear3xx shared irq */ |
388 | struct shirq_dev_config shirq_ras1_config[] = { | 388 | static struct shirq_dev_config shirq_ras1_config[] = { |
389 | { | 389 | { |
390 | .virq = VIRQ_EMI, | 390 | .virq = SPEAR320_VIRQ_EMI, |
391 | .status_mask = EMI_IRQ_MASK, | 391 | .status_mask = SPEAR320_EMI_IRQ_MASK, |
392 | .clear_mask = EMI_IRQ_MASK, | 392 | .clear_mask = SPEAR320_EMI_IRQ_MASK, |
393 | }, { | 393 | }, { |
394 | .virq = VIRQ_CLCD, | 394 | .virq = SPEAR320_VIRQ_CLCD, |
395 | .status_mask = CLCD_IRQ_MASK, | 395 | .status_mask = SPEAR320_CLCD_IRQ_MASK, |
396 | .clear_mask = CLCD_IRQ_MASK, | 396 | .clear_mask = SPEAR320_CLCD_IRQ_MASK, |
397 | }, { | 397 | }, { |
398 | .virq = VIRQ_SPP, | 398 | .virq = SPEAR320_VIRQ_SPP, |
399 | .status_mask = SPP_IRQ_MASK, | 399 | .status_mask = SPEAR320_SPP_IRQ_MASK, |
400 | .clear_mask = SPP_IRQ_MASK, | 400 | .clear_mask = SPEAR320_SPP_IRQ_MASK, |
401 | }, | 401 | }, |
402 | }; | 402 | }; |
403 | 403 | ||
404 | struct spear_shirq shirq_ras1 = { | 404 | static struct spear_shirq shirq_ras1 = { |
405 | .irq = IRQ_GEN_RAS_1, | 405 | .irq = SPEAR3XX_IRQ_GEN_RAS_1, |
406 | .dev_config = shirq_ras1_config, | 406 | .dev_config = shirq_ras1_config, |
407 | .dev_count = ARRAY_SIZE(shirq_ras1_config), | 407 | .dev_count = ARRAY_SIZE(shirq_ras1_config), |
408 | .regs = { | 408 | .regs = { |
409 | .enb_reg = -1, | 409 | .enb_reg = -1, |
410 | .status_reg = INT_STS_MASK_REG, | 410 | .status_reg = SPEAR320_INT_STS_MASK_REG, |
411 | .status_reg_mask = SHIRQ_RAS1_MASK, | 411 | .status_reg_mask = SPEAR320_SHIRQ_RAS1_MASK, |
412 | .clear_reg = INT_CLR_MASK_REG, | 412 | .clear_reg = SPEAR320_INT_CLR_MASK_REG, |
413 | .reset_to_clear = 1, | 413 | .reset_to_clear = 1, |
414 | }, | 414 | }, |
415 | }; | 415 | }; |
416 | 416 | ||
417 | struct shirq_dev_config shirq_ras3_config[] = { | 417 | static struct shirq_dev_config shirq_ras3_config[] = { |
418 | { | 418 | { |
419 | .virq = VIRQ_PLGPIO, | 419 | .virq = SPEAR320_VIRQ_PLGPIO, |
420 | .enb_mask = GPIO_IRQ_MASK, | 420 | .enb_mask = SPEAR320_GPIO_IRQ_MASK, |
421 | .status_mask = GPIO_IRQ_MASK, | 421 | .status_mask = SPEAR320_GPIO_IRQ_MASK, |
422 | .clear_mask = GPIO_IRQ_MASK, | 422 | .clear_mask = SPEAR320_GPIO_IRQ_MASK, |
423 | }, { | 423 | }, { |
424 | .virq = VIRQ_I2S_PLAY, | 424 | .virq = SPEAR320_VIRQ_I2S_PLAY, |
425 | .enb_mask = I2S_PLAY_IRQ_MASK, | 425 | .enb_mask = SPEAR320_I2S_PLAY_IRQ_MASK, |
426 | .status_mask = I2S_PLAY_IRQ_MASK, | 426 | .status_mask = SPEAR320_I2S_PLAY_IRQ_MASK, |
427 | .clear_mask = I2S_PLAY_IRQ_MASK, | 427 | .clear_mask = SPEAR320_I2S_PLAY_IRQ_MASK, |
428 | }, { | 428 | }, { |
429 | .virq = VIRQ_I2S_REC, | 429 | .virq = SPEAR320_VIRQ_I2S_REC, |
430 | .enb_mask = I2S_REC_IRQ_MASK, | 430 | .enb_mask = SPEAR320_I2S_REC_IRQ_MASK, |
431 | .status_mask = I2S_REC_IRQ_MASK, | 431 | .status_mask = SPEAR320_I2S_REC_IRQ_MASK, |
432 | .clear_mask = I2S_REC_IRQ_MASK, | 432 | .clear_mask = SPEAR320_I2S_REC_IRQ_MASK, |
433 | }, | 433 | }, |
434 | }; | 434 | }; |
435 | 435 | ||
436 | struct spear_shirq shirq_ras3 = { | 436 | static struct spear_shirq shirq_ras3 = { |
437 | .irq = IRQ_GEN_RAS_3, | 437 | .irq = SPEAR3XX_IRQ_GEN_RAS_3, |
438 | .dev_config = shirq_ras3_config, | 438 | .dev_config = shirq_ras3_config, |
439 | .dev_count = ARRAY_SIZE(shirq_ras3_config), | 439 | .dev_count = ARRAY_SIZE(shirq_ras3_config), |
440 | .regs = { | 440 | .regs = { |
441 | .enb_reg = INT_ENB_MASK_REG, | 441 | .enb_reg = SPEAR320_INT_ENB_MASK_REG, |
442 | .reset_to_enb = 1, | 442 | .reset_to_enb = 1, |
443 | .status_reg = INT_STS_MASK_REG, | 443 | .status_reg = SPEAR320_INT_STS_MASK_REG, |
444 | .status_reg_mask = SHIRQ_RAS3_MASK, | 444 | .status_reg_mask = SPEAR320_SHIRQ_RAS3_MASK, |
445 | .clear_reg = INT_CLR_MASK_REG, | 445 | .clear_reg = SPEAR320_INT_CLR_MASK_REG, |
446 | .reset_to_clear = 1, | 446 | .reset_to_clear = 1, |
447 | }, | 447 | }, |
448 | }; | 448 | }; |
449 | 449 | ||
450 | struct shirq_dev_config shirq_intrcomm_ras_config[] = { | 450 | static struct shirq_dev_config shirq_intrcomm_ras_config[] = { |
451 | { | 451 | { |
452 | .virq = VIRQ_CANU, | 452 | .virq = SPEAR320_VIRQ_CANU, |
453 | .status_mask = CAN_U_IRQ_MASK, | 453 | .status_mask = SPEAR320_CAN_U_IRQ_MASK, |
454 | .clear_mask = CAN_U_IRQ_MASK, | 454 | .clear_mask = SPEAR320_CAN_U_IRQ_MASK, |
455 | }, { | 455 | }, { |
456 | .virq = VIRQ_CANL, | 456 | .virq = SPEAR320_VIRQ_CANL, |
457 | .status_mask = CAN_L_IRQ_MASK, | 457 | .status_mask = SPEAR320_CAN_L_IRQ_MASK, |
458 | .clear_mask = CAN_L_IRQ_MASK, | 458 | .clear_mask = SPEAR320_CAN_L_IRQ_MASK, |
459 | }, { | 459 | }, { |
460 | .virq = VIRQ_UART1, | 460 | .virq = SPEAR320_VIRQ_UART1, |
461 | .status_mask = UART1_IRQ_MASK, | 461 | .status_mask = SPEAR320_UART1_IRQ_MASK, |
462 | .clear_mask = UART1_IRQ_MASK, | 462 | .clear_mask = SPEAR320_UART1_IRQ_MASK, |
463 | }, { | 463 | }, { |
464 | .virq = VIRQ_UART2, | 464 | .virq = SPEAR320_VIRQ_UART2, |
465 | .status_mask = UART2_IRQ_MASK, | 465 | .status_mask = SPEAR320_UART2_IRQ_MASK, |
466 | .clear_mask = UART2_IRQ_MASK, | 466 | .clear_mask = SPEAR320_UART2_IRQ_MASK, |
467 | }, { | 467 | }, { |
468 | .virq = VIRQ_SSP1, | 468 | .virq = SPEAR320_VIRQ_SSP1, |
469 | .status_mask = SSP1_IRQ_MASK, | 469 | .status_mask = SPEAR320_SSP1_IRQ_MASK, |
470 | .clear_mask = SSP1_IRQ_MASK, | 470 | .clear_mask = SPEAR320_SSP1_IRQ_MASK, |
471 | }, { | 471 | }, { |
472 | .virq = VIRQ_SSP2, | 472 | .virq = SPEAR320_VIRQ_SSP2, |
473 | .status_mask = SSP2_IRQ_MASK, | 473 | .status_mask = SPEAR320_SSP2_IRQ_MASK, |
474 | .clear_mask = SSP2_IRQ_MASK, | 474 | .clear_mask = SPEAR320_SSP2_IRQ_MASK, |
475 | }, { | 475 | }, { |
476 | .virq = VIRQ_SMII0, | 476 | .virq = SPEAR320_VIRQ_SMII0, |
477 | .status_mask = SMII0_IRQ_MASK, | 477 | .status_mask = SPEAR320_SMII0_IRQ_MASK, |
478 | .clear_mask = SMII0_IRQ_MASK, | 478 | .clear_mask = SPEAR320_SMII0_IRQ_MASK, |
479 | }, { | 479 | }, { |
480 | .virq = VIRQ_MII1_SMII1, | 480 | .virq = SPEAR320_VIRQ_MII1_SMII1, |
481 | .status_mask = MII1_SMII1_IRQ_MASK, | 481 | .status_mask = SPEAR320_MII1_SMII1_IRQ_MASK, |
482 | .clear_mask = MII1_SMII1_IRQ_MASK, | 482 | .clear_mask = SPEAR320_MII1_SMII1_IRQ_MASK, |
483 | }, { | 483 | }, { |
484 | .virq = VIRQ_WAKEUP_SMII0, | 484 | .virq = SPEAR320_VIRQ_WAKEUP_SMII0, |
485 | .status_mask = WAKEUP_SMII0_IRQ_MASK, | 485 | .status_mask = SPEAR320_WAKEUP_SMII0_IRQ_MASK, |
486 | .clear_mask = WAKEUP_SMII0_IRQ_MASK, | 486 | .clear_mask = SPEAR320_WAKEUP_SMII0_IRQ_MASK, |
487 | }, { | 487 | }, { |
488 | .virq = VIRQ_WAKEUP_MII1_SMII1, | 488 | .virq = SPEAR320_VIRQ_WAKEUP_MII1_SMII1, |
489 | .status_mask = WAKEUP_MII1_SMII1_IRQ_MASK, | 489 | .status_mask = SPEAR320_WAKEUP_MII1_SMII1_IRQ_MASK, |
490 | .clear_mask = WAKEUP_MII1_SMII1_IRQ_MASK, | 490 | .clear_mask = SPEAR320_WAKEUP_MII1_SMII1_IRQ_MASK, |
491 | }, { | 491 | }, { |
492 | .virq = VIRQ_I2C, | 492 | .virq = SPEAR320_VIRQ_I2C1, |
493 | .status_mask = I2C1_IRQ_MASK, | 493 | .status_mask = SPEAR320_I2C1_IRQ_MASK, |
494 | .clear_mask = I2C1_IRQ_MASK, | 494 | .clear_mask = SPEAR320_I2C1_IRQ_MASK, |
495 | }, | 495 | }, |
496 | }; | 496 | }; |
497 | 497 | ||
498 | struct spear_shirq shirq_intrcomm_ras = { | 498 | static struct spear_shirq shirq_intrcomm_ras = { |
499 | .irq = IRQ_INTRCOMM_RAS_ARM, | 499 | .irq = SPEAR3XX_IRQ_INTRCOMM_RAS_ARM, |
500 | .dev_config = shirq_intrcomm_ras_config, | 500 | .dev_config = shirq_intrcomm_ras_config, |
501 | .dev_count = ARRAY_SIZE(shirq_intrcomm_ras_config), | 501 | .dev_count = ARRAY_SIZE(shirq_intrcomm_ras_config), |
502 | .regs = { | 502 | .regs = { |
503 | .enb_reg = -1, | 503 | .enb_reg = -1, |
504 | .status_reg = INT_STS_MASK_REG, | 504 | .status_reg = SPEAR320_INT_STS_MASK_REG, |
505 | .status_reg_mask = SHIRQ_INTRCOMM_RAS_MASK, | 505 | .status_reg_mask = SPEAR320_SHIRQ_INTRCOMM_RAS_MASK, |
506 | .clear_reg = INT_CLR_MASK_REG, | 506 | .clear_reg = SPEAR320_INT_CLR_MASK_REG, |
507 | .reset_to_clear = 1, | 507 | .reset_to_clear = 1, |
508 | }, | 508 | }, |
509 | }; | 509 | }; |
@@ -511,7 +511,8 @@ struct spear_shirq shirq_intrcomm_ras = { | |||
511 | /* Add spear320 specific devices here */ | 511 | /* Add spear320 specific devices here */ |
512 | 512 | ||
513 | /* spear320 routines */ | 513 | /* spear320 routines */ |
514 | void __init spear320_init(void) | 514 | void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, |
515 | u8 pmx_dev_count) | ||
515 | { | 516 | { |
516 | void __iomem *base; | 517 | void __iomem *base; |
517 | int ret = 0; | 518 | int ret = 0; |
@@ -543,6 +544,10 @@ void __init spear320_init(void) | |||
543 | 544 | ||
544 | /* pmx initialization */ | 545 | /* pmx initialization */ |
545 | pmx_driver.base = base; | 546 | pmx_driver.base = base; |
547 | pmx_driver.mode = pmx_mode; | ||
548 | pmx_driver.devs = pmx_devs; | ||
549 | pmx_driver.devs_count = pmx_dev_count; | ||
550 | |||
546 | ret = pmx_register(&pmx_driver); | 551 | ret = pmx_register(&pmx_driver); |
547 | if (ret) | 552 | if (ret) |
548 | printk(KERN_ERR "padmux: registeration failed. err no: %d\n", | 553 | printk(KERN_ERR "padmux: registeration failed. err no: %d\n", |
diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c index 8213e4b66c14..a12b353940d6 100644 --- a/arch/arm/mach-spear3xx/spear320_evb.c +++ b/arch/arm/mach-spear3xx/spear320_evb.c | |||
@@ -19,28 +19,28 @@ | |||
19 | /* padmux devices to enable */ | 19 | /* padmux devices to enable */ |
20 | static struct pmx_dev *pmx_devs[] = { | 20 | static struct pmx_dev *pmx_devs[] = { |
21 | /* spear3xx specific devices */ | 21 | /* spear3xx specific devices */ |
22 | &pmx_i2c, | 22 | &spear3xx_pmx_i2c, |
23 | &pmx_ssp, | 23 | &spear3xx_pmx_ssp, |
24 | &pmx_mii, | 24 | &spear3xx_pmx_mii, |
25 | &pmx_uart0, | 25 | &spear3xx_pmx_uart0, |
26 | 26 | ||
27 | /* spear320 specific devices */ | 27 | /* spear320 specific devices */ |
28 | &pmx_fsmc, | 28 | &spear320_pmx_fsmc, |
29 | &pmx_sdhci, | 29 | &spear320_pmx_sdhci, |
30 | &pmx_i2s, | 30 | &spear320_pmx_i2s, |
31 | &pmx_uart1, | 31 | &spear320_pmx_uart1, |
32 | &pmx_uart2, | 32 | &spear320_pmx_uart2, |
33 | &pmx_can, | 33 | &spear320_pmx_can, |
34 | &pmx_pwm0, | 34 | &spear320_pmx_pwm0, |
35 | &pmx_pwm1, | 35 | &spear320_pmx_pwm1, |
36 | &pmx_pwm2, | 36 | &spear320_pmx_pwm2, |
37 | &pmx_mii1, | 37 | &spear320_pmx_mii1, |
38 | }; | 38 | }; |
39 | 39 | ||
40 | static struct amba_device *amba_devs[] __initdata = { | 40 | static struct amba_device *amba_devs[] __initdata = { |
41 | /* spear3xx specific devices */ | 41 | /* spear3xx specific devices */ |
42 | &gpio_device, | 42 | &spear3xx_gpio_device, |
43 | &uart_device, | 43 | &spear3xx_uart_device, |
44 | 44 | ||
45 | /* spear320 specific devices */ | 45 | /* spear320 specific devices */ |
46 | }; | 46 | }; |
@@ -55,13 +55,9 @@ static void __init spear320_evb_init(void) | |||
55 | { | 55 | { |
56 | unsigned int i; | 56 | unsigned int i; |
57 | 57 | ||
58 | /* padmux initialization, must be done before spear320_init */ | ||
59 | pmx_driver.mode = &auto_net_mii_mode; | ||
60 | pmx_driver.devs = pmx_devs; | ||
61 | pmx_driver.devs_count = ARRAY_SIZE(pmx_devs); | ||
62 | |||
63 | /* call spear320 machine init function */ | 58 | /* call spear320 machine init function */ |
64 | spear320_init(); | 59 | spear320_init(&spear320_auto_net_mii_mode, pmx_devs, |
60 | ARRAY_SIZE(pmx_devs)); | ||
65 | 61 | ||
66 | /* Add Platform Devices */ | 62 | /* Add Platform Devices */ |
67 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | 63 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); |
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c index d3ba8ca1bc59..10af45da86a0 100644 --- a/arch/arm/mach-spear3xx/spear3xx.c +++ b/arch/arm/mach-spear3xx/spear3xx.c | |||
@@ -25,10 +25,10 @@ | |||
25 | /* gpio device registration */ | 25 | /* gpio device registration */ |
26 | static struct pl061_platform_data gpio_plat_data = { | 26 | static struct pl061_platform_data gpio_plat_data = { |
27 | .gpio_base = 0, | 27 | .gpio_base = 0, |
28 | .irq_base = SPEAR_GPIO_INT_BASE, | 28 | .irq_base = SPEAR3XX_GPIO_INT_BASE, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | struct amba_device gpio_device = { | 31 | struct amba_device spear3xx_gpio_device = { |
32 | .dev = { | 32 | .dev = { |
33 | .init_name = "gpio", | 33 | .init_name = "gpio", |
34 | .platform_data = &gpio_plat_data, | 34 | .platform_data = &gpio_plat_data, |
@@ -38,11 +38,11 @@ struct amba_device gpio_device = { | |||
38 | .end = SPEAR3XX_ICM3_GPIO_BASE + SZ_4K - 1, | 38 | .end = SPEAR3XX_ICM3_GPIO_BASE + SZ_4K - 1, |
39 | .flags = IORESOURCE_MEM, | 39 | .flags = IORESOURCE_MEM, |
40 | }, | 40 | }, |
41 | .irq = {IRQ_BASIC_GPIO, NO_IRQ}, | 41 | .irq = {SPEAR3XX_IRQ_BASIC_GPIO, NO_IRQ}, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | /* uart device registration */ | 44 | /* uart device registration */ |
45 | struct amba_device uart_device = { | 45 | struct amba_device spear3xx_uart_device = { |
46 | .dev = { | 46 | .dev = { |
47 | .init_name = "uart", | 47 | .init_name = "uart", |
48 | }, | 48 | }, |
@@ -51,7 +51,7 @@ struct amba_device uart_device = { | |||
51 | .end = SPEAR3XX_ICM1_UART_BASE + SZ_4K - 1, | 51 | .end = SPEAR3XX_ICM1_UART_BASE + SZ_4K - 1, |
52 | .flags = IORESOURCE_MEM, | 52 | .flags = IORESOURCE_MEM, |
53 | }, | 53 | }, |
54 | .irq = {IRQ_UART, NO_IRQ}, | 54 | .irq = {SPEAR3XX_IRQ_UART, NO_IRQ}, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | /* Do spear3xx familiy common initialization part here */ | 57 | /* Do spear3xx familiy common initialization part here */ |
@@ -97,215 +97,215 @@ void __init spear3xx_map_io(void) | |||
97 | iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc)); | 97 | iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc)); |
98 | 98 | ||
99 | /* This will initialize clock framework */ | 99 | /* This will initialize clock framework */ |
100 | clk_init(); | 100 | spear3xx_clk_init(); |
101 | } | 101 | } |
102 | 102 | ||
103 | /* pad multiplexing support */ | 103 | /* pad multiplexing support */ |
104 | /* devices */ | 104 | /* devices */ |
105 | struct pmx_dev_mode pmx_firda_modes[] = { | 105 | static struct pmx_dev_mode pmx_firda_modes[] = { |
106 | { | 106 | { |
107 | .ids = 0xffffffff, | 107 | .ids = 0xffffffff, |
108 | .mask = PMX_FIRDA_MASK, | 108 | .mask = PMX_FIRDA_MASK, |
109 | }, | 109 | }, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | struct pmx_dev pmx_firda = { | 112 | struct pmx_dev spear3xx_pmx_firda = { |
113 | .name = "firda", | 113 | .name = "firda", |
114 | .modes = pmx_firda_modes, | 114 | .modes = pmx_firda_modes, |
115 | .mode_count = ARRAY_SIZE(pmx_firda_modes), | 115 | .mode_count = ARRAY_SIZE(pmx_firda_modes), |
116 | .enb_on_reset = 0, | 116 | .enb_on_reset = 0, |
117 | }; | 117 | }; |
118 | 118 | ||
119 | struct pmx_dev_mode pmx_i2c_modes[] = { | 119 | static struct pmx_dev_mode pmx_i2c_modes[] = { |
120 | { | 120 | { |
121 | .ids = 0xffffffff, | 121 | .ids = 0xffffffff, |
122 | .mask = PMX_I2C_MASK, | 122 | .mask = PMX_I2C_MASK, |
123 | }, | 123 | }, |
124 | }; | 124 | }; |
125 | 125 | ||
126 | struct pmx_dev pmx_i2c = { | 126 | struct pmx_dev spear3xx_pmx_i2c = { |
127 | .name = "i2c", | 127 | .name = "i2c", |
128 | .modes = pmx_i2c_modes, | 128 | .modes = pmx_i2c_modes, |
129 | .mode_count = ARRAY_SIZE(pmx_i2c_modes), | 129 | .mode_count = ARRAY_SIZE(pmx_i2c_modes), |
130 | .enb_on_reset = 0, | 130 | .enb_on_reset = 0, |
131 | }; | 131 | }; |
132 | 132 | ||
133 | struct pmx_dev_mode pmx_ssp_cs_modes[] = { | 133 | static struct pmx_dev_mode pmx_ssp_cs_modes[] = { |
134 | { | 134 | { |
135 | .ids = 0xffffffff, | 135 | .ids = 0xffffffff, |
136 | .mask = PMX_SSP_CS_MASK, | 136 | .mask = PMX_SSP_CS_MASK, |
137 | }, | 137 | }, |
138 | }; | 138 | }; |
139 | 139 | ||
140 | struct pmx_dev pmx_ssp_cs = { | 140 | struct pmx_dev spear3xx_pmx_ssp_cs = { |
141 | .name = "ssp_chip_selects", | 141 | .name = "ssp_chip_selects", |
142 | .modes = pmx_ssp_cs_modes, | 142 | .modes = pmx_ssp_cs_modes, |
143 | .mode_count = ARRAY_SIZE(pmx_ssp_cs_modes), | 143 | .mode_count = ARRAY_SIZE(pmx_ssp_cs_modes), |
144 | .enb_on_reset = 0, | 144 | .enb_on_reset = 0, |
145 | }; | 145 | }; |
146 | 146 | ||
147 | struct pmx_dev_mode pmx_ssp_modes[] = { | 147 | static struct pmx_dev_mode pmx_ssp_modes[] = { |
148 | { | 148 | { |
149 | .ids = 0xffffffff, | 149 | .ids = 0xffffffff, |
150 | .mask = PMX_SSP_MASK, | 150 | .mask = PMX_SSP_MASK, |
151 | }, | 151 | }, |
152 | }; | 152 | }; |
153 | 153 | ||
154 | struct pmx_dev pmx_ssp = { | 154 | struct pmx_dev spear3xx_pmx_ssp = { |
155 | .name = "ssp", | 155 | .name = "ssp", |
156 | .modes = pmx_ssp_modes, | 156 | .modes = pmx_ssp_modes, |
157 | .mode_count = ARRAY_SIZE(pmx_ssp_modes), | 157 | .mode_count = ARRAY_SIZE(pmx_ssp_modes), |
158 | .enb_on_reset = 0, | 158 | .enb_on_reset = 0, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | struct pmx_dev_mode pmx_mii_modes[] = { | 161 | static struct pmx_dev_mode pmx_mii_modes[] = { |
162 | { | 162 | { |
163 | .ids = 0xffffffff, | 163 | .ids = 0xffffffff, |
164 | .mask = PMX_MII_MASK, | 164 | .mask = PMX_MII_MASK, |
165 | }, | 165 | }, |
166 | }; | 166 | }; |
167 | 167 | ||
168 | struct pmx_dev pmx_mii = { | 168 | struct pmx_dev spear3xx_pmx_mii = { |
169 | .name = "mii", | 169 | .name = "mii", |
170 | .modes = pmx_mii_modes, | 170 | .modes = pmx_mii_modes, |
171 | .mode_count = ARRAY_SIZE(pmx_mii_modes), | 171 | .mode_count = ARRAY_SIZE(pmx_mii_modes), |
172 | .enb_on_reset = 0, | 172 | .enb_on_reset = 0, |
173 | }; | 173 | }; |
174 | 174 | ||
175 | struct pmx_dev_mode pmx_gpio_pin0_modes[] = { | 175 | static struct pmx_dev_mode pmx_gpio_pin0_modes[] = { |
176 | { | 176 | { |
177 | .ids = 0xffffffff, | 177 | .ids = 0xffffffff, |
178 | .mask = PMX_GPIO_PIN0_MASK, | 178 | .mask = PMX_GPIO_PIN0_MASK, |
179 | }, | 179 | }, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | struct pmx_dev pmx_gpio_pin0 = { | 182 | struct pmx_dev spear3xx_pmx_gpio_pin0 = { |
183 | .name = "gpio_pin0", | 183 | .name = "gpio_pin0", |
184 | .modes = pmx_gpio_pin0_modes, | 184 | .modes = pmx_gpio_pin0_modes, |
185 | .mode_count = ARRAY_SIZE(pmx_gpio_pin0_modes), | 185 | .mode_count = ARRAY_SIZE(pmx_gpio_pin0_modes), |
186 | .enb_on_reset = 0, | 186 | .enb_on_reset = 0, |
187 | }; | 187 | }; |
188 | 188 | ||
189 | struct pmx_dev_mode pmx_gpio_pin1_modes[] = { | 189 | static struct pmx_dev_mode pmx_gpio_pin1_modes[] = { |
190 | { | 190 | { |
191 | .ids = 0xffffffff, | 191 | .ids = 0xffffffff, |
192 | .mask = PMX_GPIO_PIN1_MASK, | 192 | .mask = PMX_GPIO_PIN1_MASK, |
193 | }, | 193 | }, |
194 | }; | 194 | }; |
195 | 195 | ||
196 | struct pmx_dev pmx_gpio_pin1 = { | 196 | struct pmx_dev spear3xx_pmx_gpio_pin1 = { |
197 | .name = "gpio_pin1", | 197 | .name = "gpio_pin1", |
198 | .modes = pmx_gpio_pin1_modes, | 198 | .modes = pmx_gpio_pin1_modes, |
199 | .mode_count = ARRAY_SIZE(pmx_gpio_pin1_modes), | 199 | .mode_count = ARRAY_SIZE(pmx_gpio_pin1_modes), |
200 | .enb_on_reset = 0, | 200 | .enb_on_reset = 0, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | struct pmx_dev_mode pmx_gpio_pin2_modes[] = { | 203 | static struct pmx_dev_mode pmx_gpio_pin2_modes[] = { |
204 | { | 204 | { |
205 | .ids = 0xffffffff, | 205 | .ids = 0xffffffff, |
206 | .mask = PMX_GPIO_PIN2_MASK, | 206 | .mask = PMX_GPIO_PIN2_MASK, |
207 | }, | 207 | }, |
208 | }; | 208 | }; |
209 | 209 | ||
210 | struct pmx_dev pmx_gpio_pin2 = { | 210 | struct pmx_dev spear3xx_pmx_gpio_pin2 = { |
211 | .name = "gpio_pin2", | 211 | .name = "gpio_pin2", |
212 | .modes = pmx_gpio_pin2_modes, | 212 | .modes = pmx_gpio_pin2_modes, |
213 | .mode_count = ARRAY_SIZE(pmx_gpio_pin2_modes), | 213 | .mode_count = ARRAY_SIZE(pmx_gpio_pin2_modes), |
214 | .enb_on_reset = 0, | 214 | .enb_on_reset = 0, |
215 | }; | 215 | }; |
216 | 216 | ||
217 | struct pmx_dev_mode pmx_gpio_pin3_modes[] = { | 217 | static struct pmx_dev_mode pmx_gpio_pin3_modes[] = { |
218 | { | 218 | { |
219 | .ids = 0xffffffff, | 219 | .ids = 0xffffffff, |
220 | .mask = PMX_GPIO_PIN3_MASK, | 220 | .mask = PMX_GPIO_PIN3_MASK, |
221 | }, | 221 | }, |
222 | }; | 222 | }; |
223 | 223 | ||
224 | struct pmx_dev pmx_gpio_pin3 = { | 224 | struct pmx_dev spear3xx_pmx_gpio_pin3 = { |
225 | .name = "gpio_pin3", | 225 | .name = "gpio_pin3", |
226 | .modes = pmx_gpio_pin3_modes, | 226 | .modes = pmx_gpio_pin3_modes, |
227 | .mode_count = ARRAY_SIZE(pmx_gpio_pin3_modes), | 227 | .mode_count = ARRAY_SIZE(pmx_gpio_pin3_modes), |
228 | .enb_on_reset = 0, | 228 | .enb_on_reset = 0, |
229 | }; | 229 | }; |
230 | 230 | ||
231 | struct pmx_dev_mode pmx_gpio_pin4_modes[] = { | 231 | static struct pmx_dev_mode pmx_gpio_pin4_modes[] = { |
232 | { | 232 | { |
233 | .ids = 0xffffffff, | 233 | .ids = 0xffffffff, |
234 | .mask = PMX_GPIO_PIN4_MASK, | 234 | .mask = PMX_GPIO_PIN4_MASK, |
235 | }, | 235 | }, |
236 | }; | 236 | }; |
237 | 237 | ||
238 | struct pmx_dev pmx_gpio_pin4 = { | 238 | struct pmx_dev spear3xx_pmx_gpio_pin4 = { |
239 | .name = "gpio_pin4", | 239 | .name = "gpio_pin4", |
240 | .modes = pmx_gpio_pin4_modes, | 240 | .modes = pmx_gpio_pin4_modes, |
241 | .mode_count = ARRAY_SIZE(pmx_gpio_pin4_modes), | 241 | .mode_count = ARRAY_SIZE(pmx_gpio_pin4_modes), |
242 | .enb_on_reset = 0, | 242 | .enb_on_reset = 0, |
243 | }; | 243 | }; |
244 | 244 | ||
245 | struct pmx_dev_mode pmx_gpio_pin5_modes[] = { | 245 | static struct pmx_dev_mode pmx_gpio_pin5_modes[] = { |
246 | { | 246 | { |
247 | .ids = 0xffffffff, | 247 | .ids = 0xffffffff, |
248 | .mask = PMX_GPIO_PIN5_MASK, | 248 | .mask = PMX_GPIO_PIN5_MASK, |
249 | }, | 249 | }, |
250 | }; | 250 | }; |
251 | 251 | ||
252 | struct pmx_dev pmx_gpio_pin5 = { | 252 | struct pmx_dev spear3xx_pmx_gpio_pin5 = { |
253 | .name = "gpio_pin5", | 253 | .name = "gpio_pin5", |
254 | .modes = pmx_gpio_pin5_modes, | 254 | .modes = pmx_gpio_pin5_modes, |
255 | .mode_count = ARRAY_SIZE(pmx_gpio_pin5_modes), | 255 | .mode_count = ARRAY_SIZE(pmx_gpio_pin5_modes), |
256 | .enb_on_reset = 0, | 256 | .enb_on_reset = 0, |
257 | }; | 257 | }; |
258 | 258 | ||
259 | struct pmx_dev_mode pmx_uart0_modem_modes[] = { | 259 | static struct pmx_dev_mode pmx_uart0_modem_modes[] = { |
260 | { | 260 | { |
261 | .ids = 0xffffffff, | 261 | .ids = 0xffffffff, |
262 | .mask = PMX_UART0_MODEM_MASK, | 262 | .mask = PMX_UART0_MODEM_MASK, |
263 | }, | 263 | }, |
264 | }; | 264 | }; |
265 | 265 | ||
266 | struct pmx_dev pmx_uart0_modem = { | 266 | struct pmx_dev spear3xx_pmx_uart0_modem = { |
267 | .name = "uart0_modem", | 267 | .name = "uart0_modem", |
268 | .modes = pmx_uart0_modem_modes, | 268 | .modes = pmx_uart0_modem_modes, |
269 | .mode_count = ARRAY_SIZE(pmx_uart0_modem_modes), | 269 | .mode_count = ARRAY_SIZE(pmx_uart0_modem_modes), |
270 | .enb_on_reset = 0, | 270 | .enb_on_reset = 0, |
271 | }; | 271 | }; |
272 | 272 | ||
273 | struct pmx_dev_mode pmx_uart0_modes[] = { | 273 | static struct pmx_dev_mode pmx_uart0_modes[] = { |
274 | { | 274 | { |
275 | .ids = 0xffffffff, | 275 | .ids = 0xffffffff, |
276 | .mask = PMX_UART0_MASK, | 276 | .mask = PMX_UART0_MASK, |
277 | }, | 277 | }, |
278 | }; | 278 | }; |
279 | 279 | ||
280 | struct pmx_dev pmx_uart0 = { | 280 | struct pmx_dev spear3xx_pmx_uart0 = { |
281 | .name = "uart0", | 281 | .name = "uart0", |
282 | .modes = pmx_uart0_modes, | 282 | .modes = pmx_uart0_modes, |
283 | .mode_count = ARRAY_SIZE(pmx_uart0_modes), | 283 | .mode_count = ARRAY_SIZE(pmx_uart0_modes), |
284 | .enb_on_reset = 0, | 284 | .enb_on_reset = 0, |
285 | }; | 285 | }; |
286 | 286 | ||
287 | struct pmx_dev_mode pmx_timer_3_4_modes[] = { | 287 | static struct pmx_dev_mode pmx_timer_3_4_modes[] = { |
288 | { | 288 | { |
289 | .ids = 0xffffffff, | 289 | .ids = 0xffffffff, |
290 | .mask = PMX_TIMER_3_4_MASK, | 290 | .mask = PMX_TIMER_3_4_MASK, |
291 | }, | 291 | }, |
292 | }; | 292 | }; |
293 | 293 | ||
294 | struct pmx_dev pmx_timer_3_4 = { | 294 | struct pmx_dev spear3xx_pmx_timer_3_4 = { |
295 | .name = "timer_3_4", | 295 | .name = "timer_3_4", |
296 | .modes = pmx_timer_3_4_modes, | 296 | .modes = pmx_timer_3_4_modes, |
297 | .mode_count = ARRAY_SIZE(pmx_timer_3_4_modes), | 297 | .mode_count = ARRAY_SIZE(pmx_timer_3_4_modes), |
298 | .enb_on_reset = 0, | 298 | .enb_on_reset = 0, |
299 | }; | 299 | }; |
300 | 300 | ||
301 | struct pmx_dev_mode pmx_timer_1_2_modes[] = { | 301 | static struct pmx_dev_mode pmx_timer_1_2_modes[] = { |
302 | { | 302 | { |
303 | .ids = 0xffffffff, | 303 | .ids = 0xffffffff, |
304 | .mask = PMX_TIMER_1_2_MASK, | 304 | .mask = PMX_TIMER_1_2_MASK, |
305 | }, | 305 | }, |
306 | }; | 306 | }; |
307 | 307 | ||
308 | struct pmx_dev pmx_timer_1_2 = { | 308 | struct pmx_dev spear3xx_pmx_timer_1_2 = { |
309 | .name = "timer_1_2", | 309 | .name = "timer_1_2", |
310 | .modes = pmx_timer_1_2_modes, | 310 | .modes = pmx_timer_1_2_modes, |
311 | .mode_count = ARRAY_SIZE(pmx_timer_1_2_modes), | 311 | .mode_count = ARRAY_SIZE(pmx_timer_1_2_modes), |
@@ -314,210 +314,210 @@ struct pmx_dev pmx_timer_1_2 = { | |||
314 | 314 | ||
315 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | 315 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) |
316 | /* plgpios devices */ | 316 | /* plgpios devices */ |
317 | struct pmx_dev_mode pmx_plgpio_0_1_modes[] = { | 317 | static struct pmx_dev_mode pmx_plgpio_0_1_modes[] = { |
318 | { | 318 | { |
319 | .ids = 0x00, | 319 | .ids = 0x00, |
320 | .mask = PMX_FIRDA_MASK, | 320 | .mask = PMX_FIRDA_MASK, |
321 | }, | 321 | }, |
322 | }; | 322 | }; |
323 | 323 | ||
324 | struct pmx_dev pmx_plgpio_0_1 = { | 324 | struct pmx_dev spear3xx_pmx_plgpio_0_1 = { |
325 | .name = "plgpio 0 and 1", | 325 | .name = "plgpio 0 and 1", |
326 | .modes = pmx_plgpio_0_1_modes, | 326 | .modes = pmx_plgpio_0_1_modes, |
327 | .mode_count = ARRAY_SIZE(pmx_plgpio_0_1_modes), | 327 | .mode_count = ARRAY_SIZE(pmx_plgpio_0_1_modes), |
328 | .enb_on_reset = 1, | 328 | .enb_on_reset = 1, |
329 | }; | 329 | }; |
330 | 330 | ||
331 | struct pmx_dev_mode pmx_plgpio_2_3_modes[] = { | 331 | static struct pmx_dev_mode pmx_plgpio_2_3_modes[] = { |
332 | { | 332 | { |
333 | .ids = 0x00, | 333 | .ids = 0x00, |
334 | .mask = PMX_UART0_MASK, | 334 | .mask = PMX_UART0_MASK, |
335 | }, | 335 | }, |
336 | }; | 336 | }; |
337 | 337 | ||
338 | struct pmx_dev pmx_plgpio_2_3 = { | 338 | struct pmx_dev spear3xx_pmx_plgpio_2_3 = { |
339 | .name = "plgpio 2 and 3", | 339 | .name = "plgpio 2 and 3", |
340 | .modes = pmx_plgpio_2_3_modes, | 340 | .modes = pmx_plgpio_2_3_modes, |
341 | .mode_count = ARRAY_SIZE(pmx_plgpio_2_3_modes), | 341 | .mode_count = ARRAY_SIZE(pmx_plgpio_2_3_modes), |
342 | .enb_on_reset = 1, | 342 | .enb_on_reset = 1, |
343 | }; | 343 | }; |
344 | 344 | ||
345 | struct pmx_dev_mode pmx_plgpio_4_5_modes[] = { | 345 | static struct pmx_dev_mode pmx_plgpio_4_5_modes[] = { |
346 | { | 346 | { |
347 | .ids = 0x00, | 347 | .ids = 0x00, |
348 | .mask = PMX_I2C_MASK, | 348 | .mask = PMX_I2C_MASK, |
349 | }, | 349 | }, |
350 | }; | 350 | }; |
351 | 351 | ||
352 | struct pmx_dev pmx_plgpio_4_5 = { | 352 | struct pmx_dev spear3xx_pmx_plgpio_4_5 = { |
353 | .name = "plgpio 4 and 5", | 353 | .name = "plgpio 4 and 5", |
354 | .modes = pmx_plgpio_4_5_modes, | 354 | .modes = pmx_plgpio_4_5_modes, |
355 | .mode_count = ARRAY_SIZE(pmx_plgpio_4_5_modes), | 355 | .mode_count = ARRAY_SIZE(pmx_plgpio_4_5_modes), |
356 | .enb_on_reset = 1, | 356 | .enb_on_reset = 1, |
357 | }; | 357 | }; |
358 | 358 | ||
359 | struct pmx_dev_mode pmx_plgpio_6_9_modes[] = { | 359 | static struct pmx_dev_mode pmx_plgpio_6_9_modes[] = { |
360 | { | 360 | { |
361 | .ids = 0x00, | 361 | .ids = 0x00, |
362 | .mask = PMX_SSP_MASK, | 362 | .mask = PMX_SSP_MASK, |
363 | }, | 363 | }, |
364 | }; | 364 | }; |
365 | 365 | ||
366 | struct pmx_dev pmx_plgpio_6_9 = { | 366 | struct pmx_dev spear3xx_pmx_plgpio_6_9 = { |
367 | .name = "plgpio 6 to 9", | 367 | .name = "plgpio 6 to 9", |
368 | .modes = pmx_plgpio_6_9_modes, | 368 | .modes = pmx_plgpio_6_9_modes, |
369 | .mode_count = ARRAY_SIZE(pmx_plgpio_6_9_modes), | 369 | .mode_count = ARRAY_SIZE(pmx_plgpio_6_9_modes), |
370 | .enb_on_reset = 1, | 370 | .enb_on_reset = 1, |
371 | }; | 371 | }; |
372 | 372 | ||
373 | struct pmx_dev_mode pmx_plgpio_10_27_modes[] = { | 373 | static struct pmx_dev_mode pmx_plgpio_10_27_modes[] = { |
374 | { | 374 | { |
375 | .ids = 0x00, | 375 | .ids = 0x00, |
376 | .mask = PMX_MII_MASK, | 376 | .mask = PMX_MII_MASK, |
377 | }, | 377 | }, |
378 | }; | 378 | }; |
379 | 379 | ||
380 | struct pmx_dev pmx_plgpio_10_27 = { | 380 | struct pmx_dev spear3xx_pmx_plgpio_10_27 = { |
381 | .name = "plgpio 10 to 27", | 381 | .name = "plgpio 10 to 27", |
382 | .modes = pmx_plgpio_10_27_modes, | 382 | .modes = pmx_plgpio_10_27_modes, |
383 | .mode_count = ARRAY_SIZE(pmx_plgpio_10_27_modes), | 383 | .mode_count = ARRAY_SIZE(pmx_plgpio_10_27_modes), |
384 | .enb_on_reset = 1, | 384 | .enb_on_reset = 1, |
385 | }; | 385 | }; |
386 | 386 | ||
387 | struct pmx_dev_mode pmx_plgpio_28_modes[] = { | 387 | static struct pmx_dev_mode pmx_plgpio_28_modes[] = { |
388 | { | 388 | { |
389 | .ids = 0x00, | 389 | .ids = 0x00, |
390 | .mask = PMX_GPIO_PIN0_MASK, | 390 | .mask = PMX_GPIO_PIN0_MASK, |
391 | }, | 391 | }, |
392 | }; | 392 | }; |
393 | 393 | ||
394 | struct pmx_dev pmx_plgpio_28 = { | 394 | struct pmx_dev spear3xx_pmx_plgpio_28 = { |
395 | .name = "plgpio 28", | 395 | .name = "plgpio 28", |
396 | .modes = pmx_plgpio_28_modes, | 396 | .modes = pmx_plgpio_28_modes, |
397 | .mode_count = ARRAY_SIZE(pmx_plgpio_28_modes), | 397 | .mode_count = ARRAY_SIZE(pmx_plgpio_28_modes), |
398 | .enb_on_reset = 1, | 398 | .enb_on_reset = 1, |
399 | }; | 399 | }; |
400 | 400 | ||
401 | struct pmx_dev_mode pmx_plgpio_29_modes[] = { | 401 | static struct pmx_dev_mode pmx_plgpio_29_modes[] = { |
402 | { | 402 | { |
403 | .ids = 0x00, | 403 | .ids = 0x00, |
404 | .mask = PMX_GPIO_PIN1_MASK, | 404 | .mask = PMX_GPIO_PIN1_MASK, |
405 | }, | 405 | }, |
406 | }; | 406 | }; |
407 | 407 | ||
408 | struct pmx_dev pmx_plgpio_29 = { | 408 | struct pmx_dev spear3xx_pmx_plgpio_29 = { |
409 | .name = "plgpio 29", | 409 | .name = "plgpio 29", |
410 | .modes = pmx_plgpio_29_modes, | 410 | .modes = pmx_plgpio_29_modes, |
411 | .mode_count = ARRAY_SIZE(pmx_plgpio_29_modes), | 411 | .mode_count = ARRAY_SIZE(pmx_plgpio_29_modes), |
412 | .enb_on_reset = 1, | 412 | .enb_on_reset = 1, |
413 | }; | 413 | }; |
414 | 414 | ||
415 | struct pmx_dev_mode pmx_plgpio_30_modes[] = { | 415 | static struct pmx_dev_mode pmx_plgpio_30_modes[] = { |
416 | { | 416 | { |
417 | .ids = 0x00, | 417 | .ids = 0x00, |
418 | .mask = PMX_GPIO_PIN2_MASK, | 418 | .mask = PMX_GPIO_PIN2_MASK, |
419 | }, | 419 | }, |
420 | }; | 420 | }; |
421 | 421 | ||
422 | struct pmx_dev pmx_plgpio_30 = { | 422 | struct pmx_dev spear3xx_pmx_plgpio_30 = { |
423 | .name = "plgpio 30", | 423 | .name = "plgpio 30", |
424 | .modes = pmx_plgpio_30_modes, | 424 | .modes = pmx_plgpio_30_modes, |
425 | .mode_count = ARRAY_SIZE(pmx_plgpio_30_modes), | 425 | .mode_count = ARRAY_SIZE(pmx_plgpio_30_modes), |
426 | .enb_on_reset = 1, | 426 | .enb_on_reset = 1, |
427 | }; | 427 | }; |
428 | 428 | ||
429 | struct pmx_dev_mode pmx_plgpio_31_modes[] = { | 429 | static struct pmx_dev_mode pmx_plgpio_31_modes[] = { |
430 | { | 430 | { |
431 | .ids = 0x00, | 431 | .ids = 0x00, |
432 | .mask = PMX_GPIO_PIN3_MASK, | 432 | .mask = PMX_GPIO_PIN3_MASK, |
433 | }, | 433 | }, |
434 | }; | 434 | }; |
435 | 435 | ||
436 | struct pmx_dev pmx_plgpio_31 = { | 436 | struct pmx_dev spear3xx_pmx_plgpio_31 = { |
437 | .name = "plgpio 31", | 437 | .name = "plgpio 31", |
438 | .modes = pmx_plgpio_31_modes, | 438 | .modes = pmx_plgpio_31_modes, |
439 | .mode_count = ARRAY_SIZE(pmx_plgpio_31_modes), | 439 | .mode_count = ARRAY_SIZE(pmx_plgpio_31_modes), |
440 | .enb_on_reset = 1, | 440 | .enb_on_reset = 1, |
441 | }; | 441 | }; |
442 | 442 | ||
443 | struct pmx_dev_mode pmx_plgpio_32_modes[] = { | 443 | static struct pmx_dev_mode pmx_plgpio_32_modes[] = { |
444 | { | 444 | { |
445 | .ids = 0x00, | 445 | .ids = 0x00, |
446 | .mask = PMX_GPIO_PIN4_MASK, | 446 | .mask = PMX_GPIO_PIN4_MASK, |
447 | }, | 447 | }, |
448 | }; | 448 | }; |
449 | 449 | ||
450 | struct pmx_dev pmx_plgpio_32 = { | 450 | struct pmx_dev spear3xx_pmx_plgpio_32 = { |
451 | .name = "plgpio 32", | 451 | .name = "plgpio 32", |
452 | .modes = pmx_plgpio_32_modes, | 452 | .modes = pmx_plgpio_32_modes, |
453 | .mode_count = ARRAY_SIZE(pmx_plgpio_32_modes), | 453 | .mode_count = ARRAY_SIZE(pmx_plgpio_32_modes), |
454 | .enb_on_reset = 1, | 454 | .enb_on_reset = 1, |
455 | }; | 455 | }; |
456 | 456 | ||
457 | struct pmx_dev_mode pmx_plgpio_33_modes[] = { | 457 | static struct pmx_dev_mode pmx_plgpio_33_modes[] = { |
458 | { | 458 | { |
459 | .ids = 0x00, | 459 | .ids = 0x00, |
460 | .mask = PMX_GPIO_PIN5_MASK, | 460 | .mask = PMX_GPIO_PIN5_MASK, |
461 | }, | 461 | }, |
462 | }; | 462 | }; |
463 | 463 | ||
464 | struct pmx_dev pmx_plgpio_33 = { | 464 | struct pmx_dev spear3xx_pmx_plgpio_33 = { |
465 | .name = "plgpio 33", | 465 | .name = "plgpio 33", |
466 | .modes = pmx_plgpio_33_modes, | 466 | .modes = pmx_plgpio_33_modes, |
467 | .mode_count = ARRAY_SIZE(pmx_plgpio_33_modes), | 467 | .mode_count = ARRAY_SIZE(pmx_plgpio_33_modes), |
468 | .enb_on_reset = 1, | 468 | .enb_on_reset = 1, |
469 | }; | 469 | }; |
470 | 470 | ||
471 | struct pmx_dev_mode pmx_plgpio_34_36_modes[] = { | 471 | static struct pmx_dev_mode pmx_plgpio_34_36_modes[] = { |
472 | { | 472 | { |
473 | .ids = 0x00, | 473 | .ids = 0x00, |
474 | .mask = PMX_SSP_CS_MASK, | 474 | .mask = PMX_SSP_CS_MASK, |
475 | }, | 475 | }, |
476 | }; | 476 | }; |
477 | 477 | ||
478 | struct pmx_dev pmx_plgpio_34_36 = { | 478 | struct pmx_dev spear3xx_pmx_plgpio_34_36 = { |
479 | .name = "plgpio 34 to 36", | 479 | .name = "plgpio 34 to 36", |
480 | .modes = pmx_plgpio_34_36_modes, | 480 | .modes = pmx_plgpio_34_36_modes, |
481 | .mode_count = ARRAY_SIZE(pmx_plgpio_34_36_modes), | 481 | .mode_count = ARRAY_SIZE(pmx_plgpio_34_36_modes), |
482 | .enb_on_reset = 1, | 482 | .enb_on_reset = 1, |
483 | }; | 483 | }; |
484 | 484 | ||
485 | struct pmx_dev_mode pmx_plgpio_37_42_modes[] = { | 485 | static struct pmx_dev_mode pmx_plgpio_37_42_modes[] = { |
486 | { | 486 | { |
487 | .ids = 0x00, | 487 | .ids = 0x00, |
488 | .mask = PMX_UART0_MODEM_MASK, | 488 | .mask = PMX_UART0_MODEM_MASK, |
489 | }, | 489 | }, |
490 | }; | 490 | }; |
491 | 491 | ||
492 | struct pmx_dev pmx_plgpio_37_42 = { | 492 | struct pmx_dev spear3xx_pmx_plgpio_37_42 = { |
493 | .name = "plgpio 37 to 42", | 493 | .name = "plgpio 37 to 42", |
494 | .modes = pmx_plgpio_37_42_modes, | 494 | .modes = pmx_plgpio_37_42_modes, |
495 | .mode_count = ARRAY_SIZE(pmx_plgpio_37_42_modes), | 495 | .mode_count = ARRAY_SIZE(pmx_plgpio_37_42_modes), |
496 | .enb_on_reset = 1, | 496 | .enb_on_reset = 1, |
497 | }; | 497 | }; |
498 | 498 | ||
499 | struct pmx_dev_mode pmx_plgpio_43_44_47_48_modes[] = { | 499 | static struct pmx_dev_mode pmx_plgpio_43_44_47_48_modes[] = { |
500 | { | 500 | { |
501 | .ids = 0x00, | 501 | .ids = 0x00, |
502 | .mask = PMX_TIMER_1_2_MASK, | 502 | .mask = PMX_TIMER_1_2_MASK, |
503 | }, | 503 | }, |
504 | }; | 504 | }; |
505 | 505 | ||
506 | struct pmx_dev pmx_plgpio_43_44_47_48 = { | 506 | struct pmx_dev spear3xx_pmx_plgpio_43_44_47_48 = { |
507 | .name = "plgpio 43, 44, 47 and 48", | 507 | .name = "plgpio 43, 44, 47 and 48", |
508 | .modes = pmx_plgpio_43_44_47_48_modes, | 508 | .modes = pmx_plgpio_43_44_47_48_modes, |
509 | .mode_count = ARRAY_SIZE(pmx_plgpio_43_44_47_48_modes), | 509 | .mode_count = ARRAY_SIZE(pmx_plgpio_43_44_47_48_modes), |
510 | .enb_on_reset = 1, | 510 | .enb_on_reset = 1, |
511 | }; | 511 | }; |
512 | 512 | ||
513 | struct pmx_dev_mode pmx_plgpio_45_46_49_50_modes[] = { | 513 | static struct pmx_dev_mode pmx_plgpio_45_46_49_50_modes[] = { |
514 | { | 514 | { |
515 | .ids = 0x00, | 515 | .ids = 0x00, |
516 | .mask = PMX_TIMER_3_4_MASK, | 516 | .mask = PMX_TIMER_3_4_MASK, |
517 | }, | 517 | }, |
518 | }; | 518 | }; |
519 | 519 | ||
520 | struct pmx_dev pmx_plgpio_45_46_49_50 = { | 520 | struct pmx_dev spear3xx_pmx_plgpio_45_46_49_50 = { |
521 | .name = "plgpio 45, 46, 49 and 50", | 521 | .name = "plgpio 45, 46, 49 and 50", |
522 | .modes = pmx_plgpio_45_46_49_50_modes, | 522 | .modes = pmx_plgpio_45_46_49_50_modes, |
523 | .mode_count = ARRAY_SIZE(pmx_plgpio_45_46_49_50_modes), | 523 | .mode_count = ARRAY_SIZE(pmx_plgpio_45_46_49_50_modes), |
diff --git a/arch/arm/mach-spear6xx/Kconfig b/arch/arm/mach-spear6xx/Kconfig index bddba034f862..ff4ae5ba00f1 100644 --- a/arch/arm/mach-spear6xx/Kconfig +++ b/arch/arm/mach-spear6xx/Kconfig | |||
@@ -4,17 +4,18 @@ | |||
4 | 4 | ||
5 | if ARCH_SPEAR6XX | 5 | if ARCH_SPEAR6XX |
6 | 6 | ||
7 | choice | 7 | menu "SPEAr6xx Implementations" |
8 | prompt "SPEAr6XX Family" | 8 | config BOARD_SPEAR600_EVB |
9 | default MACH_SPEAR600 | 9 | bool "SPEAr600 Evaluation Board" |
10 | select MACH_SPEAR600 | ||
11 | help | ||
12 | Supports ST SPEAr600 Evaluation Board | ||
13 | |||
14 | endmenu | ||
10 | 15 | ||
11 | config MACH_SPEAR600 | 16 | config MACH_SPEAR600 |
12 | bool "SPEAr600" | 17 | bool "SPEAr600" |
13 | help | 18 | help |
14 | Supports ST SPEAr600 Machine | 19 | Supports ST SPEAr600 Machine |
15 | endchoice | ||
16 | |||
17 | # Adding SPEAr6XX machine specific configuration files | ||
18 | source "arch/arm/mach-spear6xx/Kconfig600" | ||
19 | 20 | ||
20 | endif #ARCH_SPEAR6XX | 21 | endif #ARCH_SPEAR6XX |
diff --git a/arch/arm/mach-spear6xx/Kconfig600 b/arch/arm/mach-spear6xx/Kconfig600 deleted file mode 100644 index 9e19f65eb78e..000000000000 --- a/arch/arm/mach-spear6xx/Kconfig600 +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | # | ||
2 | # SPEAr600 machine configuration file | ||
3 | # | ||
4 | |||
5 | if MACH_SPEAR600 | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr600 Boards" | ||
9 | default BOARD_SPEAR600_EVB | ||
10 | |||
11 | config BOARD_SPEAR600_EVB | ||
12 | bool "SPEAr600 Evaluation Board" | ||
13 | help | ||
14 | Supports ST SPEAr600 Evaluation Board | ||
15 | endchoice | ||
16 | |||
17 | endif #MACH_SPEAR600 | ||
diff --git a/arch/arm/mach-spear6xx/clock.c b/arch/arm/mach-spear6xx/clock.c index 88b748b5be80..ac70e0d88fef 100644 --- a/arch/arm/mach-spear6xx/clock.c +++ b/arch/arm/mach-spear6xx/clock.c | |||
@@ -671,12 +671,12 @@ static struct clk_lookup spear_clk_lookups[] = { | |||
671 | { .dev_id = "gpio2", .clk = &gpio2_clk}, | 671 | { .dev_id = "gpio2", .clk = &gpio2_clk}, |
672 | }; | 672 | }; |
673 | 673 | ||
674 | void __init clk_init(void) | 674 | void __init spear6xx_clk_init(void) |
675 | { | 675 | { |
676 | int i; | 676 | int i; |
677 | 677 | ||
678 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) | 678 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) |
679 | clk_register(&spear_clk_lookups[i]); | 679 | clk_register(&spear_clk_lookups[i]); |
680 | 680 | ||
681 | recalc_root_clocks(); | 681 | clk_init(); |
682 | } | 682 | } |
diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h index 94cf4a648b57..183f0238c5e2 100644 --- a/arch/arm/mach-spear6xx/include/mach/generic.h +++ b/arch/arm/mach-spear6xx/include/mach/generic.h | |||
@@ -39,7 +39,7 @@ void __init spear6xx_map_io(void); | |||
39 | void __init spear6xx_init_irq(void); | 39 | void __init spear6xx_init_irq(void); |
40 | void __init spear6xx_init(void); | 40 | void __init spear6xx_init(void); |
41 | void __init spear600_init(void); | 41 | void __init spear600_init(void); |
42 | void __init clk_init(void); | 42 | void __init spear6xx_clk_init(void); |
43 | 43 | ||
44 | /* Add spear600 machine device structure declarations here */ | 44 | /* Add spear600 machine device structure declarations here */ |
45 | 45 | ||
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c index 981812961ac7..e0f6628c8b2c 100644 --- a/arch/arm/mach-spear6xx/spear6xx.c +++ b/arch/arm/mach-spear6xx/spear6xx.c | |||
@@ -148,7 +148,7 @@ void __init spear6xx_map_io(void) | |||
148 | iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc)); | 148 | iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc)); |
149 | 149 | ||
150 | /* This will initialize clock framework */ | 150 | /* This will initialize clock framework */ |
151 | clk_init(); | 151 | spear6xx_clk_init(); |
152 | } | 152 | } |
153 | 153 | ||
154 | static void __init spear6xx_timer_init(void) | 154 | static void __init spear6xx_timer_init(void) |
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 2b269c955524..1a8d4aa821be 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -253,8 +253,8 @@ void __sync_icache_dcache(pte_t pteval) | |||
253 | 253 | ||
254 | if (!test_and_set_bit(PG_dcache_clean, &page->flags)) | 254 | if (!test_and_set_bit(PG_dcache_clean, &page->flags)) |
255 | __flush_dcache_page(mapping, page); | 255 | __flush_dcache_page(mapping, page); |
256 | /* pte_exec() already checked above for non-aliasing VIPT cache */ | 256 | |
257 | if (cache_is_vipt_nonaliasing() || pte_exec(pteval)) | 257 | if (pte_exec(pteval)) |
258 | __flush_icache_all(); | 258 | __flush_icache_all(); |
259 | } | 259 | } |
260 | #endif | 260 | #endif |
@@ -275,7 +275,8 @@ void __sync_icache_dcache(pte_t pteval) | |||
275 | * kernel cache lines for later. Otherwise, we assume we have | 275 | * kernel cache lines for later. Otherwise, we assume we have |
276 | * aliasing mappings. | 276 | * aliasing mappings. |
277 | * | 277 | * |
278 | * Note that we disable the lazy flush for SMP. | 278 | * Note that we disable the lazy flush for SMP configurations where |
279 | * the cache maintenance operations are not automatically broadcasted. | ||
279 | */ | 280 | */ |
280 | void flush_dcache_page(struct page *page) | 281 | void flush_dcache_page(struct page *page) |
281 | { | 282 | { |
diff --git a/arch/arm/plat-spear/clock.c b/arch/arm/plat-spear/clock.c index bdbd7ec9cb6b..6fa474cb398e 100644 --- a/arch/arm/plat-spear/clock.c +++ b/arch/arm/plat-spear/clock.c | |||
@@ -903,6 +903,11 @@ void recalc_root_clocks(void) | |||
903 | spin_unlock_irqrestore(&clocks_lock, flags); | 903 | spin_unlock_irqrestore(&clocks_lock, flags); |
904 | } | 904 | } |
905 | 905 | ||
906 | void __init clk_init(void) | ||
907 | { | ||
908 | recalc_root_clocks(); | ||
909 | } | ||
910 | |||
906 | #ifdef CONFIG_DEBUG_FS | 911 | #ifdef CONFIG_DEBUG_FS |
907 | /* | 912 | /* |
908 | * debugfs support to trace clock tree hierarchy and attributes | 913 | * debugfs support to trace clock tree hierarchy and attributes |
diff --git a/arch/arm/plat-spear/include/plat/clock.h b/arch/arm/plat-spear/include/plat/clock.h index fcc0d0ad4a1f..0062bafef12d 100644 --- a/arch/arm/plat-spear/include/plat/clock.h +++ b/arch/arm/plat-spear/include/plat/clock.h | |||
@@ -224,6 +224,7 @@ struct clcd_rate_tbl { | |||
224 | }; | 224 | }; |
225 | 225 | ||
226 | /* platform specific clock functions */ | 226 | /* platform specific clock functions */ |
227 | void __init clk_init(void); | ||
227 | void clk_register(struct clk_lookup *cl); | 228 | void clk_register(struct clk_lookup *cl); |
228 | void recalc_root_clocks(void); | 229 | void recalc_root_clocks(void); |
229 | 230 | ||
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 7ca41f0a09b1..3b3776d0a1a7 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -17,7 +17,7 @@ | |||
17 | # XXX: the last 12 months. If your entry is missing please email rmk at | 17 | # XXX: the last 12 months. If your entry is missing please email rmk at |
18 | # XXX: <linux@arm.linux.org.uk> | 18 | # XXX: <linux@arm.linux.org.uk> |
19 | # | 19 | # |
20 | # Last update: Sun Mar 20 18:06:11 2011 | 20 | # Last update: Sat May 7 08:48:24 2011 |
21 | # | 21 | # |
22 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 22 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
23 | # | 23 | # |
@@ -377,6 +377,8 @@ davinci_da850_evm MACH_DAVINCI_DA850_EVM DAVINCI_DA850_EVM 2157 | |||
377 | at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159 | 377 | at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159 |
378 | omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160 | 378 | omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160 |
379 | magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 | 379 | magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 |
380 | btmavb101 MACH_BTMAVB101 BTMAVB101 2172 | ||
381 | btmawb101 MACH_BTMAWB101 BTMAWB101 2173 | ||
380 | omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 | 382 | omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 |
381 | anw6410 MACH_ANW6410 ANW6410 2183 | 383 | anw6410 MACH_ANW6410 ANW6410 2183 |
382 | imx27_visstrim_m10 MACH_IMX27_VISSTRIM_M10 IMX27_VISSTRIM_M10 2187 | 384 | imx27_visstrim_m10 MACH_IMX27_VISSTRIM_M10 IMX27_VISSTRIM_M10 2187 |
@@ -400,6 +402,7 @@ d2net MACH_D2NET D2NET 2282 | |||
400 | bigdisk MACH_BIGDISK BIGDISK 2283 | 402 | bigdisk MACH_BIGDISK BIGDISK 2283 |
401 | at91sam9g20ek_2mmc MACH_AT91SAM9G20EK_2MMC AT91SAM9G20EK_2MMC 2288 | 403 | at91sam9g20ek_2mmc MACH_AT91SAM9G20EK_2MMC AT91SAM9G20EK_2MMC 2288 |
402 | bcmring MACH_BCMRING BCMRING 2289 | 404 | bcmring MACH_BCMRING BCMRING 2289 |
405 | dp6xx MACH_DP6XX DP6XX 2302 | ||
403 | mahimahi MACH_MAHIMAHI MAHIMAHI 2304 | 406 | mahimahi MACH_MAHIMAHI MAHIMAHI 2304 |
404 | smdk6442 MACH_SMDK6442 SMDK6442 2324 | 407 | smdk6442 MACH_SMDK6442 SMDK6442 2324 |
405 | openrd_base MACH_OPENRD_BASE OPENRD_BASE 2325 | 408 | openrd_base MACH_OPENRD_BASE OPENRD_BASE 2325 |
@@ -424,6 +427,7 @@ smdkv210 MACH_SMDKV210 SMDKV210 2456 | |||
424 | omap_zoom3 MACH_OMAP_ZOOM3 OMAP_ZOOM3 2464 | 427 | omap_zoom3 MACH_OMAP_ZOOM3 OMAP_ZOOM3 2464 |
425 | omap_3630sdp MACH_OMAP_3630SDP OMAP_3630SDP 2465 | 428 | omap_3630sdp MACH_OMAP_3630SDP OMAP_3630SDP 2465 |
426 | smartq7 MACH_SMARTQ7 SMARTQ7 2479 | 429 | smartq7 MACH_SMARTQ7 SMARTQ7 2479 |
430 | watson_efm_plugin MACH_WATSON_EFM_PLUGIN WATSON_EFM_PLUGIN 2491 | ||
427 | g4evm MACH_G4EVM G4EVM 2493 | 431 | g4evm MACH_G4EVM G4EVM 2493 |
428 | omapl138_hawkboard MACH_OMAPL138_HAWKBOARD OMAPL138_HAWKBOARD 2495 | 432 | omapl138_hawkboard MACH_OMAPL138_HAWKBOARD OMAPL138_HAWKBOARD 2495 |
429 | ts41x MACH_TS41X TS41X 2502 | 433 | ts41x MACH_TS41X TS41X 2502 |
@@ -433,6 +437,8 @@ mx28evk MACH_MX28EVK MX28EVK 2531 | |||
433 | smartq5 MACH_SMARTQ5 SMARTQ5 2534 | 437 | smartq5 MACH_SMARTQ5 SMARTQ5 2534 |
434 | davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 | 438 | davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 |
435 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 | 439 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 |
440 | riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576 | ||
441 | riot_x37 MACH_RIOT_X37 RIOT_X37 2578 | ||
436 | capc7117 MACH_CAPC7117 CAPC7117 2612 | 442 | capc7117 MACH_CAPC7117 CAPC7117 2612 |
437 | icontrol MACH_ICONTROL ICONTROL 2624 | 443 | icontrol MACH_ICONTROL ICONTROL 2624 |
438 | qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627 | 444 | qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627 |
@@ -445,6 +451,7 @@ spear320 MACH_SPEAR320 SPEAR320 2661 | |||
445 | aquila MACH_AQUILA AQUILA 2676 | 451 | aquila MACH_AQUILA AQUILA 2676 |
446 | sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 | 452 | sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 |
447 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 | 453 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 |
454 | ea2478devkit MACH_EA2478DEVKIT EA2478DEVKIT 2683 | ||
448 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 | 455 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 |
449 | msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703 | 456 | msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703 |
450 | msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704 | 457 | msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704 |
@@ -463,75 +470,16 @@ wbd222 MACH_WBD222 WBD222 2753 | |||
463 | msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755 | 470 | msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755 |
464 | msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756 | 471 | msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756 |
465 | tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758 | 472 | tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758 |
466 | ap420 MACH_AP420 AP420 2765 | 473 | nanos MACH_NANOS NANOS 2759 |
467 | davinci_dm365_fc MACH_DAVINCI_DM365_FC DAVINCI_DM365_FC 2767 | 474 | stamp9g45 MACH_STAMP9G45 STAMP9G45 2761 |
468 | msm8x55_surf MACH_MSM8X55_SURF MSM8X55_SURF 2768 | ||
469 | msm8x55_ffa MACH_MSM8X55_FFA MSM8X55_FFA 2769 | ||
470 | esl_vamana MACH_ESL_VAMANA ESL_VAMANA 2770 | ||
471 | sbc35 MACH_SBC35 SBC35 2771 | ||
472 | mpx6446 MACH_MPX6446 MPX6446 2772 | ||
473 | oreo_controller MACH_OREO_CONTROLLER OREO_CONTROLLER 2773 | ||
474 | kopin_models MACH_KOPIN_MODELS KOPIN_MODELS 2774 | ||
475 | ttc_vision2 MACH_TTC_VISION2 TTC_VISION2 2775 | ||
476 | cns3420vb MACH_CNS3420VB CNS3420VB 2776 | 475 | cns3420vb MACH_CNS3420VB CNS3420VB 2776 |
477 | olympus MACH_OLYMPUS OLYMPUS 2778 | ||
478 | vortex MACH_VORTEX VORTEX 2779 | ||
479 | s5pc200 MACH_S5PC200 S5PC200 2780 | ||
480 | ecucore_9263 MACH_ECUCORE_9263 ECUCORE_9263 2781 | ||
481 | smdkc200 MACH_SMDKC200 SMDKC200 2782 | ||
482 | emsiso_sx27 MACH_EMSISO_SX27 EMSISO_SX27 2783 | ||
483 | apx_som9g45_ek MACH_APX_SOM9G45_EK APX_SOM9G45_EK 2784 | ||
484 | songshan MACH_SONGSHAN SONGSHAN 2785 | ||
485 | tianshan MACH_TIANSHAN TIANSHAN 2786 | ||
486 | vpx500 MACH_VPX500 VPX500 2787 | ||
487 | am3517sam MACH_AM3517SAM AM3517SAM 2788 | ||
488 | skat91_sim508 MACH_SKAT91_SIM508 SKAT91_SIM508 2789 | ||
489 | skat91_s3e MACH_SKAT91_S3E SKAT91_S3E 2790 | ||
490 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 | 476 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 |
491 | df7220 MACH_DF7220 DF7220 2792 | ||
492 | nemini MACH_NEMINI NEMINI 2793 | ||
493 | t8200 MACH_T8200 T8200 2794 | ||
494 | apf51 MACH_APF51 APF51 2795 | ||
495 | dr_rc_unit MACH_DR_RC_UNIT DR_RC_UNIT 2796 | ||
496 | bordeaux MACH_BORDEAUX BORDEAUX 2797 | ||
497 | catania_b MACH_CATANIA_B CATANIA_B 2798 | ||
498 | mx51_ocean MACH_MX51_OCEAN MX51_OCEAN 2799 | ||
499 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 | 477 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 |
500 | neocoreomap MACH_NEOCOREOMAP NEOCOREOMAP 2801 | ||
501 | withings_wbp MACH_WITHINGS_WBP WITHINGS_WBP 2802 | ||
502 | dbps MACH_DBPS DBPS 2803 | ||
503 | pcbfp0001 MACH_PCBFP0001 PCBFP0001 2805 | ||
504 | speedy MACH_SPEEDY SPEEDY 2806 | ||
505 | chrysaor MACH_CHRYSAOR CHRYSAOR 2807 | ||
506 | tango MACH_TANGO TANGO 2808 | ||
507 | synology_dsx11 MACH_SYNOLOGY_DSX11 SYNOLOGY_DSX11 2809 | ||
508 | hanlin_v3ext MACH_HANLIN_V3EXT HANLIN_V3EXT 2810 | ||
509 | hanlin_v5 MACH_HANLIN_V5 HANLIN_V5 2811 | ||
510 | hanlin_v3plus MACH_HANLIN_V3PLUS HANLIN_V3PLUS 2812 | ||
511 | iriver_story MACH_IRIVER_STORY IRIVER_STORY 2813 | ||
512 | irex_iliad MACH_IREX_ILIAD IREX_ILIAD 2814 | ||
513 | irex_dr1000 MACH_IREX_DR1000 IREX_DR1000 2815 | ||
514 | teton_bga MACH_TETON_BGA TETON_BGA 2816 | 478 | teton_bga MACH_TETON_BGA TETON_BGA 2816 |
515 | snapper9g45 MACH_SNAPPER9G45 SNAPPER9G45 2817 | ||
516 | tam3517 MACH_TAM3517 TAM3517 2818 | ||
517 | pdc100 MACH_PDC100 PDC100 2819 | ||
518 | eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25 EUKREA_CPUIMX25 2820 | 479 | eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25 EUKREA_CPUIMX25 2820 |
519 | eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35 EUKREA_CPUIMX35 2821 | 480 | eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35 EUKREA_CPUIMX35 2821 |
520 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 | 481 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 |
521 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 | 482 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 |
522 | p565 MACH_P565 P565 2824 | ||
523 | acer_a4 MACH_ACER_A4 ACER_A4 2825 | ||
524 | davinci_dm368_bip MACH_DAVINCI_DM368_BIP DAVINCI_DM368_BIP 2826 | ||
525 | eshare MACH_ESHARE ESHARE 2827 | ||
526 | wlbargn MACH_WLBARGN WLBARGN 2829 | ||
527 | bm170 MACH_BM170 BM170 2830 | ||
528 | netspace_mini_v2 MACH_NETSPACE_MINI_V2 NETSPACE_MINI_V2 2831 | ||
529 | netspace_plug_v2 MACH_NETSPACE_PLUG_V2 NETSPACE_PLUG_V2 2832 | ||
530 | siemens_l1 MACH_SIEMENS_L1 SIEMENS_L1 2833 | ||
531 | elv_lcu1 MACH_ELV_LCU1 ELV_LCU1 2834 | ||
532 | mcu1 MACH_MCU1 MCU1 2835 | ||
533 | omap3_tao3530 MACH_OMAP3_TAO3530 OMAP3_TAO3530 2836 | ||
534 | omap3_pcutouch MACH_OMAP3_PCUTOUCH OMAP3_PCUTOUCH 2837 | ||
535 | smdkc210 MACH_SMDKC210 SMDKC210 2838 | 483 | smdkc210 MACH_SMDKC210 SMDKC210 2838 |
536 | omap3_braillo MACH_OMAP3_BRAILLO OMAP3_BRAILLO 2839 | 484 | omap3_braillo MACH_OMAP3_BRAILLO OMAP3_BRAILLO 2839 |
537 | spyplug MACH_SPYPLUG SPYPLUG 2840 | 485 | spyplug MACH_SPYPLUG SPYPLUG 2840 |
@@ -973,9 +921,7 @@ isc3 MACH_ISC3 ISC3 3291 | |||
973 | rascal MACH_RASCAL RASCAL 3292 | 921 | rascal MACH_RASCAL RASCAL 3292 |
974 | hrefv60 MACH_HREFV60 HREFV60 3293 | 922 | hrefv60 MACH_HREFV60 HREFV60 3293 |
975 | tpt_2_0 MACH_TPT_2_0 TPT_2_0 3294 | 923 | tpt_2_0 MACH_TPT_2_0 TPT_2_0 3294 |
976 | pyramid_td MACH_PYRAMID_TD PYRAMID_TD 3295 | ||
977 | splendor MACH_SPLENDOR SPLENDOR 3296 | 924 | splendor MACH_SPLENDOR SPLENDOR 3296 |
978 | guf_planet MACH_GUF_PLANET GUF_PLANET 3297 | ||
979 | msm8x60_qt MACH_MSM8X60_QT MSM8X60_QT 3298 | 925 | msm8x60_qt MACH_MSM8X60_QT MSM8X60_QT 3298 |
980 | htc_hd_mini MACH_HTC_HD_MINI HTC_HD_MINI 3299 | 926 | htc_hd_mini MACH_HTC_HD_MINI HTC_HD_MINI 3299 |
981 | athene MACH_ATHENE ATHENE 3300 | 927 | athene MACH_ATHENE ATHENE 3300 |
@@ -1099,3 +1045,71 @@ ecuv5 MACH_ECUV5 ECUV5 3421 | |||
1099 | hsgx6d MACH_HSGX6D HSGX6D 3422 | 1045 | hsgx6d MACH_HSGX6D HSGX6D 3422 |
1100 | dawad7 MACH_DAWAD7 DAWAD7 3423 | 1046 | dawad7 MACH_DAWAD7 DAWAD7 3423 |
1101 | sam9repeater MACH_SAM9REPEATER SAM9REPEATER 3424 | 1047 | sam9repeater MACH_SAM9REPEATER SAM9REPEATER 3424 |
1048 | gt_i5700 MACH_GT_I5700 GT_I5700 3425 | ||
1049 | ctera_plug_c2 MACH_CTERA_PLUG_C2 CTERA_PLUG_C2 3426 | ||
1050 | marvelct MACH_MARVELCT MARVELCT 3427 | ||
1051 | ag11005 MACH_AG11005 AG11005 3428 | ||
1052 | vangogh MACH_VANGOGH VANGOGH 3430 | ||
1053 | matrix505 MACH_MATRIX505 MATRIX505 3431 | ||
1054 | oce_nigma MACH_OCE_NIGMA OCE_NIGMA 3432 | ||
1055 | t55 MACH_T55 T55 3433 | ||
1056 | bio3k MACH_BIO3K BIO3K 3434 | ||
1057 | expressct MACH_EXPRESSCT EXPRESSCT 3435 | ||
1058 | cardhu MACH_CARDHU CARDHU 3436 | ||
1059 | aruba MACH_ARUBA ARUBA 3437 | ||
1060 | bonaire MACH_BONAIRE BONAIRE 3438 | ||
1061 | nuc700evb MACH_NUC700EVB NUC700EVB 3439 | ||
1062 | nuc710evb MACH_NUC710EVB NUC710EVB 3440 | ||
1063 | nuc740evb MACH_NUC740EVB NUC740EVB 3441 | ||
1064 | nuc745evb MACH_NUC745EVB NUC745EVB 3442 | ||
1065 | transcede MACH_TRANSCEDE TRANSCEDE 3443 | ||
1066 | mora MACH_MORA MORA 3444 | ||
1067 | nda_evm MACH_NDA_EVM NDA_EVM 3445 | ||
1068 | timu MACH_TIMU TIMU 3446 | ||
1069 | expressh MACH_EXPRESSH EXPRESSH 3447 | ||
1070 | veridis_a300 MACH_VERIDIS_A300 VERIDIS_A300 3448 | ||
1071 | dm368_leopard MACH_DM368_LEOPARD DM368_LEOPARD 3449 | ||
1072 | omap_mcop MACH_OMAP_MCOP OMAP_MCOP 3450 | ||
1073 | tritip MACH_TRITIP TRITIP 3451 | ||
1074 | sm1k MACH_SM1K SM1K 3452 | ||
1075 | monch MACH_MONCH MONCH 3453 | ||
1076 | curacao MACH_CURACAO CURACAO 3454 | ||
1077 | origen MACH_ORIGEN ORIGEN 3455 | ||
1078 | epc10 MACH_EPC10 EPC10 3456 | ||
1079 | sgh_i740 MACH_SGH_I740 SGH_I740 3457 | ||
1080 | tuna MACH_TUNA TUNA 3458 | ||
1081 | mx51_tulip MACH_MX51_TULIP MX51_TULIP 3459 | ||
1082 | mx51_aster7 MACH_MX51_ASTER7 MX51_ASTER7 3460 | ||
1083 | acro37xbrd MACH_ACRO37XBRD ACRO37XBRD 3461 | ||
1084 | elke MACH_ELKE ELKE 3462 | ||
1085 | sbc6000x MACH_SBC6000X SBC6000X 3463 | ||
1086 | r1801e MACH_R1801E R1801E 3464 | ||
1087 | h1600 MACH_H1600 H1600 3465 | ||
1088 | mini210 MACH_MINI210 MINI210 3466 | ||
1089 | mini8168 MACH_MINI8168 MINI8168 3467 | ||
1090 | pc7308 MACH_PC7308 PC7308 3468 | ||
1091 | kmm2m01 MACH_KMM2M01 KMM2M01 3470 | ||
1092 | mx51erebus MACH_MX51EREBUS MX51EREBUS 3471 | ||
1093 | wm8650refboard MACH_WM8650REFBOARD WM8650REFBOARD 3472 | ||
1094 | tuxrail MACH_TUXRAIL TUXRAIL 3473 | ||
1095 | arthur MACH_ARTHUR ARTHUR 3474 | ||
1096 | doorboy MACH_DOORBOY DOORBOY 3475 | ||
1097 | xarina MACH_XARINA XARINA 3476 | ||
1098 | roverx7 MACH_ROVERX7 ROVERX7 3477 | ||
1099 | sdvr MACH_SDVR SDVR 3478 | ||
1100 | acer_maya MACH_ACER_MAYA ACER_MAYA 3479 | ||
1101 | pico MACH_PICO PICO 3480 | ||
1102 | cwmx233 MACH_CWMX233 CWMX233 3481 | ||
1103 | cwam1808 MACH_CWAM1808 CWAM1808 3482 | ||
1104 | cwdm365 MACH_CWDM365 CWDM365 3483 | ||
1105 | mx51_moray MACH_MX51_MORAY MX51_MORAY 3484 | ||
1106 | thales_cbc MACH_THALES_CBC THALES_CBC 3485 | ||
1107 | bluepoint MACH_BLUEPOINT BLUEPOINT 3486 | ||
1108 | dir665 MACH_DIR665 DIR665 3487 | ||
1109 | acmerover1 MACH_ACMEROVER1 ACMEROVER1 3488 | ||
1110 | shooter_ct MACH_SHOOTER_CT SHOOTER_CT 3489 | ||
1111 | bliss MACH_BLISS BLISS 3490 | ||
1112 | blissc MACH_BLISSC BLISSC 3491 | ||
1113 | thales_adc MACH_THALES_ADC THALES_ADC 3492 | ||
1114 | ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 | ||
1115 | atdgp318 MACH_ATDGP318 ATDGP318 3494 | ||
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index b4a7e4fba90f..4941e06fe2e1 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -77,7 +77,7 @@ static struct variant_data variant_arm_extended_fifo = { | |||
77 | static struct variant_data variant_u300 = { | 77 | static struct variant_data variant_u300 = { |
78 | .fifosize = 16 * 4, | 78 | .fifosize = 16 * 4, |
79 | .fifohalfsize = 8 * 4, | 79 | .fifohalfsize = 8 * 4, |
80 | .clkreg_enable = 1 << 13, /* HWFCEN */ | 80 | .clkreg_enable = MCI_ST_U300_HWFCEN, |
81 | .datalength_bits = 16, | 81 | .datalength_bits = 16, |
82 | .sdio = true, | 82 | .sdio = true, |
83 | }; | 83 | }; |
@@ -86,7 +86,7 @@ static struct variant_data variant_ux500 = { | |||
86 | .fifosize = 30 * 4, | 86 | .fifosize = 30 * 4, |
87 | .fifohalfsize = 8 * 4, | 87 | .fifohalfsize = 8 * 4, |
88 | .clkreg = MCI_CLK_ENABLE, | 88 | .clkreg = MCI_CLK_ENABLE, |
89 | .clkreg_enable = 1 << 14, /* HWFCEN */ | 89 | .clkreg_enable = MCI_ST_UX500_HWFCEN, |
90 | .datalength_bits = 24, | 90 | .datalength_bits = 24, |
91 | .sdio = true, | 91 | .sdio = true, |
92 | .st_clkdiv = true, | 92 | .st_clkdiv = true, |
@@ -103,6 +103,8 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired) | |||
103 | if (desired) { | 103 | if (desired) { |
104 | if (desired >= host->mclk) { | 104 | if (desired >= host->mclk) { |
105 | clk = MCI_CLK_BYPASS; | 105 | clk = MCI_CLK_BYPASS; |
106 | if (variant->st_clkdiv) | ||
107 | clk |= MCI_ST_UX500_NEG_EDGE; | ||
106 | host->cclk = host->mclk; | 108 | host->cclk = host->mclk; |
107 | } else if (variant->st_clkdiv) { | 109 | } else if (variant->st_clkdiv) { |
108 | /* | 110 | /* |
diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index ec9a7bc6d0df..bb32e21c09db 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h | |||
@@ -11,23 +11,33 @@ | |||
11 | #define MCI_PWR_OFF 0x00 | 11 | #define MCI_PWR_OFF 0x00 |
12 | #define MCI_PWR_UP 0x02 | 12 | #define MCI_PWR_UP 0x02 |
13 | #define MCI_PWR_ON 0x03 | 13 | #define MCI_PWR_ON 0x03 |
14 | #define MCI_DATA2DIREN (1 << 2) | ||
15 | #define MCI_CMDDIREN (1 << 3) | ||
16 | #define MCI_DATA0DIREN (1 << 4) | ||
17 | #define MCI_DATA31DIREN (1 << 5) | ||
18 | #define MCI_OD (1 << 6) | 14 | #define MCI_OD (1 << 6) |
19 | #define MCI_ROD (1 << 7) | 15 | #define MCI_ROD (1 << 7) |
20 | /* The ST Micro version does not have ROD */ | 16 | /* |
21 | #define MCI_FBCLKEN (1 << 7) | 17 | * The ST Micro version does not have ROD and reuse the voltage registers |
22 | #define MCI_DATA74DIREN (1 << 8) | 18 | * for direction settings |
19 | */ | ||
20 | #define MCI_ST_DATA2DIREN (1 << 2) | ||
21 | #define MCI_ST_CMDDIREN (1 << 3) | ||
22 | #define MCI_ST_DATA0DIREN (1 << 4) | ||
23 | #define MCI_ST_DATA31DIREN (1 << 5) | ||
24 | #define MCI_ST_FBCLKEN (1 << 7) | ||
25 | #define MCI_ST_DATA74DIREN (1 << 8) | ||
23 | 26 | ||
24 | #define MMCICLOCK 0x004 | 27 | #define MMCICLOCK 0x004 |
25 | #define MCI_CLK_ENABLE (1 << 8) | 28 | #define MCI_CLK_ENABLE (1 << 8) |
26 | #define MCI_CLK_PWRSAVE (1 << 9) | 29 | #define MCI_CLK_PWRSAVE (1 << 9) |
27 | #define MCI_CLK_BYPASS (1 << 10) | 30 | #define MCI_CLK_BYPASS (1 << 10) |
28 | #define MCI_4BIT_BUS (1 << 11) | 31 | #define MCI_4BIT_BUS (1 << 11) |
29 | /* 8bit wide buses supported in ST Micro versions */ | 32 | /* |
33 | * 8bit wide buses, hardware flow contronl, negative edges and clock inversion | ||
34 | * supported in ST Micro U300 and Ux500 versions | ||
35 | */ | ||
30 | #define MCI_ST_8BIT_BUS (1 << 12) | 36 | #define MCI_ST_8BIT_BUS (1 << 12) |
37 | #define MCI_ST_U300_HWFCEN (1 << 13) | ||
38 | #define MCI_ST_UX500_NEG_EDGE (1 << 13) | ||
39 | #define MCI_ST_UX500_HWFCEN (1 << 14) | ||
40 | #define MCI_ST_UX500_CLK_INV (1 << 15) | ||
31 | 41 | ||
32 | #define MMCIARGUMENT 0x008 | 42 | #define MMCIARGUMENT 0x008 |
33 | #define MMCICOMMAND 0x00c | 43 | #define MMCICOMMAND 0x00c |
@@ -88,8 +98,9 @@ | |||
88 | #define MCI_RXFIFOEMPTY (1 << 19) | 98 | #define MCI_RXFIFOEMPTY (1 << 19) |
89 | #define MCI_TXDATAAVLBL (1 << 20) | 99 | #define MCI_TXDATAAVLBL (1 << 20) |
90 | #define MCI_RXDATAAVLBL (1 << 21) | 100 | #define MCI_RXDATAAVLBL (1 << 21) |
91 | #define MCI_SDIOIT (1 << 22) | 101 | /* Extended status bits for the ST Micro variants */ |
92 | #define MCI_CEATAEND (1 << 23) | 102 | #define MCI_ST_SDIOIT (1 << 22) |
103 | #define MCI_ST_CEATAEND (1 << 23) | ||
93 | 104 | ||
94 | #define MMCICLEAR 0x038 | 105 | #define MMCICLEAR 0x038 |
95 | #define MCI_CMDCRCFAILCLR (1 << 0) | 106 | #define MCI_CMDCRCFAILCLR (1 << 0) |
@@ -102,8 +113,9 @@ | |||
102 | #define MCI_CMDSENTCLR (1 << 7) | 113 | #define MCI_CMDSENTCLR (1 << 7) |
103 | #define MCI_DATAENDCLR (1 << 8) | 114 | #define MCI_DATAENDCLR (1 << 8) |
104 | #define MCI_DATABLOCKENDCLR (1 << 10) | 115 | #define MCI_DATABLOCKENDCLR (1 << 10) |
105 | #define MCI_SDIOITC (1 << 22) | 116 | /* Extended status bits for the ST Micro variants */ |
106 | #define MCI_CEATAENDC (1 << 23) | 117 | #define MCI_ST_SDIOITC (1 << 22) |
118 | #define MCI_ST_CEATAENDC (1 << 23) | ||
107 | 119 | ||
108 | #define MMCIMASK0 0x03c | 120 | #define MMCIMASK0 0x03c |
109 | #define MCI_CMDCRCFAILMASK (1 << 0) | 121 | #define MCI_CMDCRCFAILMASK (1 << 0) |
@@ -127,8 +139,9 @@ | |||
127 | #define MCI_RXFIFOEMPTYMASK (1 << 19) | 139 | #define MCI_RXFIFOEMPTYMASK (1 << 19) |
128 | #define MCI_TXDATAAVLBLMASK (1 << 20) | 140 | #define MCI_TXDATAAVLBLMASK (1 << 20) |
129 | #define MCI_RXDATAAVLBLMASK (1 << 21) | 141 | #define MCI_RXDATAAVLBLMASK (1 << 21) |
130 | #define MCI_SDIOITMASK (1 << 22) | 142 | /* Extended status bits for the ST Micro variants */ |
131 | #define MCI_CEATAENDMASK (1 << 23) | 143 | #define MCI_ST_SDIOITMASK (1 << 22) |
144 | #define MCI_ST_CEATAENDMASK (1 << 23) | ||
132 | 145 | ||
133 | #define MMCIMASK1 0x040 | 146 | #define MMCIMASK1 0x040 |
134 | #define MMCIFIFOCNT 0x048 | 147 | #define MMCIFIFOCNT 0x048 |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 4d608014753a..110821cb6ea5 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -395,6 +395,7 @@ typedef struct elf64_shdr { | |||
395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ | 395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ |
396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ | 396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ |
397 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ | 397 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ |
398 | #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ | ||
398 | 399 | ||
399 | 400 | ||
400 | /* Note header in a PT_NOTE section */ | 401 | /* Note header in a PT_NOTE section */ |