1 // SPDX-License-Identifier: GPL-2.0+
3 * pci.c -- WindRiver SBC8349 PCI board support.
4 * Copyright (c) 2006 Wind River Systems, Inc.
5 * Copyright (C) 2006-2009 Freescale Semiconductor, Inc.
7 * Based on MPC8349 PCI support but w/o PIB related code.
16 #include <asm/fsl_i2c.h>
18 static struct pci_region pci1_regions[] = {
20 bus_start: CONFIG_SYS_PCI1_MEM_BASE,
21 phys_start: CONFIG_SYS_PCI1_MEM_PHYS,
22 size: CONFIG_SYS_PCI1_MEM_SIZE,
23 flags: PCI_REGION_MEM | PCI_REGION_PREFETCH
26 bus_start: CONFIG_SYS_PCI1_IO_BASE,
27 phys_start: CONFIG_SYS_PCI1_IO_PHYS,
28 size: CONFIG_SYS_PCI1_IO_SIZE,
32 bus_start: CONFIG_SYS_PCI1_MMIO_BASE,
33 phys_start: CONFIG_SYS_PCI1_MMIO_PHYS,
34 size: CONFIG_SYS_PCI1_MMIO_SIZE,
42 * NOTICE: PCI2 is not supported. There is only one
43 * physical PCI slot on the board.
49 volatile immap_t *immr = (volatile immap_t *)CONFIG_SYS_IMMR;
50 volatile clk83xx_t *clk = (volatile clk83xx_t *)&immr->clk;
51 volatile law83xx_t *pci_law = immr->sysconf.pcilaw;
52 struct pci_region *reg[] = { pci1_regions };
54 /* Enable all 8 PCI_CLK_OUTPUTS */
55 clk->occr = 0xff000000;
58 /* Configure PCI Local Access Windows */
59 pci_law[0].bar = CONFIG_SYS_PCI1_MEM_PHYS & LAWBAR_BAR;
60 pci_law[0].ar = LAWAR_EN | LAWAR_SIZE_1G;
62 pci_law[1].bar = CONFIG_SYS_PCI1_IO_PHYS & LAWBAR_BAR;
63 pci_law[1].ar = LAWAR_EN | LAWAR_SIZE_4M;
67 mpc83xx_pci_init(1, reg);