summaryrefslogtreecommitdiff
path: root/nuttx/configs/ea3131
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-09-02 20:52:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-09-02 20:52:55 +0000
commitb6cb65fb09dcc2dd447fabb2887b147a26797e6c (patch)
treea0454230a01dd2f529250d561fc19cf6043e8381 /nuttx/configs/ea3131
parente6c9c298cdac89f361b9c86a3cf62b7439bd9e73 (diff)
downloadpx4-nuttx-b6cb65fb09dcc2dd447fabb2887b147a26797e6c.tar.gz
px4-nuttx-b6cb65fb09dcc2dd447fabb2887b147a26797e6c.tar.bz2
px4-nuttx-b6cb65fb09dcc2dd447fabb2887b147a26797e6c.zip
Add paging initialization point
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2911 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/ea3131')
-rwxr-xr-xnuttx/configs/ea3131/src/ea3131_internal.h14
-rwxr-xr-xnuttx/configs/ea3131/src/up_boot.c9
-rwxr-xr-xnuttx/configs/ea3131/src/up_fillpage.c24
3 files changed, 46 insertions, 1 deletions
diff --git a/nuttx/configs/ea3131/src/ea3131_internal.h b/nuttx/configs/ea3131/src/ea3131_internal.h
index 504212c26..58368e80e 100755
--- a/nuttx/configs/ea3131/src/ea3131_internal.h
+++ b/nuttx/configs/ea3131/src/ea3131_internal.h
@@ -2,7 +2,7 @@
* configs/ea3131/src/ea3131_internal.h
* arch/arm/src/board/ea3131_internal.n
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -106,6 +106,18 @@ extern void weak_function lpc313x_spiinitialize(void);
extern void weak_function lpc313x_usbinitialize(void);
+/************************************************************************************
+ * Name: lpc313x_pginitialize
+ *
+ * Description:
+ * Set up mass storage device to support on demand paging.
+ *
+ ************************************************************************************/
+
+#ifdef CONFIG_PAGING
+extern void weak_function lpc313x_pginitialize(void);
+#endif
+
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_EA3131_SRC_EA3131_INTERNAL_H */
diff --git a/nuttx/configs/ea3131/src/up_boot.c b/nuttx/configs/ea3131/src/up_boot.c
index fc37a7ea9..59ed9e778 100755
--- a/nuttx/configs/ea3131/src/up_boot.c
+++ b/nuttx/configs/ea3131/src/up_boot.c
@@ -107,4 +107,13 @@ void lpc313x_boardinitialize(void)
#ifdef CONFIG_ARCH_LEDS
up_ledinit();
#endif
+
+ /* Set up mass storage device to support on demand paging */
+
+#if defined(CONFIG_PAGING)
+ if (lpc313x_pginitialize)
+ {
+ lpc313x_pginitialize();
+ }
+#endif
}
diff --git a/nuttx/configs/ea3131/src/up_fillpage.c b/nuttx/configs/ea3131/src/up_fillpage.c
index 2c238c9a1..04f2e8157 100755
--- a/nuttx/configs/ea3131/src/up_fillpage.c
+++ b/nuttx/configs/ea3131/src/up_fillpage.c
@@ -132,4 +132,28 @@ int up_fillpage(FAR _TCB *tcb, FAR void *vpage, up_pgcallback_t pg_callback)
}
#endif
+/************************************************************************************
+ * Name: lpc313x_pginitialize
+ *
+ * Description:
+ * Set up mass storage device to support on demand paging.
+ *
+ ************************************************************************************/
+
+void weak_function lpc313x_pginitialize(void)
+{
+ /* This initialization does nothing in this example setup. But this function is
+ * where you might, for example:
+ *
+ * - Initialize and configure a mass storage device to support on-demand paging.
+ * This might be, perhaps an SD card or NAND memory. An SPI FLASH would probably
+ * already have been configured by lpc313x_spiinitialize(void);
+ * - Set up resources to support up_fillpage() operation. For example, perhaps the
+ * the text image is stored in a named binary file. In this case, the virtual
+ * text addresses might map to offsets into that file.
+ * - Do whatever else is necessary to make up_fillpage() ready for the first time
+ * that it is called.
+ */
+}
+
#endif /* CONFIG_PAGING */