Skip to content

Commit 05d3aeb

Browse files
author
Shivank Sharma
committed
allsoc: ospi: fix pointer usage in driver
- fix void pointer usage - ospi dma integration cleanup Fixes: MCUSDK-14635 Signed-off-by: Shivank Sharma <s-sharma6@ti.com>
1 parent 19bf18b commit 05d3aeb

39 files changed

Lines changed: 117 additions & 491 deletions

examples/drivers/ospi/ospi_flash_dma_lld/ospi_flash_dma_lld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void ospi_flash_dma_lld(void *args)
7575

7676
#if defined (SOC_AM64X)
7777
/* The OSPI Controller will be configured in 8s-8s-8s mode */
78-
OSPI_setProtocol(gOspiHandle,525320);
78+
OSPI_lld_setProtocol(gOspiHandle,525320);
7979
#endif
8080

8181
OSPI_lld_configResetPin(gOspiHandle,2);

source/board/flash/ospi/flash_nor_ospi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ static int32_t Flash_norOspiSet4ByteAddrMode(Flash_Config *config)
299299
return status;
300300
}
301301

302-
static int32_t Flash_norOspiSetAddressBytes(Flash_Config *config, void *ospiHandle)
302+
static int32_t Flash_norOspiSetAddressBytes(Flash_Config *config, OSPI_Handle ospiHandle)
303303
{
304304
int32_t status = SystemP_SUCCESS;
305305
Flash_DevConfig *devCfg = config->devConfig;
@@ -504,7 +504,7 @@ static int32_t Flash_setOeBit(Flash_Config *config, uint8_t oeType)
504504
return status;
505505
}
506506

507-
static int32_t Flash_norOspiSetModeDummy(Flash_Config *config, void *ospiHandle)
507+
static int32_t Flash_norOspiSetModeDummy(Flash_Config *config, OSPI_Handle ospiHandle)
508508
{
509509
int32_t status = SystemP_SUCCESS;
510510
Flash_DevConfig *devCfg = config->devConfig;
@@ -546,7 +546,7 @@ static int32_t Flash_norOspiSetModeDummy(Flash_Config *config, void *ospiHandle)
546546
return status;
547547
}
548548

549-
static int32_t Flash_norOspiSetDTR(Flash_Config *config, void *ospiHandle)
549+
static int32_t Flash_norOspiSetDTR(Flash_Config *config, OSPI_Handle ospiHandle)
550550
{
551551
int32_t status = SystemP_SUCCESS;
552552

@@ -727,11 +727,11 @@ static int32_t Flash_set888mode(Flash_Config *config, uint8_t seq)
727727
return status;
728728
}
729729

730-
static int32_t Flash_norOspiSetProtocol(Flash_Config *config, void *ospiHandle, Flash_Params *params)
730+
static int32_t Flash_norOspiSetProtocol(Flash_Config *config, OSPI_Handle ospiHandle, Flash_Params *params)
731731
{
732732
int32_t status = SystemP_SUCCESS;
733733

734-
if((config == NULL) || (NULL == ospiHandle))
734+
if((config == NULL) || (ospiHandle == NULL))
735735
{
736736
status = SystemP_FAILURE;
737737
}

source/drivers/.project/project_am243x.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ const files_r5f = {
8383
"ospi_v0_lld.c",
8484
"ospi_phy_dqs_lld.c",
8585
"ospi_nor_flash_lld.c",
86-
"ospi_lld_dma.c",
8786
"ospi_udma_lld.c",
8887
"ospi_phy_tuning.c",
8988
"pcie.c",

source/drivers/.project/project_am261x.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ const files_r5f = {
6969
"ospi_v0_lld.c",
7070
"ospi_phy_am26x_lld.c",
7171
"ospi_nor_flash_lld.c",
72-
"ospi_lld_dma.c",
7372
"ospi_edma_lld.c",
7473
"pinmux.c",
7574
"pmu.c",

source/drivers/.project/project_am263px.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ const files_r5f = {
6868
"ospi_v0_lld.c",
6969
"ospi_phy_am26x_lld.c",
7070
"ospi_nor_flash_lld.c",
71-
"ospi_lld_dma.c",
7271
"ospi_edma_lld.c",
7372
"pinmux.c",
7473
"pmu.c",

source/drivers/.project/project_am64x.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ const files_r5f = {
8383
"ospi_v0_lld.c",
8484
"ospi_phy_dqs_lld.c",
8585
"ospi_nor_flash_lld.c",
86-
"ospi_lld_dma.c",
8786
"ospi_udma_lld.c",
8887
"ospi_phy_tuning.c",
8988
"pcie.c",
@@ -226,7 +225,7 @@ const files_a53 = {
226225
"ospi_v0_lld.c",
227226
"ospi_phy_dqs_lld.c",
228227
"ospi_nor_flash_lld.c",
229-
"ospi_lld_dma.c",
228+
//"ospi_lld_dma.c",
230229
"ospi_udma_lld.c",
231230
"ospi_phy_tuning.c",
232231
"pinmux.c",

source/drivers/.project/project_am65x.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ const files_r5f = {
4646
"ospi_v0_lld.c",
4747
"ospi_phy_dqs_lld.c",
4848
"ospi_nor_flash_lld.c",
49-
"ospi_lld_dma.c",
5049
"ospi_udma_lld.c",
5150
"pinmux.c",
5251
"pcie.c",

source/drivers/hw_include/am261x/soc_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ extern "C"
9595
/* Driver DMA integration */
9696
#define DMA_VERSION_MCSPI_EDMA
9797
#define DMA_VERSION_UART_EDMA
98+
#define DMA_VERSION_OSPI_EDMA
9899
#define DMA_VERSION_GPMC_EDMA
99100
#define DMA_VERSION_CANFD_EDMA
100101

source/drivers/hw_include/am263px/soc_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ extern "C"
9393

9494
/* Driver DMA integration */
9595
#define DMA_VERSION_MCSPI_EDMA
96+
#define DMA_VERSION_OSPI_EDMA
9697
#define DMA_VERSION_UART_EDMA
9798
#define DMA_VERSION_CANFD_EDMA
9899

source/drivers/hw_include/am64x_am243x/soc_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ extern "C"
110110
/* Driver DMA integration */
111111
#define DMA_VERSION_MCSPI_UDMA
112112
#define DMA_VERSION_UART_UDMA
113+
#define DMA_VERSION_OSPI_UDMA
113114
#define DMA_VERSION_GPMC_UDMA
114115
#define DMA_VERSION_CANFD_UDMA
115116

0 commit comments

Comments
 (0)