All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI
@ 2015-08-22 18:13 Hans de Goede
  2015-08-22 18:13 ` [U-Boot] [PATCH 2/4] sunxi_nand_spl: Remove NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END Hans de Goede
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Hans de Goede @ 2015-08-22 18:13 UTC (permalink / raw)
  To: u-boot

We eventually want to add full nand support, since it makes no sense
to build SPL with nand support and u-boot without, or the other way
around, a single option will suffice.

Renaming the Kconfig option now makes things easier when we add full
nand support in the future.

The "obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o" is moved to an
"ifdef CONFIG_SPL_BUILD" block in the Makefile.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 board/sunxi/board.c            |  2 +-
 drivers/mtd/nand/Kconfig       | 18 +++++++++---------
 drivers/mtd/nand/Makefile      |  2 +-
 include/configs/sunxi-common.h |  2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index d411e96..9c855f6 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -108,7 +108,7 @@ int dram_init(void)
 	return 0;
 }
 
-#if defined(CONFIG_SPL_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
 static void nand_pinmux_setup(void)
 {
 	unsigned int pin;
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 5f456c9..c331f66 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -56,6 +56,14 @@ config SYS_NAND_VF610_NFC_60_ECC_BYTES
 
 endchoice
 
+config NAND_SUNXI
+	bool "Support for NAND on Allwinner SoCs in SPL"
+	depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
+	select SYS_NAND_SELF_INIT
+	---help---
+	Enable support for NAND. This option allows SPL to read from
+	sunxi NAND using DMA transfers.
+
 comment "Generic NAND options"
 
 # Enhance depends when converting drivers to Kconfig which use this config
@@ -85,18 +93,10 @@ config SPL_NAND_DENALI
 	  This is a small implementation of the Denali NAND controller
 	  for use on SPL.
 
-config SPL_NAND_SUNXI
-	bool "Support for NAND on Allwinner SoCs in SPL"
-	depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
-	select SYS_NAND_SELF_INIT
-	---help---
-	Enable support for NAND. This option allows SPL to read from
-	sunxi NAND using DMA transfers.
-
 config NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END
 	hex "Size of syndrome partitions in sunxi NAND"
 	default 0x400000
-	depends on SPL_NAND_SUNXI
+	depends on NAND_SUNXI
 	---help---
 	End address for boot partitions on NAND. Those partitions have a
 	different random seed that has to match the sunxi BROM setting.
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 46dce72..c3bd0f7 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -12,7 +12,6 @@ NORMAL_DRIVERS=y
 endif
 
 obj-$(CONFIG_SPL_NAND_AM33XX_BCH) += am335x_spl_bch.o
-obj-$(CONFIG_SPL_NAND_SUNXI) += sunxi_nand_spl.o
 obj-$(CONFIG_SPL_NAND_DENALI) += denali_spl.o
 obj-$(CONFIG_SPL_NAND_DOCG4) += docg4_spl.o
 obj-$(CONFIG_SPL_NAND_SIMPLE) += nand_spl_simple.o
@@ -75,5 +74,6 @@ obj-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_spl.o
 obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_spl.o
 obj-$(CONFIG_NAND_MXC) += mxc_nand_spl.o
 obj-$(CONFIG_NAND_MXS) += mxs_nand_spl.o mxs_nand.o
+obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o
 
 endif # drivers
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 3735afb..519c99c 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -137,7 +137,7 @@
 #define CONFIG_INITRD_TAG
 #define CONFIG_SERIAL_TAG
 
-#if defined(CONFIG_SPL_NAND_SUNXI)
+#ifdef CONFIG_NAND_SUNXI
 #define CONFIG_SPL_NAND_SUPPORT 1
 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x008000
 #endif
-- 
2.4.3

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

* [U-Boot] [PATCH 2/4] sunxi_nand_spl: Remove NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END
  2015-08-22 18:13 [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI Hans de Goede
@ 2015-08-22 18:13 ` Hans de Goede
  2015-08-24 17:02   ` Scott Wood
  2015-08-22 18:13 ` [U-Boot] [PATCH 3/4] mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig Hans de Goede
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Hans de Goede @ 2015-08-22 18:13 UTC (permalink / raw)
  To: u-boot

We only ever use syndrome mode for the partitions which contain the SPL,
as that is required for the BROM to be able to read the SPL.

