-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zynq7000: add SD card storage driver #433
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmaksymowicz
force-pushed
the
RTOS-630
branch
from
October 19, 2023 16:06
2d5ba20
to
556f6f2
Compare
jmaksymowicz
force-pushed
the
RTOS-630
branch
2 times, most recently
from
October 24, 2023 12:42
a3d119b
to
526959f
Compare
13 tasks
jmaksymowicz
force-pushed
the
RTOS-630
branch
from
October 26, 2023 12:18
526959f
to
2d119f5
Compare
agkaminski
reviewed
Nov 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review only for now, I only pointed a one example of a given problem, there are more instances of each one in the code
jmaksymowicz
force-pushed
the
RTOS-630
branch
3 times, most recently
from
November 8, 2023 13:47
19bf57d
to
997d2b4
Compare
agkaminski
reviewed
Nov 10, 2023
jmaksymowicz
force-pushed
the
RTOS-630
branch
from
November 13, 2023 16:52
997d2b4
to
2ef2253
Compare
13 tasks
jmaksymowicz
force-pushed
the
RTOS-630
branch
from
November 14, 2023 14:58
2ef2253
to
296a49a
Compare
agkaminski
approved these changes
Nov 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
add library for MBR header structure RTOS-630
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a storage driver for SD memory cards. Data can be read through a block device or a JFFS2 partition can be mounted through an emulated MTD character device.
Description
The driver uses the SD Host Controller built into the Zynq 7000 platform to communicate with the SD card. Accesses to the card (for both block and MTD device files) are passed through
libcache
. Partitions are dectected automatically upon card insertion using MBR partition scheme (typical on SD cards). Separate device files are created for each partition. Card removal results in partitions being unmounted and device files being removed. No "safe eject" functionality has been implemented yet.The MTD device is described as "emulated" as there is no way to implement a fully featured MTD driver for an SD card. Driver supports JFFS2 and ext2 filesystems. The driver also allows root filesystem to be mounted during startup.
Driver supports SD and SDHC cards of any size (up to 2 TB permitted by the standard), but due to limitations of
libstorage
andlibcache
on this platform only the first 4 GB of the card are addressable. Any partition on the card that starts or ends beyond 4 GB will not work. This can be remedied by partitioning the card on a host PC to ensure all partitions fit within the first 4 GB of the card's capacity.Motivation and Context
Types of changes
How Has This Been Tested?
The driver was tested on a variety of microSD cards ranging in size from 256 MB to 16 GB and implementing SD Specification v1.01, v1.1 and v2.0.
Checklist:
Special treatment