summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2009-07-12 15:01:10 +0000
committerFrank Gevaerts <frank@gevaerts.be>2009-07-12 15:01:10 +0000
commit7528674626fb0956111d27f77bbb3a97628c3a40 (patch)
tree8a2a11a8719e484dd02adc6b6a4e8c4301286c98 /firmware
parent6258e24e0e48f9325a642673077b7d93c805e405 (diff)
downloadrockbox-7528674626fb0956111d27f77bbb3a97628c3a40.tar.gz
rockbox-7528674626fb0956111d27f77bbb3a97628c3a40.tar.bz2
rockbox-7528674626fb0956111d27f77bbb3a97628c3a40.zip
Remove OHCI registers from s3c2440.h and move them to their own header. Since s3c2440 seems to be very close to the OHCI spec, there's no reason not to use a generic driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21808 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/ohci.h55
-rw-r--r--firmware/export/s3c2440.h28
2 files changed, 56 insertions, 27 deletions
diff --git a/firmware/export/ohci.h b/firmware/export/ohci.h
new file mode 100644
index 0000000000..35fae29ed8
--- /dev/null
+++ b/firmware/export/ohci.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * OHCI data structures and registers
+ *
+ * Copyright (C) 2009 by Frank Gevaerts
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#define OHCI_REVISION (*(volatile unsigned int *)(OHCI_BASE+0x00))
+#define OHCI_CONTROL (*(volatile unsigned int *)(OHCI_BASE+0x04))
+#define OHCI_COMMAND_STATUS (*(volatile unsigned int *)(OHCI_BASE+0x08))
+#define OHCI_INTERRUPT_STATUS (*(volatile unsigned int *)(OHCI_BASE+0x0C))
+#define OHCI_INTERRUPT_ENABLE (*(volatile unsigned int *)(OHCI_BASE+0x10))
+#define OHCI_INTERRUPT_DISABLE (*(volatile unsigned int *)(OHCI_BASE+0x14))
+#define OHCI_HCCA (*(volatile unsigned int *)(OHCI_BASE+0x18))
+#define OHCI_PERIOD_CURRENT_ED (*(volatile unsigned int *)(OHCI_BASE+0x1C))
+#define OHCI_CONTROL_HEAD_ED (*(volatile unsigned int *)(OHCI_BASE+0x20))
+#define OHCI_CONTROL_CURRENT_ED (*(volatile unsigned int *)(OHCI_BASE+0x24))
+#define OHCI_BULK_HEAD_ED (*(volatile unsigned int *)(OHCI_BASE+0x28))
+#define OHCI_BULK_CURRENT_ED (*(volatile unsigned int *)(OHCI_BASE+0x2C))
+#define OHCI_DONE_HEAD (*(volatile unsigned int *)(OHCI_BASE+0x30))
+#define OHCI_FM_INTERVAL (*(volatile unsigned int *)(OHCI_BASE+0x34))
+#define OHCI_FM_REMAINING (*(volatile unsigned int *)(OHCI_BASE+0x38))
+#define OHCI_FM_NUMBER (*(volatile unsigned int *)(OHCI_BASE+0x3C))
+#define OHCI_PERIODIC_START (*(volatile unsigned int *)(OHCI_BASE+0x40))
+#define OHCI_LS_THRESHOLD (*(volatile unsigned int *)(OHCI_BASE+0x44))
+#define OHCI_RH_DESCRIPTOR_A (*(volatile unsigned int *)(OHCI_BASE+0x48))
+#define OHCI_RH_DESCRIPTOR_B (*(volatile unsigned int *)(OHCI_BASE+0x4C))
+#define OHCI_RH_STATUS (*(volatile unsigned int *)(OHCI_BASE+0x50))
+#define OHCI_RH_PORT_STATUS_1 (*(volatile unsigned int *)(OHCI_BASE+0x54))
+#define OHCI_RH_PORT_STATUS_2 (*(volatile unsigned int *)(OHCI_BASE+0x58))
+
+struct ohci_hcca
+{
+ int32_t interrupt_table[32];
+ unsigned short frame_number;
+ unsigned short pad1;
+ int32_t done_head;
+ unsigned char reserved[116];
+};
diff --git a/firmware/export/s3c2440.h b/firmware/export/s3c2440.h
index 2682660b45..0589f3b6b0 100644
--- a/firmware/export/s3c2440.h
+++ b/firmware/export/s3c2440.h
@@ -46,33 +46,7 @@
/* USB Host Controller */
-/* Control and status group */
-#define HcRevision (*(volatile unsigned long *)0x49000000)
-#define HcControl (*(volatile unsigned long *)0x49000004)
-#define HcCommonStatus (*(volatile unsigned long *)0x49000008)
-#define HcInterruptStatus (*(volatile unsigned long *)0x4900000C)
-#define HcInterruptEnable (*(volatile unsigned long *)0x49000010)
-#define HcInterruptDisable (*(volatile unsigned long *)0x49000014)
-/* Memory pointer group */
-#define HcHCCA (*(volatile unsigned long *)0x49000018)
-#define HcPeriodCuttentED (*(volatile unsigned long *)0x4900001C)
-#define HcControlHeadED (*(volatile unsigned long *)0x49000020)
-#define HcControlCurrentED (*(volatile unsigned long *)0x49000024)
-#define HcBulkHeadED (*(volatile unsigned long *)0x49000028)
-#define HcBulkCurrentED (*(volatile unsigned long *)0x4900002C)
-/* Frame counter group */
-#define HcDoneHead (*(volatile unsigned long *)0x49000030)
-#define HcRmInterval (*(volatile unsigned long *)0x49000034)
-#define HcFmRemaining (*(volatile unsigned long *)0x49000038)
-#define HcFmNumber (*(volatile unsigned long *)0x4900003C)
-#define HcPeriodicStart (*(volatile unsigned long *)0x49000040)
-#define HcLSThreshold (*(volatile unsigned long *)0x49000044)
-/* Root hub group */
-#define HcRhDescriptorA (*(volatile unsigned long *)0x49000048)
-#define HcRhDescriptorB (*(volatile unsigned long *)0x4900004C)
-#define HcRhStatus (*(volatile unsigned long *)0x49000050)
-#define HcRhPortStatus1 (*(volatile unsigned long *)0x49000054)
-#define HcRhPortStatus2 (*(volatile unsigned long *)0x49000058)
+#define OHCI_BASE 0x49000000
/* Interrupt Controller */