From 6db80020b45ae22b19524b01f60d0653d70ac7ca Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 12 Mar 2017 22:05:44 -0400 Subject: 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 --- firmware/include/disk_cache.h | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'firmware/include/disk_cache.h') diff --git a/firmware/include/disk_cache.h b/firmware/include/disk_cache.h index 725b3778cc..79b2ccf2c6 100644 --- a/firmware/include/disk_cache.h +++ b/firmware/include/disk_cache.h @@ -21,29 +21,6 @@ #ifndef DISK_CACHE_H #define DISK_CACHE_H -/* This needs enough for all file handles to have a buffer in the worst case - * plus at least one reserved exclusively for the cache client and a couple - * for other file system code. The buffers are put to use by the cache if not - * taken for another purpose (meaning nothing is wasted sitting fallow). - * - * One map per volume is maintained in order to avoid collisions between - * volumes that would slow cache probing. DC_MAP_NUM_ENTRIES is the number - * for each map per volume. The buffers themselves are shared. - */ -#if MEMORYSIZE < 8 -#define DC_NUM_ENTRIES 32 -#define DC_MAP_NUM_ENTRIES 128 -#elif MEMORYSIZE <= 32 -#define DC_NUM_ENTRIES 48 -#define DC_MAP_NUM_ENTRIES 128 -#else /* MEMORYSIZE > 32 */ -#define DC_NUM_ENTRIES 64 -#define DC_MAP_NUM_ENTRIES 256 -#endif /* MEMORYSIZE */ - -/* this _could_ be larger than a sector if that would ever be useful */ -#define DC_CACHE_BUFSIZE SECTOR_SIZE - #include "mutex.h" #include "mv.h" -- cgit v1.2.3