23 Mar, 2019
1 commit
-
This patch adds a comment to the header with the PCI_foo macros related
to DEVFN to explain the difference in U-Boot vs Linux.Signed-off-by: Stefan Roese
Cc: Simon Glass
Cc: Bin Meng
Reviewed-by: Simon Glass
20 Feb, 2019
2 commits
-
This is platdata, not private data, so the comment is currently incorrect.
Fix it to avoid confusion.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
This function is not used outside this file so make it static.
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
05 Feb, 2019
1 commit
-
This function will be used by the Marvell Armada XP/38x PCIe driver,
which is moved to DM right now. So let's extract the functionality
from pci_uclass_child_post_bind() to make it available.Signed-off-by: Stefan Roese
Reviewed-by: Simon Glass
Reviewed-by: Bin Meng
15 Nov, 2018
1 commit
-
This introduces two new APIs dm_pci_find_next_capability() and
dm_pci_find_next_ext_capability() to get PCI capability address
and PCI express extended capability address for a given PCI device
starting from a given offset.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass
08 Aug, 2018
4 commits
-
This introduces two new APIs dm_pci_find_capability() and
dm_pci_find_ext_capability() to get PCI capability address and
PCI express extended capability address for a given PCI device.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass -
Currently we don't have a complete list of capability and extended
capability ids. This adds them.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass -
At present all emulated sandbox pci devices must be present in the
device tree in order to be used. The real world pci uclass driver
supports pci device driver matching, and we should add such support
on sandbox too.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass -
These macros should not be put in the generic pci.h header file.
Since they are not referenced anywhere, remove them completely.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass
27 May, 2018
2 commits
-
Add a doc comment for pciauto_region_allocate().
Signed-off-by: Tuomas Tynkkynen
Reviewed-by: Simon Glass -
Currently, if we happen to allocate an address requiring 64 bits to a
device only supporting 32-bit BARs, the address eventually gets silently
truncated to 32 bits. Avoid this by adding a new flag to
pciauto_region_allocate() to bail out in such situations.Signed-off-by: Tuomas Tynkkynen
Reviewed-by: Simon Glass
07 May, 2018
1 commit
-
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.Signed-off-by: Tom Rini
20 Mar, 2018
1 commit
-
ppc4xx support was removed some time ago. Lets remove the now unused
"pci_fb" variable from "struct pci_controller" as well.Signed-off-by: Stefan Roese
Cc: Bin Meng
Cc: Simon Glass
06 Oct, 2017
1 commit
-
This sort of pattern for implementing memory-mapped PCI config space
accesses appears in U-Boot twice already, and a third user is coming up.
So add helper functions to avoid code duplication, similar to how Linux
has pci_generic_config_write and pci_generic_config_read.Signed-off-by: Tuomas Tynkkynen
Reviewed-by: Bin Meng
31 May, 2017
1 commit
-
There is no dedicated reset signal wired up for the MX6QDL thus if the
bootloader enables the link we need some special handling to get the core
back into a state where it is safe to touch it for configuration.While there has been some special handling in the Linux kernel to do this,
it was removed in 4.11 thus we need to do it properly in the bootloader
and therefore without this if you enable PCI in the bootloader you will hang
while booting the 4.11 kernel.This puts the PCIe controller back into a safe state for the kernel driver
before launching the kernel.Signed-off-by: Tim Harvey
Reviewed-by: Fabio Estevam
Tested-by: Peter Senna Tschudin
22 Mar, 2016
1 commit
-
Put pci_get_hose_head() prototype in header so it is available to
external users, allowing them to find and iterate over all pci
controllers.Signed-off-by: Stuart Yoder
Reviewed-by: York Sun
17 Mar, 2016
2 commits
-
Two comments are missing a parameter and there is an extra blank line. Also
two of the region access macros are misnamed. Correct these problems.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
It is common to read a config register value, clear and set some bits, then
write back the updated value. Add functions to do this in one step, for
convenience.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
05 Feb, 2016
1 commit
-
When CONFIG_DM_PCI_COMPAT is not on, there is only a forward declaration
for pci_write_config32(). Add other missing ones.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass
24 Jan, 2016
1 commit
-
Add a driver-model version of the pci_write_bar32 function so that this is
supported in the new API.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
13 Jan, 2016
8 commits
-
We should use the new address mapping functions unless we are in
compatibility mode. Disable the old functions by default.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
At present the PCI address map functions use the old API. Add new functions
for this so that drivers can be converted.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
Add a driver-model function for reading the PCI BAR from a device.
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
Add a function which scans the driver model device information rather
than scanning the PCI bus again.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Bin Meng -
Add a function which scans the driver model device information rather
than scanning the PCI bus again.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Bin Meng -
At present we are using legacy functions even in the auto-configuration code
used by driver model. Add a new pci_auto.c version which uses the correct
API.Create a new pci_internal.h header to hold functions that are used within
the PCI subsystem, but are not exported to other drivers.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Bin Meng -
Most driver model PCI functions have a dm_ prefix. At some point, when the
old code is converted to driver model and the old functions are removed, we
will drop that prefix.For consistency, we should use the dm_ prefix for all driver model
functions. Update pci_bus_find_bdf() accordingly.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
Most driver model PCI functions have a dm_ prefix. At some point, when the
old code is converted to driver model and the old functions are removed, we
will drop that prefix.For consistency, we should use the dm_ prefix for all driver model
functions. Update pci_get_bdf() accordingly.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
01 Dec, 2015
5 commits
-
We eventually need to drop the compatibility functions for driver model. As
a first step, create a configuration option to enable them and hide them
when the option is disabled.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
With driver mode, struct pci_controller is stored as uclass-private data.
Add a comment to that effect.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
This function looks up the controller and returns a pointer to each region
type.Signed-off-by: Simon Glass
Acked-by: Stephen Warren
Tested-by: Stephen Warren -
A PCI bus may be a bridge device where the controller is the bridge's
parent. Add a function to return the controller device, given a PCI device.Signed-off-by: Simon Glass
Acked-by: Stephen Warren
Tested-by: Stephen Warren -
Provide a few functions to support using 32-bit access to emulate 8- and
16-bit access.Signed-off-by: Simon Glass
Reviewed-by: Stephen Warren
Tested-by: Stephen Warren
23 Oct, 2015
1 commit
-
The current name is inconsistent with other driver model data access
functions. Rename it and fix up all users.Signed-off-by: Simon Glass
Reviewed-by: Joe Hershberger
26 Aug, 2015
1 commit
-
These functions are defined by macros so do not show up with grep. Add
a comment to help.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
14 Aug, 2015
2 commits
-
These functions allow iteration through all PCI devices including bridges.
The children of each PCI bus are returned in turn. This can be useful for
configuring, checking or enumerating all the devices.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
At present there are no PCI functions which allow access to PCI
configuration using a struct udevice. This is a sad situation for driver
model as it makes use of PCI harder. Add these functions.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
05 Aug, 2015
1 commit
-
Rather than using 0xff in the code, add a constant.
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
04 Aug, 2015
1 commit
-
PCIe extends device's configuration space to 4k and provides
extended capability. The patch adds function to find them.
The code is ported from Linux PCIe driver.Signed-off-by: Minghuan Lian
Reviewed-by: Bin Meng
Reviewed-by: York Sun
22 Jul, 2015
1 commit
-
It is useful to be able to find the full PCI address (bus, device and
function) for a PCI device. Add a function to provide this.Adjust the existing code to use this.
Signed-off-by: Simon Glass