[POWERPC] Fixup mp5200 drivers to match device tree changes
authorGrant Likely <grant.likely@secretlab.ca>
Mon, 12 Feb 2007 20:36:55 +0000 (13:36 -0700)
committerPaul Mackerras <paulus@samba.org>
Tue, 13 Feb 2007 04:35:53 +0000 (15:35 +1100)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/52xx/lite5200.c
arch/powerpc/platforms/52xx/mpc52xx_common.c
arch/powerpc/platforms/52xx/mpc52xx_pic.c
drivers/ata/pata_mpc52xx.c
drivers/serial/mpc52xx_uart.c

index cdb16bfa6ca67976cc7dfba0499ef4b6839ffc55..cc3b40de21ddf8ef3351694d593568be95601b2a 100644 (file)
  */
 
 static void __init
-lite52xx_setup_cpu(void)
+lite5200_setup_cpu(void)
 {
        struct mpc52xx_gpio __iomem *gpio;
        u32 port_config;
 
        /* Map zones */
-       gpio = mpc52xx_find_and_map("mpc52xx-gpio");
+       gpio = mpc52xx_find_and_map("mpc5200-gpio");
        if (!gpio) {
                printk(KERN_ERR __FILE__ ": "
                        "Error while mapping GPIO register for port config. "
@@ -85,12 +85,12 @@ error:
        iounmap(gpio);
 }
 
-static void __init lite52xx_setup_arch(void)
+static void __init lite5200_setup_arch(void)
 {
        struct device_node *np;
 
        if (ppc_md.progress)
-               ppc_md.progress("lite52xx_setup_arch()", 0);
+               ppc_md.progress("lite5200_setup_arch()", 0);
 
        np = of_find_node_by_type(NULL, "cpu");
        if (np) {
@@ -105,7 +105,7 @@ static void __init lite52xx_setup_arch(void)
 
        /* CPU & Port mux setup */
        mpc52xx_setup_cpu();    /* Generic */
-       lite52xx_setup_cpu();   /* Platorm specific */
+       lite5200_setup_cpu();   /* Platorm specific */
 
 #ifdef CONFIG_PCI
        np = of_find_node_by_type(np, "pci");
@@ -126,7 +126,7 @@ static void __init lite52xx_setup_arch(void)
 
 }
 
-void lite52xx_show_cpuinfo(struct seq_file *m)
+void lite5200_show_cpuinfo(struct seq_file *m)
 {
        struct device_node* np = of_find_all_nodes(NULL);
        const char *model = NULL;
@@ -143,25 +143,26 @@ void lite52xx_show_cpuinfo(struct seq_file *m)
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
-static int __init lite52xx_probe(void)
+static int __init lite5200_probe(void)
 {
        unsigned long node = of_get_flat_dt_root();
        const char *model = of_get_flat_dt_prop(node, "model", NULL);
 
-       if (!of_flat_dt_is_compatible(node, "lite52xx"))
+       if (!of_flat_dt_is_compatible(node, "fsl,lite5200") &&
+           !of_flat_dt_is_compatible(node, "fsl,lite5200b"))
                return 0;
-       pr_debug("%s board w/ mpc52xx found\n", model ? model : "unknown");
+       pr_debug("%s board found\n", model ? model : "unknown");
 
        return 1;
 }
 
-define_machine(lite52xx) {
-       .name           = "lite52xx",
-       .probe          = lite52xx_probe,
-       .setup_arch     = lite52xx_setup_arch,
+define_machine(lite5200) {
+       .name           = "lite5200",
+       .probe          = lite5200_probe,
+       .setup_arch     = lite5200_setup_arch,
        .init           = mpc52xx_declare_of_platform_devices,
        .init_IRQ       = mpc52xx_init_irq,
        .get_irq        = mpc52xx_get_irq,
-       .show_cpuinfo   = lite52xx_show_cpuinfo,
+       .show_cpuinfo   = lite5200_show_cpuinfo,
        .calibrate_decr = generic_calibrate_decr,
 };
index cc40889074bd1f6c88e07a619f40186a047546d3..ed0cb694aea878692e329f941e7ce40aaf0d7a1d 100644 (file)
@@ -83,8 +83,8 @@ mpc52xx_setup_cpu(void)
        struct mpc52xx_xlb  __iomem *xlb;
 
        /* Map zones */
-       cdm = mpc52xx_find_and_map("mpc52xx-cdm");
-       xlb = mpc52xx_find_and_map("mpc52xx-xlb");
+       cdm = mpc52xx_find_and_map("mpc5200-cdm");
+       xlb = mpc52xx_find_and_map("mpc5200-xlb");
 
        if (!cdm || !xlb) {
                printk(KERN_ERR __FILE__ ": "
index cd91a6c3aafa5b90edaaf0cf5c07f1e96871713b..c75192567e5573e2292dfb98f4fc7f433552e1d1 100644 (file)
@@ -383,16 +383,16 @@ void __init mpc52xx_init_irq(void)
        struct device_node *picnode;
 
        /* Remap the necessary zones */
-       picnode = of_find_compatible_node(NULL, NULL, "mpc52xx-pic");
+       picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic");
 
-       intr = mpc52xx_find_and_map("mpc52xx-pic");
+       intr = mpc52xx_find_and_map("mpc5200-pic");
        if (!intr)
-               panic(__FILE__  ": find_and_map failed on 'mpc52xx-pic'. "
+               panic(__FILE__  ": find_and_map failed on 'mpc5200-pic'. "
                                "Check node !");
 
-       sdma = mpc52xx_find_and_map("mpc52xx-bestcomm");
+       sdma = mpc52xx_find_and_map("mpc5200-bestcomm");
        if (!sdma)
-               panic(__FILE__  ": find_and_map failed on 'mpc52xx-bestcomm'. "
+               panic(__FILE__  ": find_and_map failed on 'mpc5200-bestcomm'. "
                                "Check node !");
 
        /* Disable all interrupt sources. */
index d7378df44970bb1856aa52af9af4014e67efcce3..29e1809e5ecf3ce9aea4c7899d3457b64ad4716b 100644 (file)
@@ -484,10 +484,8 @@ mpc52xx_ata_resume(struct of_device *op)
 
 static struct of_device_id mpc52xx_ata_of_match[] = {
        {
-               .compatible = "mpc5200-ata",
-       },
-       {
-               .compatible = "mpc52xx-ata",
+               .type           = "ata",
+               .compatible     = "mpc5200-ata",
        },
        {},
 };
index 3c4b6c24371254b1a8a6bcfa27fa922a6069fc9d..955bbd653e22c0c94764c1503c7f3c1818bcdb9a 100644 (file)
@@ -127,8 +127,7 @@ static irqreturn_t mpc52xx_uart_int(int irq,void *dev_id);
 
 #if defined(CONFIG_PPC_MERGE)
 static struct of_device_id mpc52xx_uart_of_match[] = {
-       { .type = "serial", .compatible = "mpc52xx-psc-uart", },
-       { .type = "serial", .compatible = "mpc5200-psc", }, /* Efika only! */
+       { .type = "serial", .compatible = "mpc5200-psc-uart", },
        {},
 };
 #endif
@@ -1068,7 +1067,7 @@ mpc52xx_uart_of_enumerate(void)
                        continue;
 
                /* Is a particular device number requested? */
-               devno = get_property(np, "device_no", NULL);
+               devno = get_property(np, "port-number", NULL);
                mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1);
        }