OVMS3-idf/components/driver
Ivan Grokhotkov 0f238dcdec sdmmc: fix reads/writes to/from unaligned buffers
SDMMC hardware treats all buffers as aligned, and ignores 2 LSBs of
addresses written into DMA descriptors. Previously SDMMC host driver
assumed that data buffers passed from SDDMC command layer would be
aligned. However alignment checks were never implemented in the command
layer, as were the checks that the buffer coming from the application
would be in DMA capable memory. Most of the time this was indeed true.
However in some cases FATFS library can pass buffers offset by 2 bytes
from word boundary. “DMA capable” restriction may be broken if pSRAM
support is used.

This change adds buffer checks to the SDMMC host driver (alignment and
DMA capability), so that the host layer will error out for incompatible
buffers. In SDMMC command layer, a check is added to read and write
functions. If an incompatible buffer is passed from the application, new
buffer (512 bytes size) is allocated, and the transfer is performed
using {READ,WRITE}_SINGLE_BLOCK commands.
2017-09-25 23:45:40 +08:00
..
include/driver sdmmc: fix reads/writes to/from unaligned buffers 2017-09-25 23:45:40 +08:00
test Fix SPI master CI test 2017-04-27 14:50:02 +08:00
component.mk build system: Refactor component.mk to not need component_common.mk 2016-11-10 15:52:22 +11:00
gpio.c components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
i2c.c i2c driver: When deleting, disable interrupts before freeing data structures 2017-06-08 15:57:31 +10:00
i2s.c bugfix(i2s): fix error when changing changel number in i2s_set_clk function 2017-05-23 19:32:10 +08:00
ledc.c Merge branch 'bugfix/github_fixes' into 'master' 2017-04-21 12:27:32 +08:00
mcpwm.c feature: add Motor Control PWM(mcpwm) driver 2017-05-12 15:47:59 +08:00
pcnt.c PCNT: fix for pcnt_set_pin API, it can now use all pcnt channels 2017-06-16 11:18:00 +05:30
periph_ctrl.c component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
rmt.c rmt driver: Manage driver interrupt handler based on which channels are enabled 2017-06-09 16:11:21 +10:00
rtc_module.c driver/rtc: fix copy-paste error in HOLD_FORCE field name for GPIO26 2017-09-25 23:33:35 +08:00
sdmmc_host.c sdmmc: handle card removal when CD is not used 2017-04-19 12:50:51 +08:00
sdmmc_private.h sdmmc: add peripheral driver and protocol layer 2017-01-09 04:51:24 +08:00
sdmmc_transaction.c sdmmc: fix reads/writes to/from unaligned buffers 2017-09-25 23:45:40 +08:00
sigmadelta.c components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
spi_common.c Merge branch 'bugfix/dualcore_dport' into 'master' 2017-05-10 11:27:01 +08:00
spi_master.c Warn against and check for non-DMA-capable pointers being passed to SPI when DMA is used 2017-05-05 12:28:03 +08:00
spi_slave.c Warn against and check for non-DMA-capable pointers being passed to SPI when DMA is used 2017-05-05 12:28:03 +08:00
timer.c components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
uart.c bugfix(uart): fix bugs reported from github 2017-07-04 15:24:02 +08:00