summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8700
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s5l8700')
-rw-r--r--firmware/target/arm/s5l8700/ata-nand-s5l8700.c8
-rw-r--r--firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c15
2 files changed, 14 insertions, 9 deletions
diff --git a/firmware/target/arm/s5l8700/ata-nand-s5l8700.c b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c
index 7f68b82a0d..34a1c46043 100644
--- a/firmware/target/arm/s5l8700/ata-nand-s5l8700.c
+++ b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c
@@ -29,17 +29,17 @@
29#include "ftl-target.h" 29#include "ftl-target.h"
30#include "nand-target.h" 30#include "nand-target.h"
31 31
32/** static, private data **/ 32/** static, private data **/
33static bool initialized = false; 33static bool initialized = false;
34 34
35/* API Functions */ 35/* API Functions */
36int nand_read_sectors(IF_MD(int drive,) unsigned long start, int incount, 36int nand_read_sectors(IF_MD(int drive,) sector_t start, int incount,
37 void* inbuf) 37 void* inbuf)
38{ 38{
39 return ftl_read(start, incount, inbuf); 39 return ftl_read(start, incount, inbuf);
40} 40}
41 41
42int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, 42int nand_write_sectors(IF_MD(int drive,) sector_t start, int count,
43 const void* outbuf) 43 const void* outbuf)
44{ 44{
45 return ftl_write(start, count, outbuf); 45 return ftl_write(start, count, outbuf);
@@ -106,7 +106,7 @@ int nand_num_drives(int first_drive)
106{ 106{
107 /* We don't care which logical drive number(s) we have been assigned */ 107 /* We don't care which logical drive number(s) we have been assigned */
108 (void)first_drive; 108 (void)first_drive;
109 109
110 return 1; 110 return 1;
111} 111}
112#endif 112#endif
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
index 0d831a7167..7071d411b5 100644
--- a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
+++ b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
@@ -186,7 +186,6 @@ struct ftl_cxt_type
186 There is one of these per bank. */ 186 There is one of these per bank. */
187struct ftl_vfl_cxt_type 187struct ftl_vfl_cxt_type
188{ 188{
189
190 /* Cross-bank update sequence number, incremented on every VFL 189 /* Cross-bank update sequence number, incremented on every VFL
191 context commit on any bank. */ 190 context commit on any bank. */
192 uint32_t usn; 191 uint32_t usn;
@@ -525,18 +524,24 @@ static uint32_t ftl_vfl_verify_checksum(uint32_t bank)
525 return 1; 524 return 1;
526} 525}
527 526
528
529#ifndef FTL_READONLY 527#ifndef FTL_READONLY
528
529#if __GNUC__ >= 9
530#pragma GCC diagnostic push
531#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
532#endif
533
530/* Updates the checksums of the VFL context of the specified bank */ 534/* Updates the checksums of the VFL context of the specified bank */
531static void ftl_vfl_update_checksum(uint32_t bank) 535static void ftl_vfl_update_checksum(uint32_t bank)
532{ 536{
533 ftl_vfl_calculate_checksum(bank, &ftl_vfl_cxt[bank].checksum1, 537 ftl_vfl_calculate_checksum(bank, &ftl_vfl_cxt[bank].checksum1,
534 &ftl_vfl_cxt[bank].checksum2); 538 &ftl_vfl_cxt[bank].checksum2);
535} 539}
536#endif
537 540
541#if __GNUC__ >= 9
542#pragma GCC diagnostic pop
543#endif
538 544
539#ifndef FTL_READONLY
540/* Writes 8 copies of the VFL context of the specified bank to flash, 545/* Writes 8 copies of the VFL context of the specified bank to flash,
541 and succeeds if at least 4 can be read back properly. */ 546 and succeeds if at least 4 can be read back properly. */
542static uint32_t ftl_vfl_store_cxt(uint32_t bank) 547static uint32_t ftl_vfl_store_cxt(uint32_t bank)
@@ -2107,7 +2112,7 @@ uint32_t ftl_sync(void)
2107 if (ftl_cxt.clean_flag == 1) return 0; 2112 if (ftl_cxt.clean_flag == 1) return 0;
2108 2113
2109 mutex_lock(&ftl_mtx); 2114 mutex_lock(&ftl_mtx);
2110 2115
2111#ifdef FTL_TRACE 2116#ifdef FTL_TRACE
2112 DEBUGF("FTL: Syncing\n"); 2117 DEBUGF("FTL: Syncing\n");
2113#endif 2118#endif