mtd: nand: tango: Reset pbus to raw mode in probe

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Jan 5 10:59:02 PST 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8043d25b3c0fa0a8f531333707f682f03b6febdb
Commit:     8043d25b3c0fa0a8f531333707f682f03b6febdb
Parent:     7165b8ad36f8bda42a5a8aa059b9a5071acc2210
Author:     Marc Gonzalez <marc_gonzalez at sigmadesigns.com>
AuthorDate: Tue Jan 3 11:01:14 2017 +0100
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Tue Jan 3 11:58:35 2017 +0100

    mtd: nand: tango: Reset pbus to raw mode in probe
    
    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>
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.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 78a65f6..4a5e948 100644
--- a/drivers/mtd/nand/tango_nand.c
+++ b/drivers/mtd/nand/tango_nand.c
@@ -632,6 +632,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-mtd-cvs mailing list