Skip to contentSkip to conversation

OMAP3: igep00x0: Reduce lines of code for IGEP-based boards.

PATCH Superseded Enric Balletbo i Serra 2 participants 3 messages Mar 3, 2012 – Mar 5, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP3: igep00x0: Reduce lines of code for IGEP-based boards.

This is rework on config files of IGEP-based boards with the aim to remove duplicated code to be more maintainable. Basically this patch creates a common configuration file for both boards and only sets the specific option in the board config file.

On board files the hardcored mach type in favour of using the CONFIG_MACH_TYPE option.

More than 200 duplicated lines have been deleted.

---
 board/isee/igep0020/igep0020.c |    2 -
 board/isee/igep0030/igep0030.c |    2 -
 include/configs/igep0020.h     |  246 +-----------------------------------
 include/configs/igep0030.h     |  235 +---------------------------------
 include/configs/igep00x0.h     |  275 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 283 insertions(+), 477 deletions(-)
 create mode 100644 include/configs/igep00x0.h
board/isee/igep0020/igep0020.c +0 -2
index 6a3777e..3d649a0 100644
@@ -52,8 +52,6 @@ static const u32 gpmc_lan_config[] = {
 int board_init(void)
 {
 	gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
-	/* board id for Linux */
-	gd->bd->bi_arch_number = MACH_TYPE_IGEP0020;
 	/* boot param addr */
 	gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
 
board/isee/igep0030/igep0030.c +0 -2
index 6a92735..5750586 100644
@@ -39,8 +39,6 @@ DECLARE_GLOBAL_DATA_PTR;
 int board_init(void)
 {
 	gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
-	/* board id for Linux */
-	gd->bd->bi_arch_number = MACH_TYPE_IGEP0030;
 	/* boot param addr */
 	gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
 
include/configs/igep0020.h +4 -242

257 lines not on this page · raw message

include/configs/igep0030.h +4 -231

246 lines not on this page · raw message

include/configs/igep00x0.h new file +275 -0

275 lines not on this page · raw message

Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 OMAP3: igep00x0: Reduce lines of code for IGEP-based boards.

Quoted 7 lines · Enric Balletbo i Serra

This is rework on config files of IGEP-based boards with the aim to remove duplicated code to be more maintainable. Basically this patch creates a common configuration file for both boards and only sets the specific option in the board config file.

On board files the hardcored mach type in favour of using the CONFIG_MACH_TYPE option.

At this point the config files only differ in setting CONFIG_MACH_TYPE, yes? If so, we should make use of boards.cfg to set this value and just have igep00x0.h. Thanks for working on this!

Signature · 1 line
Tom
#2 lore raw

PATCH 1/1 OMAP3: igep00x0: Reduce lines of code for IGEP-based boards.

Hi Tom

2012/3/5 Tom Rini <[email protected]>:

Quoted 7 lines · Enric Balletbo i Serra
Quoted 6 lines

This is rework on config files of IGEP-based boards with the aim to remove duplicated code to be more maintainable. Basically this patch creates a common configuration file for both boards and only sets the specific option in the board config file.

Quoted 6 lines
Quoted 2 lines

On board files the hardcored mach type in favour of using the CONFIG_MACH_TYPE option.

At this point the config files only differ in setting CONFIG_MACH_TYPE, yes? ?If so, we should make use of boards.cfg to set this value and just have igep00x0.h. ?Thanks for working on this!

Good tip, I didn't know this. I'll send version two, thanks.

--
Enric