aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/usbmisc_imx.c
AgeCommit message (Collapse)AuthorFilesLines
2014-10-20usb: chipidea: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <[email protected]>
2014-09-23chipidea: usbmisc_imx: Add USB support for VF610 SoCsStefan Agner1-11/+41
This adds Vybrid VF610 SoC support. The IP is very similar to i.MX6, however, the non-core registers are spread in two different register areas. Hence we support multiple instances of the USB misc driver and add the driver instance to the imx_usbmisc_data structure. Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Stefan Agner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-05-23chipidea: usbmisc_imx: Allow USB OTG to work on mx51Fabio Estevam1-0/+10
The field PLLDIVVALUE of register PHY_CTRL_1 selects the reference clock source for the PHY: 00 = sysclock uses 19.2 MHz 01 = sysclock uses 24 MHz 10 = sysclock uses 26 MHz 11 = sysclock uses 27 MHz The reset value for this field is 10 according to the reference manual, and even though this reset value works for mx53, it does not work for mx51. So instead of relying on the reset value for the PLLDIVVALUE field, explicitly set it to 01 so that a 24MHz clock can be selected for the PHY and allowing both mx51 and mx53 to have USB OTG port functional. Succesfully tested 'g_ether' on a imx51-babbage and on a imx53-qsb boards. Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-24usb: chipidea: usbmisc: Add USB support for i.MX25/i.MX35 CPUsDenis Carikli1-0/+58
This adds the i.MX25 and the i.MX35 support in the ChipIdea usbmisc driver. The i.MX25 and i.MX35 usb controllers are similar enough to be able to use the same code. Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Denis Carikli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-08usb: chipidea: usbmisc: Add support for i.MX51 CPUAlexander Shiyan1-0/+4
This adds i.MX51 as the next user of the usbmisc driver. Functionality is similar to i.MX53, so at this stage simply reuse existing i.MX53 calls. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-08usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUsAlexander Shiyan1-0/+42
This adds i.MX27 and i.MX31 as the next user of the usbmisc driver. Tested-by: Chris Ruehl <[email protected]> Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-08-14USB: chipidea: i.MX: simplify usbmiscSascha Hauer1-53/+42
The chipidea i.MX driver is split into two drivers. The ci_hdrc_imx driver handles the chipidea cores and the usbmisc_imx driver handles the noncore registers common to all chipidea cores (but SoC specific). Current flow is: - usbmisc sets an ops pointer in the ci_hdrc_imx driver during probe - ci_hdrc_imx checks if the pointer is valid during probe, if yes calls the functions in the ops pointer. - usbmisc_imx calls back into the ci_hdrc_imx driver to get additional data This is overly complicated and has problems if the drivers are compiled as modules. In this case the usbmisc_imx driver can be unloaded even if the ci_hdrc_imx driver still needs usbmisc functionality. This patch changes this by letting the ci_hdrc_imx driver calling functions from the usbmisc_imx driver. This way the symbol resolving during module load makes sure the ci_hdrc_imx driver depends on the usbmisc_imx driver. Also instead of letting the usbmisc_imx driver call back into the ci_hdrc_imx driver, pass the needed data in the first place. Signed-off-by: Sascha Hauer <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-24usb: chipidea: drop "13xxx" infixAlexander Shishkin1-1/+1
"ci13xxx" is bad for at least the following reasons: * people often mistype it * it doesn't add any informational value to the names it's used in * it needlessly attracts mail filters This patch replaces it with "ci_hdrc", "ci_udc" or "ci_hw", depending on the situation. Modules with ci13xxx prefix are also renamed accordingly and aliases are added for compatibility. Otherwise, no functional changes. Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-24usbmisc_imx: allow autoloading on according to dt idsArnaud Patard (Rtp)1-0/+1
Allow udev to autoload the module when booting with device-tree Signed-off-by: Arnaud Patard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-17usb: chipidea: usbmisc: use module_platform_driverPhilipp Zabel1-11/+1
This patch converts the driver to use the module_platform_driver macro which makes the code smaller and a bit simpler. Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Michael Grzeschik <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-17usb: chipidea: usbmisc_imx: Staticize usbmisc_imx_drv_init/exitFabio Estevam1-2/+2
Fix the following sparse warnings: drivers/usb/chipidea/usbmisc_imx.c:246:5: warning: symbol 'usbmisc_imx_drv_init' was not declared. Should it be static? drivers/usb/chipidea/usbmisc_imx.c:252:6: warning: symbol 'usbmisc_imx_drv_exit' was not declared. Should it be static? Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-30usb: chipidea: usbmisc: add post handling and errata fix for mx25Michael Grzeschik1-0/+36
This adds a post handling routine which is called after ci13xxx_add_device was called. The first user is the mx25, which has to disable the external-vbus-divider after the udc has started. Signed-off-by: Michael Grzeschik <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> [Alex: also fixed a signed one-bit bitfield a whitespace error and yet another set of line-too-long and void pointer casting errors] Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-30usb: chipidea: usbmisc: add mx53 supportMichael Grzeschik1-0/+54
This adds mx53 as the next user of the usbmisc driver and makes it possible to disable the overcurrent-detection of the internal phy. Signed-off-by: Michael Grzeschik <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> [Alex: fixed another set of line-too-long and void pointer cast] Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-30usb: chipidea: usbmisc: prepare driver to handle more than one socMarc Kleine-Budde1-5/+13
This attaches the usbmisc_ops to the of_device_id data and makes it possible to define special functions per soc. Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Michael Grzeschik <[email protected]> [Alex: fixed one case of line-too-long and one bogus cast to void ptr] Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-30usb: chipidea: usbmisc: fix a potential race conditionMarc Kleine-Budde1-2/+2
This fixes a potential race condition where the ci13xxx_imx glue code could be fast enough to call one of the usbmisc_ops before he got a valid value on the static usbmisc pointer. To fix that we first set usbmisc, then call usbmisc_set_ops(). Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Michael Grzeschik <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-30usb: chipidea: usbmisc: unset global varibale usbmisc on driver removeMarc Kleine-Budde1-0/+1
The probe function checks usbmisc to be NULL in the beginning. Without this patch the can only be loaded once. Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Michael Grzeschik <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-30usb: chipidea: usbmisc: rename file, struct and functions to usbmisc_imxMichael Grzeschik1-0/+162
This driver will be used for every Freescale SoC which has this misc memory layout to control the basic usb handling. So better name this driver, function and struct names in a more generic way. Reported-by: Fabio Estevam <[email protected]> Signed-off-by: Michael Grzeschik <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>