Skip to contentSkip to conversation

Add multi-chips support for NAND, FSL-UPM and TQM8548

PATCH New Wolfgang Grandegger 3 participants 13 messages Feb 11, 2009 – Feb 16, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

v2 cover Add multi-chips support for NAND, FSL-UPM and TQM8548

The following patch series intends to support the Micron multi-chip NAND device MT29F8G08FAB on the TQM8548 modules from TQ-Components. To offer this multi-chip device as one single device to the user, multi-chip device has been added to the MTD NAND layer and the FSL-UPM-NAND driver.

The TQM8548 support is based on the following patch series sent a few minutes ago:

[PATCH 0/8] MPC85xx: Support for TQM8548-AG and TQM8548-BE

Wolfgang.

#4 lore raw

PATCH v2 3/5 Add support for TQM-specific chip select logic to FSL-UPM

Quoted 5 lines · Wolfgang Grandegger

Index: u-boot/drivers/mtd/nand/fsl_upm.c
===================================================================

drivers/mtd/nand/fsl_upm.c static void fun_cmd_ctrl(struct mtd_info · line 97

Quoted 9 lines
drivers/mtd/nand/fsl_upm.c +4 -1
@@ -90,8 +90,11 @@ static void fun_cmd_ctrl(struct mtd_info
 	mar = cmd << (32 - fun->width);
 	io_addr = fun->upm.io_addr;
 #if CONFIG_SYS_NAND_MAX_CHIPS > 1
-	if (fun->chip_nr > 0)
+	if (fun->chip_nr > 0) {
 		io_addr += fun->chip_offset * fun->chip_nr;
+		if (fun->upm_mar_chip_offset)
+			mar |= fun->upm_mar_chip_offset * fun->chip_nr;
+	}

Any particular reason not to drop the > 0 conditional?

-Scott

#5 lore raw

PATCH v2 3/5 Add support for TQM-specific chip select logic to FSL-UPM

Quoted 17 lines · Scott Wood
Quoted 5 lines · Wolfgang Grandegger

Index: u-boot/drivers/mtd/nand/fsl_upm.c
===================================================================

drivers/mtd/nand/fsl_upm.c static void fun_cmd_ctrl(struct mtd_info · line 97

Quoted 9 lines
drivers/mtd/nand/fsl_upm.c +4 -1
@@ -90,8 +90,11 @@ static void fun_cmd_ctrl(struct mtd_info
 	mar = cmd << (32 - fun->width);
 	io_addr = fun->upm.io_addr;
 #if CONFIG_SYS_NAND_MAX_CHIPS > 1
-	if (fun->chip_nr > 0)
+	if (fun->chip_nr > 0) {
 		io_addr += fun->chip_offset * fun->chip_nr;
+		if (fun->upm_mar_chip_offset)
+			mar |= fun->upm_mar_chip_offset * fun->chip_nr;
+	}

Any particular reason not to drop the > 0 conditional?

No, apart from saving some space. Should I send an updated patch?

Wolfgang.

#6 lore raw

PATCH v2 3/5 Add support for TQM-specific chip select logic to FSL-UPM

Quoted 18 lines · Wolfgang Grandegger
Quoted 16 lines · Scott Wood
Quoted 5 lines · Wolfgang Grandegger

Index: u-boot/drivers/mtd/nand/fsl_upm.c
===================================================================

drivers/mtd/nand/fsl_upm.c static void fun_cmd_ctrl(struct mtd_info · line 97

Quoted 9 lines
drivers/mtd/nand/fsl_upm.c +4 -1
@@ -90,8 +90,11 @@ static void fun_cmd_ctrl(struct mtd_info
 	mar = cmd << (32 - fun->width);
 	io_addr = fun->upm.io_addr;
 #if CONFIG_SYS_NAND_MAX_CHIPS > 1
-	if (fun->chip_nr > 0)
+	if (fun->chip_nr > 0) {
 		io_addr += fun->chip_offset * fun->chip_nr;
+		if (fun->upm_mar_chip_offset)
+			mar |= fun->upm_mar_chip_offset * fun->chip_nr;
+	}

Any particular reason not to drop the > 0 conditional?

Quoted 1 line

No, apart from saving some space. Should I send an updated patch?

No, I've applied it. You can send a follow-up patch if you like.

-Scott

#7 lore raw

PATCH v2 3/5 Add support for TQM-specific chip select logic to FSL-UPM

In reply to Wolfgang Grandegger
Quoted 18 lines · Wolfgang Grandegger
Quoted 16 lines · Scott Wood
Quoted 5 lines · Wolfgang Grandegger

Index: u-boot/drivers/mtd/nand/fsl_upm.c
===================================================================

drivers/mtd/nand/fsl_upm.c static void fun_cmd_ctrl(struct mtd_info · line 97

Quoted 9 lines
drivers/mtd/nand/fsl_upm.c +4 -1
@@ -90,8 +90,11 @@ static void fun_cmd_ctrl(struct mtd_info
 	mar = cmd << (32 - fun->width);
 	io_addr = fun->upm.io_addr;
 #if CONFIG_SYS_NAND_MAX_CHIPS > 1
-	if (fun->chip_nr > 0)
+	if (fun->chip_nr > 0) {
 		io_addr += fun->chip_offset * fun->chip_nr;
+		if (fun->upm_mar_chip_offset)
+			mar |= fun->upm_mar_chip_offset * fun->chip_nr;
+	}

Any particular reason not to drop the > 0 conditional?

Quoted 1 line

No, apart from saving some space. Should I send an updated patch?

BTW, it seems to me that the conditional adds to the image size, rather than reducing it...

-Scott

#10 lore raw

v2 cover Add multi-chips support for NAND, FSL-UPM and TQM8548

In reply to Wolfgang Grandegger
Quoted 6 lines · Wolfgang Grandegger

The following patch series intends to support the Micron multi-chip NAND device MT29F8G08FAB on the TQM8548 modules from TQ-Components. To offer this multi-chip device as one single device to the user, multi-chip device has been added to the MTD NAND layer and the FSL-UPM-NAND driver.

Quoted 6 lines

The TQM8548 support is based on the following patch series sent a few minutes ago:

[PATCH 0/8] MPC85xx: Support for TQM8548-AG and TQM8548-BE

Wolfgang.

Applied 1-5 to u-boot-nand-flash/next, thanks!

-Scott

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw

v2 cover Add multi-chips support for NAND, FSL-UPM and TQM8548

Quoted 1 line

* Index: u-boot/drivers/mtd/nand/fsl_upm.c

*>* =================================================================== *>* --- u-boot.orig/drivers/mtd/nand/fsl_upm.c
*>* +++ u-boot/drivers/mtd/nand/fsl_upm.c
*>* @@ -90,8 +90,11 @@ static void fun_cmd_ctrl(struct mtd_info

*>*  	mar = cmd << (32 - fun->width);
*>*  	io_addr = fun->upm.io_addr;
*>*  #if CONFIG_SYS_NAND_MAX_CHIPS > 1

*>* - if (fun->chip_nr > 0)
*>* + if (fun->chip_nr > 0) {
*>* io_addr += fun->chip_offset * fun->chip_nr;
*>* + if (fun->upm_mar_chip_offset)
*>* + mar |= fun->upm_mar_chip_offset * fun->chip_nr;
*>* + }
*
above patch is not suitable for 832x becuase mar register has only 26 bit (6 bit are resrved)
what should be done

Quoted 22 lines · Scott Wood
Quoted 6 lines · Wolfgang Grandegger

The following patch series intends to support the Micron multi-chip NAND device MT29F8G08FAB on the TQM8548 modules from TQ-Components. To offer this multi-chip device as one single device to the user, multi-chip device has been added to the MTD NAND layer and the FSL-UPM-NAND driver.

Quoted 6 lines

The TQM8548 support is based on the following patch series sent a few minutes ago:

[PATCH 0/8] MPC85xx: Support for TQM8548-AG and TQM8548-BE

Wolfgang.

Applied 1-5 to u-boot-nand-flash/next, thanks!

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

#13 lore raw

v2 cover Add multi-chips support for NAND, FSL-UPM and TQM8548

Quoted 8 lines · arun sharma
Quoted 1 line

* Index: u-boot/drivers/mtd/nand/fsl_upm.c

*>* =================================================================== *>* --- u-boot.orig/drivers/mtd/nand/fsl_upm.c
*>* +++ u-boot/drivers/mtd/nand/fsl_upm.c
*>* @@ -90,8 +90,11 @@ static void fun_cmd_ctrl(struct mtd_info

*>*  	mar = cmd << (32 - fun->width);
*>*  	io_addr = fun->upm.io_addr;
*>*  #if CONFIG_SYS_NAND_MAX_CHIPS > 1
Quoted 10 lines

*>* - if (fun->chip_nr > 0)
*>* + if (fun->chip_nr > 0) {
*>* io_addr += fun->chip_offset * fun->chip_nr;
*>* + if (fun->upm_mar_chip_offset)
*>* + mar |= fun->upm_mar_chip_offset * fun->chip_nr;
*>* + }
*
above patch is not suitable for 832x becuase mar register has only 26 bit (6 bit are resrved)
what should be done

Simply do not define fun->upm_mar_chip_offset in your BSP code. It is used on the TQM8548 modules to driver some board-specific chip select logic. Anyhow, do you need to support a multi-chip (multi-die) device all?

Wolfgang.