aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/of_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/of_device.c')
-rw-r--r--arch/sparc64/kernel/of_device.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index fb9bf1e4d036..6b8798141f2c 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -245,7 +245,7 @@ struct of_bus {
245 int *addrc, int *sizec); 245 int *addrc, int *sizec);
246 int (*map)(u32 *addr, const u32 *range, 246 int (*map)(u32 *addr, const u32 *range,
247 int na, int ns, int pna); 247 int na, int ns, int pna);
248 unsigned int (*get_flags)(u32 *addr); 248 unsigned int (*get_flags)(const u32 *addr);
249}; 249};
250 250
251/* 251/*
@@ -305,7 +305,7 @@ static int of_bus_default_map(u32 *addr, const u32 *range,
305 return 0; 305 return 0;
306} 306}
307 307
308static unsigned int of_bus_default_get_flags(u32 *addr) 308static unsigned int of_bus_default_get_flags(const u32 *addr)
309{ 309{
310 return IORESOURCE_MEM; 310 return IORESOURCE_MEM;
311} 311}
@@ -369,7 +369,7 @@ static int of_bus_pci_map(u32 *addr, const u32 *range,
369 return 0; 369 return 0;
370} 370}
371 371
372static unsigned int of_bus_pci_get_flags(u32 *addr) 372static unsigned int of_bus_pci_get_flags(const u32 *addr)
373{ 373{
374 unsigned int flags = 0; 374 unsigned int flags = 0;
375 u32 w = addr[0]; 375 u32 w = addr[0];
@@ -482,7 +482,7 @@ static int __init build_one_resource(struct device_node *parent,
482 u32 *addr, 482 u32 *addr,
483 int na, int ns, int pna) 483 int na, int ns, int pna)
484{ 484{
485 u32 *ranges; 485 const u32 *ranges;
486 unsigned int rlen; 486 unsigned int rlen;
487 int rone; 487 int rone;
488 488
@@ -513,7 +513,7 @@ static int __init build_one_resource(struct device_node *parent,
513 513
514static int __init use_1to1_mapping(struct device_node *pp) 514static int __init use_1to1_mapping(struct device_node *pp)
515{ 515{
516 char *model; 516 const char *model;
517 517
518 /* If this is on the PMU bus, don't try to translate it even 518 /* If this is on the PMU bus, don't try to translate it even
519 * if a ranges property exists. 519 * if a ranges property exists.
@@ -548,7 +548,7 @@ static void __init build_device_resources(struct of_device *op,
548 struct of_bus *bus; 548 struct of_bus *bus;
549 int na, ns; 549 int na, ns;
550 int index, num_reg; 550 int index, num_reg;
551 void *preg; 551 const void *preg;
552 552
553 if (!parent) 553 if (!parent)
554 return; 554 return;
@@ -578,7 +578,7 @@ static void __init build_device_resources(struct of_device *op,
578 for (index = 0; index < num_reg; index++) { 578 for (index = 0; index < num_reg; index++) {
579 struct resource *r = &op->resource[index]; 579 struct resource *r = &op->resource[index];
580 u32 addr[OF_MAX_ADDR_CELLS]; 580 u32 addr[OF_MAX_ADDR_CELLS];
581 u32 *reg = (preg + (index * ((na + ns) * 4))); 581 const u32 *reg = (preg + (index * ((na + ns) * 4)));
582 struct device_node *dp = op->node; 582 struct device_node *dp = op->node;
583 struct device_node *pp = p_op->node; 583 struct device_node *pp = p_op->node;
584 struct of_bus *pbus, *dbus; 584 struct of_bus *pbus, *dbus;
@@ -643,14 +643,14 @@ static void __init build_device_resources(struct of_device *op,
643 643
644static struct device_node * __init 644static struct device_node * __init
645apply_interrupt_map(struct device_node *dp, struct device_node *pp, 645apply_interrupt_map(struct device_node *dp, struct device_node *pp,
646 u32 *imap, int imlen, u32 *imask, 646 const u32 *imap, int imlen, const u32 *imask,
647 unsigned int *irq_p) 647 unsigned int *irq_p)
648{ 648{
649 struct device_node *cp; 649 struct device_node *cp;
650 unsigned int irq = *irq_p; 650 unsigned int irq = *irq_p;
651 struct of_bus *bus; 651 struct of_bus *bus;
652 phandle handle; 652 phandle handle;
653 u32 *reg; 653 const u32 *reg;
654 int na, num_reg, i; 654 int na, num_reg, i;
655 655
656 bus = of_match_bus(pp); 656 bus = of_match_bus(pp);
@@ -705,7 +705,7 @@ static unsigned int __init pci_irq_swizzle(struct device_node *dp,
705 struct device_node *pp, 705 struct device_node *pp,
706 unsigned int irq) 706 unsigned int irq)
707{ 707{
708 struct linux_prom_pci_registers *regs; 708 const struct linux_prom_pci_registers *regs;
709 unsigned int bus, devfn, slot, ret; 709 unsigned int bus, devfn, slot, ret;
710 710
711 if (irq < 1 || irq > 4) 711 if (irq < 1 || irq > 4)
@@ -794,7 +794,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
794 pp = dp->parent; 794 pp = dp->parent;
795 ip = NULL; 795 ip = NULL;
796 while (pp) { 796 while (pp) {
797 void *imap, *imsk; 797 const void *imap, *imsk;
798 int imlen; 798 int imlen;
799 799
800 imap = of_get_property(pp, "interrupt-map", &imlen); 800 imap = of_get_property(pp, "interrupt-map", &imlen);
@@ -859,7 +859,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
859 struct device *parent) 859 struct device *parent)
860{ 860{
861 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); 861 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL);
862 unsigned int *irq; 862 const unsigned int *irq;
863 int len, i; 863 int len, i;
864 864
865 if (!op) 865 if (!op)