[PATCH v1] mtd: nand: tango: Reset pbus to raw mode in probe

Marc Gonzalez marc_gonzalez at sigmadesigns.com
Tue Jan 3 02:01:14 PST 2017

Linux should not expect the boot loader to properly configure the
peripheral bus "pad mode", so reset PBUS_PAD_MODE to raw.

Signed-off-by: Marc Gonzalez <marc_gonzalez at sigmadesigns.com>
 drivers/mtd/nand/tango_nand.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c
index d370c0382808..2456640fe4d5 100644
--- a/drivers/mtd/nand/tango_nand.c
+++ b/drivers/mtd/nand/tango_nand.c
@@ -644,6 +644,8 @@ static int tango_nand_probe(struct platform_device *pdev)
 	if (IS_ERR(nfc->pbus_base))
 		return PTR_ERR(nfc->pbus_base);
+	writel_relaxed(MODE_RAW, nfc->pbus_base + PBUS_PAD_MODE);
 	clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(clk))
 		return PTR_ERR(clk);

More information about the linux-arm-kernel mailing list