diff options
Diffstat (limited to 'firmware/target/coldfire/iaudio/x5/ata-x5.c')
-rw-r--r-- | firmware/target/coldfire/iaudio/x5/ata-x5.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/firmware/target/coldfire/iaudio/x5/ata-x5.c b/firmware/target/coldfire/iaudio/x5/ata-x5.c deleted file mode 100644 index 21c088288a..0000000000 --- a/firmware/target/coldfire/iaudio/x5/ata-x5.c +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Linus Nielsen Feltzing | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #include "config.h" | ||
20 | #include "cpu.h" | ||
21 | #include <stdbool.h> | ||
22 | #include "kernel.h" | ||
23 | #include "system.h" | ||
24 | #include "power.h" | ||
25 | #include "pcf50606.h" | ||
26 | |||
27 | void ata_reset(void) | ||
28 | { | ||
29 | and_l(~0x40000000, &GPIO_OUT); | ||
30 | sleep(1); /* > 25us */ | ||
31 | or_l(0x40000000, &GPIO_OUT); | ||
32 | sleep(1); /* > 2ms */ | ||
33 | } | ||
34 | |||
35 | void ata_enable(bool on) | ||
36 | { | ||
37 | if(on) | ||
38 | and_l(~0x00000800, &GPIO1_OUT); | ||
39 | else | ||
40 | or_l(0x00000800, &GPIO1_OUT); | ||
41 | } | ||
42 | |||
43 | bool ata_is_coldstart(void) | ||
44 | { | ||
45 | return true; /* TODO */ | ||
46 | } | ||
47 | |||
48 | void ata_device_init(void) | ||
49 | { | ||
50 | /* ATA reset */ | ||
51 | or_l(0x40000000, &GPIO_OUT); | ||
52 | or_l(0x40000000, &GPIO_ENABLE); | ||
53 | or_l(0x40000000, &GPIO_FUNCTION); | ||
54 | |||
55 | /* ATA enable */ | ||
56 | or_l(0x00000800, &GPIO1_OUT); | ||
57 | or_l(0x00000800, &GPIO1_ENABLE); | ||
58 | or_l(0x00000800, &GPIO1_FUNCTION); | ||
59 | |||
60 | /* USB enable */ | ||
61 | and_l(~0x00000008, &GPIO1_OUT); | ||
62 | or_l(0x00000008, &GPIO1_ENABLE); | ||
63 | or_l(0x00000008, &GPIO1_FUNCTION); | ||
64 | } | ||