History log of /openbsd-current/sys/dev/ic/rtsx.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.22 18-Feb-2020 cheloha

rtsx(4): tsleep(9) -> tsleep_nsec(9); ok mpi@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.21 09-Oct-2017 stsp

Fix build on 32 bit; paddr in rtsx_xfer_dma needs to be 64bit on all platforms.
Found the hard way by deraadt@


# 1.20 09-Oct-2017 stsp

Add ADMA support to rtsx(4) to make use of DMA buffers provided by sdmmc(4).
Data transfers use a little bit less CPU time now.
Tested by me on RT5209 and on RTS525A by jcs@
ok mpi@ visa@


Revision tags: OPENBSD_6_2_BASE
# 1.19 07-Sep-2017 jcs

Check return of rtsx_write in previous commit as RTSX_WRITE macro
does

Coverity CID 1455437


# 1.18 06-Sep-2017 jcs

add support for the Realtek RTS525A

ok stsp


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 06-May-2016 kettenis

Make sure we always update both bits that control the bus width. Also make
sure that we reset the bus width (to 1-bit) after powering up the bus.
Apparently the register write fails if the bus isn't powered on.
Implement the chip callback function and advertise 4-bit bus support.

ok stsp@


# 1.16 06-May-2016 kettenis

Round the requested clock frequency down to a support value instead of
insisting on an exact match. Add support for a 50 MHz clock.

ok stsp@


# 1.15 06-May-2016 kettenis

Fix the DMA transfer code to repect the block size in the sdmmc command.

ok stsp@


# 1.14 05-May-2016 kettenis

Add Dual Data Rate support for eMMC at 52MHz.


# 1.13 01-May-2016 kettenis

Add support for changing the bus width to the sdmmc subsystem and the sdhc(4)
controller. Use this to switch SD cards to a 4-bit bus if they support it.

ok deraadt@, jsg@


Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.12 28-Apr-2015 stsp

In rtsx(4), condense the list of support chips in a comment, remove the unused
F_5227 flag, sort PCI IDs, and fix a typo in a comment. No functional change.
from brad


# 1.11 14-Mar-2015 jsg

Remove some includes include-what-you-use claims don't
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.10 19-Aug-2014 phessler

Enable rts5227, as found in my new Thinkpad x240.

Shuffle the code around slightly, so we special case the 5209 chipset
instead of semi-randomly.

Tested on rts5227 by me, and rts5209 by stsp@

OK stsp@


Revision tags: OPENBSD_5_6_BASE
# 1.9 18-May-2014 stsp

Make rtsx(4) attach to RTL8402 devices. Reported as working by Eric Huiban.


# 1.8 23-Apr-2014 stsp

Document RTS5227 support in rtsx(4).


Revision tags: OPENBSD_5_5_BASE
# 1.7 08-Dec-2013 stsp

Fix rtsx_read_cfg() return value check in rtsx_attach(). Diff from dhill.
Bug didn't have any bad effects since rtsx doesn't support SDIO at present.


# 1.6 06-Dec-2013 deraadt

Add a DVACT_WAKEUP op to the *_activate() API. This is called after the
kernel resumes normal (non-cold, able to run processes, etc) operation.
Previously we were relying on specific DVACT_RESUME op's in drivers
creating callback/threads themselves, but that has become too common,
indicating the need for a built-in mechanism.
ok dlg kettenis, tested by a sufficient amount of people


# 1.5 06-Nov-2013 stsp

Add support for the RTS5229 card reader to rtsx(4).
From Pedro Martelletto.


Revision tags: OPENBSD_5_4_BASE
# 1.4 31-May-2013 deraadt

Correct sequencing in ca_activate function. Some operations were in the
wrong order, and depth traversal was not gauranteed.
ok stsp (tested too)


# 1.3 28-Mar-2013 stsp

Prevent a panic during rtsx(4) attachment. If a card is inserted while booting
the interrupt handler can be triggered before sdmmc(4) is attached. In which
case the interrupt handler's futile attempt to handle the newly inserted card
would crash the kernel. ok miod@


Revision tags: OPENBSD_5_3_BASE
# 1.2 07-Dec-2012 stsp

Remove support for waiting for an interrupt within hostcmd_send(), since only
one of the two callers of hostcmd_send() needs to wait for an interrupt.
Make the single caller which needs it wait instead.
No functional change; ok phessler


# 1.1 29-Nov-2012 stsp

Add rtsx(4), a new driver for the Realtek RTS5209 card reader.
This card reader does not comply to the standard SDHC interface
supported by sdhc(4) and hence requires a custom driver.

With help from uwe and mikeb. Useful hints were also provided by the
author of the corresponding Linux driver (wwang at realsil com cn),
thanks a lot! Tested by myself and weerd on i386 and amd64.


