diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-29 20:25:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-29 20:25:48 -0500 |
commit | 9ca0e5474d11ca044e0aacfa6e78bf17957118d2 (patch) | |
tree | 2ffa4b51a73070e41b53644e0adfd39adf1eb501 /drivers | |
parent | c0f79c4cb11acca545f9802ee0e14ad3b5cc123d (diff) | |
parent | 9f0f9313cec8c76c89bc8a68653f928fa12fab96 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 3914/1: [Jornada7xx] - Typo Fix in cpu-sa1110.c (b != B)
[ARM] 3913/1: n2100: fix IRQ routing for second ethernet port
[ARM] Add KBUILD_IMAGE target support
[ARM] Fix suspend oops caused by PXA2xx PCMCIA driver
[ARM] Fix i2c-pxa slave mode support
[ARM] 3900/1: Fix VFP Division by Zero exception handling.
[ARM] 3899/1: Fix the normalization of the denormal double precision number.
[ARM] 3909/1: Disable UWIND_INFO for ARM (again)
[ARM] Add __must_check to uaccess functions
[ARM] Add realview SMP default configuration
[ARM] Fix SMP irqflags support
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 8 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_base.c | 41 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_base.h | 2 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_lubbock.c | 2 |
4 files changed, 37 insertions, 16 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 81050d3c9b21..c95a6c154165 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -272,7 +272,8 @@ static int i2c_pxa_wait_slave(struct pxa_i2c *i2c) | |||
272 | dev_dbg(&i2c->adap.dev, "%s: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n", | 272 | dev_dbg(&i2c->adap.dev, "%s: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n", |
273 | __func__, (long)jiffies, ISR, ICR, IBMR); | 273 | __func__, (long)jiffies, ISR, ICR, IBMR); |
274 | 274 | ||
275 | if ((ISR & (ISR_UB|ISR_IBB|ISR_SAD)) == ISR_SAD || | 275 | if ((ISR & (ISR_UB|ISR_IBB)) == 0 || |
276 | (ISR & ISR_SAD) != 0 || | ||
276 | (ICR & ICR_SCLE) == 0) { | 277 | (ICR & ICR_SCLE) == 0) { |
277 | if (i2c_debug > 1) | 278 | if (i2c_debug > 1) |
278 | dev_dbg(&i2c->adap.dev, "%s: done\n", __func__); | 279 | dev_dbg(&i2c->adap.dev, "%s: done\n", __func__); |
@@ -492,7 +493,10 @@ static void i2c_pxa_slave_txempty(struct pxa_i2c *i2c, u32 isr) | |||
492 | if (isr & ISR_BED) { | 493 | if (isr & ISR_BED) { |
493 | /* what should we do here? */ | 494 | /* what should we do here? */ |
494 | } else { | 495 | } else { |
495 | int ret = i2c->slave->read(i2c->slave->data); | 496 | int ret = 0; |
497 | |||
498 | if (i2c->slave != NULL) | ||
499 | ret = i2c->slave->read(i2c->slave->data); | ||
496 | 500 | ||
497 | IDBR = ret; | 501 | IDBR = ret; |
498 | ICR |= ICR_TB; /* allow next byte */ | 502 | ICR |= ICR_TB; /* allow next byte */ |
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index b3518131ea0d..dca9f8549b32 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
@@ -166,7 +166,7 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt, | |||
166 | } | 166 | } |
167 | #endif | 167 | #endif |
168 | 168 | ||
169 | int pxa2xx_drv_pcmcia_probe(struct device *dev) | 169 | int __pxa2xx_drv_pcmcia_probe(struct device *dev) |
170 | { | 170 | { |
171 | int ret; | 171 | int ret; |
172 | struct pcmcia_low_level *ops; | 172 | struct pcmcia_low_level *ops; |
@@ -203,35 +203,52 @@ int pxa2xx_drv_pcmcia_probe(struct device *dev) | |||
203 | 203 | ||
204 | return ret; | 204 | return ret; |
205 | } | 205 | } |
206 | EXPORT_SYMBOL(pxa2xx_drv_pcmcia_probe); | 206 | EXPORT_SYMBOL(__pxa2xx_drv_pcmcia_probe); |
207 | 207 | ||
208 | static int pxa2xx_drv_pcmcia_resume(struct device *dev) | 208 | |
209 | static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev) | ||
210 | { | ||
211 | return __pxa2xx_drv_pcmcia_probe(&dev->dev); | ||
212 | } | ||
213 | |||
214 | static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev) | ||
215 | { | ||
216 | return soc_common_drv_pcmcia_remove(&dev->dev); | ||
217 | } | ||
218 | |||
219 | static int pxa2xx_drv_pcmcia_suspend(struct platform_device *dev, pm_message_t state) | ||
220 | { | ||
221 | return pcmcia_socket_dev_suspend(&dev->dev, state); | ||
222 | } | ||
223 | |||
224 | static int pxa2xx_drv_pcmcia_resume(struct platform_device *dev) | ||
209 | { | 225 | { |
210 | struct pcmcia_low_level *ops = dev->platform_data; | 226 | struct pcmcia_low_level *ops = dev->dev.platform_data; |
211 | int nr = ops ? ops->nr : 0; | 227 | int nr = ops ? ops->nr : 0; |
212 | 228 | ||
213 | MECR = nr > 1 ? MECR_CIT | MECR_NOS : (nr > 0 ? MECR_CIT : 0); | 229 | MECR = nr > 1 ? MECR_CIT | MECR_NOS : (nr > 0 ? MECR_CIT : 0); |
214 | 230 | ||
215 | return pcmcia_socket_dev_resume(dev); | 231 | return pcmcia_socket_dev_resume(&dev->dev); |
216 | } | 232 | } |
217 | 233 | ||
218 | static struct device_driver pxa2xx_pcmcia_driver = { | 234 | static struct platform_driver pxa2xx_pcmcia_driver = { |
219 | .probe = pxa2xx_drv_pcmcia_probe, | 235 | .probe = pxa2xx_drv_pcmcia_probe, |
220 | .remove = soc_common_drv_pcmcia_remove, | 236 | .remove = pxa2xx_drv_pcmcia_remove, |
221 | .suspend = pcmcia_socket_dev_suspend, | 237 | .suspend = pxa2xx_drv_pcmcia_suspend, |
222 | .resume = pxa2xx_drv_pcmcia_resume, | 238 | .resume = pxa2xx_drv_pcmcia_resume, |
223 | .name = "pxa2xx-pcmcia", | 239 | .driver = { |
224 | .bus = &platform_bus_type, | 240 | .name = "pxa2xx-pcmcia", |
241 | }, | ||
225 | }; | 242 | }; |
226 | 243 | ||
227 | static int __init pxa2xx_pcmcia_init(void) | 244 | static int __init pxa2xx_pcmcia_init(void) |
228 | { | 245 | { |
229 | return driver_register(&pxa2xx_pcmcia_driver); | 246 | return platform_driver_register(&pxa2xx_pcmcia_driver); |
230 | } | 247 | } |
231 | 248 | ||
232 | static void __exit pxa2xx_pcmcia_exit(void) | 249 | static void __exit pxa2xx_pcmcia_exit(void) |
233 | { | 250 | { |
234 | driver_unregister(&pxa2xx_pcmcia_driver); | 251 | platform_driver_unregister(&pxa2xx_pcmcia_driver); |
235 | } | 252 | } |
236 | 253 | ||
237 | fs_initcall(pxa2xx_pcmcia_init); | 254 | fs_initcall(pxa2xx_pcmcia_init); |
diff --git a/drivers/pcmcia/pxa2xx_base.h b/drivers/pcmcia/pxa2xx_base.h index e46cff345d47..235d681652c3 100644 --- a/drivers/pcmcia/pxa2xx_base.h +++ b/drivers/pcmcia/pxa2xx_base.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* temporary measure */ | 1 | /* temporary measure */ |
2 | extern int pxa2xx_drv_pcmcia_probe(struct device *); | 2 | extern int __pxa2xx_drv_pcmcia_probe(struct device *); |
3 | 3 | ||
diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c index fd1f691c7c2c..a92f11143c43 100644 --- a/drivers/pcmcia/pxa2xx_lubbock.c +++ b/drivers/pcmcia/pxa2xx_lubbock.c | |||
@@ -260,7 +260,7 @@ int __init pcmcia_lubbock_init(struct sa1111_dev *sadev) | |||
260 | lubbock_set_misc_wr((1 << 15) | (1 << 14), 0); | 260 | lubbock_set_misc_wr((1 << 15) | (1 << 14), 0); |
261 | 261 | ||
262 | sadev->dev.platform_data = &lubbock_pcmcia_ops; | 262 | sadev->dev.platform_data = &lubbock_pcmcia_ops; |
263 | ret = pxa2xx_drv_pcmcia_probe(&sadev->dev); | 263 | ret = __pxa2xx_drv_pcmcia_probe(&sadev->dev); |
264 | } | 264 | } |
265 | 265 | ||
266 | return ret; | 266 | return ret; |