summaryrefslogtreecommitdiffstats
path: root/bsps/include/dev/spi/xqspipsu-flash-helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/include/dev/spi/xqspipsu-flash-helper.h')
-rw-r--r--bsps/include/dev/spi/xqspipsu-flash-helper.h84
1 files changed, 83 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..e689660881 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
);
/*****************************************************************************/
@@ -108,3 +131,62 @@ int QspiPsu_NOR_Read_Ecc(
u32 Address,
u8 *ReadBfrPtr
);
+
+/*****************************************************************************/
+/**
+ *
+ * This function returns the size of attached flash parts.
+ *
+ * @param QspiPsuPtr is a pointer to the QSPIPSU driver component to use.
+ *
+ * @return The size of attached flash in bytes.
+ *
+ ******************************************************************************/
+u32 QspiPsu_NOR_Get_Device_Size(XQspiPsu *QspiPsuPtr);
+
+/*****************************************************************************/
+/**
+ *
+ * This function returns the sector size of attached flash parts.
+ *
+ * @param QspiPsuPtr is a pointer to the QSPIPSU driver component to use.
+ *
+ * @return The sector size of attached flash in bytes.
+ *
+ ******************************************************************************/
+u32 QspiPsu_NOR_Get_Sector_Size(XQspiPsu *QspiPsuPtr);
+
+/*****************************************************************************/
+/**
+ *
+ * This function performs a read of the RDID configuration space.
+ *
+ * @param QspiPsuPtr is a pointer to the QSPIPSU driver component to use.
+ * @param ReadBfrPtr is a pointer to a buffer to be filled with
+ * configuration data.
+ * @param ReadLen is the total length of the configuration space to read.
+ *
+ * @return XST_SUCCESS if successful, else XST_FAILURE.
+ *
+ ******************************************************************************/
+int QspiPsu_NOR_RDID(XQspiPsu *QspiPsuPtr, u8 *ReadBfrPtr, u32 ReadLen);
+
+/*****************************************************************************/
+/**
+ *
+ * This function performs a read of the SFDP configuration space.
+ *
+ * @param QspiPsuPtr is a pointer to the QSPIPSU driver component to use.
+ * @param ReadBfrPtr is a pointer to a buffer to be filled with
+ * configuration data.
+ * @param ReadLen is the total length of the configuration space to read.
+ *
+ * @return XST_SUCCESS if successful, else XST_FAILURE.
+ *
+ ******************************************************************************/
+int QspiPsu_NOR_RDSFDP(
+ XQspiPsu *QspiPsuPtr,
+ u32 Address,
+ u32 ByteCount,
+ u8 **ReadBfrPtr
+);