OMAP3: use a single board file for IGEP devices
PATCH v2 1/2 OMAP3: use a single board file for IGEP devices
Even when the IGEPv2 board and the IGEP Computer-on-Module are different from a form factor point of view, they are very similar in the fact that share many components and how they are wired.
So, it is possible (and better) to have a single board file for both devices and just use the CONFIG_MACH_TYPE to make a differentiation between each board when needed.
This change avoids code duplication by removing 298 lines of code and makes future maintenance easier.
---
Changes since v1 (suggested by Igor Grinberg):
- Remove unnecesary ifdeffery
- set CONFIG_CMD_NET just if CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020
- Move board specific muxes configuration to set_muxconf_regs()
board/isee/igep0020/Makefile | 43 --------- board/isee/igep0020/igep0020.c | 177 ------------------------------------- board/isee/igep0020/igep0020.h | 151 -------------------------------- board/isee/igep0030/Makefile | 43 --------- board/isee/igep0030/igep0030.c | 118 ------------------------- board/isee/igep0030/igep0030.h | 151 -------------------------------- board/isee/igep00x0/Makefile | 43 +++++++++ board/isee/igep00x0/igep00x0.c | 189 ++++++++++++++++++++++++++++++++++++++++ board/isee/igep00x0/igep00x0.h | 163 ++++++++++++++++++++++++++++++++++ boards.cfg | 8 +- include/configs/igep00x0.h | 2 + 11 files changed, 401 insertions(+), 687 deletions(-) delete mode 100644 board/isee/igep0020/Makefile delete mode 100644 board/isee/igep0020/igep0020.c delete mode 100644 board/isee/igep0020/igep0020.h delete mode 100644 board/isee/igep0030/Makefile delete mode 100644 board/isee/igep0030/igep0030.c delete mode 100644 board/isee/igep0030/igep0030.h create mode 100644 board/isee/igep00x0/Makefile create mode 100644 board/isee/igep00x0/igep00x0.c create mode 100644 board/isee/igep00x0/igep00x0.h
board/isee/igep0020/Makefile deleted +0 -43
@@ -1,43 +0,0 @@ -# -# (C) Copyright 2000, 2001, 2002 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# See file CREDITS for list of people who contributed to this -# project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# - -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := igep0020.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
board/isee/igep0020/igep0020.c deleted +0 -177
177 lines not on this page · raw message
board/isee/igep0020/igep0020.h deleted +0 -151
151 lines not on this page · raw message
board/isee/igep0030/Makefile deleted +0 -43
43 lines not on this page · raw message
board/isee/igep0030/igep0030.c deleted +0 -118
118 lines not on this page · raw message
board/isee/igep0030/igep0030.h deleted +0 -151
151 lines not on this page · raw message
board/isee/igep00x0/Makefile new file +43 -0
43 lines not on this page · raw message
board/isee/igep00x0/igep00x0.c new file +189 -0
189 lines not on this page · raw message
board/isee/igep00x0/igep00x0.h new file +163 -0
163 lines not on this page · raw message
boards.cfg +4 -4
@@ -253,10 +253,10 @@ 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 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_ONENAND -igep0020_nand arm armv7 igep0020 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_NAND -igep0030 arm armv7 igep0030 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_ONENAND -igep0030_nand arm armv7 igep0030 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_NAND +igep0020 arm armv7 igep00x0 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_ONENAND +igep0020_nand arm armv7 igep00x0 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_NAND +igep0030 arm armv7 igep00x0 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_ONENAND +igep0030_nand arm armv7 igep00x0 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_NAND am3517_evm arm armv7 am3517evm logicpd omap3 mt_ventoux arm armv7 mt_ventoux teejet omap3 omap3_zoom1 arm armv7 zoom1 logicpd omap3
include/configs/igep00x0.h +2 -0
@@ -112,7 +112,9 @@#ifdef CONFIG_BOOT_NAND #define CONFIG_CMD_NAND #endif +#if (CONFIG_MACH_TYPE ==MACH_TYPE_IGEP0020 )#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#endif #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING #define CONFIG_CMD_NFS /* NFS support */
Signature · 1 line
1.7.7.6
PATCH v2 1/2 OMAP3: use a single board file for IGEP devices
Quoted 5 lines · Javier Martinez Canillas
Even when the IGEPv2 board and the IGEP Computer-on-Module are different from a form factor point of view, they are very similar in the fact that share many components and how they are wired.
Quoted 8 lines
So, it is possible (and better) to have a single board file for both devices and just use the
CONFIG_MACH_TYPEto make a differentiation between each board when needed.This change avoids code duplication by removing 298 lines of code and makes future maintenance easier.
Signed-off-by Javier Martinez Canillas <[email protected]>
Signature · 2 lines
Regards, Igor.
PATCH v2 1/2 OMAP3: use a single board file for IGEP devices
In reply to Javier Martinez CanillasQuoted 9 lines · Javier Martinez Canillas
Even when the IGEPv2 board and the IGEP Computer-on-Module are different from a form factor point of view, they are very similar in the fact that share many components and how they are wired.
So, it is possible (and better) to have a single board file for both devices and just use the
CONFIG_MACH_TYPEto make a differentiation between each board when needed.
Quoted 5 lines
This change avoids code duplication by removing 298 lines of code and makes future maintenance easier.
Signed-off-by Javier Martinez Canillas <[email protected]>Acked-by Igor Grinberg <[email protected]>
Applied to u-boot-ti/master, thanks!
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/20130125/8a970ca2/attachment.pgp>