mtd: mxc_nand: Make use of supplied pinctrl data
Subsystems (3)
PATCH 1/1 mtd: mxc_nand: Make use of supplied pinctrl data
The MXC NAND driver doesn't consider the pinctrl data supplied via DT, which will result in NAND pins not being properly configured.
Make the driver use pinctrl, but to prevent breakage on various boards, do not fail if the pinctrl data are not available, only print a warning message.
--- drivers/mtd/nand/mxc_nand.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/mtd/nand/mxc_nand.c +6 -0
@@ -34,6 +34,7 @@#include <linux/completion.h> #include <linux/of_device.h> #include <linux/of_mtd.h> +#include <linux/pinctrl/consumer.h> #include <asm/mach/flash.h> #include <linux/platform_data/mtd-mxc_nand.h>
@@ -1385,6 +1386,7 @@ static int mxcnd_probe(struct platform_device *pdev)struct mtd_info *mtd;struct mxc_nand_host *host;struct resource *res; +struct pinctrl *pinctrl;int err =0 ;/* Allocate memory for MTD device structure and private data */
@@ -1449,6 +1451,10 @@ static int mxcnd_probe(struct platform_device *pdev)if (!res)return -ENODEV ; + pinctrl =devm_pinctrl_get_select_default (&pdev->dev); +if (IS_ERR (pinctrl)) +dev_warn (&pdev->dev,"No PINCTRL data for the NAND driver!\n" ); + host->base =devm_request_and_ioremap (&pdev->dev, res);if (!host->base)return -ENOMEM ;
Signature · 1 line
1.7.10.4
Sascha Hauer
maintainerPATCH 1/1 mtd: mxc_nand: Make use of supplied pinctrl data
Quoted 10 lines · Marek Vasut
The MXC NAND driver doesn't consider the pinctrl data supplied via DT, which will result in NAND pins not being properly configured.
Make the driver use pinctrl, but to prevent breakage on various boards, do not fail if the pinctrl data are not available, only print a warning message.
Signed-off-by Marek Vasut <[email protected]>Cc Artem Bityutskiy <[email protected]>Cc Lothar Wa?mann <[email protected]>Cc Sascha Hauer <[email protected]>
Sascha
Quoted 43 lines
--- drivers/mtd/nand/mxc_nand.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/mtd/nand/mxc_nand.c +6
-0@@ -34,6 +34,7 @@#include <linux/completion.h> #include <linux/of_device.h> #include <linux/of_mtd.h> +#include <linux/pinctrl/consumer.h> #include <asm/mach/flash.h> #include <linux/platform_data/mtd-mxc_nand.h> @@ -1385,6 +1386,7 @@ static int mxcnd_probe(struct platform_device *pdev)struct mtd_info *mtd;struct mxc_nand_host *host;struct resource *res; +struct pinctrl *pinctrl;int err =0 ;/* Allocate memory for MTD device structure and private data */ @@ -1449,6 +1451,10 @@ static int mxcnd_probe(struct platform_device *pdev)if (!res)return -ENODEV ; + pinctrl =devm_pinctrl_get_select_default (&pdev->dev); +if (IS_ERR (pinctrl)) +dev_warn (&pdev->dev,"No PINCTRL data for the NAND driver!\n" ); + host->base =devm_request_and_ioremap (&pdev->dev, res);if (!host->base)return -ENOMEM ;Signature · 7 lines
1.7.10.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 1/1 mtd: mxc_nand: Make use of supplied pinctrl data
In reply to Marek VasutQuoted 5 lines · Marek Vasut
The MXC NAND driver doesn't consider the pinctrl data supplied via DT, which will result in NAND pins not being properly configured.
Make the driver use pinctrl, but to prevent breakage on various boards, do not fail if the pinctrl data are not available, only print a warning message.
nack
we will at bus level
Best Regards,
J.
Quoted 48 lines
Signed-off-by Marek Vasut <[email protected]>Cc Artem Bityutskiy <[email protected]>Cc Lothar Wa?mann <[email protected]>Cc Sascha Hauer <[email protected]>--- drivers/mtd/nand/mxc_nand.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/mtd/nand/mxc_nand.c +6
-0@@ -34,6 +34,7 @@#include <linux/completion.h> #include <linux/of_device.h> #include <linux/of_mtd.h> +#include <linux/pinctrl/consumer.h> #include <asm/mach/flash.h> #include <linux/platform_data/mtd-mxc_nand.h> @@ -1385,6 +1386,7 @@ static int mxcnd_probe(struct platform_device *pdev)struct mtd_info *mtd;struct mxc_nand_host *host;struct resource *res; +struct pinctrl *pinctrl;int err =0 ;/* Allocate memory for MTD device structure and private data */ @@ -1449,6 +1451,10 @@ static int mxcnd_probe(struct platform_device *pdev)if (!res)return -ENODEV ; + pinctrl =devm_pinctrl_get_select_default (&pdev->dev); +if (IS_ERR (pinctrl)) +dev_warn (&pdev->dev,"No PINCTRL data for the NAND driver!\n" ); + host->base =devm_request_and_ioremap (&pdev->dev, res);if (!host->base)return -ENOMEM ;Signature · 7 lines
1.7.10.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 mtd: mxc_nand: Make use of supplied pinctrl data
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 11 lines · Marek Vasut
Quoted 6 lines
The MXC NAND driver doesn't consider the pinctrl data supplied via DT, which will result in NAND pins not being properly configured.
Make the driver use pinctrl, but to prevent breakage on various boards, do not fail if the pinctrl data are not available, only print a warning message.
nack
we will at bus level
Can you please elaborate? I don't understand what you're complaining about at all, sorry.
Best regards,
Marek Vasut
PATCH 1/1 mtd: mxc_nand: Make use of supplied pinctrl data
Quoted 10 lines · Marek Vasut
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 8 lines · Marek Vasut
Quoted 6 lines
The MXC NAND driver doesn't consider the pinctrl data supplied via DT, which will result in NAND pins not being properly configured.
Make the driver use pinctrl, but to prevent breakage on various boards, do not fail if the pinctrl data are not available, only print a warning message.
Quoted 7 lines
Quoted 3 lines
nack
we will at bus level
Can you please elaborate? I don't understand what you're complaining about at all, sorry.
He is talking about patch [1] which is likely to hit mainline for 3.9.
Shawn
PATCH 1/1 mtd: mxc_nand: Make use of supplied pinctrl data
Dear Shawn Guo,
Quoted 15 lines · Marek Vasut
Quoted 14 lines
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 11 lines · Marek Vasut
Quoted 6 lines
The MXC NAND driver doesn't consider the pinctrl data supplied via DT, which will result in NAND pins not being properly configured.
Make the driver use pinctrl, but to prevent breakage on various boards, do not fail if the pinctrl data are not available, only print a warning message.
nack
we will at bus level
Quoted 8 lines
Quoted 2 lines
Can you please elaborate? I don't understand what you're complaining about at all, sorry.
He is talking about patch [1] which is likely to hit mainline for 3.9.
Shawn
Oh, this is good, thanks for explaining Shawn!
Well, this patch can be applied as a fallback if it doesn't hit 3.9 , either way works for me.
Best regards,
Marek Vasut