mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
31a2c906d7
- Move DMA tag and map creature to at91_spi_activate() where the other resource allocation also lives. [1] - Flesh out at91_spi_deactivate(). [1] - Work around the "Software Reset must be Written Twice" erratum. - For now, run the bus at the slowest speed possible in order to work around data corruption on transit even seen with 9 MHz on ETHERNUT5 (15 MHz maximum) and AT45DB321D (20 MHz maximum). This also serves as a poor man's work-around for the "NPCSx rises if no data data is to be transmitted" erratum of RM9200. Being able to use the appropriate bus speed would require: 1) Adding a proper work-around for the RM9200 bug consisting of taking the chip select control away from the SPI peripheral and managing it directly as a GPIO line. 2) Taking the maximum frequencies supported by the actual board and the slave devices into account and basing the whole thing on the master clock instead of hardcoding a divisor as previously done. 3) Fixing the above mentioned data corruption. - KASSERT that TX/RX command and data sizes match on transfers. - Introduce a mutex ensuring that only one child device is running a SPI transfer at a time. [1] - Add preliminary, #ifdef'ed out support for setting the chip select. [1] - Use the RX instead of the TX commando size when setting up the RX side of a transfer. - For controllers having SPI_SR_TXEMPTY, i.e. !RM9200, also wait for the completion of the TX part of transfers before stopping the whole thing again. - Use DEVMETHOD_END. [1] - Use NULL instead of 0 for pointers. [1, partially] Additional testing by: Ian Lepore Submitted by: Ian Lepore [1] MFC after: 1 week |
||
---|---|---|
.. | ||
at91_aicreg.h | ||
at91_cfata.c | ||
at91_machdep.c | ||
at91_mci.c | ||
at91_mcireg.h | ||
at91_pdcreg.h | ||
at91_pio_rm9200.h | ||
at91_pio_sam9g20.h | ||
at91_pio.c | ||
at91_pioreg.h | ||
at91_piovar.h | ||
at91_pit.c | ||
at91_pitreg.h | ||
at91_pmc.c | ||
at91_pmcreg.h | ||
at91_pmcvar.h | ||
at91_reset.S | ||
at91_rst.c | ||
at91_rstreg.h | ||
at91_rtc.c | ||
at91_rtcreg.h | ||
at91_spi.c | ||
at91_spireg.h | ||
at91_ssc.c | ||
at91_sscreg.h | ||
at91_st.c | ||
at91_streg.h | ||
at91_twi.c | ||
at91_twiio.h | ||
at91_twireg.h | ||
at91_usartreg.h | ||
at91_wdt.c | ||
at91_wdtreg.h | ||
at91.c | ||
at91board.h | ||
at91reg.h | ||
at91rm92reg.h | ||
at91rm9200.c | ||
at91sam9g20.c | ||
at91sam9g20reg.h | ||
at91sam9260.c | ||
at91sam9260reg.h | ||
at91var.h | ||
board_bwct.c | ||
board_ethernut5.c | ||
board_hl200.c | ||
board_hl201.c | ||
board_kb920x.c | ||
board_qila9g20.c | ||
board_sam9g20ek.c | ||
board_tsc4370.c | ||
files.at91 | ||
files.at91sam9 | ||
hints.at91rm9200 | ||
hints.at91sam9261 | ||
if_ate.c | ||
if_atereg.h | ||
if_macb.c | ||
if_macbreg.h | ||
if_macbvar.h | ||
std.at91 | ||
std.at91sam9 | ||
std.bwct | ||
std.ethernut5 | ||
std.hl200 | ||
std.hl201 | ||
std.kb920x | ||
std.qila9g20 | ||
std.sam9g20ek | ||
std.tsc4370 | ||
uart_bus_at91usart.c | ||
uart_cpu_at91rm9200usart.c | ||
uart_dev_at91usart.c |