summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ata-nand-telechips.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/ata-nand-telechips.c')
-rw-r--r--firmware/target/arm/ata-nand-telechips.c51
1 files changed, 45 insertions, 6 deletions
diff --git a/firmware/target/arm/ata-nand-telechips.c b/firmware/target/arm/ata-nand-telechips.c
index 8bef57ee21..ffe6de897e 100644
--- a/firmware/target/arm/ata-nand-telechips.c
+++ b/firmware/target/arm/ata-nand-telechips.c
@@ -696,10 +696,10 @@ static void read_inplace_writes_cache(int bank, int phys_segment)
696} 696}
697 697
698 698
699int nand_read_sectors(IF_MV2(int drive,) unsigned long start, int incount, 699int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int incount,
700 void* inbuf) 700 void* inbuf)
701{ 701{
702#ifdef HAVE_MULTIVOLUME 702#ifdef HAVE_MULTIDRIVE
703 (void)drive; /* unused for now */ 703 (void)drive; /* unused for now */
704#endif 704#endif
705 705
@@ -753,11 +753,10 @@ nand_read_error:
753 return ret; 753 return ret;
754} 754}
755 755
756 756int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count,
757int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count,
758 const void* outbuf) 757 const void* outbuf)
759{ 758{
760#ifdef HAVE_MULTIVOLUME 759#ifdef HAVE_MULTIDRIVE
761 (void)drive; /* unused for now */ 760 (void)drive; /* unused for now */
762#endif 761#endif
763 762
@@ -770,8 +769,12 @@ int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count,
770 769
771 770
772#ifdef STORAGE_GET_INFO 771#ifdef STORAGE_GET_INFO
773void nand_get_info(struct storage_info *info) 772void nand_get_info(IF_MD2(int drive,) struct storage_info *info)
774{ 773{
774#ifdef HAVE_MULTIDRIVE
775 (void)drive; /* unused for now */
776#endif
777
775 /* firmware version */ 778 /* firmware version */
776 info->revision="0.00"; 779 info->revision="0.00";
777 780
@@ -913,3 +916,39 @@ void nand_spindown(int seconds)
913{ 916{
914 (void)seconds; 917 (void)seconds;
915} 918}
919
920#ifdef CONFIG_STORAGE_MULTI
921
922int nand_num_drives(int first_drive)
923{
924 /* We don't care which logical drive number we have been assigned */
925 (void)first_drive;
926
927 return 1;
928}
929
930void nand_sleepnow(void)
931{
932}
933
934bool nand_disk_is_active(void)
935{
936 return false;
937}
938
939int nand_soft_reset(void)
940{
941 return 0;
942}
943
944int nand_spinup_time(void)
945{
946 return 0;
947}
948
949void nand_enable(bool onoff)
950{
951 (void)onoff;
952}
953
954#endif /* CONFIG_STORAGE_MULTI */