summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | eeprom: Shuffle code aroundMarek Vasut2015-11-211-98/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | Just move the code around so that the forward declarations are not necessary. Also zap a few checkpatch issues where applicable and zap the use of #ifdef CONFIG_CMD_EEPROM in the code, since this is always true. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
* | tricorder: rewrite tricordereeprom commandAndreas Bießmann2015-11-211-27/+9
| | | | | | | | | | | | | | | | | | | | | | | | This rewrite uses lately promoted eeprom_init(int) function to choose the right I2C bus when writing data to the EEPROM. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
* | ARM: keystone2: configs: Correct burn_uboot_sp erase sizeCooper Jr., Franklin2015-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The NOR flash on Keystone 2 evms has a u-boot-spl partition size of 0x80000. Currently burn_uboot_spi will erase 0x100000 from the spi NOR which will cause a partial erase of the misc partition. Fix this by correcting the erase size. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
* | ARM: dra7x/am57x: Remove pin input/output config from WAKEUP pinsCooper Jr., Franklin2015-11-212-5/+5
| | | | | | | | | | | | | | | | | | | | | | The WAKEUP_X pins are always an input no matter the pinmux mode. However, the 18th bit that typical configures a pin as an input is considered reserved for the WAKEUP_X pins. Therefore, for any WAKEUP pin remove any configuration that sets that pin as an input. Since those pins are only inputs remove any output configuration from those pins. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
* | nios2: 10m50: change to ns16550 uartThomas Chou2015-11-213-2/+3
| | | | | | | | | | | | | | | | | | Change to ns16550 uart for 10m50 devboard based on a new Altera release. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ns16550: move CONFIG_SYS_NS16550 to KconfigThomas Chou2015-11-21768-155/+672
| | | | | | | | | | | | Move CONFIG_SYS_NS16550 to Kconfig, and run moveconfig.py. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* | ns16550: zap CONFIG_NS16550_SERIALThomas Chou2015-11-2116-47/+2
| | | | | | | | | | | | | | | | | | Zap CONFIG_NS16550_SERIAL, as the unification of ns16550 drivers is completed. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ns16550: unify serial_omapThomas Chou2015-11-2118-76/+22
| | | | | | | | | | | | | | | | Unify serial_omap, and use the generic binding. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ns16550: unify serial_tegraThomas Chou2015-11-214-56/+16
| | | | | | | | | | | | | | | | Unify serial_tegra, and use the generic binding. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ns16550: unify serial_dwThomas Chou2015-11-215-43/+3
| | | | | | | | | | | | | | | | Unify serial_dw, and use the generic binding. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ns16550: unify serial_keystoneThomas Chou2015-11-213-50/+1
| | | | | | | | | | | | | | | | Unify serial_keystone, and use the generic binding. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ns16550: unify serial_rockchipThomas Chou2015-11-215-57/+6
| | | | | | | | | | | | | | | | | | Unify serial_rockchip, and use the generic binding. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Ariel D'Alessandro <ariel@vanguardiasur.com.ar> Acked-by: Simon Glass <sjg@chromium.org>
* | ns16550: unify serial_ppcThomas Chou2015-11-214-42/+9
| | | | | | | | | | | | | | | | | | Unify serial_ppc, and use the generic binding. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Add TODO comment] Signed-off-by: Tom Rini <trini@konsulko.com>
* | ns16550: unify serial_x86Thomas Chou2015-11-205-57/+3
| | | | | | | | | | | | | | | | | | Unify serial_x86, and use the generic binding. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ns16550: add generic binding to unify the driversThomas Chou2015-11-202-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add generic binding to unify ns16550 drivers. There are several drivers using almost the same code, such as serial_dw, serial_keystone, serial_omap, serial_ppc, serial_rockchip, serial_tegra.c, and serial_x86. But each is platform specific. The key difference between these drivers is the way to get input clock frequency. With this unified approach, fixed clock frequency should be extracted from "clock-frequency" property of device tree blob. If this property is not available, the macro CONFIG_SYS_NS16550_CLK will be used. It can be a constant or a function to get clock, eg, get_serial_clock(). Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
* | ns16550: change map_sysmem to map_physmemThomas Chou2015-11-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Change map_sysmem() to map_physmem(,,MAP_NOCACHE). Though map_sysmem() can be used to map system memory, it might be wrong to use it for I/O ports. The map_physmem() serves the same purpose to translate physical address to virtual address with the additional flag to take care of cache property. Most drivers use map_physmem() since I/O ports access should be uncached. As ns16550 is a driver, it should use map_physmem() rather than map_sysmem(). Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Simon Glass <sjg@chromium.org>
* | debug_uart: restore ns16550 as defaultThomas Chou2015-11-201-0/+1
|/ | | | | | | | | | | | | | Since commit 220e8021af96 ("nios2: convert altera_jtag_uart to driver model"), the default debug uart was changed. Most people use ns16550 UART, so restore it as default. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reported-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reported-by: Ariel D'Alessandro <ariel@vanguardiasur.com.ar> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
* dm: Add timeline and guide for porting serial driversSimon Glass2015-11-201-0/+58
| | | | | | | | | | Add a README with a brief guide to porting serial drivers over to use driver model. Add a timeline also. All serial drivers should be converted by the end of January 2016. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: test: usb: sandbox: Add keyboard tests for sandboxSimon Glass2015-11-192-0/+36
| | | | | | | Add a test that verifies that USB keyboards work correctly on sandbox. This verifies some additional parts of the USB stack. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Enable USB keyboardSimon Glass2015-11-192-1/+3
| | | | | | | Enable the USB keyboard on sandbox, now that we have a suitable emulation driver. Signed-off-by: Simon Glass <sjg@chromium.org>
* usb: sandbox: Add a USB emulation driverSimon Glass2015-11-194-0/+264
| | | | | | | | | Add a simple USB keyboard driver for sandbox. It provides a function to 'load' it with input data, which it will then stream through to the normal U-Boot input subsystem. When the input data is exhausted, the keyboard stops providing data. Signed-off-by: Simon Glass <sjg@chromium.org>
* usb: sandbox: Add support for interrupt operationsSimon Glass2015-11-193-0/+42
| | | | | | | Allow USB device emulation to support interrupt URBs so that we can use USB keyboards with sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* usb: Avoid open-coded USB constants in usb_kbd.cSimon Glass2015-11-191-5/+5
| | | | | | | Replace the open-coded values with constants to make it clearer what they mean. Signed-off-by: Simon Glass <sjg@chromium.org>
* usb: Drop unused code in usb_kbd.cSimon Glass2015-11-191-30/+0
| | | | | | This was missed in the conversion to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: test: usb: Add a test for device reorderingSimon Glass2015-11-191-0/+50
| | | | | | | Add tests that 'usb tree' produces the right output when a device changes order on the bus. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: test: usb: Add tests for the 'usb tree' commandSimon Glass2015-11-192-1/+169
| | | | | | | Add tests that this command produces the right output, even when a rescan results in a device disappearing from the bus. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: usb: Remove inactive children after a bus scanSimon Glass2015-11-191-0/+23
| | | | | | | | | | Each scan of the USB bus may return different results. Existing driver-model devices are reused when found, but if a device no longer exists it will stay around, de-activated, but bound. Detect these devices and remove them after the scan completes. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: usb: Deprecate usb_get_dev_index()Simon Glass2015-11-191-0/+9
| | | | | | | | This function should not be used with driver model. While there are users of USB Ethernet that use driver model for USB but not Ethernet, we have to keep it around. Add a comment to that effect. Signed-off-by: Simon Glass <sjg@chromium.org>
* Revert "dm: Export device_remove_children / device_unbind_children"Simon Glass2015-11-192-30/+18
| | | | | | This reverts commit bb52b367f6ca4a3a918e77737f4ff6a1089912d9. Signed-off-by: Simon Glass <sjg@chromium.org>
* Revert "dm: usb: Use device_unbind_children to clean up usb devs on stop"Simon Glass2015-11-191-3/+0
| | | | | | | | This reverts commit 6cda369509e0d3fa5f9e33c9d71589c4523799fa. We want to avoid having the USB stack rely on unbind. Signed-off-by: Simon Glass <sjg@chromium.org>
* Revert "dm: usb: Rename usb_find_child to usb_find_emul_child"Simon Glass2015-11-191-9/+10
| | | | | | | | This reverts commit 9b510df703d282effba4f56ac567aa8011d56e6b. We want to avoid having the USB stack rely on unbind. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: usb: Allow finding a USB emulator for a deviceSimon Glass2015-11-192-2/+25
| | | | | | | | Each USB device has an emulator. Currently this can only be found by supplying the 'pipe' value, which contains the device number. Add a way to find it directly from the emulated device. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: usb: Allow up to 4 emulated devices on a hubSimon Glass2015-11-191-1/+1
| | | | | | To support more advanced testing, support 4 devices instead of 2. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: usb: Allow dynamic emulated USB device descriptorsSimon Glass2015-11-191-20/+28
| | | | | | | | We would like the serial number to come from the device tree node name of the emulated device. This avoids them all having the same name. Adjust the code to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Add safe device iteration macrosSimon Glass2015-11-192-0/+27
| | | | | | Add iteration macros which support unbinding a device within the loop. Signed-off-by: Simon Glass <sjg@chromium.org>
* usb: Refactor USB tree output code for testingSimon Glass2015-11-192-25/+41
| | | | | | | Allow the 'usb tree' command to be used from test code, so that we can verify that it works correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
* test: Record and silence console in testsSimon Glass2015-11-194-0/+22
| | | | | | | | | When running sandbox tests, silence the console to avoid unwanted output. Also, record the console in case tests want to check it. The -v option can be used to enable stdout during tests. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Enable console recording and silent consoleSimon Glass2015-11-192-0/+4
| | | | | | | Allow console recording so that tests can use it. Also allow the console output to be suppressed, to reduce test output 'noise'. Signed-off-by: Simon Glass <sjg@chromium.org>
* console: Add a console bufferSimon Glass2015-11-196-1/+125
| | | | | | | | | | | | | | | | | | | It is useful to be able to record console output and provide console input via a buffer. This provides sandbox with the ability to run a command and check its output. If the console is set to silent then no visible output is generated. This also provides a means to fix the problem where tests produce unwanted output, such as errors or warnings. This can be confusing. We can instead set the console to silent and record this output. It can be checked later in the test if required. It is possible that this may prove useful for non-test situations. For example the console output may be suppressed for normal operations, but recorded and stored for access by the OS. That feature is not implemented at present. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add a circular memory buffer implementationSimon Glass2015-11-193-0/+637
| | | | | | | | This will be used to support console recording. It provides for a circular buffer which can be written at the head and read from the tail. It supports avoiding data copying by providing raw access to the data. Signed-off-by: Simon Glass <sjg@chromium.org>
* Drop config.h header from display_options.cSimon Glass2015-11-191-1/+0
| | | | | | Since common.h will always include this automatically, it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* Move console definitions into a new console.h fileSimon Glass2015-11-19100-18/+131
| | | | | | | | The console includes a global variable and several functions that are only used by a small subset of U-Boot files. Before adding more functions, move the definitions into their own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: usb: Avoid time delays in sandbox testsSimon Glass2015-11-193-1/+14
| | | | | | | Currently the USB tests take around two seconds to run. Remove these unnecessary time delays so that the tests run quickly. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add a way to skip time delaysSimon Glass2015-11-193-1/+37
| | | | | | | | Some tests are slow due to delays which are unnecessary on sandbox. The worst offender is USB where we lose two seconds. Add a way to disable time delays. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: cros_ec: fix uninitialized use of lenDaniel Schwierzeck2015-11-191-0/+1
| | | | | | | | | | | | | | | | Building with gcc-5.2 raises this warning: drivers/misc/cros_ec_sandbox.c: In function cros_ec_sandbox_packet: drivers/misc/cros_ec_sandbox.c:483:5: warning: len may be used uninitialized in this function [-Wmaybe-uninitialized] if (len < 0) ^ If the function process_cmd() is called with req_hdr->command == EC_CMD_ENTERING_MODE, the value of len will be returned uninitialized. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* x86: qemu: Convert to use driver model keyboardBin Meng2015-11-193-1/+3
| | | | | | | Convert to use driver model keyboard on QEMU. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* x86: crownbay: Convert to use driver model keyboardBin Meng2015-11-192-1/+2
| | | | | | | Convert to use driver model keyboard on Intel Crown Bay. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* input: Ban digit numbers if 'Num Lock' is not onBin Meng2015-11-191-0/+6
| | | | | | | | When 'Num Lock' is not on, we should not send these digit numbers (0-9 and dot) to the output buffer. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* input: Change LED state bits to conform i8042 compatible keyboardBin Meng2015-11-192-5/+5
| | | | | | | | | | | | When sending LED update command to an i8042 compatible keyboard, bit1 is 'Num Lock' and bit2 is 'Caps Lock' in the data byte. But input library defines bit1 as 'Caps Lock' and bit2 as 'Num Lock'. This causes a wrong LED to be set on an i8042 compatible keyboard. Change the LED state bits to be i8042 compatible, and change the keyboard flags as well. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* input: Call keyboard's update_leds() method when the LEDs changeBin Meng2015-11-191-0/+15
| | | | | | | | | | We should request keyboard to turn on/off its LED when detecting any changes on the LEDs. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Minor changes to allow this to build without CONFIG_DM_KEYBOARD: Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud