History log of /rk3399_rockchip-uboot/drivers/pci/pci-uclass.c (Results 1 – 25 of 80)
Revision Date Author Comments
# 10dd02ab 08-Jan-2025 Shawn Lin <shawn.lin@rock-chips.com>

PCI: add FLR support

Functional Level Reset is used for device drivers to reset their
internal functions if recovery is needed.

=> pci flr 01.00.0
FLR completed and state restored for device 01:00.

PCI: add FLR support

Functional Level Reset is used for device drivers to reset their
internal functions if recovery is needed.

=> pci flr 01.00.0
FLR completed and state restored for device 01:00.0

Change-Id: Ifc6eb8e6f980d1b450e14b28fb8248e45f586316
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

show more ...


# e8697d50 07-Jan-2025 Shawn Lin <shawn.lin@rock-chips.com>

PCI: add retrain support

=> pci x 01.00.0
Retrain triggered for device 0001:0000
Link Status for device 0001:0000: 0x1022
Speed: Gen3
Width: x2
Link Up: Yes

Change-Id: Ic9d74e1d118cd18b76b435b046ab

PCI: add retrain support

=> pci x 01.00.0
Retrain triggered for device 0001:0000
Link Status for device 0001:0000: 0x1022
Speed: Gen3
Width: x2
Link Up: Yes

Change-Id: Ic9d74e1d118cd18b76b435b046ab2dc293daa14e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

show more ...


# 0f141368 15-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

UPSTREAM: dm: pci: Add APIs to find next capability and extended capability

This introduces two new APIs dm_pci_find_next_capability() and
dm_pci_find_next_ext_capability() to get PCI capability add

UPSTREAM: dm: pci: Add APIs to find next capability and extended capability

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 <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[cherry-picked from a8c5f8d3d02807f72d048950d72b0c73d55bd7fb]
Change-Id: Idf9867b415b066984757bf021f4e441fe3c5d787
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

show more ...


# c3a16692 03-Aug-2018 Bin Meng <bmeng.cn@gmail.com>

UPSTREAM: dm: pci: Add APIs to find capability and extended capability

This introduces two new APIs dm_pci_find_capability() and
dm_pci_find_ext_capability() to get PCI capability address and
PCI ex

UPSTREAM: dm: pci: Add APIs to find capability and extended capability

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 <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[cherry-picked from dac01fd89d41d98cd4ce040a0d10eb67c523f63a]
Change-Id: I4f16090ba12df20cb299f22802ed77ebcb04ffa4
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

show more ...


# fdb7e29c 28-Aug-2024 Shawn Lin <shawn.lin@rock-chips.com>

dm: pci: Fix PCI 64bit address support

Don't overwrite memory between 32bit and 64bit. And properly
map them and let host drivers to get proper regions.

Change-Id: I4176f4536aef22f5fae87de732194734

dm: pci: Fix PCI 64bit address support

Don't overwrite memory between 32bit and 64bit. And properly
map them and let host drivers to get proper regions.

Change-Id: I4176f4536aef22f5fae87de7321947348aa4f308
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

show more ...


# 5395ac06 12-Oct-2022 Michal Suchanek <msuchanek@suse.de>

UPSTREAM: dm: treewide: Do not use the return value of simple uclass iterator

uclass_first_device/uclass_next_device return value will be removed,
don't use it.

With the current implementation dev

UPSTREAM: dm: treewide: Do not use the return value of simple uclass iterator

uclass_first_device/uclass_next_device return value will be removed,
don't use it.

With the current implementation dev is equivalent to !ret. It is
redundant to check both, ret check can be replaced with dev check, and
ret check inside the iteration is dead code.

Change-Id: Ie500bbed46f8d08721b14b1db7a7be94ea601799
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 4954937d922840c212b7eba297cc2d4779f087ad)
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>

show more ...


# 8d3a2568 12-Jul-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# 61e51bab 22-Jun-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

dm: ofnode: rename ofnode_read_prop() to ofnode_get_property()

This function returns the pointer to the value of a node property.
The current name ofnode_read_prop() is confusing. Follow the naming

dm: ofnode: rename ofnode_read_prop() to ofnode_get_property()

This function returns the pointer to the value of a node property.
The current name ofnode_read_prop() is confusing. Follow the naming
of_get_property() from Linux.

The return type (const u32 *) is wrong. DT property values can be
strings as well as integers. This is why of_get_property/fdt_getprop
returns an opaque pointer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


# 878d68c0 12-Jun-2017 Simon Glass <sjg@chromium.org>

dm: core: Add functions to obtain node's address/size cells

The of_n_addr_cells() and of_n_size_cells() functions are useful for
getting the size of addresses in a node, but in a few places U-Boot n

dm: core: Add functions to obtain node's address/size cells

The of_n_addr_cells() and of_n_size_cells() functions are useful for
getting the size of addresses in a node, but in a few places U-Boot needs
to obtain the actual property value for a node without walking up the
stack. Add functions for this and just the existing code to use it.

Add a comment to the existing ofnode functions which do not do the right
thing with a flat tree.

