mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-20 05:11:30 +02:00
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
// SPDX-License-Identifier: GPL-2.0+ OR X11
|
|
/*
|
|
* Copyright 2019 NXP
|
|
*
|
|
* PCIe Kernel DT fixup of DM U-Boot driver for Freescale PowerPC SoCs
|
|
* Author: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#ifdef CONFIG_OF_BOARD_SETUP
|
|
#include <dm.h>
|
|
#include <fdt_support.h>
|
|
#include <asm/fsl_pci.h>
|
|
#include <linux/libfdt.h>
|
|
#include "pcie_fsl.h"
|
|
|
|
static void ft_fsl_pcie_setup(void *blob, struct fsl_pcie *pcie)
|
|
{
|
|
struct pci_controller *hose = dev_get_uclass_priv(pcie->bus);
|
|
fdt_addr_t regs_addr;
|
|
int off;
|
|
|
|
regs_addr = dev_read_addr(pcie->bus);
|
|
off = fdt_node_offset_by_compat_reg(blob, FSL_PCIE_COMPAT, regs_addr);
|
|
if (off < 0) {
|
|
printf("%s: Fail to find PCIe node@0x%pa\n",
|
|
FSL_PCIE_COMPAT, ®s_addr);
|
|
return;
|
|
}
|
|
|
|
if (!hose || !pcie->enabled)
|
|
fdt_del_node(blob, off);
|
|
else
|
|
fdt_pci_dma_ranges(blob, off, hose);
|
|
}
|
|
|
|
/* Fixup Kernel DT for PCIe */
|
|
void pci_of_setup(void *blob, struct bd_info *bd)
|
|
{
|
|
struct fsl_pcie *pcie;
|
|
|
|
list_for_each_entry(pcie, &fsl_pcie_list, list)
|
|
ft_fsl_pcie_setup(blob, pcie);
|
|
}
|
|
|
|
#else
|
|
void pci_of_setup(void *blob, struct bd_info *bd)
|
|
{
|
|
}
|
|
#endif
|