summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-11-04 19:36:17 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-11-04 19:36:17 +0000
commit147a23a6ed370278d6ebfe9912545fe7d10f7389 (patch)
tree2eaa044f70aabb0a44ee96e7e623bdf4a8bf7123 /firmware
parentc6ccf7586931f175c73b23b04d84c4b1588c6c02 (diff)
downloadrockbox-147a23a6ed370278d6ebfe9912545fe7d10f7389.tar.gz
rockbox-147a23a6ed370278d6ebfe9912545fe7d10f7389.zip
More storage work.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19003 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/s5l8700/ata-nand-s5l8700.c30
-rw-r--r--firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c24
2 files changed, 21 insertions, 33 deletions
diff --git a/firmware/target/arm/s5l8700/ata-nand-s5l8700.c b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c
index 428836c050..4d42a63d9b 100644
--- a/firmware/target/arm/s5l8700/ata-nand-s5l8700.c
+++ b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c
@@ -20,7 +20,7 @@
20 ****************************************************************************/ 20 ****************************************************************************/
21#include "ata.h" 21#include "ata.h"
22#include "ata-target.h" 22#include "ata-target.h"
23#include "ata_idle_notify.h" 23#include "nand_idle_notify.h"
24#include "system.h" 24#include "system.h"
25#include <string.h> 25#include <string.h>
26#include "thread.h" 26#include "thread.h"
@@ -30,7 +30,7 @@
30#include "usb.h" 30#include "usb.h"
31 31
32/* for compatibility */ 32/* for compatibility */
33int ata_spinup_time = 0; 33int nand_spinup_time = 0;
34 34
35long last_disk_activity = -1; 35long last_disk_activity = -1;
36 36
@@ -42,55 +42,49 @@ static long next_yield = 0;
42 42
43/* API Functions */ 43/* API Functions */
44 44
45void ata_led(bool onoff) 45void nand_led(bool onoff)
46{ 46{
47 led(onoff); 47 led(onoff);
48} 48}
49 49
50int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int incount, 50int nand_read_sectors(IF_MV2(int drive,) unsigned long start, int incount,
51 void* inbuf) 51 void* inbuf)
52{ 52{
53 53
54} 54}
55 55
56int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, 56int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count,
57 const void* outbuf) 57 const void* outbuf)
58{ 58{
59} 59}
60 60
61void ata_spindown(int seconds) 61void nand_spindown(int seconds)
62{ 62{
63 (void)seconds; 63 (void)seconds;
64} 64}
65 65
66bool ata_disk_is_active(void) 66bool nand_disk_is_active(void)
67{ 67{
68 return 0; 68 return 0;
69} 69}
70 70
71void ata_sleep(void) 71void nand_sleep(void)
72{ 72{
73} 73}
74 74
75void ata_spin(void) 75void nand_spin(void)
76{ 76{
77} 77}
78 78
79/* Hardware reset protocol as specified in chapter 9.1, ATA spec draft v5 */ 79int nand_soft_reset(void)
80int ata_hard_reset(void)
81{ 80{
82 return 0; 81 return 0;
83} 82}
84 83
85int ata_soft_reset(void) 84void nand_enable(bool on)
86{
87 return 0;
88}
89
90void ata_enable(bool on)
91{ 85{
92} 86}
93 87
94int ata_init(void) 88int nand_init(void)
95{ 89{
96} 90}
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c
index 134d6d7be2..a41a62294a 100644
--- a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c
@@ -367,7 +367,7 @@ static void nand_disable(void)
367 __nand_disable(); 367 __nand_disable();
368} 368}
369 369
370int ata_init(void) 370int nand_init(void)
371{ 371{
372 unsigned char cData[5]; 372 unsigned char cData[5];
373 373
@@ -403,7 +403,7 @@ void jz_nand_read(int block, int page, unsigned char *buf)
403 nand_read_page(block, page, buf); 403 nand_read_page(block, page, buf);
404} 404}
405 405
406int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf) 406int nand_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf)
407{ 407{
408 (void)start; 408 (void)start;
409 (void)count; 409 (void)count;
@@ -411,7 +411,7 @@ int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* bu
411 return 0; 411 return 0;
412} 412}
413 413
414int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf) 414int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf)
415{ 415{
416 (void)start; 416 (void)start;
417 (void)count; 417 (void)count;
@@ -419,41 +419,35 @@ int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const v
419 return 0; 419 return 0;
420} 420}
421 421
422void ata_spindown(int seconds) 422void nand_spindown(int seconds)
423{ 423{
424 /* null */ 424 /* null */
425 (void)seconds; 425 (void)seconds;
426} 426}
427 427
428bool ata_disk_is_active(void) 428bool nand_disk_is_active(void)
429{ 429{
430 /* null */ 430 /* null */
431 return false; 431 return false;
432} 432}
433 433
434void ata_sleep(void) 434void nand_sleep(void)
435{ 435{
436 /* null */ 436 /* null */
437} 437}
438 438
439void ata_spin(void) 439void nand_spin(void)
440{ 440{
441 /* null */ 441 /* null */
442} 442}
443 443
444int ata_hard_reset(void) 444int nand_soft_reset(void)
445{ 445{
446 /* null */ 446 /* null */
447 return 0; 447 return 0;
448} 448}
449 449
450int ata_soft_reset(void) 450void nand_enable(bool on)
451{
452 /* null */
453 return 0;
454}
455
456void ata_enable(bool on)
457{ 451{
458 /* null - flash controller is enabled/disabled as needed. */ 452 /* null - flash controller is enabled/disabled as needed. */
459 (void)on; 453 (void)on;