static PXA_PLATFROM_DFC_FLASH_TYPE_INFO typeInfo[] = {
{SAMSUNG_CODE, 0x46, PXA_PLATFORM_DFC_FLASH_Samsung512MbX16, &samsung512MbX16},
{MICRON_CODE, 0xA1, PXA_PLATFORM_DFC_FLASH_Micron1GbX8, µn1GbX8},
{MICRON_CODE, 0xB1, PXA_PLATFORM_DFC_FLASH_Micron1GbX16, µn1GbX16},
{STM_CODE, 0xA1, PXA_PLATFORM_DFC_FLASH_STM1GbX8, &stm1GbX8},
{STM_CODE, 0xBA, PXA_PLATFORM_DFC_FLASH_STM2GbX16, &stm2GbX16},
{TOSHIBA_CODE, 0xBA, PXA_PLATFORM_DFC_FLASH_TOSHIBA2GbX16, &toshiba2GbX16},
{STM_CODE, 0xB1, PXA_PLATFORM_DFC_FLASH_STM1GbX16, &stm1GbX16},
{0, 0, PXA_PLATFORM_DFC_FLASH_NULL},
};
static INT32 Samsung512MbX16Addr2NDCB1(UINT16 cmd, UINT32 addr, UINT32 *pNdcb1)
{
UINT32 ndcb1 = 0;
if (addr >= 0x4000000)
return DFC_API_ILLEGAL_ADDR;
if (cmd == samsung512MbX16.read1 || cmd == samsung512MbX16.program) {
ndcb1 = (addr & 0xFF) | ((addr >> 1) & 0x01FFFF00);
}
else if (cmd == samsung512MbX16.erase) {
ndcb1 = ((addr >> 9) & 0x00FFFFFF);
}
*pNdcb1 = ndcb1;
return DFC_API_SUCCESS;
}
static INT32 Samsung512MbX16NDBBR2Addr(UINT16 cmd, UINT32 ndbbr, UINT32 *pAddr)
{
*pAddr = ndbbr = 0x8000000)
return DFC_API_ILLEGAL_ADDR;
page = addr / micron1GbX8.pageSize;
addr = (page / micron1GbX8.pagePerBlock) 6) = 0x8000000)
return DFC_API_ILLEGAL_ADDR;
page = addr / micron1GbX16.pageSize;
addr = (page / micron1GbX16.pagePerBlock) 6) = 0x8000000)
return DFC_API_ILLEGAL_ADDR;
page = addr / stm1GbX16.pageSize;
addr = (page / stm1GbX16.pagePerBlock) 6) = 0x8000000)
return DFC_API_ILLEGAL_ADDR;
page = addr / stm1GbX8.pageSize;
addr = (page / stm1GbX8.pagePerBlock) 6)