All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] arm/kirkwood/nand: allow forced disabling for subpage writes
@ 2014-08-15  8:51 Holger Brunck
  2014-08-15  8:51 ` [U-Boot] [PATCH 2/2] arm/km: disable subpage write for km_kirkwood_pci and kmsuv31 target Holger Brunck
  2014-08-30 15:15 ` [U-Boot] [U-Boot, 1/2] arm/kirkwood/nand: allow forced disabling for subpage writes Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Holger Brunck @ 2014-08-15  8:51 UTC (permalink / raw)
  To: u-boot

Make it configurable to disable subpage writes like the DaVinci NAND
driver already does.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Scott Wood <scottwood@freescale.com>
---
 drivers/mtd/nand/kirkwood_nand.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/kirkwood_nand.c b/drivers/mtd/nand/kirkwood_nand.c
index 72687a1..3e5fb0c 100644
--- a/drivers/mtd/nand/kirkwood_nand.c
+++ b/drivers/mtd/nand/kirkwood_nand.c
@@ -58,6 +58,9 @@ void kw_nand_select_chip(struct mtd_info *mtd, int chip)
 int board_nand_init(struct nand_chip *nand)
 {
 	nand->options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING;
+#if defined(CONFIG_SYS_NAND_NO_SUBPAGE_WRITE)
+	nand->options |= NAND_NO_SUBPAGE_WRITE;
+#endif
 #if defined(CONFIG_NAND_ECC_BCH)
 	nand->ecc.mode = NAND_ECC_SOFT_BCH;
 #else
-- 
1.8.0.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] arm/km: disable subpage write for km_kirkwood_pci and kmsuv31 target
  2014-08-15  8:51 [U-Boot] [PATCH 1/2] arm/kirkwood/nand: allow forced disabling for subpage writes Holger Brunck
@ 2014-08-15  8:51 ` Holger Brunck
  2014-08-30 15:15   ` [U-Boot] [U-Boot, " Tom Rini
  2014-08-30 15:15 ` [U-Boot] [U-Boot, 1/2] arm/kirkwood/nand: allow forced disabling for subpage writes Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Holger Brunck @ 2014-08-15  8:51 UTC (permalink / raw)
  To: u-boot

Newer FLASH types used on these boards don't allow writing of subpages.
So disable subpage write in the NAND driver. Additionally we need to
tell the UBI layer in the kernel that he also should only write 2048
bytes. This is done with an additional command line parameter for the
kernel commandline.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
---
 include/configs/km_kirkwood.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/configs/km_kirkwood.h b/include/configs/km_kirkwood.h
index 9eb1ad3..dc26155 100644
--- a/include/configs/km_kirkwood.h
+++ b/include/configs/km_kirkwood.h
@@ -34,6 +34,8 @@
 #define CONFIG_HOSTNAME			km_kirkwood_pci
 #define CONFIG_KM_IVM_BUS		1	/* I2C2 (Mux-Port 1)*/
 #define CONFIG_KM_FPGA_CONFIG
+#define CONFIG_KM_UBI_PART_BOOT_OPTS		",2048"
+#define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
 
 /* KM_KIRKWOOD_128M16 */
 #elif defined(CONFIG_KM_KIRKWOOD_128M16)
@@ -105,7 +107,8 @@
 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_128M16_1.cfg
 #define CONFIG_KM_ENV_IS_IN_SPI_NOR
 #define CONFIG_KM_FPGA_CONFIG
-
+#define CONFIG_KM_UBI_PART_BOOT_OPTS		",2048"
+#define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
 #else
 #error ("Board unsupported")
 #endif
-- 
1.8.0.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [U-Boot, 1/2] arm/kirkwood/nand: allow forced disabling for subpage writes
  2014-08-15  8:51 [U-Boot] [PATCH 1/2] arm/kirkwood/nand: allow forced disabling for subpage writes Holger Brunck
  2014-08-15  8:51 ` [U-Boot] [PATCH 2/2] arm/km: disable subpage write for km_kirkwood_pci and kmsuv31 target Holger Brunck
@ 2014-08-30 15:15 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-08-30 15:15 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 15, 2014 at 10:51:47AM +0200, Holger Brunck wrote:

> Make it configurable to disable subpage writes like the DaVinci NAND
> driver already does.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> cc: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Prafulla Wadaskar <prafulla@marvell.com>
> cc: Scott Wood <scottwood@freescale.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140830/5e0a90b5/attachment.pgp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [U-Boot, 2/2] arm/km: disable subpage write for km_kirkwood_pci and kmsuv31 target
  2014-08-15  8:51 ` [U-Boot] [PATCH 2/2] arm/km: disable subpage write for km_kirkwood_pci and kmsuv31 target Holger Brunck
@ 2014-08-30 15:15   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-08-30 15:15 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 15, 2014 at 10:51:48AM +0200, Holger Brunck wrote:

> Newer FLASH types used on these boards don't allow writing of subpages.
> So disable subpage write in the NAND driver. Additionally we need to
> tell the UBI layer in the kernel that he also should only write 2048
> bytes. This is done with an additional command line parameter for the
> kernel commandline.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> cc: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Prafulla Wadaskar <prafulla@marvell.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140830/7a5d5237/attachment.pgp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-30 15:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-15  8:51 [U-Boot] [PATCH 1/2] arm/kirkwood/nand: allow forced disabling for subpage writes Holger Brunck
2014-08-15  8:51 ` [U-Boot] [PATCH 2/2] arm/km: disable subpage write for km_kirkwood_pci and kmsuv31 target Holger Brunck
2014-08-30 15:15   ` [U-Boot] [U-Boot, " Tom Rini
2014-08-30 15:15 ` [U-Boot] [U-Boot, 1/2] arm/kirkwood/nand: allow forced disabling for subpage writes Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.