summaryrefslogtreecommitdiff
path: root/drivers/usb
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 /drivers/usb
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 'drivers/usb')
-rwxr-xr-xdrivers/usb/gadget/u8500_udc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/gadget/u8500_udc.c b/drivers/usb/gadget/u8500_udc.c
index 109e11dda..92f1b57c8 100755
--- a/drivers/usb/gadget/u8500_udc.c
+++ b/drivers/usb/gadget/u8500_udc.c
@@ -21,7 +21,6 @@
#include <common.h>
#include "u8500_udc.h"
-#include <asm/arch/gpio.h>
static volatile struct mg_dev_register *pRegs = 0;
@@ -32,8 +31,6 @@ int udc_musb_platform_init(void)
u8 soft_reset;
u16 temp;
pRegs = (volatile struct mg_dev_register *) CONFIG_USB_BASE;
-
- gpio_altfuncenable(GPIO_ALT_USB_OTG, "USB-OTG");
top = pRegs->OTG_TOPCTRL;
pRegs->OTG_TOPCTRL = (top | MODE_ULPI);