summary refs log tree commit diff
path: root/arch/m68k/mac/config.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2009-11-04 00:41:35 +1100
committerGeert Uytterhoeven <geert@linux-m68k.org>2010-02-27 18:31:10 +0100
commitcff75f1fb1f28eba3facb7dbe9b40a892912578a (patch)
tree30bba06578c7ba184bb91df464bf85a3197b7b34 /arch/m68k/mac/config.c
parent80614e5ab1458ff3ccced4d6ba2fa386575c8d5c (diff)
downloadlinux-cff75f1fb1f28eba3facb7dbe9b40a892912578a.tar.gz
mac68k: move mac_esp platform device
Move platform device code from the driver to the platform init function.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mac/config.c')
-rw-r--r--arch/m68k/mac/config.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index c8a4c39cef56..91245ade2290 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -911,6 +911,16 @@ static struct platform_device swim_pdev = {
 	.resource	= &swim_rsrc,
 };
 
+static struct platform_device esp_0_pdev = {
+	.name		= "mac_esp",
+	.id		= 0,
+};
+
+static struct platform_device esp_1_pdev = {
+	.name		= "mac_esp",
+	.id		= 1,
+};
+
 int __init mac_platform_init(void)
 {
 	u8 *swim_base;
@@ -944,6 +954,23 @@ int __init mac_platform_init(void)
 		platform_device_register(&swim_pdev);
 	}
 
+	/*
+	 * SCSI device(s)
+	 */
+
+	switch (macintosh_config->scsi_type) {
+	case MAC_SCSI_QUADRA:
+	case MAC_SCSI_QUADRA3:
+		platform_device_register(&esp_0_pdev);
+		break;
+	case MAC_SCSI_QUADRA2:
+		platform_device_register(&esp_0_pdev);
+		if ((macintosh_config->ident == MAC_MODEL_Q900) ||
+		    (macintosh_config->ident == MAC_MODEL_Q950))
+			platform_device_register(&esp_1_pdev);
+		break;
+	}
+
 	return 0;
 }