summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2014-10-23arm: mvebu: Add common mbus functions to use on Marvell SoCsStefan Roese
These mbus functions are ported from Barebox. The Barebox version is ported from Linux. These functions will be first used by the upcoming Armada XP support. Later other Marvell SoC's will be adopted to use these functions as well (Kirkwood, Orion). Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Luka Perkov <luka@openwrt.org>
2014-10-23Merge git://git.denx.de/u-boot-x86Tom Rini
2014-10-23Merge git://git.denx.de/u-boot-fdtTom Rini
2014-10-23x86: Enable FIT, ELF on corebootSimon Glass
Enable FIT support and the bootelf command. Also change the default load address to somewhere other than the normal load address of the kernel, to allow for decompression without overwriting the original file. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23x86: config: link: Display the board model on the screenSimon Glass
To get a display in U-Boot on link you must either build a coreboot that always sets it up, or use Esc-Refresh-Power to reset the machine. When we do have a display, it is nice to display the model at the top, so enable this option. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23x86: link: Tidy up the command lines optionsSimon Glass
We may as well use hush. The auto-complete option was incorrect so this was not enabled. Also expand the command line size a little and go back to the default prompt since "boot>" doesn't seem any more useful. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23x86: cros_ec: Enable cros_ec for linkSimon Glass
Add defines to enable the Chrome OS EC interface and set it up on init. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23x86: dts: Add device tree compatible string for Intel IPCSimon Glass
Add this to the table so that it can be recognised. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23x86: config: Enable dhcp on linkSimon Glass
The dhcp option is required to get bootp to work on the Chromebook Pixel, so enable it. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22fdt: Add a subnodes iterator macroThierry Reding
The fdt_for_each_subnode() iterator macro provided by this patch can be used to iterate over a device tree node's subnodes. At each iteration a loop variable will be set to the next subnode. Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-10-22fdt: Add a function to return PCI BDF tripletThierry Reding
The fdtdec_pci_get_bdf() function returns the bus, device, function triplet of a PCI device by parsing the "reg" property according to the PCI device tree binding. Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-10-22fdt: Add resource parsing functionsThierry Reding
Add the fdt_get_resource() and fdt_get_named_resource() functions which can be used to parse resources (memory regions) from an FDT. A helper to compute the size of a region is also provided. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22fdt: Add functions to retrieve stringsThierry Reding
Given a device tree node, a property name and an index, the new function fdt_get_string_index() will return in an output argument a pointer to the index'th string in the property's value. The fdt_get_string() is a shortcut for the above with the index being 0. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22fdt: Add a function to get the index of a stringThierry Reding
Given a device tree node and a property name, the new fdt_find_string() function will look up a given string in the string list contained in the property's value and return its index. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22fdt: Add a function to count stringsThierry Reding
Given a device tree node and a property name, the fdt_count_strings() function counts the number of strings found in the property value. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22Merge git://git.denx.de/u-boot-dmTom Rini
2014-10-22dm: serial: Tidy up the pl01x driverSimon Glass
Adjust the driver so that leaf functions take a pointer to the serial port register base. Put all the global configuration in the init function, and use the same settings from then on. This makes it much easier to move to driver model without duplicating the code, since with driver model we use platform data rather than global settings. The driver is compiled with either the CONFIG_PL010_SERIAL or CONFIG_PL011_SERIAL option and this determines the uart type. With driver model this needs to come in from platform data, so create a new CONFIG_PL01X_SERIAL config which brings in the driver, and adjust the driver to support both peripheral variants. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
2014-10-22dm: rpi: Convert GPIO driver to driver modelSimon Glass
Convert the BCM2835 GPIO driver to use driver model, and switch over Raspberry Pi to use this, since it is the only board. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
2014-10-22dm: core: Add support for simple-busSimon Glass
Add a driver for the simple-bus nodes, which allows devices within these nodes to be bound. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: imx: Move cm_fx6 to use driver model for serial and GPIOSimon Glass
Now that serial and GPIO are available for iMX.6, move cm_fx6 over as an example. Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
2014-10-22dm: imx: serial: Support driver model in the MXC serial driverSimon Glass
Add driver model support with this driver. Boards which use this driver should define platform data in their board files. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: core: Allow a list of devices to be declared in one stepSimon Glass
The U_BOOT_DEVICE macro allows the declaration of a single U-Boot device. Add an equivalent macro to declare an array of devices, for convenience. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: linker_lists: Add a way to declare multiple objectsSimon Glass
The existing ll_entry_declare() permits a single element of the list to be added to a linker list. Sometimes we want to add several objects at once. To avoid lots of messy declarations, add a macro to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: exynos: cros_ec: Move cros_ec_spi to driver modelSimon Glass
Adjust this driver to use driver model and move smdk5420 boards over to use it. Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: sandbox: cros_ec: Move sandbox cros_ec to driver moduleSimon Glass
Adjust the sandbox cros_ec emulation driver to work with driver model, and switch over to driver model for sandbox cros_ec. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: cros_ec: Add support for driver modelSimon Glass
Add support for driver model if enabled. This involves minimal changes to the code, mostly just plumbing around the edges. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: tegra: spi: Convert to driver modelSimon Glass
This converts the Tegra SPI drivers to use driver model. This is tested on: - Tegra20 - trimslice - Tegra30 - beaver - Tegra124 - dalmore (not tested on Tegra124) Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: exynos: config: Use driver model for SPI flashSimon Glass
Use driver model for exynos5 board SPI flash. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: sf: sandbox: Convert SPI flash driver to driver modelSimon Glass
Convert sandbox's spi flash emulation driver to use driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: sf: Add a uclass for SPI flashSimon Glass
Add a driver model uclass for SPI flash which supports the common operations (read, write, erase). Since we must keep support for the non-dm interface, some modification of the spi_flash header is required. CONFIG_DM_SPI_FLASH is used to enable driver model for SPI flash. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22sf: Tidy up public and private header filesSimon Glass
Since spi_flash.h is supposed to be the public API for SPI flash, move private things to sf_internal.h. Also tidy up a few comment nits. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22exynos: universal_c210: Move to driver model soft_spiSimon Glass
Adjust this board to use the driver model soft_spi implementation. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: exynos: Convert SPI to driver modelSimon Glass
Move the exynos SPI driver over to driver model. This removes quite a bit of boilerplate from the driver, although it adds some for driver model. A few device tree additions are needed to make the SPI flash available. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: spi: Remove SPI_INIT featureSimon Glass
This feature provides for init of a single SPI port for the soft SPI feature. It is not really compatible with driver model since it assumes a single SPI port. Also, inserting SPI init into the driver by means of a #define is not very nice. This feature is not used by any active boards, so let's remove it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: sandbox: spi: Move to driver modelSimon Glass
Adjust the sandbox SPI driver to support driver model and move sandbox over to driver model for SPI. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: sandbox: Add a SPI emulation uclassSimon Glass
U-Boot includes a SPI emulation driver already but it is not explicit, and is hidden in the SPI flash code. Conceptually with sandbox's SPI implementation we have a layer which creates SPI bus transitions and a layer which interprets them, currently only for SPI flash. The latter is actually an emulation, and it should be possible to add more than one emulation - not just SPI flash. Add a SPI emulation uclass so that other emulations can be plugged in to support different types of emulated devices on difference buses/chip selects. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: spi: Add a uclass for SPISimon Glass
Add a uclass which provides access to SPI buses and includes operations required by SPI. For a time driver model will need to co-exist with the legacy SPI interface so some parts of the header file are changed depending on which is in use. The exports are adjusted also since some functions are not available with driver model. Boards must define CONFIG_DM_SPI to use driver model for SPI. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> (Discussed some follow-up comments which will address in future add-ons)
2014-10-22dm: core: Add a clarifying comment on struct udevice's seq memberSimon Glass
The sequence number is unique within the uclass, so state this clearly. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: core: Allow parents to pass data to children during probeSimon Glass
Buses sometimes want to pass data to their children when they are probed. For example, a SPI bus may want to tell the slave device about the chip select it is connected to. Add a new function to permit the parent data to be supplied to the child. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: core: Add functions for iterating through device childrenSimon Glass
Buses need to iterate through their children in some situations. Add a few functions to make this easy. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22dm: exynos: Move serial to driver modelSimon Glass
Change the Exynos serial driver to work with driver model and switch over all relevant boards to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: exynos: gpio: Convert to driver modelSimon Glass
Convert the exynos GPIO driver to driver model. This implements the generic GPIO interface but not the extra Exynos-specific functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: exynos: Move s5p_goni to generic boardSimon Glass
The generic board deadline is approaching, and we need this feature to enable driver model. Enable CONFIG_SYS_GENERIC_BOARD for s5p_goni. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: exynos: Move smdkc100 to generic boardSimon Glass
The generic board deadline is approaching, and we need this feature to enable driver model. Enable CONFIG_SYS_GENERIC_BOARD for smdkc100. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22arm: goni: add i2c_init_board()Robert Baldyga
Add proper initialization of GPIO pins used by software i2c. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: add of_match_ptr() macroMasahiro Yamada
The driver model supports two ways for passing device parameters; Device Tree and platform_data (board file). Each driver should generally support both of them because some popular IPs are used on various platforms. Assume the following scenario: - The driver Foo is used on SoC Bar and SoC Baz - The SoC Bar uses Device Tree control (CONFIG_OF_CONTROL=y) - The SoC Baz does not support Device Tree; uses a board file In this situation, the device driver Foo should work with/without the device tree control. The driver should have .of_match and .ofdata_to_platdata members for SoC Bar, while they are meaningless for SoC Baz; therefore those device-tree control code should go inside #ifdef CONFIG_OF_CONTROL. The driver code will be like this: #ifdef CONFIG_OF_CONTROL static const struct udevice_id foo_of_match = { { .compatible = "foo_driver" }, {}, } static int foo_ofdata_to_platdata(struct udevice *dev) { ... } #endif U_BOOT_DRIVER(foo_driver) = { ... .of_match = of_match_ptr(foo_of_match), .ofdata_to_platdata = of_match_ptr(foo_ofdata_to_platdata), ... } This idea has been borrowed from Linux. (In Linux, this macro is defined in include/linux/of.h) Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: fix include guardMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: include <linker_lists.h> from platdata.h and uclass.hMasahiro Yamada
The header files include/dm/platdata.h and include/dm/uclass.h use ll_entry_declare(); therefore they depend on include/linker_lists.h. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22linker_lists: include <linux/compiler.h>Masahiro Yamada
The header file include/linker_lists.h uses __aligned(); therefore it depends on include/linux/compiler.h Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22dm: fix commentsMasahiro Yamada
The struct udevice stands for a device, not a driver. The driver_info.name is a driver's name, which is referenced to bind devices. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>