diff options
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/isa.c | 191 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 2 |
4 files changed, 1 insertions, 196 deletions
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index 029558222c8f..2bd0340b743d 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile | |||
@@ -15,7 +15,7 @@ obj-y := process.o setup.o cpu.o idprom.o \ | |||
15 | visemul.o prom.o of_device.o hvapi.o sstate.o mdesc.o | 15 | visemul.o prom.o of_device.o hvapi.o sstate.o mdesc.o |
16 | 16 | ||
17 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 17 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
18 | obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o \ | 18 | obj-$(CONFIG_PCI) += ebus.o pci_common.o \ |
19 | pci_psycho.o pci_sabre.o pci_schizo.o \ | 19 | pci_psycho.o pci_sabre.o pci_schizo.o \ |
20 | pci_sun4v.o pci_sun4v_asm.o pci_fire.o | 20 | pci_sun4v.o pci_sun4v_asm.o pci_fire.o |
21 | obj-$(CONFIG_PCI_MSI) += pci_msi.o | 21 | obj-$(CONFIG_PCI_MSI) += pci_msi.o |
diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c deleted file mode 100644 index a2af5ed784c9..000000000000 --- a/arch/sparc64/kernel/isa.c +++ /dev/null | |||
@@ -1,191 +0,0 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/init.h> | ||
3 | #include <linux/pci.h> | ||
4 | #include <linux/slab.h> | ||
5 | #include <asm/oplib.h> | ||
6 | #include <asm/prom.h> | ||
7 | #include <asm/of_device.h> | ||
8 | #include <asm/isa.h> | ||
9 | |||
10 | struct sparc_isa_bridge *isa_chain; | ||
11 | |||
12 | static void __init fatal_err(const char *reason) | ||
13 | { | ||
14 | prom_printf("ISA: fatal error, %s.\n", reason); | ||
15 | } | ||
16 | |||
17 | static void __init report_dev(struct sparc_isa_device *isa_dev, int child) | ||
18 | { | ||
19 | if (child) | ||
20 | printk(" (%s)", isa_dev->prom_node->name); | ||
21 | else | ||
22 | printk(" [%s", isa_dev->prom_node->name); | ||
23 | } | ||
24 | |||
25 | static void __init isa_dev_get_resource(struct sparc_isa_device *isa_dev) | ||
26 | { | ||
27 | struct of_device *op = of_find_device_by_node(isa_dev->prom_node); | ||
28 | |||
29 | memcpy(&isa_dev->resource, &op->resource[0], sizeof(struct resource)); | ||
30 | } | ||
31 | |||
32 | static void __init isa_dev_get_irq(struct sparc_isa_device *isa_dev) | ||
33 | { | ||
34 | struct of_device *op = of_find_device_by_node(isa_dev->prom_node); | ||
35 | |||
36 | if (!op || !op->num_irqs) { | ||
37 | isa_dev->irq = PCI_IRQ_NONE; | ||
38 | } else { | ||
39 | isa_dev->irq = op->irqs[0]; | ||
40 | } | ||
41 | } | ||
42 | |||
43 | static void __init isa_fill_children(struct sparc_isa_device *parent_isa_dev) | ||
44 | { | ||
45 | struct device_node *dp = parent_isa_dev->prom_node->child; | ||
46 | |||
47 | if (!dp) | ||
48 | return; | ||
49 | |||
50 | printk(" ->"); | ||
51 | while (dp) { | ||
52 | struct sparc_isa_device *isa_dev; | ||
53 | |||
54 | isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL); | ||
55 | if (!isa_dev) { | ||
56 | fatal_err("cannot allocate child isa_dev"); | ||
57 | prom_halt(); | ||
58 | } | ||
59 | |||
60 | /* Link it in to parent. */ | ||
61 | isa_dev->next = parent_isa_dev->child; | ||
62 | parent_isa_dev->child = isa_dev; | ||
63 | |||
64 | isa_dev->bus = parent_isa_dev->bus; | ||
65 | isa_dev->prom_node = dp; | ||
66 | |||
67 | isa_dev_get_resource(isa_dev); | ||
68 | isa_dev_get_irq(isa_dev); | ||
69 | |||
70 | report_dev(isa_dev, 1); | ||
71 | |||
72 | dp = dp->sibling; | ||
73 | } | ||
74 | } | ||
75 | |||
76 | static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br) | ||
77 | { | ||
78 | struct device_node *dp = isa_br->prom_node->child; | ||
79 | |||
80 | while (dp) { | ||
81 | struct sparc_isa_device *isa_dev; | ||
82 | struct dev_archdata *sd; | ||
83 | |||
84 | isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL); | ||
85 | if (!isa_dev) { | ||
86 | printk(KERN_DEBUG "ISA: cannot allocate isa_dev"); | ||
87 | return; | ||
88 | } | ||
89 | |||
90 | sd = &isa_dev->ofdev.dev.archdata; | ||
91 | sd->prom_node = dp; | ||
92 | sd->op = &isa_dev->ofdev; | ||
93 | sd->iommu = isa_br->ofdev.dev.parent->archdata.iommu; | ||
94 | sd->stc = isa_br->ofdev.dev.parent->archdata.stc; | ||
95 | sd->numa_node = isa_br->ofdev.dev.parent->archdata.numa_node; | ||
96 | |||
97 | isa_dev->ofdev.node = dp; | ||
98 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; | ||
99 | isa_dev->ofdev.dev.bus = &isa_bus_type; | ||
100 | sprintf(isa_dev->ofdev.dev.bus_id, "isa[%08x]", dp->node); | ||
101 | |||
102 | /* Register with core */ | ||
103 | if (of_device_register(&isa_dev->ofdev) != 0) { | ||
104 | printk(KERN_DEBUG "isa: device registration error for %s!\n", | ||
105 | dp->path_component_name); | ||
106 | kfree(isa_dev); | ||
107 | goto next_sibling; | ||
108 | } | ||
109 | |||
110 | /* Link it in. */ | ||
111 | isa_dev->next = NULL; | ||
112 | if (isa_br->devices == NULL) { | ||
113 | isa_br->devices = isa_dev; | ||
114 | } else { | ||
115 | struct sparc_isa_device *tmp = isa_br->devices; | ||
116 | |||
117 | while (tmp->next) | ||
118 | tmp = tmp->next; | ||
119 | |||
120 | tmp->next = isa_dev; | ||
121 | } | ||
122 | |||
123 | isa_dev->bus = isa_br; | ||
124 | isa_dev->prom_node = dp; | ||
125 | |||
126 | isa_dev_get_resource(isa_dev); | ||
127 | isa_dev_get_irq(isa_dev); | ||
128 | |||
129 | report_dev(isa_dev, 0); | ||
130 | |||
131 | isa_fill_children(isa_dev); | ||
132 | |||
133 | printk("]"); | ||
134 | |||
135 | next_sibling: | ||
136 | dp = dp->sibling; | ||
137 | } | ||
138 | } | ||
139 | |||
140 | void __init isa_init(void) | ||
141 | { | ||
142 | struct pci_dev *pdev; | ||
143 | unsigned short vendor, device; | ||
144 | int index = 0; | ||
145 | |||
146 | vendor = PCI_VENDOR_ID_AL; | ||
147 | device = PCI_DEVICE_ID_AL_M1533; | ||
148 | |||
149 | pdev = NULL; | ||
150 | while ((pdev = pci_get_device(vendor, device, pdev)) != NULL) { | ||
151 | struct sparc_isa_bridge *isa_br; | ||
152 | struct device_node *dp; | ||
153 | |||
154 | dp = pci_device_to_OF_node(pdev); | ||
155 | |||
156 | isa_br = kzalloc(sizeof(*isa_br), GFP_KERNEL); | ||
157 | if (!isa_br) { | ||
158 | printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge"); | ||
159 | pci_dev_put(pdev); | ||
160 | return; | ||
161 | } | ||
162 | |||
163 | isa_br->ofdev.node = dp; | ||
164 | isa_br->ofdev.dev.parent = &pdev->dev; | ||
165 | isa_br->ofdev.dev.bus = &isa_bus_type; | ||
166 | sprintf(isa_br->ofdev.dev.bus_id, "isa%d", index); | ||
167 | |||
168 | /* Register with core */ | ||
169 | if (of_device_register(&isa_br->ofdev) != 0) { | ||
170 | printk(KERN_DEBUG "isa: device registration error for %s!\n", | ||
171 | dp->path_component_name); | ||
172 | kfree(isa_br); | ||
173 | pci_dev_put(pdev); | ||
174 | return; | ||
175 | } | ||
176 | |||
177 | /* Link it in. */ | ||
178 | isa_br->next = isa_chain; | ||
179 | isa_chain = isa_br; | ||
180 | |||
181 | isa_br->self = pdev; | ||
182 | isa_br->index = index++; | ||
183 | isa_br->prom_node = dp; | ||
184 | |||
185 | printk("isa%d:", isa_br->index); | ||
186 | |||
187 | isa_fill_devices(isa_br); | ||
188 | |||
189 | printk("\n"); | ||
190 | } | ||
191 | } | ||
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 49f912766519..dbf2fc2f4d87 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
25 | #include <asm/ebus.h> | 25 | #include <asm/ebus.h> |
26 | #include <asm/isa.h> | ||
27 | #include <asm/prom.h> | 26 | #include <asm/prom.h> |
28 | #include <asm/apb.h> | 27 | #include <asm/apb.h> |
29 | 28 | ||
@@ -885,7 +884,6 @@ static int __init pcibios_init(void) | |||
885 | 884 | ||
886 | pci_scan_each_controller_bus(); | 885 | pci_scan_each_controller_bus(); |
887 | 886 | ||
888 | isa_init(); | ||
889 | ebus_init(); | 887 | ebus_init(); |
890 | power_init(); | 888 | power_init(); |
891 | 889 | ||
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 66336590e830..8ac0b99f2c55 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #endif | 49 | #endif |
50 | #ifdef CONFIG_PCI | 50 | #ifdef CONFIG_PCI |
51 | #include <asm/ebus.h> | 51 | #include <asm/ebus.h> |
52 | #include <asm/isa.h> | ||
53 | #endif | 52 | #endif |
54 | #include <asm/ns87303.h> | 53 | #include <asm/ns87303.h> |
55 | #include <asm/timer.h> | 54 | #include <asm/timer.h> |
@@ -187,7 +186,6 @@ EXPORT_SYMBOL(insw); | |||
187 | EXPORT_SYMBOL(insl); | 186 | EXPORT_SYMBOL(insl); |
188 | #ifdef CONFIG_PCI | 187 | #ifdef CONFIG_PCI |
189 | EXPORT_SYMBOL(ebus_chain); | 188 | EXPORT_SYMBOL(ebus_chain); |
190 | EXPORT_SYMBOL(isa_chain); | ||
191 | EXPORT_SYMBOL(pci_alloc_consistent); | 189 | EXPORT_SYMBOL(pci_alloc_consistent); |
192 | EXPORT_SYMBOL(pci_free_consistent); | 190 | EXPORT_SYMBOL(pci_free_consistent); |
193 | EXPORT_SYMBOL(pci_map_single); | 191 | EXPORT_SYMBOL(pci_map_single); |