[ARM] 3149/1: SharpSL: Add Akita (SL-C1000) machine support
authorRichard Purdie <rpurdie@rpsys.net>
Sat, 12 Nov 2005 18:53:48 +0000 (18:53 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 12 Nov 2005 18:53:48 +0000 (18:53 +0000)
Patch from Richard Purdie

Add the core machine support for the Sharp SL-C1000 (Akita)
and enable the Kconfig selection for it.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/Kconfig
arch/arm/mach-pxa/spitz.c
include/asm-arm/arch-pxa/akita.h

index e201aa9765b9c0bc8ee15e87d45bd80393a4075d..cd506646801a4d576dad1de3f4f08b613534843c 100644 (file)
@@ -72,6 +72,12 @@ config MACH_HUSKY
        depends PXA_SHARPSL_25x
        select PXA_SHARP_C7xx
 
+config MACH_AKITA
+       bool "Enable Sharp SL-1000 (Akita) Support"
+       depends PXA_SHARPSL_27x
+       select PXA_SHARP_Cxx00
+       select MACH_SPITZ
+
 config MACH_SPITZ
        bool "Enable Sharp Zaurus SL-3000 (Spitz) Support"
        depends PXA_SHARPSL_27x
index 4e9a699ee4280e61560a5672e9bd6c276c36a284..2df1b56615b1029601d405b958f682aae41d8b98 100644 (file)
@@ -345,6 +345,16 @@ static void spitz_irda_transceiver_mode(struct device *dev, int mode)
                reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
 }
 
+#ifdef CONFIG_MACH_AKITA
+static void akita_irda_transceiver_mode(struct device *dev, int mode)
+{
+       if (mode & IR_OFF)
+               akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
+       else
+               akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
+}
+#endif
+
 static struct pxaficp_platform_data spitz_ficp_platform_data = {
        .transceiver_cap  = IR_SIRMODE | IR_OFF,
        .transceiver_mode = spitz_irda_transceiver_mode,
@@ -417,6 +427,32 @@ static void __init spitz_init(void)
        platform_device_register(&spitzscoop2_device);
 }
 
+#ifdef CONFIG_MACH_AKITA
+/*
+ * Akita IO Expander
+ */
+struct platform_device akitaioexp_device = {
+       .name           = "akita-ioexp",
+       .id             = -1,
+};
+
+static void __init akita_init(void)
+{
+       spitz_ficp_platform_data.transceiver_mode = akita_irda_transceiver_mode;
+
+       /* We just pretend the second element of the array doesn't exist */
+       spitz_pcmcia_config.num_devs = 1;
+       platform_scoop_config = &spitz_pcmcia_config;
+       spitz_bl_machinfo.set_bl_intensity = akita_bl_set_intensity;
+
+       platform_device_register(&akitaioexp_device);
+
+       spitzscoop_device.dev.parent = &akitaioexp_device.dev;
+       common_init();
+}
+#endif
+
+
 static void __init fixup_spitz(struct machine_desc *desc,
                struct tag *tags, char **cmdline, struct meminfo *mi)
 {
@@ -452,3 +488,16 @@ MACHINE_START(BORZOI, "SHARP Borzoi")
        .timer          = &pxa_timer,
 MACHINE_END
 #endif
+
+#ifdef CONFIG_MACH_AKITA
+MACHINE_START(AKITA, "SHARP Akita")
+       .phys_ram       = 0xa0000000,
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .fixup          = fixup_spitz,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa_init_irq,
+       .init_machine   = akita_init,
+       .timer          = &pxa_timer,
+MACHINE_END
+#endif
index 4a1fbcfccc398c96905eafb005a4ef4913cfbd0f..5d8cc1d9cb108e837eeebb0c0c46df077fb58179 100644 (file)
@@ -25,6 +25,8 @@
 /* Default Values */
 #define AKITA_IOEXP_IO_OUT     (AKITA_IOEXP_IR_ON | AKITA_IOEXP_AKIN_PULLUP)
 
+extern struct platform_device akitaioexp_device;
+
 void akita_set_ioexp(struct device *dev, unsigned char bitmask);
 void akita_reset_ioexp(struct device *dev, unsigned char bitmask);