aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-08-10configs: omap: Remove dead config CONFIG_SYS_NAND_ADDRAdam Ford13-27/+0
CONFIG_SYS_NAND_ADDR is defined and never referenced. This patch removes the dead code. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-08-10doc: README.iscsi: make compatible with restructured textHeinrich Schuchardt1-62/+68
The Sphinx documentation system uses restructured text. Make the README.iscsi file compatible. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-08-10doc: add structure to Sphinx generated docsHeinrich Schuchardt5-115/+132
Create separate html pages for linker lists, the serial subsystem, and the EFI subsystem. Add a table of content. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-08-10README: U_BOOT_ENV_CALLBACK functionsHeinrich Schuchardt1-0/+11
Describe the interface of environment variable callback functions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-08-10drivers: serial: document on_baudrate()Heinrich Schuchardt1-0/+8
Add parameter description. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-08-10omap3_logic: Fix CONS_INDEXAdam Ford1-1/+1
The console index for SPL should be 1 not 3 in order to see text during SPL. Fixes: 6f6b7cfa89e5 ("Convert all of CONFIG_CONS_INDEX to Kconfig") Signed-off-by: Adam Ford <aford173@gmail.com>
2018-08-10sata: fix sata_Probe return value checkTroy Kisky1-2/+2
sata_probe returns 1 for failure, so don't checkout for < 0 fixes: f19f1ecb6025 dm: sata: Support driver model with the 'sata' command Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-10sandbox: led: use new function to configure default statePatrick Delaunay3-1/+14
Initialize the led with the default state defined in device tree in board_init and solve issue with test for led default state. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-08-10stm32mp1: use new function led default statePatrick Delaunay1-0/+4
Initialize the led with the default state defined in device tree. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-08-10dm: led: move default state support in led uclassPatrick Delaunay3-8/+39
This patch save common LED property "default-state" value in post bind of LED uclass. The configuration for this default state is only performed when led_default_state() is called; It can be called in your board_init() or it could added in init_sequence_r[] in future. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-08-10Revert "dm: led: auto probe() LEDs with "default-state""Patrick Delaunay1-9/+0
This reverts commit bc882f5d5c7b4d6ed5e927bf838863af43c786e7. because this patch adds the probe of LED driver during the binding phasis. It is not allowed in driver model because the drivers (clock, pincontrol) needed by the LED driver can be also probed before the binding of all the device and it is a source of problems. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-08-10stm32mp1: add gpio led supportPatrick Delaunay2-0/+26
This patch add the 4 LED available on the ED1 board and activated gpio led driver. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-08-10Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini5-33/+257
2018-08-09bcm968380gerg: Add MAINTAINERS fileTom Rini1-0/+6
Add an initial MAINTAINERS file based on author of the code. Cc: Philippe Reynes <philippe.reynes@softathome.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2018-08-09Merge git://git.denx.de/u-boot-dmTom Rini16-280/+797
2018-08-08Merge branch 'master' of git://git.denx.de/u-boot-mipsTom Rini47-5483/+291
2018-08-08dfu: Provide more verbose error messageSam Protsenko1-0/+1
It might be useful for user to see some human-readable root cause message in addition to "configuration failed" message, so that the issue can be fixed quickly. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2018-08-08dfu: Fix memory leak in dfu_init_env_entities()Sam Protsenko1-3/+4
In case of error in dfu_init_env_entities(), env_bkp will leak. Fix it by providing single return path. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2018-08-08dfu: Fix data abort in dfu_free_entities()Sam Protsenko1-1/+1
Commit 5d8fae79163e ("dfu: avoid memory leak") brings a regression which described below. This patch is effectively reverting that commit, adding corresponding comment to avoid such regressions in future. In case of error in dfu_config_entities(), it frees "dfu" array, which leads to "data abort" in dfu_free_entities(), which tries to free the same array (and even tries to access it from linked list first). The issue occurs e.g. when partition table on device does not match $dfu_alt_info layout: => dfu 0 mmc 1 Couldn't find part #2 on mmc device #1 DFU entities configuration failed! data abort To fix this issue, do not free "dfu" array in dfu_config_entities(). It will be freed later in dfu_free_entities(). Tested on BeagleBone Black (where this regression was originally found). Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2018-08-08usb: rockchip: on K_FW_LBA_WRITE_10 remove magic block size of 512 bytesAlberto Panizzo1-18/+21
As well as in K_FW_LBA_READ_10 and K_FW_LBA_ERASE_10 take device's block size from f_rkusb->desc->blksz instead of the fixed 512 bytes. Keep original behaviour of retry probing assigned block device on every host request to manage late SDCard plugs. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08usb: rockchip: fix printing csw debug infoAlberto Panizzo1-1/+1
Workstation tool was happy while console on device were printing random numbers.. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08usb: rockchip: be quiet on serial port while transferring dataAlberto Panizzo1-2/+2
While downloading or uploading megabytes of data we had thousands of printf in console like: transfer 0x10000 bytes done OR Uploading 0x1000 bytes This because transfers are chunked and there is no way on target side to know the overall transfer size (to print one string per overall transfer). All these prints on serial console do slow down significantly the transfer and does not offer a significant information to the developer: rkdeveloptool and Rockchip original tool do use small chunks read/writes on big transfers. This allows on workstation to print percentage of transfer complete and as well offers to developer the information about: transfer is running OK. On error, either the percentage will stop or an error will be shown on workstation console. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08usb: rockchip: implement K_FW_LBA_ERASE_10 commandAlberto Panizzo3-0/+50
This command is part of the write partition sequence performed by rkdeveloptool: one partition is first completely erased and than wrote. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08usb: rockchip: implement K_FW_LBA_READ_10 commandAlberto Panizzo3-1/+107
This patch implement reading blocks form selected device with LBA addressing. Corresponding command on workstation is: rkdeveloptool rl <start_blk> <blk_cnt> <file> While we support reading more than one blocks per K_FW_LBA_READ_10 request, rkdeveloptool and original rockchip tool do perform chunk reads limiting the maximum size per chunk far lower than max int values. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08usb: rockchip: implement skeleton for K_FW_GET_CHIP_VER commandAlberto Panizzo2-4/+49
Chip Version is a string saved in BOOTROM address space Little Endian. Ex for rk3288: 0x33323041 0x32303134 0x30383133 0x56323030 which brings: 320A20140813V200 Note that memory version do invert MSB/LSB so printing the char buffer would show: A02341023180002V Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08usb: rockchip: fix command failed on host side due to missing dataAlberto Panizzo1-2/+20
Two consecutive rockusb_tx_write without waiting for request complete do results in transfer reset of first request and thus no or incomplete data transfer. This because rockusb_tx_write do use just one USB request to keep serialization. So calls like: rockusb_tx_write_str(emmc_id); rockusb_tx_write_csw(cbw->tag, cbw->data_transfer_length, CSW_GOOD); was succeeding only when DEBUG was defined because the time spent printing debug info was enough for transfer to complete. This patch fixes the issue adding a simple request complete handler called rockusb_tx_write_csw to be set as complete handler of in_req when sending back simple payload + CSW replies to commands. This new handler will always send CSW_GOOD replies because in case of error the command callback itself must send back an error CSW as unique reply to command. This patch fixes execution of: $ rkdeveloptool rfi when DEBUG is not defined. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08gadget: f_thor: fix hang-up with ctrl-cSeung-Woo Kim1-2/+2
After the commit 6aae84769a0b ("gadget: f_thor: Fix memory leaks of usb request and its buffer"), there is hang-up with ctrl-c in some udc. It is because req of out_ep is freed before out_ep is disabled. Fix hang-up with ctrl-c by disabling ep before free req of the ep. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2018-08-08patman: Correct unit test failureSimon Glass1-0/+0
A recent rename of the function did not rename the test file. Fix this. Fixes: 12308b128fa (lib: fdtdec: Rename routine fdtdec_setup_memory_size()) Signed-off-by: Simon Glass <sjg@chromium.org>
2018-08-08libfdt: Update to latest pylibfdt implementationSimon Glass3-227/+241
The enhanced pylibfdt support in U-Boot needed for binman was a placeholder while upstreaming of this work continued. This is now complete, so bring in the changes and update the tools as needed. There are quite a few changes since we decided to split the implementation into three fdt classes instead of two. The Fdt.del_node() method was unfortunately missed in this process and will be dealt with later. It exists in U-Boot but not upstream. Further syncing of libfdt probably needs to wait until we assess the code-size impact of all the new checking code on SPL and possibly provide a way to disable it. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Add cases for finding PCI capability APIsBin Meng3-0/+61
Add several PCI capability and extended capability ID registers in the swap_case driver, so that we can add test case for dm_pci_find_capability() and dm_pci_find_ext_capability(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08dm: pci: Add APIs to find capability and extended capabilityBin Meng2-0/+114
This introduces two new APIs dm_pci_find_capability() and dm_pci_find_ext_capability() to get PCI capability address and PCI express extended capability address for a given PCI device. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08pci: Add all known capability and extended capability idsBin Meng1-1/+19
Currently we don't have a complete list of capability and extended capability ids. This adds them. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Add tests for mixed static and dynamic devices on the same busBin Meng2-0/+81
In the Sandbox test configuration, PCI bus#0 only has static devices while bus#1 only has dynamic devices. Create a bus#2 that has both types of devices and test such. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08pci: sandbox: emul: Rename priv structureBin Meng1-4/+4
We have "struct sandbox_pci_priv" in pci_sandbox driver. To avoid confusion, rename the emul's priv to "struct sandbox_pci_emul_priv". Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Test driver binding with driver data providedBin Meng1-0/+17
With struct pci_device_id, it's possible to pass a driver data for bound driver to use. This adds a test case for this functionality. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08sandbox: Update test.dts for dynamic PCI device driver matchingBin Meng1-14/+2
At present we have two PCI buses in the test configuration. Both buses have static device-tree config devices. Now we switch the 2nd bus to use dynamic PCI devices for testing. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08pci: sandbox: swap_case: Declare dynamic driver matchingBin Meng2-0/+11
This adds a U_BOOT_PCI_DEVICE() declaration to the swap_case driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08pci: sandbox: Support dynamically binding device driverBin Meng4-11/+112
At present all emulated sandbox pci devices must be present in the device tree in order to be used. The real world pci uclass driver supports pci device driver matching, and we should add such support on sandbox too. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08dm: pci: Assign correct driver data when binding a driverBin Meng1-1/+1
The correct driver data comes from the matching 'id' instead of 'find_id' in pci_find_and_bind_driver(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08pci: sandbox: emul: Fix the call to pci_bus_find_devfn()Bin Meng1-1/+1
With the newly added test cases for PCI configuration access, we get: => ut dm pci_busdev Test: dm_test_pci_busdev: pci.c test/dm/pci.c:49, dm_test_pci_busdev(): SANDBOX_PCI_VENDOR_ID == vendor: Expected 4660, got 65535 Test: dm_test_pci_busdev: pci.c (flat tree) test/dm/pci.c:49, dm_test_pci_busdev(): SANDBOX_PCI_VENDOR_ID == vendor: Expected 4660, got 65535 Failures: 2 The bug only shows up when bus number is not equal to zero. This is caused by the plain find_devfn parameter is passed to function call pci_bus_find_devfn(), inside which find_devfn is compared to devfn in the device's pplat structure. However pplat->devfn does not carry the bus number. Fix this by passing find_devfn with bus number masked. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Add tests for configuration space accessBin Meng1-9/+15
So far we missed the testing for PCI configuration space access. This adds tests for it, as well as removing some redundant asserts. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Test more than one PCI host controllerBin Meng2-2/+37
So far there is only one PCI host controller in the sandbox test configuration. This is normally the case for x86, but it can be common on other architectures like ARM/PPC to have more than one PCI host controller in the system. This updates the case to cover such scenario. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08pci: sandbox: swap_case: Preserve space indicator bit in BAR registersBin Meng1-3/+5
With the newly added testing of more than one device, we get: => ut dm pci_swapcase Test: dm_test_pci_swapcase: pci.c test/dm/pci.c:88, dm_test_pci_swapcase(): "tHIS IS A tESt" = ptr: Expected "tHIS IS A tESt", got "this is a test" Test: dm_test_pci_swapcase: pci.c (flat tree) test/dm/pci.c:88, dm_test_pci_swapcase(): "tHIS IS A tESt" = ptr: Expected "tHIS IS A tESt", got "this is a test" Failures: 2 The failure only happens on the 2nd swap_case device on the PCI bus. The case passes on the 1st device. It turns out the swap_case driver does not emulate bit#0 in BAR registers as a read-only bit. This corrects the implementation. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Test more than one device on the same busBin Meng2-4/+40
It's quite common to have more than one device on the same PCI bus. This updates the test case to test such scenario. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08test: dm: pci: Remove unnecessary steps in dm_test_pci_swapcase()Bin Meng1-3/+1
The check on uclass_get_device() and device_active() is unnecessary as the follow-up test operations will implicitly probe the driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08dm: pci: Fix scanning multi-function deviceBin Meng1-0/+2
The flag to control whether to scan multi-function device during enumeration should be cleared at the beginning of each iteration if the device's function number equals to zero. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08dm: pci: Extract vendor/device id in child_post_bind()Bin Meng1-6/+5
Currently only devfn is extracted in child_post_bind(). Now that we have the live-tree version API to look up PCI vendor and device id from the compatible string, let's extract and save them too. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08dm: core: Add ofnode function to read PCI vendor and device idBin Meng2-0/+49
We don't have the live-tree version of fdtdec_get_pci_vendev(). This adds the API. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08dm: Correct typos in uclass_first/next_device_check()Bin Meng1-2/+2
Correct typos in the comment block of uclass_first/next_device_check(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08pci: Remove 440ep-specific macrosBin Meng1-15/+0
These macros should not be put in the generic pci.h header file. Since they are not referenced anywhere, remove them completely. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>