CAM, GSoC, mmccam, RTEMS, SDIO

RTEMS SDIO driver: Current progress

Hi, this post mainly concerns with the current progress of SDIO driver’s implementation on RTEMS. In a nutshell, driver is able to detect, initialize the type of card. However, the part concerned with registering the partitions of the card as RTEMS disks is still buggy. So, I’ll discuss some of the bugs which were previously resolved and the ones that are still left. Starting with a very short introduction of how MMCCAM driver is being interfaced with…

Continue Reading

CAM, FreeBSD, GSoC, mmccam, RTEMS, SDIO

Backporting MMCCAM/SDIO framework to FreeBSD head 642b174dadd

My phase 2, GSoC objectives includes Backporting the current(rev: d6756a3ac8 ) MMCCAM framework to FreeBSD head 642b174dadd and then importing it to RTEMS. This post mainly concerns with intricacies and workarounds during the backporting process. Backporting is a process that enables old kernels run a latest driver. MMCCAM framework is one such enhancement in the past few months that enables FreeBSD to talk to devices behind the SDIO bus. It’s a major architectural change, that enables further…

Continue Reading

Benchmark, CAM, File system, FreeBSD, GSoC, mmccam, SDIO

microSD Card benchmarking on BeagleBone Black

Hi all, I have been recently involved in benchmarking two different device drivers of FreeBSD ,namely SDHCI and the SDIO driver to compare their relative performance under different circumstances. Here, I will summarize my results, possible conclusions and the benchmarking procedure. Before moving towards benchmarking, i’d prefer going through this article. It really good and provides a great overview of how data is transferred to disk, different APIs available. This will surely help you selecting options for…

Continue Reading

ARM, CAM, FreeBSD, mmccam, SDIO, Software

Building FreeBSD’s SDIO driver for BeagleBone Black

Hi all, This post mainly concern with building FreeBSD’s SDIO driver for BeagleBone Black by cross compiling it on AMD platform. I had few unresolved issues with the master branch of current FreeBSD tree. So, for this i used another unofficial branch: https://github.com/kibab/freebsd/tree/mmcam-new . It does have the required KERNCONF file with stable SDIO driver. A lot of steps below are similar to the one given on: https://forums.freebsd.org/threads/cross-compiling-beaglebone-on-amd64.64718/#post-384835  with slight but inevitable changes. Procedure:  Before proceeding you…

Continue Reading

CAM, FreeBSD, mmccam, SDIO, Software

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

Hi, In the next part lets look at other files which makes up the SDIO stack within mmccam framework. Please have  a look at previous part for more info: http://uditagarwal.in/index.php/2018/03/19/implementing-a-mmc-sd-sdio-stack-using-cam-framework/ mmc_sdio.c

sdio_fill_mmcio_rw_direct is basically a wrapper for CMD_52 that’s needed to read/write directly into mmc register R5. Remember that register R5 in mmc, is used for RCA(Relative card address) management. It’s right time now to talk about different command types of SD/MMC/SDIO: broadcast commands (bc), no…

Continue Reading

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 a SDIO compatible host, in its early stage it is in low power mode and consumes very little current. Host identifies the SDIO card ,it’s power requirement, it’s…

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

This file presents the basic structure of the SD-Card/MMC peripheral. This structure is further used in CAM_EDT i.e CAM Existing Device Table which stores…

Continue Reading

CAM, FreeBSD

Understanding FreeBSD’s CAM Framework

This blog post presents a gist of Free BSD’s doc on CAM(here) and chapter 14 of the book FreeBSD device driver- A guide for intrepid. It gives an introduction to the CAM(Common access method), it’s applications, it’s working and it’s organization in FreeBSD. It is written to get myself a really good understanding of mmccam stack which is nothing but SDHC/SDIO protocols wired within the CAM framework. COMMON ACCESS METHOD CAM is a method for separating HBA…

Continue Reading