summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 7bac005)
raw | patch | inline | side by side (from parent 1: 7bac005)
author | Sandeep Nair <a0875039@gt48xvq51.gt.design.ti.com> | |
Mon, 7 Mar 2011 23:54:44 +0000 (18:54 -0500) | ||
committer | Sandeep Nair <a0875039@gt48xvq51.gt.design.ti.com> | |
Mon, 7 Mar 2011 23:54:44 +0000 (18:54 -0500) |
index e103d48533a7be8ba8cd2f91bc2b3523dc968273..4e0094d6ea7e7d647a6c400ddbba5082b3010bf7 100644 (file)
--- a/src/device/c6455/c6455.c
+++ b/src/device/c6455/c6455.c
#ifndef EXCLUDE_NAND_GPIO
nandCtbl_t nandCtbl = {
- nandHwDriverInit,
- nandHwDriverReadBytes,
- nandHwDriverReadPage,
- nandHwDriverClose
+ nandHwGpioDriverInit,
+ nandHwGpioDriverReadBytes,
+ nandHwGpioDriverReadPage,
+ nandHwGpioDriverClose
};
index e44d367d99eadba5cc39a3d3cfeb23df9cc9bd44..ddb817ead4b8c9330321bd06d69d4133d9604684 100644 (file)
--- a/src/device/c6457/c6457.c
+++ b/src/device/c6457/c6457.c
#ifndef EXCLUDE_NAND_GPIO
nandCtbl_t nandCtbl = {
- nandHwDriverInit,
- nandHwDriverReadBytes,
- nandHwDriverReadPage,
- nandHwDriverClose
+ nandHwGpioDriverInit,
+ nandHwGpioDriverReadBytes,
+ nandHwGpioDriverReadPage,
+ nandHwGpioDriverClose
};
index e5d78f690537e3894a7133ad3126ab7630e84251..a2beaeb963bcc29f13fae57431852e684cd0e67f 100644 (file)
--- a/src/device/c6472/c6472.c
+++ b/src/device/c6472/c6472.c
#ifndef EXCLUDE_NAND_GPIO
nandCtbl_t nandCtbl = {
- nandHwDriverInit,
- nandHwDriverReadBytes,
- nandHwDriverReadPage,
- nandHwDriverClose
+ nandHwGpioDriverInit,
+ nandHwGpioDriverReadBytes,
+ nandHwGpioDriverReadPage,
+ nandHwGpioDriverClose
};
index 3a4b05d0dcfe0423a1ded815f03124a53679f9ba..9345be25356c6facb11df424b7f4d3fb759d8922 100644 (file)
--- a/src/device/c6474/c6474.c
+++ b/src/device/c6474/c6474.c
#ifndef EXCLUDE_NAND_GPIO
nandCtbl_t nandCtbl = {
- nandHwDriverInit,
- nandHwDriverReadBytes,
- nandHwDriverReadPage,
- nandHwDriverClose
+ nandHwGpioDriverInit,
+ nandHwGpioDriverReadBytes,
+ nandHwGpioDriverReadPage,
+ nandHwGpioDriverClose
};
index 9f5fa5acfe6371c2bf9f910aae00809857d3baf5..79b7b14a4d10140e13fffae35d260b7ce2f86d3a 100644 (file)
--- a/src/hw/nands/nandhwapi.h
+++ b/src/hw/nands/nandhwapi.h
/* Driver functions, EMIF and GPIO interface */
-Int32 nandHwDriverInit (int32 cs, void *devInfo);
-Int32 nandHwDriverReadBytes (Uint32 block, Uint32 page, Uint32 byte, Uint32 nbytes, Uint8 *data);
-Int32 nandHwDriverReadPage(Uint32 block, Uint32 page, Uint8 *data);
-Int32 nandHwDriverClose (void);
+Int32 nandHwGpioDriverInit (int32 cs, void *devInfo);
+Int32 nandHwGpioDriverReadBytes (Uint32 block, Uint32 page, Uint32 byte, Uint32 nbytes, Uint8 *data);
+Int32 nandHwGpioDriverReadPage(Uint32 block, Uint32 page, Uint8 *data);
+Int32 nandHwGpioDriverClose (void);
Int32 nandHwDriverWritePage (Uint32 block, Uint32 page, Uint8 *data, nandProgramInfo_t *winfo);
Int32 nandHwDriverBlockErase (Uint32 uiBlockNumber, nandProgramInfo_t *winfo);
diff --git a/src/make/Makefile b/src/make/Makefile
index 33a412974071beba396e15d6d37ac3b2f0fffe92..daef86fc774e62a1e9dbc75e64a0328b26ca0921 100644 (file)
--- a/src/make/Makefile
+++ b/src/make/Makefile
#* [ENDIAN= both | big | little] /* Selects the endian of the build */
#* [I2C_BUS_ADDR= 0x50 | 0x51] /* The initial I2C bus address */
#* [COMPACT_I2C=yes] /* Mimimizes the size of the I2C */
+#* [I2C_MAP_ADDR= 0x500 | 0x800] /* The IBL configuration parameter offset */
#*
#*
#* or to make a board specific configuraiton
ENDIAN_MODE=little
else
ENDIAN_MODE=both
+ I2C_MAP_ADDR=0x800
endif
endif
I2C_BUS_ADDR=0x50
endif
+ifndef I2C_MAP_ADDR
+ifeq ($(ENDIAN),big)
+ I2C_MAP_ADDR=0x800
+ else
+ I2C_MAP_ADDR=0x500
+ endif
+endif
+
+
# The SPI configuration parameters
ifndef SPI_MODE
SPI_MODE=1
$(IBLS_C6X):
- make -f makestg1 ARCH=c64x TARGET=$@ I2C_BUS_ADDR=$(I2C_BUS_ADDR) COMPACT_I2C=$(COMPACT_I2C) ENDIAN_MODE=$(ENDIAN_MODE) CEXCLUDES='$(CEXCLUDES)' SPI_DEFS='$(SPI_DEFS)' $@
+ make -f makestg1 ARCH=c64x TARGET=$@ I2C_BUS_ADDR=$(I2C_BUS_ADDR) I2C_MAP_ADDR=$(I2C_MAP_ADDR) COMPACT_I2C=$(COMPACT_I2C) ENDIAN_MODE=$(ENDIAN_MODE) CEXCLUDES='$(CEXCLUDES)' SPI_DEFS='$(SPI_DEFS)' $@
# Configurations for individual evms
-# The c455 EVM has a 128k eeprom (64k at 0x50, 64k at 0x51), so both endians are built with full functionality
+# The c6455 EVM has a 128k eeprom (64k at 0x50, 64k at 0x51), so both endians are built with full functionality
evm_c6455:
make -f makestg1 ARCH=c64x TARGET=c6455 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both CEXCLUDES= c6455
# The c6472 EVM has a 128k eeprom (64k at 0x50, 64k at 0x51), so both endians are built with full functionality
evm_c6472:
- make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both CEXCLUDES= c6472
+ make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=$(I2C_MAP_ADDR) COMPACT_I2C=no ENDIAN_MODE=both CEXCLUDES= c6472
# The 6474 EVM has a 32k eeprom. A stripped down version is build with only one endian.
evm_c6474:
-<<<<<<< HEAD:src/make/Makefile
- make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=little CEXCLUDES='ELF NAND_GPIO BIS' I2C_SIZE_BYTES=0x8000 c6474
- cp ibl_c6474/i2crom.dat ibl_c6474/i2crom_0x50_le.dat
- make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=big CEXCLUDES='ELF NAND_GPIO BIS' I2C_SIZE_BYTES=0x8000 c6474
-=======
- make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=0x200 COMPACT_I2C=yes ENDIAN_MODE=little EXCLUDES='ELF NAND BIS' I2C_SIZE_BYTES=0x8000 c6474
+ make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=0x200 COMPACT_I2C=yes ENDIAN_MODE=little CEXCLUDES='ELF NAND_GPIO BIS' I2C_SIZE_BYTES=0x8000 c6474
cp ibl_c6474/i2crom.dat ibl_c6474/i2crom_0x50_le.dat
- make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=0x200 COMPACT_I2C=yes ENDIAN_MODE=big EXCLUDES='ELF NAND BIS' I2C_SIZE_BYTES=0x8000 c6474
->>>>>>> 1d09767... C6474: Adding i2c map address to the top level Makefile:src/make/Makefile
+ make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=0x200 COMPACT_I2C=yes ENDIAN_MODE=big CEXCLUDES='ELF NAND_GPIO BIS' I2C_SIZE_BYTES=0x8000 c6474
cp ibl_c6474/i2crom.dat ibl_c6474/i2crom_0x50_be.dat
evm_c6474l:
EVM_6608_SPI_DEFS= SPI_MODE=1 SPI_ADDR_WIDTH=24 SPI_NPIN=5 SPI_CSEL=2 SPI_C2TDEL=1 SPI_CLKDIV=8 SPI_ROM=1
evm_c6608:
- make -f makestg1 ARCH=c64x TARGET=c661x I2C=no I2C_BUS_ADDR=0x50 ENDIAN_MODE=little CEXCLUDES=I2C SPI_DEFS='$(EVM_6608_SPI_DEFS)' c661x
+ make -f makestg1 ARCH=c64x TARGET=c661x I2C=no I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=0x500 ENDIAN_MODE=little CEXCLUDES=I2C SPI_DEFS='$(EVM_6608_SPI_DEFS)' c661x
# The 6678 EVM SPI/NOR Boot
EVM_6678_SPI_DEFS= SPI_MODE=1 SPI_ADDR_WIDTH=24 SPI_NPIN=5 SPI_CSEL=2 SPI_C2TDEL=1 SPI_CLKDIV=8 SPI_ROM=1
evm_c6678_spi:
- make -f makestg1 ARCH=c64x TARGET=c661x I2C=no I2C_BUS_ADDR=0x51 ENDIAN_MODE=little CEXCLUDES=I2C SPI_DEFS='$(EVM_6608_SPI_DEFS)' c661x
+ make -f makestg1 ARCH=c64x TARGET=c661x I2C=no I2C_BUS_ADDR=0x51 I2C_MAP_ADDR=0x500 ENDIAN_MODE=little CEXCLUDES=I2C SPI_DEFS='$(EVM_6608_SPI_DEFS)' c661x
evm_c6678_i2c:
- make -f makestg1 I2C_BUS_ADDR=$(I2C_BUS_ADDR) ENDIAN_MODE=$(ENDIAN) ARCH=c64x TARGET=c661x SPI=no SPI_DEFS='$(EVM_6608_SPI_DEFS)' c661x
+ make -f makestg1 I2C_BUS_ADDR=$(I2C_BUS_ADDR) I2C_MAP_ADDR=$(I2C_MAP_ADDR) ENDIAN_MODE=$(ENDIAN) ARCH=c64x TARGET=c661x SPI=no SPI_DEFS='$(EVM_6608_SPI_DEFS)' c661x
test_c661x:
make -f makestg1 ARCH=c64x TARGET=c661x ENDIAN_MODE=both CEXCLUDES='NOR_SPI' SPI_DEFS='SPI_ROM=1 SPI_MODE=3 SPI_ADDR_WIDTH=24 SPI_NPIN=5 SPI_CSEL=2 SPI_C2TDEL=8 SPI_CLKDIV=0x20' I2C_BUS_ADDR=0x50 COMPACT_I2C=no c661x
diff --git a/src/make/makestg1 b/src/make/makestg1
index 664d5d2b72ef8f979d9c5d92b49cf45c2c21cc30..622ff112bbf34b4dc8a458c35744771171cc675f 100644 (file)
--- a/src/make/makestg1
+++ b/src/make/makestg1
ROMS=
ifeq (,$(findstring I2C, $(EXCLUDES)))
- ROMS+= i2cRom
+ ROMS+= i2crom
endif
ifeq (,$(findstring SPI, $(EXCLUDES)))
diff --git a/src/make/makestg2 b/src/make/makestg2
index e93fb10b729a689c884156f5d112dc2417678dc7..d650fc58c11fb9679db951144fadfb2f24e81e7e 100644 (file)
--- a/src/make/makestg2
+++ b/src/make/makestg2
export ARCH
export TARGET
-.PHONY: $(TARGETS) i2cRom spiRom compare iblInit iblMain $(MODULES) $(CFG_MODULES)
+.PHONY: $(TARGETS) i2crom spiRom compare iblInit iblMain $(MODULES) $(CFG_MODULES)
.PHONY: utils clean clean_modules hwClean cleant
$(TARGETS): iblMain
-
+ifeq ($(TARGET),c661x)
+ HAS_SPI=1
+else
+ HAS_SPI=0
+endif
# The I2C creation options. The I2C map file is run through the C pre-processor to generate
# the desired I2C mapping. There are three possible configurations - an i2c which has
endif
endif
+ifeq ($(HAS_SPI),0)
+ SPI_CFG=
+endif
-i2cRom:
+i2crom:
$(CC) -ppo -I../cfg/$(TARGET) $(I2C_DEFS) ibl_$(TARGET)/$@.map.pre
../util/romparse/romparse $(COMPACT) -rom_base $(I2C_BUS_ADDR) ibl_$(TARGET)/$@.map.pp
$(CP) i2crom.ccs ibl_$(TARGET)/$@.ccs
make -C $(IBL_ROOT)/$@/$(ARCH)/make CDEFS='$(MAINDEFS) $(SPI_CFG)' $@
utils:
+ifeq ($(HAS_SPI),1)
make -C $(IBL_ROOT)/util/spiWrite TARGET=$(TARGET) SPI_DEFS='$(SPI_DEFS)' MAINDEFS='$(MAINDEFS) $(SPI_CFG)' $(TARGET)
make -C $(IBL_ROOT)/util/spiConfig TARGET=$(TARGET) SPI_DEFS='$(SPI_DEFS)' MAINDEFS='$(MAINDEFS) $(SPI_CFG)' $(TARGET)
+endif
make -C $(IBL_ROOT)/util/btoccs
make -C $(IBL_ROOT)/util/romparse TARGET=$(TARGET)
make -C $(IBL_ROOT)/util/i2cRead TARGET=$(TARGET) $(TARGET)
index a901092ab8c7bb2f611d3095112e2ecccfd1b3c6..4bd2fd24f4fa4948b71b827eb1d2b3185df2916a 100755 (executable)
--- a/src/make/setupenvLnx.sh
+++ b/src/make/setupenvLnx.sh
#!/bin/bash
export OS="Linux"
-export C6X_BASE_DIR="/opt/TI_CGT_C6000_7.2.0A10218"
-export PATH="$C6X_BASE_DIR/bin:$PATH"
-export TOOLSC6X="/opt/TI_CGT_C6000_7.2.0A10218"
-export TOOLSC6XDOS="/opt/TI_CGT_C6000_7.2.0A10218"
-export TOOLSBIOSC6XDOS="/opt/TI_CGT_C6000_7.2.0A10218"
+export C6X_BASE_DIR=/apps/ti/cgt/c6000_6.1.5/
+export PATH=/apps/ti/cgt/c6000_6.1.5/bin:$PATH
+export TOOLSC6X=/apps/ti/cgt/c6000_6.1.5
+export TOOLSC6XDOS=/apps/ti/cgt/c6000_6.1.5
+export TOOLSBIOSC6XDOS=/apps/ti/cgt/c6000_6.1.5
index fac410e3263834e3df871084cf35725f45bb710d..3228f71417c86fff39c44955ddd83c105ebce19f 100644 (file)
/* 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 = I2C_BUS_ADDR;
-unsigned int configAddress = I2C_MAP_ADDR;
+unsigned int configAddress = I2C_MAP_ADDR;
/**
index bb6fa229a9d9597d0af2f03dc9591d57eadcf793..fec9cda982962f9ba68bc1296b58908822d33511 100644 (file)
.PHONY: spiparam.cmd
$(DEVICES): gen_cdefdep $(MODULES) $(CFG_MODULES) $(OBJS) spiparam.cmd
- $(LD) -o spiparam_$(TARGET)_$(IEXT).out -m spiparam_$(TARGET)_$(IEXT).map spiparam.$(IEXT).oc ../spiWrite/spiutil.$(IEXT).oc ../../hw/c64x/make/spi.$(IEXT).oc ../../hw/c64x/make/spiutil.$(IEXT).oc $(PLL_OBJS) $(PSC_OBJS) $(TFILES) spiparam.cmd $(RTLIBS)
+ $(LD) -o spiparam_$(TARGET)_$(IEXT).out -m spiparam_$(TARGET)_$(IEXT).map spiparam.$(IEXT).oc ../spiWrite/spiUtil.$(IEXT).oc ../../hw/c64x/make/spi.$(IEXT).oc ../../hw/c64x/make/spiutil.$(IEXT).oc $(PLL_OBJS) $(PSC_OBJS) $(TFILES) spiparam.cmd $(RTLIBS)
$(MODULES):
@echo making $@