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 | |
| 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>
| -rw-r--r-- | arch/powerpc/platforms/52xx/lite5200.c | 29 | ||||
| -rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_common.c | 4 | ||||
| -rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_pic.c | 10 | ||||
| -rw-r--r-- | drivers/ata/pata_mpc52xx.c | 6 | ||||
| -rw-r--r-- | drivers/serial/mpc52xx_uart.c | 5 |
5 files changed, 26 insertions, 28 deletions
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index cdb16bfa6ca6..cc3b40de21dd 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 | }; |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c index cc40889074bd..ed0cb694aea8 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c | |||
| @@ -83,8 +83,8 @@ mpc52xx_setup_cpu(void) | |||
| 83 | struct mpc52xx_xlb __iomem *xlb; | 83 | struct mpc52xx_xlb __iomem *xlb; |
| 84 | 84 | ||
| 85 | /* Map zones */ | 85 | /* Map zones */ |
| 86 | cdm = mpc52xx_find_and_map("mpc52xx-cdm"); | 86 | cdm = mpc52xx_find_and_map("mpc5200-cdm"); |
| 87 | xlb = mpc52xx_find_and_map("mpc52xx-xlb"); | 87 | xlb = mpc52xx_find_and_map("mpc5200-xlb"); |
| 88 | 88 | ||
| 89 | if (!cdm || !xlb) { | 89 | if (!cdm || !xlb) { |
| 90 | printk(KERN_ERR __FILE__ ": " | 90 | printk(KERN_ERR __FILE__ ": " |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index cd91a6c3aafa..c75192567e55 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
| @@ -383,16 +383,16 @@ void __init mpc52xx_init_irq(void) | |||
| 383 | struct device_node *picnode; | 383 | struct device_node *picnode; |
| 384 | 384 | ||
| 385 | /* Remap the necessary zones */ | 385 | /* Remap the necessary zones */ |
| 386 | picnode = of_find_compatible_node(NULL, NULL, "mpc52xx-pic"); | 386 | picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic"); |
| 387 | 387 | ||
| 388 | intr = mpc52xx_find_and_map("mpc52xx-pic"); | 388 | intr = mpc52xx_find_and_map("mpc5200-pic"); |
| 389 | if (!intr) | 389 | if (!intr) |
| 390 | panic(__FILE__ ": find_and_map failed on 'mpc52xx-pic'. " | 390 | panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. " |
| 391 | "Check node !"); | 391 | "Check node !"); |
| 392 | 392 | ||
| 393 | sdma = mpc52xx_find_and_map("mpc52xx-bestcomm"); | 393 | sdma = mpc52xx_find_and_map("mpc5200-bestcomm"); |
| 394 | if (!sdma) | 394 | if (!sdma) |
| 395 | panic(__FILE__ ": find_and_map failed on 'mpc52xx-bestcomm'. " | 395 | panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. " |
| 396 | "Check node !"); | 396 | "Check node !"); |
| 397 | 397 | ||
| 398 | /* Disable all interrupt sources. */ | 398 | /* Disable all interrupt sources. */ |
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c index d7378df44970..29e1809e5ecf 100644 --- a/drivers/ata/pata_mpc52xx.c +++ b/drivers/ata/pata_mpc52xx.c | |||
| @@ -484,10 +484,8 @@ mpc52xx_ata_resume(struct of_device *op) | |||
| 484 | 484 | ||
| 485 | static struct of_device_id mpc52xx_ata_of_match[] = { | 485 | static struct of_device_id mpc52xx_ata_of_match[] = { |
| 486 | { | 486 | { |
| 487 | .compatible = "mpc5200-ata", | 487 | .type = "ata", |
| 488 | }, | 488 | .compatible = "mpc5200-ata", |
| 489 | { | ||
| 490 | .compatible = "mpc52xx-ata", | ||
| 491 | }, | 489 | }, |
| 492 | {}, | 490 | {}, |
| 493 | }; | 491 | }; |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 3c4b6c243712..955bbd653e22 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
| @@ -127,8 +127,7 @@ static irqreturn_t mpc52xx_uart_int(int irq,void *dev_id); | |||
| 127 | 127 | ||
| 128 | #if defined(CONFIG_PPC_MERGE) | 128 | #if defined(CONFIG_PPC_MERGE) |
| 129 | static struct of_device_id mpc52xx_uart_of_match[] = { | 129 | static struct of_device_id mpc52xx_uart_of_match[] = { |
| 130 | { .type = "serial", .compatible = "mpc52xx-psc-uart", }, | 130 | { .type = "serial", .compatible = "mpc5200-psc-uart", }, |
| 131 | { .type = "serial", .compatible = "mpc5200-psc", }, /* Efika only! */ | ||
| 132 | {}, | 131 | {}, |
| 133 | }; | 132 | }; |
| 134 | #endif | 133 | #endif |
| @@ -1068,7 +1067,7 @@ mpc52xx_uart_of_enumerate(void) | |||
| 1068 | continue; | 1067 | continue; |
| 1069 | 1068 | ||
| 1070 | /* Is a particular device number requested? */ | 1069 | /* Is a particular device number requested? */ |
| 1071 | devno = get_property(np, "device_no", NULL); | 1070 | devno = get_property(np, "port-number", NULL); |
| 1072 | mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1); | 1071 | mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1); |
| 1073 | } | 1072 | } |
| 1074 | 1073 | ||
