Skip to contentSkip to conversation

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

PATCH New Enric Balletbo i Serra 1 participant 1 message Mar 5, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 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 was replaced 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 -
 boards.cfg                     |    4 +-
 include/configs/igep0020.h     |  272 ---------------------------------------
 include/configs/igep0030.h     |  261 --------------------------------------
 include/configs/igep00x0.h     |  275 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 277 insertions(+), 539 deletions(-)
 delete mode 100644 include/configs/igep0020.h
 delete mode 100644 include/configs/igep0030.h
 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);
 
boards.cfg +2 -2
index 28cc345..a69bb76 100644
@@ -204,8 +204,8 @@ cm_t35                       arm         armv7       cm_t35              -
 omap3_overo                  arm         armv7       overo               -              omap3
 omap3_pandora                arm         armv7       pandora             -              omap3
 dig297                       arm         armv7       dig297              comelit        omap3
-igep0020                     arm         armv7       igep0020            isee           omap3
-igep0030                     arm         armv7       igep0030            isee           omap3
+igep0020                     arm         armv7       igep0020            isee           omap3		igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020
+igep0030                     arm         armv7       igep0030            isee           omap3		igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030
 am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
 mt_ventoux                   arm         armv7       mt_ventoux          teejet         omap3
 omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
include/configs/igep0020.h deleted +0 -272

272 lines not on this page · raw message

include/configs/igep0030.h deleted +0 -261

261 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