| Age | Commit message (Collapse) | Author |
|
We don't need this anymore, so adjust the code to avoid using it.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
Adjust this function so that it is passed an EHCI controller pointer so that
implementations can look up their controller.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
At present the tegra driver uses a separate pointer to know which controller
type is in use. This works because only one controller type is used at a
time.
With driver model we want to make the controller state hermetic in the sense
that it is not necessary to look elsewhere to know the controller type. This
will permit a controller to implement the EHCI weak functions without
reference to global data structures.
To achieve this, define an enum for the controller type and store it with
the information on each EHCI controller.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
Add a private data pointer that clients of EHCI can use to access their
private information. This establishes a link between struct ehci_ctrl and
its associated controller data structure.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
Adjust this function so that it is passed an EHCI controller pointer so that
implementations can look up their controller.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
Put these at the top of the file so they are in one place. Also add function
prototypes to the header file to avoid call site mismatches.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
This has a prototype but no implementation. It returns the global GPIO number
given a gpio_desc. It is useful for debugging in some cases.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
Add some utility functions to check for children and for the last sibling in
a device's parent.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
The uclass pre-probe functions may end up calling back into the device in
some circumstances. This can fail if recursion takes place. Adjust the
ordering so that we mark the device as active early, then retract this
later if needed.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
The driver is not modified by driver model, so update driver_bind() to
recognise that.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
|
|
Move the Freescale QSPI driver over to driver model.
Signed-off-by: Haikun Wang <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Tested-by: Peng Fan <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
Move the Freescale DSPI driver over to driver model.
Signed-off-by: Haikun Wang <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
This commit adds driver model support to software emulated i2c bus driver.
This driver supports kernel-style device tree bindings. Fdt properties in use:
- compatible - "i2c-gpio"
- gpios - data and clock GPIO pin phandles
- delay-us - micro seconds delay between GPIOs toggle operations,
which is 1/4 of I2C speed clock period.
Added:
- Config: CONFIG_DM_I2C_GPIO
- File: drivers/i2c/i2c-gpio.c
- File: doc/device-tree-bindings/i2c/i2c-gpio.txt
Driver base code is taken from: drivers/i2c/soft-i2c.c, changes:
- use "i2c-gpio" naming
- update comments style
- move preprocesor macros into functions
- add device tree support
- add driver model i2c support
- code cleanup,
- add Kconfig entry
Signed-off-by: Przemyslaw Marczak <[email protected]>
Acked-by: Simon Glass <[email protected]>
Added braces in i2c_gpio_xfer() to fix style nit:
Signed-off-by: Simon Glass <[email protected]>
|
|
Signed-off-by: Przemyslaw Marczak <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
The function gpio_request_list_by_name_nodev() returned -ENOSPC error,
when the loop count was greater than requested count. This was wrong,
because function should return the requested gpio count, when meets
the call request without errors. Now, the loop ends on requested
max_count.
Signed-off-by: Przemyslaw Marczak <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
This code appears to be missing a piece that is needed on some keyboards
to enable the keyboard. Add this in.
This makes the keyboard work correctly on chromebook_link.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move CONFIG_CROS_EC_SANDBOX to Kconfig.
Signed-off-by: Simon Glass <[email protected]>
|
|
The U-Boot device trees are slightly different in a few places. Adjust them
to remove most of the differences. Note that U-Boot does not support the
concept of interrupts as distinct from GPIOs, so this difference remains.
For sandbox, use the same keyboard file as for ARM boards and drop the
host emulation bus which seems redundant.
Signed-off-by: Simon Glass <[email protected]>
|
|
Since all supported boards enable this option now, we can remove it along
with the old code.
Signed-off-by: Simon Glass <[email protected]>
|
|
This command is supposed to reinit the device. At present with driver
model is does nothing. Implement this feature.
Signed-off-by: Simon Glass <[email protected]>
|
|
This is the last driver to be converted. It requires an LPC bus and a
special check_version() method.
Signed-off-by: Simon Glass <[email protected]>
|
|
Convert this driver over to use driver model. Since all x86 platforms use
it, move x86 to use driver model for SPI and SPI flash. Adjust all dependent
code and remove the old x86 spi_init() function.
Note that this does not make full use of the new PCI uclass as yet. We still
scan the bus looking for the device. It should move to finding its details
in the device tree.
Signed-off-by: Simon Glass <[email protected]>
|
|
Permit use of a udevice to talk to SPI flash. Ultimately we would like
to retire the use of 'struct spi_flash' for this purpose, so create the
new API for those who want to move to it.
Signed-off-by: Simon Glass <[email protected]>
|
|
The 'lo' interface on Linux doesn't support thinks like ARP or
link-layer access like we use to talk to a normal network interface.
A higher-level network API must be used to access localhost.
As written, this interface is limited to not supporting ICMP since the
API doesn't allow the socket to be opened for all IP traffic and be able
to receive at the same time. UDP is far more useful to test with, so it
was selected over ICMP. Ping won't work, but things like TFTP should
work.
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Implement a bridge between U-Boot's network stack and Linux's raw packet
API allowing the sandbox to send and receive packets using the host
machine's network interface.
This raw Ethernet API requires elevated privileges. You can either run
as root, or you can add the capability needed like so:
sudo /sbin/setcap "CAP_NET_RAW+ep" /path/to/u-boot
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
This is needed to test the netretry functionality (make the command fail
on a sandbox eth device).
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
The sandbox driver will now generate response traffic to exercise the
ping command even when no network exists. This allows the basic data
pathways of the DM to be tested.
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Add basic network support to sandbox which includes a network driver.
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
First just add support for MAC drivers.
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
This value is not used by the network stack and is available in the
global data, so stop passing it around. For the one legacy function
that still expects it (init op on old Ethernet drivers) pass in the
global pointer version directly to avoid changing that interface.
Signed-off-by: Joe Hershberger <[email protected]>
Reported-by: Simon Glass <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
(Trival fix to remove an unneeded variable declaration in 4xx_enet.c)
|
|
In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.
Also split the non-arch specific functions out of common.h
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Add a simple x86 PCI driver which uses standard functions provided by the
architecture.
Signed-off-by: Simon Glass <[email protected]>
|
|
Enable PCI options so that sandbox can be used for testing this bus with
driver model.
Signed-off-by: Simon Glass <[email protected]>
|
|
This device sits on the sandbox PCI bus and provides a case-swapping
service for sandbox. It illustrates the use of both PCI I/O and PCI
memory accesses.
Signed-off-by: Simon Glass <[email protected]>
|
|
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 <[email protected]>
|
|
Add a driver which can access emulations of devices and make them available
in sandbox.
Signed-off-by: Simon Glass <[email protected]>
|
|
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 <[email protected]>
|
|
Driver model will share many functions with the existing PCI implementation.
Move these into their own file to avoid duplication and confusion.
Signed-off-by: Simon Glass <[email protected]>
|
|
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 <[email protected]>
|
|
At present the device is not active when the probe() method is called. But
some probe() methods want to set up the device and this can involve
accessing it through normal methods. For example a PCI bus may wish to
set up its PCI parameters using calls to pci_hose_write_config_dword() and
similar.
At present this does not work because every such call within the probe()
method sees that the device is not active and attempts to probe it.
Already we mark the device as probed before calling the uclass post_probe()
method. This is a subtle change but I believe the new approach is better.
Since the scope of the change is only the probe() method and all its callees
it should still be within the control of the board author.
Signed-off-by: Simon Glass <[email protected]>
|
|
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 <[email protected]>
|
|
These functions currently use a generic name, but they are for x86 only.
This may introduce confusion and prevents U-Boot from using these names
more widely.
In fact it should be possible to remove these at some point and use
generic functions, but for now, rename them.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Add Lynxpoint to the driver so that the Asus Chromebox can be supported.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Jagannadha Sutradharudu Teki <[email protected]>
|
|
At present a VGA console assumes a keyboard unless a CONFIG option is set.
This difference can be dealt with by a device tree option, allowing boards
that are otherwise the same to use the same configuration.
Signed-off-by: Simon Glass <[email protected]>
|
|
Commit d3cfcb3 (ARM: DRA7: Enable clocks for USB OTGSS and USB PHY)
changed the member names of prcm_regs from cm_l3init_usb_otg_ss_clkctrl
to cm_l3init_usb_otg_ss1_clkctrl and from cm_coreaon_usb_phy_core_clkctrl
to cm_coreaon_usb_phy1_core_clkctrl in order to differentiate between
the two dwc3 controllers present in dra7xx/am43xx and enabled these
clocks in enable_basic_clocks() in hw_data.c. However these clocks
continued to be enabled in board files/driver files for dwc3 host
mode functionality causing compilation break with few configs.
Fixed it here by making all the clocks enabled in enable_basic_clocks()
and removing it from board files/driver files here.
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
|
|
|
|
Signed-off-by: Alexander Merkle <[email protected]>
|