Lines Matching refs:sfdpBuffer
235 uint8_t sfdpBuffer[],
237 static uint32_t SfdpFindParameterHeader(uint32_t id, uint8_t const sfdpBuffer[]);
239 uint8_t const sfdpBuffer[],
242 static uint32_t SfdpGetNumOfAddrBytes(uint8_t const sfdpBuffer[], uint32_t memorySize);
243 static uint32_t SfdpGetMemoryDensity(uint8_t const sfdpBuffer[]);
244 static void SfdpGetReadCmd_1_4_4(uint8_t const sfdpBuffer[],
246 static void SfdpGetReadCmd_1_1_4(uint8_t const sfdpBuffer[],
248 static void SfdpGetReadCmd_1_2_2(uint8_t const sfdpBuffer[],
250 static void SfdpGetReadCmd_1_1_2(uint8_t const sfdpBuffer[],
252 static void SfdpGetReadCmd_1_1_1(uint8_t const sfdpBuffer[],
254 static cy_en_smif_protocol_mode_t SfdpGetReadCmdParams(uint8_t const sfdpBuffer[],
258 static void SfdpGetReadFourBytesCmd(uint8_t const sfdpBuffer[],
261 static uint32_t SfdpGetPageSize(uint8_t const sfdpBuffer[]);
262 static uint32_t SfdpGetEraseTime(uint32_t const eraseOffset, uint8_t const sfdpBuffer[], cy_stc_smi…
263 static uint32_t SfdpGetChipEraseTime(uint8_t const sfdpBuffer[]);
264 static uint32_t SfdpGetPageProgramTime(uint8_t const sfdpBuffer[]);
271 static void SfdpGetProgramFourBytesCmd(uint8_t const sfdpBuffer[],
276 uint8_t const sfdpBuffer[],
282 static void SfdpGetEraseSizeAndCmd(uint8_t const sfdpBuffer[], cy_stc_smif_erase_type_t eraseType[]…
417 uint8_t sfdpBuffer[], in SfdpReadBuffer() argument
435 sfdpBuffer, in SfdpReadBuffer()
466 result = Cy_SMIF_ReceiveDataBlocking_Ext(base, sfdpBuffer, size, in SfdpReadBuffer()
493 static uint32_t SfdpFindParameterHeader(uint32_t id, uint8_t const sfdpBuffer[]) in SfdpFindParameterHeader() argument
499 while (sfdpAddress <= (((uint32_t)sfdpBuffer[PARAM_HEADERS_NUM] * in SfdpFindParameterHeader()
504 if (((id & PARAM_ID_LSB_MASK) == sfdpBuffer[sfdpAddress]) && /* Parameter ID LSB */ in SfdpFindParameterHeader()
506 sfdpBuffer[sfdpAddress + /* Parameter ID MSB */ in SfdpFindParameterHeader()
510 if ((sfdpBuffer[sfdpAddress + PARAM_MINOR_REV_REL_OFFSET] >= maxMinorRevison) && in SfdpFindParameterHeader()
511 (sfdpBuffer[sfdpAddress + PARAM_MAJOR_REV_REL_OFFSET] == CY_SMIF_SFDP_MAJOR_REV_1)) in SfdpFindParameterHeader()
514 maxMinorRevison = sfdpBuffer[sfdpAddress + PARAM_MINOR_REV_REL_OFFSET]; in SfdpFindParameterHeader()
549 uint8_t const sfdpBuffer[], in SfdpFindParameterTableAddress() argument
555 headerOffset = SfdpFindParameterHeader(id, sfdpBuffer); in SfdpFindParameterTableAddress()
560 address[2] = sfdpBuffer[headerOffset + in SfdpFindParameterTableAddress()
562 address[1] = sfdpBuffer[headerOffset + in SfdpFindParameterTableAddress()
564 address[0] = sfdpBuffer[headerOffset + in SfdpFindParameterTableAddress()
568 *tableLength = (uint8_t)sfdpBuffer[headerOffset + PARAM_TABLE_LENGTH_OFFSET] * in SfdpFindParameterTableAddress()
597 static uint32_t SfdpGetNumOfAddrBytes(uint8_t const sfdpBuffer[], uint32_t memorySize) in SfdpGetNumOfAddrBytes() argument
601 (uint32_t)sfdpBuffer in SfdpGetNumOfAddrBytes()
647 static uint32_t SfdpGetMemoryDensity(uint8_t const sfdpBuffer[]) in SfdpGetMemoryDensity() argument
650 uint32_t locSize = Cy_SMIF_PackBytesArray(&sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_04], true); in SfdpGetMemoryDensity()
680 static void SfdpGetReadCmd_1_8_8(uint8_t const sfdpBuffer[], in SfdpGetReadCmd_1_8_8() argument
684 cmdRead->command = sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_41]; in SfdpGetReadCmd_1_8_8()
697 (uint32_t) sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_40]))) in SfdpGetReadCmd_1_8_8()
710 (uint32_t) sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_40]); in SfdpGetReadCmd_1_8_8()
736 static void SfdpGetReadCmd_1_1_8(uint8_t const sfdpBuffer[], in SfdpGetReadCmd_1_1_8() argument
740 cmdRead->command = sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_43]; in SfdpGetReadCmd_1_1_8()
753 (uint32_t) sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_42]))) in SfdpGetReadCmd_1_1_8()
766 (uint32_t)sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_42]); in SfdpGetReadCmd_1_1_8()
797 static void SfdpGetReadCmd_1S_4D_4D(uint8_t const sfdpBuffer[], in SfdpGetReadCmd_1S_4D_4D() argument
818 (uint32_t) sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_08]))) in SfdpGetReadCmd_1S_4D_4D()
832 (uint32_t) sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_08]); in SfdpGetReadCmd_1S_4D_4D()
861 static void SfdpGetReadCmd_1_4_4(uint8_t const sfdpBuffer[], in SfdpGetReadCmd_1_4_4() argument
865 cmdRead->command = sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_09]; in SfdpGetReadCmd_1_4_4()
880 (uint32_t) sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_08]))) in SfdpGetReadCmd_1_4_4()
895 (uint32_t) sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_08]); in SfdpGetReadCmd_1_4_4()
924 static void SfdpGetReadCmd_1_1_4(uint8_t const sfdpBuffer[], in SfdpGetReadCmd_1_1_4() argument
928 cmdRead->command = sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_0B]; in SfdpGetReadCmd_1_1_4()
937 if ((0U == _FLD2VAL(CY_SMIF_SFDP_1_1_4_MODE_CYCLES, (uint32_t) sfdpBuffer in SfdpGetReadCmd_1_1_4()
953 (uint32_t)sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_0A]); in SfdpGetReadCmd_1_1_4()
982 static void SfdpGetReadCmd_1_2_2(uint8_t const sfdpBuffer[], in SfdpGetReadCmd_1_2_2() argument
986 cmdRead->command = sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_0F]; in SfdpGetReadCmd_1_2_2()
996 sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_0E])) in SfdpGetReadCmd_1_2_2()
1011 (uint32_t) sfdpBuffer [CY_SMIF_SFDP_BFPT_BYTE_0E]); in SfdpGetReadCmd_1_2_2()
1040 static void SfdpGetReadCmd_1_1_2(uint8_t const sfdpBuffer[], in SfdpGetReadCmd_1_1_2() argument
1044 cmdRead->command = sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_0D]; in SfdpGetReadCmd_1_1_2()
1054 sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_0C]))) in SfdpGetReadCmd_1_1_2()
1069 (uint32_t)sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_0C]); in SfdpGetReadCmd_1_1_2()
1098 static void SfdpGetReadCmd_1_1_1(uint8_t const sfdpBuffer[], in SfdpGetReadCmd_1_1_1() argument
1101 (void)sfdpBuffer; /* Suppress warning */ in SfdpGetReadCmd_1_1_1()
1148 static cy_en_smif_protocol_mode_t SfdpGetReadCmdParams(uint8_t const sfdpBuffer[], in SfdpGetReadCmdParams() argument
1162 ((uint32_t) sfdpBuffer[sfdpDataIndex]))) in SfdpGetReadCmdParams()
1166 if(_FLD2BOOL(CY_SMIF_SFDP_DTR_SUPPORT, (uint32_t) sfdpBuffer[sfdpDataIndex])) in SfdpGetReadCmdParams()
1168 SfdpGetReadCmd_1S_4D_4D(sfdpBuffer, cmdRead); in SfdpGetReadCmdParams()
1173 SfdpGetReadCmd_1_4_4(sfdpBuffer, cmdRead); in SfdpGetReadCmdParams()
1177 SfdpGetReadCmd_1_4_4(sfdpBuffer, cmdRead); in SfdpGetReadCmdParams()
1182 ((uint32_t)sfdpBuffer[sfdpDataIndex]))) in SfdpGetReadCmdParams()
1184 SfdpGetReadCmd_1_1_4(sfdpBuffer, cmdRead); in SfdpGetReadCmdParams()
1197 (uint32_t)sfdpBuffer[sfdpDataIndex])) && in SfdpGetReadCmdParams()
1200 SfdpGetReadCmd_1_2_2(sfdpBuffer, cmdRead); in SfdpGetReadCmdParams()
1206 (uint32_t)sfdpBuffer[sfdpDataIndex]) && in SfdpGetReadCmdParams()
1209 SfdpGetReadCmd_1_1_2(sfdpBuffer, cmdRead); in SfdpGetReadCmdParams()
1214 SfdpGetReadCmd_1_1_1(sfdpBuffer, cmdRead); in SfdpGetReadCmdParams()
1302 static void SfdpGetReadFourBytesCmd(uint8_t const sfdpBuffer[], in SfdpGetReadFourBytesCmd() argument
1311 uint32_t sfdpForBytesTableDword1 = ((uint32_t*)sfdpBuffer)[FOUR_BYTE_ADDRESS_TABLE_BYTE_0]; in SfdpGetReadFourBytesCmd()
1364 static uint32_t SfdpGetPageSize(uint8_t const sfdpBuffer[]) in SfdpGetPageSize() argument
1370 (uint32_t) sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_28]); in SfdpGetPageSize()
1394 static uint32_t SfdpGetEraseTime(uint32_t const eraseOffset, uint8_t const sfdpBuffer[], cy_stc_smi… in SfdpGetEraseTime() argument
1397 uint32_t readEraseTime = ((uint32_t*)sfdpBuffer)[CY_SMIF_JEDEC_BFPT_10TH_DWORD]; in SfdpGetEraseTime()
1453 static uint32_t SfdpGetChipEraseTime(uint8_t const sfdpBuffer[]) in SfdpGetChipEraseTime() argument
1456 uint32_t readEraseTime = ((uint32_t*)sfdpBuffer)[CY_SMIF_JEDEC_BFPT_10TH_DWORD]; in SfdpGetChipEraseTime()
1459 uint32_t chipEraseProgTime = ((uint32_t*)sfdpBuffer)[CY_SMIF_JEDEC_BFPT_11TH_DWORD]; in SfdpGetChipEraseTime()
1507 static uint32_t SfdpGetPageProgramTime(uint8_t const sfdpBuffer[]) in SfdpGetPageProgramTime() argument
1510 uint32_t chipEraseProgTime = ((uint32_t*)sfdpBuffer)[CY_SMIF_JEDEC_BFPT_11TH_DWORD]; in SfdpGetPageProgramTime()
1732 static void SfdpGetProgramFourBytesCmd(uint8_t const sfdpBuffer[], in SfdpGetProgramFourBytesCmd() argument
1739 uint32_t sfdpForBytesTableDword1 = ((uint32_t*)sfdpBuffer)[FOUR_BYTE_ADDRESS_TABLE_BYTE_0]; in SfdpGetProgramFourBytesCmd()
1864 uint8_t const sfdpBuffer[], in SfdpGetSectorEraseCommand() argument
1879 …eraseTypeMask = _FLD2VAL(SUPPORT_ERASE_COMMAND, (uint32_t)sfdpBuffer[FOUR_BYTE_ADDRESS_TABLE_BYTE_… in SfdpGetSectorEraseCommand()
1899 eraseTypeStc[i].eraseCmd = sfdpBuffer[FOUR_BYTE_ADDR_ERASE_TYPE_1 + i]; in SfdpGetSectorEraseCommand()
1904 device->eraseCmd->command = sfdpBuffer[eraseOffset]; in SfdpGetSectorEraseCommand()
1918 while (INSTRUCTION_NOT_SUPPORTED == sfdpBuffer[eraseOffset]) in SfdpGetSectorEraseCommand()
1932 device->eraseCmd->command = sfdpBuffer[eraseOffset]; in SfdpGetSectorEraseCommand()
2053 static void SfdpGetEraseSizeAndCmd(uint8_t const sfdpBuffer[], in SfdpGetEraseSizeAndCmd() argument
2060 eraseType[currET].eraseSize = 1UL << sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_1C + idx]; in SfdpGetEraseSizeAndCmd()
2061 eraseType[currET].eraseCmd = sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_1D + idx]; in SfdpGetEraseSizeAndCmd()
2270 uint8_t sfdpBuffer[], in GetOctalSDRParams() argument
2288 SfdpGetReadCmd_1_8_8(sfdpBuffer, cmdRead); in GetOctalSDRParams()
2294 SfdpGetReadCmd_1_1_8(sfdpBuffer, cmdRead); in GetOctalSDRParams()
2588 uint8_t sfdpBuffer[CY_SMIF_SFDP_LENGTH]; in Cy_SMIF_MemInitSfdpMode() local
2609 sfdpBuffer[i] = 0U; in Cy_SMIF_MemInitSfdpMode()
2630 …result = SfdpReadBuffer(base, cmdSfdp, sfdpAddress, slaveSelect, HEADERS_LENGTH, sfdpBuffer, conte… in Cy_SMIF_MemInitSfdpMode()
2638 (sfdpBuffer[CY_SMIF_SFDP_SIGNATURE_BYTE_00] == (uint8_t)'S') && in Cy_SMIF_MemInitSfdpMode()
2639 (sfdpBuffer[CY_SMIF_SFDP_SIGNATURE_BYTE_01] == (uint8_t)'F') && in Cy_SMIF_MemInitSfdpMode()
2640 (sfdpBuffer[CY_SMIF_SFDP_SIGNATURE_BYTE_02] == (uint8_t)'D') && in Cy_SMIF_MemInitSfdpMode()
2641 (sfdpBuffer[CY_SMIF_SFDP_SIGNATURE_BYTE_03] == (uint8_t)'P') && in Cy_SMIF_MemInitSfdpMode()
2642 (sfdpBuffer[CY_SMIF_SFDP_MAJOR_REV] == CY_SMIF_SFDP_MAJOR_REV_1)) in Cy_SMIF_MemInitSfdpMode()
2644 uint8_t sfdp_minor_revision = sfdpBuffer[CY_SMIF_SFDP_MINOR_REV]; in Cy_SMIF_MemInitSfdpMode()
2647 SfdpFindParameterTableAddress(BASIC_SPI_ID, sfdpBuffer, sfdpAddress, &basicSpiTableLength); in Cy_SMIF_MemInitSfdpMode()
2651 …SfdpFindParameterTableAddress(FOUR_BYTE_ADDR_ID, sfdpBuffer, addr4ByteAddress, &addr4ByteTableLeng… in Cy_SMIF_MemInitSfdpMode()
2652 … SfdpFindParameterTableAddress(SECTOR_MAP_ID, sfdpBuffer, sectorMapAddr, §orMapTableLength); in Cy_SMIF_MemInitSfdpMode()
2655 … SfdpFindParameterTableAddress(SCCR_MAP_SPI_ID, sfdpBuffer, sccrMapAddr, &sccrMapTableLength); in Cy_SMIF_MemInitSfdpMode()
2656 …SfdpFindParameterTableAddress(XSPI_PROFILE_1_0_ID, sfdpBuffer, xSPiProfile1Addr, &xSPIProfile1Tabl… in Cy_SMIF_MemInitSfdpMode()
2657 …SfdpFindParameterTableAddress(CMD_SEQ_FOR_ODDR_ID, sfdpBuffer, cmdSeqODDRAddr, &cmdSeqODDRTableLen… in Cy_SMIF_MemInitSfdpMode()
2677 … SfdpReadBuffer(base, cmdSfdp, sfdpAddress, slaveSelect, basicSpiTableLength, sfdpBuffer, context); in Cy_SMIF_MemInitSfdpMode()
2680 SfdpGetEraseSizeAndCmd(sfdpBuffer, eraseType); in Cy_SMIF_MemInitSfdpMode()
2683 device->memSize = SfdpGetMemoryDensity(sfdpBuffer); in Cy_SMIF_MemInitSfdpMode()
2686 device->numOfAddrBytes = SfdpGetNumOfAddrBytes(sfdpBuffer, device->memSize); in Cy_SMIF_MemInitSfdpMode()
2708 … (uint32_t)sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_3A]))); in Cy_SMIF_MemInitSfdpMode()
2727 device->programSize = SfdpGetPageSize(sfdpBuffer); in Cy_SMIF_MemInitSfdpMode()
2730 device->chipEraseTime = SfdpGetChipEraseTime(sfdpBuffer); in Cy_SMIF_MemInitSfdpMode()
2733 device->programTime = SfdpGetPageProgramTime(sfdpBuffer); in Cy_SMIF_MemInitSfdpMode()
2754 pMode = SfdpGetReadCmdParams(sfdpBuffer, dataSelect, maxdataWidth, cmdRead); in Cy_SMIF_MemInitSfdpMode()
2761 …result = SfdpEnterFourByteAddressing(base, sfdpBuffer[CY_SMIF_SFDP_BFPT_BYTE_3F], device, slaveSel… in Cy_SMIF_MemInitSfdpMode()
2796 … octalProtocolMode = GetOctalSDRParams(base, sfdpBuffer, device, slaveSelect, octal_sdr_param, in Cy_SMIF_MemInitSfdpMode()
2834 eraseTypeOffset = SfdpGetSectorEraseCommand(device, sfdpBuffer, eraseType); in Cy_SMIF_MemInitSfdpMode()
2840 device->eraseSize = 0x01UL << sfdpBuffer[eraseTypeOffset - 1UL]; in Cy_SMIF_MemInitSfdpMode()
2845 … device->eraseTime = SfdpGetEraseTime(eraseTypeOffset, sfdpBuffer, eraseType); in Cy_SMIF_MemInitSfdpMode()
2857 sectorMapTableLength, sfdpBuffer, context); in Cy_SMIF_MemInitSfdpMode()
2860 …result = SfdpPopulateRegionInfo(base, sfdpBuffer, sectorMapTableLength, device, slaveSelect, conte… in Cy_SMIF_MemInitSfdpMode()