forked from len0rd/rockbox
Fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28952 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1a1fc09863
commit
6f40387e74
5 changed files with 61 additions and 34 deletions
|
@ -33,6 +33,7 @@
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "ata_idle_notify.h"
|
#include "ata_idle_notify.h"
|
||||||
#include "ata-target.h"
|
#include "ata-target.h"
|
||||||
|
#include "ata-defines.h"
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
|
|
||||||
#define SECTOR_SIZE 512
|
#define SECTOR_SIZE 512
|
||||||
|
|
58
firmware/export/ata-defines.h
Normal file
58
firmware/export/ata-defines.h
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
/***************************************************************************
|
||||||
|
* __________ __ ___.
|
||||||
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
* \/ \/ \/ \/ \/
|
||||||
|
* $Id: ata.h 28951 2011-01-02 23:02:55Z theseven $
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 by Michael Sparmann
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef __ATA_DEFINES_H__
|
||||||
|
#define __ATA_DEFINES_H__
|
||||||
|
|
||||||
|
#ifndef ATA_OUT8
|
||||||
|
#define ATA_OUT8(reg, data) (reg) = (data)
|
||||||
|
#endif
|
||||||
|
#ifndef ATA_OUT16
|
||||||
|
#define ATA_OUT16(reg, data) (reg) = (data)
|
||||||
|
#endif
|
||||||
|
#ifndef ATA_IN8
|
||||||
|
#define ATA_IN8(reg) (reg)
|
||||||
|
#endif
|
||||||
|
#ifndef ATA_IN16
|
||||||
|
#define ATA_IN16(reg) (reg)
|
||||||
|
#endif
|
||||||
|
#ifndef ATA_SWAP_IDENTIFY
|
||||||
|
#define ATA_SWAP_IDENTIFY(word) (word)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STATUS_BSY 0x80
|
||||||
|
#define STATUS_RDY 0x40
|
||||||
|
#define STATUS_DRQ 0x08
|
||||||
|
#define STATUS_ERR 0x01
|
||||||
|
#define STATUS_DF 0x20
|
||||||
|
#define ERROR_IDNF 0x10
|
||||||
|
#define ERROR_ABRT 0x04
|
||||||
|
|
||||||
|
#define TEST_PATTERN1 0xa5
|
||||||
|
#define TEST_PATTERN2 0x5a
|
||||||
|
#define TEST_PATTERN3 0xaa
|
||||||
|
#define TEST_PATTERN4 0x55
|
||||||
|
|
||||||
|
#define ATA_FEATURE ATA_ERROR
|
||||||
|
|
||||||
|
#define ATA_STATUS ATA_COMMAND
|
||||||
|
#define ATA_ALT_STATUS ATA_CONTROL
|
||||||
|
|
||||||
|
#endif
|
|
@ -25,40 +25,6 @@
|
||||||
#include "config.h" /* for HAVE_MULTIVOLUME or not */
|
#include "config.h" /* for HAVE_MULTIVOLUME or not */
|
||||||
#include "mv.h" /* for IF_MV() and friends */
|
#include "mv.h" /* for IF_MV() and friends */
|
||||||
|
|
||||||
#ifndef ATA_OUT8
|
|
||||||
#define ATA_OUT8(reg, data) (reg) = (data)
|
|
||||||
#endif
|
|
||||||
#ifndef ATA_OUT16
|
|
||||||
#define ATA_OUT16(reg, data) (reg) = (data)
|
|
||||||
#endif
|
|
||||||
#ifndef ATA_IN8
|
|
||||||
#define ATA_IN8(reg) (reg)
|
|
||||||
#endif
|
|
||||||
#ifndef ATA_IN16
|
|
||||||
#define ATA_IN16(reg) (reg)
|
|
||||||
#endif
|
|
||||||
#ifndef ATA_SWAP_IDENTIFY
|
|
||||||
#define ATA_SWAP_IDENTIFY(word) (word)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define STATUS_BSY 0x80
|
|
||||||
#define STATUS_RDY 0x40
|
|
||||||
#define STATUS_DRQ 0x08
|
|
||||||
#define STATUS_ERR 0x01
|
|
||||||
#define STATUS_DF 0x20
|
|
||||||
#define ERROR_IDNF 0x10
|
|
||||||
#define ERROR_ABRT 0x04
|
|
||||||
|
|
||||||
#define TEST_PATTERN1 0xa5
|
|
||||||
#define TEST_PATTERN2 0x5a
|
|
||||||
#define TEST_PATTERN3 0xaa
|
|
||||||
#define TEST_PATTERN4 0x55
|
|
||||||
|
|
||||||
#define ATA_FEATURE ATA_ERROR
|
|
||||||
|
|
||||||
#define ATA_STATUS ATA_COMMAND
|
|
||||||
#define ATA_ALT_STATUS ATA_CONTROL
|
|
||||||
|
|
||||||
struct storage_info;
|
struct storage_info;
|
||||||
|
|
||||||
void ata_enable(bool on);
|
void ata_enable(bool on);
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "logf.h"
|
#include "logf.h"
|
||||||
|
#include "ata-defines.h"
|
||||||
|
|
||||||
#undef ata_read_sectors
|
#undef ata_read_sectors
|
||||||
#undef ata_write_sectors
|
#undef ata_write_sectors
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "dm320.h"
|
#include "dm320.h"
|
||||||
#include "ata.h"
|
#include "ata.h"
|
||||||
#include "ata-target.h"
|
#include "ata-target.h"
|
||||||
|
#include "ata-defines.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#define CS1_START 0x50000000
|
#define CS1_START 0x50000000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue