diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2009-07-12 15:01:10 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2009-07-12 15:01:10 +0000 |
commit | 7528674626fb0956111d27f77bbb3a97628c3a40 (patch) | |
tree | 8a2a11a8719e484dd02adc6b6a4e8c4301286c98 | |
parent | 6258e24e0e48f9325a642673077b7d93c805e405 (diff) | |
download | rockbox-7528674626fb0956111d27f77bbb3a97628c3a40.tar.gz 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
-rw-r--r-- | firmware/export/ohci.h | 55 | ||||
-rw-r--r-- | firmware/export/s3c2440.h | 28 |
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 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * OHCI data structures and registers | ||
11 | * | ||
12 | * Copyright (C) 2009 by Frank Gevaerts | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or | ||
15 | * modify it under the terms of the GNU General Public License | ||
16 | * as published by the Free Software Foundation; either version 2 | ||
17 | * of the License, or (at your option) any later version. | ||
18 | * | ||
19 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
20 | * KIND, either express or implied. | ||
21 | * | ||
22 | ****************************************************************************/ | ||
23 | |||
24 | #define OHCI_REVISION (*(volatile unsigned int *)(OHCI_BASE+0x00)) | ||
25 | #define OHCI_CONTROL (*(volatile unsigned int *)(OHCI_BASE+0x04)) | ||
26 | #define OHCI_COMMAND_STATUS (*(volatile unsigned int *)(OHCI_BASE+0x08)) | ||
27 | #define OHCI_INTERRUPT_STATUS (*(volatile unsigned int *)(OHCI_BASE+0x0C)) | ||
28 | #define OHCI_INTERRUPT_ENABLE (*(volatile unsigned int *)(OHCI_BASE+0x10)) | ||
29 | #define OHCI_INTERRUPT_DISABLE (*(volatile unsigned int *)(OHCI_BASE+0x14)) | ||
30 | #define OHCI_HCCA (*(volatile unsigned int *)(OHCI_BASE+0x18)) | ||
31 | #define OHCI_PERIOD_CURRENT_ED (*(volatile unsigned int *)(OHCI_BASE+0x1C)) | ||
32 | #define OHCI_CONTROL_HEAD_ED (*(volatile unsigned int *)(OHCI_BASE+0x20)) | ||
33 | #define OHCI_CONTROL_CURRENT_ED (*(volatile unsigned int *)(OHCI_BASE+0x24)) | ||
34 | #define OHCI_BULK_HEAD_ED (*(volatile unsigned int *)(OHCI_BASE+0x28)) | ||
35 | #define OHCI_BULK_CURRENT_ED (*(volatile unsigned int *)(OHCI_BASE+0x2C)) | ||
36 | #define OHCI_DONE_HEAD (*(volatile unsigned int *)(OHCI_BASE+0x30)) | ||
37 | #define OHCI_FM_INTERVAL (*(volatile unsigned int *)(OHCI_BASE+0x34)) | ||
38 | #define OHCI_FM_REMAINING (*(volatile unsigned int *)(OHCI_BASE+0x38)) | ||
39 | #define OHCI_FM_NUMBER (*(volatile unsigned int *)(OHCI_BASE+0x3C)) | ||
40 | #define OHCI_PERIODIC_START (*(volatile unsigned int *)(OHCI_BASE+0x40)) | ||
41 | #define OHCI_LS_THRESHOLD (*(volatile unsigned int *)(OHCI_BASE+0x44)) | ||
42 | #define OHCI_RH_DESCRIPTOR_A (*(volatile unsigned int *)(OHCI_BASE+0x48)) | ||
43 | #define OHCI_RH_DESCRIPTOR_B (*(volatile unsigned int *)(OHCI_BASE+0x4C)) | ||
44 | #define OHCI_RH_STATUS (*(volatile unsigned int *)(OHCI_BASE+0x50)) | ||
45 | #define OHCI_RH_PORT_STATUS_1 (*(volatile unsigned int *)(OHCI_BASE+0x54)) | ||
46 | #define OHCI_RH_PORT_STATUS_2 (*(volatile unsigned int *)(OHCI_BASE+0x58)) | ||
47 | |||
48 | struct ohci_hcca | ||
49 | { | ||
50 | int32_t interrupt_table[32]; | ||
51 | unsigned short frame_number; | ||
52 | unsigned short pad1; | ||
53 | int32_t done_head; | ||
54 | unsigned char reserved[116]; | ||
55 | }; | ||
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 @@ | |||
46 | 46 | ||
47 | /* USB Host Controller */ | 47 | /* USB Host Controller */ |
48 | 48 | ||
49 | /* Control and status group */ | 49 | #define OHCI_BASE 0x49000000 |
50 | #define HcRevision (*(volatile unsigned long *)0x49000000) | ||
51 | #define HcControl (*(volatile unsigned long *)0x49000004) | ||
52 | #define HcCommonStatus (*(volatile unsigned long *)0x49000008) | ||
53 | #define HcInterruptStatus (*(volatile unsigned long *)0x4900000C) | ||
54 | #define HcInterruptEnable (*(volatile unsigned long *)0x49000010) | ||
55 | #define HcInterruptDisable (*(volatile unsigned long *)0x49000014) | ||
56 | /* Memory pointer group */ | ||
57 | #define HcHCCA (*(volatile unsigned long *)0x49000018) | ||
58 | #define HcPeriodCuttentED (*(volatile unsigned long *)0x4900001C) | ||
59 | #define HcControlHeadED (*(volatile unsigned long *)0x49000020) | ||
60 | #define HcControlCurrentED (*(volatile unsigned long *)0x49000024) | ||
61 | #define HcBulkHeadED (*(volatile unsigned long *)0x49000028) | ||
62 | #define HcBulkCurrentED (*(volatile unsigned long *)0x4900002C) | ||
63 | /* Frame counter group */ | ||
64 | #define HcDoneHead (*(volatile unsigned long *)0x49000030) | ||
65 | #define HcRmInterval (*(volatile unsigned long *)0x49000034) | ||
66 | #define HcFmRemaining (*(volatile unsigned long *)0x49000038) | ||
67 | #define HcFmNumber (*(volatile unsigned long *)0x4900003C) | ||
68 | #define HcPeriodicStart (*(volatile unsigned long *)0x49000040) | ||
69 | #define HcLSThreshold (*(volatile unsigned long *)0x49000044) | ||
70 | /* Root hub group */ | ||
71 | #define HcRhDescriptorA (*(volatile unsigned long *)0x49000048) | ||
72 | #define HcRhDescriptorB (*(volatile unsigned long *)0x4900004C) | ||
73 | #define HcRhStatus (*(volatile unsigned long *)0x49000050) | ||
74 | #define HcRhPortStatus1 (*(volatile unsigned long *)0x49000054) | ||
75 | #define HcRhPortStatus2 (*(volatile unsigned long *)0x49000058) | ||
76 | 50 | ||
77 | /* Interrupt Controller */ | 51 | /* Interrupt Controller */ |
78 | 52 | ||