Skip to contentSkip to conversation

83xx: nand support for MPC837XRDB boards

PATCH New Anton Vorontsov 4 participants 7 messages Mar 14, 2008 – Mar 21, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 83xx: nand support for MPC837XRDB boards

---
 include/configs/MPC837XERDB.h |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)
include/configs/MPC837XERDB.h +22 -2
index 2da4f29..7c19d1e 100644
@@ -251,9 +251,29 @@
 #define CFG_FLASH_ERASE_TOUT	60000	/* Flash Erase Timeout (ms) */
 #define CFG_FLASH_WRITE_TOUT	500	/* Flash Write Timeout (ms) */
 
-#define CFG_VSC7385_BASE	0xF0000000
+/*
+ * NAND Flash on the Local Bus
+ */
+#define CFG_NAND_BASE		0xE0600000	/* 0xE0600000 */
+#define CFG_BR1_PRELIM		(CFG_NAND_BASE | \
+				 (2 << BR_DECC_SHIFT) |	/* Use HW ECC */ \
+				 BR_PS_8 |		/* Port Size = 8 bit */ \
+				 BR_MS_FCM |		/* MSEL = FCM */ \
+				 BR_V)			/* valid */
+#define CFG_OR1_PRELIM		(0xFFFF8000 |		/* length 32K */ \
+				 OR_FCM_CSCT | \
+				 OR_FCM_CST | \
+				 OR_FCM_CHT | \
+				 OR_FCM_SCY_1 | \
+				 OR_FCM_TRLX | \
+				 OR_FCM_EHTR)
+#define CFG_LBLAWBAR1_PRELIM	CFG_NAND_BASE
+#define CFG_LBLAWAR1_PRELIM	0x8000000E	/* 32KB  */
 
-/* VSC7385 Gigabit Switch support */
+/*
+ * VSC7385 Gigabit Switch support
+ */
+#define CFG_VSC7385_BASE	0xF0000000
 #define CONFIG_VSC7385_ENET
 #define CFG_BR2_PRELIM		0xf0000801		/* Base address */
 #define CFG_OR2_PRELIM		0xfffe09ff		/* 128K bytes*/
Signature · 1 line
1.5.2.2
#1 lore raw

PATCH 1/7 83xx: nand support for MPC837XRDB boards

Quoted 7 lines · Anton Vorontsov
include/configs/MPC837XERDB.h +6 -1
-#define CFG_VSC7385_BASE	0xF0000000
+/*
+ * NAND Flash on the Local Bus
+ */
+#define CFG_NAND_BASE		0xE0600000	/* 0xE0600000 */
+#define CFG_BR1_PRELIM		(CFG_NAND_BASE | \
+				 (2 << BR_DECC_SHIFT) |	/* Use HW ECC */ \

include/configs/MPC837XERDB.h line 269

Quoted 10 lines
include/configs/MPC837XERDB.h +10 -0
+				 BR_PS_8 |		/* Port Size = 8 bit */ \
+				 BR_MS_FCM |		/* MSEL = FCM */ \
+				 BR_V)			/* valid */
+#define CFG_OR1_PRELIM		(0xFFFF8000 |		/* length 32K */ \
+				 OR_FCM_CSCT | \
+				 OR_FCM_CST | \
+				 OR_FCM_CHT | \
+				 OR_FCM_SCY_1 | \
+				 OR_FCM_TRLX | \
+				 OR_FCM_EHTR)

