summaryrefslogtreecommitdiff
path: root/include/configs/u8500.h
diff options
context:
space:
mode:
authorJoakim Axelsson <joakim.axelsson@stericsson.com>2010-10-20 14:11:49 +0200
committerMichael BRANDT <michael.brandt@stericsson.com>2010-12-08 16:20:27 +0100
commit307a253778d0918a8e0f10c2ea9a350450e37677 (patch)
tree4f41a9000a90c1b48e3778866abddb3db6eb8efa /include/configs/u8500.h
parentc6b4e8c0340357c795f5898cf5e4141e845a2801 (diff)
db8500: New GPIO driver and config, from Linux kernel
Copied the GPIO configurator written for the Linux kernel. The Nomadik db8500 GPIO driver. Purpose is to be able to just cut-n-paste the GPIO config from Linux to U-boot. Also at the same time remove the obsolete and old gpio_alt_funcenable/disable methods. Now all is configured using a table in u8500.c. Now drivers doesn't have to worry about setting up the GPIO pins. Actually no driver today uses GPIO pins directly, only via hardware blocks within db8500. Functions are still added to be able to interact directly with a GPIO pin. This also cleaned up a lot of driver by not having to bit manipulate GPIO registers them self. The new driver is called db8500_gpio and placed in driver/gpio/. Functions are in include/db8500_gpio.h: void db8500_gpio_set_pull(unsigned gpio, enum db8500_gpio_pull pull); void db8500_gpio_make_input(unsigned gpio); int db8500_gpio_get_input(unsigned gpio); void db8500_gpio_make_output(unsigned gpio, int val); void db8500_gpio_set_output(unsigned gpio, int val); And for the configurator in include/db8500_pincfg.h: void db8500_gpio_config_pins(pin_cfg_t *cfgs, size_t num); All in all the final binary size has decreased. This is only done for db8500 nomadik GPIO. The code for gpio expanders has not been touched. All references to Nomadik has been removed in this driver. Only db8500 is left. ST-Ericsson ID: None Signed-off-by: Joakim Axelsson <joakim.axelsson@stericsson.com> Change-Id: I90aa1d46c813ffb5a777c3492b5751f5054f71cf Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/9904 Reviewed-by: QATOOLS Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com>
Diffstat (limited to 'include/configs/u8500.h')
-rw-r--r--include/configs/u8500.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/configs/u8500.h b/include/configs/u8500.h
index 7a0284c0b..0bca0dcf6 100644
--- a/include/configs/u8500.h
+++ b/include/configs/u8500.h
@@ -309,6 +309,7 @@
/*
* U8500 GPIO register base for 9 banks
*/
+#define CONFIG_DB8500_GPIO
#define CFG_GPIO_0_BASE 0x8012E000
#define CFG_GPIO_1_BASE 0x8012E080
#define CFG_GPIO_2_BASE 0x8000E000