summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2017-03-12 22:05:44 -0400
committerMichael Sevakis <jethead71@rockbox.org>2017-03-12 22:05:44 -0400
commit6db80020b45ae22b19524b01f60d0653d70ac7ca (patch)
tree924a9944abe38e094cdbc4b70d0489ed6bc162ce /firmware/target
parent70c929179b80e0657e31558e34d2bc62e1176564 (diff)
downloadrockbox-6db80020b45ae22b19524b01f60d0653d70ac7ca.tar.gz
rockbox-6db80020b45ae22b19524b01f60d0653d70ac7ca.zip
Do some housekeeping with fat.h and SECTOR_SIZE
Many includes of fat.h are pointless. Some includes are just for SECTOR_SIZE. Add a file 'firmware/include/fs_defines.h' for that and to define tuneable values that were scattered amongst various headers. Remove some local definitions of SECTOR_SIZE since they have to be in agreement with the rest of the fs code anyway. (We'll see what's in fact pointless in a moment ;) Change-Id: I9ba183bf58bd87f5c45eba7bd675c7e2c1c18ed5
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/as3525/sd-as3525.c2
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c2
-rw-r--r--firmware/target/arm/ata-nand-telechips.c3
-rw-r--r--firmware/target/arm/imx233/nand-imx233.c2
-rw-r--r--firmware/target/arm/imx233/sdmmc-imx233.c1
-rw-r--r--firmware/target/arm/pnx0101/iriver-ifp7xx/usb-ifp7xx.c1
-rw-r--r--firmware/target/arm/pp/ata-sd-pp.c2
-rw-r--r--firmware/target/arm/tms320dm320/sdmmc-dm320.c2
8 files changed, 5 insertions, 10 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c
index 4530d5d763..e65a7525b6 100644
--- a/firmware/target/arm/as3525/sd-as3525.c
+++ b/firmware/target/arm/as3525/sd-as3525.c
@@ -23,7 +23,7 @@
23/* Driver for the ARM PL180 SD/MMC controller inside AS3525 SoC */ 23/* Driver for the ARM PL180 SD/MMC controller inside AS3525 SoC */
24 24
25#include "config.h" /* for HAVE_MULTIDRIVE & AMS_OF_SIZE */ 25#include "config.h" /* for HAVE_MULTIDRIVE & AMS_OF_SIZE */
26#include "fat.h" 26#include "fs_defines.h"
27#include "thread.h" 27#include "thread.h"
28#include "led.h" 28#include "led.h"
29#include "sdmmc.h" 29#include "sdmmc.h"
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index dec36a520d..3f39629e0b 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -21,7 +21,7 @@
21 ****************************************************************************/ 21 ****************************************************************************/
22 22
23#include "config.h" /* for HAVE_MULTIVOLUME */ 23#include "config.h" /* for HAVE_MULTIVOLUME */
24#include "fat.h" 24#include "fs_defines.h"
25#include "thread.h" 25#include "thread.h"
26#include "gcc_extensions.h" 26#include "gcc_extensions.h"
27#include "led.h" 27#include "led.h"
diff --git a/firmware/target/arm/ata-nand-telechips.c b/firmware/target/arm/ata-nand-telechips.c
index b8e572068c..869a53c1ef 100644
--- a/firmware/target/arm/ata-nand-telechips.c
+++ b/firmware/target/arm/ata-nand-telechips.c
@@ -28,8 +28,7 @@
28#include "panic.h" 28#include "panic.h"
29#include "nand_id.h" 29#include "nand_id.h"
30#include "storage.h" 30#include "storage.h"
31 31#include "fs_defines.h"
32#define SECTOR_SIZE 512
33 32
34/* ECC on read is implemented on the assumption that MLC-style 4-bit correction 33/* ECC on read is implemented on the assumption that MLC-style 4-bit correction
35 is always used regardless of NAND chip type. This assumption is true for at 34 is always used regardless of NAND chip type. This assumption is true for at
diff --git a/firmware/target/arm/imx233/nand-imx233.c b/firmware/target/arm/imx233/nand-imx233.c
index 22c4fc2748..a7afba7d43 100644
--- a/firmware/target/arm/imx233/nand-imx233.c
+++ b/firmware/target/arm/imx233/nand-imx233.c
@@ -23,7 +23,7 @@
23#include "gpmi-imx233.h" 23#include "gpmi-imx233.h"
24#include "pinctrl-imx233.h" 24#include "pinctrl-imx233.h"
25#include "button-target.h" 25#include "button-target.h"
26#include "fat.h" 26#include "fs_defines.h"
27#include "disk.h" 27#include "disk.h"
28#include "usb.h" 28#include "usb.h"
29#include "debug.h" 29#include "debug.h"
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c
index 28310fbfd1..d3dabafecb 100644
--- a/firmware/target/arm/imx233/sdmmc-imx233.c
+++ b/firmware/target/arm/imx233/sdmmc-imx233.c
@@ -27,7 +27,6 @@
27#include "pinctrl-imx233.h" 27#include "pinctrl-imx233.h"
28#include "partitions-imx233.h" 28#include "partitions-imx233.h"
29#include "button-target.h" 29#include "button-target.h"
30#include "fat.h"
31#include "disk.h" 30#include "disk.h"
32#include "usb.h" 31#include "usb.h"
33#include "debug.h" 32#include "debug.h"
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/usb-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/usb-ifp7xx.c
index 2f3c4189e5..0bfcdf3b1a 100644
--- a/firmware/target/arm/pnx0101/iriver-ifp7xx/usb-ifp7xx.c
+++ b/firmware/target/arm/pnx0101/iriver-ifp7xx/usb-ifp7xx.c
@@ -25,7 +25,6 @@
25#include "system.h" 25#include "system.h"
26#include "debug.h" 26#include "debug.h"
27#include "ata.h" 27#include "ata.h"
28#include "fat.h"
29#include "disk.h" 28#include "disk.h"
30#include "panic.h" 29#include "panic.h"
31#include "lcd.h" 30#include "lcd.h"
diff --git a/firmware/target/arm/pp/ata-sd-pp.c b/firmware/target/arm/pp/ata-sd-pp.c
index 2a11b40fee..edb806ab96 100644
--- a/firmware/target/arm/pp/ata-sd-pp.c
+++ b/firmware/target/arm/pp/ata-sd-pp.c
@@ -35,8 +35,8 @@
35#include "usb.h" 35#include "usb.h"
36#include "sd.h" 36#include "sd.h"
37#include "storage.h" 37#include "storage.h"
38#include "fs_defines.h"
38 39
39#define SECTOR_SIZE 512
40#define BLOCKS_PER_BANK 0x7a7800 40#define BLOCKS_PER_BANK 0x7a7800
41 41
42/* Comparing documentations of various MMC/SD controllers revealed, */ 42/* Comparing documentations of various MMC/SD controllers revealed, */
diff --git a/firmware/target/arm/tms320dm320/sdmmc-dm320.c b/firmware/target/arm/tms320dm320/sdmmc-dm320.c
index d46dbf5e40..a6e261bcfa 100644
--- a/firmware/target/arm/tms320dm320/sdmmc-dm320.c
+++ b/firmware/target/arm/tms320dm320/sdmmc-dm320.c
@@ -43,7 +43,6 @@
43#endif 43#endif
44#include "sdmmc.h" 44#include "sdmmc.h"
45#include "disk.h" 45#include "disk.h"
46#include "fat.h"
47#include "system-target.h" 46#include "system-target.h"
48 47
49/* The configuration method is not very flexible. */ 48/* The configuration method is not very flexible. */
@@ -72,7 +71,6 @@
72#define UNALIGNED_NUM_SECTORS 10 71#define UNALIGNED_NUM_SECTORS 10
73#define MAX_TRANSFER_ERRORS 10 72#define MAX_TRANSFER_ERRORS 10
74 73
75#define SECTOR_SIZE 512
76#define BLOCKS_PER_BANK 0x7A7800 74#define BLOCKS_PER_BANK 0x7A7800
77 75
78/* command flags for send_cmd */ 76/* command flags for send_cmd */