From: hadaq Date: Sun, 22 May 2011 20:49:31 +0000 (+0000) Subject: pexor dma support added X-Git-Tag: v6.0~155 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=8f7d2e15574341a0ae45c8a087c18f3871911fe9;p=trbnettools.git pexor dma support added --- diff --git a/libtrbnet/trbflash.c b/libtrbnet/trbflash.c index fab3c05..6646b56 100644 --- a/libtrbnet/trbflash.c +++ b/libtrbnet/trbflash.c @@ -75,7 +75,8 @@ typedef enum FLASH_SHOWER_ADDON_V2_FPGA3 = 10, FLASH_CTS_FPGA1 = 11, - FLASH_CTS_FPGA2 = 12 + FLASH_CTS_FPGA2 = 12, + FLASH_PEXOR = 13 } FlashType; static const char FlashTypeStr[16][32] = { @@ -91,12 +92,13 @@ static const char FlashTypeStr[16][32] = { "SHOWER_ADDON_V2_FPGA2", "SHOWER_ADDON_V2_FPGA3", "CTS_FPGA1", - "CTS_FPGA2" + "CTS_FPGA2", + "PEXOR" }; static FlashType flashType = FLASH_INVALID; static uint32_t manId = 0; -static const char trbflash_version[] = "$Revision: 2.29 $"; +static const char trbflash_version[] = "$Revision: 2.30 $"; static uint32_t mdcFlashSelect = 1; @@ -384,6 +386,10 @@ static int initTransfer(uint16_t trb_address) fType = FLASH_CTS_FPGA2; break; + case 0x7300: + fType = FLASH_PEXOR; + break; + default: /* Error: Unknown FlashType */ fprintf(logFile, "Error > initTransfer: " @@ -444,7 +450,7 @@ static int initTransfer(uint16_t trb_address) return -1; } } - + fprintf(stderr, "manId is: 0x%x\n", manId); /* Set NUM_PAGES */ switch (manId) { @@ -661,7 +667,7 @@ static int programImageBuffer(uint16_t trb_address, } fprintf(stdout, "Block: 0 1 2 3 4 5 6 7 8 9 A B C D E F"); fflush(stdout); - + errorCtr = 0; if ((mode != PMODE_VERIFY) && (manId == 0x1520c2)) { @@ -680,7 +686,7 @@ static int programImageBuffer(uint16_t trb_address, } fprintf(stdout, ".\b"); fflush(stdout); - + if (!(bytesWritten > 0) && (writeInfoPage == 0)) { fprintf(stdout, ". "); fflush(stdout); @@ -959,7 +965,9 @@ static int prepareImageBuffer() case FLASH_CTS_FPGA2: strId = "cts_fpga2"; break; - + case FLASH_PEXOR: + strId = "pexor"; + break; default: abort(); break; @@ -1095,7 +1103,6 @@ int main(int argc, char **argv) { unsigned int i; char userInfoStr[256] = ""; - trb_debug = 0; logFile = stderr; mdcFlashSelect = 1;