if ( !val || len < sizeof(*out_value) )
return 0;
- *out_value = be32_to_cpup(val);
+ *out_value = be32_to_cpu(*val);
return 1;
}
count = sz;
while ( count-- )
- *out_values++ = be32_to_cpup(val++);
+ *out_values++ = be32_to_cpu(*val++);
return sz;
}
ip = dt_get_property(np, "#address-cells", NULL);
if ( ip )
- return be32_to_cpup(ip);
+ return be32_to_cpu(*ip);
} while ( np->parent );
/* No #address-cells property for the root node */
return DT_ROOT_NODE_ADDR_CELLS_DEFAULT;
ip = dt_get_property(np, "#size-cells", NULL);
if ( ip )
- return be32_to_cpup(ip);
+ return be32_to_cpu(*ip);
} while ( np->parent );
/* No #address-cells property for the root node */
return DT_ROOT_NODE_SIZE_CELLS_DEFAULT;
static unsigned int dt_bus_pci_get_flags(const __be32 *addr)
{
unsigned int flags = 0;
- u32 w = be32_to_cpup(addr);
+ u32 w = be32_to_cpu(*addr);
switch((w >> 24) & 0x03) {
case 0x01:
if ( parp == NULL )
p = dt_get_parent(child);
else
- p = dt_find_node_by_phandle(be32_to_cpup(parp));
+ p = dt_find_node_by_phandle(be32_to_cpu(*parp));
child = p;
} while ( p && dt_get_property(p, "#interrupt-cells", NULL) == NULL );
intlen /= sizeof(*intspec);
dt_dprintk(" using 'interrupts' property\n");
- dt_dprintk(" intspec=%d intlen=%d\n", be32_to_cpup(intspec), intlen);
+ dt_dprintk(" intspec=%d intlen=%d\n", be32_to_cpu(*intspec), intlen);
/* Look for the interrupt parent. */
p = dt_irq_find_parent(device);
imaplen -= addrsize + intsize;
/* Get the interrupt parent */
- ipar = dt_find_node_by_phandle(be32_to_cpup(imap));
+ ipar = dt_find_node_by_phandle(be32_to_cpu(*imap));
imap++;
--imaplen;
int match, i;
dt_dprintk("dt_irq_map_raw: par=%s,intspec=[0x%08x 0x%08x...],ointsize=%d\n",
- parent->full_name, be32_to_cpup(intspec),
- be32_to_cpup(intspec + 1), ointsize);
+ parent->full_name, be32_to_cpu(*intspec),
+ be32_to_cpu(*(intspec+1)), ointsize);
ipar = parent;
dt_dprintk(" -> match=%d (imaplen=%d)\n", match, imaplen);
/* Get the interrupt parent */
- newpar = dt_find_node_by_phandle(be32_to_cpup(imap));
+ newpar = dt_find_node_by_phandle(be32_to_cpu(*imap));
imap++;
--imaplen;
intlen /= sizeof(*intspec);
dt_dprintk(" using 'interrupts' property\n");
- dt_dprintk(" intspec=%d intlen=%d\n", be32_to_cpup(intspec), intlen);
+ dt_dprintk(" intspec=%d intlen=%d\n", be32_to_cpu(*intspec), intlen);
/* Look for the interrupt parent. */
p = dt_irq_find_parent(device);
* If phandle is 0, then it is an empty entry with no
* arguments. Skip forward to the next entry.
* */
- phandle = be32_to_cpup(list++);
+ phandle = be32_to_cpu(*list++);
if ( phandle )
{
/*
out_args->np = node;
out_args->args_count = count;
for ( i = 0; i < count; i++ )
- out_args->args[i] = be32_to_cpup(list++);
+ out_args->args[i] = be32_to_cpu(*list++);
}
/* Found it! return success */
int has_name = 0;
int new_format = 0;
- tag = be32_to_cpup((__be32 *)(*p));
+ tag = be32_to_cpu(*(__be32 *)(*p));
if ( tag != FDT_BEGIN_NODE )
{
printk(XENLOG_WARNING "Weird tag at start of node: %x\n", tag);
u32 sz, noff;
const char *pname;
- tag = be32_to_cpup((__be32 *)(*p));
+ tag = be32_to_cpu(*(__be32 *)(*p));
if ( tag == FDT_NOP )
{
*p += 4;
if ( tag != FDT_PROP )
break;
*p += 4;
- sz = be32_to_cpup((__be32 *)(*p));
- noff = be32_to_cpup((__be32 *)((*p) + 4));
+ sz = be32_to_cpu(*(__be32 *)(*p));
+ noff = be32_to_cpu(*(__be32 *)((*p) + 4));
*p += 8;
if ( fdt_version(fdt) < 0x10 )
*p = ROUNDUP(*p, sz >= 8 ? 8 : 4);
(strcmp(pname, "linux,phandle") == 0) )
{
if ( np->phandle == 0 )
- np->phandle = be32_to_cpup((__be32*)*p);
+ np->phandle = be32_to_cpu(*(__be32*)*p);
}
/* And we process the "ibm,phandle" property
* used in pSeries dynamic device tree
* stuff */
if ( strcmp(pname, "ibm,phandle") == 0 )
- np->phandle = be32_to_cpup((__be32 *)*p);
+ np->phandle = be32_to_cpu(*(__be32 *)*p);
pp->name = pname;
pp->length = sz;
pp->value = (void *)*p;
*p += 4;
else
mem = unflatten_dt_node(fdt, mem, p, np, allnextpp, fpsize);
- tag = be32_to_cpup((__be32 *)(*p));
+ tag = be32_to_cpu(*(__be32 *)(*p));
}
if ( tag != FDT_END_NODE )
{
/* Second pass, do actual unflattening */
start = ((unsigned long)fdt) + fdt_off_dt_struct(fdt);
unflatten_dt_node(fdt, mem, &start, NULL, &allnextp, 0);
- if ( be32_to_cpup((__be32 *)start) != FDT_END )
+ if ( be32_to_cpu(*(__be32 *)start) != FDT_END )
{
printk(XENLOG_ERR "Weird tag at end of tree: %08x\n",
*((u32 *)start));