summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2008-11-01 14:38:45 +0000
committerRafaël Carré <rafael.carre@gmail.com>2008-11-01 14:38:45 +0000
commit646cac0bde7b11fa7bcb670d1d76eec78e360485 (patch)
treec33d88ce42bededc83a29fb18cf1bc4cace31bb4 /firmware/export
parente8753f3b25b16de85e75c5cd98340e534e49a9c7 (diff)
downloadrockbox-646cac0bde7b11fa7bcb670d1d76eec78e360485.tar.gz
rockbox-646cac0bde7b11fa7bcb670d1d76eec78e360485.zip
Remove Linux's mmci.h since the license is strict GPLv2
Rewrite a new header distributed under GPLv2 or later, and place it in export/ in case other targets ship with an ARM PL180 controller git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18959 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/pl180.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/firmware/export/pl180.h b/firmware/export/pl180.h
new file mode 100644
index 0000000000..98993cc244
--- /dev/null
+++ b/firmware/export/pl180.h
@@ -0,0 +1,65 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright © 2008 Rafaël Carré
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22/* ARM PrimeCell PL180 SD/MMC controller */
23
24/* MCIStatus bits */
25#define MCI_CMD_CRC_FAIL (1<<0)
26#define MCI_DATA_CRC_FAIL (1<<1)
27#define MCI_CMD_TIMEOUT (1<<2)
28#define MCI_DATA_TIMEOUT (1<<3)
29#define MCI_TX_UNDERRUN (1<<4)
30#define MCI_RX_OVERRUN (1<<5)
31#define MCI_CMD_RESP_END (1<<6)
32#define MCI_CMD_SENT (1<<7)
33#define MCI_DATA_END (1<<8)
34#define MCI_START_BIT_ERR (1<<9)
35#define MCI_DATA_BLOCK_END (1<<10)
36#define MCI_CMD_ACTIVE (1<<11)
37
38
39/* MCIPower bits */
40#define MCI_POWER_OFF 0x0
41/* 0x1 is reserved */
42#define MCI_POWER_UP 0x2
43#define MCI_POWER_ON 0x3
44
45/* bits 5:2 are the voltage */
46
47#define MCI_POWER_OPEN_DRAIN (1<<6)
48#define MCI_POWER_ROD (1<<7)
49
50
51/* MCIClock bits */
52/* bits 7:0 are the clock divider */
53#define MCI_CLOCK_ENABLE (1<<8)
54#define MCI_CLOCK_POWERSAVE (1<<9)
55#define MCI_CLOCK_BYPASS (1<<10)
56#define MCI_CLOCK_WIDEBUS (1<<11)
57
58
59/* MCICommand bits */
60/* bits 5:0 are the command index */
61#define MCI_COMMAND_RESPONSE (1<<6)
62#define MCI_COMMAND_LONG_RESPONSE (1<<7)
63#define MCI_COMMAND_INTERRUPT (1<<8)
64#define MCI_COMMAND_PENDING (1<<9)
65#define MCI_COMMAND_ENABLE (1<<10)