summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/ata-defines.h58
-rw-r--r--firmware/export/ata.h34
2 files changed, 58 insertions, 34 deletions
diff --git a/firmware/export/ata-defines.h b/firmware/export/ata-defines.h
new file mode 100644
index 0000000000..1650c9fa47
--- /dev/null
+++ b/firmware/export/ata-defines.h
@@ -0,0 +1,58 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: ata.h 28951 2011-01-02 23:02:55Z theseven $
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_DEFINES_H__
22#define __ATA_DEFINES_H__
23
24#ifndef ATA_OUT8
25#define ATA_OUT8(reg, data) (reg) = (data)
26#endif
27#ifndef ATA_OUT16
28#define ATA_OUT16(reg, data) (reg) = (data)
29#endif
30#ifndef ATA_IN8
31#define ATA_IN8(reg) (reg)
32#endif
33#ifndef ATA_IN16
34#define ATA_IN16(reg) (reg)
35#endif
36#ifndef ATA_SWAP_IDENTIFY
37#define ATA_SWAP_IDENTIFY(word) (word)
38#endif
39
40#define STATUS_BSY 0x80
41#define STATUS_RDY 0x40
42#define STATUS_DRQ 0x08
43#define STATUS_ERR 0x01
44#define STATUS_DF 0x20
45#define ERROR_IDNF 0x10
46#define ERROR_ABRT 0x04
47
48#define TEST_PATTERN1 0xa5
49#define TEST_PATTERN2 0x5a
50#define TEST_PATTERN3 0xaa
51#define TEST_PATTERN4 0x55
52
53#define ATA_FEATURE ATA_ERROR
54
55#define ATA_STATUS ATA_COMMAND
56#define ATA_ALT_STATUS ATA_CONTROL
57
58#endif
diff --git a/firmware/export/ata.h b/firmware/export/ata.h
index c7bf85d274..5be32da231 100644
--- a/firmware/export/ata.h
+++ b/firmware/export/ata.h
@@ -25,40 +25,6 @@
25#include "config.h" /* for HAVE_MULTIVOLUME or not */ 25#include "config.h" /* for HAVE_MULTIVOLUME or not */
26#include "mv.h" /* for IF_MV() and friends */ 26#include "mv.h" /* for IF_MV() and friends */
27 27
28#ifndef ATA_OUT8
29#define ATA_OUT8(reg, data) (reg) = (data)
30#endif
31#ifndef ATA_OUT16
32#define ATA_OUT16(reg, data) (reg) = (data)
33#endif
34#ifndef ATA_IN8
35#define ATA_IN8(reg) (reg)
36#endif
37#ifndef ATA_IN16
38#define ATA_IN16(reg) (reg)
39#endif
40#ifndef ATA_SWAP_IDENTIFY
41#define ATA_SWAP_IDENTIFY(word) (word)
42#endif
43
44#define STATUS_BSY 0x80
45#define STATUS_RDY 0x40
46#define STATUS_DRQ 0x08
47#define STATUS_ERR 0x01
48#define STATUS_DF 0x20
49#define ERROR_IDNF 0x10
50#define ERROR_ABRT 0x04
51
52#define TEST_PATTERN1 0xa5
53#define TEST_PATTERN2 0x5a
54#define TEST_PATTERN3 0xaa
55#define TEST_PATTERN4 0x55
56
57#define ATA_FEATURE ATA_ERROR
58
59#define ATA_STATUS ATA_COMMAND
60#define ATA_ALT_STATUS ATA_CONTROL
61
62struct storage_info; 28struct storage_info;
63 29
64void ata_enable(bool on); 30void ata_enable(bool on);