diff options
Diffstat (limited to 'firmware/target/arm/s5l8702/ipod6g/ata-target.h')
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/ata-target.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/ata-target.h b/firmware/target/arm/s5l8702/ipod6g/ata-target.h new file mode 100644 index 0000000000..e2e7bd298c --- /dev/null +++ b/firmware/target/arm/s5l8702/ipod6g/ata-target.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id: ata-target.h 25525 2010-04-07 20:01:21Z torne $ | ||
9 | * | ||
10 | * Copyright (C) 2011 by Michael Sparmann | ||
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 | #ifndef ATA_TARGET_H | ||
22 | #define ATA_TARGET_H | ||
23 | |||
24 | #include "inttypes.h" | ||
25 | #include "s5l8702.h" | ||
26 | |||
27 | #ifdef BOOTLOADER | ||
28 | #define ATA_DRIVER_CLOSE | ||
29 | #endif | ||
30 | |||
31 | #define ATA_SWAP_IDENTIFY(word) (swap16(word)) | ||
32 | |||
33 | void ata_reset(void); | ||
34 | void ata_device_init(void); | ||
35 | bool ata_is_coldstart(void); | ||
36 | uint16_t ata_read_cbr(uint32_t volatile* reg); | ||
37 | void ata_write_cbr(uint32_t volatile* reg, uint16_t data); | ||
38 | |||
39 | #define ATA_OUT8(reg, data) ata_write_cbr(reg, data) | ||
40 | #define ATA_OUT16(reg, data) ata_write_cbr(reg, data) | ||
41 | #define ATA_IN8(reg) ata_read_cbr(reg) | ||
42 | #define ATA_IN16(reg) ata_read_cbr(reg) | ||
43 | |||
44 | #define ATA_SET_DEVICE_FEATURES | ||
45 | void ata_set_pio_timings(int mode); | ||
46 | |||
47 | #endif | ||