qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 13/16] Peripheral driver for S3C OHCI controller


From: Vincent Sanders
Subject: [Qemu-devel] [PATCH 13/16] Peripheral driver for S3C OHCI controller
Date: Sat, 23 May 2009 17:35:31 +0100

Add the USB host port OHCI controller useing the existing pxa driver

Signed-off-by: Vincent Sanders <address@hidden>
---
 hw/s3c2410x.c |    9 +++++++++
 hw/s3c2440.c  |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/hw/s3c2410x.c b/hw/s3c2410x.c
index 78b9ee0..79978bf 100644
--- a/hw/s3c2410x.c
+++ b/hw/s3c2410x.c
@@ -13,6 +13,9 @@
 
 #include "s3c2410x.h"
 
+/* Use the PXA OHCI USB mapping */
+#include "pxa.h"
+
 /* S3C2410 SoC IDs */
 #define CPU_S3C2410X_IDENT_S3C2410X 0x32410000
 #define CPU_S3C2410X_IDENT_S3C2410A 0x32410002
@@ -26,6 +29,9 @@
 /* Memory control */
 #define CPU_S3C2410X_MEMC_BASE (CPU_S3C2410X_PERIPHERAL + 0x8000000)
 
+/* USB controller */
+#define CPU_S3C2410X_OHCI_BASE (CPU_S3C2410X_PERIPHERAL + 0x9000000)
+
 /* Interrupt controller */
 #define CPU_S3C2410X_IRQ_BASE (CPU_S3C2410X_PERIPHERAL + 0xA000000)
 
@@ -110,5 +116,8 @@ s3c2410x_init(int sdram_size)
     /* NAND controller */
     s->nand = s3c24xx_nand_init(CPU_S3C2410X_NAND_BASE);
 
+    /* A two port OHCI controller */
+    usb_ohci_init_pxa(CPU_S3C2410X_OHCI_BASE, 2, -1, s3c24xx_get_irq(s->irq, 
26));
+
     return s;
 }
diff --git a/hw/s3c2440.c b/hw/s3c2440.c
index fdb107b..515f270 100644
--- a/hw/s3c2440.c
+++ b/hw/s3c2440.c
@@ -13,6 +13,9 @@
 
 #include "s3c2440.h"
 
+/* Use the PXA OHCI USB mapping */
+#include "pxa.h"
+
 /* S3C2440 SoC ID */
 #define CPU_S3C2440_IDENT_S3C2440A 0x32440001
 
@@ -25,6 +28,9 @@
 /* Memory control */
 #define CPU_S3C2440_MEMC_BASE (CPU_S3C2440_PERIPHERAL + 0x8000000)
 
+/* USB controller */
+#define CPU_S3C2440_OHCI_BASE (CPU_S3C2440_PERIPHERAL + 0x9000000)
+
 /* Interrupt controller */
 #define CPU_S3C2440_IRQ_BASE (CPU_S3C2440_PERIPHERAL + 0xA000000)
 
@@ -107,5 +113,8 @@ s3c2440_init(int sdram_size)
     /* NAND controller */
     s->nand = s3c24xx_nand_init(CPU_S3C2440_NAND_BASE);
 
+    /* A two port OHCI controller */
+    usb_ohci_init_pxa(CPU_S3C2440_OHCI_BASE, 2, -1, s3c24xx_get_irq(s->irq, 
26));
+
     return s;
 }
-- 
1.6.0.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]