aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-05-08Merge git://git.denx.de/u-boot-dmTom Rini67-649/+1743
2015-05-08git-mailrc: add Dinh Nguyen as a contact for SoCFPGADinh Nguyen1-1/+1
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
2015-05-07git-mailrc: add Marek as SOCFPGA maintainerMasahiro Yamada1-0/+1
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-07ARM: socfpga: abolish CONFIG_SOCFPGAMasahiro Yamada3-4/+2
Replace CONFIG_SOCFPGA with CONFIG_ARCH_SOCFPGA. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-07ARM: socfpga: move SoC headers to mach-socfpga/include/machMasahiro Yamada13-0/+0
Move headers to mach-socfpga as well. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-07ARM: socfpga: move SoC sources to mach-socfpgaMasahiro Yamada14-2/+2
Our recent trend is to collect SoC files into arch/arm/mach-(SOC). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-07ARM: socfpga: move board select into mach-socfpga/KconfigMasahiro Yamada6-42/+34
Switch to a more standard way of board select; put the SoC select into arch/arm/Kconfig and move the board select menu under arch/arm/mach-socfpga/Kconfig. Also, consolidate SYS_BOARD, SYS_VENDOR, SYS_SOC, SYS_CONFIG_NAME. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-07ARM: socfpga: remove redundant config.mkMasahiro Yamada1-8/+0
Because all the SOCFPGA boards define CONFIG_SPL_FRAMEWORK (see include/configs/socfpga_common.h), u-boot.img is automatically added to the target image list by the top Makefile. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-07ARM: socfpga: do not add board directory to header search pathMasahiro Yamada2-4/+1
The compiler option "-Iboard/$(VENDOR)/$(BOARD)" just exists here for iocsr_config.c to be able to include iocsr_config.h. Use "..." instead of <...> to include a header in the same directory. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-06dm: sf: Update default name of spi flash in structure udeviceHaikun.Wang@freescale.com1-2/+2
Default name of spi flash like this "0:0", update it to "spi_flash@0:0". Signed-off-by: Haikun Wang <haikun.wang@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-06dm: usb: exynos: Drop legacy USB codeSimon Glass4-229/+0
Drop the code that doesn't use driver model for USB. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-06sandbox: Enable time unit test commandSimon Glass1-0/+1
Enable this command for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-06test: Add a simple time testSimon Glass3-0/+146
Sometimes the time functions are incorrect due to bad time support on a board. Add a unit test which tries to detect this. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-06sandbox: Don't try distro_bootcmd by defaultSjoerd Simons3-3/+20
For the distro_bootcmds to succeed on the sandbox a bit of setup is required (e.g. network configured or host image bound), so running them by default isn't that useful. Add a -b/--boot command to the sandbox binary, which triggers the distro_bootcmds to run after the other command-line commands. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-06usb: ohci: Don't log an error on interrupt packet timeoutHans de Goede1-1/+2
Interrupts transfers timing out is normal, so do not log an error for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-06usb: ohci: Add proper cache flushing / invalidating for non cache coherent cpusHans de Goede2-5/+84
Add proper cache flushing / invalidating for non cache coherent cpus, for now only enable this for new (driver-model) usb code to avoid regressions. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
2015-05-06usb: ohci: Fix ctrl in messages with a data-len of 0Hans de Goede1-1/+1
Fix taken from the Linux kernel ohci driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-06usb: ohci: Move static func and var declarations from ohci.h to ohci-hcd.cHans de Goede2-93/+86
Non static function and variable declarations do not belong in a .h file. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-06usb: ohci: Remove unnecessary phcca variableHans de Goede1-6/+3
This is a preparation patch for adding driver-model support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-06usb: ohci: Move the td array struct to inside the ohci_dev structHans de Goede2-20/+9
This is a preparation patch for adding driver-model support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-06usb: ohci: Move the ohci_dev struct to inside the main ohci structHans de Goede2-23/+19
This is a preparation patch for adding driver-model support. Note we do keep ohci_dev as a separate struct so that we can later add support for interrupt-queues which requires allocating a separate ohci_dev per interrupt-queue. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-06usb: ohci: Pass around a pointer to ohci_t rather then accessing global varsHans de Goede1-60/+64
This is a preparation patch for adding driver-model support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-06usb: ohci: Remove unused devgone global variableHans de Goede1-8/+0
devgone is never assigned a value, so the one comparisson reading it will never be true, and devgone can be completely removed. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-06usb: Fix maxpacketsize for first descriptor read for low-speed usb devsHans de Goede1-6/+11
This fixes descriptor reading of lowspeed devices through ohci not working. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-05dm: usb: Set desc_before_addr from ehci dm codeHans de Goede1-0/+3
Without this usb-1 device descriptors do not get read properly. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: usb: Fix finding of first upstream usb-2 hub in the ehci dm codeHans de Goede1-12/+22
The ehci driver model code for finding the first upstream usb-2 hub before this commit has a number of issues: 1) "if (!ttdev->speed != USB_SPEED_HIGH)" does not work because the '!' takes presedence over the '!=' this should simply be "if (ttdev->speed == USB_SPEED_HIGH)" 2) It makes ttdev point to the first upstream usb-2 hub, but ttdev should point to the last usb-1 device before the first usb-2 hub (when going upstream from the device), as ttdev is used to find the port of the first usb-2 hub to which the the last usb-1 device is connected. 3) parent_devnum however should be set to the devnum of the first usb-2 hub, so we need to keep pointers around to both usb_device structs. To complicate things further during enumeration usb_device.dev will point to the parent udevice, where as during normal use it will point to the actual udevice, we must handle both cases correctly. This commit fixes all this making usb-1 devices attached to usb-2 hubs, including usb-1 devices attached to usb-1 hubs attached to usb-2 hubs, work. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: usb: Use usb_get_bus in dm ehci codeHans de Goede1-8/+1
Use usb_get_bus in dm ehci code rather then re-implementing it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: usb: Copy over usb_device values from usb_scan_device() to final usb_deviceHans de Goede2-22/+38
Currently we copy over a number of usb_device values stored in the on stack struct usb_device probed in usb_scan_device() to the final driver-model managed struct usb_device in usb_child_pre_probe() through usb_device_platdata, and then call usb_select_config() to fill in the rest. There are 3 problems with this approach: 1) It does not fill in enough fields before calling usb_select_config(), specifically it does not fill in ep0's maxpacketsize causing a div by zero exception in the ehci driver. 2) It unnecessarily redoes a number of usb requests making usb probing slower 3) Calling usb_select_config() a second time fails on some usb-1 devices plugged into usb-2 hubs, causing u-boot to not recognize these devices. This commit fixes these issues by removing (*) the usb_select_config() call from usb_child_pre_probe(), and instead of copying over things field by field through usb_device_platdata, store a pointer to the in stack usb_device (which is still valid when usb_child_pre_probe() gets called) and copy over the entire struct. *) Except for devices which are explictly instantiated through device-tree rather then discovered through usb_scan_device() such as emulated usb devices in the sandbox. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: usb: Make usb_get_bus easier to use for callersHans de Goede2-17/+7
Make usb_get_bus easier to use for callers, by directly returning the bus rather then returning it via a pass-by-ref argument. This also removes the error checking from the current callers, as we already have an assert() for bus not being NULL in usb_get_bus(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: usb: Do not use bus->seq before device_probe(bus)Hans de Goede1-2/+1
Do not use bus->seq before device_probe(bus), as bus->seq is not set until after the device_probe() call. This fixes u-boot printing: "USB-1: " for each bus it scans. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: i2c-gpio: Remove redundant dm_gpio_set_value() callAxel Lin1-6/+7
dm_gpio_set_dir_flags() will also set gpio output value when switching to gpio output. So it's not necessary to call dm_gpio_set_value() after dm_gpio_set_dir_flags() call. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: rtc: Add tests for real-time clocksSimon Glass3-0/+194
Add some simple tests to verify that the RTC uclass works correctly in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: test: dts: Sort the aliases in the test device tree fileSimon Glass1-4/+4
Sort these aliases to avoid confusion as to what is present. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2015-05-05dm: rtc: sandbox: Enable real-time clock supportSimon Glass3-2/+2
Enable real-time-clock support in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: sandbox: dts: Add a real-time clock attached to I2CSimon Glass1-1/+11
Add an emulated RTC device for sandbox, so that the 'date' command can be used. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: net: rtc: Support using driver model for rtc in sntpSimon Glass1-0/+12
When setting the date, support driver model RTC also. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-05-05dm: rtc: Convert 'date' command to support driver modelSimon Glass1-14/+41
Adjust this command so that it supports using driver model for I2C, i.e. CONFIG_DM_I2C. This will permit it to be used in sandbox also. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: rtc: sandbox: Add a driver for the sandbox I2C RTCSimon Glass2-0/+109
Add a driver which communicates with the sandbox I2C emulation RTC device and permits it to be used in U-Boot. This driver is very simple - it just reads and writes selected I2C registers in the device. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: rtc: sandbox: Add an emulated I2C RTC deviceSimon Glass4-0/+286
Add a sandbox I2C emulation device which emulates a real-time clock. The clock works off an offset from the current system time, and supports setting and getting the clock, as well as access to byte-width regisers in the RTC. It does not support changing the system time. This device can be used for testing the 'date' command on sandbox, as well as the RTC uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: rtc: Add a uclass for real-time clocksSimon Glass5-0/+239
Add a uclass for real-time clocks which support getting the current time, setting it and resetting the chip to a known-working state. Some RTCs have additional registers which can be used to store settings, so also provide an interface to these. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: sandbox: Add os_localtime() to obtain the system timeSimon Glass2-0/+29
Add a function to read the system time into U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: rtc: Split structure definition into its own fileSimon Glass2-25/+37
Move the definition of struct rtc_time into a separate file so that sandbox can include it without requiring common.h and the like. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: Remove unnecessary types in bcd.hSimon Glass1-5/+3
We don't need to use u8, and if we avoid it, it isn't so much of a problem that rtc.h includes this header. With this change we can include rtc.h from sandbox files. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: rtc: Rename mktime() and reduce the number of parametersSimon Glass14-41/+54
Most callers unpack the structure and pass each member. It seems better to pass the whole structure instead, as with the C library. Also add an rtc_ prefix. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
2015-05-05dm: rtc: Rename to_tm() to rtc_to_tm() and add error codeSimon Glass16-19/+36
Rename this function so that it is clear that it is provided by the RTC. Also return an error when it cannot function as expected. This is unlikely to occur since it works for dates since 1752 and many RTCs do not support such old dates. Still it is better to be accurate. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
2015-05-05dm: rtc: Rename gregorian day functionSimon Glass4-5/+20
Change this function name to something more descriptive. Also return a failure code if it cannot calculate a correct value. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
2015-05-05fdt: Correct warning in fdt_setup_simplefb_node()Simon Glass1-1/+1
Adjust the printf() string to avoid a warning on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: i2c: Add an explicit test mode to the sandbox I2C driverSimon Glass4-11/+42
At present this driver has a few test features. They are needed for running the driver model unit tests but are confusing and unnecessary if using sandbox at the command line. Add a flag to enable the test mode, and don't enable it by default. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05dm: i2c: Add functions to read and write a registerSimon Glass2-0/+40
Add driver model versions of the legacy functions to read and write a single byte register. These are a useful shortcut in many cases. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
2015-05-05dm: i2c: sandbox: Add debugging to the speed limitSimon Glass1-1/+3
Print a debug() message with the I2C speed is exceeded. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>