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
This commit is contained in:
Michael Sevakis 2017-03-12 22:05:44 -04:00
parent 70c929179b
commit 6db80020b4
29 changed files with 118 additions and 105 deletions

View file

@ -23,7 +23,7 @@
/* Driver for the ARM PL180 SD/MMC controller inside AS3525 SoC */
#include "config.h" /* for HAVE_MULTIDRIVE & AMS_OF_SIZE */
#include "fat.h"
#include "fs_defines.h"
#include "thread.h"
#include "led.h"
#include "sdmmc.h"

View file

@ -21,7 +21,7 @@
****************************************************************************/
#include "config.h" /* for HAVE_MULTIVOLUME */
#include "fat.h"
#include "fs_defines.h"
#include "thread.h"
#include "gcc_extensions.h"
#include "led.h"

View file

@ -28,8 +28,7 @@
#include "panic.h"
#include "nand_id.h"
#include "storage.h"
#define SECTOR_SIZE 512
#include "fs_defines.h"
/* ECC on read is implemented on the assumption that MLC-style 4-bit correction
is always used regardless of NAND chip type. This assumption is true for at

View file

@ -23,7 +23,7 @@
#include "gpmi-imx233.h"
#include "pinctrl-imx233.h"
#include "button-target.h"
#include "fat.h"
#include "fs_defines.h"
#include "disk.h"
#include "usb.h"
#include "debug.h"

View file

@ -27,7 +27,6 @@
#include "pinctrl-imx233.h"
#include "partitions-imx233.h"
#include "button-target.h"
#include "fat.h"
#include "disk.h"
#include "usb.h"
#include "debug.h"

View file

@ -25,7 +25,6 @@
#include "system.h"
#include "debug.h"
#include "ata.h"
#include "fat.h"
#include "disk.h"
#include "panic.h"
#include "lcd.h"

View file

@ -35,8 +35,8 @@
#include "usb.h"
#include "sd.h"
#include "storage.h"
#include "fs_defines.h"
#define SECTOR_SIZE 512
#define BLOCKS_PER_BANK 0x7a7800
/* Comparing documentations of various MMC/SD controllers revealed, */

View file

@ -43,7 +43,6 @@
#endif
#include "sdmmc.h"
#include "disk.h"
#include "fat.h"
#include "system-target.h"
/* The configuration method is not very flexible. */
@ -72,7 +71,6 @@
#define UNALIGNED_NUM_SECTORS 10
#define MAX_TRANSFER_ERRORS 10
#define SECTOR_SIZE 512
#define BLOCKS_PER_BANK 0x7A7800
/* command flags for send_cmd */