Again, are you sure about this SCY value? Note that the Linux driver resets it due to existing 8313 u-boots out there that have the wrong value (I'd send a patch to fix it if I know the correct value), so remove that to see what actually happens with SCY_1.

include/configs/MPC837XERDB.h line 276

Quoted 5 lines
include/configs/MPC837XERDB.h +4 -1
-/* VSC7385 Gigabit Switch support */
+/*
+ * VSC7385 Gigabit Switch support
+ */
+#define CFG_VSC7385_BASE	0xF0000000

What does this have to do with NAND?

-Scott

#2 lore raw

PATCH 1/7 83xx: nand support for MPC837XRDB boards

Quoted 12 lines · Scott Wood
Quoted 11 lines · Anton Vorontsov
include/configs/MPC837XERDB.h +10 -1
-#define CFG_VSC7385_BASE	0xF0000000
+/*
+ * NAND Flash on the Local Bus
+ */
+#define CFG_NAND_BASE		0xE0600000	/* 0xE0600000 */
+#define CFG_BR1_PRELIM		(CFG_NAND_BASE | \
+				 (2 << BR_DECC_SHIFT) |	/* Use HW ECC */ \
+				 BR_PS_8 |		/* Port Size = 8 bit */ \
+				 BR_MS_FCM |		/* MSEL = FCM */ \
+				 BR_V)			/* valid */
+#define CFG_OR1_PRELIM		(0xFFFF8000 |		/* length 32K */ \
Quoted 8 lines

include/configs/MPC837XERDB.h line 269

Quoted 6 lines
include/configs/MPC837XERDB.h +6 -0
+				 OR_FCM_CSCT | \
+				 OR_FCM_CST | \
+				 OR_FCM_CHT | \
+				 OR_FCM_SCY_1 | \
+				 OR_FCM_TRLX | \
+				 OR_FCM_EHTR)

Again, are you sure about this SCY value?

Yes. The same value is used by the MDS boards, with the same nand chip, I guess.

Quoted 3 lines

