Shawn Lin 7620167fdb arm64: dts: rockchip: rk3568: Fix all wrong RID and MSI(-x) mappings
For hierarchy root complexes under same PCIe domain:

		domain N
	root bridge bus(BDF: 00:00.0)
--------------------------------------------
 RC1(01:00.0)	RC2(N+1:00.0)	RC3(N+N+1:00.0)
 |		 |		 |
---             ---             ---
...		...		...

Dev1(last N)   Dev2(last M)     Dev3

They can assign all bus ranges from zero, and the bridge
will scan RCs and take over all the bus assign from top on.
So the the unique requester ID(namely bdf) will be assigned
to each device.

But for seperate RCs without root bridge bus, we should
carefully assigne bus ranges for MSI(-x) mappings. MSI
controller should be in the following format:

msi-map = < rid-base, //first RID matched by the entry
	    msi-controller,
	    msi-base, //msi-specifier 1st RID matched entry
	    length>   //how many consecutive RIDs are matched

rid-base is formated as 1 byte of bus + 1 byte of dev and
function number. And it's the same for filter of mapping
for msi-base.

For this platform:

domain 0 --RC1(00:00.0) --- Dev1(01:00.0) |
			--- Dev2(02:00.0) |____ 0x0 ~ 0xf
			....		  |
			--- DevN(0f:00.0) |

For reguster ID(BDF) under this RC, we should assigne
RID base from 0x0. Length is 16 buses, name 0x10, and
the lower bytes is 0x00 for DF. So all the RID is 0x0000.
Also the RID base should be equal to out-base.

For PCIe2x1, we limit buses from 0x0 to 0xf, ID mapping
looks like:

msi-map = <0x0000 &its 0x0000 0x1000>;
           RID        out-base length

Any BDF under PCIe2x1 was allocated and hit the mapping vects
and entry between 0x0000 and 0x0000 + 0x1000.

domain 1 --RC2(10:00.0) --- Dev1(11:00.0) |
			--- Dev2(12:00.0) |____ 0x10 ~ 0x1f
			....		  |
			--- DevN(1f:00.0) |

For reguster ID(BDF) under this RC, we should assigne
RID base from 0x1000. Length is 16 buses, namely 0x10, and
the lower byte is 0x00 for DF. So all the RID is 0x1000.
Also the RID base should be equal to out-base.

For PCIe3x1, we limit buses from 0x10 to 0x1f, ID mapping
looks like:

msi-map = <0x1000 &its 0x1000 0x1000>;
           RID        out-base length

Any BDF under PCIe3x1 was allocated and hit the mapping vects
and entry between 0x1000 and 0x1000 + 0x1000.

domain 2 --RC3(20:00.0) --- Dev1(21:00.0) |
			--- Dev2(22:00.0) |____ 0x20 ~ 0x2f
			....		  |
			--- DevN(2f:00.0) |

For reguster ID(BDF) under this RC, we should assigne
RID base from 0x2000. Length is 16 buses, name 0x10, and
the lower bytes is 0x00 for DF. So all the RID is 0x2000.
Also the RID base should be equal to out-base.

For PCIe3x2, we limit buses from 0x20 to 0x2f, ID mapping
looks like:

msi-map = <0x2000 &its 0x2000 0x1000>;
           RID        out-base length

Any BDF under PCIe3x2 was allocated and hit the mapping vects
and entry between 0x2000 and 0x2000 + 0x1000.

Change-Id: I1fe9f2a6e89fd9a4c055f0a0177be2b38cc10dc6
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-01 14:40:35 +08:00
2020-10-30 12:21:53 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-08-29 19:45:37 +08:00
2019-08-29 19:45:37 +08:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%