mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
Revert "ARM: AM33XX: Add AM33XX I2C driver support"
This reverts commit 498cbdfe62
as we need
to revert the i2c changes that add the support for the platform.
Cc: Heiko Schocher <hs@denx.de>
Cc: Patil, Rachna <rachna@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
This commit is contained in:
parent
2acca35ce4
commit
c2459a405b
1 changed files with 7 additions and 13 deletions
|
@ -147,7 +147,7 @@ static void flush_fifo(void)
|
||||||
stat = readw(&i2c_base->stat);
|
stat = readw(&i2c_base->stat);
|
||||||
if (stat == I2C_STAT_RRDY) {
|
if (stat == I2C_STAT_RRDY) {
|
||||||
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
|
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
|
||||||
defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX)
|
defined(CONFIG_OMAP44XX)
|
||||||
readb(&i2c_base->data);
|
readb(&i2c_base->data);
|
||||||
#else
|
#else
|
||||||
readw(&i2c_base->data);
|
readw(&i2c_base->data);
|
||||||
|
@ -247,8 +247,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
|
||||||
switch (alen) {
|
switch (alen) {
|
||||||
case 2:
|
case 2:
|
||||||
/* Send address MSByte */
|
/* Send address MSByte */
|
||||||
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
|
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
|
||||||
defined(CONFIG_AM33XX)
|
|
||||||
writew(((addr >> 8) & 0xFF), &i2c_base->data);
|
writew(((addr >> 8) & 0xFF), &i2c_base->data);
|
||||||
|
|
||||||
/* Clearing XRDY event */
|
/* Clearing XRDY event */
|
||||||
|
@ -265,8 +264,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
case 1:
|
case 1:
|
||||||
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
|
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
|
||||||
defined(CONFIG_AM33XX)
|
|
||||||
/* Send address LSByte */
|
/* Send address LSByte */
|
||||||
writew((addr & 0xFF), &i2c_base->data);
|
writew((addr & 0xFF), &i2c_base->data);
|
||||||
#else
|
#else
|
||||||
|
@ -315,8 +313,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status & I2C_STAT_RRDY) {
|
if (status & I2C_STAT_RRDY) {
|
||||||
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
|
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
|
||||||
defined(CONFIG_AM33XX)
|
|
||||||
buffer[i] = readb(&i2c_base->data);
|
buffer[i] = readb(&i2c_base->data);
|
||||||
#else
|
#else
|
||||||
*((u16 *)&buffer[i]) =
|
*((u16 *)&buffer[i]) =
|
||||||
|
@ -403,8 +400,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
|
||||||
if (!i2c_error) {
|
if (!i2c_error) {
|
||||||
if (status & I2C_STAT_XRDY) {
|
if (status & I2C_STAT_XRDY) {
|
||||||
switch (alen) {
|
switch (alen) {
|
||||||
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
|
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
|
||||||
defined(CONFIG_AM33XX)
|
|
||||||
case 2:
|
case 2:
|
||||||
/* send out MSB byte */
|
/* send out MSB byte */
|
||||||
writeb(((addr >> 8) & 0xFF), &i2c_base->data);
|
writeb(((addr >> 8) & 0xFF), &i2c_base->data);
|
||||||
|
@ -424,8 +420,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
|
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
|
||||||
defined(CONFIG_AM33XX)
|
|
||||||
/* send out MSB byte */
|
/* send out MSB byte */
|
||||||
writeb((addr & 0xFF), &i2c_base->data);
|
writeb((addr & 0xFF), &i2c_base->data);
|
||||||
#else
|
#else
|
||||||
|
@ -447,8 +442,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
|
||||||
if (!i2c_error) {
|
if (!i2c_error) {
|
||||||
for (i = ((alen > 1) ? 0 : 1); i < len; i++) {
|
for (i = ((alen > 1) ? 0 : 1); i < len; i++) {
|
||||||
if (status & I2C_STAT_XRDY) {
|
if (status & I2C_STAT_XRDY) {
|
||||||
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
|
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
|
||||||
defined(CONFIG_AM33XX)
|
|
||||||
writeb((buffer[i] & 0xFF),
|
writeb((buffer[i] & 0xFF),
|
||||||
&i2c_base->data);
|
&i2c_base->data);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue