H A D | diskonchip.c | 243 void __iomem *docptr = doc->virtadr; _DoC_WaitReady() local 250 while ((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK) { _DoC_WaitReady() 259 while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) { _DoC_WaitReady() 274 void __iomem *docptr = doc->virtadr; DoC_WaitReady() local 280 if ((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK) DoC_WaitReady() 286 if (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) DoC_WaitReady() 301 void __iomem *docptr = doc->virtadr; doc2000_write_byte() local 305 WriteDOC(datum, docptr, CDSNSlowIO); doc2000_write_byte() 306 WriteDOC(datum, docptr, 2k_CDSN_IO); doc2000_write_byte() 313 void __iomem *docptr = doc->virtadr; doc2000_read_byte() local 316 ReadDOC(docptr, CDSNSlowIO); doc2000_read_byte() 318 ret = ReadDOC(docptr, 2k_CDSN_IO); doc2000_read_byte() 328 void __iomem *docptr = doc->virtadr; doc2000_writebuf() local 333 WriteDOC_(buf[i], docptr, DoC_2k_CDSN_IO + i); doc2000_writebuf() 345 void __iomem *docptr = doc->virtadr; doc2000_readbuf() local 352 buf[i] = ReadDOC(docptr, 2k_CDSN_IO + i); doc2000_readbuf() 360 void __iomem *docptr = doc->virtadr; doc2000_readbuf_dword() local 368 *(uint8_t *) (&buf[i]) = ReadDOC(docptr, 2k_CDSN_IO + i); doc2000_readbuf_dword() 372 *(uint32_t *) (&buf[i]) = readl(docptr + DoC_2k_CDSN_IO + i); doc2000_readbuf_dword() 403 void __iomem *docptr = doc->virtadr; doc200x_ident_chip() local 413 ident.dword = readl(docptr + DoC_2k_CDSN_IO); doc200x_ident_chip() 463 void __iomem *docptr = doc->virtadr; doc2001_write_byte() local 465 WriteDOC(datum, docptr, CDSNSlowIO); doc2001_write_byte() 466 WriteDOC(datum, docptr, Mil_CDSN_IO); doc2001_write_byte() 467 WriteDOC(datum, docptr, WritePipeTerm); doc2001_write_byte() 474 void __iomem *docptr = doc->virtadr; doc2001_read_byte() local 476 //ReadDOC(docptr, CDSNSlowIO); doc2001_read_byte() 479 ReadDOC(docptr, ReadPipeInit); doc2001_read_byte() 480 //return ReadDOC(docptr, Mil_CDSN_IO); doc2001_read_byte() 481 return ReadDOC(docptr, LastDataRead); doc2001_read_byte() 488 void __iomem *docptr = doc->virtadr; doc2001_writebuf() local 492 WriteDOC_(buf[i], docptr, DoC_Mil_CDSN_IO + i); doc2001_writebuf() 494 WriteDOC(0x00, docptr, WritePipeTerm); doc2001_writebuf() 501 void __iomem *docptr = doc->virtadr; doc2001_readbuf() local 505 ReadDOC(docptr, ReadPipeInit); doc2001_readbuf() 508 buf[i] = ReadDOC(docptr, Mil_CDSN_IO + (i & 0xff)); doc2001_readbuf() 511 buf[i] = ReadDOC(docptr, LastDataRead); doc2001_readbuf() 518 void __iomem *docptr = doc->virtadr; doc2001plus_read_byte() local 521 ReadDOC(docptr, Mplus_ReadPipeInit); doc2001plus_read_byte() 522 ReadDOC(docptr, Mplus_ReadPipeInit); doc2001plus_read_byte() 523 ret = ReadDOC(docptr, Mplus_LastDataRead); doc2001plus_read_byte() 533 void __iomem *docptr = doc->virtadr; doc2001plus_writebuf() local 539 WriteDOC_(buf[i], docptr, DoC_Mil_CDSN_IO + i); doc2001plus_writebuf() 551 void __iomem *docptr = doc->virtadr; doc2001plus_readbuf() local 558 ReadDOC(docptr, Mplus_ReadPipeInit); doc2001plus_readbuf() 559 ReadDOC(docptr, Mplus_ReadPipeInit); doc2001plus_readbuf() 562 buf[i] = ReadDOC(docptr, Mil_CDSN_IO); doc2001plus_readbuf() 568 buf[len - 2] = ReadDOC(docptr, Mplus_LastDataRead); doc2001plus_readbuf() 571 buf[len - 1] = ReadDOC(docptr, Mplus_LastDataRead); doc2001plus_readbuf() 582 void __iomem *docptr = doc->virtadr; doc2001plus_select_chip() local 590 WriteDOC(0, docptr, Mplus_FlashSelect); doc2001plus_select_chip() 598 WriteDOC((DOC_FLASH_CE), docptr, Mplus_FlashSelect); doc2001plus_select_chip() 609 void __iomem *docptr = doc->virtadr; doc200x_select_chip() local 624 WriteDOC(floor, docptr, FloorSelect); doc200x_select_chip() 625 WriteDOC(chip, docptr, CDSNDeviceSelect); doc200x_select_chip() 640 void __iomem *docptr = doc->virtadr; doc200x_hwcontrol() local 647 WriteDOC(doc->CDSNControl, docptr, CDSNControl); doc200x_hwcontrol() 663 void __iomem *docptr = doc->virtadr; doc2001plus_command() local 670 WriteDOC(0x00, docptr, Mplus_WritePipeTerm); doc2001plus_command() 671 WriteDOC(0x00, docptr, Mplus_WritePipeTerm); doc2001plus_command() 691 WriteDOC(readcmd, docptr, Mplus_FlashCmd); doc2001plus_command() 693 WriteDOC(command, docptr, Mplus_FlashCmd); doc2001plus_command() 694 WriteDOC(0, docptr, Mplus_WritePipeTerm); doc2001plus_command() 695 WriteDOC(0, docptr, Mplus_WritePipeTerm); doc2001plus_command() 704 WriteDOC(column, docptr, Mplus_FlashAddress); doc2001plus_command() 707 WriteDOC((unsigned char)(page_addr & 0xff), docptr, Mplus_FlashAddress); doc2001plus_command() 708 WriteDOC((unsigned char)((page_addr >> 8) & 0xff), docptr, Mplus_FlashAddress); doc2001plus_command() 711 WriteDOC((unsigned char)((page_addr >> 16) & 0x0f), docptr, Mplus_FlashAddress); doc2001plus_command() 715 WriteDOC(0, docptr, Mplus_WritePipeTerm); doc2001plus_command() 716 WriteDOC(0, docptr, Mplus_WritePipeTerm); doc2001plus_command() 720 WriteDOC(0, docptr, Mplus_FlashControl); doc2001plus_command() 740 WriteDOC(NAND_CMD_STATUS, docptr, Mplus_FlashCmd); doc2001plus_command() 741 WriteDOC(0, docptr, Mplus_WritePipeTerm); doc2001plus_command() 742 WriteDOC(0, docptr, Mplus_WritePipeTerm); doc2001plus_command() 769 void __iomem *docptr = doc->virtadr; doc200x_dev_ready() local 774 if ((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK) { doc200x_dev_ready() 785 if (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) { doc200x_dev_ready() 809 void __iomem *docptr = doc->virtadr; doc200x_enable_hwecc() local 814 WriteDOC(DOC_ECC_RESET, docptr, ECCConf); doc200x_enable_hwecc() 815 WriteDOC(DOC_ECC_EN, docptr, ECCConf); doc200x_enable_hwecc() 818 WriteDOC(DOC_ECC_RESET, docptr, ECCConf); doc200x_enable_hwecc() 819 WriteDOC(DOC_ECC_EN | DOC_ECC_RW, docptr, ECCConf); doc200x_enable_hwecc() 828 void __iomem *docptr = doc->virtadr; doc2001plus_enable_hwecc() local 833 WriteDOC(DOC_ECC_RESET, docptr, Mplus_ECCConf); doc2001plus_enable_hwecc() 834 WriteDOC(DOC_ECC_EN, docptr, Mplus_ECCConf); doc2001plus_enable_hwecc() 837 WriteDOC(DOC_ECC_RESET, docptr, Mplus_ECCConf); doc2001plus_enable_hwecc() 838 WriteDOC(DOC_ECC_EN | DOC_ECC_RW, docptr, Mplus_ECCConf); doc2001plus_enable_hwecc() 848 void __iomem *docptr = doc->virtadr; doc200x_calculate_ecc() local 854 WriteDOC(doc->CDSNControl & ~CDSN_CTRL_FLASH_IO, docptr, CDSNControl); doc200x_calculate_ecc() 855 WriteDOC(0, docptr, 2k_CDSN_IO); doc200x_calculate_ecc() 856 WriteDOC(0, docptr, 2k_CDSN_IO); doc200x_calculate_ecc() 857 WriteDOC(0, docptr, 2k_CDSN_IO); doc200x_calculate_ecc() 858 WriteDOC(doc->CDSNControl, docptr, CDSNControl); doc200x_calculate_ecc() 860 WriteDOC(0, docptr, Mplus_NOP); doc200x_calculate_ecc() 861 WriteDOC(0, docptr, Mplus_NOP); doc200x_calculate_ecc() 862 WriteDOC(0, docptr, Mplus_NOP); doc200x_calculate_ecc() 864 WriteDOC(0, docptr, NOP); doc200x_calculate_ecc() 865 WriteDOC(0, docptr, NOP); doc200x_calculate_ecc() 866 WriteDOC(0, docptr, NOP); doc200x_calculate_ecc() 871 ecc_code[i] = ReadDOC_(docptr, DoC_Mplus_ECCSyndrome0 + i); doc200x_calculate_ecc() 873 ecc_code[i] = ReadDOC_(docptr, DoC_ECCSyndrome0 + i); doc200x_calculate_ecc() 878 WriteDOC(DOC_ECC_DIS, docptr, Mplus_ECCConf); doc200x_calculate_ecc() 880 WriteDOC(DOC_ECC_DIS, docptr, ECCConf); doc200x_calculate_ecc() 909 void __iomem *docptr = doc->virtadr; doc200x_correct_data() local 916 dummy = ReadDOC(docptr, 2k_ECCStatus); doc200x_correct_data() 917 dummy = ReadDOC(docptr, 2k_ECCStatus); doc200x_correct_data() 918 dummy = ReadDOC(docptr, 2k_ECCStatus); doc200x_correct_data() 920 dummy = ReadDOC(docptr, Mplus_ECCConf); doc200x_correct_data() 921 dummy = ReadDOC(docptr, Mplus_ECCConf); doc200x_correct_data() 922 dummy = ReadDOC(docptr, Mplus_ECCConf); doc200x_correct_data() 924 dummy = ReadDOC(docptr, ECCConf); doc200x_correct_data() 925 dummy = ReadDOC(docptr, ECCConf); doc200x_correct_data() 926 dummy = ReadDOC(docptr, ECCConf); doc200x_correct_data() 933 calc_ecc[i] = ReadDOC_(docptr, DoC_Mplus_ECCSyndrome0 + i); doc200x_correct_data() 935 calc_ecc[i] = ReadDOC_(docptr, DoC_ECCSyndrome0 + i); doc200x_correct_data() 971 WriteDOC(DOC_ECC_DIS, docptr, Mplus_ECCConf); doc200x_correct_data() 973 WriteDOC(DOC_ECC_DIS, docptr, ECCConf); doc200x_correct_data()
|