OMAP3: igep00x0: Reduce lines of code for IGEP-based boards.
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
@@ -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
@@ -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
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_TYPEoption.
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
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_TYPEoption.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 haveigep00x0.h. ?Thanks for working on this!
Good tip, I didn't know this. I'll send version two, thanks.
--
Enric