EasyManua.ls Logo

Phytec i.MX 93 - Page 53

Default Icon
85 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
i.MX 93 BSP Manual PD24.1.1 Documentation Rev.: imx8mp-pd22.1.2-51-ga548be7d
=============================================
Extended CSD rev 1.7 (MMC 5.0)
=============================================
Card Supported Command sets [S_CMD_SET: 0x01]
[...]
7.4.2 Enabling Background Operations (BKOPS)
In contrast to raw NAND Flash, an eMMC device contains a Flash Transfer Layer (FTL) that handles
the wear leveling, block management, and ECC of the raw MLC or TLC. This requires some maintenance
tasks (for example erasing unused blocks) that are performed regularly. These tasks are called Background
Operations (BKOPS).
By default (depending on the chip), the background operations may or may not be executed periodically,
impacting the worst-case read and write latency.
The JEDEC Standard has specied a method since version v4.41 that the host can issue BKOPS manually.
See the JEDEC Standard chapter Background Operations and the description of registers BKOPS_EN (Reg:
163) and BKOPS_START (Reg: 164) in the eMMC datasheet for more details.
Meaning of Register BKOPS_EN (Reg: 163) Bit MANUAL_EN (Bit 0):
Value 0: The host does not support the manual trigger of BKOPS. Device write performance suers.
Value 1: The host does support the manual trigger of BKOPS. It will issue BKOPS from time to time
when it does not need the device.
The mechanism to issue background operations has been implemented in the Linux kernel since v3.7. You
only have to enable BKOPS_EN on the eMMC device (see below for details).
The JEDEC standard v5.1 introduces a new automatic BKOPS feature. It frees the host to trigger the
background operations regularly because the device starts BKOPS itself when it is idle (see the description
of bit AUTO_EN in register BKOPS_EN (Reg: 163)).
To check whether BKOPS_EN is set, execute:
target:~$ mmc extcsd read /dev/mmcblk0 | grep BKOPS_EN
The output will be, for example:
Enable background operations handshake [BKOPS_EN]: 0x01
#OR
Enable background operations handshake [BKOPS_EN]: 0x00
Where value 0x00 means BKOPS_EN is disabled and device write performance suers. Where value
0x01 means BKOPS_EN is enabled and the host will issue background operations from time to time.
Enabling can be done with this command:
target:~$ target:~$ mmc --help
[...]
mmc bkops_en <auto|manual> <device>
Enable the eMMC BKOPS feature on <device>.
The auto (AUTO_EN) setting is only supported on eMMC 5.0 or newer.
Setting auto won't have any effect if manual is set.
NOTE! Setting manual (MANUAL_EN) is one-time programmable (unreversible) change.
Accessing Peripherals 49