summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* test: dm: test.dts - move to sandbox dts directoryPrzemyslaw Marczak2015-05-145-27/+7
| | | | | | | | | | | | | | | | | The file test.dts from driver model test directory, was compiled by call dtc in script: test/dm/test-dm.sh. This doesn't allow for including of dtsi files and using of C preprocessor routines in this dts file. Since the mentioned script builds U-Boot before tests, then moving the test.dts file into sandbox dts directory is reasonable. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
* test: dm: add sandbox PMIC framework testsPrzemyslaw Marczak2015-05-144-0/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds new file to sandbox driver model test environment. The file is: test/dm/power.c, and it includes tests for PMIC framework, which includes PMIC uclass and REGULATOR uclass. All tests are based od Sandbox PMIC emulated device. Some test constants for this device are defined in the header: include/power/sandbox_pmic.h PMIC tests includes: - pmic get - tests, that pmic_get() returns the requested device - pmic I/O - tests I/O by writing and reading some values to PMIC's registers and then compares, that the write/read values are equal. The regulator tests includes: - Regulator get by devname/platname - Voltage set/get - Current set/get - Enable set/get - Mode set/get - Autoset - List autoset For the regulator 'get' test, the returned device pointers are compared, and their names are also compared to the requested one. Every other test, first sets the given attribute and next try to get it. The test pass, when the set/get values are equal. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
* sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulatorPrzemyslaw Marczak2015-05-1410-1/+819
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds emulation of sandbox PMIC device, which includes: - PMIC I2C emulation driver - PMIC I/O driver (UCLASS_PMIC) - PMIC regulator driver (UCLASS_REGULATOR) The sandbox PMIC has 12 significant registers and 4 as padding to 16 bytes, which allows using 'i2c md' command with the default count (16). The sandbox PMIC provides regulators: - 2x BUCK - 2x LDO Each, with adjustable output: - Enable state - Voltage - Current limit (LDO1/BUCK1 only) - Operation mode (different for BUCK and LDO) Each attribute has it's own register, beside the enable state, which depends on operation mode. The header file: sandbox_pmic.h includes PMIC's default register values, which are set on i2c pmic emul driver's probe() method. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
* sandbox: i2c: search child emul dev and check its uclass idPrzemyslaw Marczak2015-05-141-3/+17
| | | | | | | | | | | | | | | | The function get_emul() in sandbox i2c bus driver, always returns first child as i2c emul device. This may only work for i2c devices with a single child, which is an only i2c emul device. In case when i2c device has more than one child (e.g. PMIC), and one is i2c emul, then the function should search it by check uclass id for each child. This patch add this change to the get_emul(). Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
* doc: driver-model: pmic-framework.txt - cleanupPrzemyslaw Marczak2015-05-141-11/+9
| | | | | | | | | This commit cleanups the PMIC framework documentation. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
* common: cmd regulator: command cleanupPrzemyslaw Marczak2015-05-141-117/+122
| | | | | | | | | | | | | | | | | This commit cleanups the regulator command. The first change, is adjusting "regulator dev" command to use "regulator-name" constraint, for setting the operating device. Thanks to this, the regulator_get() function is removed. This also updates do_list() function, with loop over uclass_find_* function calls, to prevent probe of all listed regulators. This also cleanups the printing in command. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
* common: cmd pmic: command cleanupPrzemyslaw Marczak2015-05-141-76/+55
| | | | | | | | | | | | | | | This commit cleanups the use of function: failed(). The new function name is: failure(), and it is used for print errno and the errno-related message only. The second change is choosing PMIC device by it's name, instead of seq number. Thanks to this change, for set the current device, call of pmic_get() is enough. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
* dm: regulator: uclass driver code cleanupPrzemyslaw Marczak2015-05-144-99/+132
| | | | | | | | | | | | | | | | | | | This cleanup includes: - remove of the preprocessor macros which pointed to long name functions - update of the names of some regulator uclass driver functions - cleanup of the function regulator_autoset() - reword of some comments of regulator uclass header file - regulator_get_by_platname: check error for uclass_find_* function calls - add function: regulator_name_is_unique - regulator post_bind(): check regulator name uniqueness - fix mistakes in: regulator/Kconfig - regulator.h: update comments - odroid u3: cleanup the regulator calls Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
* dm: pmic: code cleanup of PMIC uclass driverPrzemyslaw Marczak2015-05-144-47/+40
| | | | | | | | | | | | | | | | | The cleanup includes: - pmic.h - fix mistakes in a few comments - pmic operations: value 'reg_count' - redefine as function call - fix function name: pmic_bind_childs() -> pmic_bind_children() - pmic_bind_children: change the 'while' loop with the 'for' - add implementation of pmic_reg_count() method - pmic_bind_children() - update function call name - Kconfig: add new line at the end of file - Update MAX77686 driver code Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
* odroid: enable driver model pmic/regulator API and MAX77686 driversPrzemyslaw Marczak2015-05-144-37/+53
| | | | | | | | | | | | | | | | | | | | | | | | This change enables the configs required to init and setup max77686 regulator driver, using the new driver model pmic and regulator API. And also changes the old pmic framework calls to the new ones. This commits enables: - CONFIG_ERRNO_STR - CONFIG_DM_PMIC - CONFIG_DM_PMIC_CMD - CONFIG_DM_PMIC_MAX77686 - CONFIG_DM_REGULATOR - CONFIG_DM_REGULATOR_CMD - CONFIG_DM_REGULATOR_MAX77686 And removes the unused: - CONFIG_DM_I2C_COMPAT - CONFIG_POWER - CONFIG_POWER_I2C - CONFIG_POWER_MAX77686 Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* odroid: dts: add 'voltage-regulators' description to max77686 nodePrzemyslaw Marczak2015-05-141-0/+253
| | | | | | | | | Adding regulators subnode to fdt max77686 node, allows properly init regulators by the max77686 regulator driver. This enables the complete functionality of the regulator command. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: board:samsung: power_init_board: add requirement of CONFIG_DM_PMICPrzemyslaw Marczak2015-05-141-2/+2
| | | | | | | | In the power_init_board function call, regulator driver init is called, so before compile, make sure that any power framework is defined. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* doc: driver-model: pmic and regulator uclass documentationPrzemyslaw Marczak2015-05-141-0/+142
| | | | | | | | Since this framework is still under the construction, the main documentation is kept in the header files. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: regulator: add fixed voltage regulator driverPrzemyslaw Marczak2015-05-144-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | This driver implements regulator operations for fixed Voltage/Current value regulators. beside the standard regulator constraints, which are put into the uclass platform data, a typical fixed regulator node provides few additional properties like: - gpio - gpio-open-drain - enable-active-high - startup-delay-us The only 'gpio' is used by this driver and is kept in structure of type 'fixed_regulator_platdata', as a device platform data (dev->platdata). The driver implements: - get_value - get_current - get_enable - set_enable The regulator calls and commands can be used for fixed-regulator devices, and the proper error will be returned for prohibited. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: regulator: add max77686 regulator driverPrzemyslaw Marczak2015-05-147-24/+942
| | | | | | | | | | | | | | This commit adds support to MAX77686 regulator driver, based on a driver model regulator's API. It implements almost all regulator operations, beside those for setting and geting the Current value. For proper bind and operation it requires the MAX77686 PMIC driver. New file: drivers/power/regulator/max77686.c New config: CONFIG_DM_REGULATOR_MAX77686 Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: pmic: add max77686 pmic driverPrzemyslaw Marczak2015-05-146-3/+139
| | | | | | | | | | | | | | | This is the implementation of driver model PMIC driver. The max77686 PMIC driver implements read/write operations and driver bind method - to bind its childs. This driver will try to bind the regulator devices by using it's child info array with regulator prefixes and driver names. This should succeed when compatible regulator driver is compiled. If no regulator driver found, then the pmic can still provide read/write operations, and can be used with PMIC function calls. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* pmic: max77686 set the same compatible as in the kernelPrzemyslaw Marczak2015-05-145-5/+5
| | | | | | | This commit also updates the proper dts files. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: regulator: add regulator commandPrzemyslaw Marczak2015-05-143-0/+426
| | | | | | | | | | | | | | | | | | | | This command is based on driver model regulator's API. The user interface provides: - list UCLASS regulator devices - show or [set] operating regulator device - print constraints info - print operating status - print/[set] voltage value [uV] (force) - print/[set] current value [uA] - print/[set] operating mode id - enable the regulator output - disable the regulator output The 'force' option can be used for setting the value which exceeds the constraints min/max limits. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: pmic: add pmic commandPrzemyslaw Marczak2015-05-143-0/+248
| | | | | | | | | | | | | | | This is new command for the PMIC devices based on driver model PMIC API. Command features are unchanged: - list UCLASS pmic devices - show or [set] operating pmic device (NEW) - dump registers - read byte of register at address - write byte to register at address The only one change for this command is 'dev' subcommand. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: regulator: add implementation of driver model regulator uclassPrzemyslaw Marczak2015-05-148-1/+768
| | | | | | | | | | | | | | | | | | This commit introduces the implementation of dm regulator API. Device tree support allows for auto binding. And by the basic uclass operations, it allows to driving the devices in a common way. For detailed informations, please look into the header file. Core files: - drivers/power/regulator-uclass.c - provides regulator common functions api - include/power/regulator.h - define all structures required by the regulator Changes: - new uclass-id: UCLASS_REGULATOR - new config: CONFIG_DM_REGULATOR Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: pmic: add implementation of driver model pmic uclassPrzemyslaw Marczak2015-05-146-0/+368
| | | | | | | | | | | | | | | | | | | | | | | | This commit introduces the PMIC uclass implementation. It allows providing the basic I/O interface for PMIC devices. For the multi-function PMIC devices, this can be used as I/O parent device, for each IC's interface. Then, each PMIC particular function can be provided by the child device's operations, and the child devices will use its parent for read/write by the common API. Core files: - 'include/power/pmic.h' - 'drivers/power/pmic/pmic-uclass.c' The old pmic framework is still kept and is independent. For more detailed informations, please look into the header file. Changes: - new uclass-id: UCLASS_PMIC - new config: CONFIG_DM_PMIC Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* lib: Kconfig: add entry for errno_str() functionPrzemyslaw Marczak2015-05-141-0/+8
| | | | | Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* exynos4-common: remove the unsued CONFIG_CMD_PMICPrzemyslaw Marczak2015-05-141-1/+0
| | | | | | | | This config name was never used, because the present pmic command was precompiled for the CONFIG_POWER. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* exynos5: fix build break by adding CONFIG_POWERPrzemyslaw Marczak2015-05-141-0/+4
| | | | | | | | | | Move the configs listed below from exynos5-dt-common.h to exynos5-common.h: - CONFIG_POWER - CONFIG_POWER_I2C fixes build break for Arndale and Smdk5250 boards. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* i2c: mxc: refactor i2c driver and support dmPeng Fan2015-05-143-193/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Introduce a new structure `struct mxc_i2c_bus`, this structure will used for non-DM and DM. 2. Remove `struct mxc_i2c_regs` structure, but use register offset to access registers based on `base` entry of `struct mxc_i2c_bus`. 3. Remove most `#ifdef I2C_QUIRK_REG`. Using driver_data to contain platform flags. A new flag is introduced, I2C_QUIRK_FLAG. 4. Most functions use `struct mxc_i2c_bus` as one of the parameters. Make most functions common to DM and non-DM, try to avoid duplicated code. 5. Support DM, but pinctrl is not included. Pinmux setting is still set by setup_i2c, but we do not need bus_i2c_init for DM. 6. struct i2c_parms and struct sram_data are removed. 7. Remove bus_i2c_read bus_i2c_write prototype in header file. The frist paramter of bus_i2c_init is modified to i2c index. Add new prototype i2c_idle_bus and force_bus_idle. Since bus_i2c_init is not good for DM I2C and pinctrl is missed, we use a weak function for i2c_idle_bus. Board file take the responsibility to implement this function, like this: " int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus) { if (i2c_bus->index == 0) force_bus_idle(i2c_pads_info0); else if (i2c_bus->index == 1) force_bus_idle(i2c_pads_info1); else xxxxxx } " 8. Introduce a weak function, enable_i2c_clk 9. Tested on an i.MX7 platform. Log info: => dm tree Class Probed Name ---------------------------------------- root [ + ] root_driver simple_bus [ ] |-- soc simple_bus [ ] | |-- aips-bus@30000000 simple_bus [ ] | | |-- anatop@30360000 simple_bus [ ] | | `-- snvs@30370000 simple_bus [ ] | |-- aips-bus@30400000 simple_bus [ ] | `-- aips-bus@30800000 i2c [ ] | |-- i2c@30a20000 i2c [ ] | `-- i2c@30a40000 simple_bus [ ] `-- regulators => i2c dev 0 Setting bus to 0 => i2c probe Valid chip addresses: 08 50 => i2c md 8 31 0031: 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
* imx: mx27 move GPIO_PORTx to gpio.hPeng Fan2015-05-142-22/+20
| | | | | | | | | | | | | | These GPIO_PORTx macros should be in gpio.h, but not in imx-regs.h. Also, imx-regs.h and iomux-v3.h has same macro defintion for GPIO_PORTx, and both of them are included in mxc_i2c.c(include mxc_i2c.h). This will incur build warnings with macro redefinition. Since iomux-v3.h is not compatible with mx27, we can not simply include iomux-v3.h for mx27, so move the GPIO_PORTx to gpio.h to fix the build warning. Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
* sunxi: Change usb-kbd interrupt polling to use an usb interrupt queueHans de Goede2015-05-141-1/+1
| | | | | | | | | | Now that the ohci code supports usb interrupt queues we can switch (back) to using an usb interrupt queue for usb-kbd interrupt polling. This greatly reduces u-boot's latency when dealing with usb keyboards. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: ohci: Add support for interrupt queuesHans de Goede2015-05-141-0/+132
| | | | | | | | Add support for interrupt queues to the ohci hcd code, bringing it inline with the ehci and musb-new(host) code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: ohci: Add an ohci_alloc_urb() functionHans de Goede2015-05-141-8/+23
| | | | | | | | Add an ohci_alloc_urb() function, this is a preparation patch for adding interrupt queue support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: ohci: Do not reuse ed for interrupt endpoints of different devicesHans de Goede2015-05-142-1/+38
| | | | | | | | | | | | | | | | | | | When submitting interrupt packets to an endpoint we only link in the ed once to avoid some races surrounding unlinking of periodic endpoints, but we share one ohci_device struct / one set of ed-s for all devices, which means that if we have an interrupt endpoint at endpoint 1 with one device, and a non interrupt endpoint 1 with another device we end up with the same ed linked into both the periodic and async lists, which is not good (tm). This commit switches over to using separate ohci_device structs, and thus separate ed-s for devices with interrupt endpoints, fixing this. This fixes e.g. matching a usb storage device and keyboard on the same usb-1 hub not working. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
* sandbox: Support wide-screen LCD emulationSimon Glass2015-05-141-2/+2
| | | | | | Increase the LCD size to 1366x768. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Fix warning in display_optionsSimon Glass2015-05-141-1/+1
| | | | | | | This fixes a warning in the print_buffer() function with some toolchains. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* sandbox: spi: Add newline to printf() in sandbox_sf_probeSimon Glass2015-05-141-1/+1
| | | | | | | | This printf() should have a newline at the end. Add it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
* sandbox: cros_ec: Support EC_CMD_ENTERING_MODE emulationSimon Glass2015-05-142-0/+17
| | | | | | Emualate this function which is used with Chrome OS verified boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add missing errno.h includes in a few filesSimon Glass2015-05-143-0/+3
| | | | | | These files use error numbering, so add the include. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Correct error handling in state_read_file()Simon Glass2015-05-141-1/+1
| | | | | | | This function should return a useful error for U-Boot, rather than -1. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* arm: Add a prototype for save_boot_params_ret()Simon Glass2015-05-141-0/+16
| | | | | | | | It is convenient for some boards to implement save_boot_params() in C rather than assembler. Provide a way to return in this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* arm: Include the .got section in the binarySimon Glass2015-05-141-1/+2
| | | | | | | Commit 47ed5dd0 dropped the .got section from U-Boot binaries. This is needed for some relocations, and causes failures if missing. Add it back. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: gpio: Fix comment typo in GPIOD_IS_INSimon Glass2015-05-141-1/+1
| | | | | | This should say 'in', not 'out'. Signed-off-by: Simon Glass <sjg@chromium.org>
* tpm: Rename Infineon TPM to slb9645ttSimon Glass2015-05-143-3/+3
| | | | | | This name is used in Linux, so use it in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* tpm: Support using driver model with I2CSimon Glass2015-05-143-56/+170
| | | | | | | As a first step towards converting the TPM system to driver model, allow it to work with CONFIG_DM_I2C. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: i2c: Add a function to find out the chip offset lengthSimon Glass2015-05-142-1/+15
| | | | | | | | We can currently set this but there is no API function to get it. Add one. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Heiko Schocher<hs@denx.de>
* dm: i2c: Implement 'i2c bus' command for driver modelSimon Glass2015-05-141-8/+55
| | | | | | | | This command was missed in the conversion. Add it back for driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Heiko Schocher <hs@denx.de>
* bootstage: Add IDs for SPI flash reading and decompressionSimon Glass2015-05-141-0/+2
| | | | | | | | | | We maintain an accumulator for time spent reading from SPI flash, since this can be significant on some platforms. Also add one for decompression time. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
* usb: add device connection/disconnection detectionVincent Palatin2015-05-143-1/+29
| | | | | | | | | | | | Provide a function to detect USB device insertion/removal in order to avoid having to do USB enumeration in a tight loop when trying to detect peripheral hotplugging. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* sunxi: ohci: Add ohci usb host controller supportHans de Goede2015-05-145-1/+113
| | | | | | | | | | | | | This commit adds support for the OHCI companion controller, which makes usb-1 devices directly plugged into to usb root port work. Note for now this switches usb-keyboard support for sunxi back from int-queue support to the old interrupt polling method. Adding int-queue support to the ohci code and switching back to int-queue support is in the works. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: ehci: Convert to the driver-modelHans de Goede2015-05-142-29/+67
| | | | | | | | Convert sunxi-boards which use the sunxi-ehci code to the driver-model. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* usb: ohci: Add dm supportHans de Goede2015-05-142-0/+91
| | | | | | | Add driver-model support to the ohci code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: ohci: Skip unnecessary mdelay(1) calls in various placesHans de Goede2015-05-141-9/+20
| | | | | | | | | | | | | | | | | For some reason the ohci code is full with: #ifdef DEBUG pkt_print(...) #else mdelay(1); #endif AFAICT there is no reason for the mdelay(1) calls. This commit disables them when building the ohci code for new driver-model using boards. It leaves the mdelay(1) calls in place when building for older boards, so as to avoid causing any regressions there. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: ohci: Remove unnecessary delays from hc_start and power power-on pathsHans de Goede2015-05-141-4/+0
| | | | | | | | | | | | The usb spec says that we must wait a minimum amount of time after port power on (exact time is in the hub descriptor), this is something which we must not only do for root ports but also for external hub ports, which is why the common usb_hub code already waits a full second after powering up ports. Having a separate wait for just the root hub in the ohci-hcd code only leads to doing the waiting twice for the root ports, so drop the wait from the ohci-hcd code. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
OpenPOWER on IntegriCloud