diff options
author | Michael Brandt <michael.brandt@stericsson.com> | 2010-02-17 13:14:09 +0100 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2010-05-19 07:40:42 +0200 |
commit | 1e4db0172510318ddc94ef7fcc071fdd435c2e47 (patch) | |
tree | 1cb7fde9a824922054de38fe09f5c3d29347b6ab /board/st/u8500/gpio.c | |
parent | 9a711e3345a291058e071ddbc4133c9f71941eec (diff) |
General I2C refactoring and environment settings cleanup
These are the patches for WP252006.
There will be a follow-up patched for WP254081.
Environment settings
* board_id bootargs parameter from board_id environment var
set in board_late_init().
* decreased bootdelay to 1 second
* added check for keypress on bootdelay==0
* removed preboot command and introduced "run cmdfile" instead
* changed rootfstype from ext2 to ext3
General I2C refactoring
* include/configs/u8500.h:
Enabled i2c command line commands.
Changed environment settings to use board_id as set in
board_late_init().
Added I2C address and configuration defines.
* board/st/u8500/Makefile: Replaced i2c.o with u8500_i2c.o.
* board/st/u8500/gpio.c, gpio.h: Added I2C busses to altfunc_table.
* board/st/u8500/init_mmc.c: removed config_extended_gpio() and therefore I2C
references. GPIOE settings are now in board_late_init().
* board/st/u8500/u8500.c:
Removed I2C/SD gpio settings from addr,value array.
board_late_init():
Determine and set board_id environment variable
0: mop500, 1: href500
Above boards have different GPIO expander chips which we can
distinguish by the chip id (1 and 3).
The board_id environment variable is needed for the Linux bootargs.
Signed-off-by: Michael Brandt <Michael.Brandt@stericsson.com>
Change-Id: I4c2cab28c1cb74692e0c72b2daa422e97787ff8d
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/167
Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'board/st/u8500/gpio.c')
-rw-r--r--[-rwxr-xr-x] | board/st/u8500/gpio.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/board/st/u8500/gpio.c b/board/st/u8500/gpio.c index 4062d022b..52c585be6 100755..100644 --- a/board/st/u8500/gpio.c +++ b/board/st/u8500/gpio.c @@ -29,6 +29,14 @@ static struct gpio_register *addr_gpio_register[GPIO_BLOCKS_COUNT]; int sz_altfun_tbl; struct gpio_altfun_data altfun_table[] = { + {.altfun = GPIO_ALT_I2C_0,.start = 147,.end = 148,.cont = 0,.type = + GPIO_ALTF_A,}, + {.altfun = GPIO_ALT_I2C_1,.start = 16,.end = 17,.cont = 0,.type = + GPIO_ALTF_B,}, + {.altfun = GPIO_ALT_I2C_2,.start = 10,.end = 11,.cont = 0,.type = + GPIO_ALTF_B,}, + {.altfun = GPIO_ALT_I2C_3,.start = 229,.end = 230,.cont = 0,.type = + GPIO_ALTF_C,}, {.altfun = GPIO_ALT_UART_0_MODEM,.start = 0,.end = 3,.cont = 1,.type = GPIO_ALTF_A,}, {.altfun = GPIO_ALT_UART_0_MODEM,.start = 33,.end = 36,.cont = 0,.type = @@ -181,7 +189,7 @@ gpio_error gpio_altfunction(gpio_alt_function alt_func, } if (!error) continue; - nmdk_error + printf ("GPIO %d configuration failure (nmdk_error:%d)", j, error); error = GPIO_INVALID_PARAMETER; |