summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * arm: ls1021atwr: Enable driver model lpuart serial driverBin Meng2016-01-20-1/+21
| | | | | | | | | | | | | | | | | | | | | | Convert ls1021atwr_nor_lpuart to driver model support. As a start, enable lpuart serial port driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alison Wang <alison.wang@nxp.com> Tested-by: Alison Wang <alison.wang@nxp.com> Acked-by: Simon Glass <sjg@chromium.org>
| * arm: ls1021atwr: Split off board device treeBin Meng2016-01-20-6/+21
| | | | | | | | | | | | | | Move /chosen node out of the board device tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * serial: lpuart: Add driver model serial supportBin Meng2016-01-20-1/+167
| | | | | | | | | | | | | | | | This adds driver model support to lpuart serial driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Tested-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
| * serial: lpuart: Prepare the driver for DM conversionBin Meng2016-01-20-22/+66
| | | | | | | | | | | | | | | | | | Create internal routines which take lpuart's register base as a parameter, in preparation for driver model conversion. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * serial: lpuart: Call local version of setbrg and putc directlyBin Meng2016-01-20-4/+4
| | | | | | | | | | | | | | | | | | There is no need to go through serial driver subsystem, instead call the driver's setbrg and putc routines directly. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * serial: lpuart: Fix several cosmetic issuesBin Meng2016-01-20-20/+15
| | | | | | | | | | | | | | | | | | | | | | Clean up the driver codes a little bit, by: - Use tab instead of space in the macro defines - Use single line comment whenever possible - Fix insertion of blank lines Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * serial: lpuart: Move CONFIG_FSL_LPUART to KconfigBin Meng2016-01-20-5/+14
| | | | | | | | | | | | | | | | | | | | | | LPUART is seen on Freescale VF610 and QorIQ Layerscape devices. Create a Kconfig option and move it to defconfig for all boards that have this serial driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Simon Glass <sjg@chromium.org>
| * arm: ls1021atwr: Convert to driver model and enable serial supportBin Meng2016-01-20-4/+10
| | | | | | | | | | | | | | | | Convert ls1021atwr_nor to driver model support. As a start, enable ns16550 serial port driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * Revert "fdt_support: Add multi-serial support for stdout fixup"Bin Meng2016-01-20-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3e303f748cf57fb23e8ec95ab7eac0074be50e2b. The fix up in the /aliases node does not work under the following scenarios: - Not every non-DM serial driver was written to have a driver name that conforms the format of "serial%d" or "eserial%d". - With driver model serial, the stdio_devices[] stores the serial device node name in the device tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: add a test for the sleep commandStephen Warren2016-01-20-0/+24
| | | | | | | | | | | | | | | | Execute "sleep", and validate that it sleeps for approximately the correct amount of time. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: test the ums commandStephen Warren2016-01-20-0/+94
| | | | | | | | | | | | | | | | | | This test invokes the "ums" command in U-Boot, and validates that a USB storage device is enumerated on the test host system, and can be read from. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: test the shell if commandStephen Warren2016-01-20-116/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate all most tests from command_ut.c into the Python test system. This allows the tests to be run against any U-Boot binary that supports the if command (i.e. where hush is enabled) without requiring that binary to be permanently bloated with the code from command_ut. Some tests in command_ut.c can only be executed from C code, since they test internal (more unit-level) features of various U-Boot APIs. The migrated tests can all operate directly from the U-Boot console. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: add test of basic shell functionalityStephen Warren2016-01-20-16/+42
| | | | | | | | | | | | | | | | | | | | | | This tests whether the following features of the U-Boot shell: - Execution of a directly entered command. - Compound commands (; delimiter). - Quoting of arguments containing spaces. - Executing commands from environment variables. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: test the md/mw commandsStephen Warren2016-01-20-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | This tests whether md/mw work, and affect each-other. Command repeat is also tested. test/cmd_repeat.sh is removed, since the new Python-based test does everything it used to. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: add test of setenv/printenv/echoStephen Warren2016-01-20-4/+221
| | | | | | | | | | | | | | | | This tests basic environment variable functionality. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: test that sandbox exits when askedStephen Warren2016-01-20-0/+24
| | | | | | | | | | | | | | | | | | Test the sandbox port's implementation of the reset command and SIGHUP handling. These should both cause the U-Boot process to exit gracefully. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: Implement pytest infrastructureStephen Warren2016-01-20-0/+2090
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tool aims to test U-Boot by executing U-Boot shell commands using the console interface. A single top-level script exists to execute or attach to the U-Boot console, run the entire script of tests against it, and summarize the results. Advantages of this approach are: - Testing is performed in the same way a user or script would interact with U-Boot; there can be no disconnect. - There is no need to write or embed test-related code into U-Boot itself. It is asserted that writing test-related code in Python is simpler and more flexible that writing it all in C. - It is reasonably simple to interact with U-Boot in this way. A few simple tests are provided as examples. Soon, we should convert as many as possible of the other tests in test/* and test/cmd_ut.c too. The hook scripts, relay control utilities, and udev rules I use for my own HW setup are published at https://github.com/swarren/uboot-test-hooks. See README.md for more details! Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Tested-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> #v3
| * patman: Add --thread optionMateusz Kulikowski2016-01-20-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add option to create threaded series of patches. With it, it will be possible to create patch threads like this: [PATCH 0/10] Add support for time travel [PATCH 1/10] Add Flux Capacitor driver [PATCH 2/10] Add Mr. Fusion driver (...) Internally it will call git send-email with --thread option Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * clk: add API to enable clockMasahiro Yamada2016-01-20-0/+28
| | | | | | | | | | | | | | | | The most basic thing for clock is to enable it, but it is missing in this uclass. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * clk: add static qualifier to local functionsMasahiro Yamada2016-01-20-4/+5
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * clk: add needed include and declaration to include/clk.hMasahiro Yamada2016-01-20-0/+4
| | | | | | | | | | | | | | | | This header uses ulong, so it needs to include <linux/types.h>. Likewise, "struct udevice" must be declared before it is used. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * clk: fix comments in include/clk.hMasahiro Yamada2016-01-20-10/+10
| | | | | | | | | | | | | | | | | | | | The comment about get_periph_rate() is the same as that of set_periph_rate(). I am fixing typos here and there while I am in this file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * clk: move Kconfig options into sub-menuMasahiro Yamada2016-01-20-0/+4
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * usb: Define USB_MAX_STOR_DEV in only one placeSimon Glass2016-01-20-1/+0
| | | | | | | | | | | | | | | | We can define this in the header file and use it in usb_storage.c. There is no need to define it twice. Remove the #define from usb_storage.c. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
| * timer: sandbox: work without device treeStephen Warren2016-01-20-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default invocation of sandbox U-Boot apparently uses no device tree, which means that no timer is registers, which in turn means that the sleep shell command hangs. Fix the sandbox timer code to register a device when there's no DT, just like e.g. the sandbox reset driver does. When there's no DT, the DM uclass can't initialize clock_rate from DT, so set a default value in the timer code instead. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * dm: timer: refuse timers with zero clock_rateStephen Warren2016-01-20-0/+11
| | | | | | | | | | | | | | | | | | If a timer has a zero clock_rate, get_tbclk() will return zero for it, which will cause tick_to_time() to perform a division-by-zero, which will crash U-Boot. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * bzip2: Support compression for sandboxSimon Glass2016-01-20-0/+1852
| | | | | | | | | | | | | | | | | | | | | | Add the missing code to allow bzip2 compression to be used. This is useful for sandbox tests. These files are taken from the bzip2 1.0.6 release. The license text is copied to the top of each file as is done with other bzip2 files in U-Boot. The only other change is to squash a compiler warning with nBytes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
| * dm: core: Call uclass post_bind() after the driver's bind() methodSimon Glass2016-01-20-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the uclass's post_bind() method is called before the driver's bind() method. This means that the uclass cannot use any of the information set up by the driver. Move it later in the sequence to permit this. This is an ordering change which is always fairly major in nature. The main impact is that devices which have children will not see them appear in their bind() method. From what I can see, existing drivers do not look at their children in the bind() method, so this should be safe. Conceptually this change seems to result in a 'more correct' ordering, since the uclass (which is broader than the device) gets the last word. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
| * sandbox: Support the bmp commandSimon Glass2016-01-20-5/+8
| | | | | | | | | | | | | | | | Adjust this command to use map_sysmem() correctly so that it works on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
| * tiny-printf: Always print zeroesSimon Glass2016-01-20-4/+12
| | | | | | | | | | | | | | | | | | At present this does not print zero values in numeric format (hex and decimal). Add a special case for this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
| * pinctrl: Avoid binding all pinconfig nodes before relocationSimon Glass2016-01-20-0/+4
| | | | | | | | | | | | | | | | This can create a large number of pinctrl devices. It chews up early malloc() memory and takes time. Only bind those which are marked as needed before relocation. Signed-off-by: Simon Glass <sjg@chromium.org>
| * i2c: Correct command return valuesSimon Glass2016-01-20-2/+4
| | | | | | | | | | | | | | | | | | We should not return a -ve error code from command functions. Instead, return CMD_RET_FAILURE. This avoids the "exit not allowed from main input shell" error messages from the hush shell. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
| * dm: mmc: Try to honour the sequence orderSimon Glass2016-01-20-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | At present we add driver-model MMC devices in the order we find them. The 'alias' order is not honoured. It is difficult to fix this for the case where we have holes in the sequence. But for the common case where the devices are numbered from 0 without any gaps, we can add the devices to the internal data structures in this order. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: gpio: Allow the uclass to work without printf()Simon Glass2016-01-20-0/+8
| | | | | | | | | | | | | | For SPL we don't really need sprintf() and with tiny-printf this is not available. Allow this to be dropped in SPL when using tiny-printf. Signed-off-by: Simon Glass <sjg@chromium.org>
| * tiny-printf: Avoid printing NULL stringsSimon Glass2016-01-20-2/+4
| | | | | | | | | | | | | | Add a check for NULL strings to avoid printing junk to the console. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
| * defconfig: dra74_evm: enable timer driver modelMugunthan V N2016-01-20-0/+2
| | | | | | | | | | | | | | | | Enable timer driver model for dra74_evm_defconfig as omap-timer supports driver model. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * arm: dts: dra7-evm: add tick-timer to chosen nodeMugunthan V N2016-01-20-0/+1
| | | | | | | | | | | | | | Specify timer2 to be used as tick-timer in chosen node. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * defconfig: dra72_evm: enable timer driver modelMugunthan V N2016-01-20-0/+2
| | | | | | | | | | | | | | | | Enable timer driver model for dra72_evm_defconfig as omap-timer supports driver model. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * arm: dts: dra72-evm: add tick-timer to chosen nodeMugunthan V N2016-01-20-0/+1
| | | | | | | | | | | | | | Specify timer2 to be used as tick-timer in chosen node. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * ti_omap5_common: timer: do not define CONFIG_TIMER for splMugunthan V N2016-01-20-0/+1
| | | | | | | | | | | | | | | | Since OMAP's spl doesn't support DM currently, do not define CONFIG_TIMER for spl build. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * defconfig: am335x_gp_evm: enable timer driver modelMugunthan V N2016-01-20-0/+2
| | | | | | | | | | | | | | | | Enable timer driver model for am335x_gp_evm as omap-timer supports driver model. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * arm: dts: am335x-evm: add tick-timer to chosen nodeMugunthan V N2016-01-20-0/+1
| | | | | | | | | | | | | | Specify timer2 to be used as tick-timer in chosen node. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * defconfig: am335x_boneblack_vboot: enable timer driver modelMugunthan V N2016-01-20-0/+2
| | | | | | | | | | | | | | | | Enable timer driver model for am335x_boneblack_vboot as omap-timer supports driver model. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * arm: dts: am335x-boneblack: add tick-timer to chosen nodeMugunthan V N2016-01-20-0/+1
| | | | | | | | | | | | | | Specify which timer to be used as tick-timer in chosen node. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * am335x_evm: timer: do not define CONFIG_TIMER for splMugunthan V N2016-01-20-0/+1
| | | | | | | | | | | | | | | | Since OMAP's spl doesn't support DM currently, do not define CONFIG_TIMER for spl build. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * defconfig: am437x_gp_evm: enable timer driver modelMugunthan V N2016-01-20-0/+2
| | | | | | | | | | | | | | | | Enable timer driver model for am437x_gp_evm as omap-timer supports driver model. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * arm: dts: am437x-gp-evm: add tick-timer to chosen nodeMugunthan V N2016-01-20-0/+1
| | | | | | | | | | | | | | Specify which timer to be used as tick-timer in chosen node. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * defconfig: am437x_sk_evm: enable timer driver modelMugunthan V N2016-01-20-0/+2
| | | | | | | | | | | | | | | | Enable timer driver model for am437x_sk_evm as omap-timer supports driver model. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * arm: dts: am437x-sk-evm: add tick-timer to chosen nodeMugunthan V N2016-01-20-0/+1
| | | | | | | | | | | | | | Specify which timer to be used as tick-timer in chosen node. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * am43xx_evm: timer: do not define CONFIG_TIMER for splMugunthan V N2016-01-20-0/+1
| | | | | | | | | | | | | | | | Since OMAP's spl doesn't support DM currently, do not define CONFIG_TIMER for spl build. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>