diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/sd.c | 13 | ||||
-rw-r--r-- | firmware/export/mmc.h | 3 | ||||
-rw-r--r-- | firmware/export/nand.h | 3 | ||||
-rw-r--r-- | firmware/export/sd.h | 3 | ||||
-rw-r--r-- | firmware/export/storage.h | 18 | ||||
-rw-r--r-- | firmware/target/arm/ata-nand-telechips.c | 13 | ||||
-rw-r--r-- | firmware/target/arm/s5l8700/ata-nand-s5l8700.c | 23 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c | 28 |
8 files changed, 95 insertions, 9 deletions
diff --git a/firmware/drivers/sd.c b/firmware/drivers/sd.c index fdc05c73b7..4034b9453d 100644 --- a/firmware/drivers/sd.c +++ b/firmware/drivers/sd.c | |||
@@ -66,6 +66,19 @@ void sd_parse_csd(tCardInfo *card) | |||
66 | logf("nsac: %d taac: %d r2w: %d", card->nsac, card->taac, card->r2w_factor); | 66 | logf("nsac: %d taac: %d r2w: %d", card->nsac, card->taac, card->r2w_factor); |
67 | } | 67 | } |
68 | 68 | ||
69 | void sd_sleep(void) | ||
70 | { | ||
71 | } | ||
72 | |||
73 | void sd_spin(void) | ||
74 | { | ||
75 | } | ||
76 | |||
77 | void sd_spindown(int seconds) | ||
78 | { | ||
79 | (void)seconds; | ||
80 | } | ||
81 | |||
69 | #ifdef STORAGE_GET_INFO | 82 | #ifdef STORAGE_GET_INFO |
70 | void sd_get_info(IF_MV2(int drive,) struct storage_info *info) | 83 | void sd_get_info(IF_MV2(int drive,) struct storage_info *info) |
71 | { | 84 | { |
diff --git a/firmware/export/mmc.h b/firmware/export/mmc.h index bd4b7f93ec..06d99d219e 100644 --- a/firmware/export/mmc.h +++ b/firmware/export/mmc.h | |||
@@ -28,6 +28,8 @@ | |||
28 | struct storage_info; | 28 | struct storage_info; |
29 | 29 | ||
30 | void mmc_enable(bool on); | 30 | void mmc_enable(bool on); |
31 | void mmc_spindown(int seconds); | ||
32 | void mmc_sleep(void); | ||
31 | void mmc_sleepnow(void); | 33 | void mmc_sleepnow(void); |
32 | bool mmc_disk_is_active(void); | 34 | bool mmc_disk_is_active(void); |
33 | int mmc_soft_reset(void); | 35 | int mmc_soft_reset(void); |
@@ -35,6 +37,7 @@ int mmc_init(void); | |||
35 | void mmc_close(void); | 37 | void mmc_close(void); |
36 | int mmc_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); | 38 | int mmc_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); |
37 | int mmc_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); | 39 | int mmc_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); |
40 | void mmc_spin(void); | ||
38 | int mmc_spinup_time(void); | 41 | int mmc_spinup_time(void); |
39 | 42 | ||
40 | #ifdef STORAGE_GET_INFO | 43 | #ifdef STORAGE_GET_INFO |
diff --git a/firmware/export/nand.h b/firmware/export/nand.h index 64416b9de5..a5b0a1ceee 100644 --- a/firmware/export/nand.h +++ b/firmware/export/nand.h | |||
@@ -28,12 +28,15 @@ | |||
28 | struct storage_info; | 28 | struct storage_info; |
29 | 29 | ||
30 | void nand_enable(bool on); | 30 | void nand_enable(bool on); |
31 | void nand_spindown(int seconds); | ||
32 | void nand_sleep(void); | ||
31 | bool nand_disk_is_active(void); | 33 | bool nand_disk_is_active(void); |
32 | int nand_soft_reset(void); | 34 | int nand_soft_reset(void); |
33 | int nand_init(void); | 35 | int nand_init(void); |
34 | void nand_close(void); | 36 | void nand_close(void); |
35 | int nand_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); | 37 | int nand_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); |
36 | int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); | 38 | int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); |
39 | void nand_spin(void); | ||
37 | 40 | ||
38 | #ifdef STORAGE_GET_INFO | 41 | #ifdef STORAGE_GET_INFO |
39 | void nand_get_info(IF_MV2(int drive,) struct storage_info *info); | 42 | void nand_get_info(IF_MV2(int drive,) struct storage_info *info); |
diff --git a/firmware/export/sd.h b/firmware/export/sd.h index f100f3025f..d313a4c2e1 100644 --- a/firmware/export/sd.h +++ b/firmware/export/sd.h | |||
@@ -30,12 +30,15 @@ | |||
30 | struct storage_info; | 30 | struct storage_info; |
31 | 31 | ||
32 | void sd_enable(bool on); | 32 | void sd_enable(bool on); |
33 | void sd_spindown(int seconds); | ||
34 | void sd_sleep(void); | ||
33 | bool sd_disk_is_active(void); | 35 | bool sd_disk_is_active(void); |
34 | int sd_soft_reset(void); | 36 | int sd_soft_reset(void); |
35 | int sd_init(void); | 37 | int sd_init(void); |
36 | void sd_close(void); | 38 | void sd_close(void); |
37 | int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); | 39 | int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); |
38 | int sd_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); | 40 | int sd_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); |
41 | void sd_spin(void); | ||
39 | 42 | ||
40 | #ifdef STORAGE_GET_INFO | 43 | #ifdef STORAGE_GET_INFO |
41 | void sd_get_info(IF_MV2(int drive,) struct storage_info *info); | 44 | void sd_get_info(IF_MV2(int drive,) struct storage_info *info); |
diff --git a/firmware/export/storage.h b/firmware/export/storage.h index 73ec970635..47d8abda52 100644 --- a/firmware/export/storage.h +++ b/firmware/export/storage.h | |||
@@ -81,9 +81,9 @@ struct storage_info | |||
81 | #define storage_present(drive) ata_present(IF_MV(drive)) | 81 | #define storage_present(drive) ata_present(IF_MV(drive)) |
82 | #endif | 82 | #endif |
83 | #elif (CONFIG_STORAGE & STORAGE_SD) | 83 | #elif (CONFIG_STORAGE & STORAGE_SD) |
84 | #define storage_spindown(seconds) (void)0 | 84 | #define storage_spindown sd_spindown |
85 | #define storage_sleep() (void)0 | 85 | #define storage_sleep sd_sleep |
86 | #define storage_spin() (void)0 | 86 | #define storage_spin sd_spin |
87 | 87 | ||
88 | #define storage_enable(on) sd_enable(on) | 88 | #define storage_enable(on) sd_enable(on) |
89 | #define storage_sleepnow() sd_sleepnow() | 89 | #define storage_sleepnow() sd_sleepnow() |
@@ -105,9 +105,9 @@ struct storage_info | |||
105 | #define storage_present(drive) sd_present(IF_MV(drive)) | 105 | #define storage_present(drive) sd_present(IF_MV(drive)) |
106 | #endif | 106 | #endif |
107 | #elif (CONFIG_STORAGE & STORAGE_MMC) | 107 | #elif (CONFIG_STORAGE & STORAGE_MMC) |
108 | #define storage_spindown(seconds) (void)0 | 108 | #define storage_spindown mmc_spindown |
109 | #define storage_sleep() (void)0 | 109 | #define storage_sleep mmc_sleep |
110 | #define storage_spin() (void)0 | 110 | #define storage_spin mmc_spin |
111 | 111 | ||
112 | #define storage_enable(on) mmc_enable(on) | 112 | #define storage_enable(on) mmc_enable(on) |
113 | #define storage_sleepnow() mmc_sleepnow() | 113 | #define storage_sleepnow() mmc_sleepnow() |
@@ -129,9 +129,9 @@ struct storage_info | |||
129 | #define storage_present(drive) mmc_present(IF_MV(drive)) | 129 | #define storage_present(drive) mmc_present(IF_MV(drive)) |
130 | #endif | 130 | #endif |
131 | #elif (CONFIG_STORAGE & STORAGE_NAND) | 131 | #elif (CONFIG_STORAGE & STORAGE_NAND) |
132 | #define storage_spindown(seconds) (void)0 | 132 | #define storage_spindown nand_spindown |
133 | #define storage_sleep() (void)0 | 133 | #define storage_sleep nand_sleep |
134 | #define storage_spin() (void)0 | 134 | #define storage_spin nand_spin |
135 | 135 | ||
136 | #define storage_enable(on) (void)0 | 136 | #define storage_enable(on) (void)0 |
137 | #define storage_sleepnow() nand_sleepnow() | 137 | #define storage_sleepnow() nand_sleepnow() |
diff --git a/firmware/target/arm/ata-nand-telechips.c b/firmware/target/arm/ata-nand-telechips.c index 698f2b9d42..8bef57ee21 100644 --- a/firmware/target/arm/ata-nand-telechips.c +++ b/firmware/target/arm/ata-nand-telechips.c | |||
@@ -900,3 +900,16 @@ long nand_last_disk_activity(void) | |||
900 | { | 900 | { |
901 | return last_disk_activity; | 901 | return last_disk_activity; |
902 | } | 902 | } |
903 | |||
904 | void nand_sleep(void) | ||
905 | { | ||
906 | } | ||
907 | |||
908 | void nand_spin(void) | ||
909 | { | ||
910 | } | ||
911 | |||
912 | void nand_spindown(int seconds) | ||
913 | { | ||
914 | (void)seconds; | ||
915 | } | ||
diff --git a/firmware/target/arm/s5l8700/ata-nand-s5l8700.c b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c index 183ef18f40..ee1e581270 100644 --- a/firmware/target/arm/s5l8700/ata-nand-s5l8700.c +++ b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c | |||
@@ -64,6 +64,29 @@ int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count, | |||
64 | return 0; | 64 | return 0; |
65 | } | 65 | } |
66 | 66 | ||
67 | void nand_spindown(int seconds) | ||
68 | { | ||
69 | (void)seconds; | ||
70 | } | ||
71 | |||
72 | bool nand_disk_is_active(void) | ||
73 | { | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | void nand_sleep(void) | ||
78 | { | ||
79 | } | ||
80 | |||
81 | void nand_spin(void) | ||
82 | { | ||
83 | } | ||
84 | |||
85 | int nand_soft_reset(void) | ||
86 | { | ||
87 | return 0; | ||
88 | } | ||
89 | |||
67 | void nand_enable(bool on) | 90 | void nand_enable(bool on) |
68 | { | 91 | { |
69 | (void)on; | 92 | (void)on; |
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c index 28325033b0..d9189280e8 100644 --- a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c | |||
@@ -685,6 +685,34 @@ int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const | |||
685 | return -1; | 685 | return -1; |
686 | } | 686 | } |
687 | 687 | ||
688 | void nand_spindown(int seconds) | ||
689 | { | ||
690 | /* null */ | ||
691 | (void)seconds; | ||
692 | } | ||
693 | |||
694 | bool nand_disk_is_active(void) | ||
695 | { | ||
696 | /* null */ | ||
697 | return false; | ||
698 | } | ||
699 | |||
700 | void nand_sleep(void) | ||
701 | { | ||
702 | /* null */ | ||
703 | } | ||
704 | |||
705 | void nand_spin(void) | ||
706 | { | ||
707 | /* null */ | ||
708 | } | ||
709 | |||
710 | int nand_soft_reset(void) | ||
711 | { | ||
712 | /* null */ | ||
713 | return 0; | ||
714 | } | ||
715 | |||
688 | void nand_enable(bool on) | 716 | void nand_enable(bool on) |
689 | { | 717 | { |
690 | /* null - flash controller is enabled/disabled as needed. */ | 718 | /* null - flash controller is enabled/disabled as needed. */ |