diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 09:31:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 09:31:43 -0400 |
commit | 0a95d92c0054e74fb79607ac2df958b7bf295706 (patch) | |
tree | e2c5f836e799dcfd72904949be47595af91432e7 /arch/powerpc/platforms/82xx | |
parent | 08351fc6a75731226e1112fc7254542bd3a2912e (diff) | |
parent | 831532035b12a5f7b600515a6f4da0b207b82d6e (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (62 commits)
powerpc/85xx: Fix signedness bug in cache-sram
powerpc/fsl: 85xx: document cache sram bindings
powerpc/fsl: define binding for fsl mpic interrupt controllers
powerpc/fsl_msi: Handle msi-available-ranges better
drivers/serial/ucc_uart.c: Add of_node_put to avoid memory leak
powerpc/85xx: Fix SPE float to integer conversion failure
powerpc/85xx: Update sata controller compatible for p1022ds board
ATA: Add FSL sata v2 controller support
powerpc/mpc8xxx_gpio: simplify searching for 'fsl, qoriq-gpio' compatiable
powerpc/8xx: remove obsolete mgsuvd board
powerpc/82xx: rename and update mgcoge board support
powerpc/83xx: rename and update kmeter1
powerpc/85xx: Workaroudn e500 CPU erratum A005
powerpc/fsl_pci: Add support for FSL PCIe controllers v2.x
powerpc/85xx: Fix writing to spin table 'cpu-release-addr' on ppc64e
powerpc/pseries: Disable MSI using new interface if possible
powerpc: Enable GENERIC_HARDIRQS_NO_DEPRECATED.
powerpc: core irq_data conversion.
powerpc: sysdev/xilinx_intc irq_data conversion.
powerpc: sysdev/uic irq_data conversion.
...
Fix up conflicts in arch/powerpc/sysdev/fsl_msi.c (due to getting rid of
of_platform_driver in arch/powerpc)
Diffstat (limited to 'arch/powerpc/platforms/82xx')
-rw-r--r-- | arch/powerpc/platforms/82xx/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/82xx/km82xx.c (renamed from arch/powerpc/platforms/82xx/mgcoge.c) | 62 | ||||
-rw-r--r-- | arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | 27 |
3 files changed, 58 insertions, 33 deletions
diff --git a/arch/powerpc/platforms/82xx/Makefile b/arch/powerpc/platforms/82xx/Makefile index d982793f4dbd..455fe21e37c4 100644 --- a/arch/powerpc/platforms/82xx/Makefile +++ b/arch/powerpc/platforms/82xx/Makefile | |||
@@ -6,4 +6,4 @@ obj-$(CONFIG_CPM2) += pq2.o | |||
6 | obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o | 6 | obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o |
7 | obj-$(CONFIG_PQ2FADS) += pq2fads.o | 7 | obj-$(CONFIG_PQ2FADS) += pq2fads.o |
8 | obj-$(CONFIG_EP8248E) += ep8248e.o | 8 | obj-$(CONFIG_EP8248E) += ep8248e.o |
9 | obj-$(CONFIG_MGCOGE) += mgcoge.o | 9 | obj-$(CONFIG_MGCOGE) += km82xx.o |
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c b/arch/powerpc/platforms/82xx/km82xx.c index 7a5de9eb3c73..428c5e0a0e75 100644 --- a/arch/powerpc/platforms/82xx/mgcoge.c +++ b/arch/powerpc/platforms/82xx/km82xx.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Keymile mgcoge support | 2 | * Keymile km82xx support |
3 | * Copyright 2008 DENX Software Engineering GmbH | 3 | * Copyright 2008-2011 DENX Software Engineering GmbH |
4 | * Author: Heiko Schocher <hs@denx.de> | 4 | * Author: Heiko Schocher <hs@denx.de> |
5 | * | 5 | * |
6 | * based on code from: | 6 | * based on code from: |
@@ -31,9 +31,10 @@ | |||
31 | 31 | ||
32 | #include "pq2.h" | 32 | #include "pq2.h" |
33 | 33 | ||
34 | static void __init mgcoge_pic_init(void) | 34 | static void __init km82xx_pic_init(void) |
35 | { | 35 | { |
36 | struct device_node *np = of_find_compatible_node(NULL, NULL, "fsl,pq2-pic"); | 36 | struct device_node *np = of_find_compatible_node(NULL, NULL, |
37 | "fsl,pq2-pic"); | ||
37 | if (!np) { | 38 | if (!np) { |
38 | printk(KERN_ERR "PIC init: can not find cpm-pic node\n"); | 39 | printk(KERN_ERR "PIC init: can not find cpm-pic node\n"); |
39 | return; | 40 | return; |
@@ -47,12 +48,18 @@ struct cpm_pin { | |||
47 | int port, pin, flags; | 48 | int port, pin, flags; |
48 | }; | 49 | }; |
49 | 50 | ||
50 | static __initdata struct cpm_pin mgcoge_pins[] = { | 51 | static __initdata struct cpm_pin km82xx_pins[] = { |
51 | 52 | ||
52 | /* SMC2 */ | 53 | /* SMC2 */ |
53 | {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 54 | {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
54 | {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 55 | {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
55 | 56 | ||
57 | /* SCC1 */ | ||
58 | {2, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
59 | {2, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
60 | {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
61 | {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
62 | |||
56 | /* SCC4 */ | 63 | /* SCC4 */ |
57 | {2, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 64 | {2, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
58 | {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 65 | {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
@@ -107,30 +114,49 @@ static __initdata struct cpm_pin mgcoge_pins[] = { | |||
107 | {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, | 114 | {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, |
108 | {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, | 115 | {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, |
109 | #endif | 116 | #endif |
117 | |||
118 | /* USB */ | ||
119 | {0, 10, CPM_PIN_OUTPUT | CPM_PIN_GPIO}, /* FULL_SPEED */ | ||
120 | {0, 11, CPM_PIN_OUTPUT | CPM_PIN_GPIO}, /*/SLAVE */ | ||
121 | {2, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXN */ | ||
122 | {2, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXP */ | ||
123 | {2, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* /OE */ | ||
124 | {2, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXCLK */ | ||
125 | {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* TXP */ | ||
126 | {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* TXN */ | ||
127 | {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXD */ | ||
110 | }; | 128 | }; |
111 | 129 | ||
112 | static void __init init_ioports(void) | 130 | static void __init init_ioports(void) |
113 | { | 131 | { |
114 | int i; | 132 | int i; |
115 | 133 | ||
116 | for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) { | 134 | for (i = 0; i < ARRAY_SIZE(km82xx_pins); i++) { |
117 | const struct cpm_pin *pin = &mgcoge_pins[i]; | 135 | const struct cpm_pin *pin = &km82xx_pins[i]; |
118 | cpm2_set_pin(pin->port, pin->pin, pin->flags); | 136 | cpm2_set_pin(pin->port, pin->pin, pin->flags); |
119 | } | 137 | } |
120 | 138 | ||
121 | cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); | 139 | cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); |
140 | cpm2_clk_setup(CPM_CLK_SCC1, CPM_CLK11, CPM_CLK_RX); | ||
141 | cpm2_clk_setup(CPM_CLK_SCC1, CPM_CLK11, CPM_CLK_TX); | ||
142 | cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK5, CPM_CLK_RTX); | ||
122 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX); | 143 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX); |
123 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX); | 144 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX); |
124 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_RX); | 145 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_RX); |
125 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_TX); | 146 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_TX); |
126 | cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX); | 147 | cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX); |
127 | cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX); | 148 | cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX); |
149 | |||
150 | /* Force USB FULL SPEED bit to '1' */ | ||
151 | setbits32(&cpm2_immr->im_ioport.iop_pdata, 1 << (31 - 10)); | ||
152 | /* clear USB_SLAVE */ | ||
153 | clrbits32(&cpm2_immr->im_ioport.iop_pdata, 1 << (31 - 11)); | ||
128 | } | 154 | } |
129 | 155 | ||
130 | static void __init mgcoge_setup_arch(void) | 156 | static void __init km82xx_setup_arch(void) |
131 | { | 157 | { |
132 | if (ppc_md.progress) | 158 | if (ppc_md.progress) |
133 | ppc_md.progress("mgcoge_setup_arch()", 0); | 159 | ppc_md.progress("km82xx_setup_arch()", 0); |
134 | 160 | ||
135 | cpm2_reset(); | 161 | cpm2_reset(); |
136 | 162 | ||
@@ -142,7 +168,7 @@ static void __init mgcoge_setup_arch(void) | |||
142 | init_ioports(); | 168 | init_ioports(); |
143 | 169 | ||
144 | if (ppc_md.progress) | 170 | if (ppc_md.progress) |
145 | ppc_md.progress("mgcoge_setup_arch(), finish", 0); | 171 | ppc_md.progress("km82xx_setup_arch(), finish", 0); |
146 | } | 172 | } |
147 | 173 | ||
148 | static __initdata struct of_device_id of_bus_ids[] = { | 174 | static __initdata struct of_device_id of_bus_ids[] = { |
@@ -156,23 +182,23 @@ static int __init declare_of_platform_devices(void) | |||
156 | 182 | ||
157 | return 0; | 183 | return 0; |
158 | } | 184 | } |
159 | machine_device_initcall(mgcoge, declare_of_platform_devices); | 185 | machine_device_initcall(km82xx, declare_of_platform_devices); |
160 | 186 | ||
161 | /* | 187 | /* |
162 | * Called very early, device-tree isn't unflattened | 188 | * Called very early, device-tree isn't unflattened |
163 | */ | 189 | */ |
164 | static int __init mgcoge_probe(void) | 190 | static int __init km82xx_probe(void) |
165 | { | 191 | { |
166 | unsigned long root = of_get_flat_dt_root(); | 192 | unsigned long root = of_get_flat_dt_root(); |
167 | return of_flat_dt_is_compatible(root, "keymile,mgcoge"); | 193 | return of_flat_dt_is_compatible(root, "keymile,km82xx"); |
168 | } | 194 | } |
169 | 195 | ||
170 | define_machine(mgcoge) | 196 | define_machine(km82xx) |
171 | { | 197 | { |
172 | .name = "Keymile MGCOGE", | 198 | .name = "Keymile km82xx", |
173 | .probe = mgcoge_probe, | 199 | .probe = km82xx_probe, |
174 | .setup_arch = mgcoge_setup_arch, | 200 | .setup_arch = km82xx_setup_arch, |
175 | .init_IRQ = mgcoge_pic_init, | 201 | .init_IRQ = km82xx_pic_init, |
176 | .get_irq = cpm2_get_irq, | 202 | .get_irq = cpm2_get_irq, |
177 | .calibrate_decr = generic_calibrate_decr, | 203 | .calibrate_decr = generic_calibrate_decr, |
178 | .restart = pq2_restart, | 204 | .restart = pq2_restart, |
diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c index 5a55d87d6bd6..926dfdaaf57a 100644 --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | |||
@@ -39,10 +39,10 @@ struct pq2ads_pci_pic { | |||
39 | 39 | ||
40 | #define NUM_IRQS 32 | 40 | #define NUM_IRQS 32 |
41 | 41 | ||
42 | static void pq2ads_pci_mask_irq(unsigned int virq) | 42 | static void pq2ads_pci_mask_irq(struct irq_data *d) |
43 | { | 43 | { |
44 | struct pq2ads_pci_pic *priv = get_irq_chip_data(virq); | 44 | struct pq2ads_pci_pic *priv = irq_data_get_irq_chip_data(d); |
45 | int irq = NUM_IRQS - virq_to_hw(virq) - 1; | 45 | int irq = NUM_IRQS - virq_to_hw(d->irq) - 1; |
46 | 46 | ||
47 | if (irq != -1) { | 47 | if (irq != -1) { |
48 | unsigned long flags; | 48 | unsigned long flags; |
@@ -55,10 +55,10 @@ static void pq2ads_pci_mask_irq(unsigned int virq) | |||
55 | } | 55 | } |
56 | } | 56 | } |
57 | 57 | ||
58 | static void pq2ads_pci_unmask_irq(unsigned int virq) | 58 | static void pq2ads_pci_unmask_irq(struct irq_data *d) |
59 | { | 59 | { |
60 | struct pq2ads_pci_pic *priv = get_irq_chip_data(virq); | 60 | struct pq2ads_pci_pic *priv = irq_data_get_irq_chip_data(d); |
61 | int irq = NUM_IRQS - virq_to_hw(virq) - 1; | 61 | int irq = NUM_IRQS - virq_to_hw(d->irq) - 1; |
62 | 62 | ||
63 | if (irq != -1) { | 63 | if (irq != -1) { |
64 | unsigned long flags; | 64 | unsigned long flags; |
@@ -71,18 +71,17 @@ static void pq2ads_pci_unmask_irq(unsigned int virq) | |||
71 | 71 | ||
72 | static struct irq_chip pq2ads_pci_ic = { | 72 | static struct irq_chip pq2ads_pci_ic = { |
73 | .name = "PQ2 ADS PCI", | 73 | .name = "PQ2 ADS PCI", |
74 | .end = pq2ads_pci_unmask_irq, | 74 | .irq_mask = pq2ads_pci_mask_irq, |
75 | .mask = pq2ads_pci_mask_irq, | 75 | .irq_mask_ack = pq2ads_pci_mask_irq, |
76 | .mask_ack = pq2ads_pci_mask_irq, | 76 | .irq_ack = pq2ads_pci_mask_irq, |
77 | .ack = pq2ads_pci_mask_irq, | 77 | .irq_unmask = pq2ads_pci_unmask_irq, |
78 | .unmask = pq2ads_pci_unmask_irq, | 78 | .irq_enable = pq2ads_pci_unmask_irq, |
79 | .enable = pq2ads_pci_unmask_irq, | 79 | .irq_disable = pq2ads_pci_mask_irq |
80 | .disable = pq2ads_pci_mask_irq | ||
81 | }; | 80 | }; |
82 | 81 | ||
83 | static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc) | 82 | static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc) |
84 | { | 83 | { |
85 | struct pq2ads_pci_pic *priv = desc->handler_data; | 84 | struct pq2ads_pci_pic *priv = get_irq_desc_data(desc); |
86 | u32 stat, mask, pend; | 85 | u32 stat, mask, pend; |
87 | int bit; | 86 | int bit; |
88 | 87 | ||