Skip to contentSkip to conversation

fsl_upm: Add MxMR/MDR synchronization

PATCH New Peter Tyser 3 participants 4 messages Dec 2, 2010 – Dec 9, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsl_upm: Add MxMR/MDR synchronization

From: John Schmoller <[email protected]>

According to Freescale reference manuals (eg section "13.4.4.2 Programming the UPMs" of the P4080 Reference Manual):

"Since the result of any update to the MxMR/MDR register must be in effect before the dummy read or write to the UPM region, a write to MxMR/MDR should be followed immediately by a read of MxMR/MDR."

The UPM on a custom P4080-based board did not work without performing a read of MxMR/MDR after a write.

---
 drivers/mtd/nand/fsl_upm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/nand/fsl_upm.c +2 -0
index b76c673..be00555 100644
@@ -21,6 +21,7 @@
 static void fsl_upm_start_pattern(struct fsl_upm *upm, u32 pat_offset)
 {
 	clrsetbits_be32(upm->mxmr, MxMR_MAD_MSK, MxMR_OP_RUNP | pat_offset);
+	(void)in_be32(upm->mxmr);
 }
 
 static void fsl_upm_end_pattern(struct fsl_upm *upm)
@@ -35,6 +36,7 @@ static void fsl_upm_run_pattern(struct fsl_upm *upm, int width,
 				void __iomem *io_addr, u32 mar)
 {
 	out_be32(upm->mar, mar);
+	(void)in_be32(upm->mar);
 	switch (width) {
 	case 8:
 		out_8(io_addr, 0x0);
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 fsl_upm: Add MxMR/MDR synchronization

[Adding Scott W. - would like his ack on this]

- k

Quoted 40 lines · Peter Tyser

From: John Schmoller <[email protected]>

According to Freescale reference manuals (eg section "13.4.4.2 Programming the UPMs" of the P4080 Reference Manual):

"Since the result of any update to the MxMR/MDR register must be in effect before the dummy read or write to the UPM region, a write to MxMR/MDR should be followed immediately by a read of MxMR/MDR."

The UPM on a custom P4080-based board did not work without performing a read of MxMR/MDR after a write.

---
drivers/mtd/nand/fsl_upm.c | 2 ++

1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/nand/fsl_upm.c +2 -0
index b76c673..be00555 100644
@@ -21,6 +21,7 @@
 static void fsl_upm_start_pattern(struct fsl_upm *upm, u32 pat_offset)
 {
 	clrsetbits_be32(upm->mxmr, MxMR_MAD_MSK, MxMR_OP_RUNP | pat_offset);
+	(void)in_be32(upm->mxmr);
 }
 
 static void fsl_upm_end_pattern(struct fsl_upm *upm)
@@ -35,6 +36,7 @@ static void fsl_upm_run_pattern(struct fsl_upm *upm, int width,
 				void __iomem *io_addr, u32 mar)
 {
 	out_be32(upm->mar, mar);
+	(void)in_be32(upm->mar);
 	switch (width) {
 	case 8:
 		out_8(io_addr, 0x0);
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 1/1 fsl_upm: Add MxMR/MDR synchronization

Quoted 1 line · On Thu, 2 Dec 2010 18:19:08 -0600 Kumar Gala <[email protected]> wrote:

[Adding Scott W. - would like his ack on this]

Quoted 51 lines

- k

Quoted 40 lines · Peter Tyser

From: John Schmoller <[email protected]>

According to Freescale reference manuals (eg section "13.4.4.2 Programming the UPMs" of the P4080 Reference Manual):

"Since the result of any update to the MxMR/MDR register must be in effect before the dummy read or write to the UPM region, a write to MxMR/MDR should be followed immediately by a read of MxMR/MDR."

The UPM on a custom P4080-based board did not work without performing a read of MxMR/MDR after a write.

---
drivers/mtd/nand/fsl_upm.c | 2 ++

1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/nand/fsl_upm.c +2 -0
index b76c673..be00555 100644
@@ -21,6 +21,7 @@
 static void fsl_upm_start_pattern(struct fsl_upm *upm, u32 pat_offset)
 {
 	clrsetbits_be32(upm->mxmr, MxMR_MAD_MSK, MxMR_OP_RUNP | pat_offset);
+	(void)in_be32(upm->mxmr);
 }
 
 static void fsl_upm_end_pattern(struct fsl_upm *upm)
@@ -35,6 +36,7 @@ static void fsl_upm_run_pattern(struct fsl_upm *upm, int width,
 				void __iomem *io_addr, u32 mar)
 {
 	out_be32(upm->mar, mar);
+	(void)in_be32(upm->mar);
 	switch (width) {
 	case 8:
 		out_8(io_addr, 0x0);
Signature · 1 line
1.7.0.4

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Applied
#3 lore raw

PATCH 1/1 fsl_upm: Add MxMR/MDR synchronization

In reply to Peter Tyser
Quoted 9 lines · Peter Tyser

From: John Schmoller <[email protected]>

According to Freescale reference manuals (eg section "13.4.4.2 Programming the UPMs" of the P4080 Reference Manual):

"Since the result of any update to the MxMR/MDR register must be in effect before the dummy read or write to the UPM region, a write to MxMR/MDR should be followed immediately by a read of MxMR/MDR."

Quoted 8 lines

The UPM on a custom P4080-based board did not work without performing a read of MxMR/MDR after a write.

---
drivers/mtd/nand/fsl_upm.c | 2 ++

1 files changed, 2 insertions(+), 0 deletions(-)

applied to 85xx

- k