aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/configs/am200epdkit_defconfig22
-rw-r--r--arch/arm/kernel/kprobes-decode.c2
-rw-r--r--arch/arm/kernel/kprobes.c2
-rw-r--r--arch/arm/mach-orion5x/addr-map.c4
-rw-r--r--arch/arm/mach-orion5x/common.c6
-rw-r--r--arch/arm/mach-orion5x/common.h3
-rw-r--r--arch/arm/mach-orion5x/db88f5281-setup.c11
-rw-r--r--arch/arm/mach-orion5x/dns323-setup.c17
-rw-r--r--arch/arm/mach-orion5x/kurobox_pro-setup.c16
-rw-r--r--arch/arm/mach-orion5x/pci.c20
-rw-r--r--arch/arm/mach-orion5x/rd88f5182-setup.c11
-rw-r--r--arch/arm/mach-orion5x/ts209-setup.c13
-rw-r--r--arch/arm/mach-pxa/Makefile6
-rw-r--r--arch/arm/mach-pxa/gumstix.c1
-rw-r--r--arch/arm/mach-pxa/magician.c61
-rw-r--r--arch/arm/mach-pxa/pm.c4
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c2
-rw-r--r--arch/arm/mm/Kconfig2
-rw-r--r--arch/arm/mm/proc-feroceon.S43
-rw-r--r--drivers/mfd/htc-pasic3.c9
-rw-r--r--include/asm-arm/arch-orion5x/io.h9
-rw-r--r--include/asm-arm/arch-pxa/irqs.h5
-rw-r--r--include/asm-arm/arch-pxa/magician.h49
-rw-r--r--include/asm-arm/arch-pxa/system.h2
24 files changed, 153 insertions, 167 deletions
diff --git a/arch/arm/configs/am200epdkit_defconfig b/arch/arm/configs/am200epdkit_defconfig
index dc030cfe5009..5e68420f4680 100644
--- a/arch/arm/configs/am200epdkit_defconfig
+++ b/arch/arm/configs/am200epdkit_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc3 3# Linux kernel version: 2.6.25
4# Sun Mar 9 06:33:33 2008 4# Sun Apr 20 00:29:49 2008
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -51,7 +51,8 @@ CONFIG_FAIR_GROUP_SCHED=y
51# CONFIG_RT_GROUP_SCHED is not set 51# CONFIG_RT_GROUP_SCHED is not set
52CONFIG_USER_SCHED=y 52CONFIG_USER_SCHED=y
53# CONFIG_CGROUP_SCHED is not set 53# CONFIG_CGROUP_SCHED is not set
54# CONFIG_SYSFS_DEPRECATED is not set 54CONFIG_SYSFS_DEPRECATED=y
55CONFIG_SYSFS_DEPRECATED_V2=y
55# CONFIG_RELAY is not set 56# CONFIG_RELAY is not set
56# CONFIG_NAMESPACES is not set 57# CONFIG_NAMESPACES is not set
57# CONFIG_BLK_DEV_INITRD is not set 58# CONFIG_BLK_DEV_INITRD is not set
@@ -85,6 +86,7 @@ CONFIG_SLAB=y
85CONFIG_HAVE_OPROFILE=y 86CONFIG_HAVE_OPROFILE=y
86# CONFIG_KPROBES is not set 87# CONFIG_KPROBES is not set
87CONFIG_HAVE_KPROBES=y 88CONFIG_HAVE_KPROBES=y
89CONFIG_HAVE_KRETPROBES=y
88CONFIG_PROC_PAGE_MONITOR=y 90CONFIG_PROC_PAGE_MONITOR=y
89CONFIG_SLABINFO=y 91CONFIG_SLABINFO=y
90CONFIG_RT_MUTEXES=y 92CONFIG_RT_MUTEXES=y
@@ -115,7 +117,6 @@ CONFIG_IOSCHED_NOOP=y
115CONFIG_DEFAULT_NOOP=y 117CONFIG_DEFAULT_NOOP=y
116CONFIG_DEFAULT_IOSCHED="noop" 118CONFIG_DEFAULT_IOSCHED="noop"
117CONFIG_CLASSIC_RCU=y 119CONFIG_CLASSIC_RCU=y
118# CONFIG_PREEMPT_RCU is not set
119 120
120# 121#
121# System Type 122# System Type
@@ -320,8 +321,6 @@ CONFIG_TCP_CONG_CUBIC=y
320CONFIG_DEFAULT_TCP_CONG="cubic" 321CONFIG_DEFAULT_TCP_CONG="cubic"
321# CONFIG_TCP_MD5SIG is not set 322# CONFIG_TCP_MD5SIG is not set
322# CONFIG_IPV6 is not set 323# CONFIG_IPV6 is not set
323# CONFIG_INET6_XFRM_TUNNEL is not set
324# CONFIG_INET6_TUNNEL is not set
325# CONFIG_NETWORK_SECMARK is not set 324# CONFIG_NETWORK_SECMARK is not set
326# CONFIG_NETFILTER is not set 325# CONFIG_NETFILTER is not set
327# CONFIG_IP_DCCP is not set 326# CONFIG_IP_DCCP is not set
@@ -383,7 +382,6 @@ CONFIG_IEEE80211=m
383CONFIG_IEEE80211_CRYPT_WEP=m 382CONFIG_IEEE80211_CRYPT_WEP=m
384# CONFIG_IEEE80211_CRYPT_CCMP is not set 383# CONFIG_IEEE80211_CRYPT_CCMP is not set
385# CONFIG_IEEE80211_CRYPT_TKIP is not set 384# CONFIG_IEEE80211_CRYPT_TKIP is not set
386# CONFIG_IEEE80211_SOFTMAC is not set
387# CONFIG_RFKILL is not set 385# CONFIG_RFKILL is not set
388# CONFIG_NET_9P is not set 386# CONFIG_NET_9P is not set
389 387
@@ -503,7 +501,7 @@ CONFIG_IDE_MAX_HWIFS=2
503CONFIG_BLK_DEV_IDE=m 501CONFIG_BLK_DEV_IDE=m
504 502
505# 503#
506# Please see Documentation/ide.txt for help/info on IDE drives 504# Please see Documentation/ide/ide.txt for help/info on IDE drives
507# 505#
508# CONFIG_BLK_DEV_IDE_SATA is not set 506# CONFIG_BLK_DEV_IDE_SATA is not set
509CONFIG_BLK_DEV_IDEDISK=m 507CONFIG_BLK_DEV_IDEDISK=m
@@ -518,10 +516,9 @@ CONFIG_IDE_PROC_FS=y
518# 516#
519# IDE chipset support/bugfixes 517# IDE chipset support/bugfixes
520# 518#
521CONFIG_IDE_GENERIC=m
522# CONFIG_BLK_DEV_PLATFORM is not set 519# CONFIG_BLK_DEV_PLATFORM is not set
523# CONFIG_BLK_DEV_IDEDMA is not set 520# CONFIG_BLK_DEV_IDEDMA is not set
524CONFIG_IDE_ARCH_OBSOLETE_INIT=y 521# CONFIG_BLK_DEV_HD_ONLY is not set
525# CONFIG_BLK_DEV_HD is not set 522# CONFIG_BLK_DEV_HD is not set
526 523
527# 524#
@@ -562,6 +559,7 @@ CONFIG_NETDEV_10000=y
562# 559#
563# CONFIG_WLAN_PRE80211 is not set 560# CONFIG_WLAN_PRE80211 is not set
564# CONFIG_WLAN_80211 is not set 561# CONFIG_WLAN_80211 is not set
562# CONFIG_IWLWIFI_LEDS is not set
565# CONFIG_NET_PCMCIA is not set 563# CONFIG_NET_PCMCIA is not set
566# CONFIG_WAN is not set 564# CONFIG_WAN is not set
567# CONFIG_PPP is not set 565# CONFIG_PPP is not set
@@ -707,6 +705,8 @@ CONFIG_SSB_POSSIBLE=y
707# 705#
708# CONFIG_MFD_SM501 is not set 706# CONFIG_MFD_SM501 is not set
709# CONFIG_MFD_ASIC3 is not set 707# CONFIG_MFD_ASIC3 is not set
708# CONFIG_HTC_EGPIO is not set
709# CONFIG_HTC_PASIC3 is not set
710 710
711# 711#
712# Multimedia devices 712# Multimedia devices
@@ -745,6 +745,7 @@ CONFIG_FB_TILEBLITTING=y
745CONFIG_FB_PXA=y 745CONFIG_FB_PXA=y
746CONFIG_FB_PXA_PARAMETERS=y 746CONFIG_FB_PXA_PARAMETERS=y
747CONFIG_FB_MBX=m 747CONFIG_FB_MBX=m
748# CONFIG_FB_METRONOME is not set
748CONFIG_FB_VIRTUAL=m 749CONFIG_FB_VIRTUAL=m
749# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 750# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
750 751
@@ -891,7 +892,6 @@ CONFIG_RTC_LIB=y
891# CONFIG_JFS_FS is not set 892# CONFIG_JFS_FS is not set
892# CONFIG_FS_POSIX_ACL is not set 893# CONFIG_FS_POSIX_ACL is not set
893# CONFIG_XFS_FS is not set 894# CONFIG_XFS_FS is not set
894# CONFIG_GFS2_FS is not set
895# CONFIG_OCFS2_FS is not set 895# CONFIG_OCFS2_FS is not set
896# CONFIG_DNOTIFY is not set 896# CONFIG_DNOTIFY is not set
897CONFIG_INOTIFY=y 897CONFIG_INOTIFY=y
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c
index d51bc8b60557..b4565bb133c1 100644
--- a/arch/arm/kernel/kprobes-decode.c
+++ b/arch/arm/kernel/kprobes-decode.c
@@ -1176,7 +1176,7 @@ space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
1176 * *S (bit 20) updates condition codes 1176 * *S (bit 20) updates condition codes
1177 * ADC/SBC/RSC reads the C flag 1177 * ADC/SBC/RSC reads the C flag
1178 */ 1178 */
1179 insn &= 0xfff00ff0; /* Rn = r0, Rd = r0 */ 1179 insn &= 0xfff00fff; /* Rn = r0, Rd = r0 */
1180 asi->insn[0] = insn; 1180 asi->insn[0] = insn;
1181 asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ 1181 asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */
1182 emulate_alu_imm_rwflags : emulate_alu_imm_rflags; 1182 emulate_alu_imm_rwflags : emulate_alu_imm_rflags;
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
index 13e371aad879..5593dd207216 100644
--- a/arch/arm/kernel/kprobes.c
+++ b/arch/arm/kernel/kprobes.c
@@ -66,7 +66,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
66 return -ENOMEM; 66 return -ENOMEM;
67 for (is = 0; is < MAX_INSN_SIZE; ++is) 67 for (is = 0; is < MAX_INSN_SIZE; ++is)
68 p->ainsn.insn[is] = tmp_insn[is]; 68 p->ainsn.insn[is] = tmp_insn[is];
69 flush_insns(&p->ainsn.insn, MAX_INSN_SIZE); 69 flush_insns(p->ainsn.insn, MAX_INSN_SIZE);
70 break; 70 break;
71 71
72 case INSN_GOOD_NO_SLOT: /* instruction doesn't need insn slot */ 72 case INSN_GOOD_NO_SLOT: /* instruction doesn't need insn slot */
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c
index 6b179371e0a2..9608503d67f5 100644
--- a/arch/arm/mach-orion5x/addr-map.c
+++ b/arch/arm/mach-orion5x/addr-map.c
@@ -19,14 +19,14 @@
19 19
20/* 20/*
21 * The Orion has fully programable address map. There's a separate address 21 * The Orion has fully programable address map. There's a separate address
22 * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIE, USB, 22 * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIe, USB,
23 * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own 23 * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own
24 * address decode windows that allow it to access any of the Orion resources. 24 * address decode windows that allow it to access any of the Orion resources.
25 * 25 *
26 * CPU address decoding -- 26 * CPU address decoding --
27 * Linux assumes that it is the boot loader that already setup the access to 27 * Linux assumes that it is the boot loader that already setup the access to
28 * DDR and internal registers. 28 * DDR and internal registers.
29 * Setup access to PCI and PCI-E IO/MEM space is issued by this file. 29 * Setup access to PCI and PCIe IO/MEM space is issued by this file.
30 * Setup access to various devices located on the device bus interface (e.g. 30 * Setup access to various devices located on the device bus interface (e.g.
31 * flashes, RTC, etc) should be issued by machine-setup.c according to 31 * flashes, RTC, etc) should be issued by machine-setup.c according to
32 * specific board population (by using orion5x_setup_*_win()). 32 * specific board population (by using orion5x_setup_*_win()).
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 439c7784af02..968deb58be01 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -132,7 +132,7 @@ static struct platform_device orion5x_uart = {
132static struct resource orion5x_ehci0_resources[] = { 132static struct resource orion5x_ehci0_resources[] = {
133 { 133 {
134 .start = ORION5X_USB0_PHYS_BASE, 134 .start = ORION5X_USB0_PHYS_BASE,
135 .end = ORION5X_USB0_PHYS_BASE + SZ_4K, 135 .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1,
136 .flags = IORESOURCE_MEM, 136 .flags = IORESOURCE_MEM,
137 }, 137 },
138 { 138 {
@@ -145,7 +145,7 @@ static struct resource orion5x_ehci0_resources[] = {
145static struct resource orion5x_ehci1_resources[] = { 145static struct resource orion5x_ehci1_resources[] = {
146 { 146 {
147 .start = ORION5X_USB1_PHYS_BASE, 147 .start = ORION5X_USB1_PHYS_BASE,
148 .end = ORION5X_USB1_PHYS_BASE + SZ_4K, 148 .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
149 .flags = IORESOURCE_MEM, 149 .flags = IORESOURCE_MEM,
150 }, 150 },
151 { 151 {
@@ -317,7 +317,7 @@ struct sys_timer orion5x_timer = {
317 ****************************************************************************/ 317 ****************************************************************************/
318 318
319/* 319/*
320 * Identify device ID and rev from PCIE configuration header space '0'. 320 * Identify device ID and rev from PCIe configuration header space '0'.
321 */ 321 */
322static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) 322static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name)
323{ 323{
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index f4c4c9a72a7c..14adf8d1a54a 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -33,10 +33,9 @@ struct pci_sys_data;
33struct pci_bus; 33struct pci_bus;
34 34
35void orion5x_pcie_id(u32 *dev, u32 *rev); 35void orion5x_pcie_id(u32 *dev, u32 *rev);
36int orion5x_pcie_local_bus_nr(void);
37int orion5x_pci_local_bus_nr(void);
38int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); 36int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
39struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); 37struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
38int orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin);
40 39
41/* 40/*
42 * Valid GPIO pins according to MPP setup, used by machine-setup. 41 * Valid GPIO pins according to MPP setup, used by machine-setup.
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
index 872aed372327..83e9ad4cf190 100644
--- a/arch/arm/mach-orion5x/db88f5281-setup.c
+++ b/arch/arm/mach-orion5x/db88f5281-setup.c
@@ -241,14 +241,17 @@ void __init db88f5281_pci_preinit(void)
241 241
242static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 242static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
243{ 243{
244 int irq;
245
244 /* 246 /*
245 * PCIE IRQ is connected internally (not GPIO) 247 * Check for devices with hard-wired IRQs.
246 */ 248 */
247 if (dev->bus->number == orion5x_pcie_local_bus_nr()) 249 irq = orion5x_pci_map_irq(dev, slot, pin);
248 return IRQ_ORION5X_PCIE0_INT; 250 if (irq != -1)
251 return irq;
249 252
250 /* 253 /*
251 * PCI IRQs are connected via GPIOs 254 * PCI IRQs are connected via GPIOs.
252 */ 255 */
253 switch (slot - DB88F5281_PCI_SLOT0_OFFS) { 256 switch (slot - DB88F5281_PCI_SLOT0_OFFS) {
254 case 0: 257 case 0:
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index d67790ef236e..5bc064b8bb44 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -43,11 +43,16 @@
43 43
44static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 44static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
45{ 45{
46 /* PCI-E */ 46 int irq;
47 if (dev->bus->number == orion5x_pcie_local_bus_nr())
48 return IRQ_ORION5X_PCIE0_INT;
49 47
50 pr_err("%s: requested mapping for unknown bus\n", __func__); 48 /*
49 * Check for devices with hard-wired IRQs.
50 */
51 irq = orion5x_pci_map_irq(dev, slot, pin);
52 if (irq != -1)
53 return irq;
54
55 pr_err("%s: requested mapping for unknown device\n", __func__);
51 56
52 return -1; 57 return -1;
53} 58}
@@ -253,9 +258,9 @@ static void __init dns323_init(void)
253 */ 258 */
254 orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE); 259 orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE);
255 260
256 /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIE 261 /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIe
257 * 262 *
258 * Open a special address decode windows for the PCIE WA. 263 * Open a special address decode windows for the PCIe WA.
259 */ 264 */
260 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, 265 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
261 ORION5X_PCIE_WA_SIZE); 266 ORION5X_PCIE_WA_SIZE);
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c
index 91413455beba..36760c6e54c0 100644
--- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
+++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
@@ -120,13 +120,19 @@ static struct platform_device kurobox_pro_nor_flash = {
120 120
121static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 121static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
122{ 122{
123 int irq;
124
125 /*
126 * Check for devices with hard-wired IRQs.
127 */
128 irq = orion5x_pci_map_irq(dev, slot, pin);
129 if (irq != -1)
130 return irq;
131
123 /* 132 /*
124 * PCI isn't used on the Kuro 133 * PCI isn't used on the Kuro
125 */ 134 */
126 if (dev->bus->number == orion5x_pcie_local_bus_nr()) 135 printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n");
127 return IRQ_ORION5X_PCIE0_INT;
128 else
129 printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n");
130 136
131 return -1; 137 return -1;
132} 138}
@@ -193,7 +199,7 @@ static void __init kurobox_pro_init(void)
193 orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE); 199 orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE);
194 200
195 /* 201 /*
196 * Open a special address decode windows for the PCIE WA. 202 * Open a special address decode windows for the PCIe WA.
197 */ 203 */
198 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, 204 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
199 ORION5X_PCIE_WA_SIZE); 205 ORION5X_PCIE_WA_SIZE);
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index fdf99fca85b3..9d5d39fa19c3 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -41,11 +41,6 @@ void __init orion5x_pcie_id(u32 *dev, u32 *rev)
41 *rev = orion_pcie_rev(PCIE_BASE); 41 *rev = orion_pcie_rev(PCIE_BASE);
42} 42}
43 43
44int __init orion5x_pcie_local_bus_nr(void)
45{
46 return orion_pcie_get_local_bus_nr(PCIE_BASE);
47}
48
49static int pcie_valid_config(int bus, int dev) 44static int pcie_valid_config(int bus, int dev)
50{ 45{
51 /* 46 /*
@@ -269,7 +264,7 @@ static int __init pcie_setup(struct pci_sys_data *sys)
269 */ 264 */
270static DEFINE_SPINLOCK(orion5x_pci_lock); 265static DEFINE_SPINLOCK(orion5x_pci_lock);
271 266
272int orion5x_pci_local_bus_nr(void) 267static int orion5x_pci_local_bus_nr(void)
273{ 268{
274 u32 conf = orion5x_read(PCI_P2P_CONF); 269 u32 conf = orion5x_read(PCI_P2P_CONF);
275 return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS); 270 return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS);
@@ -557,3 +552,16 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys
557 552
558 return bus; 553 return bus;
559} 554}
555
556int __init orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
557{
558 int bus = dev->bus->number;
559
560 /*
561 * PCIe endpoint?
562 */
563 if (bus < orion5x_pci_local_bus_nr())
564 return IRQ_ORION5X_PCIE0_INT;
565
566 return -1;
567}
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index 37e8b2dc3ed5..aebe6b8e5059 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -172,11 +172,14 @@ void __init rd88f5182_pci_preinit(void)
172 172
173static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 173static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
174{ 174{
175 int irq;
176
175 /* 177 /*
176 * PCI-E isn't used on the RD2 178 * Check for devices with hard-wired IRQs.
177 */ 179 */
178 if (dev->bus->number == orion5x_pcie_local_bus_nr()) 180 irq = orion5x_pci_map_irq(dev, slot, pin);
179 return IRQ_ORION5X_PCIE0_INT; 181 if (irq != -1)
182 return irq;
180 183
181 /* 184 /*
182 * PCI IRQs are connected via GPIOs 185 * PCI IRQs are connected via GPIOs
@@ -259,7 +262,7 @@ static void __init rd88f5182_init(void)
259 orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE); 262 orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
260 263
261 /* 264 /*
262 * Open a special address decode windows for the PCIE WA. 265 * Open a special address decode windows for the PCIe WA.
263 */ 266 */
264 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, 267 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
265 ORION5X_PCIE_WA_SIZE); 268 ORION5X_PCIE_WA_SIZE);
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c
index fd43863a86f6..161c965f3906 100644
--- a/arch/arm/mach-orion5x/ts209-setup.c
+++ b/arch/arm/mach-orion5x/ts209-setup.c
@@ -141,14 +141,17 @@ void __init qnap_ts209_pci_preinit(void)
141 141
142static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 142static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
143{ 143{
144 int irq;
145
144 /* 146 /*
145 * PCIE IRQ is connected internally (not GPIO) 147 * Check for devices with hard-wired IRQs.
146 */ 148 */
147 if (dev->bus->number == orion5x_pcie_local_bus_nr()) 149 irq = orion5x_pci_map_irq(dev, slot, pin);
148 return IRQ_ORION5X_PCIE0_INT; 150 if (irq != -1)
151 return irq;
149 152
150 /* 153 /*
151 * PCI IRQs are connected via GPIOs 154 * PCI IRQs are connected via GPIOs.
152 */ 155 */
153 switch (slot - QNAP_TS209_PCI_SLOT0_OFFS) { 156 switch (slot - QNAP_TS209_PCI_SLOT0_OFFS) {
154 case 0: 157 case 0:
@@ -373,7 +376,7 @@ static void __init qnap_ts209_init(void)
373 QNAP_TS209_NOR_BOOT_SIZE); 376 QNAP_TS209_NOR_BOOT_SIZE);
374 377
375 /* 378 /*
376 * Open a special address decode windows for the PCIE WA. 379 * Open a special address decode windows for the PCIe WA.
377 */ 380 */
378 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, 381 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
379 ORION5X_PCIE_WA_SIZE); 382 ORION5X_PCIE_WA_SIZE);
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 7cdcb459ea9d..6a830853aa6a 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -5,9 +5,9 @@
5# Common support (must be linked before board specific support) 5# Common support (must be linked before board specific support)
6obj-y += clock.o devices.o generic.o irq.o dma.o \ 6obj-y += clock.o devices.o generic.o irq.o dma.o \
7 time.o gpio.o 7 time.o gpio.o
8obj-$(CONFIG_PXA25x) += pxa25x.o mfp-pxa2xx.o 8obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o pxa25x.o
9obj-$(CONFIG_PXA27x) += pxa27x.o mfp-pxa2xx.o 9obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o pxa27x.o
10obj-$(CONFIG_PXA3xx) += pxa3xx.o mfp-pxa3xx.o smemc.o 10obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o pxa3xx.o smemc.o
11obj-$(CONFIG_CPU_PXA300) += pxa300.o 11obj-$(CONFIG_CPU_PXA300) += pxa300.o
12obj-$(CONFIG_CPU_PXA320) += pxa320.o 12obj-$(CONFIG_CPU_PXA320) += pxa320.o
13 13
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
index f01d18544133..bdf239754037 100644
--- a/arch/arm/mach-pxa/gumstix.c
+++ b/arch/arm/mach-pxa/gumstix.c
@@ -40,6 +40,7 @@
40 40
41#include <asm/arch/pxa-regs.h> 41#include <asm/arch/pxa-regs.h>
42#include <asm/arch/pxa2xx-regs.h> 42#include <asm/arch/pxa2xx-regs.h>
43#include <asm/arch/pxa2xx-gpio.h>
43 44
44#include "generic.h" 45#include "generic.h"
45 46
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index d70be75bd199..badba064dc04 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -114,6 +114,14 @@ static unsigned long magician_pin_config[] = {
114 GPIO82_CIF_DD_5, 114 GPIO82_CIF_DD_5,
115 GPIO84_CIF_FV, 115 GPIO84_CIF_FV,
116 GPIO85_CIF_LV, 116 GPIO85_CIF_LV,
117
118 /* Magician specific input GPIOs */
119 GPIO9_GPIO, /* unknown */
120 GPIO10_GPIO, /* GSM_IRQ */
121 GPIO13_GPIO, /* CPLD_IRQ */
122 GPIO107_GPIO, /* DS1WM_IRQ */
123 GPIO108_GPIO, /* GSM_READY */
124 GPIO115_GPIO, /* nPEN_IRQ */
117}; 125};
118 126
119/* 127/*
@@ -438,7 +446,7 @@ static struct pasic3_led pasic3_leds[] = {
438 446
439static struct platform_device pasic3; 447static struct platform_device pasic3;
440 448
441static struct pasic3_leds_machinfo __devinit pasic3_leds_info = { 449static struct pasic3_leds_machinfo pasic3_leds_info = {
442 .num_leds = ARRAY_SIZE(pasic3_leds), 450 .num_leds = ARRAY_SIZE(pasic3_leds),
443 .power_gpio = EGPIO_MAGICIAN_LED_POWER, 451 .power_gpio = EGPIO_MAGICIAN_LED_POWER,
444 .leds = pasic3_leds, 452 .leds = pasic3_leds,
@@ -543,9 +551,28 @@ static struct platform_device power_supply = {
543static int magician_mci_init(struct device *dev, 551static int magician_mci_init(struct device *dev,
544 irq_handler_t detect_irq, void *data) 552 irq_handler_t detect_irq, void *data)
545{ 553{
546 return request_irq(IRQ_MAGICIAN_SD, detect_irq, 554 int err;
555
556 err = request_irq(IRQ_MAGICIAN_SD, detect_irq,
547 IRQF_DISABLED | IRQF_SAMPLE_RANDOM, 557 IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
548 "MMC card detect", data); 558 "MMC card detect", data);
559 if (err)
560 goto err_request_irq;
561 err = gpio_request(EGPIO_MAGICIAN_SD_POWER, "SD_POWER");
562 if (err)
563 goto err_request_power;
564 err = gpio_request(EGPIO_MAGICIAN_nSD_READONLY, "nSD_READONLY");
565 if (err)
566 goto err_request_readonly;
567
568 return 0;
569
570err_request_readonly:
571 gpio_free(EGPIO_MAGICIAN_SD_POWER);
572err_request_power:
573 free_irq(IRQ_MAGICIAN_SD, data);
574err_request_irq:
575 return err;
549} 576}
550 577
551static void magician_mci_setpower(struct device *dev, unsigned int vdd) 578static void magician_mci_setpower(struct device *dev, unsigned int vdd)
@@ -562,6 +589,8 @@ static int magician_mci_get_ro(struct device *dev)
562 589
563static void magician_mci_exit(struct device *dev, void *data) 590static void magician_mci_exit(struct device *dev, void *data)
564{ 591{
592 gpio_free(EGPIO_MAGICIAN_nSD_READONLY);
593 gpio_free(EGPIO_MAGICIAN_SD_POWER);
565 free_irq(IRQ_MAGICIAN_SD, data); 594 free_irq(IRQ_MAGICIAN_SD, data);
566} 595}
567 596
@@ -643,28 +672,42 @@ static void __init magician_init(void)
643{ 672{
644 void __iomem *cpld; 673 void __iomem *cpld;
645 int lcd_select; 674 int lcd_select;
675 int err;
676
677 gpio_request(GPIO13_MAGICIAN_CPLD_IRQ, "CPLD_IRQ");
678 gpio_request(GPIO107_MAGICIAN_DS1WM_IRQ, "DS1WM_IRQ");
646 679
647 pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config)); 680 pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config));
648 681
649 platform_add_devices(devices, ARRAY_SIZE(devices)); 682 platform_add_devices(devices, ARRAY_SIZE(devices));
683
684 err = gpio_request(GPIO83_MAGICIAN_nIR_EN, "nIR_EN");
685 if (!err) {
686 gpio_direction_output(GPIO83_MAGICIAN_nIR_EN, 1);
687 pxa_set_ficp_info(&magician_ficp_info);
688 }
650 pxa_set_i2c_info(NULL); 689 pxa_set_i2c_info(NULL);
651 pxa_set_mci_info(&magician_mci_info); 690 pxa_set_mci_info(&magician_mci_info);
652 pxa_set_ohci_info(&magician_ohci_info); 691 pxa_set_ohci_info(&magician_ohci_info);
653 pxa_set_ficp_info(&magician_ficp_info);
654 692
655 /* Check LCD type we have */ 693 /* Check LCD type we have */
656 cpld = ioremap_nocache(PXA_CS3_PHYS, 0x1000); 694 cpld = ioremap_nocache(PXA_CS3_PHYS, 0x1000);
657 if (cpld) { 695 if (cpld) {
658 u8 board_id = __raw_readb(cpld+0x14); 696 u8 board_id = __raw_readb(cpld+0x14);
697 iounmap(cpld);
659 system_rev = board_id & 0x7; 698 system_rev = board_id & 0x7;
660 lcd_select = board_id & 0x8; 699 lcd_select = board_id & 0x8;
661 iounmap(cpld);
662 pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly"); 700 pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly");
663 if (lcd_select && (system_rev < 3)) 701 if (lcd_select && (system_rev < 3)) {
664 pxa_gpio_mode(GPIO75_MAGICIAN_SAMSUNG_POWER_MD); 702 gpio_request(GPIO75_MAGICIAN_SAMSUNG_POWER, "SAMSUNG_POWER");
665 pxa_gpio_mode(GPIO104_MAGICIAN_LCD_POWER_1_MD); 703 gpio_direction_output(GPIO75_MAGICIAN_SAMSUNG_POWER, 0);
666 pxa_gpio_mode(GPIO105_MAGICIAN_LCD_POWER_2_MD); 704 }
667 pxa_gpio_mode(GPIO106_MAGICIAN_LCD_POWER_3_MD); 705 gpio_request(GPIO104_MAGICIAN_LCD_POWER_1, "LCD_POWER_1");
706 gpio_request(GPIO105_MAGICIAN_LCD_POWER_2, "LCD_POWER_2");
707 gpio_request(GPIO106_MAGICIAN_LCD_POWER_3, "LCD_POWER_3");
708 gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0);
709 gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0);
710 gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0);
668 set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info); 711 set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info);
669 } else 712 } else
670 pr_err("LCD detection: CPLD mapping failed\n"); 713 pr_err("LCD detection: CPLD mapping failed\n");
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 039194cbe477..ec1bbf333a3a 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -46,8 +46,8 @@ int pxa_pm_enter(suspend_state_t state)
46 sleep_save_checksum += sleep_save[i]; 46 sleep_save_checksum += sleep_save[i];
47 } 47 }
48 48
49 /* Clear sleep reset status */ 49 /* Clear reset status */
50 RCSR = RCSR_SMR; 50 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
51 51
52 /* *** go zzz *** */ 52 /* *** go zzz *** */
53 pxa_cpu_pm_fns->enter(state); 53 pxa_cpu_pm_fns->enter(state);
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index dde355e88fa1..b6a6f5fcc77a 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -486,6 +486,8 @@ static int pxa3xx_set_wake(unsigned int irq, unsigned int on)
486 case IRQ_MMC3: 486 case IRQ_MMC3:
487 mask = ADXER_MFP_GEN12; 487 mask = ADXER_MFP_GEN12;
488 break; 488 break;
489 default:
490 return -EINVAL;
489 } 491 }
490 492
491 local_irq_save(flags); 493 local_irq_save(flags);
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 1b8229d9c9d5..a92a577c1b65 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -658,7 +658,7 @@ config CPU_DCACHE_SIZE
658 658
659config CPU_DCACHE_WRITETHROUGH 659config CPU_DCACHE_WRITETHROUGH
660 bool "Force write through D-cache" 660 bool "Force write through D-cache"
661 depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_FEROCEON) && !CPU_DCACHE_DISABLE 661 depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020) && !CPU_DCACHE_DISABLE
662 default y if CPU_ARM925T 662 default y if CPU_ARM925T
663 help 663 help
664 Say Y here to use the data cache in writethrough mode. Unless you 664 Say Y here to use the data cache in writethrough mode. Unless you
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S
index 90e7594e29b1..3ceb6785a345 100644
--- a/arch/arm/mm/proc-feroceon.S
+++ b/arch/arm/mm/proc-feroceon.S
@@ -118,12 +118,8 @@ ENTRY(feroceon_flush_kern_cache_all)
118 mov r2, #VM_EXEC 118 mov r2, #VM_EXEC
119 mov ip, #0 119 mov ip, #0
120__flush_whole_cache: 120__flush_whole_cache:
121#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
122 mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
123#else
1241: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate 1211: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
125 bne 1b 122 bne 1b
126#endif
127 tst r2, #VM_EXEC 123 tst r2, #VM_EXEC
128 mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache 124 mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache
129 mcrne p15, 0, ip, c7, c10, 4 @ drain WB 125 mcrne p15, 0, ip, c7, c10, 4 @ drain WB
@@ -145,21 +141,12 @@ ENTRY(feroceon_flush_user_cache_range)
145 cmp r3, #CACHE_DLIMIT 141 cmp r3, #CACHE_DLIMIT
146 bgt __flush_whole_cache 142 bgt __flush_whole_cache
1471: tst r2, #VM_EXEC 1431: tst r2, #VM_EXEC
148#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
149 mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
150 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
151 add r0, r0, #CACHE_DLINESIZE
152 mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
153 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
154 add r0, r0, #CACHE_DLINESIZE
155#else
156 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry 144 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry
157 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry 145 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
158 add r0, r0, #CACHE_DLINESIZE 146 add r0, r0, #CACHE_DLINESIZE
159 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry 147 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry
160 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry 148 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
161 add r0, r0, #CACHE_DLINESIZE 149 add r0, r0, #CACHE_DLINESIZE
162#endif
163 cmp r0, r1 150 cmp r0, r1
164 blo 1b 151 blo 1b
165 tst r2, #VM_EXEC 152 tst r2, #VM_EXEC
@@ -232,12 +219,10 @@ ENTRY(feroceon_flush_kern_dcache_page)
232 * (same as v4wb) 219 * (same as v4wb)
233 */ 220 */
234ENTRY(feroceon_dma_inv_range) 221ENTRY(feroceon_dma_inv_range)
235#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
236 tst r0, #CACHE_DLINESIZE - 1 222 tst r0, #CACHE_DLINESIZE - 1
237 mcrne p15, 0, r0, c7, c10, 1 @ clean D entry 223 mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
238 tst r1, #CACHE_DLINESIZE - 1 224 tst r1, #CACHE_DLINESIZE - 1
239 mcrne p15, 0, r1, c7, c10, 1 @ clean D entry 225 mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
240#endif
241 bic r0, r0, #CACHE_DLINESIZE - 1 226 bic r0, r0, #CACHE_DLINESIZE - 1
2421: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry 2271: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
243 add r0, r0, #CACHE_DLINESIZE 228 add r0, r0, #CACHE_DLINESIZE
@@ -257,13 +242,11 @@ ENTRY(feroceon_dma_inv_range)
257 * (same as v4wb) 242 * (same as v4wb)
258 */ 243 */
259ENTRY(feroceon_dma_clean_range) 244ENTRY(feroceon_dma_clean_range)
260#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
261 bic r0, r0, #CACHE_DLINESIZE - 1 245 bic r0, r0, #CACHE_DLINESIZE - 1
2621: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 2461: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
263 add r0, r0, #CACHE_DLINESIZE 247 add r0, r0, #CACHE_DLINESIZE
264 cmp r0, r1 248 cmp r0, r1
265 blo 1b 249 blo 1b
266#endif
267 mcr p15, 0, r0, c7, c10, 4 @ drain WB 250 mcr p15, 0, r0, c7, c10, 4 @ drain WB
268 mov pc, lr 251 mov pc, lr
269 252
@@ -278,11 +261,7 @@ ENTRY(feroceon_dma_clean_range)
278ENTRY(feroceon_dma_flush_range) 261ENTRY(feroceon_dma_flush_range)
279 bic r0, r0, #CACHE_DLINESIZE - 1 262 bic r0, r0, #CACHE_DLINESIZE - 1
2801: 2631:
281#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
282 mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 264 mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
283#else
284 mcr p15, 0, r0, c7, c10, 1 @ clean D entry
285#endif
286 add r0, r0, #CACHE_DLINESIZE 265 add r0, r0, #CACHE_DLINESIZE
287 cmp r0, r1 266 cmp r0, r1
288 blo 1b 267 blo 1b
@@ -301,12 +280,10 @@ ENTRY(feroceon_cache_fns)
301 .long feroceon_dma_flush_range 280 .long feroceon_dma_flush_range
302 281
303ENTRY(cpu_feroceon_dcache_clean_area) 282ENTRY(cpu_feroceon_dcache_clean_area)
304#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
3051: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 2831: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
306 add r0, r0, #CACHE_DLINESIZE 284 add r0, r0, #CACHE_DLINESIZE
307 subs r1, r1, #CACHE_DLINESIZE 285 subs r1, r1, #CACHE_DLINESIZE
308 bhi 1b 286 bhi 1b
309#endif
310 mcr p15, 0, r0, c7, c10, 4 @ drain WB 287 mcr p15, 0, r0, c7, c10, 4 @ drain WB
311 mov pc, lr 288 mov pc, lr
312 289
@@ -323,13 +300,9 @@ ENTRY(cpu_feroceon_dcache_clean_area)
323ENTRY(cpu_feroceon_switch_mm) 300ENTRY(cpu_feroceon_switch_mm)
324#ifdef CONFIG_MMU 301#ifdef CONFIG_MMU
325 mov ip, #0 302 mov ip, #0
326#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
327 mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
328#else
329@ && 'Clean & Invalidate whole DCache' 303@ && 'Clean & Invalidate whole DCache'
3301: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate 3041: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
331 bne 1b 305 bne 1b
332#endif
333 mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache 306 mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache
334 mcr p15, 0, ip, c7, c10, 4 @ drain WB 307 mcr p15, 0, ip, c7, c10, 4 @ drain WB
335 mcr p15, 0, r0, c2, c0, 0 @ load page table pointer 308 mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
@@ -362,16 +335,9 @@ ENTRY(cpu_feroceon_set_pte_ext)
362 tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young? 335 tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young?
363 movne r2, #0 336 movne r2, #0
364 337
365#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
366 eor r3, r2, #0x0a @ C & small page?
367 tst r3, #0x0b
368 biceq r2, r2, #4
369#endif
370 str r2, [r0] @ hardware version 338 str r2, [r0] @ hardware version
371 mov r0, r0 339 mov r0, r0
372#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
373 mcr p15, 0, r0, c7, c10, 1 @ clean D entry 340 mcr p15, 0, r0, c7, c10, 1 @ clean D entry
374#endif
375 mcr p15, 0, r0, c7, c10, 4 @ drain WB 341 mcr p15, 0, r0, c7, c10, 4 @ drain WB
376#endif 342#endif
377 mov pc, lr 343 mov pc, lr
@@ -387,20 +353,11 @@ __feroceon_setup:
387 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 353 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
388#endif 354#endif
389 355
390
391#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
392 mov r0, #4 @ disable write-back on caches explicitly
393 mcr p15, 7, r0, c15, c0, 0
394#endif
395
396 adr r5, feroceon_crval 356 adr r5, feroceon_crval
397 ldmia r5, {r5, r6} 357 ldmia r5, {r5, r6}
398 mrc p15, 0, r0, c1, c0 @ get control register v4 358 mrc p15, 0, r0, c1, c0 @ get control register v4
399 bic r0, r0, r5 359 bic r0, r0, r5
400 orr r0, r0, r6 360 orr r0, r0, r6
401#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
402 orr r0, r0, #0x4000 @ .1.. .... .... ....
403#endif
404 mov pc, lr 361 mov pc, lr
405 .size __feroceon_setup, . - __feroceon_setup 362 .size __feroceon_setup, . - __feroceon_setup
406 363
diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c
index 4edc120a6359..633cbba072f0 100644
--- a/drivers/mfd/htc-pasic3.c
+++ b/drivers/mfd/htc-pasic3.c
@@ -132,8 +132,9 @@ static struct ds1wm_platform_data ds1wm_pdata = {
132 .disable = ds1wm_disable, 132 .disable = ds1wm_disable,
133}; 133};
134 134
135static int ds1wm_device_add(struct device *pasic3_dev, int bus_shift) 135static int ds1wm_device_add(struct platform_device *pasic3_pdev, int bus_shift)
136{ 136{
137 struct device *pasic3_dev = &pasic3_pdev->dev;
137 struct pasic3_data *asic = pasic3_dev->driver_data; 138 struct pasic3_data *asic = pasic3_dev->driver_data;
138 struct platform_device *pdev; 139 struct platform_device *pdev;
139 int ret; 140 int ret;
@@ -144,8 +145,8 @@ static int ds1wm_device_add(struct device *pasic3_dev, int bus_shift)
144 return -ENOMEM; 145 return -ENOMEM;
145 } 146 }
146 147
147 ret = platform_device_add_resources(pdev, pdev->resource, 148 ret = platform_device_add_resources(pdev, pasic3_pdev->resource,
148 pdev->num_resources); 149 pasic3_pdev->num_resources);
149 if (ret < 0) { 150 if (ret < 0) {
150 dev_dbg(pasic3_dev, "failed to add DS1WM resources\n"); 151 dev_dbg(pasic3_dev, "failed to add DS1WM resources\n");
151 goto exit_pdev_put; 152 goto exit_pdev_put;
@@ -207,7 +208,7 @@ static int __init pasic3_probe(struct platform_device *pdev)
207 return -ENOMEM; 208 return -ENOMEM;
208 } 209 }
209 210
210 ret = ds1wm_device_add(dev, asic->bus_shift); 211 ret = ds1wm_device_add(pdev, asic->bus_shift);
211 if (ret < 0) 212 if (ret < 0)
212 dev_warn(dev, "failed to register DS1WM\n"); 213 dev_warn(dev, "failed to register DS1WM\n");
213 214
diff --git a/include/asm-arm/arch-orion5x/io.h b/include/asm-arm/arch-orion5x/io.h
index 5148ab7ad1f8..50f8c8802206 100644
--- a/include/asm-arm/arch-orion5x/io.h
+++ b/include/asm-arm/arch-orion5x/io.h
@@ -20,11 +20,10 @@ static inline void __iomem *
20__arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) 20__arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
21{ 21{
22 void __iomem *retval; 22 void __iomem *retval;
23 23 unsigned long offs = paddr - ORION5X_REGS_PHYS_BASE;
24 if (mtype == MT_DEVICE && size && paddr >= ORION5X_REGS_PHYS_BASE && 24 if (mtype == MT_DEVICE && size && offs < ORION5X_REGS_SIZE &&
25 paddr + size <= ORION5X_REGS_PHYS_BASE + ORION5X_REGS_SIZE) { 25 size <= ORION5X_REGS_SIZE && offs + size <= ORION5X_REGS_SIZE) {
26 retval = (void __iomem *)ORION5X_REGS_VIRT_BASE + 26 retval = (void __iomem *)ORION5X_REGS_VIRT_BASE + offs;
27 (paddr - ORION5X_REGS_PHYS_BASE);
28 } else { 27 } else {
29 retval = __arm_ioremap(paddr, size, mtype); 28 retval = __arm_ioremap(paddr, size, mtype);
30 } 29 }
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h
index 50c77eacbd5e..b6c8fe377683 100644
--- a/include/asm-arm/arch-pxa/irqs.h
+++ b/include/asm-arm/arch-pxa/irqs.h
@@ -239,7 +239,7 @@
239/* ITE8152 irqs */ 239/* ITE8152 irqs */
240/* add IT8152 IRQs beyond BOARD_END */ 240/* add IT8152 IRQs beyond BOARD_END */
241#ifdef CONFIG_PCI_HOST_ITE8152 241#ifdef CONFIG_PCI_HOST_ITE8152
242#define IT8152_IRQ(x) (IRQ_GPIO(IRQ_BOARD_END) + 1 + (x)) 242#define IT8152_IRQ(x) (IRQ_BOARD_END + (x))
243 243
244/* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */ 244/* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */
245#define IT8152_LD_IRQ_COUNT 9 245#define IT8152_LD_IRQ_COUNT 9
@@ -253,6 +253,9 @@
253 253
254#define IT8152_LAST_IRQ IT8152_LD_IRQ(IT8152_LD_IRQ_COUNT - 1) 254#define IT8152_LAST_IRQ IT8152_LD_IRQ(IT8152_LD_IRQ_COUNT - 1)
255 255
256#if NR_IRQS < (IT8152_LAST_IRQ+1)
256#undef NR_IRQS 257#undef NR_IRQS
257#define NR_IRQS (IT8152_LAST_IRQ+1) 258#define NR_IRQS (IT8152_LAST_IRQ+1)
258#endif 259#endif
260
261#endif /* CONFIG_PCI_HOST_ITE8152 */
diff --git a/include/asm-arm/arch-pxa/magician.h b/include/asm-arm/arch-pxa/magician.h
index b34fd5683e2d..169b374f9921 100644
--- a/include/asm-arm/arch-pxa/magician.h
+++ b/include/asm-arm/arch-pxa/magician.h
@@ -13,7 +13,6 @@
13#define _MAGICIAN_H_ 13#define _MAGICIAN_H_
14 14
15#include <asm/arch/irqs.h> 15#include <asm/arch/irqs.h>
16#include <asm/arch/pxa2xx-gpio.h>
17 16
18/* 17/*
19 * PXA GPIOs 18 * PXA GPIOs
@@ -64,54 +63,6 @@
64#define GPIO120_MAGICIAN_UNKNOWN 120 63#define GPIO120_MAGICIAN_UNKNOWN 120
65 64
66/* 65/*
67 * PXA GPIO alternate function mode & direction
68 */
69
70#define GPIO0_MAGICIAN_KEY_POWER_MD (0 | GPIO_IN)
71#define GPIO9_MAGICIAN_UNKNOWN_MD (9 | GPIO_IN)
72#define GPIO10_MAGICIAN_GSM_IRQ_MD (10 | GPIO_IN)
73#define GPIO11_MAGICIAN_GSM_OUT1_MD (11 | GPIO_OUT)
74#define GPIO13_MAGICIAN_CPLD_IRQ_MD (13 | GPIO_IN)
75#define GPIO18_MAGICIAN_UNKNOWN_MD (18 | GPIO_OUT)
76#define GPIO22_MAGICIAN_VIBRA_EN_MD (22 | GPIO_OUT)
77#define GPIO26_MAGICIAN_GSM_POWER_MD (26 | GPIO_OUT)
78#define GPIO27_MAGICIAN_USBC_PUEN_MD (27 | GPIO_OUT)
79#define GPIO30_MAGICIAN_nCHARGE_EN_MD (30 | GPIO_OUT)
80#define GPIO37_MAGICIAN_KEY_HANGUP_MD (37 | GPIO_OUT)
81#define GPIO38_MAGICIAN_KEY_CONTACTS_MD (38 | GPIO_OUT)
82#define GPIO40_MAGICIAN_GSM_OUT2_MD (40 | GPIO_OUT)
83#define GPIO48_MAGICIAN_UNKNOWN_MD (48 | GPIO_OUT)
84#define GPIO56_MAGICIAN_UNKNOWN_MD (56 | GPIO_OUT)
85#define GPIO57_MAGICIAN_CAM_RESET_MD (57 | GPIO_OUT)
86#define GPIO75_MAGICIAN_SAMSUNG_POWER_MD (75 | GPIO_OUT)
87#define GPIO83_MAGICIAN_nIR_EN_MD (83 | GPIO_OUT)
88#define GPIO86_MAGICIAN_GSM_RESET_MD (86 | GPIO_OUT)
89#define GPIO87_MAGICIAN_GSM_SELECT_MD (87 | GPIO_OUT)
90#define GPIO90_MAGICIAN_KEY_CALENDAR_MD (90 | GPIO_OUT)
91#define GPIO91_MAGICIAN_KEY_CAMERA_MD (91 | GPIO_OUT)
92#define GPIO93_MAGICIAN_KEY_UP_MD (93 | GPIO_IN)
93#define GPIO94_MAGICIAN_KEY_DOWN_MD (94 | GPIO_IN)
94#define GPIO95_MAGICIAN_KEY_LEFT_MD (95 | GPIO_IN)
95#define GPIO96_MAGICIAN_KEY_RIGHT_MD (96 | GPIO_IN)
96#define GPIO97_MAGICIAN_KEY_ENTER_MD (97 | GPIO_IN)
97#define GPIO98_MAGICIAN_KEY_RECORD_MD (98 | GPIO_IN)
98#define GPIO99_MAGICIAN_HEADPHONE_IN_MD (99 | GPIO_IN)
99#define GPIO100_MAGICIAN_KEY_VOL_UP_MD (100 | GPIO_IN)
100#define GPIO101_MAGICIAN_KEY_VOL_DOWN_MD (101 | GPIO_IN)
101#define GPIO102_MAGICIAN_KEY_PHONE_MD (102 | GPIO_IN)
102#define GPIO103_MAGICIAN_LED_KP_MD (103 | GPIO_OUT)
103#define GPIO104_MAGICIAN_LCD_POWER_1_MD (104 | GPIO_OUT)
104#define GPIO105_MAGICIAN_LCD_POWER_2_MD (105 | GPIO_OUT)
105#define GPIO106_MAGICIAN_LCD_POWER_3_MD (106 | GPIO_OUT)
106#define GPIO107_MAGICIAN_DS1WM_IRQ_MD (107 | GPIO_IN)
107#define GPIO108_MAGICIAN_GSM_READY_MD (108 | GPIO_IN)
108#define GPIO114_MAGICIAN_UNKNOWN_MD (114 | GPIO_OUT)
109#define GPIO115_MAGICIAN_nPEN_IRQ_MD (115 | GPIO_IN)
110#define GPIO116_MAGICIAN_nCAM_EN_MD (116 | GPIO_OUT)
111#define GPIO119_MAGICIAN_UNKNOWN_MD (119 | GPIO_OUT)
112#define GPIO120_MAGICIAN_UNKNOWN_MD (120 | GPIO_OUT)
113
114/*
115 * CPLD IRQs 66 * CPLD IRQs
116 */ 67 */
117 68
diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h
index 1d56a3ef89fd..a758a719180f 100644
--- a/include/asm-arm/arch-pxa/system.h
+++ b/include/asm-arm/arch-pxa/system.h
@@ -22,6 +22,8 @@ static inline void arch_idle(void)
22 22
23static inline void arch_reset(char mode) 23static inline void arch_reset(char mode)
24{ 24{
25 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
26
25 if (mode == 's') { 27 if (mode == 's') {
26 /* Jump into ROM at address 0 */ 28 /* Jump into ROM at address 0 */
27 cpu_reset(0); 29 cpu_reset(0);