[U-Boot] [PATCH V2 03/12] board: compulab: Move common headers to board-common directory
Nishanth Menon
nm at ti.com
Fri Nov 13 06:43:33 CET 2015
Header files can be located in a generic location without
needing to reference them with ../common/
Generated with the following script
#!/bin/bash
vendor=board/compulab
common=$vendor/common
cfiles=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep c$`
headers=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep h$`
mkdir -p $common/include/board-common
set -x
for header in $headers
do
echo "processing $header in $common"
hbase=`basename $header`
git mv $common/$hbase $common/include/board-common
sed -i -e "s/\"..\/common\/$hbase\"/<board-common\/$hbase>/g" $vendor/*/*.[chS]
sed -i -e "s/\"$hbase\"/<board-common\/$hbase>/g" $vendor/common/*.[chS]
done
Cc: Dmitry Lifshitz <lifshitz at compulab.co.il>
Cc: Igor Grinberg <grinberg at compulab.co.il>
Cc: Nikita Kiryanov <nikita at compulab.co.il>
Signed-off-by: Nishanth Menon <nm at ti.com>
---
board/compulab/cm_fx6/cm_fx6.c | 4 ++--
board/compulab/cm_t335/cm_t335.c | 2 +-
board/compulab/cm_t35/cm_t35.c | 4 ++--
board/compulab/cm_t3517/cm_t3517.c | 4 ++--
board/compulab/cm_t54/cm_t54.c | 2 +-
board/compulab/common/common.c | 4 ++--
board/compulab/common/eeprom.c | 2 +-
board/compulab/common/{ => include/board-common}/common.h | 0
board/compulab/common/{ => include/board-common}/eeprom.h | 0
board/compulab/common/omap3_smc911x.c | 2 +-
10 files changed, 12 insertions(+), 12 deletions(-)
rename board/compulab/common/{ => include/board-common}/common.h (100%)
rename board/compulab/common/{ => include/board-common}/eeprom.h (100%)
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index 01871e100af3..ef50ce948f61 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -29,8 +29,8 @@
#include <asm/gpio.h>
#include <dm/platform_data/serial_mxc.h>
#include "common.h"
-#include "../common/eeprom.h"
-#include "../common/common.h"
+#include <board-common/eeprom.h>
+#include <board-common/common.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c
index 428aee6d242f..b3d62472cdf2 100644
--- a/board/compulab/cm_t335/cm_t335.c
+++ b/board/compulab/cm_t335/cm_t335.c
@@ -18,7 +18,7 @@
#include <asm/io.h>
#include <asm/gpio.h>
-#include "../common/eeprom.h"
+#include <board-common/eeprom.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index ccefc40eb013..45452acf0323 100644
--- a/board/compulab/cm_t35/cm_t35.c
+++ b/board/compulab/cm_t35/cm_t35.c
@@ -33,8 +33,8 @@
#include <asm/ehci-omap.h>
#include <asm/gpio.h>
-#include "../common/common.h"
-#include "../common/eeprom.h"
+#include <board-common/common.h>
+#include <board-common/eeprom.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/compulab/cm_t3517/cm_t3517.c b/board/compulab/cm_t3517/cm_t3517.c
index d1c74db0ade4..476cfdbbc1f6 100644
--- a/board/compulab/cm_t3517/cm_t3517.c
+++ b/board/compulab/cm_t3517/cm_t3517.c
@@ -24,8 +24,8 @@
#include <asm/omap_musb.h>
#include <asm/ehci-omap.h>
-#include "../common/common.h"
-#include "../common/eeprom.h"
+#include <board-common/common.h>
+#include <board-common/eeprom.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c
index 6d3b18ac1896..eefd813f7bae 100644
--- a/board/compulab/cm_t54/cm_t54.c
+++ b/board/compulab/cm_t54/cm_t54.c
@@ -22,7 +22,7 @@
#include <asm/arch/ehci.h>
#include <asm/ehci-omap.h>
-#include "../common/eeprom.h"
+#include <board-common/eeprom.h>
#define DIE_ID_REG_BASE (OMAP54XX_L4_CORE_BASE + 0x2000)
#define DIE_ID_REG_OFFSET 0x200
diff --git a/board/compulab/common/common.c b/board/compulab/common/common.c
index b25d9a20b403..7b64e40304c0 100644
--- a/board/compulab/common/common.c
+++ b/board/compulab/common/common.c
@@ -10,8 +10,8 @@
#include <asm/bootm.h>
#include <asm/gpio.h>
-#include "common.h"
-#include "eeprom.h"
+#include <board-common/common.h>
+#include <board-common/eeprom.h>
void cl_print_pcb_info(void)
{
diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
index 630446820cc5..30aaf74d422f 100644
--- a/board/compulab/common/eeprom.c
+++ b/board/compulab/common/eeprom.c
@@ -9,7 +9,7 @@
#include <common.h>
#include <i2c.h>
-#include "eeprom.h"
+#include <board-common/eeprom.h>
#ifndef CONFIG_SYS_I2C_EEPROM_ADDR
# define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
diff --git a/board/compulab/common/common.h b/board/compulab/common/include/board-common/common.h
similarity index 100%
rename from board/compulab/common/common.h
rename to board/compulab/common/include/board-common/common.h
diff --git a/board/compulab/common/eeprom.h b/board/compulab/common/include/board-common/eeprom.h
similarity index 100%
rename from board/compulab/common/eeprom.h
rename to board/compulab/common/include/board-common/eeprom.h
diff --git a/board/compulab/common/omap3_smc911x.c b/board/compulab/common/omap3_smc911x.c
index 45616619877a..46564632db15 100644
--- a/board/compulab/common/omap3_smc911x.c
+++ b/board/compulab/common/omap3_smc911x.c
@@ -16,7 +16,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
-#include "common.h"
+#include <board-common/common.h>
static u32 cl_omap3_smc911x_gpmc_net_config[GPMC_MAX_REG] = {
NET_GPMC_CONFIG1,
--
2.6.2.402.g2635c2b
More information about the U-Boot
mailing list