summaryrefslogtreecommitdiffstats
path: root/bsps/include
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2023-05-19 12:47:32 -0500
committerJoel Sherrill <joel@rtems.org>2023-06-08 09:48:44 -0500
commita67aab6cd4490479b002082cacf3222c59b22c82 (patch)
treefe54afaff55c4edbccfbc7bfeff9fc8dbc33ac8e /bsps/include
parentxilinx-zynqmp: Include <rtems/libio.h> for rtems_termios_initialize() (diff)
downloadrtems-a67aab6cd4490479b002082cacf3222c59b22c82.tar.bz2
bsps/xqspipsu: Ensure NOR writes align
This change causes NOR writes to be broken according to page boundaries. Writes across page boundaries cause the writes beyond the boundary to fail silently. This also introduces a new function that will explicitly write pages.
Diffstat (limited to 'bsps/include')
-rw-r--r--bsps/include/dev/spi/xqspipsu-flash-helper.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/bsps/include/dev/spi/xqspipsu-flash-helper.h b/bsps/include/dev/spi/xqspipsu-flash-helper.h
index 22f85f156c..1e16acaf06 100644
--- a/bsps/include/dev/spi/xqspipsu-flash-helper.h
+++ b/bsps/include/dev/spi/xqspipsu-flash-helper.h
@@ -49,11 +49,34 @@ int QspiPsu_NOR_Erase(
* @note None.
*
******************************************************************************/
+int QspiPsu_NOR_Write_Page(
+ XQspiPsu *QspiPsuPtr,
+ u32 Address,
+ u32 ByteCount,
+ u8 *WriteBfrPtr
+);
+
+/*****************************************************************************/
+/**
+ *
+ * This function writes to the serial Flash connected to the QSPIPSU interface.
+ * Writes will be broken into device page sized and aligned writes as necessary.
+ *
+ * @param QspiPsuPtr is a pointer to the QSPIPSU driver component to use.
+ * @param Address contains the address to write data to in the Flash.
+ * @param ByteCount contains the number of bytes to write.
+ * @param WriteBfrPtr is pointer to the write buffer (which is to be transmitted)
+ *
+ * @return XST_SUCCESS if successful, else XST_FAILURE.
+ *
+ * @note None.
+ *
+ ******************************************************************************/
int QspiPsu_NOR_Write(
XQspiPsu *QspiPsuPtr,
u32 Address,
u32 ByteCount,
- u8 *WriteBfrPtr
+ u8 *WriteBfrPtr
);
/*****************************************************************************/