This fixes a problem reading PCI addresses.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1

show more ...


# bf501595 19-May-2017 Simon Glass <sjg@chromium.org>

dm: pci: Update uclass to support livetree

Update the PCI uclass to support livetree. This mostly involves fixing
the address decoding from the device tree.

Signed-off-by: Simon Glass <sjg@chromium

dm: pci: Update uclass to support livetree

Update the PCI uclass to support livetree. This mostly involves fixing
the address decoding from the device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# c42640c7 08-May-2017 xypron.glpk@gmx.de <xypron.glpk@gmx.de>

pci: avoid memory leak

strdup uses malloc to allocate memory for str.
If we cannot bind to the generic driver we should release
the memory.

The problem was indicated by clang scan-build.

Signed-of

pci: avoid memory leak

strdup uses malloc to allocate memory for str.
If we cannot bind to the generic driver we should release
the memory.

The problem was indicated by clang scan-build.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

show more ...


# 7d67bb1d 04-Apr-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# 0367bd4d 22-Mar-2017 Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

pci: correct a function description

In the description of function pci_match_one_id(), there are some
problems on arguments list and return value description, so correct
them.

Signed-off-by: Hou Zh

pci: correct a function description

In the description of function pci_match_one_id(), there are some
problems on arguments list and return value description, so correct
them.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

show more ...


# 21342d4a 08-Feb-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# e160f7d4 17-Jan-2017 Simon Glass <sjg@chromium.org>

dm: core: Replace of_offset with accessor

At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree,

dm: core: Replace of_offset with accessor

At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree, which uses a node pointer instead, refactor existing code to
access this field through an inline function.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# 423620b9 21-Sep-2016 Tom Rini <trini@konsulko.com>

Merge branch 'master' of git://git.denx.de/u-boot-mips


# 65f62b1c 08-Sep-2016 Paul Burton <paul.burton@imgtec.com>

pci: Flip condition for detecting non-PCI parent devices

In pci_uclass_pre_probe an attempt is made to detect whether the parent
of a device is a PCI device and that the device is thus a bridge. Thi

pci: Flip condition for detecting non-PCI parent devices

In pci_uclass_pre_probe an attempt is made to detect whether the parent
of a device is a PCI device and that the device is thus a bridge. This
was being done by checking whether the parent of the device is of the
UCLASS_ROOT class. This causes problems if the PCI controller is a child
of some other non-PCI node, for example a simple-bus node.

For example, if the device tree contains something like the following
then pci_uclass_pre_probe would incorrectly believe that the PCI
controller is a bridge, with a PCI parent:

/ {
some_child {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <>;

pci_controller: pci@10000000 {
compatible = "my-pci-controller";
device_type = "pci";
reg = <0x10000000 0x2000000>;
};
};
};

Avoid this incorrect detection of bridges by instead checking whether
the parent devices class is UCLASS_PCI and treating a device as a bridge
when this is true, making use of device_is_on_pci_bus to perform this
test.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

show more ...


# fe34b6a4 28-Jul-2016 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# 91195485 05-Jul-2016 Simon Glass <sjg@chromium.org>

dm: Use dm_scan_fdt_dev() directly where possible

Quite a few places have a bind() method which just calls dm_scan_fdt_dev().
We may as well call dm_scan_fdt_dev() directly. Update the code to do th

dm: Use dm_scan_fdt_dev() directly where possible

Quite a few places have a bind() method which just calls dm_scan_fdt_dev().
We may as well call dm_scan_fdt_dev() directly. Update the code to do this.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# 2e3f1ff6 05-Jul-2016 Simon Glass <sjg@chromium.org>

dm: Convert users from dm_scan_fdt_node() to dm_scan_fdt_dev()

This new function is more convenient for callers, and handles pre-relocation
situations automatically.

Signed-off-by: Simon Glass <sjg

dm: Convert users from dm_scan_fdt_node() to dm_scan_fdt_dev()

This new function is more convenient for callers, and handles pre-relocation
situations automatically.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# 6d9f5b03 25-Apr-2016 Yoshinori Sato <ysato@users.sourceforge.jp>

pci: Device scanning range fix

The terminal condition in the area where a PCI device is scanned is wrong,
and 1f.7 isn't scanned.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed

pci: Device scanning range fix

The terminal condition in the area where a PCI device is scanned is wrong,
and 1f.7 isn't scanned.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

show more ...


# 4974a6ff 07-Mar-2016 Simon Glass <sjg@chromium.org>

pci: Correct a few comments and nits

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:

pci: Correct a few comments and nits

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 <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

show more ...


# 319dba1f 07-Mar-2016 Simon Glass <sjg@chromium.org>

pci: Add functions to update PCI configuration registers

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 ste

pci: Add functions to update PCI configuration registers

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 <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

show more ...


# 88033d73 14-Mar-2016 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# 3f603cbb 11-Feb-2016 Simon Glass <sjg@chromium.org>

dm: Use uclass_first_device_err() where it is useful

Use this new function in places where it simplifies the code.

Signed-off-by: Simon Glass <sjg@chromium.org>


1234