summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drivers: clk: Add clock driver for Microchip PIC32 Microcontroller.Purna Chandra Mandal2016-02-014-0/+496
| | | | | | | | | | PIC32 clock module consists of multiple oscillators, PLLs, mutiplexers and dividers capable of supplying clock to various controllers on or off-chip. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* MIPS: initial infrastructure for Microchip PIC32 architecturePurna Chandra Mandal2016-02-016-0/+110
| | | | | | | | | Create initial directory, Kconfigs needed for PIC32 architecture support. Also add PIC32 specific register definition required for drivers. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* malta: Use I/O accessors for SuperI/O controllerPaul Burton2016-02-013-11/+11
| | | | | | | | | | Rather than passing the I/O port base address to the Super I/O code, switch it to using outb such that it makes use of the I/O port base address automatically. Drop the extern keyword to satisfy checkpatch whilst here. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
* malta: Set I/O port base earlyPaul Burton2016-02-011-4/+2
| | | | | | | Set the I/O port base earlier, from board_early_init_f, in preparation for it being used by the serial driver. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
* MIPS: Support dynamic I/O port base addressPaul Burton2016-02-015-34/+34
| | | | | | | | | | | | The existing mips_io_port_base variable isn't suitable for use early during boot since it will be stored in the .data section which may not be writable pre-relocation. Fix this by moving the I/O port base address into struct arch_global_data. In order to avoid adding this field for all targets, make this dependant upon a new Kconfig entry CONFIG_DYNAMIC_IO_PORT_BASE. Malta is the only board which sets a non-zero I/O port base, so select this option only for Malta. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
* MIPS: Remove SLOW_DOWN_IOPaul Burton2016-02-011-37/+3
| | | | | | | | | CONF_SLOWDOWN_IO is never set for any target, so remove the dead code in the SLOW_DOWN_IO macro. This is done in preparation for changes to mips_io_port_base which can be avoided in this path by removing it entirely. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
* mips: cache: Bulletproof the code against cornercasesMarek Vasut2016-02-011-0/+8
| | | | | | | | | | | | | | | | | | | This patch makes sure that the flush/invalidate_dcache_range() functions can handle corner-case calls like this -- invalidate_dcache_range(0, 0, 0); This call is valid and is happily produced by USB EHCI code for example. The expected behavior of the cache function(s) in this case is that they will do no operation, since the size is zero. The current implementation though has a problem where such invocation will result in a hard CPU hang. This is because under such conditions, where the start_addr = 0 and stop = 0, the addr = 0 and aend = 0xffffffe0 . The loop will then try to iterate over the entire address space, which in itself is wrong. But iterating over the entire address space might also hit some odd address which will cause bus hang. The later happens on the Atheros MIPS. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com>
* MIPS: start.S: fix and optimize instructionsDaniel Schwierzeck2016-02-011-11/+11
| | | | | | | | Fix 32 vs 64 bit load/store instructions. Access CP0_WATCHHI as 32 Bit register. Use 64 Bit register access for clearing gd_data and copying U-Boot. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* MIPS: initialize board_init_f() argument to zero.Purna Chandra Mandal2016-02-011-1/+1
| | | | | | | | | Argument boot_flags of board_init_f() should be set to 0 as $a0 may be utilized in lowlevel_init() or mips_cache_reset() or previous stage boot-loader. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* video: Correct 'tor' typo in commentSimon Glass2016-01-301-1/+1
| | | | | | This should be 'rot', not 'tor'. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: test: Add console tests for truetypeSimon Glass2016-01-301-0/+63
| | | | | | | This adds tests for the different character types, line wrap, scrolling and backspace. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: sandbox: Enable truetype fonts for sandboxSimon Glass2016-01-302-1/+22
| | | | | | | | Enable this feature so that truetype fonts can be used on the sandbox console. Update the tests to select the normal/rotated console when needed. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: sandbox: Allow selection of font size and console nameSimon Glass2016-01-302-0/+4
| | | | | | | | For testing it is useful to be able to select the font size and the console driver for sandbox. Add this information to platform data and copy it to the video device when needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Allow selection of the driver and font sizeSimon Glass2016-01-302-4/+21
| | | | | | | | | | | | Provide a way for the video console driver to be selected. This is controlled by the video driver's private data. This can be set up when the driver is probed so that it is ready for the video_post_probe() method. The font size is provided as well. The console driver may or may not support this depending on its capability. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* License: Add the Open Font LicenseSimon Glass2016-01-302-0/+98
| | | | | | | | | This is used by two of the font files. Add this license to permit tracking of this. The copyright text cannot be added to the .ttf files, so put it here. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: Add the Cantoraone decorative fontSimon Glass2016-01-304-0/+15
| | | | | | | This font is a little more ornate than normal. Example uses are on security screens where a feeling of formality is required. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Add the Rufscript handwriting fontSimon Glass2016-01-304-0/+14
| | | | | | | This can be used when a a friendly 'hand-writing' font is needed. It helps to make the device feel familiar. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Add the AnkaCoder mono-spaced fontSimon Glass2016-01-304-0/+17
| | | | | | | This can be used when a mono-space font is needed, but the console font is too small (such as with high-DPI displays). Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Add the Nimbus sans fontSimon Glass2016-01-304-0/+20
| | | | | | This provides a good-looking font for user prompts. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Add a console driver that uses TrueType fontsSimon Glass2016-01-306-2/+580
| | | | | | | | | | | | | | | | | | | The existing 8x16 font is adequate for most purposes. It is small and fast. However for boot screens where information must be presented to the user, the console font is not ideal. Common requirements are larger and better-looking fonts. This console driver can use TrueType fonts built into U-Boot, and render them at any size. This can be used in scripts to place text as needed on the display. This driver is not really designed to operate with the command line. Much of U-Boot expects a fixed-width font. But to keep things working correctly, rudimentary support for the console is provided. The main missing feature is support for command-line editing. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: Provide a backspace methodSimon Glass2016-01-302-1/+25
| | | | | | | | With proportional fonts the vidconsole uclass cannot itself erase the previous character. Provide an optional method so that the driver can handle this operation. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Provide a signal when a new console line is startedSimon Glass2016-01-302-0/+28
| | | | | | | When we start a new line (due to the user pressing return), signal this to the driver so that it can flush its buffer of character positions. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Provide a left margin for the text consoleSimon Glass2016-01-302-3/+5
| | | | | | | Allow the left margin to be set so that text does not have to be right up against the left side. On some panels this makes it hard to read. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Handle the 'bell' characterSimon Glass2016-01-302-1/+4
| | | | | | | This can be sent when to many characters are entered. Make sure it is ignored and does not cause a character to be displayed. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Use fractional units for X coordinatesSimon Glass2016-01-305-53/+137
| | | | | | | | | | | | | | With anti-aliased fonts we need a more fine-grained horizontal position than a single pixel. Characters can be positioned to start part-way through a pixel, with anti-aliasing (greyscale edges) taking care of the visual effect. To cope with this, use fractional units (1/256 pixel) for horizontal positions in the text console. Signed-off-by: Simon Glass <sjg@chromium.org> [agust: rebased] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video kconfig console_normalSimon Glass2016-01-303-4/+15
| | | | | | Signed-off-by: Simon Glass <sjg@chromium.org> [agust: rebased on current master] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* Makefile: Add rules to build in .ttf filesSimon Glass2016-01-301-0/+21
| | | | | | | | Add rules to allow TrueType files to be compiled into U-Boot for use on the video console. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* video: Add stb TrueType font rendererSimon Glass2016-01-301-0/+3240
| | | | | | | | | | | | This is a header file which provides a fairly light-weight TrueType rendering implementation. It is pulled from http://nothings.org/. The code style does not comply with U-Boot but I think it is best to leave alone to permit the source to be synced later if needed. The only change is to fix a reference to fabs() which should route through a macro to allow U-Boot to provide its own version. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-01-2944-868/+2630
|\
| * test/py: dfu: allow boardenv to specify test sizesStephen Warren2016-01-281-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow the env__dfu_configs boardenv data to specify the set of DFU transfer sizes to test. Manually specifying test sizes is useful if you wish to test multiple DFU configurations (e.g. SD card ext4 filesystem, SD card whole raw partition, RAM, etc.), but don't want to test every single transfer size on each, to avoid bloating the overall time taken by testing. If the boardenv doesn't specify a set of sizes, the built-in list is used as a default, preserving backwards-compatibility. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: fix a couple typos in commentsStephen Warren2016-01-281-2/+2
| | | | | | | | | | | | | | s/updata/update/. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test/py: run sandbox in source directoryStephen Warren2016-01-282-3/+7
| | | | | | | | | | | | | | | | Some unit tests expect the cwd of the sandbox process to be the root of the source tree. Ensure that requirement is met. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: pass test DTB to sandboxStephen Warren2016-01-281-1/+6
| | | | | | | | | | | | | | This is required for at least "ut dm" to operate correctly. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: correctly log xfail/xpass testsStephen Warren2016-01-283-24/+74
| | | | | | | | | | | | | | | | | | | | Tests can complete in passed, skipped, xpass, xfailed, or failed, states. Currently the U-Boot log generation code doesn't handle the xfailed or xpass states since they aren't used. Add support for the remaining states. Without this, tests that xfail end up being reported as skipped. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: detect another "bad pattern" in console outputStephen Warren2016-01-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Many error situations in U-Boot print the message: ### ERROR ### Please RESET the board ### Add this to the list of bad patterns the test system detects. One practical advantage of this change is to detect the case where sandbox is told to use a particular DTB file, and the file cannot be opened. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: check for bad patterns everywhere we waitStephen Warren2016-01-281-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, bad patterns are only honored when executing a shell command. Other cases, such as the initial boot-up of U-Boot or when interacting with command output rather than gathering all output prior to the shell prompt, do not currently look for bad patterns in console output. This patch makes sure that bad patterns are honored everywhere. One benefit of this change is that if U-Boot sandbox fails to start up, the error message it emits can be caught immediately, rather than relying on a (long) timeout when waiting for the expected signon message and/or command prompt. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test.py: calculate bad patterns on change onlyStephen Warren2016-01-281-24/+25
| | | | | | | | | | | | | | | | | | | | A future patch will use the bad_patterns array in multiple places. Rather than duplicating the code to calculate it, or even sharing it in a function and simply calling it redundantly when nothing has changed, only re-calculate the list when some change is made to it. This reduces work. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: fix spawn.expect multiple match handlingStephen Warren2016-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Multiple patterns may be passed to spawn.expect(). The pattern which matches at the earliest position should be designated as the match. This aspect works correctly. When multiple patterns match at the same position, priority should be given the the earliest entry in the list of patterns. This aspect does not work correctly. This patch fixes it. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/dm: clear unit test failure count each runStephen Warren2016-01-281-0/+2
| | | | | | | | | | | | | | | | | | | | The ut command prints a test failure count each time it is executed. This is stored in a global variable which is never reset. Consequently, the printed failure count accumulates across runs. Fix this by clearing the counter each time "ut" is invoked. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: Provide custom IDs when parametrizing testsStephen Warren2016-01-283-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When pytest generates the name for parametrized tests, simple parameter values (ints, strings) get used directly, but more complex values such as dicts are not handled. This yields test names such as: dfu[env__usb_dev_port0-env__dfu_config0] dfu[env__usb_dev_port0-env__dfu_config1] Add some code to extract a custom fixture ID from the fixture values, so that we end up with meaningful names such as: dfu[micro_b-emmc] dfu[devport2-ram] If the boardenv file doesn't define custom names, the code falls back to the old algorithm. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test/py: Quote consistencyStephen Warren2016-01-285-42/+42
| | | | | | | | | | | | | | | | | | | | | | When converting test/py from " to ', I missed a few places (or added a few inconsistencies later). Fix these. Note that only quotes in code are converted; double-quotes in comments and HTML are left as-is, since English and HTML use " not '. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test/py: use " for docstringsStephen Warren2016-01-2819-245/+245
| | | | | | | | | | | | | | | | | | | | | | Python's coding style docs indicate to use " not ' for docstrings. test/py has other violations of the coding style docs, since the docs specify a stranger style than I would expect, but nobody has complained about those yet:-) Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test/py: make net test aware of USB and PCI enumerationStephen Warren2016-01-281-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing net test executes a list of commands supplied by boardenv variable env__net_pre_commands. The idea was that boardenv would know whether the Ethernet device was attached to USB, PCI, ... and hence was the best place to put any commands required to probe the device. However, this approach doesn't scale well when attempting to use a single boardenv across multiple branches of U-Boot, some of which require "pci enum" to enumerate PCI and others of which don't, or don't /yet/ simply because various upstream changes haven't been merged down. This patch updates the test to require that the boardenv state which HW features are required for Ethernet to work, and lets the test itself map that knowledge to the set of commands to execute. Since this mapping is part of the test script, which is part of the U-Boot code/branch, this approach is more scalable. It also feels cleaner, since again boardenv is only providing data, rather than test logic. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * distro bootcmd: enumerate PCI before network operationsStephen Warren2016-01-282-0/+20
| | | | | | | | | | | | | | | | | | The PCI bus must be enumerated before PCI devices, such as Ethernet devices, are known to U-Boot. Enhance the distro boot commands to perform PCI enumeration when needed. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * distro bootcmd: make net boot only optionally start USBStephen Warren2016-01-282-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the distro boot commands always enumerate USB devices before performing network operations. However, depending on the board and end- user configuration, network devices may not be attached to USB, and so enumerating USB may not be necessary. Enhance the scripts to make this step optional, so that the user can decrease boot time if they don't need USB. This change is performed by moving the "usb start" invocation into a standalone variable. If the user desires, they can replace that variable's value with some no-op command such as "true" instead. Booting from a USB storage device always needs to enumerate USB devices, so this action is still hard-coded. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * Implement "pci enum" command for CONFIG_DM_PCIStephen Warren2016-01-282-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With CONFIG_DM_PCI enabled, PCI buses are not enumerated at boot, as they are without that config option enabled. No command exists to enumerate the PCI buses. Hence, unless some board-specific code causes PCI enumeration, PCI-based Ethernet devices are not detected, and network access is not available. This patch implements "pci enum" in the CONFIG_DM_PCI case, thus giving a mechanism whereby PCI can be enumerated. do_pci()'s handling of case 'e' is moved into a single location before the dev variable is assigned, in order to skip calculation of dev. The enum sub-command doesn't need the dev value, and skipping its calculation avoids an irrelevant error being printed. Using a command to initialize PCI like this has a disadvantage relative to enumerating PCI at boot. In particular, Ethernet devices are not probed during PCI enumeration, but only when used. This defers setting variables such as ethact, ethaddr, etc. until the first network-related command is executed. Hopefully this will not cause further issues. Perhaps in the long term, we need a "net start/enum" command too? Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * test/py: dfu: error out if USB device already existsStephen Warren2016-01-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DFU test requests U-Boot configure its USB controller in device mode, then waits for the host machine to enumerate the USB device and create a device node for it. However, this wait can be fooled if the USB device node already exists before the test starts, e.g. if some previous software stack already configured the USB controller into device mode and never de-configured it. This "previous software stack" could even be another test/py test, if U-Boot's own USB teardown does not operate correctly. If this happens, dfu-util may be run before U-Boot is ready to serve DFU commands, which may cause false test failures. Enhance the dfu test to fail if the device node exists before it is expected to. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * ARM: tegra: shut down USB device controller at bootStephen Warren2016-01-282-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When loading U-Boot into RAM over USB protocols using tools such as tegrarcm or L4T's exec-uboot.sh/tegraflash.py, Tegra's USB device mode controller is initialized and enumerated by the host PC running the tool. Unfortunately, these tools do not shut down the USB controller before executing the downloaded code, and so the host PC does not "de-enumerate" the USB device. This patch implements optional code to shut down the USB controller when U-Boot boots to avoid leaving a stale USB device present. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test/py: make crash detection more robustStephen Warren2016-01-281-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test/py contains logic to detect the target crashing and rebooting by searching the console output for a U-Boot signon message, which will presumably be emitted when the system boots after the crash/reset. Currently, this logic only searches for the exact signon message that was printed by the U-Boot version under test, upon the assumption that binary is written into flash, and hence will be the version booted after any reset. However, this is not a valid assumption; some test setups download the U-Boot-under-test into RAM and boot it from there, and in such a scenario an arbitrary U-Boot version may be located in flash and hence run after any reset. Fix the reset detection logic to match any U-Boot signon message. This prevents false negatives. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * dm: Remove device_probe_child()Simon Glass2016-01-282-21/+1
| | | | | | | | | | | | | | | | | | This function is not used as the use case for it did not eventuate. Remove it to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
OpenPOWER on IntegriCloud