summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2015-11-271-1/+2
|\
| * i2c: Fix the comment to match the function describedStefan Roese2015-11-271-1/+2
| | | | | | | | | | | | | | | | Use the correct function name in the function description. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Heiko Schocher <hs@denx.de>
* | sf: Move SPI flash drivers to defconfigBin Meng2015-11-25124-179/+0
| | | | | | | | | | | | | | | | There are already Kconfig options for SPI flash drivers, but we have not moved them from config.h to defconfig files. This commit does this in a batch. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* | spi: Move SPI drivers to defconfigBin Meng2015-11-2543-46/+0
|/ | | | | | | | There are already Kconfig options for SPI drivers, but we have not moved them from config.h to defconfig files. This commit does this in a batch. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* gpt: part: Definition and declaration of GPT verification functionsLukasz Majewski2015-11-231-0/+35
| | | | | | | | | | | | | This commit provides definition and declaration of GPT verification functions - namely gpt_verify_headers() and gpt_verify_partitions(). The former is used to only check CRC32 of GPT's header and PTEs. The latter examines each partition entry and compare attributes such as: name, start offset and size with ones provided at '$partitions' env variable. Signed-off-by: Lukasz Majewski <l.majewski@majess.pl> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
* Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini2015-11-222-5/+27
|\
| * sunxi: Add basic H3 supportJens Kuske2015-11-221-0/+2
| | | | | | | | | | | | | | | | Add initial sun8i H3 support, only uart + mmc are supported for now. Signed-off-by: Jens Kuske <jenskuske@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * sunxi: Enable DFU for RAMSiarhei Siamashka2015-11-221-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DFU protocol implementation in U-Boot is much faster than the FEL protocol implementation in the boot ROM on Allwinner devices. Using DFU instead of FEL improves the USB transfer speed from 500-900 KB/s to 3.2-3.7 MB/s. This is particularly useful for reducing the time needed for booting systems with large initrd images. FEL is still useful for loading the U-Boot bootloader and a boot script, which may then activate DFU in the following way: setenv dfu_alt_info ${dfu_alt_info_ram} dfu 0 ram 0 bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} The rest of the files can be transferred to the device using the "dfu-util" tool. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* | vexpress64: store env in flashRyan Harkin2015-11-211-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for storing the environment in CFI NOR flash on Juno and FVP models. I also removed some config values that are not used by CFI flash parts. Juno has 1 flash part with 259 sectors. The first 255 sectors are 0x40000 (256kb) and are followed by 4 sectors of 0x10000 (64KB). FVP models simulate a 64MB NOR flash part at base address 0x0FFC0000. This part has 256 x 256kb sectors. We use the last sector to store the environment. To save the NOR flash to a file, the following parameters should be passed to the model: -C bp.flashloader1.fname=${FILENAME} -C bp.flashloader1.fnameWrite=${FILENAME} Foundation models don't simulate the NOR flash, but having NOR support in the u-boot binary does not harm: attempting to write to the NOR will fail gracefully. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
* | vexpress64: remove #errorRyan Harkin2015-11-211-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows vexpress64 targets to be compiled when CONFIG_SYS_FLASH_CFI is enabled. I considered using #warning instead of #error, but this just clutters up the build output and hides real warnings. Without this patch, you see errors during compilation like this: include/configs/vexpress_aemv8a.h:42:2: error: #error "Unknown board variant" #error "Unknown board variant" include/configs/vexpress_aemv8a.h:115:2: error: #error "Unknown board variant" #error "Unknown board variant" include/configs/vexpress_aemv8a.h:280:2: error: #error "Unknown board variant" #error "Unknown board variant" make[1]: *** [tools/envcrc.o] Error 1 make: *** [tools] Error 2 In file included from include/config.h:5:0, from tools/envcrc.c:19: Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
* | vexpress64: use 2nd DRAM bank only on junoRyan Harkin2015-11-211-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the 2nd DRAM bank available on Juno only and not on other vexpress64 targets, eg. the FVP models. The commit below added a 2nd bank of NOR flash for Juno, but also for all vexpress64 targets: commit 2d0cee1ca2b9d977fa3214896bb2e30cfec77059 Author: Liviu Dudau <Liviu.Dudau@foss.arm.com> Date: Mon Oct 19 11:08:31 2015 +0100 vexpress64: Juno: Declare all 8GB of RAM and make them visible to the kernel. Juno comes with 8GB RAM, but U-Boot only passes 2GB to the kernel. Declare a secondary memory bank and set the sizes correctly. Signed-off-by: Liviu Dudau <Liviu.Dudau@foss.arm.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Unfortunately, I only fully tested on Juno R0, R1 and the FVP Foundation model. Whilst FVP Base AEMV8 models run U-Boot OK, they fail to boot the kernel. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Acked-by: Liviu Dudau <liviu.dudau@foss.arm.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
* | eeprom: Add bus argument to eeprom_init()Marek Vasut2015-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add bus argument to eeprom_init(), so that it can select the I2C bus number on which the eeprom resides. Any negative value of the $bus argument will preserve the old behavior. This is in place so that old code does not randomly break. 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> [trini: Wrap i2c_set_bus_num() call with CONFIG_SYS_I2C test] Signed-off-by: Tom Rini <trini@konsulko.com>
* | eeprom: Zap eeprom_probe()Marek Vasut2015-11-211-3/+0
| | | | | | | | | | | | | | | | | | | | Remove this function as it's no longer used. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Cc: Heiko Schocher <hs@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
* | eeprom: Zap CONFIG_SYS_I2C_MULTI_EEPROMSMarek Vasut2015-11-2129-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This option only complicates the code unnecessarily, just use CONFIG_SYS_DEF_EEPROM_ADDR as the default address if there are only five arguments to eeprom {read/write} if this is defined. If CONFIG_SYS_DEF_EEPROM_ADDR is not defined, we mandate all six arguments. 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>
* | 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>
* | nios2: 10m50: change to ns16550 uartThomas Chou2015-11-211-0/+1
| | | | | | | | | | | | | | | | | | 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-21126-126/+0
| | | | | | | | | | | | 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-2113-30/+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-218-13/+14
| | | | | | | | | | | | | | | | 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-211-1/+2
| | | | | | | | | | | | | | | | 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-213-3/+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-211-1/+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>
* sandbox: Enable USB keyboardSimon Glass2015-11-191-1/+1
| | | | | | | 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-191-0/+20
| | | | | | | | | 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-191-0/+11
| | | | | | | 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>
* Revert "dm: Export device_remove_children / device_unbind_children"Simon Glass2015-11-191-26/+0
| | | | | | This reverts commit bb52b367f6ca4a3a918e77737f4ff6a1089912d9. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: usb: Allow finding a USB emulator for a deviceSimon Glass2015-11-191-0/+10
| | | | | | | | 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>
* 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-191-0/+8
| | | | | | | 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>
* sandbox: Enable console recording and silent consoleSimon Glass2015-11-191-0/+1
| | | | | | | 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-192-0/+28
| | | | | | | | | | | | | | | | | | | 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-191-0/+246
| | | | | | | | 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>
* Move console definitions into a new console.h fileSimon Glass2015-11-192-17/+30
| | | | | | | | 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>
* x86: qemu: Convert to use driver model keyboardBin Meng2015-11-191-1/+1
| | | | | | | 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-191-1/+1
| | | | | | | 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: Change LED state bits to conform i8042 compatible keyboardBin Meng2015-11-191-2/+2
| | | | | | | | | | | | 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: Convert 'keyboard' driver to use input librarySimon Glass2015-11-191-0/+5
| | | | | | | | | | This has duplicated scan code tables and logic. We can use the input library to implement most of the features here. This needs testing. The only supported board appears to be TQM5200. Unfortunately no maintainer is listed for this board. Signed-off-by: Simon Glass <sjg@chromium.org>
* input: Convert i8042 to driver modelSimon Glass2015-11-191-6/+0
| | | | | | | | | Adjust this driver to support driver model. The only users are x86 boards so this should be safe. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* Drop CONFIG_ISA_KEYBOARDSimon Glass2015-11-192-10/+0
| | | | | | | This option is mentioned but does not do anything. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: Add an i8042 device for boards that have itSimon Glass2015-11-195-8/+2
| | | | | | | | | | | | Some boards have an i8042 device. Enable the driver for all x86 boards, and add a device tree node for those which may have this keyboard. Also adjust the configuration so that i8042 is always separate from the VGA, and rename the stdin driver accordingly. With this commit the keyboard will not work, but it is fixed in the next commit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* input: Allow updating of keyboard LEDsSimon Glass2015-11-191-1/+13
| | | | | | | | Add a function which returns a new keyboard LED value when the LEDs need updating. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* input: Support the German keymapSimon Glass2015-11-191-1/+2
| | | | | | | | Add support for the German keymap, taken from i8042.c. This can be selected when the input library it initialised. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* sandbox: add a sandbox timer and basic testThomas Chou2015-11-191-0/+2
| | | | | | | | Add a sandbox timer which get time from host os and a basic test. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org>
* input: Allow repeat filtering to be disabledSimon Glass2015-11-191-0/+19
| | | | | | | | | | | | | Generally the input library handles processing of a list of scanned keys. Repeated keys need to be generated based on a timer in this case, since all that is provided is a list of keys current depressed. Keyboards which do their own scanning will resend codes when they want to inject a repeating key. Provide a function which tells the input library to accept repeating keys and not to try to second-guess the caller. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* input: Add a function to add a keycode to the existing setSimon Glass2015-11-191-0/+20
| | | | | | | | | | | | | | | | | | | | | | Most keyboards can be scanned to produce a list of the keycodes which are depressed. With the i8042 keyboard this scanning is done internally and only the processed results are returned. In this case, when a key is pressed, a 'make' code is sent. When the key is released a 'break' code is sent. This means that the driver needs to keep track of which keys are pressed. It also means that any protocol error can lead to stuck keys. In order to support this type of keyboard, add a function when can be used to provide a single keycode and either add it to the list of what is pressed or remove it from the list. Then the normal input_send_keycodes() function can be used to actually do the decoding work. Add debugging to display the ASCII characters written to the input queue also. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* video: Drop unused console functionsSimon Glass2015-11-194-4/+0
| | | | | | | | | | | | | | | | | | CONFIG_CONSOLE_CURSOR, CONFIG_SYS_CONSOLE_BLINK_COUNT and CONFIG_CONSOLE_TIME are not used by any board. The implementation is not great and stands in the way of a refactor of i8042. Drop these for now. They can be re-introduced quite easily later, perhaps with driver-model real-time-clock (RTC) support. When reintroducing, it might be useful to make a few changes: - Blink time would be more useful than blink count - The confusing #ifdefs should be avoided - The time functions should support driver model - It would be best keyed off console_tstc() or some similar idle loop rather than a particular input driver (i8042 in this case) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: tegra: Convert keyboard driver to driver modelSimon Glass2015-11-191-1/+0
| | | | | | | | Adjust the tegra keyboard driver to support driver model, using the new uclass. Make this the default for all Tegra boards so that those that use a keyboard will build correctly with this driver. Signed-off-by: Simon Glass <sjg@chromium.org>
* cros_ec: Use udevice instead of cros_ec_dev for keyboard functionsSimon Glass2015-11-191-2/+2
| | | | | | | In preparation for converting the cros_ec keyboard driver to driver model, adjust the cros_ec functions it will use to use a normal struct udevice. Signed-off-by: Simon Glass <sjg@chromium.org>
* input: Add the keycode translation tables separatelySimon Glass2015-11-191-0/+10
| | | | | | | | | Require the caller to add the keycode translation tables separately so that it can select which ones to use. In a later patch we will add the option to add German tables. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* input: Add a device pointer to the input configSimon Glass2015-11-191-0/+1
| | | | | | | | | | | | The read_keys() method in input is passed a struct input_config. Add a device pointer there so that we can find out the device that is referred to with driver model. Once all drivers are converted we can update the input structure to use driver model instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
OpenPOWER on IntegriCloud