Note that the Linux driver resets
it due to existing 8313 u-boots out there that have the wrong value (I'd send a patch to fix it if I know the correct value),

Thanks for the info.

Quoted 2 lines

so remove that to see
what actually happens with SCY_1.

It works. With ndelay writing works too. So far I didn't have time to debug further, sorry.

Quoted 7 lines

include/configs/MPC837XERDB.h line 276

Quoted 5 lines
include/configs/MPC837XERDB.h +4 -1
-/* VSC7385 Gigabit Switch support */
+/*
+ * VSC7385 Gigabit Switch support
+ */
+#define CFG_VSC7385_BASE	0xF0000000

What does this have to do with NAND?

Nothing. I'm expanding VSC7385 comment to better separate it from the NAND code. Most lengthy parts of the RDB config are using

/*
*
*/

as a logical separator. So did I.

Signature · 3 lines
Anton Vorontsov
email: cboumailru at gmail.com
irc://irc.freenode.net/bd2
#3 lore raw

PATCH 1/7 83xx: nand support for MPC837XRDB boards

Quoted 9 lines · On Tue, 18 Mar 2008 17:10:55 +0300 Anton Vorontsov <[email protected]>…
Quoted 8 lines

include/configs/MPC837XERDB.h line 276

Quoted 6 lines
include/configs/MPC837XERDB.h +4 -1
-/* VSC7385 Gigabit Switch support */
+/*
+ * VSC7385 Gigabit Switch support
+ */
+#define CFG_VSC7385_BASE	0xF0000000

What does this have to do with NAND?

Quoted 8 lines

Nothing. I'm expanding VSC7385 comment to better separate it from the NAND code. Most lengthy parts of the RDB config are using

/*
*
*/

as a logical separator. So did I.

that's fine, it just makes patch review easier and less susceptible to comments like this if you keep your patches on-subject.

Also, this patch doesn't apply cleanly to the top of u-boot-mpc83xx.git, because of the VSC7385 patches I applied last week. Can you rebase your patches to the top of the mpc83xx git tree? I just updated it to Wolfgang's top-of-tree.

Kim

#4 lore raw

PATCH 1/7 83xx: nand support for MPC837XRDB boards

Quoted 15 lines · Kim Phillips
Quoted 12 lines · On Tue, 18 Mar 2008 17:10:55 +0300 Anton Vorontsov <[email protected]>…
Quoted 8 lines

include/configs/MPC837XERDB.h line 276

Quoted 6 lines
include/configs/MPC837XERDB.h +4 -1
-/* VSC7385 Gigabit Switch support */
+/*
+ * VSC7385 Gigabit Switch support
+ */
+#define CFG_VSC7385_BASE	0xF0000000

What does this have to do with NAND?

Nothing. I'm expanding VSC7385 comment to better separate it from the NAND code. Most lengthy parts of the RDB config are using

Quoted 8 lines
Quoted 5 lines

/*
*
*/

as a logical separator. So did I.

that's fine, it just makes patch review easier and less susceptible to comments like this if you keep your patches on-subject.

To be fair, the main reason for the comment was that I missed this line:
-#define CFG_VSC7385_BASE 0xF0000000

way at the top of the diff, and thought the patch was introducing the #define rather than just reformatting the comment.

-Scott

#5 lore raw

PATCH 1/7 83xx: nand support for MPC837XRDB boards

Quoted 22 lines · Scott Wood
Quoted 21 lines · Kim Phillips
Quoted 17 lines · On Tue, 18 Mar 2008 17:10:55 +0300 Anton Vorontsov <[email protected]>…
Quoted 8 lines

include/configs/MPC837XERDB.h line 276

Quoted 6 lines
include/configs/MPC837XERDB.h +4 -1
-/* VSC7385 Gigabit Switch support */
+/*
+ * VSC7385 Gigabit Switch support
+ */
+#define CFG_VSC7385_BASE	0xF0000000

What does this have to do with NAND?

Nothing. I'm expanding VSC7385 comment to better separate it from the NAND code. Most lengthy parts of the RDB config are using

/*
*
*/

as a logical separator. So did I.

Quoted 8 lines
Quoted 2 lines

that's fine, it just makes patch review easier and less susceptible to comments like this if you keep your patches on-subject.

To be fair, the main reason for the comment was that I missed this line:
-#define CFG_VSC7385_BASE 0xF0000000

way at the top of the diff, and thought the patch was introducing the #define rather than just reformatting the comment.

Nothing was introduced, but moved around. Anyway, I'll just drop it on the next resend.

Signature · 3 lines
Anton Vorontsov
email: cboumailru at gmail.com
irc://irc.freenode.net/bd2
#6 lore raw

PATCH 1/7 83xx: nand support for MPC837XRDB boards

Quoted 21 lines · Anton Vorontsov
Quoted 20 lines · Scott Wood
Quoted 19 lines · Kim Phillips
Quoted 6 lines · On Tue, 18 Mar 2008 17:10:55 +0300 Anton Vorontsov <[email protected]>…
Quoted 6 lines

include/configs/MPC837XERDB.h line 276

Quoted 5 lines
include/configs/MPC837XERDB.h +4 -1
-/* VSC7385 Gigabit Switch support */
+/*
+ * VSC7385 Gigabit Switch support
+ */
+#define CFG_VSC7385_BASE	0xF0000000

What does this have to do with NAND?

Quoted 8 lines

Nothing. I'm expanding VSC7385 comment to better separate it from the NAND code. Most lengthy parts of the RDB config are using

/*
*
*/

as a logical separator. So did I.

that's fine, it just makes patch review easier and less susceptible to comments like this if you keep your patches on-subject.

Quoted 8 lines
Quoted 5 lines

To be fair, the main reason for the comment was that I missed this line:
-#define CFG_VSC7385_BASE 0xF0000000

way at the top of the diff, and thought the patch was introducing the #define rather than just reformatting the comment.

Nothing was introduced, but moved around. Anyway, I'll just drop it on the next resend.

Hi Anton,

IMHO the move and reformat was a Good Thing[tm]. We (myself included) simply didn't understand what happened and it looked odd.

I would encourage you to keep the move/reformat and leave the world a little cleaner and brighter.

Thanks,
gvb