Commit 60dda256 authored by Kumar Gala's avatar Kumar Gala Committed by Paul Mackerras

[PATCH] powerpc: some prom.c cleanups

On !CONFIG_PPC_MULTIPLATFORM _machine is defined as 0.  This is ok, but
we can't assign a value to _machine then.

We may not have CONFIG_PCI available, so only build in support for
find_parent_pci_resource(), request_OF_resource(), release_OF_resource()
if PCI is enabled.  This is probably not the long term fix but works out
for now.

Make reg_property64 contain 64-bit elements on a 32-bit machine.

Mark the deprecated prom.c functions as __deprecated.
Signed-off-by: default avatarKumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent d2e61512
...@@ -1167,8 +1167,10 @@ static int __init early_init_dt_scan_chosen(unsigned long node, ...@@ -1167,8 +1167,10 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
systemcfg->platform = *prop; systemcfg->platform = *prop;
#else #else
#ifdef CONFIG_PPC_MULTIPLATFORM
_machine = *prop; _machine = *prop;
#endif #endif
#endif
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
/* check if iommu is forced on or off */ /* check if iommu is forced on or off */
...@@ -2005,6 +2007,7 @@ bus_space_to_resource_flags(unsigned int bus_space) ...@@ -2005,6 +2007,7 @@ bus_space_to_resource_flags(unsigned int bus_space)
} }
} }
#ifdef CONFIG_PCI
static struct resource *find_parent_pci_resource(struct pci_dev* pdev, static struct resource *find_parent_pci_resource(struct pci_dev* pdev,
struct address_range *range) struct address_range *range)
{ {
...@@ -2157,3 +2160,4 @@ int release_OF_resource(struct device_node *node, int index) ...@@ -2157,3 +2160,4 @@ int release_OF_resource(struct device_node *node, int index)
return 0; return 0;
} }
EXPORT_SYMBOL(release_OF_resource); EXPORT_SYMBOL(release_OF_resource);
#endif /* CONFIG_PCI */
...@@ -104,8 +104,8 @@ struct reg_property32 { ...@@ -104,8 +104,8 @@ struct reg_property32 {
}; };
struct reg_property64 { struct reg_property64 {
unsigned long address; u64 address;
unsigned long size; u64 size;
}; };
struct property { struct property {
...@@ -155,12 +155,12 @@ static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_e ...@@ -155,12 +155,12 @@ static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_e
/* OBSOLETE: Old style node lookup */ /* OBSOLETE: Old style node lookup */
extern struct device_node *find_devices(const char *name); extern __deprecated struct device_node *find_devices(const char *name);
extern struct device_node *find_type_devices(const char *type); extern __deprecated struct device_node *find_type_devices(const char *type);
extern struct device_node *find_path_device(const char *path); extern __deprecated struct device_node *find_path_device(const char *path);
extern struct device_node *find_compatible_devices(const char *type, extern __deprecated struct device_node *find_compatible_devices(const char *type,
const char *compat); const char *compat);
extern struct device_node *find_all_nodes(void); extern __deprecated struct device_node *find_all_nodes(void);
/* New style node lookup */ /* New style node lookup */
extern struct device_node *of_find_node_by_name(struct device_node *from, extern struct device_node *of_find_node_by_name(struct device_node *from,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment