aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/atmel_nand.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/atmel_nand.c')
-rw-r--r--drivers/mtd/nand/atmel_nand.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 914455783302..92623ac2015a 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -41,6 +41,7 @@
41#include <linux/gpio.h> 41#include <linux/gpio.h>
42#include <linux/io.h> 42#include <linux/io.h>
43#include <linux/platform_data/atmel.h> 43#include <linux/platform_data/atmel.h>
44#include <linux/pinctrl/consumer.h>
44 45
45#include <mach/cpu.h> 46#include <mach/cpu.h>
46 47
@@ -1370,6 +1371,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
1370 struct resource *mem; 1371 struct resource *mem;
1371 struct mtd_part_parser_data ppdata = {}; 1372 struct mtd_part_parser_data ppdata = {};
1372 int res; 1373 int res;
1374 struct pinctrl *pinctrl;
1373 1375
1374 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1376 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1375 if (!mem) { 1377 if (!mem) {
@@ -1414,6 +1416,13 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
1414 nand_chip->IO_ADDR_W = host->io_base; 1416 nand_chip->IO_ADDR_W = host->io_base;
1415 nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl; 1417 nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl;
1416 1418
1419 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
1420 if (IS_ERR(pinctrl)) {
1421 dev_err(host->dev, "Failed to request pinctrl\n");
1422 res = PTR_ERR(pinctrl);
1423 goto err_ecc_ioremap;
1424 }
1425
1417 if (gpio_is_valid(host->board.rdy_pin)) { 1426 if (gpio_is_valid(host->board.rdy_pin)) {
1418 res = gpio_request(host->board.rdy_pin, "nand_rdy"); 1427 res = gpio_request(host->board.rdy_pin, "nand_rdy");
1419 if (res < 0) { 1428 if (res < 0) {