diff options
author | Tejun Heo <tj@kernel.org> | 2012-11-06 15:26:23 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-11-06 15:26:23 -0500 |
commit | 5b805f2a7675634fbdf9ac1c9b2256905ab2ea68 (patch) | |
tree | ee00d1e3d757458d66209b926d274491c6c3f61c /drivers/pinctrl/pinctrl-nomadik.c | |
parent | 1db1e31b1ee3ae126ef98f39083b5f213c7b41bf (diff) | |
parent | 201e72acb2d3821e2de9ce6091e98859c316b29a (diff) |
Merge branch 'cgroup/for-3.7-fixes' into cgroup/for-3.8
This is to receive device_cgroup fixes so that further device_cgroup
changes can be made in cgroup/for-3.8.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-nomadik.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-nomadik.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index fec9c30133d4..cf82d9ce4dee 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c | |||
@@ -30,7 +30,20 @@ | |||
30 | #include <linux/pinctrl/pinconf.h> | 30 | #include <linux/pinctrl/pinconf.h> |
31 | /* Since we request GPIOs from ourself */ | 31 | /* Since we request GPIOs from ourself */ |
32 | #include <linux/pinctrl/consumer.h> | 32 | #include <linux/pinctrl/consumer.h> |
33 | /* | ||
34 | * For the U8500 archs, use the PRCMU register interface, for the older | ||
35 | * Nomadik, provide some stubs. The functions using these will only be | ||
36 | * called on the U8500 series. | ||
37 | */ | ||
38 | #ifdef CONFIG_ARCH_U8500 | ||
33 | #include <linux/mfd/dbx500-prcmu.h> | 39 | #include <linux/mfd/dbx500-prcmu.h> |
40 | #else | ||
41 | static inline u32 prcmu_read(unsigned int reg) { | ||
42 | return 0; | ||
43 | } | ||
44 | static inline void prcmu_write(unsigned int reg, u32 value) {} | ||
45 | static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {} | ||
46 | #endif | ||
34 | 47 | ||
35 | #include <asm/mach/irq.h> | 48 | #include <asm/mach/irq.h> |
36 | 49 | ||
@@ -1043,7 +1056,7 @@ static int nmk_gpio_to_irq(struct gpio_chip *chip, unsigned offset) | |||
1043 | struct nmk_gpio_chip *nmk_chip = | 1056 | struct nmk_gpio_chip *nmk_chip = |
1044 | container_of(chip, struct nmk_gpio_chip, chip); | 1057 | container_of(chip, struct nmk_gpio_chip, chip); |
1045 | 1058 | ||
1046 | return irq_find_mapping(nmk_chip->domain, offset); | 1059 | return irq_create_mapping(nmk_chip->domain, offset); |
1047 | } | 1060 | } |
1048 | 1061 | ||
1049 | #ifdef CONFIG_DEBUG_FS | 1062 | #ifdef CONFIG_DEBUG_FS |
@@ -1268,6 +1281,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev) | |||
1268 | struct clk *clk; | 1281 | struct clk *clk; |
1269 | int secondary_irq; | 1282 | int secondary_irq; |
1270 | void __iomem *base; | 1283 | void __iomem *base; |
1284 | int irq_start = 0; | ||
1271 | int irq; | 1285 | int irq; |
1272 | int ret; | 1286 | int ret; |
1273 | 1287 | ||
@@ -1371,19 +1385,11 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev) | |||
1371 | 1385 | ||
1372 | platform_set_drvdata(dev, nmk_chip); | 1386 | platform_set_drvdata(dev, nmk_chip); |
1373 | 1387 | ||
1374 | if (np) { | 1388 | if (!np) |
1375 | /* The DT case will just grab a set of IRQ numbers */ | ||
1376 | nmk_chip->domain = irq_domain_add_linear(np, NMK_GPIO_PER_CHIP, | ||
1377 | &nmk_gpio_irq_simple_ops, nmk_chip); | ||
1378 | } else { | ||
1379 | /* Non-DT legacy mode, use hardwired IRQ numbers */ | ||
1380 | int irq_start; | ||
1381 | |||
1382 | irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); | 1389 | irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); |
1383 | nmk_chip->domain = irq_domain_add_simple(NULL, | 1390 | nmk_chip->domain = irq_domain_add_simple(np, |
1384 | NMK_GPIO_PER_CHIP, irq_start, | 1391 | NMK_GPIO_PER_CHIP, irq_start, |
1385 | &nmk_gpio_irq_simple_ops, nmk_chip); | 1392 | &nmk_gpio_irq_simple_ops, nmk_chip); |
1386 | } | ||
1387 | if (!nmk_chip->domain) { | 1393 | if (!nmk_chip->domain) { |
1388 | dev_err(&dev->dev, "failed to create irqdomain\n"); | 1394 | dev_err(&dev->dev, "failed to create irqdomain\n"); |
1389 | ret = -ENOSYS; | 1395 | ret = -ENOSYS; |