Hi Bin,
On 11.02.19 04:25, Bin Meng wrote:
Hi Stefan,
On Thu, Jan 31, 2019 at 10:41 PM Bin Meng <bmeng...@gmail.com> wrote:
Hi Stefan,
On Fri, Jan 25, 2019 at 6:53 PM Stefan Roese <s...@denx.de> wrote:
This patch adds DM_PCI support to the MVEBU PCIe driver. This is
necessary, since all PCI drivers have to be moved to DM (driver model)
until the v2019.07 release.
To not break git bisect'ablility, this patch also moves CONFIG_PCI_MVEBU
from config headers to the defconfig files.
Signed-off-by: Stefan Roese <s...@denx.de>
Cc: Dirk Eibach <dirk.eib...@gdsys.cc>
Cc: Mario Six <mario....@gdsys.cc>
Cc: Chris Packham <chris.pack...@alliedtelesis.co.nz>
Cc: Phil Sutter <p...@nwl.cc>
Cc: Marek BehĂșn <marek.be...@nic.cz>
Cc: VlaoMao <vlao...@gmail.com>
---
v3:
- Add x530 defconfig / config/foo.h changes
- Remove misleading function comment
- Use PCI_DEV instead of PCI_SLOT
- Introduce mvebu_pcie_ofdata_to_platdata() to remove most functions
from the loop in mvebu_pcie_bind(). This also enables to usage of
a udevice pointer for the newly introduced function pci_get_devfn()
v2:
- Completely configure the controller based on DT properties. Now
port and lane are read from the DT nodes and also the tgt and
attr values are generated using the DT similar to how this is
done in the Linux driver version. All A38x / XP specific defines
can now be removed from this driver because of this.
- Please note that now the board specific dts file needs to enable
the used PCIe ports, as this is also done in Linux.
configs/clearfog_defconfig | 1 +
configs/controlcenterdc_defconfig | 3 +
configs/db-88f6820-amc_defconfig | 1 +
configs/db-88f6820-gp_defconfig | 1 +
configs/db-mv784mp-gp_defconfig | 1 +
configs/ds414_defconfig | 1 +
configs/theadorable_debug_defconfig | 2 +
configs/turris_omnia_defconfig | 3 +-
configs/x530_defconfig | 3 +-
drivers/pci/Kconfig | 9 +
drivers/pci/pci_mvebu.c | 470 ++++++++++++++++------------
include/configs/clearfog.h | 1 -
include/configs/controlcenterdc.h | 3 -
include/configs/db-88f6820-amc.h | 1 -
include/configs/db-88f6820-gp.h | 1 -
include/configs/db-mv784mp-gp.h | 1 -
include/configs/ds414.h | 1 -
include/configs/theadorable.h | 7 -
include/configs/turris_omnia.h | 1 -
include/configs/x530.h | 1 -
scripts/config_whitelist.txt | 1 -
21 files changed, 296 insertions(+), 217 deletions(-)
[snip]
+static int mvebu_get_tgt_attr(ofnode node, int devfn,
+ unsigned long type,
+ unsigned int *tgt,
+ unsigned int *attr)
+{
+ const int na = 3, ns = 2;
+ const __be32 *range;
+ int rlen, nranges, rangesz, pna, i;
+
+ *tgt = -1;
+ *attr = -1;
+
+ range = ofnode_get_property(node, "ranges", &rlen);
+ if (!range)
+ return -EINVAL;
+
+ pna = 2; /* hardcoded for now because of lack of of_n_addr_cells() */
Why? U-Boot has of_n_addr_cells() API.
Is this comment addressed?
I did send an answer ~ one week ago:
https://www.mail-archive.com/u-boot@lists.denx.de/msg314633.html
I'll send a patch to add the comment shortly.
Thanks,
Stefan
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot