aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 17:07:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 17:07:35 -0400
commit15fc204afc6feb915c400159546f646eca8ba1d9 (patch)
tree51bec0710be2a0cb0bedbccbea7813f17fbc61ea /drivers
parentd2aa4550379f92e929af7ed1dd4f55e6a1e331f8 (diff)
parent944557116908cbe835be41bfbd39d9706da9fd71 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (56 commits) sh: Fix declaration of __kernel_sigreturn and __kernel_rt_sigreturn sh: Enable soc-camera in ap325rxa/migor/se7724 defconfigs. sh: remove stray markers. sh: defconfig updates. sh: pci: Initial PCI-Express support for SH7786 Urquell board. sh: Generic HAVE_PERF_COUNTER support. SH: convert migor to soc-camera as platform-device SH: convert ap325rxa to soc-camera as platform-device soc-camera: unify i2c camera device platform data sh: add platform data for r8a66597-hcd in setup-sh7723 sh: add platform data for r8a66597-hcd in setup-sh7366 sh: x3proto: add platform data for r8a66597-hcd sh: highlander: add platform data for r8a66597-hcd sh: sh7785lcr: add platform data for r8a66597-hcd sh: turn off irqs when disabling CMT/TMU timers sh: use kzalloc() for cpg clocks sh: unbreak WARN_ON() sh: Use generic atomic64_t implementation. sh: Revised clock function in highlander sh: Update r7780mp defconfig ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clocksource/sh_cmt.c4
-rw-r--r--drivers/clocksource/sh_mtu2.c1
-rw-r--r--drivers/clocksource/sh_tmu.c4
-rw-r--r--drivers/media/video/ov772x.c6
-rw-r--r--drivers/media/video/tw9910.c6
-rw-r--r--drivers/serial/sh-sci.c18
-rw-r--r--drivers/sh/intc.c13
7 files changed, 30 insertions, 22 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index cf56a2af5fe1..2964f5f4a7ef 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -184,6 +184,9 @@ static void sh_cmt_disable(struct sh_cmt_priv *p)
184 /* disable channel */ 184 /* disable channel */
185 sh_cmt_start_stop_ch(p, 0); 185 sh_cmt_start_stop_ch(p, 0);
186 186
187 /* disable interrupts in CMT block */
188 sh_cmt_write(p, CMCSR, 0);
189
187 /* stop clock */ 190 /* stop clock */
188 clk_disable(p->clk); 191 clk_disable(p->clk);
189} 192}
@@ -599,7 +602,6 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
599 p->irqaction.handler = sh_cmt_interrupt; 602 p->irqaction.handler = sh_cmt_interrupt;
600 p->irqaction.dev_id = p; 603 p->irqaction.dev_id = p;
601 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; 604 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL;
602 p->irqaction.mask = CPU_MASK_NONE;
603 ret = setup_irq(irq, &p->irqaction); 605 ret = setup_irq(irq, &p->irqaction);
604 if (ret) { 606 if (ret) {
605 pr_err("sh_cmt: failed to request irq %d\n", irq); 607 pr_err("sh_cmt: failed to request irq %d\n", irq);
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index d1ae75454d10..973e714d6051 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -283,7 +283,6 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
283 p->irqaction.dev_id = p; 283 p->irqaction.dev_id = p;
284 p->irqaction.irq = irq; 284 p->irqaction.irq = irq;
285 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; 285 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL;
286 p->irqaction.mask = CPU_MASK_NONE;
287 286
288 /* get hold of clock */ 287 /* get hold of clock */
289 p->clk = clk_get(&p->pdev->dev, cfg->clk); 288 p->clk = clk_get(&p->pdev->dev, cfg->clk);
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index d6ea4398bf62..9ffb05f4095d 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -138,6 +138,9 @@ static void sh_tmu_disable(struct sh_tmu_priv *p)
138 /* disable channel */ 138 /* disable channel */
139 sh_tmu_start_stop_ch(p, 0); 139 sh_tmu_start_stop_ch(p, 0);
140 140
141 /* disable interrupts in TMU block */
142 sh_tmu_write(p, TCR, 0x0000);
143
141 /* stop clock */ 144 /* stop clock */
142 clk_disable(p->clk); 145 clk_disable(p->clk);
143} 146}
@@ -385,7 +388,6 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
385 p->irqaction.dev_id = p; 388 p->irqaction.dev_id = p;
386 p->irqaction.irq = irq; 389 p->irqaction.irq = irq;
387 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; 390 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL;
388 p->irqaction.mask = CPU_MASK_NONE;
389 391
390 /* get hold of clock */ 392 /* get hold of clock */
391 p->clk = clk_get(&p->pdev->dev, cfg->clk); 393 p->clk = clk_get(&p->pdev->dev, cfg->clk);
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index c0d911252862..0bce255168bd 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
@@ -1067,10 +1067,12 @@ static int ov772x_probe(struct i2c_client *client,
1067 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 1067 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
1068 int ret; 1068 int ret;
1069 1069
1070 info = client->dev.platform_data; 1070 if (!client->dev.platform_data)
1071 if (!info)
1072 return -EINVAL; 1071 return -EINVAL;
1073 1072
1073 info = container_of(client->dev.platform_data,
1074 struct ov772x_camera_info, link);
1075
1074 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { 1076 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
1075 dev_err(&adapter->dev, 1077 dev_err(&adapter->dev,
1076 "I2C-Adapter doesn't support " 1078 "I2C-Adapter doesn't support "
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index a39947643992..aa5065ea09ed 100644
--- a/drivers/media/video/tw9910.c
+++ b/drivers/media/video/tw9910.c
@@ -875,10 +875,12 @@ static int tw9910_probe(struct i2c_client *client,
875 const struct tw9910_scale_ctrl *scale; 875 const struct tw9910_scale_ctrl *scale;
876 int i, ret; 876 int i, ret;
877 877
878 info = client->dev.platform_data; 878 if (!client->dev.platform_data)
879 if (!info)
880 return -EINVAL; 879 return -EINVAL;
881 880
881 info = container_of(client->dev.platform_data,
882 struct tw9910_video_info, link);
883
882 if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent), 884 if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent),
883 I2C_FUNC_SMBUS_BYTE_DATA)) { 885 I2C_FUNC_SMBUS_BYTE_DATA)) {
884 dev_err(&client->dev, 886 dev_err(&client->dev,
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index a4cf1079b312..66f52674ca0c 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1332,44 +1332,46 @@ err_unreg:
1332 return ret; 1332 return ret;
1333} 1333}
1334 1334
1335static int sci_suspend(struct platform_device *dev, pm_message_t state) 1335static int sci_suspend(struct device *dev)
1336{ 1336{
1337 struct sh_sci_priv *priv = platform_get_drvdata(dev); 1337 struct sh_sci_priv *priv = dev_get_drvdata(dev);
1338 struct sci_port *p; 1338 struct sci_port *p;
1339 unsigned long flags; 1339 unsigned long flags;
1340 1340
1341 spin_lock_irqsave(&priv->lock, flags); 1341 spin_lock_irqsave(&priv->lock, flags);
1342 list_for_each_entry(p, &priv->ports, node) 1342 list_for_each_entry(p, &priv->ports, node)
1343 uart_suspend_port(&sci_uart_driver, &p->port); 1343 uart_suspend_port(&sci_uart_driver, &p->port);
1344
1345 spin_unlock_irqrestore(&priv->lock, flags); 1344 spin_unlock_irqrestore(&priv->lock, flags);
1346 1345
1347 return 0; 1346 return 0;
1348} 1347}
1349 1348
1350static int sci_resume(struct platform_device *dev) 1349static int sci_resume(struct device *dev)
1351{ 1350{
1352 struct sh_sci_priv *priv = platform_get_drvdata(dev); 1351 struct sh_sci_priv *priv = dev_get_drvdata(dev);
1353 struct sci_port *p; 1352 struct sci_port *p;
1354 unsigned long flags; 1353 unsigned long flags;
1355 1354
1356 spin_lock_irqsave(&priv->lock, flags); 1355 spin_lock_irqsave(&priv->lock, flags);
1357 list_for_each_entry(p, &priv->ports, node) 1356 list_for_each_entry(p, &priv->ports, node)
1358 uart_resume_port(&sci_uart_driver, &p->port); 1357 uart_resume_port(&sci_uart_driver, &p->port);
1359
1360 spin_unlock_irqrestore(&priv->lock, flags); 1358 spin_unlock_irqrestore(&priv->lock, flags);
1361 1359
1362 return 0; 1360 return 0;
1363} 1361}
1364 1362
1363static struct dev_pm_ops sci_dev_pm_ops = {
1364 .suspend = sci_suspend,
1365 .resume = sci_resume,
1366};
1367
1365static struct platform_driver sci_driver = { 1368static struct platform_driver sci_driver = {
1366 .probe = sci_probe, 1369 .probe = sci_probe,
1367 .remove = __devexit_p(sci_remove), 1370 .remove = __devexit_p(sci_remove),
1368 .suspend = sci_suspend,
1369 .resume = sci_resume,
1370 .driver = { 1371 .driver = {
1371 .name = "sh-sci", 1372 .name = "sh-sci",
1372 .owner = THIS_MODULE, 1373 .owner = THIS_MODULE,
1374 .pm = &sci_dev_pm_ops,
1373 }, 1375 },
1374}; 1376};
1375 1377
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c
index d687a9b93d03..3dd231a643b5 100644
--- a/drivers/sh/intc.c
+++ b/drivers/sh/intc.c
@@ -20,7 +20,6 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/bootmem.h>
24#include <linux/sh_intc.h> 23#include <linux/sh_intc.h>
25#include <linux/sysdev.h> 24#include <linux/sysdev.h>
26#include <linux/list.h> 25#include <linux/list.h>
@@ -675,7 +674,7 @@ void __init register_intc_controller(struct intc_desc *desc)
675 unsigned int i, k, smp; 674 unsigned int i, k, smp;
676 struct intc_desc_int *d; 675 struct intc_desc_int *d;
677 676
678 d = alloc_bootmem(sizeof(*d)); 677 d = kzalloc(sizeof(*d), GFP_NOWAIT);
679 678
680 INIT_LIST_HEAD(&d->list); 679 INIT_LIST_HEAD(&d->list);
681 list_add(&d->list, &intc_list); 680 list_add(&d->list, &intc_list);
@@ -687,9 +686,9 @@ void __init register_intc_controller(struct intc_desc *desc)
687#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) 686#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
688 d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0; 687 d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0;
689#endif 688#endif
690 d->reg = alloc_bootmem(d->nr_reg * sizeof(*d->reg)); 689 d->reg = kzalloc(d->nr_reg * sizeof(*d->reg), GFP_NOWAIT);
691#ifdef CONFIG_SMP 690#ifdef CONFIG_SMP
692 d->smp = alloc_bootmem(d->nr_reg * sizeof(*d->smp)); 691 d->smp = kzalloc(d->nr_reg * sizeof(*d->smp), GFP_NOWAIT);
693#endif 692#endif
694 k = 0; 693 k = 0;
695 694
@@ -702,7 +701,7 @@ void __init register_intc_controller(struct intc_desc *desc)
702 } 701 }
703 702
704 if (desc->prio_regs) { 703 if (desc->prio_regs) {
705 d->prio = alloc_bootmem(desc->nr_vectors * sizeof(*d->prio)); 704 d->prio = kzalloc(desc->nr_vectors * sizeof(*d->prio), GFP_NOWAIT);
706 705
707 for (i = 0; i < desc->nr_prio_regs; i++) { 706 for (i = 0; i < desc->nr_prio_regs; i++) {
708 smp = IS_SMP(desc->prio_regs[i]); 707 smp = IS_SMP(desc->prio_regs[i]);
@@ -712,7 +711,7 @@ void __init register_intc_controller(struct intc_desc *desc)
712 } 711 }
713 712
714 if (desc->sense_regs) { 713 if (desc->sense_regs) {
715 d->sense = alloc_bootmem(desc->nr_vectors * sizeof(*d->sense)); 714 d->sense = kzalloc(desc->nr_vectors * sizeof(*d->sense), GFP_NOWAIT);
716 715
717 for (i = 0; i < desc->nr_sense_regs; i++) { 716 for (i = 0; i < desc->nr_sense_regs; i++) {
718 k += save_reg(d, k, desc->sense_regs[i].reg, 0); 717 k += save_reg(d, k, desc->sense_regs[i].reg, 0);
@@ -757,7 +756,7 @@ void __init register_intc_controller(struct intc_desc *desc)
757 vect2->enum_id = 0; 756 vect2->enum_id = 0;
758 757
759 if (!intc_evt2irq_table) 758 if (!intc_evt2irq_table)
760 intc_evt2irq_table = alloc_bootmem(NR_IRQS); 759 intc_evt2irq_table = kzalloc(NR_IRQS, GFP_NOWAIT);
761 760
762 if (!intc_evt2irq_table) { 761 if (!intc_evt2irq_table) {
763 pr_warning("intc: cannot allocate evt2irq!\n"); 762 pr_warning("intc: cannot allocate evt2irq!\n");