aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
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 /arch/ppc
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 'arch/ppc')
-rw-r--r--arch/ppc/platforms/prep_setup.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
index a0fc628ffb1e..fa46f8ce5c71 100644
--- a/arch/ppc/platforms/prep_setup.c
+++ b/arch/ppc/platforms/prep_setup.c
@@ -1067,15 +1067,13 @@ prep_map_io(void)
1067static int __init 1067static int __init
1068prep_request_io(void) 1068prep_request_io(void)
1069{ 1069{
1070 if (_machine == _MACH_prep) {
1071#ifdef CONFIG_NVRAM 1070#ifdef CONFIG_NVRAM
1072 request_region(PREP_NVRAM_AS0, 0x8, "nvram"); 1071 request_region(PREP_NVRAM_AS0, 0x8, "nvram");
1073#endif 1072#endif
1074 request_region(0x00,0x20,"dma1"); 1073 request_region(0x00,0x20,"dma1");
1075 request_region(0x40,0x20,"timer"); 1074 request_region(0x40,0x20,"timer");
1076 request_region(0x80,0x10,"dma page reg"); 1075 request_region(0x80,0x10,"dma page reg");
1077 request_region(0xc0,0x20,"dma2"); 1076 request_region(0xc0,0x20,"dma2");
1078 }
1079 1077
1080 return 0; 1078 return 0;
1081} 1079}