Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards/cxd56xx/spresense: add fs automount driver for SD Card
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
- Loading branch information
1 parent
7824818
commit 5f92c62
Showing
25 changed files
with
624 additions
and
92 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
61 changes: 61 additions & 0 deletions
61
boards/arm/cxd56xx/spresense/configs/nsh_automount/defconfig
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# | ||
# This file is autogenerated: PLEASE DO NOT EDIT IT. | ||
# | ||
# You can use "make menuconfig" to make any modifications to the installed .config file. | ||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your | ||
# modifications. | ||
# | ||
# CONFIG_CXD56_I2C0_SCUSEQ is not set | ||
# CONFIG_STANDARD_SERIAL is not set | ||
CONFIG_ARCH="arm" | ||
CONFIG_ARCH_BOARD="spresense" | ||
CONFIG_ARCH_BOARD_COMMON=y | ||
CONFIG_ARCH_BOARD_SPRESENSE=y | ||
CONFIG_ARCH_CHIP="cxd56xx" | ||
CONFIG_ARCH_CHIP_CXD56XX=y | ||
CONFIG_ARCH_STACKDUMP=y | ||
CONFIG_ARMV7M_USEBASEPRI=y | ||
CONFIG_BOARD_LOOPSPERMSEC=5434 | ||
CONFIG_BOOT_RUNFROMISRAM=y | ||
CONFIG_BUILTIN=y | ||
CONFIG_CXD56_BINARY=y | ||
CONFIG_CXD56_I2C0=y | ||
CONFIG_CXD56_I2C=y | ||
CONFIG_CXD56_SDCARD_AUTOMOUNT=y | ||
CONFIG_CXD56_SDIO=y | ||
CONFIG_CXD56_SPI4=y | ||
CONFIG_CXD56_SPI5=y | ||
CONFIG_CXD56_SPI=y | ||
CONFIG_DEBUG_FULLOPT=y | ||
CONFIG_DEBUG_SYMBOLS=y | ||
CONFIG_FAT_LCNAMES=y | ||
CONFIG_FAT_LFN=y | ||
CONFIG_FS_AUTOMOUNTER=y | ||
CONFIG_FS_AUTOMOUNTER_DRIVER=y | ||
CONFIG_FS_FAT=y | ||
CONFIG_FS_PROCFS=y | ||
CONFIG_FS_PROCFS_REGISTER=y | ||
CONFIG_HAVE_CXX=y | ||
CONFIG_HAVE_CXXINITIALIZE=y | ||
CONFIG_INIT_ENTRYPOINT="spresense_main" | ||
CONFIG_NSH_ARCHINIT=y | ||
CONFIG_NSH_BUILTIN_APPS=y | ||
CONFIG_NSH_READLINE=y | ||
CONFIG_PREALLOC_TIMERS=4 | ||
CONFIG_RAM_SIZE=1572864 | ||
CONFIG_RAM_START=0x0d000000 | ||
CONFIG_READLINE_CMD_HISTORY=y | ||
CONFIG_RR_INTERVAL=200 | ||
CONFIG_RTC=y | ||
CONFIG_RTC_DRIVER=y | ||
CONFIG_SCHED_HPWORK=y | ||
CONFIG_SCHED_WAITPID=y | ||
CONFIG_SPI=y | ||
CONFIG_SPRESENSE_EXTENSION=y | ||
CONFIG_START_DAY=6 | ||
CONFIG_START_MONTH=12 | ||
CONFIG_START_YEAR=2011 | ||
CONFIG_SYSTEM_CLE=y | ||
CONFIG_SYSTEM_NSH=y | ||
CONFIG_UART1_SERIAL_CONSOLE=y | ||
CONFIG_WQUEUE_NOTIFIER=y |
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
/**************************************************************************** | ||
* boards/arm/cxd56xx/spresense/include/cxd56_automount.h | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. The | ||
* ASF licenses this file to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
****************************************************************************/ | ||
|
||
#ifndef __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_CXD56_AUTOMOUNT_H | ||
#define __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_CXD56_AUTOMOUNT_H | ||
|
||
/**************************************************************************** | ||
* Pre-processor Definitions | ||
****************************************************************************/ | ||
|
||
#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_FSTYPE | ||
# define CONFIG_CXD56_SDCARD_AUTOMOUNT_FSTYPE "vfat" | ||
#endif | ||
|
||
#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_BLKDEV | ||
# define CONFIG_CXD56_SDCARD_AUTOMOUNT_BLKDEV "/dev/mmcds0" | ||
#endif | ||
|
||
#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_MOUNTPOINT | ||
# define CONFIG_CXD56_SDCARD_AUTOMOUNT_MOUNTPOINT "/mnt/sd0" | ||
#endif | ||
|
||
#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_DDELAY | ||
# define CONFIG_CXD56_SDCARD_AUTOMOUNT_DDELAY 1000 | ||
#endif | ||
|
||
#ifndef CONFIG_CXD56_SDCARD_AUTOMOUNT_UDELAY | ||
# define CONFIG_CXD56_SDCARD_AUTOMOUNT_UDELAY 2000 | ||
#endif | ||
|
||
/**************************************************************************** | ||
* Public Types | ||
****************************************************************************/ | ||
|
||
/**************************************************************************** | ||
* Public Data | ||
****************************************************************************/ | ||
|
||
#ifndef __ASSEMBLY__ | ||
|
||
#undef EXTERN | ||
#if defined(__cplusplus) | ||
#define EXTERN extern "C" | ||
extern "C" | ||
{ | ||
#else | ||
#define EXTERN extern | ||
#endif | ||
|
||
/**************************************************************************** | ||
* Public Functions Definitions | ||
****************************************************************************/ | ||
|
||
/**************************************************************************** | ||
* Name: board_automount_initialize | ||
* | ||
* Description: | ||
* Configure auto-mounters for each enable and so configured SDCARD | ||
* | ||
* Input Parameters: | ||
* None | ||
* | ||
* Returned Value: | ||
* None | ||
* | ||
****************************************************************************/ | ||
|
||
void board_automount_initialize(void); | ||
|
||
/**************************************************************************** | ||
* Name: board_automount_event | ||
* | ||
* Description: | ||
* The HSMCI card detection logic has detected an insertion or removal | ||
* event. It has already scheduled the MMC/SD block driver operations. | ||
* Now we need to schedule the auto-mount event which will occur with a | ||
* substantial delay to make sure that everything has settle down. | ||
* | ||
* Input Parameters: | ||
* slotno - Identifies the HSMCI0 slot: HSMCI0 or HSMCI1_SLOTNO. | ||
* There is a terminology problem here: Each HSMCI supports two slots, | ||
* slot A and slot B. Only slot A is used. So this is not a really a | ||
* slot, but an HSCMI peripheral number. | ||
* inserted - True if the card is inserted in the slot. False otherwise. | ||
* | ||
* Returned Value: | ||
* None | ||
* | ||
* Assumptions: | ||
* Interrupts are disabled. | ||
* | ||
****************************************************************************/ | ||
|
||
void board_automount_event(int slotno, bool inserted); | ||
|
||
#undef EXTERN | ||
#if defined(__cplusplus) | ||
} | ||
#endif | ||
|
||
#endif /* __ASSEMBLY__ */ | ||
#endif /* __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_CXD56_AUTOMOUNT_H */ |
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
Oops, something went wrong.