More storage work.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19003 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2008-11-04 19:36:17 +00:00
parent c6ccf75869
commit 147a23a6ed
2 changed files with 21 additions and 33 deletions

View file

@ -20,7 +20,7 @@
****************************************************************************/ ****************************************************************************/
#include "ata.h" #include "ata.h"
#include "ata-target.h" #include "ata-target.h"
#include "ata_idle_notify.h" #include "nand_idle_notify.h"
#include "system.h" #include "system.h"
#include <string.h> #include <string.h>
#include "thread.h" #include "thread.h"
@ -30,7 +30,7 @@
#include "usb.h" #include "usb.h"
/* for compatibility */ /* for compatibility */
int ata_spinup_time = 0; int nand_spinup_time = 0;
long last_disk_activity = -1; long last_disk_activity = -1;
@ -42,55 +42,49 @@ static long next_yield = 0;
/* API Functions */ /* API Functions */
void ata_led(bool onoff) void nand_led(bool onoff)
{ {
led(onoff); led(onoff);
} }
int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int incount, int nand_read_sectors(IF_MV2(int drive,) unsigned long start, int incount,
void* inbuf) void* inbuf)
{ {
} }
int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count,
const void* outbuf) const void* outbuf)
{ {
} }
void ata_spindown(int seconds) void nand_spindown(int seconds)
{ {
(void)seconds; (void)seconds;
} }
bool ata_disk_is_active(void) bool nand_disk_is_active(void)
{ {
return 0; return 0;
} }
void ata_sleep(void) void nand_sleep(void)
{ {
} }
void ata_spin(void) void nand_spin(void)
{ {
} }
/* Hardware reset protocol as specified in chapter 9.1, ATA spec draft v5 */ int nand_soft_reset(void)
int ata_hard_reset(void)
{ {
return 0; return 0;
} }
int ata_soft_reset(void) void nand_enable(bool on)
{
return 0;
}
void ata_enable(bool on)
{ {
} }
int ata_init(void) int nand_init(void)
{ {
} }

View file

@ -367,7 +367,7 @@ static void nand_disable(void)
__nand_disable(); __nand_disable();
} }
int ata_init(void) int nand_init(void)
{ {
unsigned char cData[5]; unsigned char cData[5];
@ -403,7 +403,7 @@ void jz_nand_read(int block, int page, unsigned char *buf)
nand_read_page(block, page, buf); nand_read_page(block, page, buf);
} }
int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf) int nand_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf)
{ {
(void)start; (void)start;
(void)count; (void)count;
@ -411,7 +411,7 @@ int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* bu
return 0; return 0;
} }
int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf) int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf)
{ {
(void)start; (void)start;
(void)count; (void)count;
@ -419,41 +419,35 @@ int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const v
return 0; return 0;
} }
void ata_spindown(int seconds) void nand_spindown(int seconds)
{ {
/* null */ /* null */
(void)seconds; (void)seconds;
} }
bool ata_disk_is_active(void) bool nand_disk_is_active(void)
{ {
/* null */ /* null */
return false; return false;
} }
void ata_sleep(void) void nand_sleep(void)
{ {
/* null */ /* null */
} }
void ata_spin(void) void nand_spin(void)
{ {
/* null */ /* null */
} }
int ata_hard_reset(void) int nand_soft_reset(void)
{ {
/* null */ /* null */
return 0; return 0;
} }
int ata_soft_reset(void) void nand_enable(bool on)
{
/* null */
return 0;
}
void ata_enable(bool on)
{ {
/* null - flash controller is enabled/disabled as needed. */ /* null - flash controller is enabled/disabled as needed. */
(void)on; (void)on;