omap3: Remove externs from config files
PATCH 1/2 omap3: Remove externs from config files
All configurations based on OMAP3 define flash related variables as externs.
This patch moves all extern declarations to a header file and includes this header into each configuration.
Signed-off-by Sanjeev Premi <[email protected]>
--- include/asm-arm/arch-omap3/omap3_flash.h | 34 ++++++++++++++++++++++++++++++ include/configs/omap3_beagle.h | 12 +++------- include/configs/omap3_evm.h | 14 ++++-------- include/configs/omap3_overo.h | 14 ++++-------- include/configs/omap3_pandora.h | 12 +++------- include/configs/omap3_sdp3430.h | 13 +++-------- include/configs/omap3_zoom1.h | 13 ++++------- include/configs/omap3_zoom2.h | 13 ++++------- 8 files changed, 66 insertions(+), 59 deletions(-) create mode 100644 include/asm-arm/arch-omap3/omap3_flash.h
include/asm-arm/arch-omap3/omap3_flash.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/ +* Sanjeev Premi <[email protected]> +* +* Contents moved from existing configurations for OMAP3 based boards. +* +* 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 +*/ + +#ifndef __ASM_ARCH_OMAP3_FLASH_H +#define __ASM_ARCH_OMAP3_FLASH_H + +#ifndef __ASSEMBLY__ +extern unsigned int boot_flash_base; +extern volatile unsigned int boot_flash_env_addr; +extern unsigned int boot_flash_off; +extern unsigned int boot_flash_sec; +extern unsigned int boot_flash_type; +#endif + +#endif /* __ASM_ARCH_OMAP3_FLASH_H */
include/configs/omap3_beagle.h +4 -8
@@ -327,13 +327,9 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern struct gpmc *gpmc_cfg; -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif +/* +* Include flash related variables +*/ +#include <asm/arch/omap3_flash.h> #endif /* __CONFIG_H */
include/configs/omap3_evm.h +5 -9
@@ -331,15 +331,6 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern struct gpmc *gpmc_cfg; -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -/*---------------------------------------------------------------------------- * SMSC9115 Ethernet from SMSC9118 family *----------------------------------------------------------------------------
@@ -362,4 +353,9 @@ extern unsigned int boot_flash_type;#define CONFIG_BOOTP_HOSTNAME 0x00000004#define CONFIG_BOOTP_BOOTPATH 0x00000010 +/* +* Include flash related variables +*/ +#include <asm/arch/omap3_flash.h> +#endif /* __CONFIG_H */
include/configs/omap3_overo.h +5 -9
@@ -296,15 +296,6 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern struct gpmc *gpmc_cfg; -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -#if defined(CONFIG_CMD_NET )/*---------------------------------------------------------------------------- * SMSC9211 Ethernet from SMSC9118 family
@@ -318,4 +309,9 @@ extern unsigned int boot_flash_type;#endif /* (CONFIG_CMD_NET) */ +/* +* Include flash related variables +*/ +#include <asm/arch/omap3_flash.h> +#endif /* __CONFIG_H */
include/configs/omap3_pandora.h +4 -8
@@ -288,13 +288,9 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern struct gpmc *gpmc_cfg; -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif +/* +* Include flash related variables +*/ +#include <asm/arch/omap3_flash.h> #endif /* __CONFIG_H */
include/configs/omap3_sdp3430.h +4 -9
@@ -359,15 +359,10 @@* - rest for filesystem */ -/*--------------------------------------------------------------------------*/ -#ifndef __ASSEMBLY__ -extern struct gpmc *gpmc_cfg; -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif +/* +* Include flash related variables +*/ +#include <asm/arch/omap3_flash.h> #endif /* __CONFIG_H */
include/configs/omap3_zoom1.h +5 -8
@@ -312,13 +312,10 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern struct gpmc *gpmc_cfg; -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif + +/* +* Include flash related variables +*/ +#include <asm/arch/omap3_flash.h> #endif /* __CONFIG_H */
include/configs/omap3_zoom2.h +5 -8
@@ -269,13 +269,10 @@#define CONFIG_SYS_FLASH_ERASE_TOUT (100 * CONFIG_SYS_HZ)#define CONFIG_SYS_FLASH_WRITE_TOUT (100 * CONFIG_SYS_HZ) -#ifndef __ASSEMBLY__ -extern struct gpmc *gpmc_cfg; -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif + +/* +* Include flash related variables +*/ +#include <asm/arch/omap3_flash.h> #endif /* __CONFIG_H */
Signature · 1 line
1.6.2.2