diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/powerpc/platforms/52xx | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'arch/powerpc/platforms/52xx')
-rw-r--r-- | arch/powerpc/platforms/52xx/lite5200.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/lite5200_pm.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/media5200.c | 17 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc5200_simple.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_common.c | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 25 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 60 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_pci.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_pic.c | 21 |
9 files changed, 62 insertions, 83 deletions
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index 1843bc93201..01ffa64d2aa 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Written by: Grant Likely <grant.likely@secretlab.ca> | 4 | * Written by: Grant Likely <grant.likely@secretlab.ca> |
5 | * | 5 | * |
6 | * Copyright (C) Secret Lab Technologies Ltd. 2006. All rights reserved. | 6 | * Copyright (C) Secret Lab Technologies Ltd. 2006. All rights reserved. |
7 | * Copyright 2006 Freescale Semiconductor, Inc. All rights reserved. | 7 | * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. |
8 | * | 8 | * |
9 | * Description: | 9 | * Description: |
10 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
@@ -172,7 +172,7 @@ static void __init lite5200_setup_arch(void) | |||
172 | mpc52xx_setup_pci(); | 172 | mpc52xx_setup_pci(); |
173 | } | 173 | } |
174 | 174 | ||
175 | static const char * const board[] __initconst = { | 175 | static const char *board[] __initdata = { |
176 | "fsl,lite5200", | 176 | "fsl,lite5200", |
177 | "fsl,lite5200b", | 177 | "fsl,lite5200b", |
178 | NULL, | 178 | NULL, |
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c index 870b70f5d1b..eda0fc2a391 100644 --- a/arch/powerpc/platforms/52xx/lite5200_pm.c +++ b/arch/powerpc/platforms/52xx/lite5200_pm.c | |||
@@ -3,7 +3,6 @@ | |||
3 | #include <asm/io.h> | 3 | #include <asm/io.h> |
4 | #include <asm/time.h> | 4 | #include <asm/time.h> |
5 | #include <asm/mpc52xx.h> | 5 | #include <asm/mpc52xx.h> |
6 | #include <asm/switch_to.h> | ||
7 | 6 | ||
8 | /* defined in lite5200_sleep.S and only used here */ | 7 | /* defined in lite5200_sleep.S and only used here */ |
9 | extern void lite5200_low_power(void __iomem *sram, void __iomem *mbar); | 8 | extern void lite5200_low_power(void __iomem *sram, void __iomem *mbar); |
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c index 070d315dd6c..96f85e5e0cd 100644 --- a/arch/powerpc/platforms/52xx/media5200.c +++ b/arch/powerpc/platforms/52xx/media5200.c | |||
@@ -45,7 +45,7 @@ static struct of_device_id mpc5200_gpio_ids[] __initdata = { | |||
45 | struct media5200_irq { | 45 | struct media5200_irq { |
46 | void __iomem *regs; | 46 | void __iomem *regs; |
47 | spinlock_t lock; | 47 | spinlock_t lock; |
48 | struct irq_domain *irqhost; | 48 | struct irq_host *irqhost; |
49 | }; | 49 | }; |
50 | struct media5200_irq media5200_irq; | 50 | struct media5200_irq media5200_irq; |
51 | 51 | ||
@@ -112,7 +112,7 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc) | |||
112 | raw_spin_unlock(&desc->lock); | 112 | raw_spin_unlock(&desc->lock); |
113 | } | 113 | } |
114 | 114 | ||
115 | static int media5200_irq_map(struct irq_domain *h, unsigned int virq, | 115 | static int media5200_irq_map(struct irq_host *h, unsigned int virq, |
116 | irq_hw_number_t hw) | 116 | irq_hw_number_t hw) |
117 | { | 117 | { |
118 | pr_debug("%s: h=%p, virq=%i, hwirq=%i\n", __func__, h, virq, (int)hw); | 118 | pr_debug("%s: h=%p, virq=%i, hwirq=%i\n", __func__, h, virq, (int)hw); |
@@ -122,7 +122,7 @@ static int media5200_irq_map(struct irq_domain *h, unsigned int virq, | |||
122 | return 0; | 122 | return 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | static int media5200_irq_xlate(struct irq_domain *h, struct device_node *ct, | 125 | static int media5200_irq_xlate(struct irq_host *h, struct device_node *ct, |
126 | const u32 *intspec, unsigned int intsize, | 126 | const u32 *intspec, unsigned int intsize, |
127 | irq_hw_number_t *out_hwirq, | 127 | irq_hw_number_t *out_hwirq, |
128 | unsigned int *out_flags) | 128 | unsigned int *out_flags) |
@@ -136,7 +136,7 @@ static int media5200_irq_xlate(struct irq_domain *h, struct device_node *ct, | |||
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | static const struct irq_domain_ops media5200_irq_ops = { | 139 | static struct irq_host_ops media5200_irq_ops = { |
140 | .map = media5200_irq_map, | 140 | .map = media5200_irq_map, |
141 | .xlate = media5200_irq_xlate, | 141 | .xlate = media5200_irq_xlate, |
142 | }; | 142 | }; |
@@ -173,12 +173,15 @@ static void __init media5200_init_irq(void) | |||
173 | 173 | ||
174 | spin_lock_init(&media5200_irq.lock); | 174 | spin_lock_init(&media5200_irq.lock); |
175 | 175 | ||
176 | media5200_irq.irqhost = irq_domain_add_linear(fpga_np, | 176 | media5200_irq.irqhost = irq_alloc_host(fpga_np, IRQ_HOST_MAP_LINEAR, |
177 | MEDIA5200_NUM_IRQS, &media5200_irq_ops, &media5200_irq); | 177 | MEDIA5200_NUM_IRQS, |
178 | &media5200_irq_ops, -1); | ||
178 | if (!media5200_irq.irqhost) | 179 | if (!media5200_irq.irqhost) |
179 | goto out; | 180 | goto out; |
180 | pr_debug("%s: allocated irqhost\n", __func__); | 181 | pr_debug("%s: allocated irqhost\n", __func__); |
181 | 182 | ||
183 | media5200_irq.irqhost->host_data = &media5200_irq; | ||
184 | |||
182 | irq_set_handler_data(cascade_virq, &media5200_irq); | 185 | irq_set_handler_data(cascade_virq, &media5200_irq); |
183 | irq_set_chained_handler(cascade_virq, media5200_irq_cascade); | 186 | irq_set_chained_handler(cascade_virq, media5200_irq_cascade); |
184 | 187 | ||
@@ -232,7 +235,7 @@ static void __init media5200_setup_arch(void) | |||
232 | } | 235 | } |
233 | 236 | ||
234 | /* list of the supported boards */ | 237 | /* list of the supported boards */ |
235 | static const char * const board[] __initconst = { | 238 | static const char *board[] __initdata = { |
236 | "fsl,media5200", | 239 | "fsl,media5200", |
237 | NULL | 240 | NULL |
238 | }; | 241 | }; |
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c index 792a301a0bf..e36d6e232ae 100644 --- a/arch/powerpc/platforms/52xx/mpc5200_simple.c +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c | |||
@@ -50,10 +50,6 @@ static void __init mpc5200_simple_setup_arch(void) | |||
50 | 50 | ||
51 | /* list of the supported boards */ | 51 | /* list of the supported boards */ |
52 | static const char *board[] __initdata = { | 52 | static const char *board[] __initdata = { |
53 | "anonymous,a3m071", | ||
54 | "anonymous,a4m072", | ||
55 | "anon,charon", | ||
56 | "ifm,o2d", | ||
57 | "intercontrol,digsy-mtc", | 53 | "intercontrol,digsy-mtc", |
58 | "manroland,mucmc52", | 54 | "manroland,mucmc52", |
59 | "manroland,uc101", | 55 | "manroland,uc101", |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c index d7e94f49532..41f3a7eda1d 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/of_platform.h> | 18 | #include <linux/of_platform.h> |
19 | #include <linux/of_gpio.h> | 19 | #include <linux/of_gpio.h> |
20 | #include <linux/export.h> | ||
21 | #include <asm/io.h> | 20 | #include <asm/io.h> |
22 | #include <asm/prom.h> | 21 | #include <asm/prom.h> |
23 | #include <asm/mpc52xx.h> | 22 | #include <asm/mpc52xx.h> |
@@ -98,11 +97,13 @@ struct mpc52xx_gpio_wkup __iomem *wkup_gpio; | |||
98 | * of the localplus bus to the of_platform | 97 | * of the localplus bus to the of_platform |
99 | * bus. | 98 | * bus. |
100 | */ | 99 | */ |
101 | void __init mpc52xx_declare_of_platform_devices(void) | 100 | void __init |
101 | mpc52xx_declare_of_platform_devices(void) | ||
102 | { | 102 | { |
103 | /* Find all the 'platform' devices and register them. */ | 103 | /* Find every child of the SOC node and add it to of_platform */ |
104 | if (of_platform_populate(NULL, mpc52xx_bus_ids, NULL, NULL)) | 104 | if (of_platform_bus_probe(NULL, mpc52xx_bus_ids, NULL)) |
105 | pr_err(__FILE__ ": Error while populating devices from DT\n"); | 105 | printk(KERN_ERR __FILE__ ": " |
106 | "Error while probing of_platform bus\n"); | ||
106 | } | 107 | } |
107 | 108 | ||
108 | /* | 109 | /* |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index 692998244d2..6c39b9cc2fa 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c | |||
@@ -67,7 +67,6 @@ | |||
67 | #include <linux/watchdog.h> | 67 | #include <linux/watchdog.h> |
68 | #include <linux/miscdevice.h> | 68 | #include <linux/miscdevice.h> |
69 | #include <linux/uaccess.h> | 69 | #include <linux/uaccess.h> |
70 | #include <linux/module.h> | ||
71 | #include <asm/div64.h> | 70 | #include <asm/div64.h> |
72 | #include <asm/mpc52xx.h> | 71 | #include <asm/mpc52xx.h> |
73 | 72 | ||
@@ -81,7 +80,7 @@ MODULE_LICENSE("GPL"); | |||
81 | * @regs: virtual address of GPT registers | 80 | * @regs: virtual address of GPT registers |
82 | * @lock: spinlock to coordinate between different functions. | 81 | * @lock: spinlock to coordinate between different functions. |
83 | * @gc: gpio_chip instance structure; used when GPIO is enabled | 82 | * @gc: gpio_chip instance structure; used when GPIO is enabled |
84 | * @irqhost: Pointer to irq_domain instance; used when IRQ mode is supported | 83 | * @irqhost: Pointer to irq_host instance; used when IRQ mode is supported |
85 | * @wdt_mode: only relevant for gpt0: bit 0 (MPC52xx_GPT_CAN_WDT) indicates | 84 | * @wdt_mode: only relevant for gpt0: bit 0 (MPC52xx_GPT_CAN_WDT) indicates |
86 | * if the gpt may be used as wdt, bit 1 (MPC52xx_GPT_IS_WDT) indicates | 85 | * if the gpt may be used as wdt, bit 1 (MPC52xx_GPT_IS_WDT) indicates |
87 | * if the timer is actively used as wdt which blocks gpt functions | 86 | * if the timer is actively used as wdt which blocks gpt functions |
@@ -91,7 +90,7 @@ struct mpc52xx_gpt_priv { | |||
91 | struct device *dev; | 90 | struct device *dev; |
92 | struct mpc52xx_gpt __iomem *regs; | 91 | struct mpc52xx_gpt __iomem *regs; |
93 | spinlock_t lock; | 92 | spinlock_t lock; |
94 | struct irq_domain *irqhost; | 93 | struct irq_host *irqhost; |
95 | u32 ipb_freq; | 94 | u32 ipb_freq; |
96 | u8 wdt_mode; | 95 | u8 wdt_mode; |
97 | 96 | ||
@@ -204,7 +203,7 @@ void mpc52xx_gpt_irq_cascade(unsigned int virq, struct irq_desc *desc) | |||
204 | } | 203 | } |
205 | } | 204 | } |
206 | 205 | ||
207 | static int mpc52xx_gpt_irq_map(struct irq_domain *h, unsigned int virq, | 206 | static int mpc52xx_gpt_irq_map(struct irq_host *h, unsigned int virq, |
208 | irq_hw_number_t hw) | 207 | irq_hw_number_t hw) |
209 | { | 208 | { |
210 | struct mpc52xx_gpt_priv *gpt = h->host_data; | 209 | struct mpc52xx_gpt_priv *gpt = h->host_data; |
@@ -216,7 +215,7 @@ static int mpc52xx_gpt_irq_map(struct irq_domain *h, unsigned int virq, | |||
216 | return 0; | 215 | return 0; |
217 | } | 216 | } |
218 | 217 | ||
219 | static int mpc52xx_gpt_irq_xlate(struct irq_domain *h, struct device_node *ct, | 218 | static int mpc52xx_gpt_irq_xlate(struct irq_host *h, struct device_node *ct, |
220 | const u32 *intspec, unsigned int intsize, | 219 | const u32 *intspec, unsigned int intsize, |
221 | irq_hw_number_t *out_hwirq, | 220 | irq_hw_number_t *out_hwirq, |
222 | unsigned int *out_flags) | 221 | unsigned int *out_flags) |
@@ -236,7 +235,7 @@ static int mpc52xx_gpt_irq_xlate(struct irq_domain *h, struct device_node *ct, | |||
236 | return 0; | 235 | return 0; |
237 | } | 236 | } |
238 | 237 | ||
239 | static const struct irq_domain_ops mpc52xx_gpt_irq_ops = { | 238 | static struct irq_host_ops mpc52xx_gpt_irq_ops = { |
240 | .map = mpc52xx_gpt_irq_map, | 239 | .map = mpc52xx_gpt_irq_map, |
241 | .xlate = mpc52xx_gpt_irq_xlate, | 240 | .xlate = mpc52xx_gpt_irq_xlate, |
242 | }; | 241 | }; |
@@ -252,12 +251,14 @@ mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node) | |||
252 | if (!cascade_virq) | 251 | if (!cascade_virq) |
253 | return; | 252 | return; |
254 | 253 | ||
255 | gpt->irqhost = irq_domain_add_linear(node, 1, &mpc52xx_gpt_irq_ops, gpt); | 254 | gpt->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, 1, |
255 | &mpc52xx_gpt_irq_ops, -1); | ||
256 | if (!gpt->irqhost) { | 256 | if (!gpt->irqhost) { |
257 | dev_err(gpt->dev, "irq_domain_add_linear() failed\n"); | 257 | dev_err(gpt->dev, "irq_alloc_host() failed\n"); |
258 | return; | 258 | return; |
259 | } | 259 | } |
260 | 260 | ||
261 | gpt->irqhost->host_data = gpt; | ||
261 | irq_set_handler_data(cascade_virq, gpt); | 262 | irq_set_handler_data(cascade_virq, gpt); |
262 | irq_set_chained_handler(cascade_virq, mpc52xx_gpt_irq_cascade); | 263 | irq_set_chained_handler(cascade_virq, mpc52xx_gpt_irq_cascade); |
263 | 264 | ||
@@ -526,7 +527,7 @@ EXPORT_SYMBOL(mpc52xx_gpt_timer_period); | |||
526 | 527 | ||
527 | #define WDT_IDENTITY "mpc52xx watchdog on GPT0" | 528 | #define WDT_IDENTITY "mpc52xx watchdog on GPT0" |
528 | 529 | ||
529 | /* wdt_is_active stores whether or not the /dev/watchdog device is opened */ | 530 | /* wdt_is_active stores wether or not the /dev/watchdog device is opened */ |
530 | static unsigned long wdt_is_active; | 531 | static unsigned long wdt_is_active; |
531 | 532 | ||
532 | /* wdt-capable gpt */ | 533 | /* wdt-capable gpt */ |
@@ -669,7 +670,7 @@ static struct miscdevice mpc52xx_wdt_miscdev = { | |||
669 | .fops = &mpc52xx_wdt_fops, | 670 | .fops = &mpc52xx_wdt_fops, |
670 | }; | 671 | }; |
671 | 672 | ||
672 | static int mpc52xx_gpt_wdt_init(void) | 673 | static int __devinit mpc52xx_gpt_wdt_init(void) |
673 | { | 674 | { |
674 | int err; | 675 | int err; |
675 | 676 | ||
@@ -704,7 +705,7 @@ static int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt, | |||
704 | 705 | ||
705 | #else | 706 | #else |
706 | 707 | ||
707 | static int mpc52xx_gpt_wdt_init(void) | 708 | static int __devinit mpc52xx_gpt_wdt_init(void) |
708 | { | 709 | { |
709 | return 0; | 710 | return 0; |
710 | } | 711 | } |
@@ -720,7 +721,7 @@ static inline int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt, | |||
720 | /* --------------------------------------------------------------------- | 721 | /* --------------------------------------------------------------------- |
721 | * of_platform bus binding code | 722 | * of_platform bus binding code |
722 | */ | 723 | */ |
723 | static int mpc52xx_gpt_probe(struct platform_device *ofdev) | 724 | static int __devinit mpc52xx_gpt_probe(struct platform_device *ofdev) |
724 | { | 725 | { |
725 | struct mpc52xx_gpt_priv *gpt; | 726 | struct mpc52xx_gpt_priv *gpt; |
726 | 727 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index f9f4537f546..9940ce8a2d4 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/of.h> | 14 | #include <linux/of.h> |
15 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/module.h> | ||
18 | #include <asm/io.h> | 17 | #include <asm/io.h> |
19 | #include <asm/prom.h> | 18 | #include <asm/prom.h> |
20 | #include <asm/mpc52xx.h> | 19 | #include <asm/mpc52xx.h> |
@@ -170,8 +169,7 @@ static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req) | |||
170 | out_be32(lpbfifo.regs + LPBFIFO_REG_CONTROL, bit_fields); | 169 | out_be32(lpbfifo.regs + LPBFIFO_REG_CONTROL, bit_fields); |
171 | 170 | ||
172 | /* Kick it off */ | 171 | /* Kick it off */ |
173 | if (!lpbfifo.req->defer_xfer_start) | 172 | out_8(lpbfifo.regs + LPBFIFO_REG_PACKET_SIZE, 0x01); |
174 | out_8(lpbfifo.regs + LPBFIFO_REG_PACKET_SIZE, 0x01); | ||
175 | if (dma) | 173 | if (dma) |
176 | bcom_enable(lpbfifo.bcom_cur_task); | 174 | bcom_enable(lpbfifo.bcom_cur_task); |
177 | } | 175 | } |
@@ -422,38 +420,6 @@ int mpc52xx_lpbfifo_submit(struct mpc52xx_lpbfifo_request *req) | |||
422 | } | 420 | } |
423 | EXPORT_SYMBOL(mpc52xx_lpbfifo_submit); | 421 | EXPORT_SYMBOL(mpc52xx_lpbfifo_submit); |
424 | 422 | ||
425 | int mpc52xx_lpbfifo_start_xfer(struct mpc52xx_lpbfifo_request *req) | ||
426 | { | ||
427 | unsigned long flags; | ||
428 | |||
429 | if (!lpbfifo.regs) | ||
430 | return -ENODEV; | ||
431 | |||
432 | spin_lock_irqsave(&lpbfifo.lock, flags); | ||
433 | |||
434 | /* | ||
435 | * If the req pointer is already set and a transfer was | ||
436 | * started on submit, then this transfer is in progress | ||
437 | */ | ||
438 | if (lpbfifo.req && !lpbfifo.req->defer_xfer_start) { | ||
439 | spin_unlock_irqrestore(&lpbfifo.lock, flags); | ||
440 | return -EBUSY; | ||
441 | } | ||
442 | |||
443 | /* | ||
444 | * If the req was previously submitted but not | ||
445 | * started, start it now | ||
446 | */ | ||
447 | if (lpbfifo.req && lpbfifo.req == req && | ||
448 | lpbfifo.req->defer_xfer_start) { | ||
449 | out_8(lpbfifo.regs + LPBFIFO_REG_PACKET_SIZE, 0x01); | ||
450 | } | ||
451 | |||
452 | spin_unlock_irqrestore(&lpbfifo.lock, flags); | ||
453 | return 0; | ||
454 | } | ||
455 | EXPORT_SYMBOL(mpc52xx_lpbfifo_start_xfer); | ||
456 | |||
457 | void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req) | 423 | void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req) |
458 | { | 424 | { |
459 | unsigned long flags; | 425 | unsigned long flags; |
@@ -470,7 +436,7 @@ void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req) | |||
470 | } | 436 | } |
471 | EXPORT_SYMBOL(mpc52xx_lpbfifo_abort); | 437 | EXPORT_SYMBOL(mpc52xx_lpbfifo_abort); |
472 | 438 | ||
473 | static int mpc52xx_lpbfifo_probe(struct platform_device *op) | 439 | static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op) |
474 | { | 440 | { |
475 | struct resource res; | 441 | struct resource res; |
476 | int rc = -ENOMEM; | 442 | int rc = -ENOMEM; |
@@ -540,7 +506,7 @@ static int mpc52xx_lpbfifo_probe(struct platform_device *op) | |||
540 | } | 506 | } |
541 | 507 | ||
542 | 508 | ||
543 | static int mpc52xx_lpbfifo_remove(struct platform_device *op) | 509 | static int __devexit mpc52xx_lpbfifo_remove(struct platform_device *op) |
544 | { | 510 | { |
545 | if (lpbfifo.dev != &op->dev) | 511 | if (lpbfifo.dev != &op->dev) |
546 | return 0; | 512 | return 0; |
@@ -564,7 +530,7 @@ static int mpc52xx_lpbfifo_remove(struct platform_device *op) | |||
564 | return 0; | 530 | return 0; |
565 | } | 531 | } |
566 | 532 | ||
567 | static struct of_device_id mpc52xx_lpbfifo_match[] = { | 533 | static struct of_device_id mpc52xx_lpbfifo_match[] __devinitconst = { |
568 | { .compatible = "fsl,mpc5200-lpbfifo", }, | 534 | { .compatible = "fsl,mpc5200-lpbfifo", }, |
569 | {}, | 535 | {}, |
570 | }; | 536 | }; |
@@ -576,6 +542,20 @@ static struct platform_driver mpc52xx_lpbfifo_driver = { | |||
576 | .of_match_table = mpc52xx_lpbfifo_match, | 542 | .of_match_table = mpc52xx_lpbfifo_match, |
577 | }, | 543 | }, |
578 | .probe = mpc52xx_lpbfifo_probe, | 544 | .probe = mpc52xx_lpbfifo_probe, |
579 | .remove = mpc52xx_lpbfifo_remove, | 545 | .remove = __devexit_p(mpc52xx_lpbfifo_remove), |
580 | }; | 546 | }; |
581 | module_platform_driver(mpc52xx_lpbfifo_driver); | 547 | |
548 | /*********************************************************************** | ||
549 | * Module init/exit | ||
550 | */ | ||
551 | static int __init mpc52xx_lpbfifo_init(void) | ||
552 | { | ||
553 | return platform_driver_register(&mpc52xx_lpbfifo_driver); | ||
554 | } | ||
555 | module_init(mpc52xx_lpbfifo_init); | ||
556 | |||
557 | static void __exit mpc52xx_lpbfifo_exit(void) | ||
558 | { | ||
559 | platform_driver_unregister(&mpc52xx_lpbfifo_driver); | ||
560 | } | ||
561 | module_exit(mpc52xx_lpbfifo_exit); | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c index e2d401ad8fb..bfb11e01133 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c | |||
@@ -93,7 +93,7 @@ struct mpc52xx_pci { | |||
93 | }; | 93 | }; |
94 | 94 | ||
95 | /* MPC5200 device tree match tables */ | 95 | /* MPC5200 device tree match tables */ |
96 | const struct of_device_id mpc52xx_pci_ids[] __initconst = { | 96 | const struct of_device_id mpc52xx_pci_ids[] __initdata = { |
97 | { .type = "pci", .compatible = "fsl,mpc5200-pci", }, | 97 | { .type = "pci", .compatible = "fsl,mpc5200-pci", }, |
98 | { .type = "pci", .compatible = "mpc5200-pci", }, | 98 | { .type = "pci", .compatible = "mpc5200-pci", }, |
99 | {} | 99 | {} |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index b89ef65392d..1a9a4957057 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
@@ -132,7 +132,7 @@ static struct of_device_id mpc52xx_sdma_ids[] __initdata = { | |||
132 | 132 | ||
133 | static struct mpc52xx_intr __iomem *intr; | 133 | static struct mpc52xx_intr __iomem *intr; |
134 | static struct mpc52xx_sdma __iomem *sdma; | 134 | static struct mpc52xx_sdma __iomem *sdma; |
135 | static struct irq_domain *mpc52xx_irqhost = NULL; | 135 | static struct irq_host *mpc52xx_irqhost = NULL; |
136 | 136 | ||
137 | static unsigned char mpc52xx_map_senses[4] = { | 137 | static unsigned char mpc52xx_map_senses[4] = { |
138 | IRQ_TYPE_LEVEL_HIGH, | 138 | IRQ_TYPE_LEVEL_HIGH, |
@@ -301,7 +301,7 @@ static int mpc52xx_is_extirq(int l1, int l2) | |||
301 | /** | 301 | /** |
302 | * mpc52xx_irqhost_xlate - translate virq# from device tree interrupts property | 302 | * mpc52xx_irqhost_xlate - translate virq# from device tree interrupts property |
303 | */ | 303 | */ |
304 | static int mpc52xx_irqhost_xlate(struct irq_domain *h, struct device_node *ct, | 304 | static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct, |
305 | const u32 *intspec, unsigned int intsize, | 305 | const u32 *intspec, unsigned int intsize, |
306 | irq_hw_number_t *out_hwirq, | 306 | irq_hw_number_t *out_hwirq, |
307 | unsigned int *out_flags) | 307 | unsigned int *out_flags) |
@@ -335,7 +335,7 @@ static int mpc52xx_irqhost_xlate(struct irq_domain *h, struct device_node *ct, | |||
335 | /** | 335 | /** |
336 | * mpc52xx_irqhost_map - Hook to map from virq to an irq_chip structure | 336 | * mpc52xx_irqhost_map - Hook to map from virq to an irq_chip structure |
337 | */ | 337 | */ |
338 | static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq, | 338 | static int mpc52xx_irqhost_map(struct irq_host *h, unsigned int virq, |
339 | irq_hw_number_t irq) | 339 | irq_hw_number_t irq) |
340 | { | 340 | { |
341 | int l1irq; | 341 | int l1irq; |
@@ -372,11 +372,10 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq, | |||
372 | case MPC52xx_IRQ_L1_MAIN: irqchip = &mpc52xx_main_irqchip; break; | 372 | case MPC52xx_IRQ_L1_MAIN: irqchip = &mpc52xx_main_irqchip; break; |
373 | case MPC52xx_IRQ_L1_PERP: irqchip = &mpc52xx_periph_irqchip; break; | 373 | case MPC52xx_IRQ_L1_PERP: irqchip = &mpc52xx_periph_irqchip; break; |
374 | case MPC52xx_IRQ_L1_SDMA: irqchip = &mpc52xx_sdma_irqchip; break; | 374 | case MPC52xx_IRQ_L1_SDMA: irqchip = &mpc52xx_sdma_irqchip; break; |
375 | case MPC52xx_IRQ_L1_CRIT: | 375 | default: |
376 | pr_warn("%s: Critical IRQ #%d is unsupported! Nopping it.\n", | 376 | pr_err("%s: invalid irq: virq=%i, l1=%i, l2=%i\n", |
377 | __func__, l2irq); | 377 | __func__, virq, l1irq, l2irq); |
378 | irq_set_chip(virq, &no_irq_chip); | 378 | return -EINVAL; |
379 | return 0; | ||
380 | } | 379 | } |
381 | 380 | ||
382 | irq_set_chip_and_handler(virq, irqchip, handle_level_irq); | 381 | irq_set_chip_and_handler(virq, irqchip, handle_level_irq); |
@@ -385,7 +384,7 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq, | |||
385 | return 0; | 384 | return 0; |
386 | } | 385 | } |
387 | 386 | ||
388 | static const struct irq_domain_ops mpc52xx_irqhost_ops = { | 387 | static struct irq_host_ops mpc52xx_irqhost_ops = { |
389 | .xlate = mpc52xx_irqhost_xlate, | 388 | .xlate = mpc52xx_irqhost_xlate, |
390 | .map = mpc52xx_irqhost_map, | 389 | .map = mpc52xx_irqhost_map, |
391 | }; | 390 | }; |
@@ -445,9 +444,9 @@ void __init mpc52xx_init_irq(void) | |||
445 | * As last step, add an irq host to translate the real | 444 | * As last step, add an irq host to translate the real |
446 | * hw irq information provided by the ofw to linux virq | 445 | * hw irq information provided by the ofw to linux virq |
447 | */ | 446 | */ |
448 | mpc52xx_irqhost = irq_domain_add_linear(picnode, | 447 | mpc52xx_irqhost = irq_alloc_host(picnode, IRQ_HOST_MAP_LINEAR, |
449 | MPC52xx_IRQ_HIGHTESTHWIRQ, | 448 | MPC52xx_IRQ_HIGHTESTHWIRQ, |
450 | &mpc52xx_irqhost_ops, NULL); | 449 | &mpc52xx_irqhost_ops, -1); |
451 | 450 | ||
452 | if (!mpc52xx_irqhost) | 451 | if (!mpc52xx_irqhost) |
453 | panic(__FILE__ ": Cannot allocate the IRQ host\n"); | 452 | panic(__FILE__ ": Cannot allocate the IRQ host\n"); |