It describes the MMC storage device driver functionality in Linux Kernel and it's role. It explains different type of storage devices available and how they are handled from MMC driver point of view. It describes eMMC (internal storage) device and SD (external storage) devices in details and SD protocol used for communicating with these devices in Linux.
Kernel Recipes 2018 - Overview of SD/eMMC, their high speed modes and Linux s...Anne Nicolas
SD and eMMC devices are widely present on Linux systems and became on some products the primary storage medium. One of the key feature for storage is the speed of the bus accessing the data.
Since the introduction of the original “default” (DS) and “high speed” (HS) modes, the SD card standard has evolved by introducing new speed modes, such as SDR12, SDR25, SDR50, SDR104, etc. The same happened to the eMMC standard, with the introduction of high speed modes named DDR52, HS200, HS400, etc. The Linux kernel has obviously evolved to support these new speed modes, both in the MMC core and through the addition of new drivers.
This talk will start by introducing the SD and eMMC standards and how they work at the hardware level, with a specific focus on the new speed modes. With this hardware background in place, we will then detail how these standards are supported by Linux, see what is still missing, and what we can expect to see in the future.
The U-Boot is an "Universal Bootloader" ("Das U-Boot") is a monitor program that is under GPL. This production quality boot-loader is used as default boot loader by several board vendors. It is easily portable and easy to port and to debug by supporting PPC, ARM, MIPS, x86,m68k, NIOS, Microblaze architectures. Here is a presentation that introduces U-Boot.
Kernel Recipes 2018 - Overview of SD/eMMC, their high speed modes and Linux s...Anne Nicolas
SD and eMMC devices are widely present on Linux systems and became on some products the primary storage medium. One of the key feature for storage is the speed of the bus accessing the data.
Since the introduction of the original “default” (DS) and “high speed” (HS) modes, the SD card standard has evolved by introducing new speed modes, such as SDR12, SDR25, SDR50, SDR104, etc. The same happened to the eMMC standard, with the introduction of high speed modes named DDR52, HS200, HS400, etc. The Linux kernel has obviously evolved to support these new speed modes, both in the MMC core and through the addition of new drivers.
This talk will start by introducing the SD and eMMC standards and how they work at the hardware level, with a specific focus on the new speed modes. With this hardware background in place, we will then detail how these standards are supported by Linux, see what is still missing, and what we can expect to see in the future.
The U-Boot is an "Universal Bootloader" ("Das U-Boot") is a monitor program that is under GPL. This production quality boot-loader is used as default boot loader by several board vendors. It is easily portable and easy to port and to debug by supporting PPC, ARM, MIPS, x86,m68k, NIOS, Microblaze architectures. Here is a presentation that introduces U-Boot.
This presentation is about U-Boot: the most popular open source, primary boot loader used in embedded devices, as well as it's mechanisms and features.
The respective talk was held by Sam Protsenko (Software Engineer, Consultant, GlobalLogic) at GlobalLogic Mykolaiv Embedded TechTalk #1 on May 25, 2018.
Linux Memory Management with CMA (Contiguous Memory Allocator)Pankaj Suryawanshi
Fundamentals of Linux Memory Management and CMA (Contiguous Memory Allocator) In Linux.
Virtual Memory, Physical Memory, Swap Space, DMA, IOMMU, Paging, Segmentation, TLB, Hugepages, Ion google memory manager
It provides details about what is Kernel, what is a Module and what is device driver. How device gets registered and how a storage volume gets mounted if it is inserted on android system. Details on Allocation of memory in Kernel.
LAS16-402: ARM Trusted Firmware – from Enterprise to EmbeddedLinaro
LAS16-402: ARM Trusted Firmware – from Enterprise to Embedded
Speakers:
Date: September 29, 2016
★ Session Description ★
ARM Trusted Firmware has established itself as a key part of the ARMv8-A software stack. Broadening its applicability across all segments, from embedded to enterprise, is challenging. This session discusses the latest developments, including extension into the 32-bit space.
★ Resources ★
Etherpad: pad.linaro.org/p/las16-402
Presentations & Videos: http://connect.linaro.org/resource/las16/las16-402/
★ Event Details ★
Linaro Connect Las Vegas 2016 – #LAS16
September 26-30, 2016
http://www.linaro.org
http://connect.linaro.org
What are latest new features that DPDK brings into 2018?Michelle Holley
We will provide an overview of the new features of the latest DPDK release including source code browsing and API listing of top two new features of latest DPDK release. And on top of that, there will be a hands-on lab, on the Intel® microarchitecture servers, to learn how getting started with DPDK will become much simpler and powerful.
Virtual File System in Linux Kernel
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
U-Boot, a boot loader for Embedded boards based on PowerPC, ARM, MIPS and several other processors, which can be installed in a boot ROM and used to initialize and test the hardware or to download and run application
code.
This presentation is about U-Boot: the most popular open source, primary boot loader used in embedded devices, as well as it's mechanisms and features.
The respective talk was held by Sam Protsenko (Software Engineer, Consultant, GlobalLogic) at GlobalLogic Mykolaiv Embedded TechTalk #1 on May 25, 2018.
Linux Memory Management with CMA (Contiguous Memory Allocator)Pankaj Suryawanshi
Fundamentals of Linux Memory Management and CMA (Contiguous Memory Allocator) In Linux.
Virtual Memory, Physical Memory, Swap Space, DMA, IOMMU, Paging, Segmentation, TLB, Hugepages, Ion google memory manager
It provides details about what is Kernel, what is a Module and what is device driver. How device gets registered and how a storage volume gets mounted if it is inserted on android system. Details on Allocation of memory in Kernel.
LAS16-402: ARM Trusted Firmware – from Enterprise to EmbeddedLinaro
LAS16-402: ARM Trusted Firmware – from Enterprise to Embedded
Speakers:
Date: September 29, 2016
★ Session Description ★
ARM Trusted Firmware has established itself as a key part of the ARMv8-A software stack. Broadening its applicability across all segments, from embedded to enterprise, is challenging. This session discusses the latest developments, including extension into the 32-bit space.
★ Resources ★
Etherpad: pad.linaro.org/p/las16-402
Presentations & Videos: http://connect.linaro.org/resource/las16/las16-402/
★ Event Details ★
Linaro Connect Las Vegas 2016 – #LAS16
September 26-30, 2016
http://www.linaro.org
http://connect.linaro.org
What are latest new features that DPDK brings into 2018?Michelle Holley
We will provide an overview of the new features of the latest DPDK release including source code browsing and API listing of top two new features of latest DPDK release. And on top of that, there will be a hands-on lab, on the Intel® microarchitecture servers, to learn how getting started with DPDK will become much simpler and powerful.
Virtual File System in Linux Kernel
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
U-Boot, a boot loader for Embedded boards based on PowerPC, ARM, MIPS and several other processors, which can be installed in a boot ROM and used to initialize and test the hardware or to download and run application
code.
Dell is offering redundant SD-card module for embedded hypervisors. This module provides the same feature set as the previous embedded hypervisor SD card solution, with the added feature of a mirrored SD card.
Learn about CANopen communication protocol.
Get to know the basic terms, DS402 profiles, network management, SDO, PDO and more.
Find out what are the advantages of distributed control?
What is the binary interpreter method?
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon Boston, ...Ron Munitz
My session at AnDevCon Bostong, May 2013, Boston, MA.
This class introduces the concepts of AOSP and how to use it in order to configure and build one of the most popular Android devices available: The Android emulator, for an x86 target. You will then learn a reincarnation of the AOSP, intended to bring Android to as many x86 devices as possible. You will see its structure and compare it with the AOSP, and demonstrate how such a build works within Virtual Box, QEMU and more.
LEVEL: Intermediate
TOPIC AREA: Embedded Android
For Training/Consulting requests: info@thepscg.com
Positive Hack Days. Матросов. Мастер-класс: Проведение криминалистической экс...Positive Hack Days
В рамках мастер-класса будет рассмотрены следующие вопросы:
методы внедрения и работы руткита TDL4;
инструментарий и методы сбора данных для проведения криминалистической экспертизы зараженной машины;
отладка буткит-составляющей на ранней стадии загрузки системы с использованием эмулятора Bochs;
анализ зараженной машины при помощи WinDbg;
удаление руткита из системы после сбора всех необходимых данных.
This presentation is on the topic "Microcomputer and RAM Models". It defines definition of Microcomputer, its block diagram and RAM, it's types along with VHDL Code to define RAM.
Similar to Linux Kernel MMC Storage driver Overview (20)
Writing Character driver (loadable module) in linuxRajKumar Rampelli
It covers the step by step approach on how to write a simple loadable character device driver in linux. What are Device files in linux detail. How user application interact with character driver using a device file.
I have prepared this document during my Python course from sololearn "Learn Python" course. This document contains fundamentals of python. Aimed for python beginners.
This presentation covers Python most important data structures like Lists, Dictionaries, Sets and Tuples. Exception Handling and Random number generation using simple python module "random" also covered. Added simple python programs at the end of the presentation
Learn python in easy steps. This presentation will cover followings
1. Python basics
2. How to write a python code
3. Variable usage & their syntax
4. Strings handling
5. Files handling
6. How to use loops and others.
7. Python Vs C language.
Linux kernel has a special feature called Watchdog timer which would reset the system in case of any software faults | system hangs | or any application crashes after a timeout has reached.
This presentation gives an overview of Linux kernel block I/O susbsystem functionality, importance of I/O schedulers in Block layer. It also describes the different types of I/O Schedulers including the Deadline I/O scheduler, Anticipatory I/O Scheduler, Complete Fair queuing I/O scheduler and Noop I/O scheduler.
This PPT shares some information on what is booting process and different stages in it. Importance of BIOS and BootROM. Steps involved for loading kernel into RAM. What is the importance of init RAM disk (initrd), when 1st user space application is started and who will create init process.
This ppt describes network security concepts and the role of cryptography. Difference in Symmetric Key Cryptography and Public Key Cryptography. Uses of Digital Certificates. What is the use of Digital Signature and how it ensure authenticity, Integrity and Non-repudiation. How security features should be ensured for any transactions using cryptography.
Tasklet vs work queues (Deferrable functions in linux)RajKumar Rampelli
Deferrable functions in linux is a mechanism to delay the execution of any piece of code later in the kernel context. Can be implemented using Tasklet and work queues
This ppt shows more details on Higher education (M.Tech/MS/MBA) role and its importance. B.E/B.Tech students should think twice before choosing next level (Higher studies or JOB). There are so many benefits with higher studies today. GATE is a All India entrance test used for admission for MS/MTECH/Phd in Indian Institute of Technologies (IITs). GRE entrance test is for admission in other countries.
This ppt will demonstrate the compilation process stages in C language. C compilation process has 4 stages. They are pre-processor, compiler, assembler and linker. Each stage has its own functionality. The final outcome of these stages would be a C executable file. GCC tool is used in linux platform to compile C code. And It will generate *.out files as an executable.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
2024.06.01 Introducing a competency framework for languag learning materials ...
Linux Kernel MMC Storage driver Overview
1.
2. Outline
0 Storage Devices on mobile platform
(smart phones, tablets etc.)
0 RAM
0 Internal Storage Devices
0 External Storage Devices
0 What is Flash Memory ?
0 Kernel storage driver overview
(http://lxr.free-
electrons.com/source/drivers/mmc/ )
0 mmc device driver overview
0 Top view diagram
0 block diagram and Internal diagram
0 SD and SPI protocol
0 Mmc driver different Layers
0 Important functions to look
for
0 Tuning procedure
0 SD Hot-plug
0 Sdhci controller role in Data
transfer
0 SDMMC device registration
0 Sdhci probe()
0 How to configure/enable
SDHCI support
Note: To understand the few terms in this presentation, please refer
to Introduction to Kernel & Device Drivers PPT
(http://www.slideshare.net/rampalliraj/kernel-device-drivers): It
covers what is Kernel, what is a Module and what is device driver .
3. Storage Devices on Mobile Platforms
0 Mobile Platforms will have mainly Three storage devices for applications/users to
store the Data
0 RAM (Random Access Memory): also known as main memory and primary memory.
0 Internal Storage device (Non-removable device)
0 External Storage device (Removable device)
0 RAM is Volatile memory i.e. data present in this device will be lost when power is
removed/off.
0 Internal Storage Device: Mobile devices will have a built-in non-volatile memory
called internal storage.
0 External Storage Device: Android devices may support removable non-volatile
memory called external storage devices.
0 Example: Look at Memory & Storage specification of smartphone mobile.
RAM: 2GB
Internal Storage:
16GB
External storage:
upto 128GB
Snapshot taken from Flipkart Samsung j5-6 mobile spec.
4. What is Flash Memory ?
0 Flash Memory is a non-volatile, solid state storage device i.e. keeps
its data without power.
0 Flash Memory is being used in wide range of devices. Examples are
0 Internal storage devices (eMMC or UFS)
0 USB sticks and SD Memory Cards
0 Digital audio players
0 Flash memory offers very high speed access to data.
0 Advantage: Flash memory, when packaged in a "memory card", is
very resilient to damage, unlike many other storage devices. It can
withstand extremes of temperature, being immersed in water or
being accidentally dropped [2].
0 Disadvantage: It has a limited number of read/write cycles which
limits its useful life span.
5. Internal Storage Device
0 Internal Storage mostly holds the android operating
system so that the android device is able to access
input and output devices.
0 System memory (see image)
0 It is also called as Device Memory (internal memory).
0 Go to settings page and select Storage option and you will
see the internal storage capacity of your device.
0 It also stores the applications or data that user saves in
it.
0 The data stored in internal storage can be accesses
much faster than the data present in external storage
device.
0 Internal storage device is directly connected to the
mother board where as the external device connected
through a hardware interface.
0 Disadvantage: If device fails to boot then all the data
present in the internal storage device may be lost.
6. Internal Storage Devices
0 Following are the storage devices which are mainly used for
main storage devices on mobile platforms
0 eMMC: embedded Multi-Media Controller, refers to a package
consisting of both flash memory and a flash memory controller
integrated on the same silicon die.
0 UFS: Universal Flash Storage (UFS) is a flash storage like eMMC
device with higher data rates compared to it.
0 SATA: Serial ATA is a computer bus interface that connects host
bus adapters to mass storage devices such as hard disk drives,
optical drives, and solid-state drives.
0 Will cover Linux Kernel eMMC (MMC storage)device drivers
in this presentation.
7. External Storage Device
0 Android devices may support
the capability of adding more
external storage via removable
cards like SD memory cards.
0 SD card: Secure Digital (SD) is
a non-volatile memory card
format developed by the SD
Card Association (SDA) for use
in portable devices.
0 Advantage: External storage
devices are portal i.e. data can
be easily moved from one
location to other location.
0 These storage devices are
used for data backup
0 Disadvantage: Data transfer
rate is slow compared to
internal storage devices.
SD card details found in
settings->storage android
8. How to identify SD card’s class?
Preferable card: class 10 or UHS-I cards
Class
Minimum
Serial Data
Writing
Speed
Symbol on
SD card
Class 2 2MB/s
Class 4 4MB/s
Class 6 6MB/s
Class 10 10MB/s
UHS Speed
Class 1 (U1)
10MB/s
9. SD Memory card architecture
Card Info
registers
Usage
CID Card identification number
RCA Relative card address published by
the card during card identification
process.
DSR Driver stage register
CSD Max data transfer rate and defines
data format, error correction type,
maximum data access/transfer time,
Maximum read/write block length.
SCR SD configuration register
OCR Operation condition reg
SSR SD status register
CSR Card status register
10. SD and SPI protocol
SPI Protocol SD Protocol
Design simple Complex
Loss of performance: 1bit mode Wide bus option. Supports 1bit and 4bit
modes.
Card identification and addressing
methods replaced by the h/w chip select
CS signal
Its own Card Identification process
No broadcast commands Available
Uses only 7 pins
DAT1 and DAT2 are not used
DAT3 used as CS
DAT0 data transfer
CLK line
DataIn line (Host to card line)
9 pins model:
DAT0-DAT3 lines for data transfer
CLK line – clock line
CMD line – command line
3 Power lines – supply voltage lines
11. Storage Device Driver for
eMMC and SD devices
0 Storage Device Driver ($kernel/drivers/mmc) is common
for eMMC devices (internal storage device) and for SD
memory cards (external storage device).
0 eMMC and SD are block devices i.e. mmc device driver
communicates with these devices in the form of blocks of
data (512 bytes)
0 Character device is one with which the driver communicates
by sending/receiving single characters (bytes), eg:
0 mmc drivers receives the block requests from generic block
layer (upper layer)
12. mmc Device Driver Top View
Kernel
Space
User Space
Virtual File System Layer
Generic Block Layer
mmc device driver
Hardware
devices
eMMC device SD memory card
User applications
14. mmc device driver overview
0 mmc queue receives block read/write/erase
requests from the generic core block layer
0 mmc queue driver picks up one request from its
queue and assign it to mmc block driver
0 mmc block driver analyze the type of request and
forwards the request to mmc core driver.
0 mmc core driver has the protocol implementation
for eMMC/SD devices detection, enumeration and
data transfers to communicated with the actual
Hardware device.
0 mmc core driver receives the request from block
driver, prepares a mmc_request and forwards it to
the mmc host driver.
0 mmc host driver initiates the transfer to device by
programming Hardware controller registers.
0 Once the request get processed by the hardware
controller, an interrupt gets generated .
0 mmc host driver receives request complete
interrupt, analyzes it and pass the response to block
driver. This process continues for all block requests.
mmc Queue driver
(queue.c)
mmc core driver
(core.c, mmc.c, sd.c)
mmc host (controller)
driver
SDHCI Host driver
sdhci.c
mmc Block driver
(block.c)
15. mmc queue layer
(/drivers/mmc/card/queue.c)
0 Important functions:
0 mmc_init_queue()
0 initializes the device queue
0 Creates and run the kernel thread (mmc_queue_thread)
“mmcqd” to fetch block I/O requests from core block
layer and pass it mmc block layer.
0 mmc_queue_thread()
0 Fetch block I/O requests using blk_fetch_request()
0 Pass the request to mmc block layer using callback
issue_fn() -> redirects to -> mmc_blk_issue_rq() in
mmc block driver
16. mmc block layer (/drivers/mmc/card/block.c)
0 Important functions: 1) mmc_blk_probe()
0 Calls the mmc_queue_initialize() to initialize mmc queue.
0 Allocates the block devices (eMMC and SD card) and its partitions.
0 Initializes the mmc_blk_data (md) structure with required function callbacks for
I/O requests, assigns MAJOR/MINOR info.
md->queue.issue_fn = mmc_blk_issue_rq; md->disk->major =
MMC_BLOCK_MAJOR; md->disk->first_minor = devidx * perdev_minors;
0 2) mmc_blk_issue_rq() – receives block I/O request from mmc queue thread
from mmc queue driver. If I/O request type is ERASE then it calls
mmc_blk_issue_discard_rq(). If I/O request is READ/WRITE then calls
mmc_blk_issue_rw_rq()
0 2A) mmc_blk_issue_rw_rq() – prepares mmc block request and responsible
for followings: Sets data block size to 512 (FIXED)
0 Retrieve block count information using blk_rq_sectors()
0 Assigns appropriate command flags and data flags
0 Sets the timeout for a Data command using mmc_set_data_timeout() function
(defined in mmc core driver)
0 Assign the mmc block request to mmc core driver by calling mmc_start_req()
function.
17. mmc core layer
(/drivers/mmc/core/*)
0 It Implements all SD/eMMC-dependent functionality, entire
communication protocol is implemented in this layer.
0 Receives request in mmc_start_req() from mmc block layer
0 Before starting this new request, it checks for any ongoing
request. Holds this new request until the ongoing request is
processed.
0 It calls mmc host layer function sdhci_request() to program the
command and its dependant parameters in the mmc controller
register for initiating the command transfer.
(/drivers/mmc/host/sdhci.c)
18. mmc host layer (drivers/mmc/host/*)
0 It implements the driver for most known platform controllers and
is platform dependent.
0 Important functions:
0 sdhci_add_host() : adds the sdhci host controller with the driver model.
It initializes the sdhci h/w controller and enables sdhci interrupts.
0 sdhci_request(): It initiates the data transfer of received request by
programming the command details in the corresponding h/w register.
0 Sets the SW timer to ensure that there is no infinite wait for the transfer
complete interrupt
0 Prepares the data and sets SDMA or ADMA mode
0 sdhci_irq(): It receives the transfer complete interrupt and analyzes it
for any errors. It sends the response of the transfer to block layer.
0 sdhci_execute_tuning(): Tuning procedure: It is required for reliable data
transfers when interface freq is more than 50MHz. It determines the TAP value by
issuing CMD19.
0 Controller issues CMD19 (SD/SDIO) or CMD21(eMMC) to get card’s tuning block at the
current tap value X. Compares with its tuning block
0 If matches - Tuning is passed for the tap value X
0 Else - Tuning is not passed for the tap value X, try next tap X+1
19. SD Host controller role @Data Transfer
0 Data location of system memory DMA_SYSTEM_ADDR (If DMA supported)
0 Set Block size BLOCK_SIZE
0 Set Block count BLOCK_COUNT
0 Set argument value ARGUMENT
0 Set TRANSFER_MODE value, determines
0 Single/Multi-Block transfer
0 Block count enabled ?
0 Data transfer direction
0 ACMD12(eMMC/SD) or CMD52(SDIO) enabled ?
0 DMA enabled ?
0 Set COMMAND execution started
0 Wait for CMD complete Interrupt
0 Write 1 to the CMD_COMPLETE in Normal status Interrupt Register
0 Based on Read/Write CMD, the associated Registers/Interrupts enabled
0 Wait for Buffer Read Ready or Buffer Write Ready Interrupt
0 Clear Buffer Read Ready Status or Buffer Write Ready Status
0 Wait for TRANSFER_COMPLETE Interrupt
0 Clear TRANSFER_COMPLETE Status
20. Mmc driver features
0 Host-Device interface is reliable when FREQ limits upto 50MHz
0 SD: High speed (HS) SD cards, class 4 cards
0 eMMC: eMMC devices with versions 4.41 or below
0 Tuning procedure is required when host-device interface runs at more
than 50MHz.
0 SD: Ultra High Speed (UHS) SD cards, and class 10 SD cards.
0 eMMC: eMMC devices with versions 4.5 or more supports tuning
0 Mmc driver supports SD hot-plug feature, so that SD card can be inserted
into already running device without powering of the device.
0 MMC driver supports voltage switching feature, if SD cards of type 10 or
UHS-I inserted then voltage switching is invoked to switch voltage from
3.3 V to 1.8V for power optimization.
0 UHS SD cards runs at 1.8V
0 Clock gating is enabled: If there are no transactions on eMMC/SD interface
then clock supply will be off, to save the power of the device.
21. SDMMC devices registration
0 Device registration requires both device name and driver name should
match
0 Device registration is done in board-<board-name>-sdhci.c
0 platform_device_register(&tegra_sdhci_device3); /* eMMC */
platform_device_register(&tegra_sdhci_device2); /* SD/SDIO */
platform_device_register(&tegra_sdhci_device0); /* SDIO/SD */
0 Platform_device Structure:
static struct platform_device tegra_sdhci_deviceX = {
.name = "sdhci-tegra",
.id = X, /* X = 0 or 1 or 2 or 3 */
.resource = sdhci_resourceX,
.num_resources = ARRAY_SIZE(sdhci_resourceX),
.dev = { .platform_data = &tegra_sdhci_platform_data3, },
};
0 As part of device enumeration, we use discovery method to identify
whether the device is eMMC or SD or SDIO.
22. SDHCI probe()
Probe() is called when device is recognized by the platform
Driver’s init function gives kernel a list of devices it is able to
service, along with a pointer to a probe function. Kernel then calls
the driver’s probe function one for each device.
0 probe function starts the per-device initialization:
0 initializing hardware, allocating resources, and
0 registering the device with the kernel as a block device.
0 Kernel/drivers/mmc/host/sdhic-tegra.c sdhci_tegra_probe()
0 Host controller initialization at
kernel/drivers/mmc/host/sdhci.c sdhci_add_host()
0 Device initialization starts in
kernel/drivers/mmc/core/core.c mmc_rescan()
0 Starts execution when Host detects the device.
0 mmc_attach_sdio() sdio.c [core driver]
0 mmc_attach_sd() sd.c [core driver]
0 mmc_attach_mmc() mmc.c [core driver]
23. How to enable SDHCI controller:
MMC/SD Card support Configuration
0 Configure below variables for mmc devices (eMMC
and SD devices share same sdhci controller)
0 MMC
0 MMC_SDHCI
0 MMC_SDHCI_PLTFM
0 Optional
0 MMC_DEBUG
0 MMC_BLOCK
0 drivers/mmc/Kconfig
24. Conclusion
0 eMMC device is used for internal storage on mobile platforms
0 SD device (external SD cards) is used for external storage on
mobile platforms
0 eMMC device and SD device both uses same driver on Linux
platform. Pointer to this driver is
http://lxr.free-electrons.com/source/drivers/mmc/
0 eMMC and SD devices registers with block layer as a block devices.
0 Mmc driver sub-divided into three layers block (or queue)
subsystem, core layer and host layer.
0 eMMC and SD uses SD protocol for communication.
0 Sdhci host controller communicates with eMMC and SD devices.
0 Class 10 or UHS-I type SD cards are preferable for high data rates.
25. References
1. Wikipedia:
https://en.wikipedia.org/wiki/Secure_Digital
2. TEACH-ICT – The very best KS3, GCSE and A Level
Computer Science resources.
3. SAMSUNG Galaxy J5 - 6 (New 2016 Edition)(Black,
16 GB) Specification snapshot from flipkart.com
4. SD Specifications Part A2 SD Host Controller
Standard Specification Version 3.0
5. JEDEC STANDARD EMBEDDED MULTI-MEDIA CARD
(e•MMC), ELECTRICAL STANDARD (4.5 device)
26. THANK YOU
Have a look at
My PPTs:
http://www.slideshare.net/rampalliraj/
My Blog: http://practicepeople.blogspot.in/
Editor's Notes
Platform devices represent devices that are usually integrated into a given chip and therefore are always there. The platform-specific initialization code statically initializes such arrays of platform devices and then registers them in a row using platform_register. Therefore there is no need for sophisticated probing. Instead, the string contained in platform_device.name is compared platform_driver.driver.name and a match is assumed if they are equal.
MMC support
selects the generic Secure Digital Host Controller Interface. If you have a controller with this interface, say Y or M here.
Selects the common helper functions support for SD host controller based platform and OF drivers
Selects the Tegra SD/MMC controller. If you have a Tegra platform with SD or MMC devices, say Y or M here.