Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.
My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
diff --git a/firmware/export/config.h b/firmware/export/config.h index e678590..121836b 100644 Lyre prototype 1 */ /* Storage alignment: the mask specifies a mask of bits which should be * clear in addresses used for storage_{read,write}_sectors(). This is * only relevant for buffers that will contain one or more whole sectors. - */ - -/* PP502x DMA requires an alignment of at least 16 bytes */ -#ifdef HAVE_ATA_DMA -#ifdef CPU_PP502x -#define STORAGE_ALIGN_MASK 15 -#endif -#endif /* HAVE_ATA_DMA */ - -/* by default no alignment is required */ -#ifndef STORAGE_ALIGN_MASK + */ +#ifdef NEEDS_STORAGE_ALIGN +#define STORAGE_ALIGN_MASK ((1 << CACHEALIGN_BITS) - 1) +#else #define STORAGE_ALIGN_MASK 0 #endif diff --git a/firmware/export/config/ipodnano2g.h b/firmware/export/config/ipodnano2g.h index 0b69041..989d563 100644 //#define IPOD_ACCESSORY_PROTOCOL //#define HAVE_SERIAL -#define STORAGE_ALIGN_MASK 15 #define USB_WRITE_BUFFER_SIZE (1024*64) diff --git a/firmware/target/arm/s5l8700/system-target.h b/firmware/target/arm/s5l8700/system-target.h index 81e5c7f..c531344 100644 #define CPUFREQ_NORMAL 47923200 #define CPUFREQ_MAX 191692800 +/* DMA engine needs aligned addresses */ +#define PROC_NEEDS_CACHEALIGN +#define CACHEALIGN_BITS (4) /* 2^4 = 16 bytes */ +#define NEEDS_STORAGE_ALIGN + #define inl(a) (*(volatile unsigned long *) (a)) #define outl(a,b) (*(volatile unsigned long *) (b) = (a)) #define inb(a) (*(volatile unsigned char *) (a)) diff --git a/firmware/target/arm/system-target.h b/firmware/target/arm/system-target.h index 764cd18..1422e64 100644 #ifndef SYSTEM_TARGET_H #define SYSTEM_TARGET_H +#include "config.h" #include "system-arm.h" #ifdef CPU_PP static inline void wake_core(int core) #define PROC_NEEDS_CACHEALIGN #define CACHEALIGN_BITS (4) /* 2^4 = 16 bytes */ +#if defined(CPU_PP502x) && defined(HAVE_ATA_DMA) +#define NEEDS_STORAGE_ALIGN +#endif + /** cache functions **/ #ifndef BOOTLOADER #define HAVE_CPUCACHE_INVALIDATE |