From f4f7f7d70bc982d6689f09bf97e62caec223629f Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 19 Feb 2010 10:15:10 +0100 Subject: HREF V1 updates This patch is part of WP254081 which depends on WP252006. * Fixed I2C, use real timeouts instead of counter * Undefined CONFIG_BOOTTIME, since it as to be changed to new timer.c * Merged V1 patches from Bangalore The patches were merged manually, because of the differences of the U-Boot baseline (Bangalore U-Boot 1.3.1, Lund 2009.11). The original patches were created by Rabin Vincent . and were applied originally to Branches: blr_lsp, remotes/origin/blr_lsp Follows: qpppaaa_20100210_094651 0001-u8500-gpio-add-I2C0-altfun.patch 0002-u8500-use-correct-v1-macros.patch 0003-emmc-clean-up-paritioning.patch 0004-u8500-remove-incorrect-ram-settings.patch 0005-u8500-gpio-remove-unnecessary-ifdefs.patch 0006-u8500-add-ED-v1-detection-and-handle-eMMC-diff.patch 0008-u8500-mmc-don-t-disable-altfuns.patch 0009-u8500-gpio-remove-unused-defined.patch 0010-u8500-mmc-add-barrier-for-while-loop.patch 0011-u8500-mmc-handle-non-block-addressed-cards.patch 0012-u8500-mmc-remove-unused-gpio-settings-on-v1.patch 0013-u8500-emmc-build-fix.patch 0014-u8500-handle-v1-gpios-and-clocks.patch 0015-mmc-build-fix-for-block-addressing.patch 0016-u8500-add-clocks-and-hardware-files.patch 0017-u8500-enable-PRCUM-timers-reg-for-ED.patch 0018-u8500-handle-MTU-for-v1-ED.patch 0019-u8500-emmc-remove-unnecessary-GPIO-settings.patch 0020-u8500-remove-dead-code.patch 0021-u8500-add-working-MTU-timer.patch 0022-pl011-empty-rx-fifo-if-necessary.patch 0023-u8500-gpio-fix-cont-handling-in-altfunc.patch 0024-u8500-reduce-bootdelay-to-1-and-enable-zero-check.patch 0025-u8500-disable-forcing-of-verify-but-set-n-by-default.patch 0029-u8500-fix-some-gpio-settings.patch 0030-emmc-make-v1-paritioning-differences-explicit.patch Signed-off-by: Michael Brandt Change-Id: I1106702e393c34f630e71f071e06c3952b0d3a1a Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/182 Reviewed-by: Michael BRANDT Tested-by: Jonas ABERG Reviewed-by: Jonas ABERG --- board/st/u8500/gpio.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'board/st/u8500/gpio.c') diff --git a/board/st/u8500/gpio.c b/board/st/u8500/gpio.c index 52c585be6..8623150a3 100644 --- a/board/st/u8500/gpio.c +++ b/board/st/u8500/gpio.c @@ -67,10 +67,8 @@ struct gpio_altfun_data altfun_table[] = { GPIO_ALTF_A,}, {.altfun = GPIO_ALT_EMMC,.start = 197,.end = 207,.cont = 0,.type = GPIO_ALTF_A,}, -#ifdef CONFIG_STM_8500_V1 {.altfun = GPIO_ALT_POP_EMMC,.start = 128,.end = 138,.cont = 0,.type = GPIO_ALTF_A,}, -#endif }; /* @@ -164,13 +162,12 @@ gpio_error gpio_altfunction(gpio_alt_function alt_func, gpio_error error = -1; for (i = 0; i < sz_altfun_tbl; i++) { - if (altfun_table[i].altfun == alt_func) - break; - } - start = altfun_table[i].start; - end = altfun_table[i].end; - for (j = start; j <= end; j++) { - { + if (altfun_table[i].altfun != alt_func) + continue; + + start = altfun_table[i].start; + end = altfun_table[i].end; + for (j = start; j <= end; j++) { if (which_altfunc == GPIO_ALTF_FIND) { altfun_pinconfig.mode = altfun_table[i].type; @@ -195,6 +192,9 @@ gpio_error gpio_altfunction(gpio_alt_function alt_func, error = GPIO_INVALID_PARAMETER; return (error); } + + if (!altfun_table[i].cont) + break; } return (error); } -- cgit v1.2.3