diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-03-22 16:07:22 -0400 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-03-28 08:19:45 -0400 |
commit | cc5d8031f8c7b11c325a37118f9aa6133f0b28a0 (patch) | |
tree | 7490ce79c2d8410002f7226df717c52ca6c9fb91 /drivers/mtd/nand | |
parent | e93c1640e0387ab55b98b4e04600050f2beceac1 (diff) |
mtd: nand: denali: set DEVICES_CONNECTED 1 if not set
Currently, the driver expects DEVICE_CONNECTED is automatically set
by the hardware, but this feature is disabled in some cases.
In such cases, it is the software's responsibility to set up the
DEVICES_CONNECTED register.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/denali.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index e1c45bf2656d..b442a3ed9f0f 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c | |||
@@ -1417,6 +1417,15 @@ static int denali_multidev_fixup(struct denali_nand_info *denali) | |||
1417 | */ | 1417 | */ |
1418 | denali->devnum = ioread32(denali->flash_reg + DEVICES_CONNECTED); | 1418 | denali->devnum = ioread32(denali->flash_reg + DEVICES_CONNECTED); |
1419 | 1419 | ||
1420 | /* | ||
1421 | * On some SoCs, DEVICES_CONNECTED is not auto-detected. | ||
1422 | * For those, DEVICES_CONNECTED is left to 0. Set 1 if it is the case. | ||
1423 | */ | ||
1424 | if (denali->devnum == 0) { | ||
1425 | denali->devnum = 1; | ||
1426 | iowrite32(1, denali->flash_reg + DEVICES_CONNECTED); | ||
1427 | } | ||
1428 | |||
1420 | if (denali->devnum == 1) | 1429 | if (denali->devnum == 1) |
1421 | return 0; | 1430 | return 0; |
1422 | 1431 | ||