- 05 8月, 2015 1 次提交
-
-
由 Simon Glass 提交于
At present this function does not specify its return value. Fix it. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
- 22 7月, 2015 11 次提交
-
-
由 Hans de Goede 提交于
These functions are useful to remove all children from an usb bus before rescanning the bus. Give them a better name and export them. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
We should guide people more strongly towards device tree to avoid the proliferation of platform data structures. Add documentation to the driver model README, and also the platform data header file. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Clocks are an important feature of platforms and have become increasing complex with time. Most modern SoCs have multiple PLLs and dozens of clock dividers which distribute clocks to on-chip peripherals. Some SoC implementations have a clock API which is private to that SoC family, e.g. Tegra and Exynos. This is useful but it would be better to have a common API that can be understood and used throughout U-Boot. Add a simple clock API as a starting point. It supports querying and setting the rate of a clock. Each clock is a device. To reduce memory and processing overhead the concept of peripheral clocks is provided. These do not need to be explicit devices - it is possible to write a driver that can adjust the I2C clock (for example) without an explicit I2C clock device. This can dramatically reduce the number of devices (and associated overhead) in a complex SoC. Clocks are referenced by a number, and it is expected that SoCs will define that numbering themselves via an enum. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is common for system reset to be available at multiple levels in modern hardware. For example, an SoC may provide a reset option, and a board may provide its own reset for reasons of security or thoroughness. It is useful to be able to model this hardware without hard-coding the behaviour in the SoC or board. Also there is a distinction sometimes between resetting just the CPU (leaving GPIO state alone) and resetting all the PMICs, just cutting power. To achieve this, add a simple system reset uclass. It allows multiple devices to provide reset functionality and provides a way to walk through them, requesting a particular reset type until is it provided. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add support for a driver which sets up DRAM and can return information about the amount of RAM available. This is a first step towards moving RAM init to driver model. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add basic support for MMC, providing a uclass which can set up an MMC device. This allows MMC drivers to move to using driver model. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add a simple uclass for LEDs, so that these can be controlled by the device tree and activated when needed. LEDs are referred to by their label. This implementation requires a driver for each type of LED (e.g GPIO, I2C). Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Many SoCs have a number of system controllers which are dealt with as a group by a single driver. It is a pain to have to add lots of compatible strings and/or separate drivers for each. Instead we can identify the controllers by a number and request the address of the one we want. Add a simple implementation of this which can be used by SoC driver code. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This parameter is named 'seq' but should be named 'of_offset'. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
In some rare cases it is useful to be able to locate a device given a device tree node offset. An example is when you have an alias that points to a node and you want to find the associated device. The device may be SPI, MMC or something else, but you don't need to know the uclass to find it. Add a function to do a global search for a device, given its device tree offset. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
In SPL it is sometimes useful to be able to obtain a dump of the current driver model state. Since commands are not available, provide a way to directly call the functions to output this information. Adjust the existing commands to use these functions. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 04 6月, 2015 1 次提交
-
-
由 Simon Glass 提交于
Tidy up the sort order again. Signed-off-by: NSimon Glass <sjg@chromium.org> Reported-by: NJoe Hershberger <joe.hershberger@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 21 5月, 2015 2 次提交
-
-
由 Joe Hershberger 提交于
Unify the command for running unit tests further by moving the "dm test" command over to "ut dm". Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Separate the ability to define tests and assert status of test functions from the dm tests so they can be used more consistently throughout all tests. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 15 5月, 2015 2 次提交
-
-
由 Przemyslaw Marczak 提交于
This commit introduces the implementation of dm regulator API. Device tree support allows for auto binding. And by the basic uclass operations, it allows to driving the devices in a common way. For detailed informations, please look into the header file. Core files: - drivers/power/regulator-uclass.c - provides regulator common functions api - include/power/regulator.h - define all structures required by the regulator Changes: - new uclass-id: UCLASS_REGULATOR - new config: CONFIG_DM_REGULATOR Signed-off-by: NPrzemyslaw Marczak <p.marczak@samsung.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
This commit introduces the PMIC uclass implementation. It allows providing the basic I/O interface for PMIC devices. For the multi-function PMIC devices, this can be used as I/O parent device, for each IC's interface. Then, each PMIC particular function can be provided by the child device's operations, and the child devices will use its parent for read/write by the common API. Core files: - 'include/power/pmic.h' - 'drivers/power/pmic/pmic-uclass.c' The old pmic framework is still kept and is independent. For more detailed informations, please look into the header file. Changes: - new uclass-id: UCLASS_PMIC - new config: CONFIG_DM_PMIC Signed-off-by: NPrzemyslaw Marczak <p.marczak@samsung.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
- 14 5月, 2015 2 次提交
-
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Acked-by: NAnatolij Gustschin <agust@denx.de> Signed-off-by: NTom Warren <twarren@nvidia.com>
-
由 Simon Glass 提交于
Sort uclasses into alphabetical order and tidy up the comments. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NTom Warren <twarren@nvidia.com>
-
- 06 5月, 2015 1 次提交
-
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
- 30 4月, 2015 2 次提交
-
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
- 23 4月, 2015 10 次提交
-
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
- 19 4月, 2015 8 次提交
-
-
由 Simon Glass 提交于
As well as running all tests, it is useful to be able to run a selected test. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
Adjust the existing hub code to support driver model, and add a USB driver for hubs. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
Add some utility functions to check for children and for the last sibling in a device's parent. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-