Instead of using some arbritray limit for deciding whether or not to
use syndrome, be smart and check if u-boot-dtb.bin is directly behind
the SPL, if it is not then it is on its own partition and we should not
use syndrome.

Note the reason why we only use syndrome mode is because it comes with
weaker randomization, introducing a risc for more bit errors, so we want
to avoid it when possible.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/mtd/nand/Kconfig          | 8 --------
 drivers/mtd/nand/sunxi_nand_spl.c | 8 ++++++--
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index c331f66..c65951e 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -93,14 +93,6 @@ config SPL_NAND_DENALI
 	  This is a small implementation of the Denali NAND controller
 	  for use on SPL.
 
-config NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END
-	hex "Size of syndrome partitions in sunxi NAND"
-	default 0x400000
-	depends on NAND_SUNXI
-	---help---
-	End address for boot partitions on NAND. Those partitions have a
-	different random seed that has to match the sunxi BROM setting.
-
 endif
 
 endmenu
diff --git a/drivers/mtd/nand/sunxi_nand_spl.c b/drivers/mtd/nand/sunxi_nand_spl.c
index ebab2ed..0505424 100644
--- a/drivers/mtd/nand/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/sunxi_nand_spl.c
@@ -355,8 +355,12 @@ int nand_spl_load_image(uint32_t offs, unsigned int size, void *dest)
 		2 * 1024 * 1024 + CONFIG_SYS_NAND_U_BOOT_OFFS,
 		4 * 1024 * 1024 + CONFIG_SYS_NAND_U_BOOT_OFFS,
 	};
