1
2
3
4
5
6
7
8
9
10
11
12
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
30 pci_set_region(hose->regions + 0,
31 CHRP_PCI_MEMORY_BUS,
32 CHRP_PCI_MEMORY_PHYS,
33 CHRP_PCI_MEMORY_SIZE,
34 PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
35
36
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
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
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
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
76