aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-09 21:37:51 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-09 21:37:51 -0500
commit799d6046d3fb557006e6d7c9767fdb96479b0e0a (patch)
treefff321e3c0c0e6d1192f453aab23ad204f350851 /arch/powerpc/kernel/prom.c
parent3ddfbcf19b15ccd25a0b4b2dc2e38000e08de739 (diff)
[PATCH] powerpc: merge code values for identifying platforms
This patch merges platform codes. systemcfg->platform is no longer used, systemcfg use in general is deprecated as much as possible (and renamed _systemcfg before it gets completely moved elsewhere in a future patch), _machine is now used on ppc64 along as ppc32. Platform codes aren't gone yet but we are getting a step closer. A bunch of asm code in head[_64].S is also turned into C code. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 5af39f866735..1bf3642cb859 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -48,9 +48,6 @@
48#include <asm/machdep.h> 48#include <asm/machdep.h>
49#include <asm/pSeries_reconfig.h> 49#include <asm/pSeries_reconfig.h>
50#include <asm/pci-bridge.h> 50#include <asm/pci-bridge.h>
51#ifdef CONFIG_PPC64
52#include <asm/systemcfg.h>
53#endif
54 51
55#ifdef DEBUG 52#ifdef DEBUG
56#define DBG(fmt...) printk(KERN_ERR fmt) 53#define DBG(fmt...) printk(KERN_ERR fmt)
@@ -391,7 +388,7 @@ static int __devinit finish_node_interrupts(struct device_node *np,
391 388
392#ifdef CONFIG_PPC64 389#ifdef CONFIG_PPC64
393 /* We offset irq numbers for the u3 MPIC by 128 in PowerMac */ 390 /* We offset irq numbers for the u3 MPIC by 128 in PowerMac */
394 if (systemcfg->platform == PLATFORM_POWERMAC && ic && ic->parent) { 391 if (_machine == PLATFORM_POWERMAC && ic && ic->parent) {
395 char *name = get_property(ic->parent, "name", NULL); 392 char *name = get_property(ic->parent, "name", NULL);
396 if (name && !strcmp(name, "u3")) 393 if (name && !strcmp(name, "u3"))
397 np->intrs[intrcount].line += 128; 394 np->intrs[intrcount].line += 128;
@@ -1161,13 +1158,9 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
1161 prop = (u32 *)of_get_flat_dt_prop(node, "linux,platform", NULL); 1158 prop = (u32 *)of_get_flat_dt_prop(node, "linux,platform", NULL);
1162 if (prop == NULL) 1159 if (prop == NULL)
1163 return 0; 1160 return 0;
1164#ifdef CONFIG_PPC64
1165 systemcfg->platform = *prop;
1166#else
1167#ifdef CONFIG_PPC_MULTIPLATFORM 1161#ifdef CONFIG_PPC_MULTIPLATFORM
1168 _machine = *prop; 1162 _machine = *prop;
1169#endif 1163#endif
1170#endif
1171 1164
1172#ifdef CONFIG_PPC64 1165#ifdef CONFIG_PPC64
1173 /* check if iommu is forced on or off */ 1166 /* check if iommu is forced on or off */
@@ -1346,9 +1339,6 @@ void __init early_init_devtree(void *params)
1346 of_scan_flat_dt(early_init_dt_scan_memory, NULL); 1339 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
1347 lmb_enforce_memory_limit(memory_limit); 1340 lmb_enforce_memory_limit(memory_limit);
1348 lmb_analyze(); 1341 lmb_analyze();
1349#ifdef CONFIG_PPC64
1350 systemcfg->physicalMemorySize = lmb_phys_mem_size();
1351#endif
1352 lmb_reserve(0, __pa(klimit)); 1342 lmb_reserve(0, __pa(klimit));
1353 1343
1354 DBG("Phys. mem: %lx\n", lmb_phys_mem_size()); 1344 DBG("Phys. mem: %lx\n", lmb_phys_mem_size());
@@ -1915,7 +1905,7 @@ static int of_finish_dynamic_node(struct device_node *node,
1915 /* We don't support that function on PowerMac, at least 1905 /* We don't support that function on PowerMac, at least
1916 * not yet 1906 * not yet
1917 */ 1907 */
1918 if (systemcfg->platform == PLATFORM_POWERMAC) 1908 if (_machine == PLATFORM_POWERMAC)
1919 return -ENODEV; 1909 return -ENODEV;
1920 1910
1921 /* fix up new node's linux_phandle field */ 1911 /* fix up new node's linux_phandle field */
@@ -1999,9 +1989,11 @@ int prom_add_property(struct device_node* np, struct property* prop)
1999 *next = prop; 1989 *next = prop;
2000 write_unlock(&devtree_lock); 1990 write_unlock(&devtree_lock);
2001 1991
1992#ifdef CONFIG_PROC_DEVICETREE
2002 /* try to add to proc as well if it was initialized */ 1993 /* try to add to proc as well if it was initialized */
2003 if (np->pde) 1994 if (np->pde)
2004 proc_device_tree_add_prop(np->pde, prop); 1995 proc_device_tree_add_prop(np->pde, prop);
1996#endif /* CONFIG_PROC_DEVICETREE */
2005 1997
2006 return 0; 1998 return 0;
2007} 1999}