diff options
| author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-10-16 15:01:15 +0200 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2008-10-18 21:54:03 +0200 | 
| commit | 6d0f6bcf337c5261c08fabe12982178c2c489d76 (patch) | |
| tree | ae13958ffa9c6b58c2ea97aac07a4ad2f04a350f /drivers/i2c/tsi108_i2c.c | |
| parent | 71edc271816ec82cf0550dd6980be2da3cc2ad9e (diff) | |
| download | olio-uboot-2014.01-6d0f6bcf337c5261c08fabe12982178c2c489d76.tar.xz olio-uboot-2014.01-6d0f6bcf337c5261c08fabe12982178c2c489d76.zip | |
rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/i2c/tsi108_i2c.c')
| -rw-r--r-- | drivers/i2c/tsi108_i2c.c | 20 | 
1 files changed, 10 insertions, 10 deletions
| diff --git a/drivers/i2c/tsi108_i2c.c b/drivers/i2c/tsi108_i2c.c index 695e39341..fda822c52 100644 --- a/drivers/i2c/tsi108_i2c.c +++ b/drivers/i2c/tsi108_i2c.c @@ -60,14 +60,14 @@ static int i2c_read_byte (  		chan_offset = TSI108_I2C_SDRAM_OFFSET;  	/* Check if I2C operation is in progress */ -	temp = *(u32 *) (CFG_TSI108_CSR_BASE + chan_offset + I2C_CNTRL2); +	temp = *(u32 *) (CONFIG_SYS_TSI108_CSR_BASE + chan_offset + I2C_CNTRL2);  	if (0 == (temp & (I2C_CNTRL2_RD_STATUS | I2C_CNTRL2_WR_STATUS |  			  I2C_CNTRL2_START))) {  		/* Set device address and operation (read = 0) */  		temp = (byte_addr << 16) | ((chip_addr & 0x07) << 8) |  		    ((chip_addr >> 3) & 0x0F); -		*(u32 *) (CFG_TSI108_CSR_BASE + chan_offset + I2C_CNTRL1) = +		*(u32 *) (CONFIG_SYS_TSI108_CSR_BASE + chan_offset + I2C_CNTRL1) =  		    temp;  		/* Issue the read command @@ -75,13 +75,13 @@ static int i2c_read_byte (  		 * (size = 1 byte, lane = 0)  		 */ -		*(u32 *) (CFG_TSI108_CSR_BASE + chan_offset + I2C_CNTRL2) = +		*(u32 *) (CONFIG_SYS_TSI108_CSR_BASE + chan_offset + I2C_CNTRL2) =  		    (I2C_CNTRL2_START);  		/* Wait until operation completed */  		do {  			/* Read I2C operation status */ -			temp = *(u32 *) (CFG_TSI108_CSR_BASE + chan_offset + I2C_CNTRL2); +			temp = *(u32 *) (CONFIG_SYS_TSI108_CSR_BASE + chan_offset + I2C_CNTRL2);  			if (0 == (temp & (I2C_CNTRL2_RD_STATUS | I2C_CNTRL2_START))) {  				if (0 == (temp & @@ -90,7 +90,7 @@ static int i2c_read_byte (  				    ) {  					op_status = TSI108_I2C_SUCCESS; -					temp = *(u32 *) (CFG_TSI108_CSR_BASE + +					temp = *(u32 *) (CONFIG_SYS_TSI108_CSR_BASE +  							 chan_offset +  							 I2C_RD_DATA); @@ -172,25 +172,25 @@ static int i2c_write_byte (uchar chip_addr,/* I2C device address on the bus */  	u32 op_status = TSI108_I2C_TIMEOUT_ERR;  	/* Check if I2C operation is in progress */ -	temp = *(u32 *) (CFG_TSI108_CSR_BASE + TSI108_I2C_OFFSET + I2C_CNTRL2); +	temp = *(u32 *) (CONFIG_SYS_TSI108_CSR_BASE + TSI108_I2C_OFFSET + I2C_CNTRL2);  	if (0 == (temp & (I2C_CNTRL2_RD_STATUS | I2C_CNTRL2_WR_STATUS | I2C_CNTRL2_START))) {  		/* Place data into the I2C Tx Register */ -		*(u32 *) (CFG_TSI108_CSR_BASE + TSI108_I2C_OFFSET + +		*(u32 *) (CONFIG_SYS_TSI108_CSR_BASE + TSI108_I2C_OFFSET +  			  I2C_TX_DATA) = (u32) * buffer;  		/* Set device address and operation  */  		temp =  		    I2C_CNTRL1_I2CWRITE | (byte_addr << 16) |  		    ((chip_addr & 0x07) << 8) | ((chip_addr >> 3) & 0x0F); -		*(u32 *) (CFG_TSI108_CSR_BASE + TSI108_I2C_OFFSET + +		*(u32 *) (CONFIG_SYS_TSI108_CSR_BASE + TSI108_I2C_OFFSET +  			  I2C_CNTRL1) = temp;  		/* Issue the write command (at this moment all other parameters  		 * are 0 (size = 1 byte, lane = 0)  		 */ -		*(u32 *) (CFG_TSI108_CSR_BASE + TSI108_I2C_OFFSET + +		*(u32 *) (CONFIG_SYS_TSI108_CSR_BASE + TSI108_I2C_OFFSET +  			  I2C_CNTRL2) = (I2C_CNTRL2_START);  		op_status = TSI108_I2C_TIMEOUT_ERR; @@ -198,7 +198,7 @@ static int i2c_write_byte (uchar chip_addr,/* I2C device address on the bus */  		/* Wait until operation completed */  		do {  			/* Read I2C operation status */ -			temp = *(u32 *) (CFG_TSI108_CSR_BASE + TSI108_I2C_OFFSET + I2C_CNTRL2); +			temp = *(u32 *) (CONFIG_SYS_TSI108_CSR_BASE + TSI108_I2C_OFFSET + I2C_CNTRL2);  			if (0 == (temp & (I2C_CNTRL2_WR_STATUS | I2C_CNTRL2_START))) {  				if (0 == (temp & |