]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/powerpc/cpu/mpc824x/pci.c
mpc8260: remove atc board support
[people/ms/u-boot.git] / arch / powerpc / cpu / mpc824x / pci.c
CommitLineData
c609719b 1/*
a47a12be 2 * arch/powerpc/kernel/mpc10x_common.c
c609719b
WD
3 *
4 * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge,
5 * Mem ctlr, EPIC, etc.
6 *
7 * Author: Mark A. Greer
8 * mgreer@mvista.com
9 *
10 * Copyright 2001 MontaVista Software Inc.
11 *
1a459660 12 * SPDX-License-Identifier: GPL-2.0+
c609719b
WD
13 */
14
15#include <common.h>
16
17#ifdef CONFIG_PCI
18
19#include <asm/processor.h>
20#include <asm/io.h>
21#include <pci.h>
22#include <mpc824x.h>
23
24void pci_mpc824x_init (struct pci_controller *hose)
25{
26 hose->first_busno = 0;
27 hose->last_busno = 0xff;
28
29 /* System memory space */
30 pci_set_region(hose->regions + 0,
31 CHRP_PCI_MEMORY_BUS,
32 CHRP_PCI_MEMORY_PHYS,
33 CHRP_PCI_MEMORY_SIZE,
ff4e66e9 34 PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
c609719b
WD
35
36 /* PCI memory space */
37 pci_set_region(hose->regions + 1,
38 CHRP_PCI_MEM_BUS,
39 CHRP_PCI_MEM_PHYS,
40 CHRP_PCI_MEM_SIZE,
41 PCI_REGION_MEM);
42
43 /* ISA/PCI memory space */
44 pci_set_region(hose->regions + 2,
45 CHRP_ISA_MEM_BUS,
46 CHRP_ISA_MEM_PHYS,
47 CHRP_ISA_MEM_SIZE,
48 PCI_REGION_MEM);
49
50 /* PCI I/O space */
51 pci_set_region(hose->regions + 3,
52 CHRP_PCI_IO_BUS,
53 CHRP_PCI_IO_PHYS,
54 CHRP_PCI_IO_SIZE,
55 PCI_REGION_IO);
56
57 /* ISA/PCI I/O space */
58 pci_set_region(hose->regions + 4,
59 CHRP_ISA_IO_BUS,
60 CHRP_ISA_IO_PHYS,
61 CHRP_ISA_IO_SIZE,
62 PCI_REGION_IO);
63
64 hose->region_count = 5;
65
66 pci_setup_indirect(hose,
67 CHRP_REG_ADDR,
68 CHRP_REG_DATA);
69
70 pci_register_hose(hose);
71
72 hose->last_busno = pci_hose_scan(hose);
73}
74
75#endif