aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/adb.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-03-28 07:15:54 -0500
committerPaul Mackerras <paulus@samba.org>2006-03-28 07:15:54 -0500
commite8222502ee6157e2713da9e0792c21f4ad458d50 (patch)
tree0f970fb99912c257a7e5254f863a53f79d22ab14 /drivers/macintosh/adb.c
parent056cb48a2fb6fb31debf665695a9f97b45cfb8ec (diff)
[PATCH] powerpc: Kill _machine and hard-coded platform numbers
This removes statically assigned platform numbers and reworks the powerpc platform probe code to use a better mechanism. With this, board support files can simply declare a new machine type with a macro, and implement a probe() function that uses the flattened device-tree to detect if they apply for a given machine. We now have a machine_is() macro that replaces the comparisons of _machine with the various PLATFORM_* constants. This commit also changes various drivers to use the new macro instead of looking at _machine. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/adb.c')
-rw-r--r--drivers/macintosh/adb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index d2ead1776c16..781d93b0bbd5 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -42,6 +42,7 @@
42#include <asm/semaphore.h> 42#include <asm/semaphore.h>
43#ifdef CONFIG_PPC 43#ifdef CONFIG_PPC
44#include <asm/prom.h> 44#include <asm/prom.h>
45#include <asm/machdep.h>
45#endif 46#endif
46 47
47 48
@@ -294,7 +295,7 @@ int __init adb_init(void)
294 int i; 295 int i;
295 296
296#ifdef CONFIG_PPC32 297#ifdef CONFIG_PPC32
297 if ( (_machine != _MACH_chrp) && (_machine != _MACH_Pmac) ) 298 if (!machine_is(chrp) && !machine_is(powermac))
298 return 0; 299 return 0;
299#endif 300#endif
300#ifdef CONFIG_MAC 301#ifdef CONFIG_MAC