mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28951 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9339be1279
commit
1a1fc09863
3 changed files with 38 additions and 38 deletions
|
@ -35,43 +35,8 @@
|
|||
#include "ata-target.h"
|
||||
#include "storage.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 SECTOR_SIZE 512
|
||||
|
||||
#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
|
||||
|
||||
#define SELECT_DEVICE1 0x10
|
||||
#define SELECT_LBA 0x40
|
||||
|
||||
|
@ -1356,9 +1321,9 @@ int ata_init(void)
|
|||
|
||||
if (rc)
|
||||
{ /* failed? -> second try, always with hard reset */
|
||||
// DEBUGF("ata: init failed, retrying...\n");
|
||||
// rc = init_and_check(true);
|
||||
// if (rc)
|
||||
DEBUGF("ata: init failed, retrying...\n");
|
||||
rc = init_and_check(true);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,40 @@
|
|||
#include "config.h" /* for HAVE_MULTIVOLUME or not */
|
||||
#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;
|
||||
|
||||
void ata_enable(bool on);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "system.h"
|
||||
#include "dma-target.h"
|
||||
#include "dm320.h"
|
||||
#include "ata.h"
|
||||
#include "ata-target.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue