OVMS3-idf/components/driver
Ivan Grokhotkov 512898edee 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-08-01 03:15:11 +08:00
..
include/driver sdmmc: fix reads/writes to/from unaligned buffers 2017-08-01 03:15:11 +08:00
test fix(spi_master): fix the bug that VSPI no respond when host changed 2017-07-21 14:50:17 +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 gpio driver: Clear GPIO matrix output config when setting pin as input 2017-06-26 12:47:08 +10:00
i2c.c i2c driver: When deleting, disable interrupts before freeing data structures 2017-06-08 15:57:31 +10:00
i2s.c i2s: return error code if register isr error, resolve #587 (github) 2017-06-13 14:28:47 +07: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: add support for attaching handlers to RTC_CNTL interrupts 2017-07-10 17:21:49 +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-08-01 03:15:11 +08:00
sdspi_crc.c driver: SD protocol driver for SPI peripheral 2017-07-20 13:43:07 +08:00
sdspi_crc.h driver: SD protocol driver for SPI peripheral 2017-07-20 13:43:07 +08:00
sdspi_host.c driver: SD protocol driver for SPI peripheral 2017-07-20 13:43:07 +08:00
sdspi_private.h driver: SD protocol driver for SPI peripheral 2017-07-20 13:43:07 +08:00
sdspi_transaction.c driver: SD protocol driver for SPI peripheral 2017-07-20 13:43:07 +08:00
sigmadelta.c components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
spi_common.c heap: Refactor heap regions/capabilities out of FreeRTOS 2017-07-10 17:46:03 +08:00
spi_master.c soc: Move esp_ptr_dma_capable() function to soc_memory_layout.h 2017-07-10 17:46:03 +08:00
spi_slave.c soc: Move esp_ptr_dma_capable() function to soc_memory_layout.h 2017-07-10 17:46:03 +08:00
timer.c components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
uart.c bugfix(uart): fix signal glitch on tx pin 2017-07-20 14:34:11 +08:00