]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[POWERPC] Rename get_property to of_get_property: arch/powerpc
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 3 Apr 2007 12:26:41 +0000 (22:26 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 12 Apr 2007 17:55:19 +0000 (03:55 +1000)
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
93 files changed:
arch/powerpc/kernel/btext.c
arch/powerpc/kernel/ibmebus.c
arch/powerpc/kernel/legacy_serial.c
arch/powerpc/kernel/lparcfg.c
arch/powerpc/kernel/machine_kexec_64.c
arch/powerpc/kernel/of_platform.c
arch/powerpc/kernel/pci_32.c
arch/powerpc/kernel/pci_64.c
arch/powerpc/kernel/pci_dn.c
arch/powerpc/kernel/prom_parse.c
arch/powerpc/kernel/rtas-proc.c
arch/powerpc/kernel/rtas.c
arch/powerpc/kernel/rtas_pci.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/sysfs.c
arch/powerpc/kernel/time.c
arch/powerpc/kernel/vio.c
arch/powerpc/mm/hash_native_64.c
arch/powerpc/mm/numa.c
arch/powerpc/platforms/52xx/efika.c
arch/powerpc/platforms/52xx/lite5200.c
arch/powerpc/platforms/52xx/mpc52xx_common.c
arch/powerpc/platforms/52xx/mpc52xx_pci.c
arch/powerpc/platforms/82xx/mpc82xx.c
arch/powerpc/platforms/82xx/mpc82xx_ads.c
arch/powerpc/platforms/83xx/pci.c
arch/powerpc/platforms/85xx/mpc85xx_ads.c
arch/powerpc/platforms/85xx/mpc85xx_cds.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/powerpc/platforms/85xx/pci.c
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
arch/powerpc/platforms/86xx/pci.c
arch/powerpc/platforms/8xx/m8xx_setup.c
arch/powerpc/platforms/8xx/mpc86xads_setup.c
arch/powerpc/platforms/8xx/mpc885ads_setup.c
arch/powerpc/platforms/cell/cbe_regs.c
arch/powerpc/platforms/cell/cbe_thermal.c
arch/powerpc/platforms/cell/interrupt.c
arch/powerpc/platforms/cell/io-workarounds.c
arch/powerpc/platforms/cell/iommu.c
arch/powerpc/platforms/cell/setup.c
arch/powerpc/platforms/cell/spider-pic.c
arch/powerpc/platforms/cell/spu_manage.c
arch/powerpc/platforms/cell/spufs/inode.c
arch/powerpc/platforms/celleb/iommu.c
arch/powerpc/platforms/celleb/pci.c
arch/powerpc/platforms/celleb/setup.c
arch/powerpc/platforms/chrp/nvram.c
arch/powerpc/platforms/chrp/pci.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/embedded6xx/linkstation.c
arch/powerpc/platforms/embedded6xx/ls_uart.c
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
arch/powerpc/platforms/iseries/iommu.c
arch/powerpc/platforms/iseries/pci.c
arch/powerpc/platforms/iseries/viopath.c
arch/powerpc/platforms/maple/pci.c
arch/powerpc/platforms/maple/setup.c
arch/powerpc/platforms/pasemi/iommu.c
arch/powerpc/platforms/pasemi/setup.c
arch/powerpc/platforms/powermac/backlight.c
arch/powerpc/platforms/powermac/cpufreq_32.c
arch/powerpc/platforms/powermac/cpufreq_64.c
arch/powerpc/platforms/powermac/feature.c
arch/powerpc/platforms/powermac/low_i2c.c
arch/powerpc/platforms/powermac/pci.c
arch/powerpc/platforms/powermac/pfunc_base.c
arch/powerpc/platforms/powermac/pfunc_core.c
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/platforms/powermac/setup.c
arch/powerpc/platforms/powermac/smp.c
arch/powerpc/platforms/powermac/udbg_scc.c
arch/powerpc/platforms/pseries/eeh.c
arch/powerpc/platforms/pseries/eeh_driver.c
arch/powerpc/platforms/pseries/eeh_event.c
arch/powerpc/platforms/pseries/firmware.c
arch/powerpc/platforms/pseries/hotplug-cpu.c
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/platforms/pseries/lpar.c
arch/powerpc/platforms/pseries/nvram.c
arch/powerpc/platforms/pseries/pci.c
arch/powerpc/platforms/pseries/ras.c
arch/powerpc/platforms/pseries/rtasd.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/platforms/pseries/xics.c
arch/powerpc/sysdev/dcr.c
arch/powerpc/sysdev/fsl_soc.c
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/qe_lib/qe.c
arch/powerpc/sysdev/qe_lib/qe_io.c
arch/powerpc/sysdev/tsi108_dev.c
arch/powerpc/sysdev/tsi108_pci.c

index 3678997339d6270cfcf5065979965ab4bf15fefa..e7b684689e0479336b8670835a7bb69421415089 100644 (file)
@@ -161,33 +161,33 @@ int btext_initialize(struct device_node *np)
        unsigned long address = 0;
        const u32 *prop;
 
-       prop = get_property(np, "linux,bootx-width", NULL);
+       prop = of_get_property(np, "linux,bootx-width", NULL);
        if (prop == NULL)
-               prop = get_property(np, "width", NULL);
+               prop = of_get_property(np, "width", NULL);
        if (prop == NULL)
                return -EINVAL;
        width = *prop;
-       prop = get_property(np, "linux,bootx-height", NULL);
+       prop = of_get_property(np, "linux,bootx-height", NULL);
        if (prop == NULL)
-               prop = get_property(np, "height", NULL);
+               prop = of_get_property(np, "height", NULL);
        if (prop == NULL)
                return -EINVAL;
        height = *prop;
-       prop = get_property(np, "linux,bootx-depth", NULL);
+       prop = of_get_property(np, "linux,bootx-depth", NULL);
        if (prop == NULL)
-               prop = get_property(np, "depth", NULL);
+               prop = of_get_property(np, "depth", NULL);
        if (prop == NULL)
                return -EINVAL;
        depth = *prop;
        pitch = width * ((depth + 7) / 8);
-       prop = get_property(np, "linux,bootx-linebytes", NULL);
+       prop = of_get_property(np, "linux,bootx-linebytes", NULL);
        if (prop == NULL)
-               prop = get_property(np, "linebytes", NULL);
+               prop = of_get_property(np, "linebytes", NULL);
        if (prop && *prop != 0xffffffffu)
                pitch = *prop;
        if (pitch == 1)
                pitch = 0x1000;
-       prop = get_property(np, "address", NULL);
+       prop = of_get_property(np, "address", NULL);
        if (prop)
                address = *prop;
 
@@ -219,7 +219,7 @@ int __init btext_find_display(int allow_nonstdout)
        struct device_node *np = NULL; 
        int rc = -ENODEV;
 
-       name = get_property(of_chosen, "linux,stdout-path", NULL);
+       name = of_get_property(of_chosen, "linux,stdout-path", NULL);
        if (name != NULL) {
                np = of_find_node_by_path(name);
                if (np != NULL) {
@@ -236,7 +236,7 @@ int __init btext_find_display(int allow_nonstdout)
                return rc;
 
        for (np = NULL; (np = of_find_node_by_type(np, "display"));) {
-               if (get_property(np, "linux,opened", NULL)) {
+               if (of_get_property(np, "linux,opened", NULL)) {
                        printk("trying %s ...\n", np->full_name);
                        rc = btext_initialize(np);
                        printk("result: %d\n", rc);
index 8ed1163c0bd4be2865d8a1836c38746013c3d4f3..48446a699ef8c59d8ac61055cd3f2d94427ae737 100644 (file)
@@ -193,7 +193,7 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_node(
        const char *loc_code;
        int length;
 
-       loc_code = get_property(dn, "ibm,loc-code", NULL);
+       loc_code = of_get_property(dn, "ibm,loc-code", NULL);
        if (!loc_code) {
                 printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n",
                       __FUNCTION__, dn->name ? dn->name : "<unknown>");
@@ -256,12 +256,11 @@ static void ibmebus_add_devices_by_id(struct of_device_id *idt)
 static int ibmebus_match_helper_name(struct device *dev, void *data)
 {
        const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev);
-       char *name;
+       const char *name;
 
-       name = (char*)get_property(
-               ebus_dev->ofdev.node, "name", NULL);
+       name = of_get_property(ebus_dev->ofdev.node, "name", NULL);
 
-       if (name && (strcmp((char*)data, name) == 0))
+       if (name && (strcmp(data, name) == 0))
                return 1;
 
        return 0;
@@ -363,7 +362,7 @@ static ssize_t name_show(struct device *dev,
                         struct device_attribute *attr, char *buf)
 {
        struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev);
-       char *name = (char*)get_property(ebus_dev->ofdev.node, "name", NULL);
+       const char *name = of_get_property(ebus_dev->ofdev.node, "name", NULL);
        return sprintf(buf, "%s\n", name);
 }
 
@@ -375,12 +374,11 @@ static struct device_attribute ibmebus_dev_attrs[] = {
 static int ibmebus_match_helper_loc_code(struct device *dev, void *data)
 {
        const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev);
-       char *loc_code;
+       const char *loc_code;
 
-       loc_code = (char*)get_property(
-               ebus_dev->ofdev.node, "ibm,loc-code", NULL);
+       loc_code = of_get_property(ebus_dev->ofdev.node, "ibm,loc-code", NULL);
 
-       if (loc_code && (strcmp((char*)data, loc_code) == 0))
+       if (loc_code && (strcmp(data, loc_code) == 0))
                return 1;
 
        return 0;
@@ -391,7 +389,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus,
 {
        struct device_node *dn = NULL;
        struct ibmebus_dev *dev;
-       char *loc_code;
+       const char *loc_code;
        char parm[MAX_LOC_CODE_LENGTH];
 
        if (count >= MAX_LOC_CODE_LENGTH)
@@ -409,7 +407,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus,
        }
 
        while ((dn = of_find_all_nodes(dn))) {
-               loc_code = (char *)get_property(dn, "ibm,loc-code", NULL);
+               loc_code = of_get_property(dn, "ibm,loc-code", NULL);
                if (loc_code && (strncmp(loc_code, parm, count) == 0)) {
                        dev = ibmebus_register_device_node(dn);
                        if (IS_ERR(dev)) {
index 325f490a10cccbfdafff8503e44dd12ba6b6f968..63dd2c3ad95e0c200716404aba1e0b0045c2eb97 100644 (file)
@@ -44,12 +44,12 @@ static int __init add_legacy_port(struct device_node *np, int want_index,
        int index;
 
        /* get clock freq. if present */
-       clk = get_property(np, "clock-frequency", NULL);
+       clk = of_get_property(np, "clock-frequency", NULL);
        if (clk && *clk)
                clock = *clk;
 
        /* get default speed if present */
-       spd = get_property(np, "current-speed", NULL);
+       spd = of_get_property(np, "current-speed", NULL);
 
        /* If we have a location index, then try to use it */
        if (want_index >= 0 && want_index < MAX_LEGACY_SERIAL_PORTS)
@@ -121,11 +121,11 @@ static int __init add_legacy_soc_port(struct device_node *np,
        /* We only support ports that have a clock frequency properly
         * encoded in the device-tree.
         */
-       if (get_property(np, "clock-frequency", NULL) == NULL)
+       if (of_get_property(np, "clock-frequency", NULL) == NULL)
                return -1;
 
        /* if rtas uses this device, don't try to use it as well */
-       if (get_property(np, "used-by-rtas", NULL) != NULL)
+       if (of_get_property(np, "used-by-rtas", NULL) != NULL)
                return -1;
 
        /* Get the address */
@@ -157,7 +157,7 @@ static int __init add_legacy_isa_port(struct device_node *np,
        DBG(" -> add_legacy_isa_port(%s)\n", np->full_name);
 
        /* Get the ISA port number */
-       reg = get_property(np, "reg", NULL);
+       reg = of_get_property(np, "reg", NULL);
        if (reg == NULL)
                return -1;
 
@@ -168,7 +168,7 @@ static int __init add_legacy_isa_port(struct device_node *np,
        /* Now look for an "ibm,aix-loc" property that gives us ordering
         * if any...
         */
-       typep = get_property(np, "ibm,aix-loc", NULL);
+       typep = of_get_property(np, "ibm,aix-loc", NULL);
 
        /* If we have a location index, then use it */
        if (typep && *typep == 'S')
@@ -206,7 +206,7 @@ static int __init add_legacy_pci_port(struct device_node *np,
         * compatible UARTs on PCI need all sort of quirks (port offsets
         * etc...) that this code doesn't know about
         */
-       if (get_property(np, "clock-frequency", NULL) == NULL)
+       if (of_get_property(np, "clock-frequency", NULL) == NULL)
                return -1;
 
        /* Get the PCI address. Assume BAR 0 */
@@ -232,7 +232,7 @@ static int __init add_legacy_pci_port(struct device_node *np,
         * we get to their "reg" property
         */
        if (np != pci_dev) {
-               const u32 *reg = get_property(np, "reg", NULL);
+               const u32 *reg = of_get_property(np, "reg", NULL);
                if (reg && (*reg < 4))
                        index = lindex = *reg;
        }
@@ -296,7 +296,7 @@ void __init find_legacy_serial_ports(void)
        DBG(" -> find_legacy_serial_port()\n");
 
        /* Now find out if one of these is out firmware console */
-       path = get_property(of_chosen, "linux,stdout-path", NULL);
+       path = of_get_property(of_chosen, "linux,stdout-path", NULL);
        if (path != NULL) {
                stdout = of_find_node_by_path(path);
                if (stdout)
@@ -529,7 +529,7 @@ static int __init check_legacy_serial_console(void)
        }
        /* We are getting a weird phandle from OF ... */
        /* ... So use the full path instead */
-       name = get_property(of_chosen, "linux,stdout-path", NULL);
+       name = of_get_property(of_chosen, "linux,stdout-path", NULL);
        if (name == NULL) {
                DBG(" no linux,stdout-path !\n");
                return -ENODEV;
@@ -541,12 +541,12 @@ static int __init check_legacy_serial_console(void)
        }
        DBG("stdout is %s\n", prom_stdout->full_name);
 
-       name = get_property(prom_stdout, "name", NULL);
+       name = of_get_property(prom_stdout, "name", NULL);
        if (!name) {
                DBG(" stdout package has no name !\n");
                goto not_found;
        }
-       spd = get_property(prom_stdout, "current-speed", NULL);
+       spd = of_get_property(prom_stdout, "current-speed", NULL);
        if (spd)
                speed = *spd;
 
index 89486b631284d29cfd5d03b01a905bf0dd0c35cc..b8dc1eeb016972ddbf586854a7a016e9f5e9e59a 100644 (file)
@@ -323,7 +323,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
 
        rtas_node = find_path_device("/rtas");
        if (rtas_node)
-               lrdrp = get_property(rtas_node, "ibm,lrdr-capacity", NULL);
+               lrdrp = of_get_property(rtas_node, "ibm,lrdr-capacity", NULL);
 
        if (lrdrp == NULL) {
                partition_potential_processors = vdso_data->processorCount;
@@ -539,21 +539,22 @@ static int lparcfg_data(struct seq_file *m, void *v)
 
        rootdn = find_path_device("/");
        if (rootdn) {
-               tmp = get_property(rootdn, "model", NULL);
+               tmp = of_get_property(rootdn, "model", NULL);
                if (tmp) {
                        model = tmp;
                        /* Skip "IBM," - see platforms/iseries/dt.c */
                        if (firmware_has_feature(FW_FEATURE_ISERIES))
                                model += 4;
                }
-               tmp = get_property(rootdn, "system-id", NULL);
+               tmp = of_get_property(rootdn, "system-id", NULL);
                if (tmp) {
                        system_id = tmp;
                        /* Skip "IBM," - see platforms/iseries/dt.c */
                        if (firmware_has_feature(FW_FEATURE_ISERIES))
                                system_id += 4;
                }
-               lp_index_ptr = get_property(rootdn, "ibm,partition-no", NULL);
+               lp_index_ptr = of_get_property(rootdn, "ibm,partition-no",
+                                       NULL);
                if (lp_index_ptr)
                        lp_index = *lp_index_ptr;
        }
index b975b5b0e3d53dccf026e7959da2674f0fdc55b3..704375bda73a928446bb87ba68e492659be093a0 100644 (file)
@@ -72,8 +72,8 @@ int default_machine_kexec_prepare(struct kimage *image)
        /* We also should not overwrite the tce tables */
        for (node = of_find_node_by_type(NULL, "pci"); node != NULL;
                        node = of_find_node_by_type(node, "pci")) {
-               basep = get_property(node, "linux,tce-base", NULL);
-               sizep = get_property(node, "linux,tce-size", NULL);
+               basep = of_get_property(node, "linux,tce-base", NULL);
+               sizep = of_get_property(node, "linux,tce-size", NULL);
                if (basep == NULL || sizep == NULL)
                        continue;
 
index da78e44eefec82a54e9227df2a12de8ef36ca0be..d2fd9863318c4d40527df09ef5920642cee728a6 100644 (file)
@@ -178,7 +178,7 @@ static void of_platform_make_bus_id(struct of_device *dev)
         * and 'D' for MMIO DCRs.
         */
 #ifdef CONFIG_PPC_DCR
-       reg = get_property(node, "dcr-reg", NULL);
+       reg = of_get_property(node, "dcr-reg", NULL);
        if (reg) {
 #ifdef CONFIG_PPC_DCR_NATIVE
                snprintf(name, BUS_ID_SIZE, "d%x.%s",
@@ -198,7 +198,7 @@ static void of_platform_make_bus_id(struct of_device *dev)
        /*
         * For MMIO, get the physical address
         */
-       reg = get_property(node, "reg", NULL);
+       reg = of_get_property(node, "reg", NULL);
        if (reg) {
                addr = of_translate_address(node, reg);
                if (addr != OF_BAD_ADDR) {
index e99ffe2140bf4dee5da6b01ba48d02b528d480df..ae04f9418363be2233ab5b09f2c948f78f2fc515 100644 (file)
@@ -637,7 +637,7 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
 
        if (pci_bus >= pci_bus_count)
                return;
-       bus_range = get_property(node, "bus-range", &len);
+       bus_range = of_get_property(node, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, "
                       "assuming it starts at 0\n", node->full_name);
@@ -649,11 +649,11 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
                struct pci_dev* dev;
                const unsigned int *class_code, *reg;
        
-               class_code = get_property(node, "class-code", NULL);
+               class_code = of_get_property(node, "class-code", NULL);
                if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI &&
                        (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS))
                        continue;
-               reg = get_property(node, "reg", NULL);
+               reg = of_get_property(node, "reg", NULL);
                if (!reg)
                        continue;
                dev = pci_find_slot(pci_bus, ((reg[0] >> 8) & 0xff));
@@ -724,7 +724,7 @@ scan_OF_pci_childs(struct device_node* node, pci_OF_scan_iterator filter, void*
                 * a fake root for all functions of a multi-function device,
                 * we go down them as well.
                 */
-               class_code = get_property(node, "class-code", NULL);
+               class_code = of_get_property(node, "class-code", NULL);
                if ((!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI &&
                        (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) &&
                        strcmp(node->name, "multifunc-device"))
@@ -744,7 +744,7 @@ static struct device_node *scan_OF_for_pci_dev(struct device_node *parent,
        unsigned int psize;
 
        while ((np = of_get_next_child(parent, np)) != NULL) {
-               reg = get_property(np, "reg", &psize);
+               reg = of_get_property(np, "reg", &psize);
                if (reg == NULL || psize < 4)
                        continue;
                if (((reg[0] >> 8) & 0xff) == devfn)
@@ -859,7 +859,7 @@ pci_device_from_OF_node(struct device_node* node, u8* bus, u8* devfn)
        if (!scan_OF_pci_childs(((struct device_node*)hose->arch_data)->child,
                        find_OF_pci_device_filter, (void *)node))
                return -ENODEV;
-       reg = get_property(node, "reg", NULL);
+       reg = of_get_property(node, "reg", NULL);
        if (!reg)
                return -ENODEV;
        *bus = (reg[0] >> 16) & 0xff;
@@ -902,7 +902,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
         * that can have more than 3 ranges, fortunately using contiguous
         * addresses -- BenH
         */
-       dt_ranges = get_property(dev, "ranges", &rlen);
+       dt_ranges = of_get_property(dev, "ranges", &rlen);
        if (!dt_ranges)
                return;
        /* Sanity check, though hopefully that never happens */
index 84b4f66e98b66c1bf1d943883dd1593d8743aaa2..60d7d4baa227bb6359e79ece0123ab9b89d03ee3 100644 (file)
@@ -268,7 +268,7 @@ static u32 get_int_prop(struct device_node *np, const char *name, u32 def)
        const u32 *prop;
        int len;
 
-       prop = get_property(np, name, &len);
+       prop = of_get_property(np, name, &len);
        if (prop && len >= 4)
                return *prop;
        return def;
@@ -301,7 +301,7 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
        u32 i;
        int proplen;
 
-       addrs = get_property(node, "assigned-addresses", &proplen);
+       addrs = of_get_property(node, "assigned-addresses", &proplen);
        if (!addrs)
                return;
        DBG("    parse addresses (%d bytes) @ %p\n", proplen, addrs);
@@ -343,7 +343,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
        dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL);
        if (!dev)
                return NULL;
-       type = get_property(node, "device_type", NULL);
+       type = of_get_property(node, "device_type", NULL);
        if (type == NULL)
                type = "";
 
@@ -407,7 +407,7 @@ void __devinit of_scan_bus(struct device_node *node,
 
        while ((child = of_get_next_child(node, child)) != NULL) {
                DBG("  * %s\n", child->full_name);
-               reg = get_property(child, "reg", &reglen);
+               reg = of_get_property(child, "reg", &reglen);
                if (reg == NULL || reglen < 20)
                        continue;
                devfn = (reg[0] >> 8) & 0xff;
@@ -440,13 +440,13 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
        DBG("of_scan_pci_bridge(%s)\n", node->full_name);
 
        /* parse bus-range property */
-       busrange = get_property(node, "bus-range", &len);
+       busrange = of_get_property(node, "bus-range", &len);
        if (busrange == NULL || len != 8) {
                printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %s\n",
                       node->full_name);
                return;
        }
-       ranges = get_property(node, "ranges", &len);
+       ranges = of_get_property(node, "ranges", &len);
        if (ranges == NULL) {
                printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %s\n",
                       node->full_name);
@@ -910,7 +910,7 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
        unsigned int size;
        int rlen = 0;
 
-       range = get_property(isa_node, "ranges", &rlen);
+       range = of_get_property(isa_node, "ranges", &rlen);
        if (range == NULL || (rlen < sizeof(struct isa_range))) {
                printk(KERN_ERR "no ISA ranges or unexpected isa range size,"
                       "mapping 64k\n");
@@ -970,7 +970,7 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
         *                      (size depending on dev->n_addr_cells)
         *   cells 4+5 or 5+6:  the size of the range
         */
-       ranges = get_property(dev, "ranges", &rlen);
+       ranges = of_get_property(dev, "ranges", &rlen);
        if (ranges == NULL)
                return;
        hose->io_base_phys = 0;
index 68df018dae0ea63b03fbbdcb8df2921a0be70ab4..d7d36df9c053fb36c7ccbf1c763d7e15234980a0 100644 (file)
@@ -40,7 +40,8 @@
 static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
 {
        struct pci_controller *phb = data;
-       const int *type = get_property(dn, "ibm,pci-config-space-type", NULL);
+       const int *type =
+               of_get_property(dn, "ibm,pci-config-space-type", NULL);
        const u32 *regs;
        struct pci_dn *pdn;
 
@@ -54,14 +55,14 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
        dn->data = pdn;
        pdn->node = dn;
        pdn->phb = phb;
-       regs = get_property(dn, "reg", NULL);
+       regs = of_get_property(dn, "reg", NULL);
        if (regs) {
                /* First register entry is addr (00BBSS00)  */
                pdn->busno = (regs[0] >> 16) & 0xff;
                pdn->devfn = (regs[0] >> 8) & 0xff;
        }
        if (firmware_has_feature(FW_FEATURE_ISERIES)) {
-               const u32 *busp = get_property(dn, "linux,subbus", NULL);
+               const u32 *busp = of_get_property(dn, "linux,subbus", NULL);
                if (busp)
                        pdn->bussubno = *busp;
        }
@@ -100,7 +101,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
                u32 class;
 
                nextdn = NULL;
-               classp = get_property(dn, "class-code", NULL);
+               classp = of_get_property(dn, "class-code", NULL);
                class = classp ? *classp : 0;
 
                if (pre && ((ret = pre(dn, data)) != NULL))
index ba9c7c1e41085da8a75ca20840079b950b8a7673..aa40a5307294b2a8442a3f4de0990386065c6b3f 100644 (file)
@@ -196,7 +196,7 @@ const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
                return NULL;
 
        /* Get "reg" or "assigned-addresses" property */
-       prop = get_property(dev, bus->addresses, &psize);
+       prop = of_get_property(dev, bus->addresses, &psize);
        if (prop == NULL)
                return NULL;
        psize /= 4;
@@ -438,7 +438,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
         * to translate addresses that aren't supposed to be translated in
         * the first place. --BenH.
         */
-       ranges = get_property(parent, "ranges", &rlen);
+       ranges = of_get_property(parent, "ranges", &rlen);
        if (ranges == NULL || rlen == 0) {
                offset = of_read_number(addr, na);
                memset(addr, 0, pna * 4);
@@ -578,7 +578,7 @@ const u32 *of_get_address(struct device_node *dev, int index, u64 *size,
                return NULL;
 
        /* Get "reg" or "assigned-addresses" property */
-       prop = get_property(dev, bus->addresses, &psize);
+       prop = of_get_property(dev, bus->addresses, &psize);
        if (prop == NULL)
                return NULL;
        psize /= 4;
@@ -650,16 +650,16 @@ void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
        /* busno is always one cell */
        *busno = *(dma_window++);
 
-       prop = get_property(dn, "ibm,#dma-address-cells", NULL);
+       prop = of_get_property(dn, "ibm,#dma-address-cells", NULL);
        if (!prop)
-               prop = get_property(dn, "#address-cells", NULL);
+               prop = of_get_property(dn, "#address-cells", NULL);
 
        cells = prop ? *(u32 *)prop : of_n_addr_cells(dn);
        *phys = of_read_number(dma_window, cells);
 
        dma_window += cells;
 
-       prop = get_property(dn, "ibm,#dma-size-cells", NULL);
+       prop = of_get_property(dn, "ibm,#dma-size-cells", NULL);
        cells = prop ? *(u32 *)prop : of_n_size_cells(dn);
        *size = of_read_number(dma_window, cells);
 }
@@ -680,7 +680,7 @@ static struct device_node *of_irq_find_parent(struct device_node *child)
                return NULL;
 
        do {
-               parp = get_property(child, "interrupt-parent", NULL);
+               parp = of_get_property(child, "interrupt-parent", NULL);
                if (parp == NULL)
                        p = of_get_parent(child);
                else {
@@ -691,7 +691,7 @@ static struct device_node *of_irq_find_parent(struct device_node *child)
                }
                of_node_put(child);
                child = p;
-       } while (p && get_property(p, "#interrupt-cells", NULL) == NULL);
+       } while (p && of_get_property(p, "#interrupt-cells", NULL) == NULL);
 
        return p;
 }
@@ -716,7 +716,7 @@ void of_irq_map_init(unsigned int flags)
                struct device_node *np;
 
                for(np = NULL; (np = of_find_all_nodes(np)) != NULL;) {
-                       if (get_property(np, "interrupt-controller", NULL)
+                       if (of_get_property(np, "interrupt-controller", NULL)
                            == NULL)
                                continue;
                        /* Skip /chosen/interrupt-controller */
@@ -755,7 +755,7 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
         * is none, we are nice and just walk up the tree
         */
        do {
-               tmp = get_property(ipar, "#interrupt-cells", NULL);
+               tmp = of_get_property(ipar, "#interrupt-cells", NULL);
                if (tmp != NULL) {
                        intsize = *tmp;
                        break;
@@ -779,7 +779,7 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
         */
        old = of_node_get(ipar);
        do {
-               tmp = get_property(old, "#address-cells", NULL);
+               tmp = of_get_property(old, "#address-cells", NULL);
                tnode = of_get_parent(old);
                of_node_put(old);
                old = tnode;
@@ -795,7 +795,8 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
                /* Now check if cursor is an interrupt-controller and if it is
                 * then we are done
                 */
-               if (get_property(ipar, "interrupt-controller", NULL) != NULL) {
+               if (of_get_property(ipar, "interrupt-controller", NULL) !=
+                               NULL) {
                        DBG(" -> got it !\n");
                        memcpy(out_irq->specifier, intspec,
                               intsize * sizeof(u32));
@@ -806,7 +807,7 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
                }
 
                /* Now look for an interrupt-map */
-               imap = get_property(ipar, "interrupt-map", &imaplen);
+               imap = of_get_property(ipar, "interrupt-map", &imaplen);
                /* No interrupt map, check for an interrupt parent */
                if (imap == NULL) {
                        DBG(" -> no map, getting parent\n");
@@ -816,7 +817,7 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
                imaplen /= sizeof(u32);
 
                /* Look for a mask */
-               imask = get_property(ipar, "interrupt-map-mask", NULL);
+               imask = of_get_property(ipar, "interrupt-map-mask", NULL);
 
                /* If we were passed no "reg" property and we attempt to parse
                 * an interrupt-map, then #address-cells must be 0.
@@ -863,15 +864,13 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
                        /* Get #interrupt-cells and #address-cells of new
                         * parent
                         */
-                       tmp = get_property(newpar, "#interrupt-cells",
-                                                 NULL);
+                       tmp = of_get_property(newpar, "#interrupt-cells", NULL);
                        if (tmp == NULL) {
                                DBG(" -> parent lacks #interrupt-cells !\n");
                                goto fail;
                        }
                        newintsize = *tmp;
-                       tmp = get_property(newpar, "#address-cells",
-                                                 NULL);
+                       tmp = of_get_property(newpar, "#address-cells", NULL);
                        newaddrsize = (tmp == NULL) ? 0 : *tmp;
 
                        DBG(" -> newintsize=%d, newaddrsize=%d\n",
@@ -928,7 +927,7 @@ static int of_irq_map_oldworld(struct device_node *device, int index,
         * everything together on these)
         */
        while (device) {
-               ints = get_property(device, "AAPL,interrupts", &intlen);
+               ints = of_get_property(device, "AAPL,interrupts", &intlen);
                if (ints != NULL)
                        break;
                device = device->parent;
@@ -970,13 +969,13 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
                return of_irq_map_oldworld(device, index, out_irq);
 
        /* Get the interrupts property */
-       intspec = get_property(device, "interrupts", &intlen);
+       intspec = of_get_property(device, "interrupts", &intlen);
        if (intspec == NULL)
                return -EINVAL;
        intlen /= sizeof(u32);
 
        /* Get the reg property (if any) */
-       addr = get_property(device, "reg", NULL);
+       addr = of_get_property(device, "reg", NULL);
 
        /* Look for the interrupt parent. */
        p = of_irq_find_parent(device);
@@ -984,7 +983,7 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
                return -EINVAL;
 
        /* Get size of interrupt specifier */
-       tmp = get_property(p, "#interrupt-cells", NULL);
+       tmp = of_get_property(p, "#interrupt-cells", NULL);
        if (tmp == NULL) {
                of_node_put(p);
                return -EINVAL;
index 6cbf2ae5d7aae8c914e6bb8f8b428c8862fa3f70..190b7ed1dbfb10c0756de46fae00b982fcaab44e 100644 (file)
@@ -450,7 +450,7 @@ static int ppc_rtas_sensors_show(struct seq_file *m, void *v)
                int llen, offs;
 
                sprintf (rstr, SENSOR_PREFIX"%04d", p->token);
-               loc = get_property(rtas_node, rstr, &llen);
+               loc = of_get_property(rtas_node, rstr, &llen);
 
                /* A sensor may have multiple instances */
                for (j = 0, offs = 0; j <= p->quant; j++) {
@@ -477,7 +477,7 @@ static int ppc_rtas_find_all_sensors(void)
        const unsigned int *utmp;
        int len, i;
 
-       utmp = get_property(rtas_node, "rtas-sensors", &len);
+       utmp = of_get_property(rtas_node, "rtas-sensors", &len);
        if (utmp == NULL) {
                printk (KERN_ERR "error: could not get rtas-sensors\n");
                return 1;
index 9d0735a54564cc62e3df51253727028e48eeaa5e..702fecc932047f299166bd0fe1297b599521cf3b 100644 (file)
@@ -193,16 +193,16 @@ void rtas_progress(char *s, unsigned short hex)
        if (display_width == 0) {
                display_width = 0x10;
                if ((root = find_path_device("/rtas"))) {
-                       if ((p = get_property(root,
+                       if ((p = of_get_property(root,
                                        "ibm,display-line-length", NULL)))
                                display_width = *p;
-                       if ((p = get_property(root,
+                       if ((p = of_get_property(root,
                                        "ibm,form-feed", NULL)))
                                form_feed = *p;
-                       if ((p = get_property(root,
+                       if ((p = of_get_property(root,
                                        "ibm,display-number-of-lines", NULL)))
                                display_lines = *p;
-                       row_width = get_property(root,
+                       row_width = of_get_property(root,
                                        "ibm,display-truncation-length", NULL);
                }
                display_character = rtas_token("display-character");
@@ -298,7 +298,7 @@ int rtas_token(const char *service)
        const int *tokp;
        if (rtas.dev == NULL)
                return RTAS_UNKNOWN_SERVICE;
-       tokp = get_property(rtas.dev, service, NULL);
+       tokp = of_get_property(rtas.dev, service, NULL);
        return tokp ? *tokp : RTAS_UNKNOWN_SERVICE;
 }
 EXPORT_SYMBOL(rtas_token);
@@ -832,12 +832,12 @@ void __init rtas_initialize(void)
        if (rtas.dev) {
                const u32 *basep, *entryp, *sizep;
 
-               basep = get_property(rtas.dev, "linux,rtas-base", NULL);
-               sizep = get_property(rtas.dev, "rtas-size", NULL);
+               basep = of_get_property(rtas.dev, "linux,rtas-base", NULL);
+               sizep = of_get_property(rtas.dev, "rtas-size", NULL);
                if (basep != NULL && sizep != NULL) {
                        rtas.base = *basep;
                        rtas.size = *sizep;
-                       entryp = get_property(rtas.dev,
+                       entryp = of_get_property(rtas.dev,
                                        "linux,rtas-entry", NULL);
                        if (entryp == NULL) /* Ugh */
                                rtas.entry = rtas.base;
index 1616a44ac60828c1ba13a2e9c78c702a71e0e62f..f2286822be0948c5dad8e0df0cd9b80aa4851650 100644 (file)
@@ -60,7 +60,7 @@ static int of_device_available(struct device_node * dn)
 {
         const char *status;
 
-        status = get_property(dn, "status", NULL);
+        status = of_get_property(dn, "status", NULL);
 
         if (!status)
                 return 1;
@@ -177,7 +177,7 @@ struct pci_ops rtas_pci_ops = {
 
 int is_python(struct device_node *dev)
 {
-       const char *model = get_property(dev, "model", NULL);
+       const char *model = of_get_property(dev, "model", NULL);
 
        if (model && strstr(model, "Python"))
                return 1;
@@ -247,7 +247,7 @@ static int phb_set_bus_ranges(struct device_node *dev,
        const int *bus_range;
        unsigned int len;
 
-       bus_range = get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                return 1;
        }
@@ -309,12 +309,12 @@ void __init find_and_init_phbs(void)
        if (of_chosen) {
                const int *prop;
 
-               prop = get_property(of_chosen,
+               prop = of_get_property(of_chosen,
                                "linux,pci-probe-only", NULL);
                if (prop)
                        pci_probe_only = *prop;
 
-               prop = get_property(of_chosen,
+               prop = of_get_property(of_chosen,
                                "linux,pci-assign-all-buses", NULL);
                if (prop)
                        pci_assign_all_buses = *prop;
index 640ff0d8f83ccc0e8d6d2809d0fa8da069a5a1c7..3c8847b647fad37d3229da9f792a84d3384d4087 100644 (file)
@@ -352,11 +352,12 @@ void __init smp_setup_cpu_maps(void)
                const int *intserv;
                int j, len = sizeof(u32), nthreads = 1;
 
-               intserv = get_property(dn, "ibm,ppc-interrupt-server#s", &len);
+               intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
+                               &len);
                if (intserv)
                        nthreads = len / sizeof(int);
                else {
-                       intserv = get_property(dn, "reg", NULL);
+                       intserv = of_get_property(dn, "reg", NULL);
                        if (!intserv)
                                intserv = &cpu; /* assume logical == phys */
                }
@@ -382,7 +383,7 @@ void __init smp_setup_cpu_maps(void)
                num_addr_cell = of_n_addr_cells(dn);
                num_size_cell = of_n_size_cells(dn);
 
-               ireg = get_property(dn, "ibm,lrdr-capacity", NULL);
+               ireg = of_get_property(dn, "ibm,lrdr-capacity", NULL);
 
                if (!ireg)
                        goto out;
index 3c0c7f43584452b8a583a8e0f7c0b0373a6deed0..22083ce3cc30c9106766afc641b8436df42c3e84 100644 (file)
@@ -109,7 +109,7 @@ static void check_smt_enabled(void)
        dn = of_find_node_by_path("/options");
 
        if (dn) {
-               smt_option = get_property(dn, "ibm,smt-enabled", NULL);
+               smt_option = of_get_property(dn, "ibm,smt-enabled", NULL);
 
                 if (smt_option) {
                        if (!strcmp(smt_option, "on"))
@@ -304,10 +304,10 @@ static void __init initialize_cache_info(void)
 
                        size = 0;
                        lsize = cur_cpu_spec->dcache_bsize;
-                       sizep = get_property(np, "d-cache-size", NULL);
+                       sizep = of_get_property(np, "d-cache-size", NULL);
                        if (sizep != NULL)
                                size = *sizep;
-                       lsizep = get_property(np, dc, NULL);
+                       lsizep = of_get_property(np, dc, NULL);
                        if (lsizep != NULL)
                                lsize = *lsizep;
                        if (sizep == 0 || lsizep == 0)
@@ -321,10 +321,10 @@ static void __init initialize_cache_info(void)
 
                        size = 0;
                        lsize = cur_cpu_spec->icache_bsize;
-                       sizep = get_property(np, "i-cache-size", NULL);
+                       sizep = of_get_property(np, "i-cache-size", NULL);
                        if (sizep != NULL)
                                size = *sizep;
-                       lsizep = get_property(np, ic, NULL);
+                       lsizep = of_get_property(np, ic, NULL);
                        if (lsizep != NULL)
                                lsize = *lsizep;
                        if (sizep == 0 || lsizep == 0)
index d57818aea081b2a16e4b179d085cf53cdb39c033..476f1d546056af03b82216da2481516ee09d0450 100644 (file)
@@ -70,7 +70,7 @@ static int __init smt_setup(void)
        if (!options)
                return -ENODEV;
 
-       val = get_property(options, "ibm,smt-snooze-delay", NULL);
+       val = of_get_property(options, "ibm,smt-snooze-delay", NULL);
        if (!smt_snooze_cmdline && val) {
                for_each_possible_cpu(cpu)
                        per_cpu(smt_snooze_delay, cpu) = *val;
index f6f0c6b07c4cf335e41357def28b7388bf07d793..7cedef8f5f70c2ae397c057746200a02da31f5cf 100644 (file)
@@ -834,7 +834,7 @@ static int __init get_freq(char *name, int cells, unsigned long *val)
        cpu = of_find_node_by_type(NULL, "cpu");
 
        if (cpu) {
-               fp = get_property(cpu, name, NULL);
+               fp = of_get_property(cpu, name, NULL);
                if (fp) {
                        found = 1;
                        *val = of_read_ulong(fp, cells);
index 2968ffeafdb68c06f6d1d7ff96dfa8e4bab4578d..a09277a8639fe772eae79c874fcf859a97c39b1a 100644 (file)
@@ -81,7 +81,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
                struct iommu_table *tbl;
                unsigned long offset, size;
 
-               dma_window = get_property(dev->dev.archdata.of_node,
+               dma_window = of_get_property(dev->dev.archdata.of_node,
                                          "ibm,my-dma-window", NULL);
                if (!dma_window)
                        return NULL;
@@ -226,7 +226,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
                return NULL;
        }
 
-       unit_address = get_property(of_node, "reg", NULL);
+       unit_address = of_get_property(of_node, "reg", NULL);
        if (unit_address == NULL) {
                printk(KERN_WARNING "%s: node %s missing 'reg'\n",
                                __FUNCTION__,
@@ -246,7 +246,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
        viodev->type = of_node->type;
        viodev->unit_address = *unit_address;
        if (firmware_has_feature(FW_FEATURE_ISERIES)) {
-               unit_address = get_property(of_node,
+               unit_address = of_get_property(of_node,
                                "linux,unit_address", NULL);
                if (unit_address != NULL)
                        viodev->unit_address = *unit_address;
@@ -377,7 +377,7 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp,
        dn = dev->archdata.of_node;
        if (!dn)
                return -ENODEV;
-       cp = get_property(dn, "compatible", &length);
+       cp = of_get_property(dn, "compatible", &length);
        if (!cp)
                return -ENODEV;
 
@@ -406,12 +406,12 @@ struct bus_type vio_bus_type = {
  * @which:     The property/attribute to be extracted.
  * @length:    Pointer to length of returned data size (unused if NULL).
  *
- * Calls prom.c's get_property() to return the value of the
+ * Calls prom.c's of_get_property() to return the value of the
  * attribute specified by @which
 */
 const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length)
 {
-       return get_property(vdev->dev.archdata.of_node, which, length);
+       return of_get_property(vdev->dev.archdata.of_node, which, length);
 }
 EXPORT_SYMBOL(vio_get_attribute);
 
@@ -443,7 +443,7 @@ struct vio_dev *vio_find_node(struct device_node *vnode)
        char kobj_name[BUS_ID_SIZE];
 
        /* construct the kobject name from the device node */
-       unit_address = get_property(vnode, "reg", NULL);
+       unit_address = of_get_property(vnode, "reg", NULL);
        if (!unit_address)
                return NULL;
        snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address);
index 6f1016acdbf691a9c4dbed2b65a111cdc1dff4d2..79aedaf36f2bd3cc91a893ce862bf8c00056a488 100644 (file)
@@ -505,7 +505,7 @@ static inline int tlb_batching_enabled(void)
        int enabled = 1;
 
        if (root) {
-               const char *model = get_property(root, "model", NULL);
+               const char *model = of_get_property(root, "model", NULL);
                if (model && !strcmp(model, "IBM,9076-N81"))
                        enabled = 0;
                of_node_put(root);
index 683839b2b06bfe3c853854ce0d616e0f6577e1de..b3a592b25ab3a7a18e31955af180ab6857763444 100644 (file)
@@ -74,7 +74,7 @@ static struct device_node * __cpuinit find_cpu_node(unsigned int cpu)
 
        while ((cpu_node = of_find_node_by_type(cpu_node, "cpu")) != NULL) {
                /* Try interrupt server first */
-               interrupt_server = get_property(cpu_node,
+               interrupt_server = of_get_property(cpu_node,
                                        "ibm,ppc-interrupt-server#s", &len);
 
                len = len / sizeof(u32);
@@ -85,7 +85,7 @@ static struct device_node * __cpuinit find_cpu_node(unsigned int cpu)
                                        return cpu_node;
                        }
                } else {
-                       reg = get_property(cpu_node, "reg", &len);
+                       reg = of_get_property(cpu_node, "reg", &len);
                        if (reg && (len > 0) && (reg[0] == hw_cpuid))
                                return cpu_node;
                }
@@ -97,7 +97,7 @@ static struct device_node * __cpuinit find_cpu_node(unsigned int cpu)
 /* must hold reference to node during call */
 static const int *of_get_associativity(struct device_node *dev)
 {
-       return get_property(dev, "ibm,associativity", NULL);
+       return of_get_property(dev, "ibm,associativity", NULL);
 }
 
 /* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa
@@ -179,7 +179,7 @@ static int __init find_min_common_depth(void)
         * configuration (should be all 0's) and the second is for a normal
         * NUMA configuration.
         */
-       ref_points = get_property(rtas_root,
+       ref_points = of_get_property(rtas_root,
                        "ibm,associativity-reference-points", &len);
 
        if ((len >= 1) && ref_points) {
@@ -308,9 +308,9 @@ static void __init parse_drconf_memory(struct device_node *memory)
        int nid, default_nid = 0;
        unsigned int start, ai, flags;
 
-       lm = get_property(memory, "ibm,lmb-size", &ls);
-       dm = get_property(memory, "ibm,dynamic-memory", &ld);
-       aa = get_property(memory, "ibm,associativity-lookup-arrays", &la);
+       lm = of_get_property(memory, "ibm,lmb-size", &ls);
+       dm = of_get_property(memory, "ibm,dynamic-memory", &ld);
+       aa = of_get_property(memory, "ibm,associativity-lookup-arrays", &la);
        if (!lm || !dm || !aa ||
            ls < sizeof(unsigned int) || ld < sizeof(unsigned int) ||
            la < 2 * sizeof(unsigned int))
@@ -404,10 +404,10 @@ static int __init parse_numa_properties(void)
                const unsigned int *memcell_buf;
                unsigned int len;
 
-               memcell_buf = get_property(memory,
+               memcell_buf = of_get_property(memory,
                        "linux,usable-memory", &len);
                if (!memcell_buf || len <= 0)
-                       memcell_buf = get_property(memory, "reg", &len);
+                       memcell_buf = of_get_property(memory, "reg", &len);
                if (!memcell_buf || len <= 0)
                        continue;
 
@@ -725,7 +725,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
                const unsigned int *memcell_buf;
                unsigned int len;
 
-               memcell_buf = get_property(memory, "reg", &len);
+               memcell_buf = of_get_property(memory, "reg", &len);
                if (!memcell_buf || len <= 0)
                        continue;
 
index 31a2a8ca1de747cc57999496862c3f9ef1bff35c..04200848696925d2265e11c849a3e69a5b1b164f 100644 (file)
@@ -113,7 +113,7 @@ void __init efika_pcisetup(void)
                return;
        }
 
-       bus_range = get_property(pcictrl, "bus-range", &len);
+       bus_range = of_get_property(pcictrl, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING EFIKA_PLATFORM_NAME
                       ": Can't get bus-range for %s\n", pcictrl->full_name);
@@ -159,18 +159,17 @@ void __init efika_pcisetup(void)
 static void efika_show_cpuinfo(struct seq_file *m)
 {
        struct device_node *root;
-       const char *revision = NULL;
-       const char *codegendescription = NULL;
-       const char *codegenvendor = NULL;
+       const char *revision;
+       const char *codegendescription;
+       const char *codegenvendor;
 
        root = of_find_node_by_path("/");
        if (!root)
                return;
 
-       revision = get_property(root, "revision", NULL);
-       codegendescription =
-                   get_property(root, "CODEGEN,description", NULL);
-       codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
+       revision = of_get_property(root, "revision", NULL);
+       codegendescription = of_get_property(root, "CODEGEN,description", NULL);
+       codegenvendor = of_get_property(root, "CODEGEN,vendor", NULL);
 
        if (codegendescription)
                seq_printf(m, "machine\t\t: %s\n", codegendescription);
index cc3b40de21ddf8ef3351694d593568be95601b2a..4f5ebaadcb50dd340bb3520738df04cc54ecaadb 100644 (file)
@@ -94,8 +94,8 @@ static void __init lite5200_setup_arch(void)
 
        np = of_find_node_by_type(NULL, "cpu");
        if (np) {
-               unsigned int *fp =
-                   (int *)get_property(np, "clock-frequency", NULL);
+               const unsigned int *fp =
+                       of_get_property(np, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
@@ -132,7 +132,7 @@ void lite5200_show_cpuinfo(struct seq_file *m)
        const char *model = NULL;
 
        if (np)
-               model = get_property(np, "model", NULL);
+               model = of_get_property(np, "model", NULL);
 
        seq_printf(m, "vendor\t\t:      Freescale Semiconductor\n");
        seq_printf(m, "machine\t\t:     %s\n", model ? model : "unknown");
index ed0cb694aea878692e329f941e7ce40aaf0d7a1d..2dd415ff55a93bf90eccbf77a288e98f355b0159 100644 (file)
@@ -60,7 +60,7 @@ mpc52xx_find_ipb_freq(struct device_node *node)
 
        of_node_get(node);
        while (node) {
-               p_ipb_freq = get_property(node, "bus-frequency", NULL);
+               p_ipb_freq = of_get_property(node, "bus-frequency", NULL);
                if (p_ipb_freq)
                        break;
 
index faf161bdbc1c126c6f996c70bfa5b0bc21d9148c..34d34a26d30576faf647160b4334bee6e56d0327 100644 (file)
@@ -370,7 +370,7 @@ mpc52xx_add_bridge(struct device_node *node)
                return -EINVAL;
        }
 
-       bus_range = get_property(node, "bus-range", &len);
+       bus_range = of_get_property(node, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get %s bus-range, assume bus 0\n",
                       node->full_name);
index 74e7892cdfcf9b9526ba0453f8d2742436facb53..cc9900d2e5eeecd364854646257de8d2d73f3047 100644 (file)
 static int __init get_freq(char *name, unsigned long *val)
 {
        struct device_node *cpu;
-       unsigned int *fp;
+       const unsigned int *fp;
        int found = 0;
 
        /* The cpu node should have timebase and clock frequency properties */
        cpu = of_find_node_by_type(NULL, "cpu");
 
        if (cpu) {
-               fp = (unsigned int *)get_property(cpu, name, NULL);
+               fp = of_get_property(cpu, name, NULL);
                if (fp) {
                        found = 1;
-                       *val = *fp++;
+                       *val = *fp;
                }
 
                of_node_put(cpu);
index 7334c1a15b90d549a9896e105fe588932ee572e4..47cb09f08052837cb2c7f5621dfcca30c4a79f0b 100644 (file)
@@ -456,7 +456,7 @@ void m82xx_pci_init_irq(void)
                iounmap(immap);
                return;
        }
-       irq_map = get_property(np, "interrupt-map", &size);
+       irq_map = of_get_property(np, "interrupt-map", &size);
        if ((!irq_map) || (size <= 7)) {
                printk(KERN_INFO "No interrupt-map property of pci node\n");
                iounmap(immap);
@@ -481,7 +481,7 @@ void m82xx_pci_init_irq(void)
        }
        pci_pic_node = of_node_get(np);
        /* PCI interrupt controller registers: status and mask */
-       regs = get_property(np, "reg", &size);
+       regs = of_get_property(np, "reg", &size);
        if ((!regs) || (size <= 2)) {
                printk(KERN_INFO "No reg property in pci pic node\n");
                iounmap(immap);
@@ -521,20 +521,20 @@ void __init add_bridge(struct device_node *np)
        struct pci_controller *hose;
        struct resource r;
        const int *bus_range;
-       const void *ptr;
+       const uint *ptr;
 
        memset(&r, 0, sizeof(r));
        if (of_address_to_resource(np, 0, &r)) {
                printk(KERN_INFO "No PCI reg property in device tree\n");
                return;
        }
-       if (!(ptr = get_property(np, "clock-frequency", NULL))) {
+       if (!(ptr = of_get_property(np, "clock-frequency", NULL))) {
                printk(KERN_INFO "No clock-frequency property in PCI node");
                return;
        }
-       pci_clk_frq = *(uint *) ptr;
+       pci_clk_frq = *ptr;
        of_node_put(np);
-       bus_range = get_property(np, "bus-range", &len);
+       bus_range = of_get_property(np, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                       " bus 0\n", np->full_name);
index 9c3650555144d91b8a4d9ebdd8a9a0915ad2263c..774457d09e947af0c43ef8cd9d4f99b780e1bd8d 100644 (file)
@@ -60,7 +60,7 @@ int __init add_bridge(struct device_node *dev)
        has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
 
        /* Get bus range if any */
-       bus_range = get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                       " bus 0\n", dev->full_name);
index 8ed034aeca5f139acfac1875e6a3a19058b4c8e6..5d27621f09272af77d520afbdb7c1f29a0ebc303 100644 (file)
@@ -227,7 +227,7 @@ static void __init mpc85xx_ads_setup_arch(void)
        if (cpu != 0) {
                const unsigned int *fp;
 
-               fp = get_property(cpu, "clock-frequency", NULL);
+               fp = of_get_property(cpu, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
index 4232686be441b4e534777c658e2f352223546114..7e71636f90981a1767e8738b25afa014574a865a 100644 (file)
@@ -237,7 +237,7 @@ static void __init mpc85xx_cds_setup_arch(void)
        if (cpu != 0) {
                const unsigned int *fp;
 
-               fp = get_property(cpu, "clock-frequency", NULL);
+               fp = of_get_property(cpu, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
index 81144d2ae455a0f75e31535301467176a094d775..54db41689954c4342733c09d5f19422deaf4fbbb 100644 (file)
@@ -80,7 +80,7 @@ static void __init mpc85xx_mds_setup_arch(void)
        np = of_find_node_by_type(NULL, "cpu");
        if (np != NULL) {
                const unsigned int *fp =
-                   get_property(np, "clock-frequency", NULL);
+                   of_get_property(np, "clock-frequency", NULL);
                if (fp != NULL)
                        loops_per_jiffy = *fp / HZ;
                else
index 05930eeb6e7f8c53886235f16cdbb056611700d9..48f17e23d771ff0492f8dc9cc46efc753f420555 100644 (file)
@@ -51,7 +51,7 @@ int __init add_bridge(struct device_node *dev)
        has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
 
        /* Get bus range if any */
-       bus_range = get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                       " bus 0\n", dev->full_name);
index f42f801cf84ed6af33e7ed21b3110a8a93d0629f..3d3d98f5bd4acb4e7b4585bb73d36dd62c40615a 100644 (file)
@@ -349,7 +349,7 @@ mpc86xx_hpcn_setup_arch(void)
        if (np != 0) {
                const unsigned int *fp;
 
-               fp = get_property(np, "clock-frequency", NULL);
+               fp = of_get_property(np, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
@@ -384,7 +384,7 @@ mpc86xx_hpcn_show_cpuinfo(struct seq_file *m)
 
        root = of_find_node_by_path("/");
        if (root)
-               model = get_property(root, "model", NULL);
+               model = of_get_property(root, "model", NULL);
        seq_printf(m, "Machine\t\t: %s\n", model);
        of_node_put(root);
 
index ba86c48f446ba88a00609fb2d82c064bf0147ab7..8235c562661fc356794c5d04573fda545afe36f0 100644 (file)
@@ -163,7 +163,7 @@ int __init add_bridge(struct device_node *dev)
        has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
 
        /* Get bus range if any */
-       bus_range = get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int))
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                       " bus 0\n", dev->full_name);
index 9ed7125f015000f502015932412ec26916b07326..0901dbada3500e085be2ddf26f882e6384c56371 100644 (file)
@@ -85,17 +85,17 @@ init_internal_rtc(void)
 static int __init get_freq(char *name, unsigned long *val)
 {
         struct device_node *cpu;
-        unsigned int *fp;
+        const unsigned int *fp;
         int found = 0;
 
         /* The cpu node should have timebase and clock frequency properties */
         cpu = of_find_node_by_type(NULL, "cpu");
 
         if (cpu) {
-                fp = (unsigned int *)get_property(cpu, name, NULL);
+                fp = of_get_property(cpu, name, NULL);
                 if (fp) {
                         found = 1;
-                        *val = *fp++;
+                        *val = *fp;
                 }
 
                 of_node_put(cpu);
@@ -262,7 +262,7 @@ void mpc8xx_show_cpuinfo(struct seq_file *m)
 
        root = of_find_node_by_path("/");
        if (root)
-               model = get_property(root, "model", NULL);
+               model = of_get_property(root, "model", NULL);
        seq_printf(m, "Machine\t\t: %s\n", model);
        of_node_put(root);
 
index ef52ce701b0e1fc16afa887ac267192ed9494b38..a35315af5c532fa84ed3a6be3580f31c2e2676a8 100644 (file)
@@ -247,7 +247,7 @@ void init_smc_ioports(struct fs_uart_platform_info *data)
        }
 }
 
-int platform_device_skip(char *model, int id)
+int platform_device_skip(const char *model, int id)
 {
        return 0;
 }
@@ -260,7 +260,7 @@ static void __init mpc86xads_setup_arch(void)
        if (cpu != 0) {
                const unsigned int *fp;
 
-               fp = get_property(cpu, "clock-frequency", NULL);
+               fp = of_get_property(cpu, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
index c5fefdf66c0aa3ac8880b242097a50e35c8ed254..a57b57785acd854c2598251ecf1206a9646d0a6d 100644 (file)
@@ -322,7 +322,7 @@ void init_smc_ioports(struct fs_uart_platform_info *data)
        }
 }
 
-int platform_device_skip(char *model, int id)
+int platform_device_skip(const char *model, int id)
 {
 #ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3
        const char *dev = "FEC";
@@ -346,7 +346,7 @@ static void __init mpc885ads_setup_arch(void)
        if (cpu != 0) {
                const unsigned int *fp;
 
-               fp = get_property(cpu, "clock-frequency", NULL);
+               fp = of_get_property(cpu, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
index 9a0ee62691d529f69a90779e5bbe62cd7e5fbdcd..7c94af4ac439a5208c92ef6408da77e221e2e689 100644 (file)
@@ -174,16 +174,15 @@ void __init cbe_regs_init(void)
                        if (cbe_thread_map[i].cpu_node == cpu)
                                cbe_thread_map[i].regs = map;
 
-               prop = get_property(cpu, "pervasive", NULL);
+               prop = of_get_property(cpu, "pervasive", NULL);
                if (prop != NULL)
                        map->pmd_regs = ioremap(prop->address, prop->len);
 
-               prop = get_property(cpu, "iic", NULL);
+               prop = of_get_property(cpu, "iic", NULL);
                if (prop != NULL)
                        map->iic_regs = ioremap(prop->address, prop->len);
 
-               prop = (struct address_prop *)get_property(cpu, "mic-tm",
-                                                          NULL);
+               prop = of_get_property(cpu, "mic-tm", NULL);
                if (prop != NULL)
                        map->mic_tm_regs = ioremap(prop->address, prop->len);
        }
index 70e0d968d30f9e5edd77efdc7ce01451586440e3..e8bcd2a767ce20df2513605af7aa5a200814ee40 100644 (file)
@@ -43,14 +43,14 @@ static struct cbe_pmd_regs __iomem *get_pmd_regs(struct sys_device *sysdev)
 /* returns the value for a given spu in a given register */
 static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg)
 {
-       unsigned int *id;
+       const unsigned int *id;
        union spe_reg value;
        struct spu *spu;
 
        /* getting the id from the reg attribute will not work on future device-tree layouts
         * in future we should store the id to the spu struct and use it here */
        spu = container_of(sysdev, struct spu, sysdev);
-       id = (unsigned int *)get_property(spu_devnode(spu), "reg", NULL);
+       id = of_get_property(spu_devnode(spu), "reg", NULL);
        value.val = in_be64(&reg->val);
 
        return value.spe[*id];
index 6666d037eb443c763fc9413f460f2ef5a275c86d..4fc4e92775d0d1735ef1f0c38eec093b1a1e3a4d 100644 (file)
@@ -261,7 +261,7 @@ static int iic_host_xlate(struct irq_host *h, struct device_node *ct,
                return -ENODEV;
        if (intsize != 1)
                return -ENODEV;
-       val = get_property(ct, "#interrupt-cells", NULL);
+       val = of_get_property(ct, "#interrupt-cells", NULL);
        if (val == NULL || *val != 1)
                return -ENODEV;
 
@@ -327,7 +327,7 @@ static int __init setup_iic(void)
                if (!device_is_compatible(dn,
                                     "IBM,CBEA-Internal-Interrupt-Controller"))
                        continue;
-               np = get_property(dn, "ibm,interrupt-server-ranges", NULL);
+               np = of_get_property(dn, "ibm,interrupt-server-ranges", NULL);
                if (np == NULL) {
                        printk(KERN_WARNING "IIC: CPU association not found\n");
                        of_node_put(dn);
index 7c73128305ec40754cb87febebec72bbde8a7279..d68d920eb2c4e6bbe8894c3c3dc99caefb8a8fe5 100644 (file)
@@ -318,7 +318,7 @@ static int __init spider_pci_workaround_init(void)
         */
        list_for_each_entry(phb, &hose_list, list_node) {
                struct device_node *np = phb->arch_data;
-               const char *model = get_property(np, "model", NULL);
+               const char *model = of_get_property(np, "model", NULL);
 
                /* If no model property or name isn't exactly "pci", skip */
                if (model == NULL || strcmp(np->name, "pci"))
index 7c953cc022f6d4a3d824c2318d35c77a1e1021c0..760caa76841a025e35969ef58b67002f228e91e7 100644 (file)
@@ -291,9 +291,9 @@ static int cell_iommu_find_ioc(int nid, unsigned long *base)
                const unsigned int *nidp;
                const unsigned long *tmp;
 
-               nidp = get_property(np, "node-id", NULL);
+               nidp = of_get_property(np, "node-id", NULL);
                if (nidp && *nidp == nid) {
-                       tmp = get_property(np, "ioc-translation", NULL);
+                       tmp = of_get_property(np, "ioc-translation", NULL);
                        if (tmp) {
                                *base = *tmp;
                                of_node_put(np);
@@ -430,7 +430,7 @@ cell_iommu_setup_window(struct cbe_iommu *iommu, struct device_node *np,
        struct iommu_window *window;
        const unsigned int *ioid;
 
-       ioid = get_property(np, "ioid", NULL);
+       ioid = of_get_property(np, "ioid", NULL);
        if (ioid == NULL)
                printk(KERN_WARNING "iommu: missing ioid for %s using 0\n",
                       np->full_name);
@@ -549,7 +549,7 @@ static int __init cell_iommu_get_window(struct device_node *np,
        unsigned long index;
 
        /* Use ibm,dma-window if available, else, hard code ! */
-       dma_window = get_property(np, "ibm,dma-window", NULL);
+       dma_window = of_get_property(np, "ibm,dma-window", NULL);
        if (dma_window == NULL) {
                *base = 0;
                *size = 0x80000000u;
index 36989c2eee665546d9b0370ec03e7e8331b678d8..5c5fa34e59ee016b407d902732db02c49de90d8a 100644 (file)
@@ -71,7 +71,7 @@ static void cell_show_cpuinfo(struct seq_file *m)
 
        root = of_find_node_by_path("/");
        if (root)
-               model = get_property(root, "model", NULL);
+               model = of_get_property(root, "model", NULL);
        seq_printf(m, "machine\t\t: CHRP %s\n", model);
        of_node_put(root);
 }
index 21a9ebd4978e332cfc9218760877059eb6235766..fb1f15797bbbb837b29b337d90217c4339e7e38c 100644 (file)
@@ -254,25 +254,25 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic)
        }
 
        /* Now do the horrible hacks */
-       tmp = get_property(pic->of_node, "#interrupt-cells", NULL);
+       tmp = of_get_property(pic->of_node, "#interrupt-cells", NULL);
        if (tmp == NULL)
                return NO_IRQ;
        intsize = *tmp;
-       imap = get_property(pic->of_node, "interrupt-map", &imaplen);
+       imap = of_get_property(pic->of_node, "interrupt-map", &imaplen);
        if (imap == NULL || imaplen < (intsize + 1))
                return NO_IRQ;
        iic = of_find_node_by_phandle(imap[intsize]);
        if (iic == NULL)
                return NO_IRQ;
        imap += intsize + 1;
-       tmp = get_property(iic, "#interrupt-cells", NULL);
+       tmp = of_get_property(iic, "#interrupt-cells", NULL);
        if (tmp == NULL)
                return NO_IRQ;
        intsize = *tmp;
        /* Assume unit is last entry of interrupt specifier */
        unit = imap[intsize - 1];
        /* Ok, we have a unit, now let's try to get the node */
-       tmp = get_property(iic, "ibm,interrupt-server-ranges", NULL);
+       tmp = of_get_property(iic, "ibm,interrupt-server-ranges", NULL);
        if (tmp == NULL) {
                of_node_put(iic);
                return NO_IRQ;
index e34599f53d284250b4174b90f6bbaaa9daab99ba..1d4562ae463dd90ff4e1459cf8514c6fa044008f 100644 (file)
@@ -48,11 +48,11 @@ static u64 __init find_spu_unit_number(struct device_node *spe)
 {
        const unsigned int *prop;
        int proplen;
-       prop = get_property(spe, "unit-id", &proplen);
+       prop = of_get_property(spe, "unit-id", &proplen);
        if (proplen == 4)
                return (u64)*prop;
 
-       prop = get_property(spe, "reg", &proplen);
+       prop = of_get_property(spe, "reg", &proplen);
        if (proplen == 4)
                return (u64)*prop;
 
@@ -76,12 +76,12 @@ static int __init spu_map_interrupts_old(struct spu *spu,
        int nid;
 
        /* Get the interrupt source unit from the device-tree */
-       tmp = get_property(np, "isrc", NULL);
+       tmp = of_get_property(np, "isrc", NULL);
        if (!tmp)
                return -ENODEV;
        isrc = tmp[0];
 
-       tmp = get_property(np->parent->parent, "node-id", NULL);
+       tmp = of_get_property(np->parent->parent, "node-id", NULL);
        if (!tmp) {
                printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__);
                nid = spu->node;
@@ -110,7 +110,7 @@ static void __iomem * __init spu_map_prop_old(struct spu *spu,
        } __attribute__((packed)) *prop;
        int proplen;
 
-       prop = get_property(n, name, &proplen);
+       prop = of_get_property(n, name, &proplen);
        if (prop == NULL || proplen != sizeof (struct address_prop))
                return NULL;
 
@@ -124,11 +124,11 @@ static int __init spu_map_device_old(struct spu *spu)
        int ret;
 
        ret = -ENODEV;
-       spu->name = get_property(node, "name", NULL);
+       spu->name = of_get_property(node, "name", NULL);
        if (!spu->name)
                goto out;
 
-       prop = get_property(node, "local-store", NULL);
+       prop = of_get_property(node, "local-store", NULL);
        if (!prop)
                goto out;
        spu->local_store_phys = *(unsigned long *)prop;
@@ -139,7 +139,7 @@ static int __init spu_map_device_old(struct spu *spu)
        if (!spu->local_store)
                goto out;
 
-       prop = get_property(node, "problem", NULL);
+       prop = of_get_property(node, "problem", NULL);
        if (!prop)
                goto out_unmap;
        spu->problem_phys = *(unsigned long *)prop;
@@ -226,7 +226,7 @@ static int __init spu_map_device(struct spu *spu)
        struct device_node *np = spu->devnode;
        int ret = -ENODEV;
 
-       spu->name = get_property(np, "name", NULL);
+       spu->name = of_get_property(np, "name", NULL);
        if (!spu->name)
                goto out;
 
index 8079983ef94fa5486c264cdf85123acbbbcbb161..e3f4ee97c9132fd7de6ab0bfc867f17059f9a390 100644 (file)
@@ -571,7 +571,7 @@ spufs_init_isolated_loader(void)
        if (!dn)
                return;
 
-       loader = get_property(dn, "loader", &size);
+       loader = of_get_property(dn, "loader", &size);
        if (!loader)
                return;
 
index e94de6a246225d243cb5b9140831f0d338114a8e..755d869d8553c424b978c21a6da7978f438dd03b 100644 (file)
@@ -37,7 +37,7 @@ static int __init find_dma_window(u64 *io_space_id, u64 *ioid,
        const unsigned long *dma_window;
 
        for_each_node_by_type(dn, "ioif") {
-               dma_window = get_property(dn, "toshiba,dma-window", NULL);
+               dma_window = of_get_property(dn, "toshiba,dma-window", NULL);
                if (dma_window) {
                        *io_space_id = (dma_window[0] >> 32) & 0xffffffffUL;
                        *ioid = dma_window[0] & 0x7ffUL;
index 98de836dfed3fd4e7219e6a43130ad7bde04a1a3..d1adf34cd5e8dedc2b9a43625704d765da37734e 100644 (file)
@@ -309,13 +309,13 @@ static int __devinit celleb_setup_fake_pci_device(struct device_node *node,
                goto error;
        }
 
-       name = get_property(node, "model", &rlen);
+       name = of_get_property(node, "model", &rlen);
        if (!name) {
                printk(KERN_ERR "PCI: model property not found.\n");
                goto error;
        }
 
-       wi4 = get_property(node, "reg", &rlen);
+       wi4 = of_get_property(node, "reg", &rlen);
        if (wi4 == NULL)
                goto error;
 
@@ -352,10 +352,10 @@ static int __devinit celleb_setup_fake_pci_device(struct device_node *node,
        }
        pr_debug("PCI: res assigned 0x%016lx\n", (unsigned long)*res);
 
-       wi0 = get_property(node, "device-id", NULL);
-       wi1 = get_property(node, "vendor-id", NULL);
-       wi2 = get_property(node, "class-code", NULL);
-       wi3 = get_property(node, "revision-id", NULL);
+       wi0 = of_get_property(node, "device-id", NULL);
+       wi1 = of_get_property(node, "vendor-id", NULL);
+       wi2 = of_get_property(node, "class-code", NULL);
+       wi3 = of_get_property(node, "revision-id", NULL);
 
        celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff);
        celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff);
@@ -376,7 +376,7 @@ static int __devinit celleb_setup_fake_pci_device(struct device_node *node,
 
        celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr);
 
-       li = get_property(node, "interrupts", &rlen);
+       li = of_get_property(node, "interrupts", &rlen);
        val = li[0];
        celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1);
        celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val);
@@ -424,7 +424,7 @@ static int __devinit phb_set_bus_ranges(struct device_node *dev,
        const int *bus_range;
        unsigned int len;
 
-       bus_range = get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int))
                return 1;
 
@@ -451,7 +451,7 @@ int __devinit celleb_setup_phb(struct pci_controller *phb)
        struct device_node *node;
        unsigned int rlen;
 
-       name = get_property(dev, "name", &rlen);
+       name = of_get_property(dev, "name", &rlen);
        if (!name)
                return 1;
 
index 5f4d0d9332388e1e9455f5a0a7a6c1c49294a7d4..ab1db9dd1aa1f5fbef3f86fdf73ac24bf31ff528 100644 (file)
@@ -67,7 +67,7 @@ static void celleb_show_cpuinfo(struct seq_file *m)
 
        root = of_find_node_by_path("/");
        if (root)
-               model = get_property(root, "model", NULL);
+               model = of_get_property(root, "model", NULL);
        /* using "CHRP" is to trick anaconda into installing FCx into Celleb */
        seq_printf(m, "machine\t\t: %s %s\n", celleb_machine_type, model);
        of_node_put(root);
index 0dd4a64757d92a03d1699046d028a72407c426c8..8efd4244701c2eb1d0a73b07d9e21888ae066e94 100644 (file)
@@ -74,7 +74,7 @@ void __init chrp_nvram_init(void)
        if (nvram == NULL)
                return;
 
-       nbytes_p = get_property(nvram, "#bytes", &proplen);
+       nbytes_p = of_get_property(nvram, "#bytes", &proplen);
        if (nbytes_p == NULL || proplen != sizeof(unsigned int))
                return;
 
index e2f870800e58f98fcef81f24344560364802a56a..b23e39796a0b6f02a3d1e1cf68afa60226f78c58 100644 (file)
@@ -217,7 +217,7 @@ chrp_find_bridges(void)
         * properties to adequately identify them, so we have to
         * look at what sort of machine this is as well.
         */
-       machine = get_property(root, "model", NULL);
+       machine = of_get_property(root, "model", NULL);
        if (machine != NULL) {
                is_longtrail = strncmp(machine, "IBM,LongTrail", 13) == 0;
                is_mot = strncmp(machine, "MOT", 3) == 0;
@@ -236,7 +236,7 @@ chrp_find_bridges(void)
                               dev->full_name);
                        continue;
                }
-               bus_range = get_property(dev, "bus-range", &len);
+               bus_range = of_get_property(dev, "bus-range", &len);
                if (bus_range == NULL || len < 2 * sizeof(int)) {
                        printk(KERN_WARNING "Can't get bus-range for %s\n",
                                dev->full_name);
@@ -262,7 +262,7 @@ chrp_find_bridges(void)
                hose->first_busno = bus_range[0];
                hose->last_busno = bus_range[1];
 
-               model = get_property(dev, "model", NULL);
+               model = of_get_property(dev, "model", NULL);
                if (model == NULL)
                        model = "<none>";
                if (device_is_compatible(dev, "IBM,python")) {
@@ -284,7 +284,8 @@ chrp_find_bridges(void)
                                           r.start + 0x000f8000,
                                           r.start + 0x000f8010);
                        if (index == 0) {
-                               dma = get_property(dev, "system-dma-base",&len);
+                               dma = of_get_property(dev, "system-dma-base",
+                                                       &len);
                                if (dma && len >= sizeof(*dma)) {
                                        dma = (unsigned int *)
                                                (((unsigned long)dma) +
@@ -302,7 +303,7 @@ chrp_find_bridges(void)
 
                /* check the first bridge for a property that we can
                   use to set pci_dram_offset */
-               dma = get_property(dev, "ibm,dma-ranges", &len);
+               dma = of_get_property(dev, "ibm,dma-ranges", &len);
                if (index == 0 && dma != NULL && len >= 6 * sizeof(*dma)) {
                        pci_dram_offset = dma[2] - dma[3];
                        printk("pci_dram_offset = %lx\n", pci_dram_offset);
index 044ad3f1e04a00b8d38bf32a58a1c218d28f000b..05d1bc0c8918ae0dd13d7bad4c400868dec6ff54 100644 (file)
@@ -112,7 +112,7 @@ void chrp_show_cpuinfo(struct seq_file *m)
 
        root = find_path_device("/");
        if (root)
-               model = get_property(root, "model", NULL);
+               model = of_get_property(root, "model", NULL);
        seq_printf(m, "machine\t\t: CHRP %s\n", model);
 
        /* longtrail (goldengate) stuff */
@@ -205,7 +205,8 @@ static void __init sio_init(void)
        struct device_node *root;
 
        if ((root = find_path_device("/")) &&
-           !strncmp(get_property(root, "model", NULL), "IBM,LongTrail", 13)) {
+           !strncmp(of_get_property(root, "model", NULL),
+                       "IBM,LongTrail", 13)) {
                /* logical device 0 (KBC/Keyboard) */
                sio_fixup_irq("keyboard", 0, 1, 2);
                /* select logical device 1 (KBC/Mouse) */
@@ -225,7 +226,7 @@ static void __init pegasos_set_l2cr(void)
        /* Enable L2 cache if needed */
        np = find_type_devices("cpu");
        if (np != NULL) {
-               const unsigned int *l2cr = get_property(np, "l2cr", NULL);
+               const unsigned int *l2cr = of_get_property(np, "l2cr", NULL);
                if (l2cr == NULL) {
                        printk ("Pegasos l2cr : no cpu l2cr property found\n");
                        return;
@@ -256,7 +257,7 @@ void __init chrp_setup_arch(void)
        loops_per_jiffy = 50000000/HZ;
 
        if (root)
-               machine = get_property(root, "model", NULL);
+               machine = of_get_property(root, "model", NULL);
        if (machine && strncmp(machine, "Pegasos", 7) == 0) {
                _chrp_type = _CHRP_Pegasos;
        } else if (machine && strncmp(machine, "IBM", 3) == 0) {
@@ -360,7 +361,7 @@ static void __init chrp_find_openpic(void)
                return;
        root = of_find_node_by_path("/");
        if (root) {
-               opprop = get_property(root, "platform-open-pic", &oplen);
+               opprop = of_get_property(root, "platform-open-pic", &oplen);
                na = of_n_addr_cells(root);
        }
        if (opprop && oplen >= na * sizeof(unsigned int)) {
@@ -377,7 +378,7 @@ static void __init chrp_find_openpic(void)
 
        printk(KERN_INFO "OpenPIC at %lx\n", opaddr);
 
-       iranges = get_property(np, "interrupt-ranges", &len);
+       iranges = of_get_property(np, "interrupt-ranges", &len);
        if (iranges == NULL)
                len = 0;        /* non-distributed mpic */
        else
@@ -463,7 +464,7 @@ static void __init chrp_find_8259(void)
         * from anyway
         */
        for (np = find_devices("pci"); np != NULL; np = np->next) {
-               const unsigned int *addrp = get_property(np,
+               const unsigned int *addrp = of_get_property(np,
                                "8259-interrupt-acknowledge", NULL);
 
                if (addrp == NULL)
@@ -543,7 +544,7 @@ chrp_init2(void)
         */
        device = find_devices("rtas");
        if (device)
-               p = get_property(device, "rtas-event-scan-rate", NULL);
+               p = of_get_property(device, "rtas-event-scan-rate", NULL);
        if (p && *p) {
                /*
                 * Arrange to call chrp_event_scan at least *p times
index 3f6c4114f908c392a27e2b1d92b6691b875782de..b412f006a9c55a8dd0bd60ebd193ab1277872793 100644 (file)
@@ -58,11 +58,11 @@ static int __init add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
-       int *bus_range;
+       const int *bus_range;
 
        printk("Adding PCI host bridge %s\n", dev->full_name);
 
-       bus_range = (int *) get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int))
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                                " bus 0\n", dev->full_name);
@@ -106,7 +106,7 @@ static void __init linkstation_init_IRQ(void)
 {
        struct mpic *mpic;
        struct device_node *dnp;
-       void *prop;
+       const u32 *prop;
        int size;
        phys_addr_t paddr;
 
@@ -114,7 +114,7 @@ static void __init linkstation_init_IRQ(void)
        if (dnp == NULL)
                return;
 
-       prop = (struct device_node *)get_property(dnp, "reg", &size);
+       prop = of_get_property(dnp, "reg", &size);
        paddr = (phys_addr_t)of_translate_address(dnp, prop);
 
        mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET, 4, 32, " EPIC     ");
index 0e837762cc5bf5b60b7a047fe62ac9b2c51d2a05..d0bee9f19e4e8659140c75b0ad215baa50cac2ef 100644 (file)
@@ -110,8 +110,8 @@ static int __init ls_uarts_init(void)
        if (!avr)
                return -EINVAL;
 
-       avr_clock = *(u32*)get_property(avr, "clock-frequency", &len);
-       phys_addr = ((u32*)get_property(avr, "reg", &len))[0];
+       avr_clock = *(u32*)of_get_property(avr, "clock-frequency", &len);
+       phys_addr = ((u32*)of_get_property(avr, "reg", &len))[0];
 
        if (!avr_clock || !phys_addr)
                return -EINVAL;
index 604b47dd915c88a8ede4554d1793838a852ad123..c3f64ddb0be6e2e756a5e915b0276f72c62a9639 100644 (file)
@@ -81,7 +81,7 @@ static void __init mpc7448_hpc2_setup_arch(void)
        if (cpu != 0) {
                const unsigned int *fp;
 
-               fp = get_property(cpu, "clock-frequency", NULL);
+               fp = of_get_property(cpu, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
@@ -132,7 +132,7 @@ static void __init mpc7448_hpc2_init_IRQ(void)
        tsi_pic = of_find_node_by_type(NULL, "open-pic");
        if (tsi_pic) {
                unsigned int size;
-               const void *prop = get_property(tsi_pic, "reg", &size);
+               const void *prop = of_get_property(tsi_pic, "reg", &size);
                mpic_paddr = of_translate_address(tsi_pic, prop);
        }
 
index 7df2902271d01c7795608cb010c8a7580bd8e8ad..3b6a9666c2c07c0407989a5a17d98e2cdcdf4179 100644 (file)
@@ -171,7 +171,7 @@ void iommu_devnode_init_iSeries(struct pci_dev *pdev, struct device_node *dn)
 {
        struct iommu_table *tbl;
        struct pci_dn *pdn = PCI_DN(dn);
-       const u32 *lsn = get_property(dn, "linux,logical-slot-number", NULL);
+       const u32 *lsn = of_get_property(dn, "linux,logical-slot-number", NULL);
 
        BUG_ON(lsn == NULL);
 
index 404cf06968570884c397e33286b6d254f92d2adf..9c974227155e5a957ad98391bde74a97f4f62a4b 100644 (file)
@@ -176,7 +176,7 @@ void __init iSeries_pci_final_fixup(void)
                        struct pci_dn *pdn = PCI_DN(node);
                        const u32 *agent;
 
-                       agent = get_property(node, "linux,agent-id", NULL);
+                       agent = of_get_property(node, "linux,agent-id", NULL);
                        if ((pdn != NULL) && (agent != NULL)) {
                                u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
                                                pdn->bussubno);
@@ -754,7 +754,7 @@ void __init iSeries_pcibios_init(void)
                if ((node->type == NULL) || (strcmp(node->type, "pci") != 0))
                        continue;
 
-               busp = get_property(node, "bus-range", NULL);
+               busp = of_get_property(node, "bus-range", NULL);
                if (busp == NULL)
                        continue;
                bus = *busp;
index e2100ece9c652759162dec6f7b0bee08656a9297..2ca2d8a9de97ac5bcf23148e62141df6978f069b 100644 (file)
@@ -155,7 +155,7 @@ static int proc_viopath_show(struct seq_file *m, void *v)
        node = of_find_node_by_path("/");
        sysid = NULL;
        if (node != NULL)
-               sysid = get_property(node, "system-id", NULL);
+               sysid = of_get_property(node, "system-id", NULL);
 
        if (sysid == NULL)
                seq_printf(m, "SRLNBR=<UNKNOWN>\n");
index ab5a6f12e1f0a9a043ca80cdd5bd0155149e680b..b1d3b99c3f9d74abf96f5f5fa46b5f5de3b72a88 100644 (file)
@@ -44,11 +44,11 @@ static int __init fixup_one_level_bus_range(struct device_node *node, int higher
                int len;
 
                /* For PCI<->PCI bridges or CardBus bridges, we go down */
-               class_code = get_property(node, "class-code", NULL);
+               class_code = of_get_property(node, "class-code", NULL);
                if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI &&
                        (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS))
                        continue;
-               bus_range = get_property(node, "bus-range", &len);
+               bus_range = of_get_property(node, "bus-range", &len);
                if (bus_range != NULL && len > 2 * sizeof(int)) {
                        if (bus_range[1] > higher)
                                higher = bus_range[1];
@@ -454,7 +454,7 @@ static int __init add_bridge(struct device_node *dev)
 
        DBG("Adding PCI host bridge %s\n", dev->full_name);
 
-       bus_range = get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n",
                dev->full_name);
index f21add0e4786d5bc70ad8c930caf5274859e748b..120cd048e0ccd4721ca9573fb69f148837f940ac 100644 (file)
@@ -113,8 +113,8 @@ static void maple_restart(char *cmd)
                printk(KERN_EMERG "Maple: Unable to find Service Processor\n");
                goto fail;
        }
-       maple_nvram_offset = get_property(sp, "restart-addr", NULL);
-       maple_nvram_command = get_property(sp, "restart-value", NULL);
+       maple_nvram_offset = of_get_property(sp, "restart-addr", NULL);
+       maple_nvram_command = of_get_property(sp, "restart-value", NULL);
        of_node_put(sp);
 
        /* send command */
@@ -140,8 +140,8 @@ static void maple_power_off(void)
                printk(KERN_EMERG "Maple: Unable to find Service Processor\n");
                goto fail;
        }
-       maple_nvram_offset = get_property(sp, "power-off-addr", NULL);
-       maple_nvram_command = get_property(sp, "power-off-value", NULL);
+       maple_nvram_offset = of_get_property(sp, "power-off-addr", NULL);
+       maple_nvram_command = of_get_property(sp, "power-off-value", NULL);
        of_node_put(sp);
 
        /* send command */
@@ -249,7 +249,7 @@ static void __init maple_init_IRQ(void)
        /* Find address list in /platform-open-pic */
        root = of_find_node_by_path("/");
        naddr = of_n_addr_cells(root);
-       opprop = get_property(root, "platform-open-pic", &opplen);
+       opprop = of_get_property(root, "platform-open-pic", &opplen);
        if (opprop != 0) {
                openpic_addr = of_read_number(opprop, naddr);
                has_isus = (opplen > naddr);
@@ -260,7 +260,7 @@ static void __init maple_init_IRQ(void)
        BUG_ON(openpic_addr == 0);
 
        /* Check for a big endian MPIC */
-       if (get_property(np, "big-endian", NULL) != NULL)
+       if (of_get_property(np, "big-endian", NULL) != NULL)
                flags |= MPIC_BIG_ENDIAN;
 
        /* XXX Maple specific bits */
index 07819cd3ac444d6fe2287a794d55e0839df6235d..95fa6a7d15ee4d11aab9e8543d8ac59d11f4c1f7 100644 (file)
@@ -249,7 +249,7 @@ void iommu_init_early_pasemi(void)
        iommu_off = 1;
 #else
        iommu_off = of_chosen &&
-                       get_property(of_chosen, "linux,iommu-off", NULL);
+                       of_get_property(of_chosen, "linux,iommu-off", NULL);
 #endif
        if (iommu_off) {
                /* Direct I/O, IOMMU off */
index d4fd61328c8bd13c1130d3ee2e39a54009082005..32a614cacf2483f2f1d398eb3deafcf8f224c71a 100644 (file)
@@ -137,7 +137,7 @@ static __init void pas_init_IRQ(void)
        /* Find address list in /platform-open-pic */
        root = of_find_node_by_path("/");
        naddr = of_n_addr_cells(root);
-       opprop = get_property(root, "platform-open-pic", &opplen);
+       opprop = of_get_property(root, "platform-open-pic", &opplen);
        if (!opprop) {
                printk(KERN_ERR "No platform-open-pic property.\n");
                of_node_put(root);
index de7440e62cc4fb05f0bc7b58e0d5b0ad3e81ff95..0dc8a45c408abd48e7a892ea19ba2ce235f5fcea 100644 (file)
@@ -59,7 +59,7 @@ int pmac_has_backlight_type(const char *type)
        struct device_node* bk_node = find_devices("backlight");
 
        if (bk_node) {
-               const char *prop = get_property(bk_node,
+               const char *prop = of_get_property(bk_node,
                                "backlight-control", NULL);
                if (prop && strncmp(prop, type, strlen(type)) == 0)
                        return 1;
index c2b6b4134f6849c28e8871edde719269fa0ab8a0..76eda9fcd1aa429463d1e196971617171de75c1d 100644 (file)
@@ -421,7 +421,7 @@ static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
 
 static u32 read_gpio(struct device_node *np)
 {
-       const u32 *reg = get_property(np, "reg", NULL);
+       const u32 *reg = of_get_property(np, "reg", NULL);
        u32 offset;
 
        if (reg == NULL)
@@ -521,13 +521,14 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
                int lenp, rc;
                const u32 *freqs, *ratio;
 
-               freqs = get_property(cpunode, "bus-frequencies", &lenp);
+               freqs = of_get_property(cpunode, "bus-frequencies", &lenp);
                lenp /= sizeof(u32);
                if (freqs == NULL || lenp != 2) {
                        printk(KERN_ERR "cpufreq: bus-frequencies incorrect or missing\n");
                        return 1;
                }
-               ratio = get_property(cpunode, "processor-to-bus-ratio*2", NULL);
+               ratio = of_get_property(cpunode, "processor-to-bus-ratio*2",
+                                               NULL);
                if (ratio == NULL) {
                        printk(KERN_ERR "cpufreq: processor-to-bus-ratio*2 missing\n");
                        return 1;
@@ -562,7 +563,7 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
        /* If we use the PMU, look for the min & max frequencies in the
         * device-tree
         */
-       value = get_property(cpunode, "min-clock-frequency", NULL);
+       value = of_get_property(cpunode, "min-clock-frequency", NULL);
        if (!value)
                return 1;
        low_freq = (*value) / 1000;
@@ -571,7 +572,7 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
        if (low_freq < 100000)
                low_freq *= 10;
 
-       value = get_property(cpunode, "max-clock-frequency", NULL);
+       value = of_get_property(cpunode, "max-clock-frequency", NULL);
        if (!value)
                return 1;
        hi_freq = (*value) / 1000;
@@ -585,7 +586,7 @@ static int pmac_cpufreq_init_7447A(struct device_node *cpunode)
 {
        struct device_node *volt_gpio_np;
 
-       if (get_property(cpunode, "dynamic-power-step", NULL) == NULL)
+       if (of_get_property(cpunode, "dynamic-power-step", NULL) == NULL)
                return 1;
 
        volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select");
@@ -614,11 +615,11 @@ static int pmac_cpufreq_init_750FX(struct device_node *cpunode)
        u32 pvr;
        const u32 *value;
 
-       if (get_property(cpunode, "dynamic-power-step", NULL) == NULL)
+       if (of_get_property(cpunode, "dynamic-power-step", NULL) == NULL)
                return 1;
 
        hi_freq = cur_freq;
-       value = get_property(cpunode, "reduced-clock-frequency", NULL);
+       value = of_get_property(cpunode, "reduced-clock-frequency", NULL);
        if (!value)
                return 1;
        low_freq = (*value) / 1000;
@@ -662,14 +663,14 @@ static int __init pmac_cpufreq_setup(void)
                goto out;
 
        /* Get current cpu clock freq */
-       value = get_property(cpunode, "clock-frequency", NULL);
+       value = of_get_property(cpunode, "clock-frequency", NULL);
        if (!value)
                goto out;
        cur_freq = (*value) / 1000;
 
        /*  Check for 7447A based MacRISC3 */
        if (machine_is_compatible("MacRISC3") &&
-           get_property(cpunode, "dynamic-power-step", NULL) &&
+           of_get_property(cpunode, "dynamic-power-step", NULL) &&
            PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
                pmac_cpufreq_init_7447A(cpunode);
        /* Check for other MacRISC3 machines */
index 9d22361a26d6012a93393bfb664803aa6f73785a..567d5523b6909e294f4fd204890848e940265a2e 100644 (file)
@@ -410,7 +410,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
        /* Get first CPU node */
        for (cpunode = NULL;
             (cpunode = of_get_next_child(cpus, cpunode)) != NULL;) {
-               const u32 *reg = get_property(cpunode, "reg", NULL);
+               const u32 *reg = of_get_property(cpunode, "reg", NULL);
                if (reg == NULL || (*reg) != 0)
                        continue;
                if (!strcmp(cpunode->type, "cpu"))
@@ -422,7 +422,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
        }
 
        /* Check 970FX for now */
-       valp = get_property(cpunode, "cpu-version", NULL);
+       valp = of_get_property(cpunode, "cpu-version", NULL);
        if (!valp) {
                DBG("No cpu-version property !\n");
                goto bail_noprops;
@@ -434,7 +434,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
        }
 
        /* Look for the powertune data in the device-tree */
-       g5_pmode_data = get_property(cpunode, "power-mode-data",&psize);
+       g5_pmode_data = of_get_property(cpunode, "power-mode-data",&psize);
        if (!g5_pmode_data) {
                DBG("No power-mode-data !\n");
                goto bail_noprops;
@@ -493,7 +493,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
         * half freq in this version. So far, I haven't yet seen a machine
         * supporting anything else.
         */
-       valp = get_property(cpunode, "clock-frequency", NULL);
+       valp = of_get_property(cpunode, "clock-frequency", NULL);
        if (!valp)
                return -ENODEV;
        max_freq = (*valp)/1000;
@@ -563,7 +563,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus)
        /* Lookup the cpuid eeprom node */
         cpuid = of_find_node_by_path("/u3@0,f8000000/i2c@f8001000/cpuid@a0");
        if (cpuid != NULL)
-               eeprom = get_property(cpuid, "cpuid", NULL);
+               eeprom = of_get_property(cpuid, "cpuid", NULL);
        if (eeprom == NULL) {
                printk(KERN_ERR "cpufreq: Can't find cpuid EEPROM !\n");
                rc = -ENODEV;
@@ -573,13 +573,13 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus)
        /* Lookup the i2c hwclock */
        for (hwclock = NULL;
             (hwclock = of_find_node_by_name(hwclock, "i2c-hwclock")) != NULL;){
-               const char *loc = get_property(hwclock,
+               const char *loc = of_get_property(hwclock,
                                "hwctrl-location", NULL);
                if (loc == NULL)
                        continue;
                if (strcmp(loc, "CPU CLOCK"))
                        continue;
-               if (!get_property(hwclock, "platform-get-frequency", NULL))
+               if (!of_get_property(hwclock, "platform-get-frequency", NULL))
                        continue;
                break;
        }
@@ -638,7 +638,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus)
         */
 
        /* Get max frequency from device-tree */
-       valp = get_property(cpunode, "clock-frequency", NULL);
+       valp = of_get_property(cpunode, "clock-frequency", NULL);
        if (!valp) {
                printk(KERN_ERR "cpufreq: Can't find CPU frequency !\n");
                rc = -ENODEV;
index 24cc50c1774ad5131429ed27caef9e7add3ed906..103fcc4c560588a414cb850e99d8328086ffe540 100644 (file)
@@ -1057,8 +1057,8 @@ core99_reset_cpu(struct device_node *node, long param, long value)
        if (np == NULL)
                return -ENODEV;
        for (np = np->child; np != NULL; np = np->sibling) {
-               const u32 *num = get_property(np, "reg", NULL);
-               const u32 *rst = get_property(np, "soft-reset", NULL);
+               const u32 *num = of_get_property(np, "reg", NULL);
+               const u32 *rst = of_get_property(np, "soft-reset", NULL);
                if (num == NULL || rst == NULL)
                        continue;
                if (param == *num) {
@@ -1095,7 +1095,7 @@ core99_usb_enable(struct device_node *node, long param, long value)
            macio->type != macio_intrepid)
                return -ENODEV;
 
-       prop = get_property(node, "AAPL,clock-id", NULL);
+       prop = of_get_property(node, "AAPL,clock-id", NULL);
        if (!prop)
                return -ENODEV;
        if (strncmp(prop, "usb0u048", 8) == 0)
@@ -1506,8 +1506,8 @@ static long g5_reset_cpu(struct device_node *node, long param, long value)
        if (np == NULL)
                return -ENODEV;
        for (np = np->child; np != NULL; np = np->sibling) {
-               const u32 *num = get_property(np, "reg", NULL);
-               const u32 *rst = get_property(np, "soft-reset", NULL);
+               const u32 *num = of_get_property(np, "reg", NULL);
+               const u32 *rst = of_get_property(np, "soft-reset", NULL);
                if (num == NULL || rst == NULL)
                        continue;
                if (param == *num) {
@@ -2411,7 +2411,7 @@ static int __init probe_motherboard(void)
         */
        dt = find_devices("device-tree");
        if (dt != NULL)
-               model = get_property(dt, "model", NULL);
+               model = of_get_property(dt, "model", NULL);
        for(i=0; model && i<(sizeof(pmac_mb_defs)/sizeof(struct pmac_mb_def)); i++) {
            if (strcmp(model, pmac_mb_defs[i].model_string) == 0) {
                pmac_mb = pmac_mb_defs[i];
@@ -2509,7 +2509,7 @@ found:
                if (np->sibling)
                        break;
                /* Nap mode not supported if flush-on-lock property is present */
-               if (get_property(np, "flush-on-lock", NULL))
+               if (of_get_property(np, "flush-on-lock", NULL))
                        break;
                powersave_nap = 1;
                printk(KERN_DEBUG "Processor NAP mode on idle enabled.\n");
@@ -2558,7 +2558,7 @@ static void __init probe_uninorth(void)
        if (uninorth_node == NULL)
                return;
 
-       addrp = get_property(uninorth_node, "reg", NULL);
+       addrp = of_get_property(uninorth_node, "reg", NULL);
        if (addrp == NULL)
                return;
        address = of_translate_address(uninorth_node, addrp);
@@ -2642,7 +2642,7 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
                return;
        }
        if (type == macio_keylargo || type == macio_keylargo2) {
-               const u32 *did = get_property(node, "device-id", NULL);
+               const u32 *did = of_get_property(node, "device-id", NULL);
                if (*did == 0x00000025)
                        type = macio_pangea;
                if (*did == 0x0000003e)
@@ -2655,7 +2655,7 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
        macio_chips[i].base     = base;
        macio_chips[i].flags    = MACIO_FLAG_SCCB_ON | MACIO_FLAG_SCCB_ON;
        macio_chips[i].name     = macio_names[type];
-       revp = get_property(node, "revision-id", NULL);
+       revp = of_get_property(node, "revision-id", NULL);
        if (revp)
                macio_chips[i].rev = *revp;
        printk(KERN_INFO "Found a %s mac-io controller, rev: %d, mapped at 0x%p\n",
@@ -2706,8 +2706,8 @@ initial_serial_shutdown(struct device_node *np)
        int port_type = PMAC_SCC_ASYNC;
        int modem = 0;
 
-       slots = get_property(np, "slot-names", &len);
-       conn = get_property(np, "AAPL,connector", &len);
+       slots = of_get_property(np, "slot-names", &len);
+       conn = of_get_property(np, "AAPL,connector", &len);
        if (conn && (strcmp(conn, "infrared") == 0))
                port_type = PMAC_SCC_IRDA;
        else if (device_is_compatible(np, "cobalt"))
index bfc4829162f1f2aba47aeca9b93df92ae3df01d0..5430e146b3e91c5aa603ac258935b485f8599b63 100644 (file)
@@ -491,7 +491,7 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
         * on all i2c keywest nodes so far ... we would have to fallback
         * to macio parsing if that wasn't the case
         */
-       addrp = get_property(np, "AAPL,address", NULL);
+       addrp = of_get_property(np, "AAPL,address", NULL);
        if (addrp == NULL) {
                printk(KERN_ERR "low_i2c: Can't find address for %s\n",
                       np->full_name);
@@ -505,13 +505,13 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
        host->timeout_timer.function = kw_i2c_timeout;
        host->timeout_timer.data = (unsigned long)host;
 
-       psteps = get_property(np, "AAPL,address-step", NULL);
+       psteps = of_get_property(np, "AAPL,address-step", NULL);
        steps = psteps ? (*psteps) : 0x10;
        for (host->bsteps = 0; (steps & 0x01) == 0; host->bsteps++)
                steps >>= 1;
        /* Select interface rate */
        host->speed = KW_I2C_MODE_25KHZ;
-       prate = get_property(np, "AAPL,i2c-rate", NULL);
+       prate = of_get_property(np, "AAPL,i2c-rate", NULL);
        if (prate) switch(*prate) {
        case 100:
                host->speed = KW_I2C_MODE_100KHZ;
@@ -619,7 +619,7 @@ static void __init kw_i2c_probe(void)
                } else {
                        for (child = NULL;
                             (child = of_get_next_child(np, child)) != NULL;) {
-                               const u32 *reg = get_property(child,
+                               const u32 *reg = of_get_property(child,
                                                "reg", NULL);
                                if (reg == NULL)
                                        continue;
@@ -905,7 +905,7 @@ static void __init smu_i2c_probe(void)
                if (strcmp(busnode->type, "i2c") &&
                    strcmp(busnode->type, "i2c-bus"))
                        continue;
-               reg = get_property(busnode, "reg", NULL);
+               reg = of_get_property(busnode, "reg", NULL);
                if (reg == NULL)
                        continue;
 
@@ -950,7 +950,8 @@ struct pmac_i2c_bus *pmac_i2c_find_bus(struct device_node *node)
                        if (p == bus->busnode) {
                                if (prev && bus->flags & pmac_i2c_multibus) {
                                        const u32 *reg;
-                                       reg = get_property(prev, "reg", NULL);
+                                       reg = of_get_property(prev, "reg",
+                                                               NULL);
                                        if (!reg)
                                                continue;
                                        if (((*reg) >> 8) != bus->channel)
@@ -971,7 +972,7 @@ EXPORT_SYMBOL_GPL(pmac_i2c_find_bus);
 
 u8 pmac_i2c_get_dev_addr(struct device_node *device)
 {
-       const u32 *reg = get_property(device, "reg", NULL);
+       const u32 *reg = of_get_property(device, "reg", NULL);
 
        if (reg == NULL)
                return 0;
index 431a685a15dd53e2ae3f3fc6cd8f95fec6d7d1b1..092cef4160a10a481219f7f0c624ca35306d7ad7 100644 (file)
@@ -70,11 +70,11 @@ static int __init fixup_one_level_bus_range(struct device_node *node, int higher
                int len;
 
                /* For PCI<->PCI bridges or CardBus bridges, we go down */
-               class_code = get_property(node, "class-code", NULL);
+               class_code = of_get_property(node, "class-code", NULL);
                if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI &&
                        (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS))
                        continue;
-               bus_range = get_property(node, "bus-range", &len);
+               bus_range = of_get_property(node, "bus-range", &len);
                if (bus_range != NULL && len > 2 * sizeof(int)) {
                        if (bus_range[1] > higher)
                                higher = bus_range[1];
@@ -246,8 +246,8 @@ static int chaos_validate_dev(struct pci_bus *bus, int devfn, int offset)
        if (np == NULL)
                return PCIBIOS_DEVICE_NOT_FOUND;
 
-       vendor = get_property(np, "vendor-id", NULL);
-       device = get_property(np, "device-id", NULL);
+       vendor = of_get_property(np, "vendor-id", NULL);
+       device = of_get_property(np, "device-id", NULL);
        if (vendor == NULL || device == NULL)
                return PCIBIOS_DEVICE_NOT_FOUND;
 
@@ -691,17 +691,17 @@ static void __init fixup_nec_usb2(void)
                const u32 *prop;
                u8 bus, devfn;
 
-               prop = get_property(nec, "vendor-id", NULL);
+               prop = of_get_property(nec, "vendor-id", NULL);
                if (prop == NULL)
                        continue;
                if (0x1033 != *prop)
                        continue;
-               prop = get_property(nec, "device-id", NULL);
+               prop = of_get_property(nec, "device-id", NULL);
                if (prop == NULL)
                        continue;
                if (0x0035 != *prop)
                        continue;
-               prop = get_property(nec, "reg", NULL);
+               prop = of_get_property(nec, "reg", NULL);
                if (prop == NULL)
                        continue;
                devfn = (prop[0] >> 8) & 0xff;
@@ -909,7 +909,7 @@ static int __init add_bridge(struct device_node *dev)
        has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
 
        /* Get bus range if any */
-       bus_range = get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                       " bus 0\n", dev->full_name);
index 5c6c15c5f9a382fc529b636e270986b7825c88f8..45d54b9ad9e04b0941bb94699a6373fe0dec53d0 100644 (file)
@@ -114,7 +114,7 @@ static void macio_gpio_init_one(struct macio_chip *macio)
         * we just create them all
         */
        for (gp = NULL; (gp = of_get_next_child(gparent, gp)) != NULL;) {
-               const u32 *reg = get_property(gp, "reg", NULL);
+               const u32 *reg = of_get_property(gp, "reg", NULL);
                unsigned long offset;
                if (reg == NULL)
                        continue;
index a128553b8413c88be9749d23e1cc09d73e07a74f..85434231ae14d5658be4d6c122d8ab78d8f27ed1 100644 (file)
@@ -820,7 +820,7 @@ struct pmf_function *__pmf_find_function(struct device_node *target,
         * one, then we fallback to a direct call attempt
         */
        snprintf(fname, 63, "platform-%s", name);
-       prop = get_property(target, fname, NULL);
+       prop = of_get_property(target, fname, NULL);
        if (prop == NULL)
                goto find_it;
        ph = *prop;
index 5e5c0e4add91dc09cf465d0e3bd9eb0f4dfdabb8..f59d311e25dade743f11f810c574bf161e610217 100644 (file)
@@ -482,7 +482,7 @@ static struct mpic * __init pmac_setup_one_mpic(struct device_node *np,
        pmac_call_feature(PMAC_FTR_ENABLE_MPIC, np, 0, 0);
 
        flags |= MPIC_WANTS_RESET;
-       if (get_property(np, "big-endian", NULL))
+       if (of_get_property(np, "big-endian", NULL))
                flags |= MPIC_BIG_ENDIAN;
 
        /* Primary Big Endian means HT interrupts. This is quite dodgy
@@ -510,7 +510,7 @@ static int __init pmac_pic_probe_mpic(void)
        for (np = NULL; (np = of_find_node_by_type(np, "open-pic"))
                     != NULL;) {
                if (master == NULL &&
-                   get_property(np, "interrupts", NULL) == NULL)
+                   of_get_property(np, "interrupts", NULL) == NULL)
                        master = of_node_get(np);
                else if (slave == NULL)
                        slave = of_node_get(np);
@@ -575,7 +575,7 @@ void __init pmac_pic_init(void)
 #ifdef CONFIG_PPC32
        if (!pmac_newworld)
                flags |= OF_IMAP_OLDWORLD_MAC;
-       if (get_property(of_chosen, "linux,bootx", NULL) != NULL)
+       if (of_get_property(of_chosen, "linux,bootx", NULL) != NULL)
                flags |= OF_IMAP_NO_PHANDLE;
 #endif /* CONFIG_PPC_32 */
 
index f2a3063980ebc5737f32e887a8e0d9ab0b113af1..8c96f2461e9ac7f47535e091faa2a09745cb0f69 100644 (file)
@@ -134,12 +134,12 @@ static void pmac_show_cpuinfo(struct seq_file *m)
        seq_printf(m, "machine\t\t: ");
        np = of_find_node_by_path("/");
        if (np != NULL) {
-               pp = get_property(np, "model", NULL);
+               pp = of_get_property(np, "model", NULL);
                if (pp != NULL)
                        seq_printf(m, "%s\n", pp);
                else
                        seq_printf(m, "PowerMac\n");
-               pp = get_property(np, "compatible", &plen);
+               pp = of_get_property(np, "compatible", &plen);
                if (pp != NULL) {
                        seq_printf(m, "motherboard\t:");
                        while (plen > 0) {
@@ -163,11 +163,13 @@ static void pmac_show_cpuinfo(struct seq_file *m)
        if (np == NULL)
                np = of_find_node_by_type(NULL, "cache");
        if (np != NULL) {
-               const unsigned int *ic = get_property(np, "i-cache-size", NULL);
-               const unsigned int *dc = get_property(np, "d-cache-size", NULL);
+               const unsigned int *ic =
+                       of_get_property(np, "i-cache-size", NULL);
+               const unsigned int *dc =
+                       of_get_property(np, "d-cache-size", NULL);
                seq_printf(m, "L2 cache\t:");
                has_l2cache = 1;
-               if (get_property(np, "cache-unified", NULL) != 0 && dc) {
+               if (of_get_property(np, "cache-unified", NULL) != 0 && dc) {
                        seq_printf(m, " %dK unified", *dc / 1024);
                } else {
                        if (ic)
@@ -176,7 +178,7 @@ static void pmac_show_cpuinfo(struct seq_file *m)
                                seq_printf(m, "%s %dK data",
                                           (ic? " +": ""), *dc / 1024);
                }
-               pp = get_property(np, "ram-type", NULL);
+               pp = of_get_property(np, "ram-type", NULL);
                if (pp)
                        seq_printf(m, " %s", pp);
                seq_printf(m, "\n");
@@ -253,7 +255,7 @@ static void __init l2cr_init(void)
                        np = find_type_devices("cpu");
                if (np != 0) {
                        const unsigned int *l2cr =
-                               get_property(np, "l2cr-value", NULL);
+                               of_get_property(np, "l2cr-value", NULL);
                        if (l2cr != 0) {
                                ppc_override_l2cr = 1;
                                ppc_override_l2cr_value = *l2cr;
@@ -285,7 +287,7 @@ static void __init pmac_setup_arch(void)
        loops_per_jiffy = 50000000 / HZ;
        cpu = of_find_node_by_type(NULL, "cpu");
        if (cpu != NULL) {
-               fp = get_property(cpu, "clock-frequency", NULL);
+               fp = of_get_property(cpu, "clock-frequency", NULL);
                if (fp != NULL) {
                        if (pvr >= 0x30 && pvr < 0x80)
                                /* PPC970 etc. */
@@ -302,7 +304,7 @@ static void __init pmac_setup_arch(void)
 
        /* See if newworld or oldworld */
        for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; )
-               if (get_property(ic, "interrupt-controller", NULL))
+               if (of_get_property(ic, "interrupt-controller", NULL))
                        break;
        if (ic) {
                pmac_newworld = 1;
index d73fb73802bbef98e36ad0e29a9d06607ba441ad..20f328678fd15aa7838a2d6f3545135248e3959b 100644 (file)
@@ -567,7 +567,7 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus)
                pmac_tb_clock_chip_host = pmac_i2c_find_bus(cc);
                if (pmac_tb_clock_chip_host == NULL)
                        continue;
-               reg = get_property(cc, "reg", NULL);
+               reg = of_get_property(cc, "reg", NULL);
                if (reg == NULL)
                        continue;
                switch (*reg) {
@@ -695,7 +695,7 @@ static void __init smp_core99_setup(int ncpus)
                struct device_node *cpus =
                        of_find_node_by_path("/cpus");
                if (cpus &&
-                   get_property(cpus, "platform-cpu-timebase", NULL)) {
+                   of_get_property(cpus, "platform-cpu-timebase", NULL)) {
                        pmac_tb_freeze = smp_core99_pfunc_tb_freeze;
                        printk(KERN_INFO "Processor timebase sync using"
                               " platform function\n");
@@ -712,7 +712,7 @@ static void __init smp_core99_setup(int ncpus)
                core99_tb_gpio = KL_GPIO_TB_ENABLE;     /* default value */
                cpu = of_find_node_by_type(NULL, "cpu");
                if (cpu != NULL) {
-                       tbprop = get_property(cpu, "timebase-enable", NULL);
+                       tbprop = of_get_property(cpu, "timebase-enable", NULL);
                        if (tbprop)
                                core99_tb_gpio = *tbprop;
                        of_node_put(cpu);
index 379db05b0082418ee7232389e1d05b44cad4bc60..47de4d3fc1674008f90dbf380e0971c6cb2417ac 100644 (file)
@@ -81,7 +81,7 @@ void udbg_scc_init(int force_scc)
        macio = of_get_parent(escc);
        if (macio == NULL)
                goto bail;
-       path = get_property(of_chosen, "linux,stdout-path", NULL);
+       path = of_get_property(of_chosen, "linux,stdout-path", NULL);
        if (path != NULL)
                stdout = of_find_node_by_path(path);
        for (ch = NULL; (ch = of_get_next_child(escc, ch)) != NULL;) {
@@ -96,13 +96,13 @@ void udbg_scc_init(int force_scc)
        ch = ch_def ? ch_def : ch_a;
 
        /* Get address within mac-io ASIC */
-       reg = get_property(escc, "reg", NULL);
+       reg = of_get_property(escc, "reg", NULL);
        if (reg == NULL)
                goto bail;
        addr = reg[0];
 
        /* Get address of mac-io PCI itself */
-       reg = get_property(macio, "assigned-addresses", NULL);
+       reg = of_get_property(macio, "assigned-addresses", NULL);
        if (reg == NULL)
                goto bail;
        addr += reg[2];
index a56be71d1ede29fd91655aa924ab45c89d141d35..48fbd442e9dfbef36bcd26fcaac748fc42b0eb05 100644 (file)
@@ -789,10 +789,10 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
        unsigned int rets[3];
        struct eeh_early_enable_info *info = data;
        int ret;
-       const char *status = get_property(dn, "status", NULL);
-       const u32 *class_code = get_property(dn, "class-code", NULL);
-       const u32 *vendor_id = get_property(dn, "vendor-id", NULL);
-       const u32 *device_id = get_property(dn, "device-id", NULL);
+       const char *status = of_get_property(dn, "status", NULL);
+       const u32 *class_code = of_get_property(dn, "class-code", NULL);
+       const u32 *vendor_id = of_get_property(dn, "vendor-id", NULL);
+       const u32 *device_id = of_get_property(dn, "device-id", NULL);
        const u32 *regs;
        int enable;
        struct pci_dn *pdn = PCI_DN(dn);
@@ -835,7 +835,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
 
        /* Ok... see if this device supports EEH.  Some do, some don't,
         * and the only way to find out is to check each and every one. */
-       regs = get_property(dn, "reg", NULL);
+       regs = of_get_property(dn, "reg", NULL);
        if (regs) {
                /* First register entry is addr (00BBSS00)  */
                /* Try to enable eeh */
index 8cc331eecc9d5975b0fd63ab4ac00ad699ed41dd..3170e003f76ada0a313888fe30d51e06c3917c4c 100644 (file)
@@ -314,14 +314,14 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
 
        if (!frozen_dn) {
 
-               location = get_property(event->dn, "ibm,loc-code", NULL);
+               location = of_get_property(event->dn, "ibm,loc-code", NULL);
                location = location ? location : "unknown";
                printk(KERN_ERR "EEH: Error: Cannot find partition endpoint "
                                "for location=%s pci addr=%s\n",
                        location, pci_name(event->dev));
                return NULL;
        }
-       location = get_property(frozen_dn, "ibm,loc-code", NULL);
+       location = of_get_property(frozen_dn, "ibm,loc-code", NULL);
        location = location ? location : "unknown";
 
        /* There are two different styles for coming up with the PE.
index 221dec8c16bd3b5fe8edb504578f3e395fe5b8c4..ddb80f5d850b77231783b7f05c1d7adadd6f9aed 100644 (file)
@@ -126,7 +126,7 @@ int eeh_send_failure_event (struct device_node *dn,
 
        if (!mem_init_done) {
                printk(KERN_ERR "EEH: event during early boot not handled\n");
-               location = get_property(dn, "ibm,loc-code", NULL);
+               location = of_get_property(dn, "ibm,loc-code", NULL);
                printk(KERN_ERR "EEH: device node = %s\n", dn->full_name);
                printk(KERN_ERR "EEH: PCI location = %s\n", location);
                return 1;
index 90522e3c9d46b1979eb86d738fe7c0b7c62718a9..29bf83bfb1f086b98f6657357606229b0332c266 100644 (file)
@@ -80,7 +80,7 @@ void __init fw_feature_init(void)
                goto out;
        }
 
-       hypertas = get_property(dn, "ibm,hypertas-functions", &len);
+       hypertas = of_get_property(dn, "ibm,hypertas-functions", &len);
        if (hypertas == NULL)
                goto out;
 
index f460b9cbfd465c5ba97527395b435dc93cba45a7..9711eb0d549645fee11f198fcb1cdf4ddc9f8860 100644 (file)
@@ -143,7 +143,7 @@ static int pseries_add_processor(struct device_node *np)
        int err = -ENOSPC, len, nthreads, i;
        const u32 *intserv;
 
-       intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len);
+       intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", &len);
        if (!intserv)
                return 0;
 
@@ -203,7 +203,7 @@ static void pseries_remove_processor(struct device_node *np)
        int len, nthreads, i;
        const u32 *intserv;
 
-       intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len);
+       intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", &len);
        if (!intserv)
                return;
 
index f9510a5a3e212c5c95e80e934e741df9d38a35a2..66665c82415cc7810a0e42787bd8d93a198e31bb 100644 (file)
@@ -253,8 +253,8 @@ static void iommu_table_setparms(struct pci_controller *phb,
 
        node = (struct device_node *)phb->arch_data;
 
-       basep = get_property(node, "linux,tce-base", NULL);
-       sizep = get_property(node, "linux,tce-size", NULL);
+       basep = of_get_property(node, "linux,tce-base", NULL);
+       sizep = of_get_property(node, "linux,tce-size", NULL);
        if (basep == NULL || sizep == NULL) {
                printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has "
                                "missing tce entries !\n", dn->full_name);
@@ -404,7 +404,7 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
 
        /* Find nearest ibm,dma-window, walking up the device tree */
        for (pdn = dn; pdn != NULL; pdn = pdn->parent) {
-               dma_window = get_property(pdn, "ibm,dma-window", NULL);
+               dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
                if (dma_window != NULL)
                        break;
        }
@@ -499,7 +499,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
 
        for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->iommu_table;
             pdn = pdn->parent) {
-               dma_window = get_property(pdn, "ibm,dma-window", NULL);
+               dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
                if (dma_window)
                        break;
        }
@@ -548,7 +548,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti
        switch (action) {
        case PSERIES_RECONFIG_REMOVE:
                if (pci && pci->iommu_table &&
-                   get_property(np, "ibm,dma-window", NULL))
+                   of_get_property(np, "ibm,dma-window", NULL))
                        iommu_free_table(np);
                break;
        default:
@@ -565,7 +565,7 @@ static struct notifier_block iommu_reconfig_nb = {
 /* These are called very early. */
 void iommu_init_early_pSeries(void)
 {
-       if (of_chosen && get_property(of_chosen, "linux,iommu-off", NULL)) {
+       if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) {
                /* Direct I/O, IOMMU off */
                ppc_md.pci_dma_dev_setup = NULL;
                ppc_md.pci_dma_bus_setup = NULL;
index 843ee9643211885a76cc8a5a69c811ae3ad7d580..3a70e8ad7bc84120948dbfe7199180a561de2d11 100644 (file)
@@ -209,13 +209,13 @@ void __init find_udbg_vterm(void)
        /* find the boot console from /chosen/stdout */
        if (!of_chosen)
                return;
-       name = get_property(of_chosen, "linux,stdout-path", NULL);
+       name = of_get_property(of_chosen, "linux,stdout-path", NULL);
        if (name == NULL)
                return;
        stdout_node = of_find_node_by_path(name);
        if (!stdout_node)
                return;
-       name = get_property(stdout_node, "name", NULL);
+       name = of_get_property(stdout_node, "name", NULL);
        if (!name) {
                printk(KERN_WARNING "stdout node missing 'name' property!\n");
                goto out;
@@ -226,7 +226,7 @@ void __init find_udbg_vterm(void)
        /* Check if it's a virtual terminal */
        if (strncmp(name, "vty", 3) != 0)
                goto out;
-       termno = get_property(stdout_node, "reg", NULL);
+       termno = of_get_property(stdout_node, "reg", NULL);
        if (termno == NULL)
                goto out;
        vtermno = termno[0];
index 64163cecdf93f2819fd74481b034de89e470dda1..f68903e15bd5b30f6cf42b43c9790b3365b64796 100644 (file)
@@ -130,7 +130,7 @@ int __init pSeries_nvram_init(void)
        if (nvram == NULL)
                return -ENODEV;
 
-       nbytes_p = get_property(nvram, "#bytes", &proplen);
+       nbytes_p = of_get_property(nvram, "#bytes", &proplen);
        if (nbytes_p == NULL || proplen != sizeof(unsigned int))
                return -EIO;
 
index 5c54ff9521c8e698aab0d459d576fd2bc266ace2..2c6ded29f73d3d5afbcdef6bd9719d777da0cd12 100644 (file)
@@ -40,7 +40,7 @@ void pcibios_name_device(struct pci_dev *dev)
         */
        dn = pci_device_to_OF_node(dev);
        if (dn) {
-               char *loc_code = get_property(dn, "ibm,loc-code", 0);
+               const char *loc_code = of_get_property(dn, "ibm,loc-code", 0);
                if (loc_code) {
                        int loc_len = strlen(loc_code);
                        if (loc_len < sizeof(dev->dev.name)) {
index edc0388731132f7c1daa63940591ac79dc39d428..53aa04101cedee646270b5841c6b64c9793bc244 100644 (file)
@@ -85,7 +85,7 @@ static void request_ras_irqs(struct device_node *np,
         * map those interrupts using the default interrupt host and default
         * trigger
         */
-       opicprop = get_property(np, "open-pic-interrupt", &opicplen);
+       opicprop = of_get_property(np, "open-pic-interrupt", &opicplen);
        if (opicprop) {
                opicplen /= sizeof(u32);
                for (i = 0; i < opicplen; i++) {
index 77d0937d5c07a334643f4e8518ad59ca7a854afd..9797b10b29351a44ea918aac081fe52fbec33790 100644 (file)
@@ -363,7 +363,7 @@ static int get_eventscan_parms(void)
 
        node = of_find_node_by_path("/rtas");
 
-       ip = get_property(node, "rtas-event-scan-rate", NULL);
+       ip = of_get_property(node, "rtas-event-scan-rate", NULL);
        if (ip == NULL) {
                printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n");
                of_node_put(node);
index 54e93eb8a8eefe90dc434a3578c417038db9d920..e2fcd2307e6791a62828c91649940c848c1028f3 100644 (file)
@@ -93,7 +93,7 @@ static void pSeries_show_cpuinfo(struct seq_file *m)
 
        root = of_find_node_by_path("/");
        if (root)
-               model = get_property(root, "model", NULL);
+               model = of_get_property(root, "model", NULL);
        seq_printf(m, "machine\t\t: CHRP %s\n", model);
        of_node_put(root);
 }
@@ -140,7 +140,7 @@ static void __init pseries_mpic_init_IRQ(void)
 
        np = of_find_node_by_path("/");
        naddr = of_n_addr_cells(np);
-       opprop = get_property(np, "platform-open-pic", &opplen);
+       opprop = of_get_property(np, "platform-open-pic", &opplen);
        if (opprop != 0) {
                openpic_addr = of_read_number(opprop, naddr);
                printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
@@ -189,7 +189,7 @@ static void __init pseries_mpic_init_IRQ(void)
                        break;
                if (strcmp(np->name, "pci") != 0)
                        continue;
-               addrp = get_property(np, "8259-interrupt-acknowledge",
+               addrp = of_get_property(np, "8259-interrupt-acknowledge",
                                            NULL);
                if (addrp == NULL)
                        continue;
@@ -226,7 +226,7 @@ static void __init pseries_discover_pic(void)
 
        for (np = NULL; (np = of_find_node_by_name(np,
                                                   "interrupt-controller"));) {
-               typep = get_property(np, "compatible", NULL);
+               typep = of_get_property(np, "compatible", NULL);
                if (strstr(typep, "open-pic")) {
                        pSeries_mpic_node = of_node_get(np);
                        ppc_md.init_IRQ       = pseries_mpic_init_IRQ;
index f0795faada910b29fa407ddbec5d1db9c3b74f39..896cbf340c429fd74615522532695d4b76880c7b 100644 (file)
@@ -576,7 +576,7 @@ static void __init xics_init_one_node(struct device_node *np,
         * This happens to be the case so far but we are playing with fire...
         * should be fixed one of these days. -BenH.
         */
-       ireg = get_property(np, "ibm,interrupt-server-ranges", NULL);
+       ireg = of_get_property(np, "ibm,interrupt-server-ranges", NULL);
 
        /* Do that ever happen ? we'll know soon enough... but even good'old
         * f80 does have that property ..
@@ -588,7 +588,7 @@ static void __init xics_init_one_node(struct device_node *np,
                 */
                *indx = *ireg;
        }
-       ireg = get_property(np, "reg", &ilen);
+       ireg = of_get_property(np, "reg", &ilen);
        if (!ireg)
                panic("xics_init_IRQ: can't find interrupt reg property");
 
@@ -640,7 +640,7 @@ static void __init xics_setup_8259_cascade(void)
                        break;
                if (strcmp(np->name, "pci") != 0)
                        continue;
-               addrp = get_property(np, "8259-interrupt-acknowledge", NULL);
+               addrp = of_get_property(np, "8259-interrupt-acknowledge", NULL);
                if (addrp == NULL)
                        continue;
                naddr = of_n_addr_cells(np);
@@ -664,10 +664,11 @@ static struct device_node *cpuid_to_of_node(int cpu)
                int i, len;
                const u32 *intserv;
 
-               intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len);
+               intserv = of_get_property(np, "ibm,ppc-interrupt-server#s",
+                                       &len);
 
                if (!intserv)
-                       intserv = get_property(np, "reg", &len);
+                       intserv = of_get_property(np, "reg", &len);
 
                i = len / sizeof(u32);
 
@@ -709,7 +710,7 @@ void __init xics_init_IRQ(void)
        /* Find the server numbers for the boot cpu. */
        np = cpuid_to_of_node(boot_cpuid);
        BUG_ON(!np);
-       ireg = get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
+       ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
        if (!ireg)
                goto skip_gserver_check;
        i = ilen / sizeof(int);
@@ -725,7 +726,7 @@ void __init xics_init_IRQ(void)
                        default_server = hcpuid;
                        default_distrib_server = ireg[j+1];
 
-                       isize = get_property(np,
+                       isize = of_get_property(np,
                                        "ibm,interrupt-server#-size", NULL);
                        if (isize)
                                interrupt_server_size = *isize;
index 1fc5819e7d18d595b7f37e364ce9b52e8efe9591..574b6ef44e0bbfd59c56dbd3cf9afc28f24b9876 100644 (file)
@@ -26,7 +26,7 @@
 unsigned int dcr_resource_start(struct device_node *np, unsigned int index)
 {
        unsigned int ds;
-       const u32 *dr = get_property(np, "dcr-reg", &ds);
+       const u32 *dr = of_get_property(np, "dcr-reg", &ds);
 
        if (dr == NULL || ds & 1 || index >= (ds / 8))
                return 0;
@@ -37,7 +37,7 @@ unsigned int dcr_resource_start(struct device_node *np, unsigned int index)
 unsigned int dcr_resource_len(struct device_node *np, unsigned int index)
 {
        unsigned int ds;
-       const u32 *dr = get_property(np, "dcr-reg", &ds);
+       const u32 *dr = of_get_property(np, "dcr-reg", &ds);
 
        if (dr == NULL || ds & 1 || index >= (ds / 8))
                return 0;
@@ -53,9 +53,9 @@ static struct device_node * find_dcr_parent(struct device_node * node)
        const u32 *p;
 
        for (par = of_node_get(node); par;) {
-               if (get_property(par, "dcr-controller", NULL))
+               if (of_get_property(par, "dcr-controller", NULL))
                        break;
-               p = get_property(par, "dcr-parent", NULL);
+               p = of_get_property(par, "dcr-parent", NULL);
                tmp = par;
                if (p == NULL)
                        par = of_get_parent(par);
@@ -80,13 +80,13 @@ u64 of_translate_dcr_address(struct device_node *dev,
                return OF_BAD_ADDR;
 
        /* Stride is not properly defined yet, default to 0x10 for Axon */
-       p = get_property(dp, "dcr-mmio-stride", NULL);
+       p = of_get_property(dp, "dcr-mmio-stride", NULL);
        stride = (p == NULL) ? 0x10 : *p;
 
        /* XXX FIXME: Which property name is to use of the 2 following ? */
-       p = get_property(dp, "dcr-mmio-range", NULL);
+       p = of_get_property(dp, "dcr-mmio-range", NULL);
        if (p == NULL)
-               p = get_property(dp, "dcr-mmio-space", NULL);
+               p = of_get_property(dp, "dcr-mmio-space", NULL);
        if (p == NULL)
                return OF_BAD_ADDR;
 
index d20f02927f7200a83812ad929c9317241718f7b3..8a123c71449fffd9315b085158f0e1a8d6f5795a 100644 (file)
@@ -52,7 +52,7 @@ phys_addr_t get_immrbase(void)
        soc = of_find_node_by_type(NULL, "soc");
        if (soc) {
                unsigned int size;
-               const void *prop = get_property(soc, "reg", &size);
+               const void *prop = of_get_property(soc, "reg", &size);
 
                if (prop)
                        immrbase = of_translate_address(soc, prop);
@@ -78,8 +78,8 @@ u32 get_brgfreq(void)
        node = of_find_node_by_type(NULL, "cpm");
        if (node) {
                unsigned int size;
-               const unsigned int *prop = get_property(node, "brg-frequency",
-                                       &size);
+               const unsigned int *prop = of_get_property(node,
+                                       "brg-frequency", &size);
 
                if (prop)
                        brgfreq = *prop;
@@ -103,8 +103,8 @@ u32 get_baudrate(void)
        node = of_find_node_by_type(NULL, "serial");
        if (node) {
                unsigned int size;
-               const unsigned int *prop = get_property(node, "current-speed",
-                               &size);
+               const unsigned int *prop = of_get_property(node,
+                               "current-speed", &size);
 
                if (prop)
                        fs_baudrate = *prop;
@@ -153,7 +153,8 @@ static int __init gfar_mdio_of_init(void)
                while ((child = of_get_next_child(np, child)) != NULL) {
                        int irq = irq_of_parse_and_map(child, 0);
                        if (irq != NO_IRQ) {
-                               const u32 *id = get_property(child, "reg", NULL);
+                               const u32 *id = of_get_property(child,
+                                                       "reg", NULL);
                                mdio_data.irq[*id] = irq;
                        }
                }
@@ -209,7 +210,7 @@ static int __init gfar_of_init(void)
 
                of_irq_to_resource(np, 0, &r[1]);
 
-               model = get_property(np, "model", NULL);
+               model = of_get_property(np, "model", NULL);
 
                /* If we aren't the FEC we have multiple interrupts */
                if (model && strcasecmp(model, "FEC")) {
@@ -253,7 +254,7 @@ static int __init gfar_of_init(void)
                            FSL_GIANFAR_DEV_HAS_VLAN |
                            FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
 
-               ph = get_property(np, "phy-handle", NULL);
+               ph = of_get_property(np, "phy-handle", NULL);
                phy = of_find_node_by_phandle(*ph);
 
                if (phy == NULL) {
@@ -263,7 +264,7 @@ static int __init gfar_of_init(void)
 
                mdio = of_get_parent(phy);
 
-               id = get_property(phy, "reg", NULL);
+               id = of_get_property(phy, "reg", NULL);
                ret = of_address_to_resource(mdio, 0, &res);
                if (ret) {
                        of_node_put(phy);
@@ -325,11 +326,11 @@ static int __init fsl_i2c_of_init(void)
                }
 
                i2c_data.device_flags = 0;
-               flags = get_property(np, "dfsrr", NULL);
+               flags = of_get_property(np, "dfsrr", NULL);
                if (flags)
                        i2c_data.device_flags |= FSL_I2C_DEV_SEPARATE_DFSRR;
 
-               flags = get_property(np, "fsl5200-clocking", NULL);
+               flags = of_get_property(np, "fsl5200-clocking", NULL);
                if (flags)
                        i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200;
 
@@ -374,7 +375,7 @@ static int __init mpc83xx_wdt_init(void)
                goto nosoc;
        }
 
-       freq = get_property(soc, "bus-frequency", NULL);
+       freq = of_get_property(soc, "bus-frequency", NULL);
        if (!freq) {
                ret = -ENODEV;
                goto err;
@@ -466,15 +467,15 @@ static int __init fsl_usb_of_init(void)
 
                usb_data.operating_mode = FSL_USB2_MPH_HOST;
 
-               prop = get_property(np, "port0", NULL);
+               prop = of_get_property(np, "port0", NULL);
                if (prop)
                        usb_data.port_enables |= FSL_USB2_PORT0_ENABLED;
 
-               prop = get_property(np, "port1", NULL);
+               prop = of_get_property(np, "port1", NULL);
                if (prop)
                        usb_data.port_enables |= FSL_USB2_PORT1_ENABLED;
 
-               prop = get_property(np, "phy_type", NULL);
+               prop = of_get_property(np, "phy_type", NULL);
                usb_data.phy_mode = determine_usb_phy(prop);
 
                ret =
@@ -501,7 +502,7 @@ static int __init fsl_usb_of_init(void)
 
                of_irq_to_resource(np, 0, &r[1]);
 
-               prop = get_property(np, "dr_mode", NULL);
+               prop = of_get_property(np, "dr_mode", NULL);
 
                if (!prop || !strcmp(prop, "host")) {
                        usb_data.operating_mode = FSL_USB2_DR_HOST;
@@ -538,7 +539,7 @@ static int __init fsl_usb_of_init(void)
                        goto err;
                }
 
-               prop = get_property(np, "phy_type", NULL);
+               prop = of_get_property(np, "phy_type", NULL);
                usb_data.phy_mode = determine_usb_phy(prop);
 
                if (usb_dev_dr_host) {
@@ -633,7 +634,7 @@ static int __init fs_enet_of_init(void)
                        goto err;
                }
 
-               model = get_property(np, "model", NULL);
+               model = of_get_property(np, "model", NULL);
                if (model == NULL) {
                        ret = -ENODEV;
                        goto unreg;
@@ -643,7 +644,7 @@ static int __init fs_enet_of_init(void)
                if (mac_addr)
                        memcpy(fs_enet_data.macaddr, mac_addr, 6);
 
-               ph = get_property(np, "phy-handle", NULL);
+               ph = of_get_property(np, "phy-handle", NULL);
                phy = of_find_node_by_phandle(*ph);
 
                if (phy == NULL) {
@@ -651,12 +652,12 @@ static int __init fs_enet_of_init(void)
                        goto unreg;
                }
 
-               phy_addr = get_property(phy, "reg", NULL);
+               phy_addr = of_get_property(phy, "reg", NULL);
                fs_enet_data.phy_addr = *phy_addr;
 
-               phy_irq = get_property(phy, "interrupts", NULL);
+               phy_irq = of_get_property(phy, "interrupts", NULL);
 
-               id = get_property(np, "device-id", NULL);
+               id = of_get_property(np, "device-id", NULL);
                fs_enet_data.fs_no = *id;
                strcpy(fs_enet_data.fs_type, model);
 
@@ -668,8 +669,10 @@ static int __init fs_enet_of_init(void)
                         goto unreg;
                 }
 
-               fs_enet_data.clk_rx = *((u32 *) get_property(np, "rx-clock", NULL));
-               fs_enet_data.clk_tx = *((u32 *) get_property(np, "tx-clock", NULL));
+               fs_enet_data.clk_rx = *((u32 *)of_get_property(np,
+                                               "rx-clock", NULL));
+               fs_enet_data.clk_tx = *((u32 *)of_get_property(np,
+                                               "tx-clock", NULL));
 
                if (strstr(model, "FCC")) {
                        int fcc_index = *id - 1;
@@ -690,7 +693,7 @@ static int __init fs_enet_of_init(void)
                        fs_enet_data.bus_id = (char*)&bus_id[(*id)];
                        fs_enet_data.init_ioports = init_fcc_ioports;
 
-                       mdio_bb_prop = get_property(phy, "bitbang", NULL);
+                       mdio_bb_prop = of_get_property(phy, "bitbang", NULL);
                        if (mdio_bb_prop) {
                                struct platform_device *fs_enet_mdio_bb_dev;
                                struct fs_mii_bb_platform_info fs_enet_mdio_bb_data;
@@ -796,10 +799,10 @@ static int __init cpm_uart_of_init(void)
                        goto err;
                }
 
-               id = get_property(np, "device-id", NULL);
+               id = of_get_property(np, "device-id", NULL);
                cpm_uart_data.fs_no = *id;
 
-               model = (char*)get_property(np, "model", NULL);
+               model = of_get_property(np, "model", NULL);
                strcpy(cpm_uart_data.fs_type, model);
 
                cpm_uart_data.uart_clk = ppc_proc_freq;
@@ -808,8 +811,10 @@ static int __init cpm_uart_of_init(void)
                cpm_uart_data.tx_buf_size = 32;
                cpm_uart_data.rx_num_fifo = 4;
                cpm_uart_data.rx_buf_size = 32;
-               cpm_uart_data.clk_rx = *((u32 *) get_property(np, "rx-clock", NULL));
-               cpm_uart_data.clk_tx = *((u32 *) get_property(np, "tx-clock", NULL));
+               cpm_uart_data.clk_rx = *((u32 *)of_get_property(np,
+                                               "rx-clock", NULL));
+               cpm_uart_data.clk_tx = *((u32 *)of_get_property(np,
+                                               "tx-clock", NULL));
 
                ret =
                    platform_device_add_data(cpm_uart_dev, &cpm_uart_data,
@@ -833,7 +838,7 @@ arch_initcall(cpm_uart_of_init);
 #ifdef CONFIG_8xx
 
 extern void init_scc_ioports(struct fs_platform_info*);
-extern int platform_device_skip(char *model, int id);
+extern int platform_device_skip(const char *model, int id);
 
 static int __init fs_enet_mdio_of_init(void)
 {
@@ -900,21 +905,22 @@ static int __init fs_enet_of_init(void)
                struct resource r[4];
                struct device_node *phy = NULL, *mdio = NULL;
                struct fs_platform_info fs_enet_data;
-               unsigned int *id, *phy_addr;
+               const unsigned int *id;
+               const unsigned int *phy_addr;
                void *mac_addr;
-               phandle *ph;
-               char *model;
+               const phandle *ph;
+               const char *model;
 
                memset(r, 0, sizeof(r));
                memset(&fs_enet_data, 0, sizeof(fs_enet_data));
 
-               model = (char *)get_property(np, "model", NULL);
+               model = of_get_property(np, "model", NULL);
                if (model == NULL) {
                        ret = -ENODEV;
                        goto unreg;
                }
 
-               id = (u32 *) get_property(np, "device-id", NULL);
+               id = of_get_property(np, "device-id", NULL);
                fs_enet_data.fs_no = *id;
 
                if (platform_device_skip(model, *id))
@@ -929,12 +935,12 @@ static int __init fs_enet_of_init(void)
                if (mac_addr)
                        memcpy(fs_enet_data.macaddr, mac_addr, 6);
 
-               ph = (phandle *) get_property(np, "phy-handle", NULL);
+               ph = of_get_property(np, "phy-handle", NULL);
                if (ph != NULL)
                        phy = of_find_node_by_phandle(*ph);
 
                if (phy != NULL) {
-                       phy_addr = (u32 *) get_property(phy, "reg", NULL);
+                       phy_addr = of_get_property(phy, "reg", NULL);
                        fs_enet_data.phy_addr = *phy_addr;
                        fs_enet_data.has_phy = 1;
 
@@ -947,7 +953,7 @@ static int __init fs_enet_of_init(void)
                        }
                }
 
-               model = (char*)get_property(np, "model", NULL);
+               model = of_get_property(np, "model", NULL);
                strcpy(fs_enet_data.fs_type, model);
 
                if (strstr(model, "FEC")) {
@@ -1038,8 +1044,8 @@ static int __init cpm_smc_uart_of_init(void)
             i++) {
                struct resource r[3];
                struct fs_uart_platform_info cpm_uart_data;
-               int *id;
-               char *model;
+               const int *id;
+               const char *model;
 
                memset(r, 0, sizeof(r));
                memset(&cpm_uart_data, 0, sizeof(cpm_uart_data));
@@ -1066,10 +1072,10 @@ static int __init cpm_smc_uart_of_init(void)
                        goto err;
                }
 
-               model = (char*)get_property(np, "model", NULL);
+               model = of_get_property(np, "model", NULL);
                strcpy(cpm_uart_data.fs_type, model);
 
-               id = (int*)get_property(np, "device-id", NULL);
+               id = of_get_property(np, "device-id", NULL);
                cpm_uart_data.fs_no = *id;
                cpm_uart_data.uart_clk = ppc_proc_freq;
 
index bcfb900481f8fdb6180dc474ed991d1dc7dd164d..27e6f78739eb53088da8774b1cee7b659e49aefa 100644 (file)
@@ -970,7 +970,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
        mpic->spurious_vec  = intvec_top;
 
        /* Check for "big-endian" in device-tree */
-       if (node && get_property(node, "big-endian", NULL) != NULL)
+       if (node && of_get_property(node, "big-endian", NULL) != NULL)
                mpic->flags |= MPIC_BIG_ENDIAN;
 
 
@@ -986,13 +986,13 @@ struct mpic * __init mpic_alloc(struct device_node *node,
        BUG_ON(paddr == 0 && node == NULL);
 
        /* If no physical address passed in, check if it's dcr based */
-       if (paddr == 0 && get_property(node, "dcr-reg", NULL) != NULL)
+       if (paddr == 0 && of_get_property(node, "dcr-reg", NULL) != NULL)
                mpic->flags |= MPIC_USES_DCR;
 
 #ifdef CONFIG_PPC_DCR
        if (mpic->flags & MPIC_USES_DCR) {
                const u32 *dbasep;
-               dbasep = get_property(node, "dcr-reg", NULL);
+               dbasep = of_get_property(node, "dcr-reg", NULL);
                BUG_ON(dbasep == NULL);
                mpic->dcr_base = *dbasep;
                mpic->reg_type = mpic_access_dcr;
@@ -1006,7 +1006,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
         */
        if (paddr == 0 && !(mpic->flags & MPIC_USES_DCR)) {
                const u32 *reg;
-               reg = get_property(node, "reg", NULL);
+               reg = of_get_property(node, "reg", NULL);
                BUG_ON(reg == NULL);
                paddr = of_translate_address(node, reg);
                BUG_ON(paddr == OF_BAD_ADDR);
index 43f6cc9d7ea0768068dd78de54e96cf7b037c8cc..7f4c0754396197bdc5bf571c698b7813ffd3b979 100644 (file)
@@ -71,7 +71,7 @@ phys_addr_t get_qe_base(void)
        qe = of_find_node_by_type(NULL, "qe");
        if (qe) {
                unsigned int size;
-               const void *prop = get_property(qe, "reg", &size);
+               const void *prop = of_get_property(qe, "reg", &size);
                qebase = of_translate_address(qe, prop);
                of_node_put(qe);
        };
@@ -158,7 +158,7 @@ unsigned int get_brg_clk(void)
        qe = of_find_node_by_type(NULL, "qe");
        if (qe) {
                unsigned int size;
-               const u32 *prop = get_property(qe, "brg-frequency", &size);
+               const u32 *prop = of_get_property(qe, "brg-frequency", &size);
                brg_clk = *prop;
                of_node_put(qe);
        };
index 0afe6bfe371455d90ba665bfcc57b9422159c471..e32b45bf9ff5364df15accd01b510f0f2721f5a7 100644 (file)
@@ -53,7 +53,7 @@ int par_io_init(struct device_node *np)
                return ret;
        par_io = ioremap(res.start, res.end - res.start + 1);
 
-       num_ports = get_property(np, "num-ports", NULL);
+       num_ports = of_get_property(np, "num-ports", NULL);
        if (num_ports)
                num_par_io_ports = *num_ports;
 
@@ -161,7 +161,7 @@ int par_io_of_config(struct device_node *np)
                return -1;
        }
 
-       ph = get_property(np, "pio-handle", NULL);
+       ph = of_get_property(np, "pio-handle", NULL);
        if (ph == 0) {
                printk(KERN_ERR "pio-handle not available \n");
                return -1;
@@ -169,7 +169,7 @@ int par_io_of_config(struct device_node *np)
 
        pio = of_find_node_by_phandle(*ph);
 
-       pio_map = get_property(pio, "pio-map", &pio_map_len);
+       pio_map = of_get_property(pio, "pio-map", &pio_map_len);
        if (pio_map == NULL) {
                printk(KERN_ERR "pio-map is not set! \n");
                return -1;
index 97f37ef4bbbf42e1c09d6bd535ebfb87e6c7f140..337039ee51e623acf3c8c940639886757e76ca12 100644 (file)
@@ -48,7 +48,7 @@ phys_addr_t get_csrbase(void)
        tsi = of_find_node_by_type(NULL, "tsi-bridge");
        if (tsi) {
                unsigned int size;
-               const void *prop = get_property(tsi, "reg", &size);
+               const void *prop = of_get_property(tsi, "reg", &size);
                tsi108_csr_base = of_translate_address(tsi, prop);
                of_node_put(tsi);
        };
@@ -77,10 +77,10 @@ static int __init tsi108_eth_of_init(void)
                struct resource r[2];
                struct device_node *phy;
                hw_info tsi_eth_data;
-               unsigned int *id;
-               unsigned int *phy_id;
+               const unsigned int *id;
+               const unsigned int *phy_id;
                const void *mac_addr;
-               phandle *ph;
+               const phandle *ph;
 
                memset(r, 0, sizeof(r));
                memset(&tsi_eth_data, 0, sizeof(tsi_eth_data));
@@ -107,10 +107,10 @@ static int __init tsi108_eth_of_init(void)
                        goto err;
                }
 
-               mac_addr = get_property(np, "address", NULL);
+               mac_addr = of_get_property(np, "address", NULL);
                memcpy(tsi_eth_data.mac_addr, mac_addr, 6);
 
-               ph = (phandle *) get_property(np, "phy-handle", NULL);
+               ph = of_get_property(np, "phy-handle", NULL);
                phy = of_find_node_by_phandle(*ph);
 
                if (phy == NULL) {
@@ -118,8 +118,8 @@ static int __init tsi108_eth_of_init(void)
                        goto unreg;
                }
 
-               id = (u32 *) get_property(phy, "reg", NULL);
-               phy_id = (u32 *) get_property(phy, "phy-id", NULL);
+               id = of_get_property(phy, "reg", NULL);
+               phy_id = of_get_property(phy, "phy-id", NULL);
                ret = of_address_to_resource(phy, 0, &res);
                if (ret) {
                        of_node_put(phy);
index ae249c6bbbcf3473920933b9aa7113718942321d..58b9e7f8abf276b51406b0ddf421f6a0bd415836 100644 (file)
@@ -211,7 +211,7 @@ int __init tsi108_setup_pci(struct device_node *dev)
        has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
 
        /* Get bus range if any */
-       bus_range = get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                       " bus 0\n", dev->full_name);