diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-08-11 09:06:23 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-08-11 09:06:23 -0400 |
commit | 663d3f7c2e5e1b018a4c53277ccfde40329d98ca (patch) | |
tree | a3afcc2d8fe682bdcc4c2e39b47ab3987b38c69a /arch | |
parent | b775e642bf958a02210ac4d4edd1a1b7067c49fa (diff) | |
parent | b6ae5dc54b0a5c542d06d46b9083ceb70bf7e083 (diff) |
Merge branch 'devicetree/next-overlay' into devicetree/next
Conflicts:
drivers/of/testcase-data/testcases.dts
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 70 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-memory.c | 2 |
2 files changed, 1 insertions, 71 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index b694b0730971..9e8d8a880d6f 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -821,76 +821,6 @@ int cpu_to_chip_id(int cpu) | |||
821 | } | 821 | } |
822 | EXPORT_SYMBOL(cpu_to_chip_id); | 822 | EXPORT_SYMBOL(cpu_to_chip_id); |
823 | 823 | ||
824 | #ifdef CONFIG_PPC_PSERIES | ||
825 | /* | ||
826 | * Fix up the uninitialized fields in a new device node: | ||
827 | * name, type and pci-specific fields | ||
828 | */ | ||
829 | |||
830 | static int of_finish_dynamic_node(struct device_node *node) | ||
831 | { | ||
832 | struct device_node *parent = of_get_parent(node); | ||
833 | int err = 0; | ||
834 | const phandle *ibm_phandle; | ||
835 | |||
836 | node->name = of_get_property(node, "name", NULL); | ||
837 | node->type = of_get_property(node, "device_type", NULL); | ||
838 | |||
839 | if (!node->name) | ||
840 | node->name = "<NULL>"; | ||
841 | if (!node->type) | ||
842 | node->type = "<NULL>"; | ||
843 | |||
844 | if (!parent) { | ||
845 | err = -ENODEV; | ||
846 | goto out; | ||
847 | } | ||
848 | |||
849 | /* We don't support that function on PowerMac, at least | ||
850 | * not yet | ||
851 | */ | ||
852 | if (machine_is(powermac)) | ||
853 | return -ENODEV; | ||
854 | |||
855 | /* fix up new node's phandle field */ | ||
856 | if ((ibm_phandle = of_get_property(node, "ibm,phandle", NULL))) | ||
857 | node->phandle = *ibm_phandle; | ||
858 | |||
859 | out: | ||
860 | of_node_put(parent); | ||
861 | return err; | ||
862 | } | ||
863 | |||
864 | static int prom_reconfig_notifier(struct notifier_block *nb, | ||
865 | unsigned long action, void *node) | ||
866 | { | ||
867 | int err; | ||
868 | |||
869 | switch (action) { | ||
870 | case OF_RECONFIG_ATTACH_NODE: | ||
871 | err = of_finish_dynamic_node(node); | ||
872 | if (err < 0) | ||
873 | printk(KERN_ERR "finish_node returned %d\n", err); | ||
874 | break; | ||
875 | default: | ||
876 | err = 0; | ||
877 | break; | ||
878 | } | ||
879 | return notifier_from_errno(err); | ||
880 | } | ||
881 | |||
882 | static struct notifier_block prom_reconfig_nb = { | ||
883 | .notifier_call = prom_reconfig_notifier, | ||
884 | .priority = 10, /* This one needs to run first */ | ||
885 | }; | ||
886 | |||
887 | static int __init prom_reconfig_setup(void) | ||
888 | { | ||
889 | return of_reconfig_notifier_register(&prom_reconfig_nb); | ||
890 | } | ||
891 | __initcall(prom_reconfig_setup); | ||
892 | #endif | ||
893 | |||
894 | bool arch_match_cpu_phys_id(int cpu, u64 phys_id) | 824 | bool arch_match_cpu_phys_id(int cpu, u64 phys_id) |
895 | { | 825 | { |
896 | return (int)phys_id == get_hard_smp_processor_id(cpu); | 826 | return (int)phys_id == get_hard_smp_processor_id(cpu); |
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index 7995135170a3..ac01e188faef 100644 --- a/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
@@ -194,7 +194,7 @@ static int pseries_update_drconf_memory(struct of_prop_reconfig *pr) | |||
194 | if (!memblock_size) | 194 | if (!memblock_size) |
195 | return -EINVAL; | 195 | return -EINVAL; |
196 | 196 | ||
197 | p = (u32 *)of_get_property(pr->dn, "ibm,dynamic-memory", NULL); | 197 | p = (u32 *) pr->old_prop->value; |
198 | if (!p) | 198 | if (!p) |
199 | return -EINVAL; | 199 | return -EINVAL; |
200 | 200 | ||