Change Details
ubb-patgen/ubb-patgen.c |
335 | 335 | |
336 | 336 | static void wait_response(void) |
337 | 337 | { |
338 | | while (!((MSC_STAT >> 11 ) & 1)); /* MSC_STAT.END_CMD_RES */ |
| 338 | while (!(MSC_STAT & MSC_STAT_END_CMD_RES)); |
339 | 339 | } |
340 | 340 | |
341 | 341 | |
342 | 342 | static void wait_fifo_empty(void) |
343 | 343 | { |
344 | | while (!((MSC_STAT >> 6 ) & 1)); /* MSC_STAT.DATA_FIFO_EMPTY */ |
| 344 | while (!(MSC_STAT & MSC_STAT_DATA_FIFO_EMPTY)); |
345 | 345 | } |
346 | 346 | |
347 | 347 | |
... | ... | |
410 | 410 | |
411 | 411 | dma_setup(buf, nibbles); |
412 | 412 | |
413 | | MSC_STRPCL = 2; /* start the bus clock */ |
414 | | MSC_RESTO = 0xffff; /* maximum response time-out */ |
415 | | MSC_BLKLEN = 0xfff; /* never reach the end (with CRC) */ |
| 413 | MSC_STRPCL = MSC_STRPCRL_START_CLOCK; /* start the bus clock */ |
| 414 | MSC_RESTO = MSC_RESTO_MASK; /* maximum response time-out */ |
| 415 | MSC_BLKLEN = MSC_BLKLEN_MASK; /* never reach the end (with CRC) */ |
416 | 416 | |
417 | 417 | MSC_CMDAT = |
418 | | (2 << 9) | /* 4 bit bus */ |
419 | | (1 << 8) | /* DMA */ |
420 | | (1 << 4) | /* write */ |
421 | | (1 << 3) | /* with data transfer */ |
422 | | 1; /* R1 response */ |
| 418 | MSC_CMDAT_BUS_WIDTH_4 << MSC_CMDAT_BUS_WIDTH_SHIFT | |
| 419 | MSC_CMDAT_DMA_EN | /* DMA */ |
| 420 | MSC_CMDAT_WRITE_READ | /* write */ |
| 421 | MSC_CMDAT_DATA_EN | /* with data transfer */ |
| 422 | MSC_CMDAT_RESPONSE_FORMAT_R1; /* R1 response */ |
423 | 423 | |
424 | | MSC_STRPCL = 4; /* START_OP */ |
| 424 | MSC_STRPCL = MSC_STRPCRL_START_OP; |
425 | 425 | |
426 | 426 | /* |
427 | 427 | * Make sure we've reached the end of the command and then send the |
Download the corresponding diff file