Patchwork [RESEND,9/9] collie: add support for PCMCIA bus

login
register
mail settings
Submitter Dmitry Eremin-Solenikov
Date April 25, 2011, 9:06 a.m.
Message ID <1303722395-10791-9-git-send-email-dbaryshkov@gmail.com>
Download mbox | patch
Permalink /patch/92716/
State New
Headers show

Comments

Dmitry Eremin-Solenikov - April 25, 2011, 9:06 a.m.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 hw/collie.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/collie.c b/hw/collie.c
index 156404d..89d37f7 100644
--- a/hw/collie.c
+++ b/hw/collie.c
@@ -14,6 +14,9 @@ 
 #include "flash.h"
 #include "blockdev.h"
 
+#define COLLIE_GPIO_CF_IRQ      (14)
+#define COLLIE_GPIO_CF_CD       (22)
+
 static struct arm_boot_info collie_binfo = {
     .loader_start = SA_SDCS0,
     .ram_size = 0x20000000,
@@ -47,6 +50,10 @@  static void collie_init(ram_addr_t ram_size,
                     512, 4, 0x00, 0x00, 0x00, 0x00, 0);
 
     sysbus_create_simple("scoop", 0x40800000, NULL);
+    sysbus_connect_irq(sysbus_from_qdev(s->pcmcia[0]), 0,
+                    qdev_get_gpio_in(s->gpio, COLLIE_GPIO_CF_IRQ));
+    sysbus_connect_irq(sysbus_from_qdev(s->pcmcia[0]), 1,
+                    qdev_get_gpio_in(s->gpio, COLLIE_GPIO_CF_CD));
 
     collie_binfo.kernel_filename = kernel_filename;
     collie_binfo.kernel_cmdline = kernel_cmdline;