# 1.21 09-Oct-2017 stsp

Fix build on 32 bit; paddr in rtsx_xfer_dma needs to be 64bit on all platforms.
Found the hard way by deraadt@


# 1.20 09-Oct-2017 stsp

Add ADMA support to rtsx(4) to make use of DMA buffers provided by sdmmc(4).
Data transfers use a little bit less CPU time now.
Tested by me on RT5209 and on RTS525A by jcs@
ok mpi@ visa@


Revision tags: OPENBSD_6_2_BASE
# 1.19 07-Sep-2017 jcs

Check return of rtsx_write in previous commit as RTSX_WRITE macro
does

Coverity CID 1455437


# 1.18 06-Sep-2017 jcs

add support for the Realtek RTS525A

ok stsp


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 06-May-2016 kettenis

Make sure we always update both bits that control the bus width. Also make
sure that we reset the bus width (to 1-bit) after powering up the bus.
Apparently the register write fails if the bus isn't powered on.
Implement the chip callback function and advertise 4-bit bus support.

ok stsp@


# 1.16 06-May-2016 kettenis

Round the requested clock frequency down to a support value instead of
insisting on an exact match. Add support for a 50 MHz clock.

ok stsp@


# 1.15 06-May-2016 kettenis

Fix the DMA transfer code to repect the block size in the sdmmc command.

ok stsp@


# 1.14 05-May-2016 kettenis

Add Dual Data Rate support for eMMC at 52MHz.


# 1.13 01-May-2016 kettenis

Add support for changing the bus width to the sdmmc subsystem and the sdhc(4)
controller. Use this to switch SD cards to a 4-bit bus if they support it.

ok deraadt@, jsg@


Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.12 28-Apr-2015 stsp

In rtsx(4), condense the list of support chips in a comment, remove the unused
F_5227 flag, sort PCI IDs, and fix a typo in a comment. No functional change.
from brad


# 1.11 14-Mar-2015 jsg

Remove some includes include-what-you-use claims don't
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.10 19-Aug-2014 phessler

Enable rts5227, as found in my new Thinkpad x240.

Shuffle the code around slightly, so we special case the 5209 chipset
instead of semi-randomly.

Tested on rts5227 by me, and rts5209 by stsp@

OK stsp@


Revision tags: OPENBSD_5_6_BASE
# 1.9 18-May-2014 stsp

Make rtsx(4) attach to RTL8402 devices. Reported as working by Eric Huiban.


# 1.8 23-Apr-2014 stsp

Document RTS5227 support in rtsx(4).


Revision tags: OPENBSD_5_5_BASE
# 1.7 08-Dec-2013 stsp

Fix rtsx_read_cfg() return value check in rtsx_attach(). Diff from dhill.
Bug didn't have any bad effects since rtsx doesn't support SDIO at present.


# 1.6 06-Dec-2013 deraadt

Add a DVACT_WAKEUP op to the *_activate() API. This is called after the
kernel resumes normal (non-cold, able to run processes, etc) operation.
Previously we were relying on specific DVACT_RESUME op's in drivers
creating callback/threads themselves, but that has become too common,
indicating the need for a built-in mechanism.
ok dlg kettenis, tested by a sufficient amount of people


# 1.5 06-Nov-2013 stsp

Add support for the RTS5229 card reader to rtsx(4).
From Pedro Martelletto.


Revision tags: OPENBSD_5_4_BASE
# 1.4 31-May-2013 deraadt

Correct sequencing in ca_activate function. Some operations were in the
wrong order, and depth traversal was not gauranteed.
ok stsp (tested too)


# 1.3 28-Mar-2013 stsp

Prevent a panic during rtsx(4) attachment. If a card is inserted while booting
the interrupt handler can be triggered before sdmmc(4) is attached. In which
case the interrupt handler's futile attempt to handle the newly inserted card
would crash the kernel. ok miod@


Revision tags: OPENBSD_5_3_BASE
# 1.2 07-Dec-2012 stsp

Remove support for waiting for an interrupt within hostcmd_send(), since only
one of the two callers of hostcmd_send() needs to wait for an interrupt.
Make the single caller which needs it wait instead.
No functional change; ok phessler


# 1.1 29-Nov-2012 stsp

Add rtsx(4), a new driver for the Realtek RTS5209 card reader.
This card reader does not comply to the standard SDHC interface
supported by sdhc(4) and hence requires a custom driver.

With help from uwe and mikeb. Useful hints were also provided by the
author of the corresponding Linux driver (wwang at realsil com cn),
thanks a lot! Tested by myself and weerd on i386 and amd64.