Skip to content

Commit 64c5b93

Browse files
danieldegrassedleach02
authored andcommitted
sd: Add sdmmc protocol stack
Add SDMMC driver to subsystem. SDMMC driver will handle initialization, as well as SDMMC I/O. SD mode support is currently supported, SPI mode support is not. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 3e8bbee commit 64c5b93

File tree

4 files changed

+1516
-4
lines changed

4 files changed

+1516
-4
lines changed

subsys/sd/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ if (CONFIG_SD_STACK)
44
zephyr_interface_library_named(SD)
55

66
zephyr_library()
7-
zephyr_library_sources (sd.c)
7+
zephyr_library_sources (sd.c sdmmc.c)
88
endif()

subsys/sd/Kconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022 NXP
1+
# Copyright 2022 NXP
22
# SPDX-License-Identifier: Apache-2.0
33

44
# SD stack configuration options
@@ -48,7 +48,11 @@ config SD_DATA_TIMEOUT
4848

4949
config SD_BUFFER_SIZE
5050
int
51-
default 512
51+
# If SDHC required buffer alignment, we need a full block size in
52+
# internal buffer
53+
default 512 if SDHC_BUFFER_ALIGNMENT != 1
54+
# Otherwise, we only need 64 bytes to read SD switch function
55+
default 64
5256
help
5357
Size in bytes of internal buffer SD card uses for unaligned reads and
5458
internal data reads during initialization

subsys/sd/sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 NXP
2+
* Copyright 2022 NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/

0 commit comments

Comments
 (0)