aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spu_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/cell/spu_base.c')
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index d06042deb021..3bd36d46ab4a 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -488,10 +488,10 @@ int spu_irq_class_1_bottom(struct spu *spu)
488 488
489static int __init find_spu_node_id(struct device_node *spe) 489static int __init find_spu_node_id(struct device_node *spe)
490{ 490{
491 unsigned int *id; 491 const unsigned int *id;
492 struct device_node *cpu; 492 struct device_node *cpu;
493 cpu = spe->parent->parent; 493 cpu = spe->parent->parent;
494 id = (unsigned int *)get_property(cpu, "node-id", NULL); 494 id = get_property(cpu, "node-id", NULL);
495 return id ? *id : 0; 495 return id ? *id : 0;
496} 496}
497 497
@@ -500,7 +500,7 @@ static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
500{ 500{
501 static DEFINE_MUTEX(add_spumem_mutex); 501 static DEFINE_MUTEX(add_spumem_mutex);
502 502
503 struct address_prop { 503 const struct address_prop {
504 unsigned long address; 504 unsigned long address;
505 unsigned int len; 505 unsigned int len;
506 } __attribute__((packed)) *p; 506 } __attribute__((packed)) *p;
@@ -511,7 +511,7 @@ static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
511 struct zone *zone; 511 struct zone *zone;
512 int ret; 512 int ret;
513 513
514 p = (void*)get_property(spe, prop, &proplen); 514 p = get_property(spe, prop, &proplen);
515 WARN_ON(proplen != sizeof (*p)); 515 WARN_ON(proplen != sizeof (*p));
516 516
517 start_pfn = p->address >> PAGE_SHIFT; 517 start_pfn = p->address >> PAGE_SHIFT;
@@ -531,12 +531,12 @@ static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
531static void __iomem * __init map_spe_prop(struct spu *spu, 531static void __iomem * __init map_spe_prop(struct spu *spu,
532 struct device_node *n, const char *name) 532 struct device_node *n, const char *name)
533{ 533{
534 struct address_prop { 534 const struct address_prop {
535 unsigned long address; 535 unsigned long address;
536 unsigned int len; 536 unsigned int len;
537 } __attribute__((packed)) *prop; 537 } __attribute__((packed)) *prop;
538 538
539 void *p; 539 const void *p;
540 int proplen; 540 int proplen;
541 void* ret = NULL; 541 void* ret = NULL;
542 int err = 0; 542 int err = 0;
@@ -570,14 +570,14 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
570{ 570{
571 struct irq_host *host; 571 struct irq_host *host;
572 unsigned int isrc; 572 unsigned int isrc;
573 u32 *tmp; 573 const u32 *tmp;
574 574
575 host = iic_get_irq_host(spu->node); 575 host = iic_get_irq_host(spu->node);
576 if (host == NULL) 576 if (host == NULL)
577 return -ENODEV; 577 return -ENODEV;
578 578
579 /* Get the interrupt source from the device-tree */ 579 /* Get the interrupt source from the device-tree */
580 tmp = (u32 *)get_property(np, "isrc", NULL); 580 tmp = get_property(np, "isrc", NULL);
581 if (!tmp) 581 if (!tmp)
582 return -ENODEV; 582 return -ENODEV;
583 spu->isrc = isrc = tmp[0]; 583 spu->isrc = isrc = tmp[0];
@@ -593,7 +593,7 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
593 593
594static int __init spu_map_device(struct spu *spu, struct device_node *node) 594static int __init spu_map_device(struct spu *spu, struct device_node *node)
595{ 595{
596 char *prop; 596 const char *prop;
597 int ret; 597 int ret;
598 598
599 ret = -ENODEV; 599 ret = -ENODEV;