diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2007-02-12 15:36:55 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-12 23:35:53 -0500 |
commit | e3aba81d154c53a82e2a7e0ff5e7f1162a53cf27 (patch) | |
tree | ec6728bd17cef43cf98e7bd37db90133485898bc /arch/powerpc/platforms/52xx/lite5200.c | |
parent | 40d244d69a3871dd05a5fdae29f36823a6ee3e33 (diff) |
[POWERPC] Fixup mp5200 drivers to match device tree changes
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/52xx/lite5200.c')
-rw-r--r-- | arch/powerpc/platforms/52xx/lite5200.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index cdb16bfa6ca..cc3b40de21d 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c | |||
@@ -51,13 +51,13 @@ | |||
51 | */ | 51 | */ |
52 | 52 | ||
53 | static void __init | 53 | static void __init |
54 | lite52xx_setup_cpu(void) | 54 | lite5200_setup_cpu(void) |
55 | { | 55 | { |
56 | struct mpc52xx_gpio __iomem *gpio; | 56 | struct mpc52xx_gpio __iomem *gpio; |
57 | u32 port_config; | 57 | u32 port_config; |
58 | 58 | ||
59 | /* Map zones */ | 59 | /* Map zones */ |
60 | gpio = mpc52xx_find_and_map("mpc52xx-gpio"); | 60 | gpio = mpc52xx_find_and_map("mpc5200-gpio"); |
61 | if (!gpio) { | 61 | if (!gpio) { |
62 | printk(KERN_ERR __FILE__ ": " | 62 | printk(KERN_ERR __FILE__ ": " |
63 | "Error while mapping GPIO register for port config. " | 63 | "Error while mapping GPIO register for port config. " |
@@ -85,12 +85,12 @@ error: | |||
85 | iounmap(gpio); | 85 | iounmap(gpio); |
86 | } | 86 | } |
87 | 87 | ||
88 | static void __init lite52xx_setup_arch(void) | 88 | static void __init lite5200_setup_arch(void) |
89 | { | 89 | { |
90 | struct device_node *np; | 90 | struct device_node *np; |
91 | 91 | ||
92 | if (ppc_md.progress) | 92 | if (ppc_md.progress) |
93 | ppc_md.progress("lite52xx_setup_arch()", 0); | 93 | ppc_md.progress("lite5200_setup_arch()", 0); |
94 | 94 | ||
95 | np = of_find_node_by_type(NULL, "cpu"); | 95 | np = of_find_node_by_type(NULL, "cpu"); |
96 | if (np) { | 96 | if (np) { |
@@ -105,7 +105,7 @@ static void __init lite52xx_setup_arch(void) | |||
105 | 105 | ||
106 | /* CPU & Port mux setup */ | 106 | /* CPU & Port mux setup */ |
107 | mpc52xx_setup_cpu(); /* Generic */ | 107 | mpc52xx_setup_cpu(); /* Generic */ |
108 | lite52xx_setup_cpu(); /* Platorm specific */ | 108 | lite5200_setup_cpu(); /* Platorm specific */ |
109 | 109 | ||
110 | #ifdef CONFIG_PCI | 110 | #ifdef CONFIG_PCI |
111 | np = of_find_node_by_type(np, "pci"); | 111 | np = of_find_node_by_type(np, "pci"); |
@@ -126,7 +126,7 @@ static void __init lite52xx_setup_arch(void) | |||
126 | 126 | ||
127 | } | 127 | } |
128 | 128 | ||
129 | void lite52xx_show_cpuinfo(struct seq_file *m) | 129 | void lite5200_show_cpuinfo(struct seq_file *m) |
130 | { | 130 | { |
131 | struct device_node* np = of_find_all_nodes(NULL); | 131 | struct device_node* np = of_find_all_nodes(NULL); |
132 | const char *model = NULL; | 132 | const char *model = NULL; |
@@ -143,25 +143,26 @@ void lite52xx_show_cpuinfo(struct seq_file *m) | |||
143 | /* | 143 | /* |
144 | * Called very early, MMU is off, device-tree isn't unflattened | 144 | * Called very early, MMU is off, device-tree isn't unflattened |
145 | */ | 145 | */ |
146 | static int __init lite52xx_probe(void) | 146 | static int __init lite5200_probe(void) |
147 | { | 147 | { |
148 | unsigned long node = of_get_flat_dt_root(); | 148 | unsigned long node = of_get_flat_dt_root(); |
149 | const char *model = of_get_flat_dt_prop(node, "model", NULL); | 149 | const char *model = of_get_flat_dt_prop(node, "model", NULL); |
150 | 150 | ||
151 | if (!of_flat_dt_is_compatible(node, "lite52xx")) | 151 | if (!of_flat_dt_is_compatible(node, "fsl,lite5200") && |
152 | !of_flat_dt_is_compatible(node, "fsl,lite5200b")) | ||
152 | return 0; | 153 | return 0; |
153 | pr_debug("%s board w/ mpc52xx found\n", model ? model : "unknown"); | 154 | pr_debug("%s board found\n", model ? model : "unknown"); |
154 | 155 | ||
155 | return 1; | 156 | return 1; |
156 | } | 157 | } |
157 | 158 | ||
158 | define_machine(lite52xx) { | 159 | define_machine(lite5200) { |
159 | .name = "lite52xx", | 160 | .name = "lite5200", |
160 | .probe = lite52xx_probe, | 161 | .probe = lite5200_probe, |
161 | .setup_arch = lite52xx_setup_arch, | 162 | .setup_arch = lite5200_setup_arch, |
162 | .init = mpc52xx_declare_of_platform_devices, | 163 | .init = mpc52xx_declare_of_platform_devices, |
163 | .init_IRQ = mpc52xx_init_irq, | 164 | .init_IRQ = mpc52xx_init_irq, |
164 | .get_irq = mpc52xx_get_irq, | 165 | .get_irq = mpc52xx_get_irq, |
165 | .show_cpuinfo = lite52xx_show_cpuinfo, | 166 | .show_cpuinfo = lite5200_show_cpuinfo, |
166 | .calibrate_decr = generic_calibrate_decr, | 167 | .calibrate_decr = generic_calibrate_decr, |
167 | }; | 168 | }; |