OMAP2+: GPMC: NAND fixes for 3.17
Subsystems (7)
cover OMAP2+: GPMC: NAND fixes for 3.17
Hi Tony,
These are some of the issues I found while testing v3.17-rc3.
- Wrong ECC scheme used for am43x GP and EPOS evm. We need to use BCH16 instead of BCH8.
- Wrong read/write wait pin monitoring setting used for NAND resulting in "L3 application error" debug message on console.
- Pin conflict issue on am43x EPOS evm with QSPI and NAND.
Patches are available at
[email protected]:rogerq/linux.git
* [new branch] for-v3.17/gpmc-fixes
cheers,
-roger
Roger Quadros (6):
ARM: dts: am43x-epos-evm: Use BCH16 ECC scheme instead of BCH8
ARM: dts: am437x-gp-evm: Use BCH16 ECC scheme instead of BCH8
ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring
ARM: dts: am43xx-epos-evm: Don't use read/write wait monitoring
ARM: OMAP2+: gpmc: Don't complain if wait pin is used without r/w
monitoring
ARM: dts: am43x-epos-evm: Disable QSPI to prevent conflict with
GPMC-NAND
arch/arm/boot/dts/am437x-gp-evm.dts | 4 +--- arch/arm/boot/dts/am43x-epos-evm.dts | 9 ++++----- arch/arm/mach-omap2/gpmc.c | 7 +++---- 3 files changed, 8 insertions(+), 12 deletions(-)
Signature · 1 line
1.8.3.2
PATCH 3/6 ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring
NAND uses wait pin only to indicate device readiness after a block/page operation. It is not use to extend individual read/write cycle and so read/write wait pin monitoring must be disabled for NAND.
This patch also gets rid of the below warning when NAND is accessed for the first time.
omap_l3_noc 44000000.ocp: L3 application error: target 13 mod:1 (unclearable)
--- arch/arm/boot/dts/am437x-gp-evm.dts | 2 -- 1 file changed, 2 deletions(-)
arch/arm/boot/dts/am437x-gp-evm.dts +0 -2
@@ -443,8 +443,6 @@ gpmc,rd-cycle-ns = <40>; gpmc,wr-cycle-ns = <40>; gpmc,wait-pin = <0>; - gpmc,wait-on-read; - gpmc,wait-on-write; gpmc,bus-turnaround-ns = <0>; gpmc,cycle2cycle-delay-ns = <0>; gpmc,clk-activation-ns = <0>;
Signature · 1 line
1.8.3.2
PATCH 1/6 ARM: dts: am43x-epos-evm: Use BCH16 ECC scheme instead of BCH8
In reply to Roger Quadrosam43x-epos-evm uses a NAND chip with page size 4096 bytes and spare area of 225 bytes per page.
For such a setup it is preferrable to use BCH16 ECC scheme over BCH8. This also makes it compatible with ROM code ECC scheme so we can boot with NAND after flashing from kernel.
--- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/am43x-epos-evm.dts +1 -1
@@ -441,7 +441,7 @@ ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ nand@0,0 { reg = <0 0 0>; /* CS0, offset 0 */ - ti,nand-ecc-opt = "bch8"; + ti,nand-ecc-opt = "bch16"; ti,elm-id = <&elm>; nand-bus-width = <8>; gpmc,device-width = <1>;
Signature · 1 line
1.8.3.2
PATCH 5/6 ARM: OMAP2+: gpmc: Don't complain if wait pin is used without r/w monitoring
In reply to Roger QuadrosFor NAND read & write wait pin monitoring must be kept disabled as the wait pin is only used to indicate NAND device ready status and not to extend each read/write cycle.
So don't print a warning if wait pin is specified while read/write monitoring is not in the device tree.
Sanity check wait pin number irrespective if read/write monitoring is set or not.
--- arch/arm/mach-omap2/gpmc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/gpmc.c +3 -4
@@ -1207,8 +1207,7 @@ int gpmc_cs_program_settings(int cs, struct gpmc_settings *p) } } -if ((p->wait_on_read || p->wait_on_write) && - (p->wait_pin > gpmc_nr_waitpins)) { +if (p->wait_pin > gpmc_nr_waitpins) {pr_err ("%s: invalid wait-pin (%d)\n" , __func__, p->wait_pin);return -EINVAL ; }
@@ -1288,8 +1287,8 @@ void gpmc_read_settings_dt(struct device_node *np, struct gpmc_settings *p) p->wait_on_write =of_property_read_bool (np,"gpmc,wait-on-write" );if (!p->wait_on_read && !p->wait_on_write) -pr_warn ("%s: read/write wait monitoring not enabled!\n" , - __func__); +pr_debug ("%s: rd/wr wait monitoring not enabled!\n" , + __func__); } }
Signature · 1 line
1.8.3.2
PATCH 2/6 ARM: dts: am437x-gp-evm: Use BCH16 ECC scheme instead of BCH8
In reply to Roger Quadrosam437x-gp-evm uses a NAND chip with page size 4096 bytes and spare area of 225 bytes per page.
For such a setup it is preferrable to use BCH16 ECC scheme over BCH8. This also makes it compatible with ROM code ECC scheme so we can boot with NAND after flashing from kernel.
--- arch/arm/boot/dts/am437x-gp-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/am437x-gp-evm.dts +1 -1
@@ -424,7 +424,7 @@ ranges = <0 0 0 0x01000000>; /* minimum GPMC partition = 16MB */ nand@0,0 { reg = <0 0 4>; /* device IO registers */ - ti,nand-ecc-opt = "bch8"; + ti,nand-ecc-opt = "bch16"; ti,elm-id = <&elm>; nand-bus-width = <8>; gpmc,device-width = <1>;
Signature · 1 line
1.8.3.2
PATCH 6/6 ARM: dts: am43x-epos-evm: Disable QSPI to prevent conflict with GPMC-NAND
In reply to Roger QuadrosBoth QSPI and GPMC-NAND share the same Pin (A8) from the SoC for Chip Select functionality. So both can't be enabled simultaneously.
Disable QSPI node to prevent the pin conflict as well as be similar to 3.12 release.
--- arch/arm/boot/dts/am43x-epos-evm.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am43x-epos-evm.dts +2 -2
@@ -435,7 +435,7 @@ }; &gpmc { - status = "okay"; + status = "okay"; /* Disable QSPI when enabling GPMC (NAND) */ pinctrl-names = "default"; pinctrl-0 = <&nand_flash_x8>; ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */
@@ -556,7 +556,7 @@ }; &qspi { - status = "okay"; + status = "disabled"; /* Disable GPMC (NAND) when enabling QSPI */ pinctrl-names = "default"; pinctrl-0 = <&qspi1_default>;
Signature · 1 line
1.8.3.2
PATCH 4/6 ARM: dts: am43xx-epos-evm: Don't use read/write wait monitoring
In reply to Roger QuadrosNAND uses wait pin only to indicate device readiness after a block/page operation. It is not use to extend individual read/write cycle and so read/write wait pin monitoring must be disabled for NAND.
Add gpmc wait pin information as the NAND uses wait pin 0 for device ready indication.
--- arch/arm/boot/dts/am43x-epos-evm.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/boot/dts/am43x-epos-evm.dts +1 -2
@@ -459,8 +459,7 @@ gpmc,access-ns = <30>; /* tCEA + 4*/ gpmc,rd-cycle-ns = <40>; gpmc,wr-cycle-ns = <40>; - gpmc,wait-on-read = "true"; - gpmc,wait-on-write = "true"; + gpmc,wait-pin = <0>; gpmc,bus-turnaround-ns = <0>; gpmc,cycle2cycle-delay-ns = <0>; gpmc,clk-activation-ns = <0>;
Signature · 1 line
1.8.3.2
Hi Roger,
Quoted 7 lines · Roger Quadros
Hi Tony,
These are some of the issues I found while testing v3.17-rc3.
- Wrong ECC scheme used for am43x GP and EPOS evm. We need to use BCH16 instead of BCH8.
Thanks for updating ECC scheme for AM43x EVM boards. Just for background history, BCH16 ECC scheme was not in mainline when AM43xx NAND DTS patches were accepted. So to avoid any inter-dependency of patches, BCH8 was used instead.
commit f68e355c86cff91e5266cf937ea24fcba0641900
ARM: dts: am43xx: add support for parallel NAND flash
CommitDate: 2 March 2014
commit 9748fff96484cfc8bb382ef1436823aefe065c9c
mtd: nand: omap: add support for BCH16_ECC - NAND driver updates
CommitDate: 21 May 2014
For the record, boot-loader (u-boot SPL) on AM43x-EPOS and AM437x-GP EVM boards should be flashed in BCH16 ECC scheme as NAND device present on this boards has
- page-size=4KiB
- OOB-size=224B
So ROM code expects BCH16 ECC scheme to load first boot-loader(SPL).
with regards, pekon
------------------------
Powered by BigRock.com
Re: [PATCH 1/6] ARM: dts: am43x-epos-evm: Use BCH16 ECC scheme instead of BCH8
In reply to Roger QuadrosQuoted 18 lines · Roger Quadros
am43x-epos-evm uses a NAND chip with page size 4096 bytes and spare area of 225 bytes per page.
For such a setup it is preferrable to use BCH16 ECC scheme over BCH8. This also makes it compatible with ROM code ECC scheme so we can boot with NAND after flashing from kernel.
Signed-off-by Roger Quadros <[email protected]>--- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/am43x-epos-evm.dts +0
-0
arch/arm/boot/dts/am43x-epos-evm.dts line 447
Quoted 8 lines
arch/arm/boot/dts/am43x-epos-evm.dts +1
-1@@ -441,7 +441,7 @@ ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ nand@0,0 { reg = <0 0 0>; /* CS0, offset 0 */ - ti,nand-ecc-opt = "bch8"; + ti,nand-ecc-opt = "bch16"; ti,elm-id = <&elm>; nand-bus-width = <8>; gpmc,device-width = <1>;
As I have tested BCH16 on AM43x-EPOS board earlier So,
with regards, pekon
------------------------
Powered by BigRock.com
Re: [PATCH 2/6] ARM: dts: am437x-gp-evm: Use BCH16 ECC scheme instead of BCH8
In reply to Roger QuadrosQuoted 18 lines · Roger Quadros
am437x-gp-evm uses a NAND chip with page size 4096 bytes and spare area of 225 bytes per page.
For such a setup it is preferrable to use BCH16 ECC scheme over BCH8. This also makes it compatible with ROM code ECC scheme so we can boot with NAND after flashing from kernel.
Signed-off-by Roger Quadros <[email protected]>--- arch/arm/boot/dts/am437x-gp-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/am437x-gp-evm.dts +0
-0
arch/arm/boot/dts/am437x-gp-evm.dts line 430
Quoted 8 lines
arch/arm/boot/dts/am437x-gp-evm.dts +1
-1@@ -424,7 +424,7 @@ ranges = <0 0 0 0x01000000>; /* minimum GPMC partition = 16MB */ nand@0,0 { reg = <0 0 4>; /* device IO registers */ - ti,nand-ecc-opt = "bch8"; + ti,nand-ecc-opt = "bch16"; ti,elm-id = <&elm>; nand-bus-width = <8>; gpmc,device-width = <1>;
For already mentioned reason ..
with regards, pekon
------------------------
Powered by BigRock.com
Re: [PATCH 3/6] ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring
In reply to Roger QuadrosHi Roger,
Quoted 5 lines · Roger Quadros
NAND uses wait pin only to indicate device readiness after a block/page operation. It is not use to extend individual read/write cycle and so read/write wait pin monitoring must be disabled for NAND.
I think this is incorrect assumption. NAND framework allows wait-pin monitoring at end of each read/write cycle. Please refer following code in drivers/mtd/nand/nand_base.c
@@ void nand_wait_ready(...)
- nand_wait_ready() calls controller-driver specific call-back for chip->dev_ready().
- chip->dev_ready in-case of OMAP NAND drivers is set in drivers/mtd/nand/omap2.c during probe.
if (pdata->dev_ready) {
nand_chip->dev_ready = omap_dev_ready;
nand_chip->chip_delay = 0;
}Problem is we don't set pdata->dev_ready correctly as part of platform-data dring GPMC initialization. This was what my earlier patch for wait-pin monitoring about. But it was a quick fix for NAND devices.
So, I suggest to fix wait-pin monitoring instead of de-scoping it from DTS as wait-pin monitoring should boast the NAND performance significantly.
(please see if you can find an old mail thread which had some good feedbacks from Ezequiel and Javier about wait-pin monitoring).
[...]
Quoted 5 lines
This patch also gets rid of the below warning when NAND is accessed for the first time.
omap_l3_noc44000000.ocp: L3 application error: target 13 mod:1 (unclearable)
Can you debug this further.
This warning probably comes when driver tries to access some "reserved" addresses. Or violate read/write bits.
with regards, pekon
------------------------
Powered by BigRock.com
Re: [PATCH 5/6] ARM: OMAP2+: gpmc: Don't complain if wait pin is used without r/w monitoring
In reply to Roger QuadrosQuoted 4 lines · Roger Quadros
For NAND read & write wait pin monitoring must be kept disabled as the wait pin is only used to indicate NAND device ready status and not to extend each read/write cycle.
I think this description, does not fit in this patch. And is incorrect as explained in previous patch review.
Quoted 8 lines
So don't print a warning if wait pin is specified while read/write monitoring is not in the device tree.
Sanity check wait pin number irrespective if read/write monitoring is set or not.
Signed-off-by Roger Quadros <[email protected]>---
But below mentioned checks and clean-up makes sense. So apart from first 3 lines of commit log ..
with regards, pekon
------------------------
Powered by BigRock.com
Re: [PATCH 3/6] ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring
In reply to pekonHi Pekon,
Quoted 9 lines · pekon
Hi Roger,
Quoted 5 lines · Roger Quadros
NAND uses wait pin only to indicate device readiness after a block/page operation. It is not use to extend individual read/write cycle and so read/write wait pin monitoring must be disabled for NAND.
Quoted 7 lines
I think this is incorrect assumption. NAND framework allows wait-pin monitoring at end of each read/write cycle. Please refer following code in
drivers/mtd/nand/nand_base.c@@ void nand_wait_ready(...)-
nand_wait_ready()calls controller-driver specific call-back forchip->dev_ready().
It is important to note that this NAND device ready mechanism is different from GPMC inter cycle wait state mechanism controlled by the read/write monitoring bits. The same WAIT pin is used in both the cases.
For more details about NAND use case refer to
AM437x TRM:
Section: 9.1.3.3.12.2 NAND Device-Ready Pin
below excerpt from there
"To avoid a time-out caused by a block/page opening delay in NAND flash, disable the wait pin monitoring for read and write accesses (that is, set the GPMC_CONFIG1_i[[21] WAITWRITEMONITORING and GPMC_CONFIG1_i[[22] WAITREADMONITORING bits to 0):
Quoted 13 lines
-
chip->dev_readyin-case of OMAP NAND drivers is set indrivers/mtd/nand/omap2.cduring probe.if (pdata->dev_ready) { nand_chip->dev_ready = omap_dev_ready; nand_chip->chip_delay = 0; }Problem is we don't set
pdata->dev_readycorrectly as part of platform-data dring GPMC initialization. This was what my earlier patch for wait-pin monitoring about. But it was a quick fix for NAND devices.
Quoted 5 lines
So, I suggest to fix wait-pin monitoring instead of de-scoping it from DTS as wait-pin monitoring should boast the NAND performance significantly.
(please see if you can find an old mail thread which had some good feedbacks from Ezequiel and Javier about wait-pin monitoring).
This is to get the device ready mechanism work and has nothing to do with GPMC wait monitoring. Instead the WAIT pin is used to generate the GPMC interrupt based on the WAIT pin polarity.
To monitor NAND device ready status
from TRM
"-Use software to poll the WAITnSTS bit (n = 0 to 1) of the GPMC_STS register.
OR
-Configure an interrupt that is generated on the WAIT signal change (through the GPMC_IRQEN [11-8] bits)"
Quoted 11 lines
[...]
Quoted 5 lines
This patch also gets rid of the below warning when NAND is accessed for the first time.
omap_l3_noc44000000.ocp: L3 application error: target 13 mod:1 (unclearable)Can you debug this further.
This warning probably comes when driver tries to access some "reserved" addresses. Or violate read/write bits.
It is caused because of incorrectly enabled the GPMC wait monitoring. Disabling the wait monitoring gets rid of this error. I don't understand what else I should debug and why.
cheers,
-roger
Re: [PATCH 5/6] ARM: OMAP2+: gpmc: Don't complain if wait pin is used without r/w monitoring
In reply to pekonQuoted 6 lines · pekon
Quoted 4 lines · Roger Quadros
For NAND read & write wait pin monitoring must be kept disabled as the wait pin is only used to indicate NAND device ready status and not to extend each read/write cycle.
I think this description, does not fit in this patch.
It fits the description because it gives the reason why wait monitoring is optional.
Quoted 1 line
And is incorrect as explained in previous patch review.
It is correct. I've pointed you to the relevant TRM sections where it is said that GPMC read/write monitoring must be disabled for NAND case.
cheers,
-roger
Quoted 21 lines
Quoted 10 lines
So don't print a warning if wait pin is specified while read/write monitoring is not in the device tree.
Sanity check wait pin number irrespective if read/write monitoring is set or not.
Signed-off-by Roger Quadros <[email protected]>---
But below mentioned checks and clean-up makes sense. So apart from first 3 lines of commit log ..
Reviewed-by Pekon Gupta <[email protected]>with regards, pekon
------------------------
Powered by BigRock.com
Re: [PATCH 3/6] ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring
In reply to Roger QuadrosHi Roger,
Quoted 26 lines · Roger Quadros
Hi Pekon,
Quoted 9 lines · pekon
Hi Roger,
Quoted 5 lines · Roger Quadros
NAND uses wait pin only to indicate device readiness after a block/page operation. It is not use to extend individual read/write cycle and so read/write wait pin monitoring must be disabled for NAND.
Quoted 7 lines
I think this is incorrect assumption. NAND framework allows wait-pin monitoring at end of each read/write cycle. Please refer following code in
drivers/mtd/nand/nand_base.c@@ void nand_wait_ready(...)-
nand_wait_ready()calls controller-driver specific call-back forchip->dev_ready().It is important to note that this NAND device ready mechanism is different from GPMC inter cycle wait state mechanism controlled by the read/write monitoring bits. The same WAIT pin is used in both the cases.
For more details about NAND use case refer to
Quoted 8 lines
AM437x TRM:
Section: 9.1.3.3.12.2 NAND Device-Ready Pinbelow excerpt from there
"To avoid a time-out caused by a block/page opening delay in NAND flash, disable the wait pin monitoring for read and write accesses (that is, set the GPMC_CONFIG1_i[[21] WAITWRITEMONITORING and GPMC_CONFIG1_i[[22] WAITREADMONITORING bits to 0):
I re-read the AM437x TRM, and the section you mentioned above.
-----------------
*9.1.3.3.12.2 NAND Device-Ready Pin*
The NAND memory device provides a ready pin to indicate data availability after a block/page opening and to indicate that data programming is complete. The ready pin can be connected to one of the WAIT GPMC input pins; data read accesses must not be tried when the ready pin is sampled inactive (device is not ready) even if the associated chip-select WAITREADMONITORING bit field is set. The duration of the NAND device busy state after the block/page opening is so long (up to 50 μs) that accesses occurring when the ready pin is sampled inactive can stall GPMC access and eventually cause a system time-out. If a read access to a NAND flash is done using the wait monitoring mode, the device is blocked during a page opening, and so is the GPMC. If the correct settings are used, other chip-selects can be used while
the memory processes the page opening command.
...
-----------------
It's clearly written that wait-pin monitoring is used for read/write (programs) access, and GPMC is blocked till wait signal is asserted during reads. Also, on NAND there can be no read/write access except at page-level
so wait-pin monitoring is implicitly related to read/write accesses.
However, whether you use it or not is purely user's choice, but it
has performance impact.
You are probably seeing timeout condition when enabling wait-pin monitoring, and this can be due to multiple reasons like;
(1) incorrect pin-mux configuration (like directions, pull-up etc)
(2) incorrect board-level pull-up
(3) incorrect driver setting, like though wait-pin is enabled but wrong wait-pin is being monitored.
I request you to fix this instead of disabling it completely, as you should see significant NAND throughput increase once this feature works correctly.
Quoted 35 lines
Quoted 13 lines
-
chip->dev_readyin-case of OMAP NAND drivers is set indrivers/mtd/nand/omap2.cduring probe.if (pdata->dev_ready) { nand_chip->dev_ready = omap_dev_ready; nand_chip->chip_delay = 0; }Problem is we don't set
pdata->dev_readycorrectly as part of platform-data dring GPMC initialization. This was what my earlier patch for wait-pin monitoring about. But it was a quick fix for NAND devices.Quoted 5 lines
So, I suggest to fix wait-pin monitoring instead of de-scoping it from DTS as wait-pin monitoring should boast the NAND performance significantly.
(please see if you can find an old mail thread which had some good feedbacks from Ezequiel and Javier about wait-pin monitoring).This is to get the device ready mechanism work and has nothing to do with GPMC wait monitoring. Instead the WAIT pin is used to generate the GPMC interrupt based on the WAIT pin polarity.
To monitor NAND device ready status
from TRM
"-Use software to poll the WAITnSTS bit (n = 0 to 1) of theGPMC_STSregister.
OR
-Configure an interrupt that is generated on the WAIT signal change (through theGPMC_IRQEN[11-8] bits)"Quoted 6 lines
[...]
Quoted 3 lines
This patch also gets rid of the below warning when NAND is accessed for the first time.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
omap_l3_noc44000000.ocp: L3 application error: target 13 mod:1 (unclearable)Can you debug this further.
This warning probably comes when driver tries to access some "reserved" addresses. Or violate read/write bits.It is caused because of incorrectly enabled the GPMC wait monitoring. Disabling the wait monitoring gets rid of this error. I don't understand what else I should debug
I'm not sure how a NAND or GPMC feature can cause omap_l3_noc: L3 application error ?
But now as I re-read the text, its probably the L3 interconnect timeout
error due to no response from GPMC. There is a timer in L3 which monitors if the L3 interconnect is stalled/blocked waiting for response from a target. I think it's that timer which is getting timeout. (but just my guess).
Quoted 2 lines
and why.
As there were number of users on linux-mtd list wanted to use NAND wait-pin monitoring on OMAP devices, so I have just looped them if they see any concerns.
Otherwise, no further concerns from me.
with regards, pekon
------------------------
Powered by BigRock.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Tony Lindgren
maintainerQuoted 11 lines · Roger Quadros
Hi Tony,
These are some of the issues I found while testing v3.17-rc3.
- Wrong ECC scheme used for am43x GP and EPOS evm. We need to use BCH16 instead of BCH8.
- Wrong read/write wait pin monitoring setting used for NAND resulting in "L3 application error" debug message on console.
- Pin conflict issue on am43x EPOS evm with QSPI and NAND.
Thanks applying into omap-for-v3.17/fixes-v2.
Tony
Quoted 25 lines
Patches are available at
[email protected]:rogerq/linux.git
* [new branch] for-v3.17/gpmc-fixescheers,
-rogerRoger Quadros (6):
ARM: dts: am43x-epos-evm: Use BCH16 ECC scheme instead of BCH8
ARM: dts: am437x-gp-evm: Use BCH16 ECC scheme instead of BCH8
ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring
ARM: dts: am43xx-epos-evm: Don't use read/write wait monitoring
ARM: OMAP2+: gpmc: Don't complain if wait pin is used without r/w
monitoring
ARM: dts: am43x-epos-evm: Disable QSPI to prevent conflict with
GPMC-NANDarch/arm/boot/dts/am437x-gp-evm.dts | 4 +--- arch/arm/boot/dts/am43x-epos-evm.dts | 9 ++++----- arch/arm/mach-omap2/gpmc.c | 7 +++---- 3 files changed, 8 insertions(+), 12 deletions(-)Signature · 1 line
1.8.3.2
Tony Lindgren
maintainerQuoted 8 lines · Tony Lindgren
Quoted 7 lines · Roger Quadros
Hi Tony,
These are some of the issues I found while testing v3.17-rc3.
- Wrong ECC scheme used for am43x GP and EPOS evm. We need to use BCH16 instead of BCH8.
Quoted 6 lines
Quoted 4 lines
- Wrong read/write wait pin monitoring setting used for NAND resulting in "L3 application error" debug message on console.
- Pin conflict issue on am43x EPOS evm with QSPI and NAND.
Thanks applying into omap-for-v3.17/fixes-v2.
Sorry replied to the wrong thread, this series still seems to have some pending comments so not applying this one.
Regards,
Tony
Re: [PATCH 3/6] ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring
In reply to pekon+ Sekhar.
Hi Pekon,
Quoted 48 lines · pekon
Hi Roger,
Quoted 26 lines · Roger Quadros
Hi Pekon,
Quoted 9 lines · pekon
Hi Roger,
Quoted 5 lines · Roger Quadros
NAND uses wait pin only to indicate device readiness after a block/page operation. It is not use to extend individual read/write cycle and so read/write wait pin monitoring must be disabled for NAND.
Quoted 7 lines
I think this is incorrect assumption. NAND framework allows wait-pin monitoring at end of each read/write cycle. Please refer following code in
drivers/mtd/nand/nand_base.c@@ void nand_wait_ready(...)-
nand_wait_ready()calls controller-driver specific call-back forchip->dev_ready().It is important to note that this NAND device ready mechanism is different from GPMC inter cycle wait state mechanism controlled by the read/write monitoring bits. The same WAIT pin is used in both the cases.
For more details about NAND use case refer to
Quoted 8 lines
AM437x TRM:
Section: 9.1.3.3.12.2 NAND Device-Ready Pinbelow excerpt from there
"To avoid a time-out caused by a block/page opening delay in NAND flash, disable the wait pin monitoring for read and write accesses (that is, set the GPMC_CONFIG1_i[[21] WAITWRITEMONITORING and GPMC_CONFIG1_i[[22] WAITREADMONITORING bits to 0):I re-read the AM437x TRM, and the section you mentioned above.
-----------------
*9.1.3.3.12.2 NAND Device-Ready Pin*
The NAND memory device provides a ready pin to indicate data availability after a block/page opening and to indicate that data programming is complete. The ready pin can be connected to one of the WAIT GPMC input pins; data read accesses must not be tried when the ready pin is sampled inactive (device is not ready) even if the associated chip-select WAITREADMONITORING bit field is set. The duration of the NAND device busy state after the block/page opening is so long (up to 50 μs) that accesses occurring when the ready pin is sampled inactive can stall GPMC access and eventually cause a system time-out. If a read access to a NAND flash is done using the wait monitoring mode, the device is blocked during a page opening, and so is the GPMC. If the correct settings are used, other chip-selects can be used while
the memory processes the page opening command.
...
-----------------
Quoted 1 line
It's clearly written that wait-pin monitoring is used for read/write (programs) access, and GPMC is blocked till wait signal is asserted during reads.
And you cut out the most important part where it says keep read/write wait monitoring disabled for NAND.
pasting again here.
"To avoid a time-out caused by a block/page opening delay in NAND flash, disable the wait pin monitoring for read and write accesses (that is, set the GPMC_CONFIG1_i[[21] WAITWRITEMONITORING and GPMC_CONFIG1_i[[22] WAITREADMONITORING bits to 0 and use one of the following methods instead:
•Use software to poll the WAITnSTS bit (n = 0 to 1) of the GPMC_STS register.
•Configure an interrupt that is generated on the WAIT signal change (through the GPMC_IRQEN [11-8] bits).
Even if the READWAITMONITORING bit is not set, the external memory nR/B pinstatus is captured in the programmed WAIT bit in the GPMC_STS register.
The READWAITMONITORING bit method must be used for other memories than NAND flash, if they require the use of a WAIT signal."
Quoted 1 line
Also, on NAND there can be no read/write access except at page-level
And how are command/address inputs sent? ;)
Quoted 3 lines
so wait-pin monitoring is implicitly related to read/write accesses. However, whether you use it or not is purely user's choice, but it has performance impact.
I don't know what you are talking about. I have tried to explain many times but you fail to understand. Nand device ready pin is not same as the wait pin used on other memories where it is used to extend each read/write cycle (by inserting wait state). It is only used to indicate that the NAND device is busy during a block/page operation, so that new commands won't be sent to it by the host processor. This is different from TI GPMC wait monitoring. You have to monitor this device ready pin out of band like polling the status bit or using GPMC interrupt on wait pin transition.
Looks like you are getting confused because the same WAIT pin on the SoC is used to get this device ready pin status into the SoC.
Quoted 7 lines
You are probably seeing timeout condition when enabling wait-pin monitoring, and this can be due to multiple reasons like;
(1) incorrect pin-mux configuration (like directions, pull-up etc)
(2) incorrect board-level pull-up
(3) incorrect driver setting, like though wait-pin is enabled but wrong wait-pin is being monitored.
No for all the 3.
Quoted 23 lines
I request you to fix this instead of disabling it completely, as you should see significant NAND throughput increase once this feature works correctly.
Quoted 18 lines
Quoted 18 lines
-
chip->dev_readyin-case of OMAP NAND drivers is set indrivers/mtd/nand/omap2.cduring probe.if (pdata->dev_ready) { nand_chip->dev_ready = omap_dev_ready; nand_chip->chip_delay = 0; }Problem is we don't set
pdata->dev_readycorrectly as part of platform-data dring GPMC initialization. This was what my earlier patch for wait-pin monitoring about. But it was a quick fix for NAND devices.So, I suggest to fix wait-pin monitoring instead of de-scoping it from DTS as wait-pin monitoring should boast the NAND performance significantly.
(please see if you can find an old mail thread which had some good feedbacks from Ezequiel and Javier about wait-pin monitoring).
This patch is for the 3.17 bug fix cycle. Implementing NAND device ready mechanism is a new feature (for DT case) and I will work on it for future versions.
Also I'm not de-scoping wait-pin (or more correctly device ready) mechanism for NAND. The dts file still contains "wait-pin = <0>" property. This will be used to monitor the NAND device ready status via GPMC status or GPMC interrupt. But this is not for 3.17 bug fix cycle.
see omap_dev_ready()
http://lxr.free-electrons.com/source/drivers/mtd/nand/omap2.c#L1025
Quoted 23 lines
Quoted 23 lines
This is to get the device ready mechanism work and has nothing to do with GPMC wait monitoring. Instead the WAIT pin is used to generate the GPMC interrupt based on the WAIT pin polarity.
To monitor NAND device ready status
from TRM
"-Use software to poll the WAITnSTS bit (n = 0 to 1) of theGPMC_STSregister.
OR
-Configure an interrupt that is generated on the WAIT signal change (through theGPMC_IRQEN[11-8] bits)"Quoted 11 lines
[...]
Quoted 5 lines
This patch also gets rid of the below warning when NAND is accessed for the first time.
omap_l3_noc44000000.ocp: L3 application error: target 13 mod:1 (unclearable)Can you debug this further.
This warning probably comes when driver tries to access some "reserved" addresses. Or violate read/write bits.
Quoted 7 lines
Quoted 2 lines
It is caused because of incorrectly enabled the GPMC wait monitoring. Disabling the wait monitoring gets rid of this error. I don't understand what else I should debug
I'm not sure how a NAND or GPMC feature can cause
omap_l3_noc: L3 application error ?
But now as I re-read the text, its probably the L3 interconnect timeout
error due to no response from GPMC. There is a timer in L3 which monitors if the L3 interconnect is stalled/blocked waiting for response from a target. I think it's that timer which is getting timeout. (but just my guess).
Yes that indeed is the case.
Quoted 7 lines
Quoted 4 lines
and why.
As there were number of users on linux-mtd list wanted to use NAND wait-pin monitoring on OMAP devices, so I have just looped them if they see any concerns.
It is called NAND device ready mechanism (not wait-pin monitoring). It never worked till now with DT so it is a new feature.
Quoted 1 line
Otherwise, no further concerns from me.
Thanks.
cheers,
-roger
pekon
Reviewed-byRe: [PATCH 3/6] ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring
On Thursday 04 September 2014 03:16 PM, Roger Quadros wrote:
[...]
Quoted 9 lines
This patch is for the 3.17 bug fix cycle. Implementing NAND device ready mechanism is a new feature (for DT case) and I will work on it for future versions.
Also I'm not de-scoping wait-pin (or more correctly device ready) mechanism for NAND. The dts file still contains "wait-pin = <0>" property. This will be used to monitor the NAND device ready status via GPMC status or GPMC interrupt. But this is not for 3.17 bug fix cycle.
Ok Thanks, that good to know. So for this whole series
with regards, pekon
------------------------
Powered by BigRock.com
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
pekon
Reviewed-byHi Tony,
Quoted 12 lines · Tony Lindgren
Quoted 11 lines · Tony Lindgren
Quoted 10 lines · Roger Quadros
Hi Tony,
These are some of the issues I found while testing v3.17-rc3.
- Wrong ECC scheme used for am43x GP and EPOS evm. We need to use BCH16 instead of BCH8.
- Wrong read/write wait pin monitoring setting used for NAND resulting in "L3 application error" debug message on console.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
- Pin conflict issue on am43x EPOS evm with QSPI and NAND.
Thanks applying into omap-for-v3.17/fixes-v2.
Sorry replied to the wrong thread, this series still seems to have some pending comments so not applying this one.
Only [Patch 3/6] had some pending comments, but after Roger's clarification there are no further comments from me. So for entire series ..
with regards, pekon
------------------------
Powered by BigRock.com
Tony Lindgren
maintainerQuoted 19 lines · pekon
Hi Tony,
Quoted 16 lines · Tony Lindgren
Quoted 14 lines · Tony Lindgren
Quoted 11 lines · Roger Quadros
Hi Tony,
These are some of the issues I found while testing v3.17-rc3.
- Wrong ECC scheme used for am43x GP and EPOS evm. We need to use BCH16 instead of BCH8.
- Wrong read/write wait pin monitoring setting used for NAND resulting in "L3 application error" debug message on console.
- Pin conflict issue on am43x EPOS evm with QSPI and NAND.
Thanks applying into omap-for-v3.17/fixes-v2.
Quoted 8 lines
Quoted 3 lines
Sorry replied to the wrong thread, this series still seems to have some pending comments so not applying this one.
Only [Patch 3/6] had some pending comments, but after Roger's clarification there are no further comments from me. So for entire series ..
Reviewed-by Pekon Gupta <[email protected]>
OK thanks will apply all into omap-for-v3.17/fixes-v2.
Regards,
Tony
Quoted 19 lines · pekon
Hi Tony,
Quoted 16 lines · Tony Lindgren
Quoted 14 lines · Tony Lindgren
Quoted 11 lines · Roger Quadros
Hi Tony,
These are some of the issues I found while testing v3.17-rc3.
- Wrong ECC scheme used for am43x GP and EPOS evm. We need to use BCH16 instead of BCH8.
- Wrong read/write wait pin monitoring setting used for NAND resulting in "L3 application error" debug message on console.
- Pin conflict issue on am43x EPOS evm with QSPI and NAND.
Thanks applying into omap-for-v3.17/fixes-v2.
Quoted 8 lines
Quoted 3 lines
Sorry replied to the wrong thread, this series still seems to have some pending comments so not applying this one.
Only [Patch 3/6] had some pending comments, but after Roger's clarification there are no further comments from me. So for entire series ..
Reviewed-by Pekon Gupta <[email protected]>
Thanks for the review Pekon.
cheers,
-roger