summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* image: android: handle default kernel addressMaxime Ripard2015-05-08-2/+25
| | | | | | | | | | | | | | | | | | The two tools that create android boot images, mkbootimg and the fastboot client, set the kernel address by default to 0x10008000. U-boot always honors this field, and will try to relocate the kernel to whatever value is set in the header, which won't be mapped to the actual RAM on most platforms, resulting in the kernel obviously not booting. All the targets in U-Boot right now will download the android boot image to CONFIG_SYS_LOAD_ADDR, which means that it will already have been downloaded to some location that is suitable for execution. In order to have the kernel booting even with the default boot image kernel address, if that address is used, just execute the kernel where it is. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* Remove non-working address from MAINTAINERPavel Machek2015-05-08-5/+0
| | | | | | | I checked with Detlev, and sadly removing that maintainers entry is right thing to do. Signed-off-by: Pavel Machek <pavel@denx.de>
* Fix musl buildJörg Krause2015-05-08-0/+5
| | | | | | | | | | | This patch fixes cross-compiling U-Boot tools with the musl C library: * including <sys/types.h> is needed for ulong * defining _GNU_SOURCE is needed for loff_t Tested for target at91sam9261ek_dataflash_cs3. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Cc: Tom Rini <trini@konsulko.com>
* misc: led: Add PCA9551 LED driverStefan Roese2015-05-08-0/+169
| | | | | | | | | | This patch adds a driver for the PCA9551 LED controller. Originated-by: Timo Herbrecher <t.herbrecher@gateware.de> Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Cc: Fabio Estevam <festevam@gmail.com> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
* README: fix typo in 'currently'Fabio Estevam2015-05-08-1/+1
| | | | | Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ti: am335x/am437x/omap5 devices: Unify network environment variablesCooper Jr., Franklin2015-05-08-28/+28
| | | | | | | | | | Across several devices network environment variables are duplicated. Move these variables to a common include file which insures the environment variables are reused and insures devices across product lines share the same values. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* Merge git://git.denx.de/u-boot-dmTom Rini2015-05-08-649/+1743
|\
| * dm: sf: Update default name of spi flash in structure udeviceHaikun.Wang@freescale.com2015-05-06-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>
| * dm: usb: exynos: Drop legacy USB codeSimon Glass2015-05-06-229/+0
| | | | | | | | | | | | Drop the code that doesn't use driver model for USB. Signed-off-by: Simon Glass <sjg@chromium.org>
| * sandbox: Enable time unit test commandSimon Glass2015-05-06-0/+1
| | | | | | | | | | | | Enable this command for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Add a simple time testSimon Glass2015-05-06-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>
| * sandbox: Don't try distro_bootcmd by defaultSjoerd Simons2015-05-06-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>
| * usb: ohci: Don't log an error on interrupt packet timeoutHans de Goede2015-05-06-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>
| * usb: ohci: Add proper cache flushing / invalidating for non cache coherent cpusHans de Goede2015-05-06-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>
| * usb: ohci: Fix ctrl in messages with a data-len of 0Hans de Goede2015-05-06-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>
| * usb: ohci: Move static func and var declarations from ohci.h to ohci-hcd.cHans de Goede2015-05-06-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>
| * usb: ohci: Remove unnecessary phcca variableHans de Goede2015-05-06-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>
| * usb: ohci: Move the td array struct to inside the ohci_dev structHans de Goede2015-05-06-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>
| * usb: ohci: Move the ohci_dev struct to inside the main ohci structHans de Goede2015-05-06-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>
| * usb: ohci: Pass around a pointer to ohci_t rather then accessing global varsHans de Goede2015-05-06-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>
| * usb: ohci: Remove unused devgone global variableHans de Goede2015-05-06-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>
| * usb: Fix maxpacketsize for first descriptor read for low-speed usb devsHans de Goede2015-05-06-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>
| * dm: usb: Set desc_before_addr from ehci dm codeHans de Goede2015-05-05-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>
| * dm: usb: Fix finding of first upstream usb-2 hub in the ehci dm codeHans de Goede2015-05-05-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>
| * dm: usb: Use usb_get_bus in dm ehci codeHans de Goede2015-05-05-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>
| * dm: usb: Copy over usb_device values from usb_scan_device() to final usb_deviceHans de Goede2015-05-05-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>
| * dm: usb: Make usb_get_bus easier to use for callersHans de Goede2015-05-05-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>
| * dm: usb: Do not use bus->seq before device_probe(bus)Hans de Goede2015-05-05-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>
| * dm: i2c-gpio: Remove redundant dm_gpio_set_value() callAxel Lin2015-05-05-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>
| * dm: rtc: Add tests for real-time clocksSimon Glass2015-05-05-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>
| * dm: test: dts: Sort the aliases in the test device tree fileSimon Glass2015-05-05-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>
| * dm: rtc: sandbox: Enable real-time clock supportSimon Glass2015-05-05-2/+2
| | | | | | | | | | | | Enable real-time-clock support in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sandbox: dts: Add a real-time clock attached to I2CSimon Glass2015-05-05-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>
| * dm: net: rtc: Support using driver model for rtc in sntpSimon Glass2015-05-05-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>
| * dm: rtc: Convert 'date' command to support driver modelSimon Glass2015-05-05-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>
| * dm: rtc: sandbox: Add a driver for the sandbox I2C RTCSimon Glass2015-05-05-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>
| * dm: rtc: sandbox: Add an emulated I2C RTC deviceSimon Glass2015-05-05-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>
| * dm: rtc: Add a uclass for real-time clocksSimon Glass2015-05-05-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>
| * dm: sandbox: Add os_localtime() to obtain the system timeSimon Glass2015-05-05-0/+29
| | | | | | | | | | | | Add a function to read the system time into U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: rtc: Split structure definition into its own fileSimon Glass2015-05-05-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>
| * dm: Remove unnecessary types in bcd.hSimon Glass2015-05-05-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>
| * dm: rtc: Rename mktime() and reduce the number of parametersSimon Glass2015-05-05-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>
| * dm: rtc: Rename to_tm() to rtc_to_tm() and add error codeSimon Glass2015-05-05-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>
| * dm: rtc: Rename gregorian day functionSimon Glass2015-05-05-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>
| * fdt: Correct warning in fdt_setup_simplefb_node()Simon Glass2015-05-05-1/+1
| | | | | | | | | | | | Adjust the printf() string to avoid a warning on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: i2c: Add an explicit test mode to the sandbox I2C driverSimon Glass2015-05-05-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>
| * dm: i2c: Add functions to read and write a registerSimon Glass2015-05-05-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>
| * dm: i2c: sandbox: Add debugging to the speed limitSimon Glass2015-05-05-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>
| * dm: spi: Correct the comment on spi_get_ops()Simon Glass2015-05-05-1/+1
| | | | | | | | | | | | | | This comment should refer to SPI, not serial. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
| * cros_ec: Handle the single duplex requirement in cros_ecSimon Glass2015-05-05-3/+20
| | | | | | | | | | | | | | With several chips using the SPI protocol it seems better to put the single duplex functionality in the EC rather than the SPI driver. Signed-off-by: Simon Glass <sjg@chromium.org>