diff options
author | Wolfgang Denk <wd@denx.de> | 2010-01-12 23:47:03 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-01-12 23:47:03 +0100 |
commit | 2ff6922280025c1315c53fa2eb4ab33f0c9591de (patch) | |
tree | 8061843b797eac0669f51b3b14d361bdae1dbe3b /board | |
parent | f8b365ceb64e0b86bea243d783ff94687302cba9 (diff) | |
parent | 06f95959bc5421e516a9a25012e303dea8833385 (diff) | |
download | u-boot-2ff6922280025c1315c53fa2eb4ab33f0c9591de.tar.gz u-boot-2ff6922280025c1315c53fa2eb4ab33f0c9591de.tar.xz u-boot-2ff6922280025c1315c53fa2eb4ab33f0c9591de.zip |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'board')
-rw-r--r-- | board/davinci/common/misc.c | 31 | ||||
-rw-r--r-- | board/davinci/common/misc.h | 13 | ||||
-rw-r--r-- | board/logicpd/zoom1/zoom1.c | 2 | ||||
-rw-r--r-- | board/logicpd/zoom2/zoom2.c | 2 | ||||
-rw-r--r-- | board/overo/overo.c | 2 | ||||
-rw-r--r-- | board/pandora/pandora.c | 3 | ||||
-rw-r--r-- | board/ti/beagle/beagle.c | 2 | ||||
-rw-r--r-- | board/timll/devkit8000/devkit8000.c | 2 |
8 files changed, 50 insertions, 7 deletions
diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c index 9fab76fa5d..25ca326500 100644 --- a/board/davinci/common/misc.c +++ b/board/davinci/common/misc.c @@ -155,3 +155,34 @@ int davinci_configure_pin_mux(const struct pinmux_config *pins, return 0; } + +/* + * Configure multiple pinmux resources. + * + * Takes an pinmux_resource array of pinmux_config and pin counts: + * + * const struct pinmux_resource pinmuxes[] = { + * PINMUX_ITEM(uart_pins), + * PINMUX_ITEM(i2c_pins), + * }; + * + * The number of items in the array must be passed (ARRAY_SIZE can provide + * this value conveniently). + * + * Each item entry is configured in the defined order. If configuration + * of any item fails, -1 is returned and none of the following items are + * configured. On success, 0 is returned. + */ +int davinci_configure_pin_mux_items(const struct pinmux_resource *item, + const int n_items) +{ + int i; + + for (i = 0; i < n_items; i++) { + if (davinci_configure_pin_mux(item[i].pins, + item[i].n_pins) != 0) + return -1; + } + + return 0; +} diff --git a/board/davinci/common/misc.h b/board/davinci/common/misc.h index f6d8b1bda1..329c369763 100644 --- a/board/davinci/common/misc.h +++ b/board/davinci/common/misc.h @@ -34,8 +34,21 @@ struct pinmux_config { unsigned char field; /* field number */ }; +/* pin table definition */ +struct pinmux_resource { + const struct pinmux_config *pins; + const int n_pins; +}; + +#define PINMUX_ITEM(item) { \ + .pins = item, \ + .n_pins = ARRAY_SIZE(item) \ + } + int dvevm_read_mac_address(uint8_t *buf); void dv_configure_mac_address(uint8_t *rom_enetaddr); int davinci_configure_pin_mux(const struct pinmux_config *pins, int n_pins); +int davinci_configure_pin_mux_items(const struct pinmux_resource *item, + int n_items); #endif /* __MISC_H */ diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c index a144f52e6f..e442d687b7 100644 --- a/board/logicpd/zoom1/zoom1.c +++ b/board/logicpd/zoom1/zoom1.c @@ -63,7 +63,7 @@ int board_init(void) int misc_init_r(void) { twl4030_power_init(); - twl4030_led_init(); + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); dieid_num_r(); /* diff --git a/board/logicpd/zoom2/zoom2.c b/board/logicpd/zoom2/zoom2.c index 21afc29b38..387ed2d396 100644 --- a/board/logicpd/zoom2/zoom2.c +++ b/board/logicpd/zoom2/zoom2.c @@ -149,7 +149,7 @@ int misc_init_r(void) { zoom2_identify(); twl4030_power_init(); - twl4030_led_init(); + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); dieid_num_r(); /* diff --git a/board/overo/overo.c b/board/overo/overo.c index d42dc13260..f363281568 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -67,7 +67,7 @@ int board_init(void) int misc_init_r(void) { twl4030_power_init(); - twl4030_led_init(); + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); #if defined(CONFIG_CMD_NET) setup_net_chip(); diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c index 460ed12359..75e43305b3 100644 --- a/board/pandora/pandora.c +++ b/board/pandora/pandora.c @@ -65,8 +65,7 @@ int misc_init_r(void) struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE; struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; - twl4030_power_init(); - twl4030_led_init(); + twl4030_led_init(TWL4030_LED_LEDEN_LEDBON); /* Configure GPIOs to output */ writel(~(GPIO14 | GPIO15 | GPIO16 | GPIO23), &gpio1_base->oe); diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 32d501e228..3b4c9e73b5 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -107,7 +107,7 @@ int misc_init_r(void) struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; twl4030_power_init(); - twl4030_led_init(); + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); /* Configure GPIOs to output */ writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c index db7d2e27e2..95afaaaaa4 100644 --- a/board/timll/devkit8000/devkit8000.c +++ b/board/timll/devkit8000/devkit8000.c @@ -76,7 +76,7 @@ int misc_init_r(void) twl4030_power_init(); #ifdef CONFIG_TWL4030_LED - twl4030_led_init(); + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); #endif #ifdef CONFIG_DRIVER_DM9000 |