-	int syndrome = offs < CONFIG_NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END;
-	int i;
+	int i, syndrome;
+
+	if (CONFIG_SYS_NAND_U_BOOT_OFFS == CONFIG_SPL_PAD_TO)
+		syndrome = 1; /* u-boot-dtb.bin appended to SPL */
+	else
+		syndrome = 0; /* u-boot-dtb.bin on its own partition */
 
 	if (offs == CONFIG_SYS_NAND_U_BOOT_OFFS) {
 		for (i = 0; i < ARRAY_SIZE(boot_offsets); i++) {
-- 
2.4.3

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

* [U-Boot] [PATCH 3/4] mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig
  2015-08-22 18:13 [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI Hans de Goede
  2015-08-22 18:13 ` [U-Boot] [PATCH 2/4] sunxi_nand_spl: Remove NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END Hans de Goede
@ 2015-08-22 18:13 ` Hans de Goede
  2015-08-26 18:38   ` Ian Campbell
  2015-08-22 18:13 ` [U-Boot] [PATCH 4/4] sunxi: Add inet97fv2_defconfig Hans de Goede
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Hans de Goede @ 2015-08-22 18:13 UTC (permalink / raw)
  To: u-boot

Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig, just like
SYS_NAND_BUSWIDTH_16BIT this is only enabled on some SoCs using depends,
to avoid double defining it for SoCs which have not yet moved to Kconfig
for this.

Having this in Kconfig is useful because this is something which may
differ from one board to the other even when using the same SoC.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/mtd/nand/Kconfig       | 9 +++++++++
 include/configs/sunxi-common.h | 1 -
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index c65951e..a58fa7e 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -85,6 +85,15 @@ config SYS_NAND_BUSWIDTH_16BIT
 	    not available while configuring controller. So a static CONFIG_NAND_xx
 	    is needed to know the device's bus-width in advance.
 
+# Enhance depends when converting drivers to Kconfig which use this config
+config SYS_NAND_U_BOOT_OFFS
+	hex "Location in NAND to read U-Boot from"
+	default 0x8000 if NAND_SUNXI
+	depends on NAND_SUNXI
+	help
+	Set the offset from the start of the nand where u-boot should be
+	loaded from.
+
 if SPL
 
 config SPL_NAND_DENALI
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 519c99c..5c65a89 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -139,7 +139,6 @@
 
 #ifdef CONFIG_NAND_SUNXI
 #define CONFIG_SPL_NAND_SUPPORT 1
-#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x008000
 #endif
 
 /* mmc config */
-- 
2.4.3

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

* [U-Boot] [PATCH 4/4] sunxi: Add inet97fv2_defconfig
  2015-08-22 18:13 [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI Hans de Goede
  2015-08-22 18:13 ` [U-Boot] [PATCH 2/4] sunxi_nand_spl: Remove NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END Hans de Goede
  2015-08-22 18:13 ` [U-Boot] [PATCH 3/4] mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig Hans de Goede
@ 2015-08-22 18:13 ` Hans de Goede
  2015-08-26 18:39   ` Ian Campbell
  2015-08-26 18:35 ` [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI Ian Campbell
  2015-09-18 11:43 ` [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI Olliver Schinagl
  4 siblings, 1 reply; 18+ messages in thread
From: Hans de Goede @ 2015-08-22 18:13 UTC (permalink / raw)
  To: u-boot

The inet97fv2 is a board found in the first generation of cheap allwinner
A10 based 7" tablets.

Note that this patch does not add a dts file as we already have one from
our dts syncs with the kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 board/sunxi/MAINTAINERS     |  3 ++-
 configs/inet97fv2_defconfig | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 configs/inet97fv2_defconfig

diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index de99fe1..46a78bd 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -8,9 +8,9 @@ F:	configs/ba10_tv_box_defconfig
 F:	configs/Chuwi_V7_CW0825_defconfig
 F:	configs/Cubieboard_defconfig
 F:	configs/Hyundai_A7HD_defconfig
+F:	configs/inet97fv2_defconfig
 F:	configs/jesurun_q5_defconfig
 F:	configs/Mele_A1000_defconfig
-F:	configs/Mele_A1000G_quad_defconfig
 F:	configs/Mele_M3_defconfig
 F:	configs/Mini-X_defconfig
 F:	configs/mk802_defconfig
@@ -26,6 +26,7 @@ F:	configs/r7-tv-dongle_defconfig
 F:	configs/UTOO_P66_defconfig
 F:	include/configs/sun6i.h
 F:	configs/CSQ_CS908_defconfig
+F:	configs/Mele_A1000G_quad_defconfig
 F:	configs/Mele_M9_defconfig
 F:	include/configs/sun7i.h
 F:	configs/A20-OLinuXino_MICRO_defconfig
diff --git a/configs/inet97fv2_defconfig b/configs/inet97fv2_defconfig
new file mode 100644
index 0000000..d7ddee1
--- /dev/null
+++ b/configs/inet97fv2_defconfig
@@ -0,0 +1,20 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN4I=y
+CONFIG_DRAM_CLK=408
+CONFIG_DRAM_EMR1=4
+CONFIG_USB0_VBUS_PIN="PB9"
+CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_USB0_ID_DET="PH4"
+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:24,pclk_khz:33000,le:45,ri:209,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_POWER="PH8"
+CONFIG_VIDEO_LCD_BL_EN="PH7"
+CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_USB_MUSB_HOST=y
+CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet97fv2"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER"
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
-- 
2.4.3

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

* [U-Boot] [PATCH 2/4] sunxi_nand_spl: Remove NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END
  2015-08-22 18:13 ` [U-Boot] [PATCH 2/4] sunxi_nand_spl: Remove NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END Hans de Goede
@ 2015-08-24 17:02   ` Scott Wood
  2015-08-25  7:18     ` Hans de Goede
  0 siblings, 1 reply; 18+ messages in thread
From: Scott Wood @ 2015-08-24 17:02 UTC (permalink / raw)
  To: u-boot

On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
> We only ever use syndrome mode for the partitions which contain the SPL,
> as that is required for the BROM to be able to read the SPL.
> 
> Instead of using some arbritray limit for deciding whether or not to
> use syndrome, be smart and check if u-boot-dtb.bin is directly behind
> the SPL, if it is not then it is on its own partition and we should not
> use syndrome.
> 
> Note the reason why we only use syndrome mode is because it comes with
> weaker randomization,

"...why we only use syndrome mode for the SPL is because..."

>  introducing a risc for more bit errors, 

risk


> -     int syndrome = offs < CONFIG_NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END;
> -     int i;
> +     int i, syndrome;
> +
> +     if (CONFIG_SYS_NAND_U_BOOT_OFFS == CONFIG_SPL_PAD_TO)
> +             syndrome = 1; /* u-boot-dtb.bin appended to SPL */
> +     else
> +             syndrome = 0; /* u-boot-dtb.bin on its own partition */

Is it not possible for a separate partition to begin at CONFIG_SPL_PAD_TO, or 
would padding not be used in that case?

-Scott

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

* [U-Boot] [PATCH 2/4] sunxi_nand_spl: Remove NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END
  2015-08-24 17:02   ` Scott Wood
@ 2015-08-25  7:18     ` Hans de Goede
  2015-08-26 18:37       ` Ian Campbell
  0 siblings, 1 reply; 18+ messages in thread
From: Hans de Goede @ 2015-08-25  7:18 UTC (permalink / raw)
  To: u-boot

Hi,

On 24-08-15 19:02, Scott Wood wrote:
> On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
>> We only ever use syndrome mode for the partitions which contain the SPL,
>> as that is required for the BROM to be able to read the SPL.
>>
>> Instead of using some arbritray limit for deciding whether or not to
>> use syndrome, be smart and check if u-boot-dtb.bin is directly behind
>> the SPL, if it is not then it is on its own partition and we should not
>> use syndrome.
>>
>> Note the reason why we only use syndrome mode is because it comes with
>> weaker randomization,
>
> "...why we only use syndrome mode for the SPL is because..."
>
>>   introducing a risc for more bit errors,
>
> risk

Will fix.

>> -     int syndrome = offs < CONFIG_NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END;
>> -     int i;
>> +     int i, syndrome;
>> +
>> +     if (CONFIG_SYS_NAND_U_BOOT_OFFS == CONFIG_SPL_PAD_TO)
>> +             syndrome = 1; /* u-boot-dtb.bin appended to SPL */
>> +     else
>> +             syndrome = 0; /* u-boot-dtb.bin on its own partition */
>
> Is it not possible for a separate partition to begin at CONFIG_SPL_PAD_TO, or
> would padding not be used in that case?

CONFIG_SPL_PAD_TO always is 32k on sunxi, partitions must be on an eraseblock
boundary and eraseblocks are always much larger then 32k, so this cannot happen.

Regards,

Hans

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

* [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI
  2015-08-22 18:13 [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI Hans de Goede
                   ` (2 preceding siblings ...)
  2015-08-22 18:13 ` [U-Boot] [PATCH 4/4] sunxi: Add inet97fv2_defconfig Hans de Goede
@ 2015-08-26 18:35 ` Ian Campbell
  2015-09-18 11:43 ` [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI Olliver Schinagl
  4 siblings, 0 replies; 18+ messages in thread
From: Ian Campbell @ 2015-08-26 18:35 UTC (permalink / raw)
  To: u-boot

On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
> We eventually want to add full nand support, since it makes no sense
> to build SPL with nand support and u-boot without, or the other way
> around, a single option will suffice.
> 
> Renaming the Kconfig option now makes things easier when we add full
> nand support in the future.
> 
> The "obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o" is moved to an
> "ifdef CONFIG_SPL_BUILD" block in the Makefile.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ian Campbell <ijc@hellion.org.uk>

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

* [U-Boot] [PATCH 2/4] sunxi_nand_spl: Remove NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END
  2015-08-25  7:18     ` Hans de Goede
@ 2015-08-26 18:37       ` Ian Campbell
  0 siblings, 0 replies; 18+ messages in thread
From: Ian Campbell @ 2015-08-26 18:37 UTC (permalink / raw)
  To: u-boot

On Tue, 2015-08-25 at 09:18 +0200, Hans de Goede wrote:
> Hi,
> 
> On 24-08-15 19:02, Scott Wood wrote:
> > On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
> > > We only ever use syndrome mode for the partitions which contain 
> > > the SPL,
> > > as that is required for the BROM to be able to read the SPL.
> > > 
> > > Instead of using some arbritray limit for deciding whether or not 
> > > to
> > > use syndrome, be smart and check if u-boot-dtb.bin is directly 
> > > behind
> > > the SPL, if it is not then it is on its own partition and we 
> > > should not
> > > use syndrome.
> > > 
> > > Note the reason why we only use syndrome mode is because it comes 
> > > with
> > > weaker randomization,
> > 
> > "...why we only use syndrome mode for the SPL is because..."
> > 
> > >   introducing a risc for more bit errors,
> > 
> > risk
> 
> Will fix.

With that: Acked-by: Ian Campbell <ijc@hellion.org.uk>

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

* [U-Boot] [PATCH 3/4] mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig
  2015-08-22 18:13 ` [U-Boot] [PATCH 3/4] mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig Hans de Goede
@ 2015-08-26 18:38   ` Ian Campbell
  2015-08-26 19:08     ` Scott Wood
  0 siblings, 1 reply; 18+ messages in thread
From: Ian Campbell @ 2015-08-26 18:38 UTC (permalink / raw)
  To: u-boot

On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
> Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig, just 
> like
> SYS_NAND_BUSWIDTH_16BIT this is only enabled on some SoCs using 
> depends,
> to avoid double defining it for SoCs which have not yet moved to 
> Kconfig
> for this.
> 
> Having this in Kconfig is useful because this is something which may
> differ from one board to the other even when using the same SoC.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

For the sunxi side:
Acked-by: Ian Campbell <ijc@hellion.org.uk>

(But needs MTD custodian's more, I guess that is Scott?)

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

* [U-Boot] [PATCH 4/4] sunxi: Add inet97fv2_defconfig
  2015-08-22 18:13 ` [U-Boot] [PATCH 4/4] sunxi: Add inet97fv2_defconfig Hans de Goede
@ 2015-08-26 18:39   ` Ian Campbell
  2015-08-27  8:11     ` Hans de Goede
  0 siblings, 1 reply; 18+ messages in thread
From: Ian Campbell @ 2015-08-26 18:39 UTC (permalink / raw)
  To: u-boot

On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
> -F:	configs/Mele_A1000G_quad_defconfig
> 
[...]

> +F:	configs/Mele_A1000G_quad_defconfig

Unintentional?

Without that move: Acked-by: Ian Campbell <ijc@hellion.org.uk>

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

* [U-Boot] [PATCH 3/4] mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig
  2015-08-26 18:38   ` Ian Campbell
@ 2015-08-26 19:08     ` Scott Wood
  2015-08-27 18:04       ` Hans de Goede
  0 siblings, 1 reply; 18+ messages in thread
From: Scott Wood @ 2015-08-26 19:08 UTC (permalink / raw)
  To: u-boot

On Wed, 2015-08-26 at 19:38 +0100, Ian Campbell wrote:
> On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
> > Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig, just 
> > like
> > SYS_NAND_BUSWIDTH_16BIT this is only enabled on some SoCs using 
> > depends,
> > to avoid double defining it for SoCs which have not yet moved to 
> > Kconfig
> > for this.
> > 
> > Having this in Kconfig is useful because this is something which may
> > differ from one board to the other even when using the same SoC.
> > 
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> For the sunxi side:
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
> 
> (But needs MTD custodian's more, I guess that is Scott?)

Acked-by: Scott Wood <scottwood@freescale.com>

...but note that this is one of the symbols that can never be kconfigized for 
the boards that use TPL, so long as SPLs can't have their own config.

I'm also not looking forward to such symbols growing a huge list of boards in 
the depends field.  I'm not sure what the answer is here.

-Scott

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

* [U-Boot] [PATCH 4/4] sunxi: Add inet97fv2_defconfig
  2015-08-26 18:39   ` Ian Campbell
@ 2015-08-27  8:11     ` Hans de Goede
  2015-08-27 20:18       ` Ian Campbell
  0 siblings, 1 reply; 18+ messages in thread
From: Hans de Goede @ 2015-08-27  8:11 UTC (permalink / raw)
  To: u-boot

Hi,

On 26-08-15 20:39, Ian Campbell wrote:
> On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
>> -F:	configs/Mele_A1000G_quad_defconfig
>>
> [...]
>
>> +F:	configs/Mele_A1000G_quad_defconfig
>
> Unintentional?

Nope intentional, the boards under my name are
sorted by family, then alphabetically, so
first all sun4i boards, then all sun5i, etc.

This one was in the wrong place.

But you're right this does not belong here, I'll move
this to a separate patch.

> Without that move: Acked-by: Ian Campbell <ijc@hellion.org.uk>

Regards,

Hans

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

* [U-Boot] [PATCH 3/4] mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig
  2015-08-26 19:08     ` Scott Wood
@ 2015-08-27 18:04       ` Hans de Goede
  0 siblings, 0 replies; 18+ messages in thread
From: Hans de Goede @ 2015-08-27 18:04 UTC (permalink / raw)
  To: u-boot

Hi,

On 26-08-15 21:08, Scott Wood wrote:
> On Wed, 2015-08-26 at 19:38 +0100, Ian Campbell wrote:
>> On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
>>> Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig, just
>>> like
>>> SYS_NAND_BUSWIDTH_16BIT this is only enabled on some SoCs using
>>> depends,
>>> to avoid double defining it for SoCs which have not yet moved to
>>> Kconfig
>>> for this.
>>>
>>> Having this in Kconfig is useful because this is something which may
>>> differ from one board to the other even when using the same SoC.
>>>
>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>
>> For the sunxi side:
>> Acked-by: Ian Campbell <ijc@hellion.org.uk>
>>
>> (But needs MTD custodian's more, I guess that is Scott?)
>
> Acked-by: Scott Wood <scottwood@freescale.com>
>
> ...but note that this is one of the symbols that can never be kconfigized for
> the boards that use TPL, so long as SPLs can't have their own config.

Hmm, maybe we beed to have 2 values for it then:
CONFIG_SYS_NAND_SPL_U_BOOT_OFFS
CONFIG_SYS_NAND_TPL_U_BOOT_OFFS

And select which one to use depending we are building the SPL or the TPL,
then both could go to Kconfig

> I'm also not looking forward to such symbols growing a huge list of boards in
> the depends field.  I'm not sure what the answer is here.

See above, if we do something like that, then at one point in time we
can choose to put in some effort to convert the remaining boards,
and just drop the depends.

Regards,

Hans

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

* [U-Boot] [PATCH 4/4] sunxi: Add inet97fv2_defconfig
  2015-08-27  8:11     ` Hans de Goede
@ 2015-08-27 20:18       ` Ian Campbell
  0 siblings, 0 replies; 18+ messages in thread
From: Ian Campbell @ 2015-08-27 20:18 UTC (permalink / raw)
  To: u-boot

On Thu, 2015-08-27 at 10:11 +0200, Hans de Goede wrote:
> Hi,
> 
> On 26-08-15 20:39, Ian Campbell wrote:
> > On Sat, 2015-08-22 at 20:13 +0200, Hans de Goede wrote:
> > > -F:	configs/Mele_A1000G_quad_defconfig
> > > 
> > [...]
> > 
> > > +F:	configs/Mele_A1000G_quad_defconfig
> > 
> > Unintentional?
> 
> Nope intentional, the boards under my name are
> sorted by family, then alphabetically, so
> first all sun4i boards, then all sun5i, etc.
> 
> This one was in the wrong place.
> 
> But you're right this does not belong here, I'll move
> this to a separate patch.

Such a patch: Acked-by: Ian Campbell <ijc@hellion.org.uk>

(or this one with the move mentioned in the commit log would be oto)

> 
> > Without that move: Acked-by: Ian Campbell <ijc@hellion.org.uk>
> 
> Regards,
> 
> Hans
> 
> 

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

* [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI
  2015-08-22 18:13 [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI Hans de Goede
                   ` (3 preceding siblings ...)
  2015-08-26 18:35 ` [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI Ian Campbell
@ 2015-09-18 11:43 ` Olliver Schinagl
  2015-09-18 11:51   ` Olliver Schinagl
  2015-09-20 13:09   ` Hans de Goede
  4 siblings, 2 replies; 18+ messages in thread
From: Olliver Schinagl @ 2015-09-18 11:43 UTC (permalink / raw)
  To: u-boot

Hans de Goede <hdegoede <at> redhat.com> writes:

Hey Hans,
> 
> We eventually want to add full nand support, since it makes no sense
> to build SPL with nand support and u-boot without, or the other way
> around, a single option will suffice.
> 
> Renaming the Kconfig option now makes things easier when we add full
> nand support in the future.
> 
> The "obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o" is moved to an
> "ifdef CONFIG_SPL_BUILD" block in the Makefile.
> 
> Signed-off-by: Hans de Goede <hdegoede <at> redhat.com>
> ---
>  board/sunxi/board.c            |  2 +-
>  drivers/mtd/nand/Kconfig       | 18 +++++++++---------
>  drivers/mtd/nand/Makefile      |  2 +-
>  include/configs/sunxi-common.h |  2 +-
>  4 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index d411e96..9c855f6 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
>  <at>  <at>  -108,7 +108,7  <at>  <at>  int dram_init(void)
>  	return 0;
>  }
> 
> -#if defined(CONFIG_SPL_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
> +#if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)

While I agree this being a good way forward, the latest (and probably this
change included) break nand support entirely and cause link errors when
enabeling sunxi nand.

sunxi-bsp/u-boot-sunxi/drivers/mtd/nand/nand.c:104: undefined reference to
`board_nand_init' (which is from board/sunxi/board.c:144)

I think it's wise (for now) to remove the && defined(CONFIG_SPL_BUILD) and
re-add this guard later.

By removing we atleast can still build u-boot with nand support (thus
opening the option of testing and patches for users) and don't break
previously working systems.

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

* [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI
  2015-09-18 11:43 ` [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI Olliver Schinagl
@ 2015-09-18 11:51   ` Olliver Schinagl
  2015-09-20 13:09   ` Hans de Goede
  1 sibling, 0 replies; 18+ messages in thread
From: Olliver Schinagl @ 2015-09-18 11:51 UTC (permalink / raw)
  To: u-boot

Bah gmane!

Adding Hans and Ian to the CC list.

On 18-09-15 13:43, Olliver Schinagl wrote:
> Hans de Goede <hdegoede <at> redhat.com> writes:
>
> Hey Hans,
>> We eventually want to add full nand support, since it makes no sense
>> to build SPL with nand support and u-boot without, or the other way
>> around, a single option will suffice.
>>
>> Renaming the Kconfig option now makes things easier when we add full
>> nand support in the future.
>>
>> The "obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o" is moved to an
>> "ifdef CONFIG_SPL_BUILD" block in the Makefile.
>>
>> Signed-off-by: Hans de Goede <hdegoede <at> redhat.com>
>> ---
>>   board/sunxi/board.c            |  2 +-
>>   drivers/mtd/nand/Kconfig       | 18 +++++++++---------
>>   drivers/mtd/nand/Makefile      |  2 +-
>>   include/configs/sunxi-common.h |  2 +-
>>   4 files changed, 12 insertions(+), 12 deletions(-)
>>
>> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
>> index d411e96..9c855f6 100644
>> --- a/board/sunxi/board.c
>> +++ b/board/sunxi/board.c
>>   <at>  <at>  -108,7 +108,7  <at>  <at>  int dram_init(void)
>>   	return 0;
>>   }
>>
>> -#if defined(CONFIG_SPL_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
>> +#if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
> While I agree this being a good way forward, the latest (and probably this
> change included) break nand support entirely and cause link errors when
> enabeling sunxi nand.
>
> sunxi-bsp/u-boot-sunxi/drivers/mtd/nand/nand.c:104: undefined reference to
> `board_nand_init' (which is from board/sunxi/board.c:144)
>
> I think it's wise (for now) to remove the && defined(CONFIG_SPL_BUILD) and
> re-add this guard later.
>
> By removing we atleast can still build u-boot with nand support (thus
> opening the option of testing and patches for users) and don't break
> previously working systems.
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI
  2015-09-18 11:43 ` [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI Olliver Schinagl
  2015-09-18 11:51   ` Olliver Schinagl
@ 2015-09-20 13:09   ` Hans de Goede
  2015-09-26 13:01     ` Olliver Schinagl
  1 sibling, 1 reply; 18+ messages in thread
From: Hans de Goede @ 2015-09-20 13:09 UTC (permalink / raw)
  To: u-boot

Hi,

On 09/18/2015 07:43 AM, Olliver Schinagl wrote:
> Hans de Goede <hdegoede <at> redhat.com> writes:
>
> Hey Hans,
>>
>> We eventually want to add full nand support, since it makes no sense
>> to build SPL with nand support and u-boot without, or the other way
>> around, a single option will suffice.
>>
>> Renaming the Kconfig option now makes things easier when we add full
>> nand support in the future.
>>
>> The "obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o" is moved to an
>> "ifdef CONFIG_SPL_BUILD" block in the Makefile.
>>
>> Signed-off-by: Hans de Goede <hdegoede <at> redhat.com>
>> ---
>>   board/sunxi/board.c            |  2 +-
>>   drivers/mtd/nand/Kconfig       | 18 +++++++++---------
>>   drivers/mtd/nand/Makefile      |  2 +-
>>   include/configs/sunxi-common.h |  2 +-
>>   4 files changed, 12 insertions(+), 12 deletions(-)
>>
>> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
>> index d411e96..9c855f6 100644
>> --- a/board/sunxi/board.c
>> +++ b/board/sunxi/board.c
>>   <at>  <at>  -108,7 +108,7  <at>  <at>  int dram_init(void)
>>   	return 0;
>>   }
>>
>> -#if defined(CONFIG_SPL_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
>> +#if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
>
> While I agree this being a good way forward, the latest (and probably this
> change included) break nand support entirely and cause link errors when
> enabeling sunxi nand.
>
> sunxi-bsp/u-boot-sunxi/drivers/mtd/nand/nand.c:104: undefined reference to
> `board_nand_init' (which is from board/sunxi/board.c:144)
>
> I think it's wise (for now) to remove the && defined(CONFIG_SPL_BUILD) and
> re-add this guard later.
>
> By removing we atleast can still build u-boot with nand support (thus
> opening the option of testing and patches for users) and don't break
> previously working systems.

I just tried to set CONFIG_NAND_SUNXI=y in q8_a13_tablet_defconfig and
did a build with the latest master and this works fine for me ...

Regards,

Hans

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

* [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI
  2015-09-20 13:09   ` Hans de Goede
@ 2015-09-26 13:01     ` Olliver Schinagl
  0 siblings, 0 replies; 18+ messages in thread
From: Olliver Schinagl @ 2015-09-26 13:01 UTC (permalink / raw)
  To: u-boot

Hey Hans,

On 20-09-15 15:09, Hans de Goede wrote:
> Hi,
>
> On 09/18/2015 07:43 AM, Olliver Schinagl wrote:
>> Hans de Goede <hdegoede <at> redhat.com> writes:
>>
>> Hey Hans,
>>>
>>> We eventually want to add full nand support, since it makes no sense
>>> to build SPL with nand support and u-boot without, or the other way
>>> around, a single option will suffice.
>>>
>>> Renaming the Kconfig option now makes things easier when we add full
>>> nand support in the future.
>>>
>>> The "obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o" is moved to an
>>> "ifdef CONFIG_SPL_BUILD" block in the Makefile.
>>>
>>> Signed-off-by: Hans de Goede <hdegoede <at> redhat.com>
>>> ---
>>>   board/sunxi/board.c            |  2 +-
>>>   drivers/mtd/nand/Kconfig       | 18 +++++++++---------
>>>   drivers/mtd/nand/Makefile      |  2 +-
>>>   include/configs/sunxi-common.h |  2 +-
>>>   4 files changed, 12 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
>>> index d411e96..9c855f6 100644
>>> --- a/board/sunxi/board.c
>>> +++ b/board/sunxi/board.c
>>>   <at>  <at>  -108,7 +108,7  <at> <at>  int dram_init(void)
>>>       return 0;
>>>   }
>>>
>>> -#if defined(CONFIG_SPL_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
>>> +#if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
>>
>> While I agree this being a good way forward, the latest (and probably 
>> this
>> change included) break nand support entirely and cause link errors when
>> enabeling sunxi nand.
>>
>> sunxi-bsp/u-boot-sunxi/drivers/mtd/nand/nand.c:104: undefined 
>> reference to
>> `board_nand_init' (which is from board/sunxi/board.c:144)
>>
>> I think it's wise (for now) to remove the && 
>> defined(CONFIG_SPL_BUILD) and
>> re-add this guard later.
>>
>> By removing we atleast can still build u-boot with nand support (thus
>> opening the option of testing and patches for users) and don't break
>> previously working systems.
>
> I just tried to set CONFIG_NAND_SUNXI=y in q8_a13_tablet_defconfig and
> did a build with the latest master and this works fine for me ...
>
it failed when enabeling nand, but you've been doing some work there so 
should be okay again now.
> Regards,
>
> Hans

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

end of thread, other threads:[~2015-09-26 13:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-22 18:13 [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI Hans de Goede
2015-08-22 18:13 ` [U-Boot] [PATCH 2/4] sunxi_nand_spl: Remove NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END Hans de Goede
2015-08-24 17:02   ` Scott Wood
2015-08-25  7:18     ` Hans de Goede
2015-08-26 18:37       ` Ian Campbell
2015-08-22 18:13 ` [U-Boot] [PATCH 3/4] mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig Hans de Goede
2015-08-26 18:38   ` Ian Campbell
2015-08-26 19:08     ` Scott Wood
2015-08-27 18:04       ` Hans de Goede
2015-08-22 18:13 ` [U-Boot] [PATCH 4/4] sunxi: Add inet97fv2_defconfig Hans de Goede
2015-08-26 18:39   ` Ian Campbell
2015-08-27  8:11     ` Hans de Goede
2015-08-27 20:18       ` Ian Campbell
2015-08-26 18:35 ` [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXI to NAND_SUNXI Ian Campbell
2015-09-18 11:43 ` [U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI Olliver Schinagl
2015-09-18 11:51   ` Olliver Schinagl
2015-09-20 13:09   ` Hans de Goede
2015-09-26 13:01     ` Olliver Schinagl

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.