aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-08-17 10:26:40 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-09-13 16:45:03 -0400
commit7f50382dc87988d618f2d47364b22ad5973a968d (patch)
tree905fa21b31fd76cb8893b682d1608858854a4031 /arch/powerpc/platforms/85xx
parent16d24060d1df9e38dd11ffb0a8afcb5e69a08e3c (diff)
[POWERPC] 85xx: Clean up from 85xx_ds rename
Renamed functions in 85xx_ds from 8544 to 85xx. Kept an unique machine def/probe for the MPC8544 DS board to handle some subtle differences between the future board based on the DS platform. Also fixed building w/o CONFIG_PCI and minor whitespace fixes. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/85xx')
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 48983bc56d46..3a5c3c47653c 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * MPC8544 DS Board Setup 2 * MPC85xx DS Board Setup
3 * 3 *
4 * Author Xianghua Xiao (x.xiao@freescale.com) 4 * Author Xianghua Xiao (x.xiao@freescale.com)
5 * Roy Zang <tie-fei.zang@freescale.com> 5 * Roy Zang <tie-fei.zang@freescale.com>
@@ -44,7 +44,7 @@
44#endif 44#endif
45 45
46#ifdef CONFIG_PPC_I8259 46#ifdef CONFIG_PPC_I8259
47static void mpc8544_8259_cascade(unsigned int irq, struct irq_desc *desc) 47static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
48{ 48{
49 unsigned int cascade_irq = i8259_irq(); 49 unsigned int cascade_irq = i8259_irq();
50 50
@@ -55,7 +55,7 @@ static void mpc8544_8259_cascade(unsigned int irq, struct irq_desc *desc)
55} 55}
56#endif /* CONFIG_PPC_I8259 */ 56#endif /* CONFIG_PPC_I8259 */
57 57
58void __init mpc8544_ds_pic_init(void) 58void __init mpc85xx_ds_pic_init(void)
59{ 59{
60 struct mpic *mpic; 60 struct mpic *mpic;
61 struct resource r; 61 struct resource r;
@@ -104,16 +104,17 @@ void __init mpc8544_ds_pic_init(void)
104 return; 104 return;
105 } 105 }
106 106
107 DBG("mpc8544ds: cascade mapped to irq %d\n", cascade_irq); 107 DBG("mpc85xxds: cascade mapped to irq %d\n", cascade_irq);
108 108
109 i8259_init(cascade_node, 0); 109 i8259_init(cascade_node, 0);
110 of_node_put(cascade_node); 110 of_node_put(cascade_node);
111 111
112 set_irq_chained_handler(cascade_irq, mpc8544_8259_cascade); 112 set_irq_chained_handler(cascade_irq, mpc85xx_8259_cascade);
113#endif /* CONFIG_PPC_I8259 */ 113#endif /* CONFIG_PPC_I8259 */
114} 114}
115 115
116#ifdef CONFIG_PCI 116#ifdef CONFIG_PCI
117static int primary_phb_addr;
117extern int uses_fsl_uli_m1575; 118extern int uses_fsl_uli_m1575;
118extern int uli_exclude_device(struct pci_controller *hose, 119extern int uli_exclude_device(struct pci_controller *hose,
119 u_char bus, u_char devfn); 120 u_char bus, u_char devfn);
@@ -121,13 +122,13 @@ extern int uli_exclude_device(struct pci_controller *hose,
121static int mpc85xx_exclude_device(struct pci_controller *hose, 122static int mpc85xx_exclude_device(struct pci_controller *hose,
122 u_char bus, u_char devfn) 123 u_char bus, u_char devfn)
123{ 124{
124 struct device_node* node; 125 struct device_node* node;
125 struct resource rsrc; 126 struct resource rsrc;
126 127
127 node = (struct device_node *)hose->arch_data; 128 node = (struct device_node *)hose->arch_data;
128 of_address_to_resource(node, 0, &rsrc); 129 of_address_to_resource(node, 0, &rsrc);
129 130
130 if ((rsrc.start & 0xfffff) == 0xb000) { 131 if ((rsrc.start & 0xfffff) == primary_phb_addr) {
131 return uli_exclude_device(hose, bus, devfn); 132 return uli_exclude_device(hose, bus, devfn);
132 } 133 }
133 134
@@ -138,20 +139,20 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
138/* 139/*
139 * Setup the architecture 140 * Setup the architecture
140 */ 141 */
141static void __init mpc8544_ds_setup_arch(void) 142static void __init mpc85xx_ds_setup_arch(void)
142{ 143{
143#ifdef CONFIG_PCI 144#ifdef CONFIG_PCI
144 struct device_node *np; 145 struct device_node *np;
145#endif 146#endif
146 147
147 if (ppc_md.progress) 148 if (ppc_md.progress)
148 ppc_md.progress("mpc8544_ds_setup_arch()", 0); 149 ppc_md.progress("mpc85xx_ds_setup_arch()", 0);
149 150
150#ifdef CONFIG_PCI 151#ifdef CONFIG_PCI
151 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { 152 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
152 struct resource rsrc; 153 struct resource rsrc;
153 of_address_to_resource(np, 0, &rsrc); 154 of_address_to_resource(np, 0, &rsrc);
154 if ((rsrc.start & 0xfffff) == 0xb000) 155 if ((rsrc.start & 0xfffff) == primary_phb_addr)
155 fsl_add_bridge(np, 1); 156 fsl_add_bridge(np, 1);
156 else 157 else
157 fsl_add_bridge(np, 0); 158 fsl_add_bridge(np, 0);
@@ -160,7 +161,7 @@ static void __init mpc8544_ds_setup_arch(void)
160 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 161 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
161#endif 162#endif
162 163
163 printk("MPC8544 DS board from Freescale Semiconductor\n"); 164 printk("MPC85xx DS board from Freescale Semiconductor\n");
164} 165}
165 166
166/* 167/*
@@ -170,14 +171,21 @@ static int __init mpc8544_ds_probe(void)
170{ 171{
171 unsigned long root = of_get_flat_dt_root(); 172 unsigned long root = of_get_flat_dt_root();
172 173
173 return of_flat_dt_is_compatible(root, "MPC8544DS"); 174 if (of_flat_dt_is_compatible(root, "MPC8544DS")) {
175#ifdef CONFIG_PCI
176 primary_phb_addr = 0xb000;
177#endif
178 return 1;
179 } else {
180 return 0;
181 }
174} 182}
175 183
176define_machine(mpc8544_ds) { 184define_machine(mpc8544_ds) {
177 .name = "MPC8544 DS", 185 .name = "MPC8544 DS",
178 .probe = mpc8544_ds_probe, 186 .probe = mpc8544_ds_probe,
179 .setup_arch = mpc8544_ds_setup_arch, 187 .setup_arch = mpc85xx_ds_setup_arch,
180 .init_IRQ = mpc8544_ds_pic_init, 188 .init_IRQ = mpc85xx_ds_pic_init,
181#ifdef CONFIG_PCI 189#ifdef CONFIG_PCI
182 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 190 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
183#endif 191#endif