Skip to content

Commit

Permalink
mmc: MMC boot partitions support.
Browse files Browse the repository at this point in the history
Allows device MMC boot partitions to be accessed. MMC partitions are
treated effectively as separate block devices on the same MMC card.

Signed-off-by: Andrei Warkentin <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
  • Loading branch information
Andrei Warkentin authored and cjb committed May 25, 2011
1 parent 1a258db commit 371a689
Show file tree
Hide file tree
Showing 7 changed files with 305 additions and 42 deletions.
2 changes: 2 additions & 0 deletions Documentation/mmc/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
- this file
mmc-dev-attrs.txt
- info on SD and MMC device attributes
mmc-dev-parts.txt
- info on SD and MMC device partitions
10 changes: 10 additions & 0 deletions Documentation/mmc/mmc-dev-attrs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
SD and MMC Block Device Attributes
==================================

These attributes are defined for the block devices associated with the
SD or MMC device.

The following attributes are read/write.

force_ro Enforce read-only access even if write protect switch is off.

SD and MMC Device Attributes
============================

Expand Down
27 changes: 27 additions & 0 deletions Documentation/mmc/mmc-dev-parts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
SD and MMC Device Partitions
============================

Device partitions are additional logical block devices present on the
SD/MMC device.

As of this writing, MMC boot partitions as supported and exposed as
/dev/mmcblkXboot0 and /dev/mmcblkXboot1, where X is the index of the
parent /dev/mmcblkX.

MMC Boot Partitions
===================

Read and write access is provided to the two MMC boot partitions. Due to
the sensitive nature of the boot partition contents, which often store
a bootloader or bootloader configuration tables crucial to booting the
platform, write access is disabled by default to reduce the chance of
accidental bricking.

To enable write access to /dev/mmcblkXbootY, disable the forced read-only
access with:

echo 0 > /sys/block/mmcblkXbootY/force_ro

To re-enable read-only access:

echo 1 > /sys/block/mmcblkXbootY/force_ro
Loading

0 comments on commit 371a689

Please sign in to comment.