]> err.no Git - linux-2.6/blobdiff - arch/arm/mach-pxa/poodle.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6
[linux-2.6] / arch / arm / mach-pxa / poodle.c
index 234877a09dfb3b61eb62953c67c080ce6f12b3b9..5e8c098ca13986125b15927bc9b8d2dc0eff1c52 100644 (file)
 #include <asm/arch/irda.h>
 #include <asm/arch/poodle.h>
 #include <asm/arch/pxafb.h>
+#include <asm/arch/sharpsl.h>
+#include <asm/arch/ssp.h>
 
 #include <asm/hardware/scoop.h>
 #include <asm/hardware/locomo.h>
 #include <asm/mach/sharpsl_param.h>
 
 #include "generic.h"
+#include "sharpsl.h"
 
 static struct resource poodle_scoop_resources[] = {
        [0] = {
@@ -120,13 +123,71 @@ static struct resource locomo_resources[] = {
        },
 };
 
-static struct platform_device locomo_device = {
+struct platform_device poodle_locomo_device = {
        .name           = "locomo",
        .id             = 0,
        .num_resources  = ARRAY_SIZE(locomo_resources),
        .resource       = locomo_resources,
 };
 
+EXPORT_SYMBOL(poodle_locomo_device);
+
+/*
+ * Poodle SSP Device
+ */
+
+struct platform_device poodle_ssp_device = {
+       .name           = "corgi-ssp",
+       .id             = -1,
+};
+
+struct corgissp_machinfo poodle_ssp_machinfo = {
+       .port           = 1,
+       .cs_lcdcon      = -1,
+       .cs_ads7846     = -1,
+       .cs_max1111     = -1,
+       .clk_lcdcon     = 2,
+       .clk_ads7846    = 36,
+       .clk_max1111    = 2,
+};
+
+
+/*
+ * Poodle Touch Screen Device
+ */
+static struct resource poodlets_resources[] = {
+       [0] = {
+               .start          = POODLE_IRQ_GPIO_TP_INT,
+               .end            = POODLE_IRQ_GPIO_TP_INT,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static unsigned long poodle_get_hsync_len(void)
+{
+       return 0;
+}
+
+static void poodle_null_hsync(void)
+{
+}
+
+static struct corgits_machinfo  poodle_ts_machinfo = {
+       .get_hsync_len   = poodle_get_hsync_len,
+       .put_hsync       = poodle_null_hsync,
+       .wait_hsync      = poodle_null_hsync,
+};
+
+static struct platform_device poodle_ts_device = {
+       .name           = "corgi-ts",
+       .dev            = {
+               .platform_data  = &poodle_ts_machinfo,
+       },
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(poodlets_resources),
+       .resource       = poodlets_resources,
+};
+
 
 /*
  * MMC/SD Device
@@ -151,7 +212,7 @@ static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)(
        poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250);
 
        err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int,
-                         SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING,
+                         IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
                          "MMC card detect", data);
        if (err) {
                printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
@@ -235,32 +296,32 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
 
 
 /* PXAFB device */
-static struct pxafb_mach_info poodle_fb_info __initdata = {
+static struct pxafb_mode_info poodle_fb_mode = {
        .pixclock       = 144700,
-
        .xres           = 320,
        .yres           = 240,
        .bpp            = 16,
-
        .hsync_len      = 7,
        .left_margin    = 11,
        .right_margin   = 30,
-
        .vsync_len      = 2,
        .upper_margin   = 2,
        .lower_margin   = 0,
        .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
 
+static struct pxafb_mach_info poodle_fb_info = {
+       .modes          = &poodle_fb_mode,
+       .num_modes      = 1,
        .lccr0          = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
        .lccr3          = 0,
-
-       .pxafb_backlight_power  = NULL,
-       .pxafb_lcd_power        = NULL,
 };
 
 static struct platform_device *devices[] __initdata = {
-       &locomo_device,
+       &poodle_locomo_device,
        &poodle_scoop_device,
+       &poodle_ssp_device,
+       &poodle_ts_device,
 };
 
 static void poodle_poweroff(void)
@@ -319,6 +380,7 @@ static void __init poodle_init(void)
        GPSR1 = 0x00000000;
         GPSR2 = 0x00000000;
 
+       set_pxa_fb_parent(&poodle_locomo_device.dev);
        set_pxa_fb_info(&poodle_fb_info);
        pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT);
        pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT);
@@ -332,6 +394,7 @@ static void __init poodle_init(void)
        if (ret) {
                printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n");
        }
+       corgi_ssp_set_machinfo(&poodle_ssp_machinfo);
 }
 
 static void __init fixup_poodle(struct machine_desc *desc,