diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2010-04-26 21:40:16 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2010-04-26 21:40:16 +0000 |
commit | 28d54c6016459ffe93c0be2efea7de27c38d783c (patch) | |
tree | 9a7a71481f0a82599616a3e9f4e5bdad9fee8d6c /firmware/target/coldfire/mpio/ata-mpio.c | |
parent | b09d3aec392538ca0934644ff6357c41aaa4c323 (diff) | |
download | rockbox-28d54c6016459ffe93c0be2efea7de27c38d783c.tar.gz rockbox-28d54c6016459ffe93c0be2efea7de27c38d783c.zip |
Add MPIO HD200 port - new files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25725 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/mpio/ata-mpio.c')
-rw-r--r-- | firmware/target/coldfire/mpio/ata-mpio.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/firmware/target/coldfire/mpio/ata-mpio.c b/firmware/target/coldfire/mpio/ata-mpio.c new file mode 100644 index 0000000000..ca1c9b1bc6 --- /dev/null +++ b/firmware/target/coldfire/mpio/ata-mpio.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id:$ | ||
9 | * | ||
10 | * Copyright (C) 2010 Marcin Bukat | ||
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 | #include "config.h" | ||
23 | #include "cpu.h" | ||
24 | #include <stdbool.h> | ||
25 | #include "kernel.h" | ||
26 | #include "system.h" | ||
27 | #include "power.h" | ||
28 | #include "ata-target.h" | ||
29 | |||
30 | void ata_reset(void) | ||
31 | { | ||
32 | /* GPIO19 */ | ||
33 | and_l(~(1<<19), &GPIO_OUT); | ||
34 | sleep(1); /* > 25us */ | ||
35 | |||
36 | or_l((1<<19), &GPIO_OUT); | ||
37 | sleep(1); /* > 25us */ | ||
38 | } | ||
39 | |||
40 | void ata_enable(bool on) | ||
41 | { | ||
42 | (void)on; | ||
43 | } | ||
44 | |||
45 | /* to be fixed */ | ||
46 | bool ata_is_coldstart(void) | ||
47 | { | ||
48 | return true; | ||
49 | } | ||
50 | |||
51 | void ata_device_init(void) | ||
52 | { | ||
53 | /* ATA reset line config */ | ||
54 | or_l((1<<19), &GPIO_OUT); | ||
55 | or_l((1<<19), &GPIO_ENABLE); | ||
56 | or_l((1<<19), &GPIO_FUNCTION); | ||
57 | } | ||