mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
ata: Ensure that the bounce buffer is minimum 32-bit aligned
Basically, if STORAGE_ALIGN_ATTR isn't defined, define it to be sizeof(uint32_t) in the ATA code. Change-Id: I13de61788cb71e3e8d3a956ab5f2e251471ce76d
This commit is contained in:
parent
d36ef610c2
commit
120906dc8b
3 changed files with 9 additions and 3 deletions
|
|
@ -203,9 +203,6 @@
|
|||
/* define this if we want to support 512n and 4Kn drives */
|
||||
//#define MAX_VARIABLE_LOG_SECTOR 4096
|
||||
|
||||
//#define STORAGE_NEEDS_BOUNCE_BUFFER
|
||||
#define STORAGE_WANTS_ALIGN
|
||||
|
||||
#define HAVE_HARDWARE_CLICK
|
||||
|
||||
/* Define this if you have adjustable CPU frequency */
|
||||
|
|
|
|||
|
|
@ -335,6 +335,11 @@ static inline void cpu_boost_unlock(void)
|
|||
#define MEM_ALIGN_DOWN(x) \
|
||||
((typeof (x))ALIGN_DOWN((uintptr_t)(x), MEM_ALIGN_SIZE))
|
||||
|
||||
/* Bounce buffers may have alignment requirments */
|
||||
#if defined(MAX_PHYS_SECTOR_SIZE) && !defined(STORAGE_WANTS_ALIGN)
|
||||
#define STORAGE_WANTS_ALIGN
|
||||
#endif
|
||||
|
||||
#ifdef STORAGE_WANTS_ALIGN
|
||||
#define STORAGE_ALIGN_ATTR __attribute__((aligned(CACHEALIGN_SIZE)))
|
||||
#define STORAGE_ALIGN_DOWN(x) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue