CAM, FreeBSD, Hardware, mmccam, SDIO, Software

Detailed SDIO protocol Implementation

Reference: Wikipedia, https://www.sdcard.org/developers/overview/sdio/sdio_spec/Simplified_SDIO_Card_Spec.pdf  SDIO cards are intended to provide high-speed data Input/Output on our regular sd card slot. SDIO cards are compatible with any sd card slot and will not cause any physical damage to the host if it’s not compatible with SDIO. When SDIO is plugged in an SDIO compatible host, in its early stage it is in low power mode and consumes very little current. The host identifies the SDIO card, it’s power requirement, it’s I/O capabilities, etc. If the host finds that the power requirement is manageable and there is a driver for the I/O functionality card…

Continue Reading

CAM, FreeBSD, mmccam

Implementing a MMC/SD/SDIO stack using CAM framework(Part 1)

In this blog post we will have a detailed look at all the files added/changed while implementing the MMC/SD/SDIO stack via CAM framework. We will basically discuss the commit  https://github.com/freebsd/freebsd/commit/a87c7a85be3e3727b6b08b19741b4282f942400d which aims at adding MMC/SD/SDIO stack to FreeBSD’s already existing CAM framework. So, lets start one by one with each file: mmc.h #ifndef CAM_MMC_H #define CAM_MMC_H #include <dev/mmc/mmcreg.h> /* * This structure describes an MMC/SD card */ struct mmc_params { u_int8_t model[40]; /* Card model */ /* Card OCR */ uint32_t card_ocr; /* OCR of the IO portion of the card */ uint32_t io_ocr; /* Card CID — raw and…

Continue Reading