Lines Matching full:oob
251 u8 *oob; member
259 u8 *oob, u32 len, u8 dma_cmd);
1418 "error: ECC too large for OOB (ECC bytes %d, spare sector %d)\n", in brcmstb_choose_ecc_layout()
1471 /* Helper functions for reading and writing OOB registers */
1510 * read_oob_from_regs - read data from OOB registers
1513 * @oob: buffer to read to
1514 * @sas: spare area sector size (i.e., OOB size per FLASH_CACHE)
1517 static int read_oob_from_regs(struct brcmnand_controller *ctrl, int i, u8 *oob, in read_oob_from_regs() argument
1523 /* Adjust OOB values for 1K sector size */ in read_oob_from_regs()
1529 oob[j] = oob_reg_read(ctrl, j); in read_oob_from_regs()
1534 * write_oob_to_regs - write data to OOB registers
1536 * @oob: buffer to write from
1537 * @sas: spare area sector size (i.e., OOB size per FLASH_CACHE)
1541 const u8 *oob, int sas, int sector_1k) in write_oob_to_regs() argument
1548 /* Adjust OOB values for 1K sector size */ in write_oob_to_regs()
1559 (oob[j + 0] << 24) | in write_oob_to_regs()
1560 (oob[j + 1] << 16) | in write_oob_to_regs()
1561 (oob[j + 2] << 8) | in write_oob_to_regs()
1562 (oob[j + 3] << 0)); in write_oob_to_regs()
1566 plast[k++] = oob[j++]; in write_oob_to_regs()
1608 if (ctrl->oob) { in brcmnand_edu_irq()
1610 ctrl->oob += read_oob_from_regs(ctrl, in brcmnand_edu_irq()
1612 ctrl->oob, ctrl->sas, in brcmnand_edu_irq()
1618 ctrl->oob += write_oob_to_regs(ctrl, in brcmnand_edu_irq()
1620 ctrl->oob, ctrl->sas, in brcmnand_edu_irq()
1833 u8 *oob, u32 len, u8 cmd) in brcmnand_edu_trans() argument
1845 "read" : "write"), buf, oob); in brcmnand_edu_trans()
1859 ctrl->oob = oob; in brcmnand_edu_trans()
1868 if (ctrl->oob && (ctrl->edu_cmd == EDU_CMD_WRITE)) { in brcmnand_edu_trans()
1872 ctrl->oob += write_oob_to_regs(ctrl, in brcmnand_edu_trans()
1874 ctrl->oob, ctrl->sas, in brcmnand_edu_trans()
1892 /* read last subpage oob */ in brcmnand_edu_trans()
1893 if (ctrl->oob && (ctrl->edu_cmd == EDU_CMD_READ)) { in brcmnand_edu_trans()
1894 ctrl->oob += read_oob_from_regs(ctrl, in brcmnand_edu_trans()
1896 ctrl->oob, ctrl->sas, in brcmnand_edu_trans()
2009 u8 *oob, u32 len, u8 dma_cmd) in brcmnand_dma_trans() argument
2041 u8 *oob, u64 *err_addr) in brcmnand_read_by_pio() argument
2064 if (oob) in brcmnand_read_by_pio()
2065 oob += read_oob_from_regs(ctrl, i, oob, in brcmnand_read_by_pio()
2140 u64 addr, unsigned int trans, u32 *buf, u8 *oob) in brcmnand_read() argument
2154 if (ctrl->dma_trans && (has_edu(ctrl) || !oob) && in brcmnand_read()
2156 err = ctrl->dma_trans(host, addr, buf, oob, in brcmnand_read()
2171 if (oob) in brcmnand_read()
2172 memset(oob, 0x99, mtd->oobsize); in brcmnand_read()
2175 oob, &err_addr); in brcmnand_read()
2220 oob, &err_addr); in brcmnand_read()
2237 u8 *oob = oob_required ? (u8 *)chip->oob_poi : NULL; in brcmnand_read_page() local
2243 mtd->writesize >> FC_SHIFT, (u32 *)buf, oob); in brcmnand_read_page()
2251 u8 *oob = oob_required ? (u8 *)chip->oob_poi : NULL; in brcmnand_read_page_raw() local
2259 mtd->writesize >> FC_SHIFT, (u32 *)buf, oob); in brcmnand_read_page_raw()
2287 u64 addr, const u32 *buf, u8 *oob) in brcmnand_write() argument
2310 if (use_dma(ctrl) && (has_edu(ctrl) || !oob) && flash_dma_buf_ok(buf)) { in brcmnand_write()
2311 if (ctrl->dma_trans(host, addr, (u32 *)buf, oob, mtd->writesize, in brcmnand_write()
2330 } else if (oob) { in brcmnand_write()
2335 if (oob) { in brcmnand_write()
2336 oob += write_oob_to_regs(ctrl, i, oob, in brcmnand_write()
2362 void *oob = oob_required ? chip->oob_poi : NULL; in brcmnand_write_page() local
2367 return brcmnand_write(mtd, chip, host->last_addr, (const u32 *)buf, oob); in brcmnand_write_page()
2375 void *oob = oob_required ? chip->oob_poi : NULL; in brcmnand_write_page_raw() local
2381 ret = brcmnand_write(mtd, chip, host->last_addr, (const u32 *)buf, oob); in brcmnand_write_page_raw()
2643 "%lluMiB total, %uKiB blocks, %u%s pages, %uB OOB, %u-bit", in brcmnand_print_cfg()
2703 ret = of_property_read_u32(np, "brcm,nand-oob-sector-size", in brcmnand_setup_dev()
2852 /* If OOB is written with ECC enabled it will cause ECC errors */ in brcmnand_attach_chip()