diff options
| author | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2012-12-19 06:31:11 -0500 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2012-12-19 17:15:14 -0500 |
| commit | bc1008cf7d243cf6ad87b1e16d3dbbd8c8d6f35c (patch) | |
| tree | deeda109d75da9c4035e766f59bdb1c4ffaa0fb0 | |
| parent | d39a948fef2446cfac3749bbfcfdd536335c3764 (diff) | |
gpio/mvebu-gpio: Make mvebu-gpio depend on OF_CONFIG
When building without device tree support (for the mv78x00 SoCs for
example), the build failed because of_irq_count is undeclared. However
mvebu-gpio is not designed to build without device tree support. So
make it depends on OF_CONFIG, remove the #ifdef OF_CONFIG line and the
platform_device_id.
Tested on RD-78x00-mASA, DB-78460-BP, DB-88F6710-BP-DDR3,
DB-MV784MP-GP, Mirabox and OpenBlocks AX3.
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| -rw-r--r-- | drivers/gpio/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/gpio/gpio-mvebu.c | 17 |
2 files changed, 1 insertions, 17 deletions
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 8ae1f5b1966..682de754d63 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
| @@ -172,6 +172,7 @@ config GPIO_MSM_V2 | |||
| 172 | config GPIO_MVEBU | 172 | config GPIO_MVEBU |
| 173 | def_bool y | 173 | def_bool y |
| 174 | depends on PLAT_ORION | 174 | depends on PLAT_ORION |
| 175 | depends on OF | ||
| 175 | select GPIO_GENERIC | 176 | select GPIO_GENERIC |
| 176 | select GENERIC_IRQ_CHIP | 177 | select GENERIC_IRQ_CHIP |
| 177 | 178 | ||
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index d767b534c4a..7d9bd94be8d 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | #include <linux/io.h> | 41 | #include <linux/io.h> |
| 42 | #include <linux/of_irq.h> | 42 | #include <linux/of_irq.h> |
| 43 | #include <linux/of_device.h> | 43 | #include <linux/of_device.h> |
| 44 | #include <linux/platform_device.h> | ||
| 45 | #include <linux/pinctrl/consumer.h> | 44 | #include <linux/pinctrl/consumer.h> |
| 46 | 45 | ||
| 47 | /* | 46 | /* |
| @@ -469,19 +468,6 @@ static void mvebu_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
| 469 | } | 468 | } |
| 470 | } | 469 | } |
| 471 | 470 | ||
| 472 | static struct platform_device_id mvebu_gpio_ids[] = { | ||
| 473 | { | ||
| 474 | .name = "orion-gpio", | ||
| 475 | }, { | ||
| 476 | .name = "mv78200-gpio", | ||
| 477 | }, { | ||
| 478 | .name = "armadaxp-gpio", | ||
| 479 | }, { | ||
| 480 | /* sentinel */ | ||
| 481 | }, | ||
| 482 | }; | ||
| 483 | MODULE_DEVICE_TABLE(platform, mvebu_gpio_ids); | ||
| 484 | |||
| 485 | static struct of_device_id mvebu_gpio_of_match[] = { | 471 | static struct of_device_id mvebu_gpio_of_match[] = { |
| 486 | { | 472 | { |
| 487 | .compatible = "marvell,orion-gpio", | 473 | .compatible = "marvell,orion-gpio", |
| @@ -555,9 +541,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev) | |||
| 555 | mvchip->chip.base = id * MVEBU_MAX_GPIO_PER_BANK; | 541 | mvchip->chip.base = id * MVEBU_MAX_GPIO_PER_BANK; |
| 556 | mvchip->chip.ngpio = ngpios; | 542 | mvchip->chip.ngpio = ngpios; |
| 557 | mvchip->chip.can_sleep = 0; | 543 | mvchip->chip.can_sleep = 0; |
| 558 | #ifdef CONFIG_OF | ||
| 559 | mvchip->chip.of_node = np; | 544 | mvchip->chip.of_node = np; |
| 560 | #endif | ||
| 561 | 545 | ||
| 562 | spin_lock_init(&mvchip->lock); | 546 | spin_lock_init(&mvchip->lock); |
| 563 | mvchip->membase = devm_request_and_ioremap(&pdev->dev, res); | 547 | mvchip->membase = devm_request_and_ioremap(&pdev->dev, res); |
| @@ -698,7 +682,6 @@ static struct platform_driver mvebu_gpio_driver = { | |||
| 698 | .of_match_table = mvebu_gpio_of_match, | 682 | .of_match_table = mvebu_gpio_of_match, |
| 699 | }, | 683 | }, |
| 700 | .probe = mvebu_gpio_probe, | 684 | .probe = mvebu_gpio_probe, |
| 701 | .id_table = mvebu_gpio_ids, | ||
| 702 | }; | 685 | }; |
| 703 | 686 | ||
| 704 | static int __init mvebu_gpio_init(void) | 687 | static int __init mvebu_gpio_init(void) |
