projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ARM] Only call set_type method in setup_irq if it's defined
[powerpc.git]
/
arch
/
arm
/
common
/
sa1111.c
diff --git
a/arch/arm/common/sa1111.c
b/arch/arm/common/sa1111.c
index
174aa86
..
d0d6e6d
100644
(file)
--- a/
arch/arm/common/sa1111.c
+++ b/
arch/arm/common/sa1111.c
@@
-32,6
+32,7
@@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
+#include <asm/sizes.h>
#include <asm/hardware/sa1111.h>
#include <asm/hardware/sa1111.h>
@@
-132,6
+133,17
@@
static struct sa1111_dev_info sa1111_devices[] = {
},
};
},
};
+void __init sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes)
+{
+ unsigned int sz = SZ_1M >> PAGE_SHIFT;
+
+ if (node != 0)
+ sz = 0;
+
+ size[1] = size[0] - sz;
+ size[0] = sz;
+}
+
/*
* SA1111 interrupt support. Since clearing an IRQ while there are
* active IRQs causes the interrupt output to pulse, the upper levels
/*
* SA1111 interrupt support. Since clearing an IRQ while there are
* active IRQs causes the interrupt output to pulse, the upper levels
@@
-801,9
+813,9
@@
struct sa1111_save_data {
#ifdef CONFIG_PM
#ifdef CONFIG_PM
-static int sa1111_suspend(struct device *dev, pm_message_t state)
+static int sa1111_suspend(struct
platform_
device *dev, pm_message_t state)
{
{
- struct sa1111 *sachip =
dev
_get_drvdata(dev);
+ struct sa1111 *sachip =
platform
_get_drvdata(dev);
struct sa1111_save_data *save;
unsigned long flags;
unsigned int val;
struct sa1111_save_data *save;
unsigned long flags;
unsigned int val;
@@
-812,7
+824,7
@@
static int sa1111_suspend(struct device *dev, pm_message_t state)
save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
if (!save)
return -ENOMEM;
save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
if (!save)
return -ENOMEM;
- dev->power.saved_state = save;
+ dev->
dev.
power.saved_state = save;
spin_lock_irqsave(&sachip->lock, flags);
spin_lock_irqsave(&sachip->lock, flags);
@@
-859,14
+871,14
@@
static int sa1111_suspend(struct device *dev, pm_message_t state)
* restored by their respective drivers, and must be called
* via LDM after this function.
*/
* restored by their respective drivers, and must be called
* via LDM after this function.
*/
-static int sa1111_resume(struct device *dev)
+static int sa1111_resume(struct
platform_
device *dev)
{
{
- struct sa1111 *sachip =
dev
_get_drvdata(dev);
+ struct sa1111 *sachip =
platform
_get_drvdata(dev);
struct sa1111_save_data *save;
unsigned long flags, id;
void __iomem *base;
struct sa1111_save_data *save;
unsigned long flags, id;
void __iomem *base;
- save = (struct sa1111_save_data *)dev->power.saved_state;
+ save = (struct sa1111_save_data *)dev->
dev.
power.saved_state;
if (!save)
return 0;
if (!save)
return 0;
@@
-879,7
+891,7
@@
static int sa1111_resume(struct device *dev)
id = sa1111_readl(sachip->base + SA1111_SKID);
if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
__sa1111_remove(sachip);
id = sa1111_readl(sachip->base + SA1111_SKID);
if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
__sa1111_remove(sachip);
-
dev
_set_drvdata(dev, NULL);
+
platform
_set_drvdata(dev, NULL);
kfree(save);
return 0;
}
kfree(save);
return 0;
}
@@
-911,7
+923,7
@@
static int sa1111_resume(struct device *dev)
spin_unlock_irqrestore(&sachip->lock, flags);
spin_unlock_irqrestore(&sachip->lock, flags);
- dev->power.saved_state = NULL;
+ dev->
dev.
power.saved_state = NULL;
kfree(save);
return 0;
kfree(save);
return 0;
@@
-922,9
+934,8
@@
static int sa1111_resume(struct device *dev)
#define sa1111_resume NULL
#endif
#define sa1111_resume NULL
#endif
-static int sa1111_probe(struct
device *
dev)
+static int sa1111_probe(struct
platform_device *p
dev)
{
{
- struct platform_device *pdev = to_platform_device(dev);
struct resource *mem;
int irq;
struct resource *mem;
int irq;
@@
-933,20
+944,20
@@
static int sa1111_probe(struct device *dev)
return -EINVAL;
irq = platform_get_irq(pdev, 0);
return -EINVAL;
irq = platform_get_irq(pdev, 0);
- return __sa1111_probe(dev, mem, irq);
+ return __sa1111_probe(
&pdev->
dev, mem, irq);
}
}
-static int sa1111_remove(struct
device *
dev)
+static int sa1111_remove(struct
platform_device *p
dev)
{
{
- struct sa1111 *sachip =
dev_get_drvdata(
dev);
+ struct sa1111 *sachip =
platform_get_drvdata(p
dev);
if (sachip) {
__sa1111_remove(sachip);
if (sachip) {
__sa1111_remove(sachip);
-
dev_set_drvdata(
dev, NULL);
+
platform_set_drvdata(p
dev, NULL);
#ifdef CONFIG_PM
#ifdef CONFIG_PM
- kfree(
dev->
power.saved_state);
-
dev->
power.saved_state = NULL;
+ kfree(
pdev->dev.
power.saved_state);
+
pdev->dev.
power.saved_state = NULL;
#endif
}
#endif
}
@@
-962,13
+973,14
@@
static int sa1111_remove(struct device *dev)
* We also need to handle the SDRAM configuration for
* PXA250/SA1110 machine classes.
*/
* We also need to handle the SDRAM configuration for
* PXA250/SA1110 machine classes.
*/
-static struct device_driver sa1111_device_driver = {
- .name = "sa1111",
- .bus = &platform_bus_type,
+static struct platform_driver sa1111_device_driver = {
.probe = sa1111_probe,
.remove = sa1111_remove,
.suspend = sa1111_suspend,
.resume = sa1111_resume,
.probe = sa1111_probe,
.remove = sa1111_remove,
.suspend = sa1111_suspend,
.resume = sa1111_resume,
+ .driver = {
+ .name = "sa1111",
+ },
};
/*
};
/*
@@
-1256,17
+1268,17
@@
static int __init sa1111_init(void)
{
int ret = bus_register(&sa1111_bus_type);
if (ret == 0)
{
int ret = bus_register(&sa1111_bus_type);
if (ret == 0)
- driver_register(&sa1111_device_driver);
+
platform_
driver_register(&sa1111_device_driver);
return ret;
}
static void __exit sa1111_exit(void)
{
return ret;
}
static void __exit sa1111_exit(void)
{
- driver_unregister(&sa1111_device_driver);
+
platform_
driver_unregister(&sa1111_device_driver);
bus_unregister(&sa1111_bus_type);
}
bus_unregister(&sa1111_bus_type);
}
-
module_init
(sa1111_init);
+
subsys_initcall
(sa1111_init);
module_exit(sa1111_exit);
MODULE_DESCRIPTION("Intel Corporation SA1111 core driver");
module_exit(sa1111_exit);
MODULE_DESCRIPTION("Intel Corporation SA1111 core driver");