mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 22:47:56 +00:00
15a14cf166
The QorIQ LS1012A processor, optimized for battery-backed or USB-powered, integrates a single ARM Cortex-A53 core with a hardware packet forwarding engine and high-speed interfaces to deliver line-rate networking performance. QorIQ LS1012A Reference Design System (LS1012ARDB) is a high-performance development platform, with a complete debugging environment. The LS1012ARDB board supports the QorIQ LS1012A processor and is optimized to support the high-bandwidth DDR3L memory and a full complement of high-speed SerDes ports. LEDE/OPENWRT will auto strip executable program file while make. So we need select CONFIG_NO_STRIP=y while make menuconfig to avoid the ppfe network fiemware be destroyed, then run make to build ls1012ardb firmware. The fsl-quadspi flash with jffs2 fs is unstable and arise some failed message. This issue have noticed the IP owner for investigate, hope he can solve it earlier. So the ls1012ardb now also provide a xx-firmware.ext4.bin as default firmware, and the uboot bootcmd will run wrtboot_ext4rfs for "rootfstype=ext4" bootargs. Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
67 lines
2.1 KiB
Diff
67 lines
2.1 KiB
Diff
From 3a06c61b48fbc23046928275e37a693e1055ae74 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ezequiel=20Garc=C3=ADa?= <ezequiel@vanguardiasur.com.ar>
|
|
Date: Mon, 28 Dec 2015 17:54:51 -0300
|
|
Subject: [PATCH 086/113] mtd: spi-nor: wait until lock/unlock operations are
|
|
ready
|
|
|
|
On Micron and Numonyx devices, the status register write command
|
|
(WRSR), raises a work-in-progress bit (WIP) on the status register.
|
|
The datasheets for these devices specify that while the status
|
|
register write is in progress, the status register WIP bit can still
|
|
be read to check the end of the operation.
|
|
|
|
This commit adds a wait_till_ready call on lock/unlock operations,
|
|
which is required for Micron and Numonyx but should be harmless for
|
|
others. This is needed to prevent applications from issuing erase or
|
|
program operations before the unlock operation is completed.
|
|
|
|
Reported-by: Stas Sergeev <stsp@list.ru>
|
|
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
|
|
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
|
---
|
|
drivers/mtd/spi-nor/spi-nor.c | 12 ++++++++++--
|
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/mtd/spi-nor/spi-nor.c
|
|
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
|
@@ -481,6 +481,7 @@ static int stm_lock(struct spi_nor *nor,
|
|
int status_old, status_new;
|
|
u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
|
|
u8 shift = ffs(mask) - 1, pow, val;
|
|
+ int ret;
|
|
|
|
status_old = read_sr(nor);
|
|
if (status_old < 0)
|
|
@@ -519,7 +520,10 @@ static int stm_lock(struct spi_nor *nor,
|
|
return -EINVAL;
|
|
|
|
write_enable(nor);
|
|
- return write_sr(nor, status_new);
|
|
+ ret = write_sr(nor, status_new);
|
|
+ if (ret)
|
|
+ return ret;
|
|
+ return spi_nor_wait_till_ready(nor);
|
|
}
|
|
|
|
/*
|
|
@@ -533,6 +537,7 @@ static int stm_unlock(struct spi_nor *no
|
|
int status_old, status_new;
|
|
u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
|
|
u8 shift = ffs(mask) - 1, pow, val;
|
|
+ int ret;
|
|
|
|
status_old = read_sr(nor);
|
|
if (status_old < 0)
|
|
@@ -569,7 +574,10 @@ static int stm_unlock(struct spi_nor *no
|
|
return -EINVAL;
|
|
|
|
write_enable(nor);
|
|
- return write_sr(nor, status_new);
|
|
+ ret = write_sr(nor, status_new);
|
|
+ if (ret)
|
|
+ return ret;
|
|
+ return spi_nor_wait_till_ready(nor);
|
|
}
|
|
|
|
/*
|