aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-01-17 00:17:58 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-17 00:17:58 -0500
commit52920df4aa9dd25836b8ed4dc0b177ea14c09e53 (patch)
tree47b3fab4849f7faeaaf88e2ca8dcc911a0c39103 /arch/powerpc
parent0173d422aa32fa1e5141f1759202b955215c1da2 (diff)
parent9cd55be4d22376893d2818ce3c0e5706a3d74121 (diff)
Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/olof/pasemi into for-2.6.25
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/configs/pasemi_defconfig4
-rw-r--r--arch/powerpc/platforms/pasemi/Kconfig9
-rw-r--r--arch/powerpc/platforms/pasemi/Makefile1
-rw-r--r--arch/powerpc/platforms/pasemi/electra_ide.c96
-rw-r--r--arch/powerpc/platforms/pasemi/idle.c5
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c12
6 files changed, 6 insertions, 121 deletions
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 9d21b083ae12..797f0dfebde2 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_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.24-rc6 3# Linux kernel version: 2.6.24-rc6
4# Fri Dec 28 11:01:53 2007 4# Tue Jan 15 10:26:10 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -152,7 +152,6 @@ CONFIG_PPC_PASEMI=y
152CONFIG_PPC_PASEMI_IOMMU=y 152CONFIG_PPC_PASEMI_IOMMU=y
153# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set 153# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
154CONFIG_PPC_PASEMI_MDIO=y 154CONFIG_PPC_PASEMI_MDIO=y
155CONFIG_ELECTRA_IDE=y
156# CONFIG_PPC_CELLEB is not set 155# CONFIG_PPC_CELLEB is not set
157# CONFIG_PPC_PS3 is not set 156# CONFIG_PPC_PS3 is not set
158# CONFIG_PPC_CELL is not set 157# CONFIG_PPC_CELL is not set
@@ -663,6 +662,7 @@ CONFIG_PATA_PCMCIA=y
663# CONFIG_PATA_VIA is not set 662# CONFIG_PATA_VIA is not set
664# CONFIG_PATA_WINBOND is not set 663# CONFIG_PATA_WINBOND is not set
665CONFIG_PATA_PLATFORM=y 664CONFIG_PATA_PLATFORM=y
665CONFIG_PATA_OF_PLATFORM=y
666CONFIG_MD=y 666CONFIG_MD=y
667CONFIG_BLK_DEV_MD=y 667CONFIG_BLK_DEV_MD=y
668CONFIG_MD_LINEAR=y 668CONFIG_MD_LINEAR=y
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig
index b3458a181a15..348e0619e3e5 100644
--- a/arch/powerpc/platforms/pasemi/Kconfig
+++ b/arch/powerpc/platforms/pasemi/Kconfig
@@ -37,13 +37,4 @@ config PPC_PASEMI_MDIO
37 help 37 help
38 Driver for MDIO via GPIO on PWRficient platforms 38 Driver for MDIO via GPIO on PWRficient platforms
39 39
40config ELECTRA_IDE
41 tristate "Electra IDE driver"
42 default y
43 depends on PPC_PASEMI && ATA
44 select PATA_PLATFORM
45 help
46 This includes driver support for the Electra on-board IDE
47 interface.
48
49endmenu 40endmenu
diff --git a/arch/powerpc/platforms/pasemi/Makefile b/arch/powerpc/platforms/pasemi/Makefile
index f47fcac7e581..2cd2a4f26a48 100644
--- a/arch/powerpc/platforms/pasemi/Makefile
+++ b/arch/powerpc/platforms/pasemi/Makefile
@@ -1,4 +1,3 @@
1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o 1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o
2obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o 2obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o
3obj-$(CONFIG_ELECTRA_IDE) += electra_ide.o
4obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o 3obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o
diff --git a/arch/powerpc/platforms/pasemi/electra_ide.c b/arch/powerpc/platforms/pasemi/electra_ide.c
deleted file mode 100644
index 12fb0c949263..000000000000
--- a/arch/powerpc/platforms/pasemi/electra_ide.c
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2 * Copyright (C) 2007 PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#include <linux/platform_device.h>
21
22#include <asm/prom.h>
23#include <asm/system.h>
24
25/* The electra IDE interface is incredibly simple: Just a device on the localbus
26 * with interrupts hooked up to one of the GPIOs. The device tree contains the
27 * address window and interrupt mappings already, and the pata_platform driver handles
28 * the rest. We just need to hook the two up.
29 */
30
31#define MAX_IFS 4 /* really, we have only one */
32
33static struct platform_device *pdevs[MAX_IFS];
34
35static int __devinit electra_ide_init(void)
36{
37 struct device_node *np;
38 struct resource r[3];
39 int ret = 0;
40 int i;
41
42 np = of_find_compatible_node(NULL, "ide", "electra-ide");
43 i = 0;
44
45 while (np && i < MAX_IFS) {
46 memset(r, 0, sizeof(r));
47
48 /* pata_platform wants two address ranges: one for the base registers,
49 * another for the control (altstatus). It's located at offset 0x3f6 in
50 * the window, but the device tree only has one large register window
51 * that covers both ranges. So we need to split it up by hand here:
52 */
53
54 ret = of_address_to_resource(np, 0, &r[0]);
55 if (ret)
56 goto out;
57 ret = of_address_to_resource(np, 0, &r[1]);
58 if (ret)
59 goto out;
60
61 r[1].start += 0x3f6;
62 r[0].end = r[1].start-1;
63
64 r[2].start = irq_of_parse_and_map(np, 0);
65 r[2].end = irq_of_parse_and_map(np, 0);
66 r[2].flags = IORESOURCE_IRQ;
67
68 pr_debug("registering platform device at 0x%lx/0x%lx, irq is %ld\n",
69 r[0].start, r[1].start, r[2].start);
70 pdevs[i] = platform_device_register_simple("pata_platform", i, r, 3);
71 if (IS_ERR(pdevs[i])) {
72 ret = PTR_ERR(pdevs[i]);
73 pdevs[i] = NULL;
74 goto out;
75 }
76 np = of_find_compatible_node(np, "ide", "electra-ide");
77 }
78out:
79 return ret;
80}
81module_init(electra_ide_init);
82
83static void __devexit electra_ide_exit(void)
84{
85 int i;
86
87 for (i = 0; i < MAX_IFS; i++)
88 if (pdevs[i])
89 platform_device_unregister(pdevs[i]);
90}
91module_exit(electra_ide_exit);
92
93
94MODULE_LICENSE("GPL");
95MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>");
96MODULE_DESCRIPTION("PA Semi Electra IDE driver");
diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c
index d8e1fcc78513..43911d8b0206 100644
--- a/arch/powerpc/platforms/pasemi/idle.c
+++ b/arch/powerpc/platforms/pasemi/idle.c
@@ -74,9 +74,6 @@ static int pasemi_system_reset_exception(struct pt_regs *regs)
74 74
75static int __init pasemi_idle_init(void) 75static int __init pasemi_idle_init(void)
76{ 76{
77 if (!machine_is(pasemi))
78 return -ENODEV;
79
80#ifndef CONFIG_PPC_PASEMI_CPUFREQ 77#ifndef CONFIG_PPC_PASEMI_CPUFREQ
81 printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n"); 78 printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n");
82 current_mode = 0; 79 current_mode = 0;
@@ -88,7 +85,7 @@ static int __init pasemi_idle_init(void)
88 85
89 return 0; 86 return 0;
90} 87}
91late_initcall(pasemi_idle_init); 88machine_late_initcall(pasemi, pasemi_idle_init);
92 89
93static int __init idle_param(char *p) 90static int __init idle_param(char *p)
94{ 91{
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 1940e678878e..c64fb5bfb37e 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -135,9 +135,6 @@ static int __init pas_setup_mce_regs(void)
135 struct pci_dev *dev; 135 struct pci_dev *dev;
136 int reg; 136 int reg;
137 137
138 if (!machine_is(pasemi))
139 return -ENODEV;
140
141 /* Remap various SoC status registers for use by the MCE handler */ 138 /* Remap various SoC status registers for use by the MCE handler */
142 139
143 reg = 0; 140 reg = 0;
@@ -181,7 +178,7 @@ static int __init pas_setup_mce_regs(void)
181 178
182 return 0; 179 return 0;
183} 180}
184device_initcall(pas_setup_mce_regs); 181machine_device_initcall(pasemi, pas_setup_mce_regs);
185 182
186static __init void pas_init_IRQ(void) 183static __init void pas_init_IRQ(void)
187{ 184{
@@ -264,7 +261,7 @@ static int pas_machine_check_handler(struct pt_regs *regs)
264 srr0 = regs->nip; 261 srr0 = regs->nip;
265 srr1 = regs->msr; 262 srr1 = regs->msr;
266 263
267 if (mpic_get_mcirq() == nmi_virq) { 264 if (nmi_virq != NO_IRQ && mpic_get_mcirq() == nmi_virq) {
268 printk(KERN_ERR "NMI delivered\n"); 265 printk(KERN_ERR "NMI delivered\n");
269 debugger(regs); 266 debugger(regs);
270 mpic_end_irq(nmi_virq); 267 mpic_end_irq(nmi_virq);
@@ -405,9 +402,6 @@ static struct of_device_id pasemi_bus_ids[] = {
405 402
406static int __init pasemi_publish_devices(void) 403static int __init pasemi_publish_devices(void)
407{ 404{
408 if (!machine_is(pasemi))
409 return 0;
410
411 pasemi_pcmcia_init(); 405 pasemi_pcmcia_init();
412 406
413 /* Publish OF platform devices for SDC and other non-PCI devices */ 407 /* Publish OF platform devices for SDC and other non-PCI devices */
@@ -415,7 +409,7 @@ static int __init pasemi_publish_devices(void)
415 409
416 return 0; 410 return 0;
417} 411}
418device_initcall(pasemi_publish_devices); 412machine_device_initcall(pasemi, pasemi_publish_devices);
419 413
420 414
421/* 415/*