| #
8a36287a |
| 29-Jan-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
e578b92c |
| 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
Implement "pci enum" command for CONFIG_DM_PCI
With CONFIG_DM_PCI enabled, PCI buses are not enumerated at boot, as they are without that config option enabled. No command exists to enumerate the PC
Implement "pci enum" command for CONFIG_DM_PCI
With CONFIG_DM_PCI enabled, PCI buses are not enumerated at boot, as they are without that config option enabled. No command exists to enumerate the PCI buses. Hence, unless some board-specific code causes PCI enumeration, PCI-based Ethernet devices are not detected, and network access is not available.
This patch implements "pci enum" in the CONFIG_DM_PCI case, thus giving a mechanism whereby PCI can be enumerated.
do_pci()'s handling of case 'e' is moved into a single location before the dev variable is assigned, in order to skip calculation of dev. The enum sub-command doesn't need the dev value, and skipping its calculation avoids an irrelevant error being printed.
Using a command to initialize PCI like this has a disadvantage relative to enumerating PCI at boot. In particular, Ethernet devices are not probed during PCI enumeration, but only when used. This defers setting variables such as ethact, ethaddr, etc. until the first network-related command is executed. Hopefully this will not cause further issues. Perhaps in the long term, we need a "net start/enum" command too?
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
9d731c82 |
| 19-Jan-2016 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add a function to write a BAR
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 <sjg@chromium.org> Reviewed-by
dm: pci: Add a function to write a BAR
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
a6eb93b3 |
| 19-Jan-2016 |
Simon Glass <sjg@chromium.org> |
dm: pci: Move pci_bus_to_hose() to compatibility
This function should not be used by driver-model code, so move it to the compatibility portion.
Signed-off-by: Simon Glass <sjg@chromium.org> Review
dm: pci: Move pci_bus_to_hose() to compatibility
This function should not be used by driver-model code, so move it to the compatibility portion.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
077678eb |
| 12-Jan-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
8bd42525 |
| 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
pci: Tidy up comments in pci_bind_bus_devices()
The current comments are confusing. We don't actually bind a generic device when the device tree has no information. We try to scan available PCI driv
pci: Tidy up comments in pci_bind_bus_devices()
The current comments are confusing. We don't actually bind a generic device when the device tree has no information. We try to scan available PCI drivers. Update the comments to reflect this.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
21d1fe7e |
| 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add driver model API functions for address mapping
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: Sim
dm: pci: Add driver model API functions for address mapping
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
bab17cf1 |
| 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add a function to read a PCI BAR
Add a driver-model function for reading the PCI BAR from a device.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
|
| #
a0eb8356 |
| 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add a driver-model version of pci_find_class()
Add a function which scans the driver model device information rather than scanning the PCI bus again.
Signed-off-by: Simon Glass <sjg@chromi
dm: pci: Add a driver-model version of pci_find_class()
Add a function which scans the driver model device information rather than scanning the PCI bus again.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
5c0bf647 |
| 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add a driver-model version of pci_find_device()
Add a function which scans the driver model device information rather than scanning the PCI bus again.
Signed-off-by: Simon Glass <sjg@chrom
dm: pci: Add a driver-model version of pci_find_device()
Add a function which scans the driver model device information rather than scanning the PCI bus again.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
5e23b8b4 |
| 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Use driver model PCI API in auto-config
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 correc
dm: pci: Use driver model PCI API in auto-config
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
f3f1faef |
| 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add a dm_ prefix to pci_bus_find_bdf()
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
dm: pci: Add a dm_ prefix to pci_bus_find_bdf()
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
21ccce1b |
| 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add a dm_ prefix to pci_get_bdf()
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
dm: pci: Add a dm_ prefix to pci_get_bdf()
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
f9260336 |
| 20-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add a function to find the regions for a PCI bus
This function looks up the controller and returns a pointer to each region type.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: St
dm: pci: Add a function to find the regions for a PCI bus
This function looks up the controller and returns a pointer to each region type.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
9f60fb0d |
| 20-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add a function to get the controller for a bus
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 devi
dm: pci: Add a function to get the controller for a bus
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 <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
9289db6c |
| 20-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add functions to emulate 8- and 16-bit access
Provide a few functions to support using 32-bit access to emulate 8- and 16-bit access.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed
dm: pci: Add functions to emulate 8- and 16-bit access
Provide a few functions to support using 32-bit access to emulate 8- and 16-bit access.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
9526d83a |
| 20-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Support decoding ranges with duplicate entries
At present we add a new resource entry for every range entry. But some range entries refer to configuration regions. To make this work, avoid
dm: pci: Support decoding ranges with duplicate entries
At present we add a new resource entry for every range entry. But some range entries refer to configuration regions. To make this work, avoid adding two regions of the same type. The later ranges will overwrite the earlier (configuration) ones.
There does not seem to be a way to distinguish the configuration ranges other than by ordering (as per the device tree binding).
We could perhaps instead just store one region of each type in a simple array. Once we are sure that we don't need to support multiple regions, we could change this. It would be easier to do it when all drivers are converted to use driver model for PCI.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
2084c5af |
| 20-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Set up the SDRAM mapping correctly
SDRAM doesn't always start at 0. Adjust the region mapping so that it works on platforms where SDRAM is somewhere else.
This needs testing on other platf
dm: pci: Set up the SDRAM mapping correctly
SDRAM doesn't always start at 0. Adjust the region mapping so that it works on platforms where SDRAM is somewhere else.
This needs testing on other platforms.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
a69fdc77 |
| 23-Oct-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
858dbdf8 |
| 22-Oct-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-x86
|
| #
bbbcb526 |
| 01-Oct-2015 |
Bin Meng <bmeng.cn@gmail.com> |
dm: pci: Enable VGA address forwarding on bridges
To support graphics card behind a PCI bridge, the bridge control register (offset 0x3e) in the configuration space must turn on VGA address forwardi
dm: pci: Enable VGA address forwarding on bridges
To support graphics card behind a PCI bridge, the bridge control register (offset 0x3e) in the configuration space must turn on VGA address forwarding.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
069155cb |
| 01-Oct-2015 |
Bin Meng <bmeng.cn@gmail.com> |
dm: pci: Fix pci_last_busno() to return the real last bus no
Currently pci_last_busno() only checks the last bridge device under the first UCLASS_PCI device. This is not the case when there are mult
dm: pci: Fix pci_last_busno() to return the real last bus no
Currently pci_last_busno() only checks the last bridge device under the first UCLASS_PCI device. This is not the case when there are multiple bridge devices.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
5dbcf3a0 |
| 08-Sep-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Adjust pci_find_and_bind_driver() to return -EPERM
The current code returns 0 even if it failed to find or bind a driver. The caller then has to check the returned device to see if it is NU
dm: pci: Adjust pci_find_and_bind_driver() to return -EPERM
The current code returns 0 even if it failed to find or bind a driver. The caller then has to check the returned device to see if it is NULL. It is better to return an error code in this case so that it is clear what happened.
Adjust the code to return -EPERM, indicating that the device was not bound because it is not needed for pre-relocation use. Add comments so that the return value is clear.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
3129ace4 |
| 08-Sep-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Correct a few debug() statements
One debug() statement is missing a newline. The other has a repeated word. Fix these.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <
dm: pci: Correct a few debug() statements
One debug() statement is missing a newline. The other has a repeated word. Fix these.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
4d21455e |
| 08-Sep-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Tidy up auto-config error handling
When the auto-configuration process fails for a device (generally due to lack of memory) we should return the error correctly so that we don't continue to
dm: pci: Tidy up auto-config error handling
When the auto-configuration process fails for a device (generally due to lack of memory) we should return the error correctly so that we don't continue to try memory allocations which will fail.
Adjust the code to check for errors and abort if something goes wrong.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|