- May 13, 2015
-
-
Simon Glass authored
eDP (Embedded DisplayPort) is a standard widely used in laptops to drive LCD panels. Add a uclass for this which supports a few simple operations. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Anatolij Gustschin <agust@denx.de> Signed-off-by:
Tom Warren <twarren@nvidia.com>
-
Simon Glass authored
Sort uclasses into alphabetical order and tidy up the comments. Signed-off-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Warren <twarren@nvidia.com>
-
- May 06, 2015
-
-
Simon Glass authored
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>
-
- Apr 30, 2015
-
-
Simon Glass authored
It is useful to be able to keep track of the available CPUs in a multi-CPU system. This uclass is mostly intended for use with SMP systems. The uclass provides methods for getting basic information about each CPU. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Some device tree nodes do not have compatible strings but do require drivers. This is pretty rare, and somewhat unfortunate. Add a function to permit creation of a driver for any device tree node. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Apr 23, 2015
-
-
Simon Glass authored
The CONFIG_DM_DEVICE_REMOVE option takes out code related to removing devices. It should also remove the 'unbind' code since if we cannot remove we probably don't need to unbind. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Apr 22, 2015
-
-
Przemyslaw Marczak authored
The functions: - uclass_find_device_by_name() - uclass_get_device_by_name() searches the required device for the exactly given name. This patch, presice this fact for both function's comments. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
Uclass API provides a few functions for get/find the device. To provide a complete function set of uclass-internal functions, for use by the drivers, the function uclass_get_device_tail() should be non-static. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This commit extends the driver model device's API by function: - dev_get_uclass_name() And this function returns the device's uclass driver name if: - given dev pointer, is non_NULL otherwise, the NULL pointer is returned. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This commit extends the driver model device's API by function: - dev_get_driver_ops() And this function returns the device's driver's operations if given: - dev pointer, is non-NULL - dev->driver->ops pointer, is non-NULL in other case the, the NULL pointer is returned. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This commit extends the driver model uclass's API by function: - uclass_get_device_by_name() And this function returns the device if: - uclass with given ID, exists, - device with exactly given name(dev->name), exists, - device probe, doesn't return an error. The returned device is activated and ready to use. Note: This function returns the first device, which name is equal to the given one. This means, that using this function you must assume, that the device name is unique in the given uclass's ID device list. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This commit extends the driver model uclass's API by function: - uclass_find_device_by_name() And this function returns the device if: - uclass with given ID, exists, - device with exactly given name(dev->name), exists. The returned device is not activated - need to be probed before use. Note: This function returns the first device, which name is equal to the given one. This means, that using this function you must assume, that the device name is unique in the given uclass's ID device list. uclass-internal.h: cleanup - move the uclass_find_device_by_seq() declaration and description, near the other uclass_find*() functions. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This test introduces new test structure type:dm_test_perdev_uc_pdata. The structure consists of three int values only. For the test purposes, three pattern values are defined by enum, starting with TEST_UC_PDATA_INTVAL1. This commit adds two test cases for uclass platform data: - Test: dm_test_autobind_uclass_pdata_alloc - this tests if: * uclass driver sets: .per_device_platdata_auto_alloc_size field * the devices's: dev->uclass_platdata is non-NULL - Test: dm_test_autobind_uclass_pdata_valid - this tests: * if the devices's: dev->uclass_platdata is non-NULL * the structure of type 'dm_test_perdev_uc_pdata' allocated at address pointed by dev->uclass_platdata. Each structure field, should be equal to proper pattern data, starting from .intval1 == TEST_UC_PDATA_INTVAL1. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This commit adds 'uclass_platdata' field to 'struct udevice', which can be automatically allocated at bind. The allocation size is defined in 'struct uclass_driver' as 'per_device_platdata_auto_alloc_size'. New device's flag is added: DM_FLAG_ALLOC_UCLASS_PDATA, which is used for memory freeing at device unbind method. As for other udevice's fields, a complementary function is added: - dev_get_uclass_platdata() Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Przemyslaw Marczak authored
This commit extends the uclass-internal functions by: - uclass_find_first_device() - uclass_find_next_device() For both functions, the returned device is not probed. After some cleanup, the above functions are called by: - uclass_first_device() - uclass_next_device() for which, the returned device is probed. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
- Apr 18, 2015
-
-
Simon Glass authored
As well as running all tests, it is useful to be able to run a selected test. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
This emulator supports USB enumeration and allows a local file to be provided as the contents of the emulated flash stick. U-Boot can then use the file as it would a normal device, with all access passing through the usb_stor layer and the USB stack. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
With sandbox we want to be able to emulate USB devices so that we can test the USB stack. Add a uclass to support this. It implements the same operations as a normal USB device driver, but in this case passes them on to an emulation driver. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
At present USB devices with no driver model driver cannot be seen in the device list, and we fail to set them up correctly. This means they cannot be used. While having real drivers that support driver model for all USB devices is the eventual goal, we are not there yet. As a stop-gap, add a generic USB driver which is bound when we do not have a real driver. This allows the device to be set up and shown on the bus. It also allows ad-hoc code (such as usb_ether) to find these devices and set them up. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
Adjust the existing hub code to support driver model, and add a USB driver for hubs. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
Add a uclass that can represent a USB controller. For now we do not create devices for things attached to the controller. This will be added later. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
Add some utility functions to check for children and for the last sibling in a device's parent. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
The existing get_get_of_data() function provides access to both the driver's compatible string and its driver data. However only the latter is actually useful. Update the interface to reflect this and fix up existing users. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
The driver is not modified by driver model, so update driver_bind() to recognise that. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
Some driver want to put DMA buffers in their private data. Add a flag to tell driver model to align driver-private data to a cache boundary so that DMA will work correctly in this case. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Simon Glass authored
On x86 systems this device is commonly used to provide legacy port access. It is sort-of a replacement for the old ISA bus. Add a uclass for this, and allow it to have child devices. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
First just add support for MAC drivers. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Move coreboot-x86 over to driver model for PCI. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Apr 17, 2015
-
-
Simon Glass authored
Since sandbox does not have real devices (unless it borrows those from the host) it must use emulations. Provide a uclass which permits PCI operations to be passed through to an emulation device. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a uclass for PCI controllers and a generic one for PCI devices. Adjust the 'pci' command and the existing PCI support to work with this new uclass. Keep most of the compatibility code in a separate file so that it can be removed one day. TODO: Add more header file comments to the new parts of pci.h Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Some uclasses want to set up a device before it is probed. Add a method for this. An example is with PCI, where a PCI uclass wants to set up its private data for later use. This allows the device's uclass() method to make calls whcih use that data (for example, read PCI memory regions from device tree, set up bus numbers). Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a convenience function to access the private data that a uclass stores for each of its devices. Convert over most existing uses for consistency and to provide an example for others. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 19, 2015
-
-
Marek Vasut authored
Since device_unbind() is also defined in device-remove.c, which is compiled in only in case CONFIG_DM_DEVICE_REMOVE is defined, protect the device_unbind() prototype with the same CONFIG_DM_DEVICE_REMOVE check. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stefan Roese <sr@denx.de> Cc: Tom Rini <trini@ti.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
- Feb 12, 2015
-
-
Peng Fan authored
Abstracting dev_get_addr can improve drivers that want to get device's address. Signed-off-by:
Peng Fan <Peng.Fan@freescale.com> Acked-by:
Igor Grinberg <grinberg@compulab.co.il> Acked-by:
Simon Glass <sjg@chromium.org>
-
Nobuhiro Iwamatsu authored
This adds driver model support with this driver. This was tested by Koelsch board and Gose board. Signed-off-by:
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
- Jan 30, 2015
-
-
Ruchika Gupta authored
Add a new rsa uclass for performing modular exponentiation and implement the software driver basing on this uclass. Signed-off-by:
Ruchika Gupta <ruchika.gupta@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Some buses need to set up their devices before they can be used. This setup may well be common to all buses in a particular uclass. Support a common pre-probe method for the uclass, called before any bus devices are probed. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Masahiro Yamada <yamada.m@jp.panasonic.com>
-
Simon Glass authored
For buses, after a child is bound, allow the uclass to perform some processing. This can be used to figure out the address of the child (e.g. the chip select for SPI slaves) so that it is ready to be probed. This avoids bus drivers having to repeat the same process, which really should be done by the uclass, since it is common. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Masahiro Yamada <yamada.m@jp.panasonic.com>
-
Simon Glass authored
In many cases the per-child private data for a device's children is defined by the uclass rather than the individual driver. For example, a SPI bus needs to store information about each of its children, but all SPI drivers store the same information. It makes sense to allow the uclass to define this data. If the driver provides a size value for its per-child private data, then use it. Failng that, fall back to that provided by the uclass. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Masahiro Yamada <yamada.m@jp.panasonic.com>
-
Simon Glass authored
At present we try to use the 'reg' property and device tree aliases to give devices a sequence number. The 'reg' property is often actually a memory address, so the sequence numbers thus-obtained are not useful. It would be better if the devices were just sequentially numbered in that case. In fact neither I2C nor SPI use this feature, so drop it. Some devices need us to look up an alias to number them within the uclass. Add a flag to control this, so it is not done unless it is needed. Adjust the tests to test this new behaviour. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Masahiro Yamada <yamada.m@jp.panasonic.com>
-