Skip to contentSkip to conversation

omap3: igep00x0: fix NAND_BOOT for igep_0020 and igep_0030

PATCH New Gupta 2 participants 3 messages Apr 3, 2014 – Apr 4, 2014

lore
Share & tools
lore

Gupta

#0 lore raw

PATCH 1/1 omap3: igep00x0: fix NAND_BOOT for igep_0020 and igep_0030

(re-sending as earlier mail got moderated).

Hi Enric,

Quoted 23 lines

From: Enric Balletbo Serra [mailto:eballetbo at gmail.com] 2014-04-03 9:09 GMT+02:00 Pekon Gupta <[email protected]>:

Quoted 21 lines

fixes commit e37e954eba3edb5015a0a02880d57517f57425d8

    OMAP3: igep00x0: Convert to ti_omap3_common.h.

Above commit introduced compilation error when building igep0020 and igep0030 boards for NAND boot. It removed 'CONFIG_SYS_NAND_U_BOOT_START' which tells SPL/MLO offset of u-boot.img in NAND.

---
 include/configs/omap3_igep00x0.h | 2 ++
 1 file changed, 2 insertions(+)
include/configs/omap3_igep00x0.h +1 -0
index 8b8583a..4e87d6b 100644
@@ -199,6 +199,8 @@
 #define CONFIG_SYS_NAND_ECCSIZE                512
 #define CONFIG_SYS_NAND_ECCBYTES       3
 #define CONFIG_NAND_OMAP_ECCSCHEME     OMAP_ECC_HAM1_CODE_HW
+#define CONFIG_SYS_NAND_U_BOOT_START   CONFIG_SYS_TEXT_BASE
Quoted 9 lines

include/configs/omap3_igep00x0.h line 203

Quoted 1 line
include/configs/omap3_igep00x0.h +1 -0
+#define CONFIG_SYS_NAND_U_BOOT_OFFS    0x80000

These two defines are defined in ti_armv7_common.h. The ti_armv7_common.h is included by ti_omap3_common.h, and omap3_igep00x0.h includes this file. So should not be necessary define this. I tried to build current mainline using igep0020_nand_config and built without errors for me. Which branch are you using ?

My bad, I din't check that one of my local commits had removed above two defines from "ti_armv7_common.h", because these are board-specific configs, and should be in individual board-configs.
I got misled because one of your commits (e37e954) removes these two defines and has title "OMAP3: igep00x0: Convert to ti_omap3_common.h."

Sorry about noise, please ignore this patch. I'll merge these changes with my other patch, where I move out board-specific configs from "ti_armv7_common.h"

with regards, pekon

#1 lore raw

PATCH 1/1 omap3: igep00x0: fix NAND_BOOT for igep_0020 and igep_0030

Quoted 36 lines · Pekon

(re-sending as earlier mail got moderated).

Hi Enric,

Quoted 23 lines

From: Enric Balletbo Serra [mailto:eballetbo at gmail.com] 2014-04-03 9:09 GMT+02:00 Pekon Gupta <[email protected]>:

Quoted 21 lines

fixes commit e37e954eba3edb5015a0a02880d57517f57425d8

    OMAP3: igep00x0: Convert to ti_omap3_common.h.

Above commit introduced compilation error when building igep0020 and igep0030 boards for NAND boot. It removed 'CONFIG_SYS_NAND_U_BOOT_START' which tells SPL/MLO offset of u-boot.img in NAND.

---
 include/configs/omap3_igep00x0.h | 2 ++
 1 file changed, 2 insertions(+)
include/configs/omap3_igep00x0.h +1 -0
index 8b8583a..4e87d6b 100644
@@ -199,6 +199,8 @@
 #define CONFIG_SYS_NAND_ECCSIZE                512
 #define CONFIG_SYS_NAND_ECCBYTES       3
 #define CONFIG_NAND_OMAP_ECCSCHEME     OMAP_ECC_HAM1_CODE_HW
+#define CONFIG_SYS_NAND_U_BOOT_START   CONFIG_SYS_TEXT_BASE
Quoted 9 lines

include/configs/omap3_igep00x0.h line 203

Quoted 1 line
include/configs/omap3_igep00x0.h +1 -0
+#define CONFIG_SYS_NAND_U_BOOT_OFFS    0x80000

These two defines are defined in ti_armv7_common.h. The ti_armv7_common.h is included by ti_omap3_common.h, and omap3_igep00x0.h includes this file. So should not be necessary define this. I tried to build current mainline using igep0020_nand_config and built without errors for me. Which branch are you using ?

Quoted 8 lines

My bad, I din't check that one of my local commits had removed above two defines from "ti_armv7_common.h", because these are board-specific configs, and should be in individual board-configs.
I got misled because one of your commits (e37e954) removes these two defines and has title "OMAP3: igep00x0: Convert to ti_omap3_common.h."

Sorry about noise, please ignore this patch. I'll merge these changes with my other patch, where I move out board-specific configs from "ti_armv7_common.h"

Well hold up. Where things need to be in NAND depends on where the SoC is going to check for an initial loader, followed by where it's going to check for redundant copies (if applicable). So you'll have a bit of a job convincing me that we don't want to default to a likely right location (I forget off-hand if bigger NAND pages would push the location higher or not or if we'd just sacrifice total number of possible redundant copies).

Signature · 8 lines
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/20140403/f9baab63/attachment.pgp>
#2 lore raw

PATCH 1/1 omap3: igep00x0: fix NAND_BOOT for igep_0020 and igep_0030

Hi Tom,

Quoted 2 lines

From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Rini, Tom

Quoted 1 line · Pekon

[...]

Quoted 11 lines
Quoted 2 lines

Sorry about noise, please ignore this patch. I'll merge these changes with my other patch, where I move out board-specific configs from "ti_armv7_common.h"

Well hold up. Where things need to be in NAND depends on where the SoC is going to check for an initial loader, followed by where it's going to check for redundant copies (if applicable). So you'll have a bit of a job convincing me that we don't want to default to a likely right location (I forget off-hand if bigger NAND pages would push the location higher or not or if we'd just sacrifice total number of possible redundant copies).

Some CONFIGS_SYS_NAND_xx like (CONFIG_SYS_NAND_U_BOOT_OFFS) are dependent on:

(1) NAND device connected to the board.
NAND partitions need to be multiple of block-sizes, so a NAND device having blocksize=128K _may_ have different offset than NAND device with blocksize=256k.
Example: Both AM335x_beaglebone and AM335x_EVM use same NAND layout, but they use NAND devices with different block-sizes.

(2) Board users are free to use custom MTD NAND partition layout. And CONFIG_SYS_NAND_U_BOOF_OFFS is dependent on this partition table So, when 'MTDPARTS_DEFAULT' is defined in individual board configs, so this CONFIG_SYS_NAND_U_BOOT_OFFS should also be present in individual board configs.

For other configs which enable generic _driver_ features (like CONFIG_CMD_NAND) can still remain in ti_arm_common.h hope that makes sense ?

with regards, pekon