[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>
This commit is contained in:
parent
40d244d69a
commit
e3aba81d15
|
@ -51,13 +51,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void __init
|
static void __init
|
||||||
lite52xx_setup_cpu(void)
|
lite5200_setup_cpu(void)
|
||||||
{
|
{
|
||||||
struct mpc52xx_gpio __iomem *gpio;
|
struct mpc52xx_gpio __iomem *gpio;
|
||||||
u32 port_config;
|
u32 port_config;
|
||||||
|
|
||||||
/* Map zones */
|
/* Map zones */
|
||||||
gpio = mpc52xx_find_and_map("mpc52xx-gpio");
|
gpio = mpc52xx_find_and_map("mpc5200-gpio");
|
||||||
if (!gpio) {
|
if (!gpio) {
|
||||||
printk(KERN_ERR __FILE__ ": "
|
printk(KERN_ERR __FILE__ ": "
|
||||||
"Error while mapping GPIO register for port config. "
|
"Error while mapping GPIO register for port config. "
|
||||||
|
@ -85,12 +85,12 @@ error:
|
||||||
iounmap(gpio);
|
iounmap(gpio);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init lite52xx_setup_arch(void)
|
static void __init lite5200_setup_arch(void)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
|
|
||||||
if (ppc_md.progress)
|
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");
|
np = of_find_node_by_type(NULL, "cpu");
|
||||||
if (np) {
|
if (np) {
|
||||||
|
@ -105,7 +105,7 @@ static void __init lite52xx_setup_arch(void)
|
||||||
|
|
||||||
/* CPU & Port mux setup */
|
/* CPU & Port mux setup */
|
||||||
mpc52xx_setup_cpu(); /* Generic */
|
mpc52xx_setup_cpu(); /* Generic */
|
||||||
lite52xx_setup_cpu(); /* Platorm specific */
|
lite5200_setup_cpu(); /* Platorm specific */
|
||||||
|
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
np = of_find_node_by_type(np, "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);
|
struct device_node* np = of_find_all_nodes(NULL);
|
||||||
const char *model = 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
|
* 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();
|
unsigned long node = of_get_flat_dt_root();
|
||||||
const char *model = of_get_flat_dt_prop(node, "model", NULL);
|
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;
|
return 0;
|
||||||
pr_debug("%s board w/ mpc52xx found\n", model ? model : "unknown");
|
pr_debug("%s board found\n", model ? model : "unknown");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
define_machine(lite52xx) {
|
define_machine(lite5200) {
|
||||||
.name = "lite52xx",
|
.name = "lite5200",
|
||||||
.probe = lite52xx_probe,
|
.probe = lite5200_probe,
|
||||||
.setup_arch = lite52xx_setup_arch,
|
.setup_arch = lite5200_setup_arch,
|
||||||
.init = mpc52xx_declare_of_platform_devices,
|
.init = mpc52xx_declare_of_platform_devices,
|
||||||
.init_IRQ = mpc52xx_init_irq,
|
.init_IRQ = mpc52xx_init_irq,
|
||||||
.get_irq = mpc52xx_get_irq,
|
.get_irq = mpc52xx_get_irq,
|
||||||
.show_cpuinfo = lite52xx_show_cpuinfo,
|
.show_cpuinfo = lite5200_show_cpuinfo,
|
||||||
.calibrate_decr = generic_calibrate_decr,
|
.calibrate_decr = generic_calibrate_decr,
|
||||||
};
|
};
|
||||||
|
|
|
@ -83,8 +83,8 @@ mpc52xx_setup_cpu(void)
|
||||||
struct mpc52xx_xlb __iomem *xlb;
|
struct mpc52xx_xlb __iomem *xlb;
|
||||||
|
|
||||||
/* Map zones */
|
/* Map zones */
|
||||||
cdm = mpc52xx_find_and_map("mpc52xx-cdm");
|
cdm = mpc52xx_find_and_map("mpc5200-cdm");
|
||||||
xlb = mpc52xx_find_and_map("mpc52xx-xlb");
|
xlb = mpc52xx_find_and_map("mpc5200-xlb");
|
||||||
|
|
||||||
if (!cdm || !xlb) {
|
if (!cdm || !xlb) {
|
||||||
printk(KERN_ERR __FILE__ ": "
|
printk(KERN_ERR __FILE__ ": "
|
||||||
|
|
|
@ -383,16 +383,16 @@ void __init mpc52xx_init_irq(void)
|
||||||
struct device_node *picnode;
|
struct device_node *picnode;
|
||||||
|
|
||||||
/* Remap the necessary zones */
|
/* 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)
|
if (!intr)
|
||||||
panic(__FILE__ ": find_and_map failed on 'mpc52xx-pic'. "
|
panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. "
|
||||||
"Check node !");
|
"Check node !");
|
||||||
|
|
||||||
sdma = mpc52xx_find_and_map("mpc52xx-bestcomm");
|
sdma = mpc52xx_find_and_map("mpc5200-bestcomm");
|
||||||
if (!sdma)
|
if (!sdma)
|
||||||
panic(__FILE__ ": find_and_map failed on 'mpc52xx-bestcomm'. "
|
panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. "
|
||||||
"Check node !");
|
"Check node !");
|
||||||
|
|
||||||
/* Disable all interrupt sources. */
|
/* Disable all interrupt sources. */
|
||||||
|
|
|
@ -484,10 +484,8 @@ mpc52xx_ata_resume(struct of_device *op)
|
||||||
|
|
||||||
static struct of_device_id mpc52xx_ata_of_match[] = {
|
static struct of_device_id mpc52xx_ata_of_match[] = {
|
||||||
{
|
{
|
||||||
.compatible = "mpc5200-ata",
|
.type = "ata",
|
||||||
},
|
.compatible = "mpc5200-ata",
|
||||||
{
|
|
||||||
.compatible = "mpc52xx-ata",
|
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
|
@ -127,8 +127,7 @@ static irqreturn_t mpc52xx_uart_int(int irq,void *dev_id);
|
||||||
|
|
||||||
#if defined(CONFIG_PPC_MERGE)
|
#if defined(CONFIG_PPC_MERGE)
|
||||||
static struct of_device_id mpc52xx_uart_of_match[] = {
|
static struct of_device_id mpc52xx_uart_of_match[] = {
|
||||||
{ .type = "serial", .compatible = "mpc52xx-psc-uart", },
|
{ .type = "serial", .compatible = "mpc5200-psc-uart", },
|
||||||
{ .type = "serial", .compatible = "mpc5200-psc", }, /* Efika only! */
|
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -1068,7 +1067,7 @@ mpc52xx_uart_of_enumerate(void)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Is a particular device number requested? */
|
/* 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);
|
mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue