diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-03 08:50:24 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-03 08:50:24 -0600 |
commit | 2402eced70d977512d62c264a2bdea86dc486342 (patch) | |
tree | cc5b7caa8fa3c02404563c495851f251a96066a9 /nuttx/fs | |
parent | d93e86a5b218825946068fa70b263d75d09d4623 (diff) | |
download | px4-nuttx-2402eced70d977512d62c264a2bdea86dc486342.tar.gz px4-nuttx-2402eced70d977512d62c264a2bdea86dc486342.tar.bz2 px4-nuttx-2402eced70d977512d62c264a2bdea86dc486342.zip |
CCM PROCFS: Changed the configuration a bit. I am still not happy about the coupling between procfs, mtd, and now STM32
Diffstat (limited to 'nuttx/fs')
-rw-r--r-- | nuttx/fs/procfs/Kconfig | 11 | ||||
-rw-r--r-- | nuttx/fs/procfs/fs_procfs.c | 16 |
2 files changed, 19 insertions, 8 deletions
diff --git a/nuttx/fs/procfs/Kconfig b/nuttx/fs/procfs/Kconfig index 16fb8ce97..633aef420 100644 --- a/nuttx/fs/procfs/Kconfig +++ b/nuttx/fs/procfs/Kconfig @@ -55,10 +55,9 @@ config FS_PROCFS_EXCLUDE_SMARTFS default n config FS_PROCFS_EXCLUDE_CCM - bool "Exclude ccm memory usage" - depends on STM32_CCMEXCLUDE - default n - -endmenu + bool "Exclude CCM memory usage" + depends on STM32_CCM_PROCFS + default n -endif +endmenu # +endif # FS_PROCFS diff --git a/nuttx/fs/procfs/fs_procfs.c b/nuttx/fs/procfs/fs_procfs.c index 9ed3c3e58..8714f0d41 100644 --- a/nuttx/fs/procfs/fs_procfs.c +++ b/nuttx/fs/procfs/fs_procfs.c @@ -78,10 +78,21 @@ extern const struct procfs_operations proc_operations; extern const struct procfs_operations cpuload_operations; extern const struct procfs_operations uptime_operations; + +/* This is not good. These are implemented in drivers/mtd. Having to + * deal with them here is not a good coupling. + */ + extern const struct procfs_operations mtd_procfsoperations; extern const struct procfs_operations part_procfsoperations; extern const struct procfs_operations smartfs_procfsoperations; -#if defined(CONFIG_STM32_CCMEXCLUDE) && defined(CONFIG_MM_MULTIHEAP) && !defined(FS_PROCFS_EXCLUDE_CCM) + +/* And even worse, this one is specific to the STM32. The solution to + * this nasty couple would be to replace this hard-coded, ROM-able + * operations table with a RAM-base registration table. + */ + +#if defined(CONFIG_STM32_CCM_PROCFS) extern const struct procfs_operations ccm_procfsoperations; #endif @@ -117,7 +128,8 @@ static const struct procfs_entry_s g_procfsentries[] = #if !defined(CONFIG_FS_PROCFS_EXCLUDE_UPTIME) { "uptime", &uptime_operations }, #endif -#if defined(CONFIG_STM32_CCMEXCLUDE) && defined(CONFIG_MM_MULTIHEAP) && !defined(FS_PROCFS_EXCLUDE_CCM) + +#if defined(#if defined(CONFIG_STM32_CCM_PROCFS) { "ccm", &ccm_procfsoperations }, #endif }; |