diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-11-11 18:12:33 (GMT) |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-11-11 18:12:33 (GMT) |
commit | e59d969f441fb8e25b30125bdf201153adc5a7e3 (patch) | |
tree | e18250fbc1bc9e2ca864292d2390325f8ac84c80 /drivers/mtd/nand/atmel_nand.c | |
parent | 4ddb1c295752252f61670e35c791bf16e58bbce6 (diff) | |
parent | f6f94f6660dbe34039e5c86a46c7845589e7ee0c (diff) | |
download | linux-fsl-qoriq-e59d969f441fb8e25b30125bdf201153adc5a7e3.tar.xz |
Merge branch 'at91' into devel
Diffstat (limited to 'drivers/mtd/nand/atmel_nand.c')
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 9144557..92623ac 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -41,6 +41,7 @@ #include <linux/gpio.h> #include <linux/io.h> #include <linux/platform_data/atmel.h> +#include <linux/pinctrl/consumer.h> #include <mach/cpu.h> @@ -1370,6 +1371,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev) struct resource *mem; struct mtd_part_parser_data ppdata = {}; int res; + struct pinctrl *pinctrl; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) { @@ -1414,6 +1416,13 @@ static int __init atmel_nand_probe(struct platform_device *pdev) nand_chip->IO_ADDR_W = host->io_base; nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl; + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) { + dev_err(host->dev, "Failed to request pinctrl\n"); + res = PTR_ERR(pinctrl); + goto err_ecc_ioremap; + } + if (gpio_is_valid(host->board.rdy_pin)) { res = gpio_request(host->board.rdy_pin, "nand_rdy"); if (res < 0) { |