I2C PARAM: Passing values from top level Makefile
authorSandeep Paulraj <s-paulraj@ti.com>
Fri, 17 Dec 2010 01:35:36 +0000 (20:35 -0500)
committerSandeep Nair <a0875039@gt48xvq51.gt.design.ti.com>
Mon, 7 Mar 2011 21:41:53 +0000 (16:41 -0500)
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
src/util/i2cConfig/Makefile
src/util/i2cConfig/i2cparam.c
src/util/i2cConfig/makestg2

index 02756da22197df1c68ad90c4be51952de26fb85e..59d5ffb912779872574cd6c9724c35a666c72d24 100644 (file)
@@ -57,7 +57,7 @@ export ENDIAN
 
 
 $(DEVICES):
-       make -f makestg2 ARCH=c64x TARGET=$@ $@
+       make -f makestg2 ARCH=c64x I2C_BUS_ADDR=$(I2C_BUS_ADDR) I2C_MAP_ADDR=$(I2C_MAP_ADDR) TARGET=$@ $@
 
 
 clean:
index c5a80ecba527feb76c2dbf61e6dfbf6e0a730506..fac410e3263834e3df871084cf35725f45bb710d 100644 (file)
@@ -59,8 +59,8 @@ ibl_t ibl;
 
 /* The configAddress must be programmed. On images which support both endians
  * there can be two seperate configurations, one for big endian, and one for little */
-unsigned int configBusAddress = IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR;
-unsigned int configAddress    = 0x500;
+unsigned int configBusAddress = I2C_BUS_ADDR;
+unsigned int configAddress    = I2C_MAP_ADDR;
 
 
 /**
index 29c6240b75244e8014557989d57c66141c3b8434..8e53a726f6cc83de05dff838a1194b641a8e4f50 100644 (file)
@@ -47,7 +47,9 @@ CLEAN_MODULES+=$(addprefix clean_,$(CFG_MODULES))
 
 CSRC= i2cparam.c
 
-CDEFS+= -DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=$(I2C_BUS_ADDR) 
+CDEFS+= -DI2C_BUS_ADDR=$(I2C_BUS_ADDR)
+CDEFS+= -DI2C_MAP_ADDR=$(I2C_MAP_ADDR)
+
 
 # enable debug info in the compile
 UTIL=yes
@@ -96,7 +98,7 @@ $(OBJS): cdefdep
 
 gen_cdefdep:
        @echo Checking command line dependencies
-       @echo $(TARGET) $(ARCH) > cdefdep.tmp
+       @echo $(TARGET) $(ARCH) $(I2C_BUS_ADDR) $(I2C_MAP_ADDR) > cdefdep.tmp
        @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else $(CP) cdefdep.tmp cdefdep ; fi '