Lines Matching refs:sharpsl

60 	struct sharpsl_nand *sharpsl = mtd_to_sharpsl(nand_to_mtd(chip));  in sharpsl_nand_hwcontrol()  local
69 writeb((readb(sharpsl->io + FLASHCTL) & ~0x17) | bits, sharpsl->io + FLASHCTL); in sharpsl_nand_hwcontrol()
78 struct sharpsl_nand *sharpsl = mtd_to_sharpsl(nand_to_mtd(chip)); in sharpsl_nand_dev_ready() local
79 return !((readb(sharpsl->io + FLASHCTL) & FLRYBY) == 0); in sharpsl_nand_dev_ready()
84 struct sharpsl_nand *sharpsl = mtd_to_sharpsl(nand_to_mtd(chip)); in sharpsl_nand_enable_hwecc() local
85 writeb(0, sharpsl->io + ECCCLRR); in sharpsl_nand_enable_hwecc()
91 struct sharpsl_nand *sharpsl = mtd_to_sharpsl(nand_to_mtd(chip)); in sharpsl_nand_calculate_ecc() local
92 ecc_code[0] = ~readb(sharpsl->io + ECCLPUB); in sharpsl_nand_calculate_ecc()
93 ecc_code[1] = ~readb(sharpsl->io + ECCLPLB); in sharpsl_nand_calculate_ecc()
94 ecc_code[2] = (~readb(sharpsl->io + ECCCP) << 2) | 0x03; in sharpsl_nand_calculate_ecc()
95 return readb(sharpsl->io + ECCCNTR) != 0; in sharpsl_nand_calculate_ecc()
126 struct sharpsl_nand *sharpsl; in sharpsl_nand_probe() local
135 sharpsl = kzalloc(sizeof(struct sharpsl_nand), GFP_KERNEL); in sharpsl_nand_probe()
136 if (!sharpsl) in sharpsl_nand_probe()
147 sharpsl->io = ioremap(r->start, resource_size(r)); in sharpsl_nand_probe()
148 if (!sharpsl->io) { in sharpsl_nand_probe()
155 this = (struct nand_chip *)(&sharpsl->chip); in sharpsl_nand_probe()
157 nand_controller_init(&sharpsl->controller); in sharpsl_nand_probe()
158 sharpsl->controller.ops = &sharpsl_ops; in sharpsl_nand_probe()
159 this->controller = &sharpsl->controller; in sharpsl_nand_probe()
166 platform_set_drvdata(pdev, sharpsl); in sharpsl_nand_probe()
171 writeb(readb(sharpsl->io + FLASHCTL) | FLWP, sharpsl->io + FLASHCTL); in sharpsl_nand_probe()
174 this->legacy.IO_ADDR_R = sharpsl->io + FLASHIO; in sharpsl_nand_probe()
175 this->legacy.IO_ADDR_W = sharpsl->io + FLASHIO; in sharpsl_nand_probe()
203 iounmap(sharpsl->io); in sharpsl_nand_probe()
206 kfree(sharpsl); in sharpsl_nand_probe()
215 struct sharpsl_nand *sharpsl = platform_get_drvdata(pdev); in sharpsl_nand_remove() local
216 struct nand_chip *chip = &sharpsl->chip; in sharpsl_nand_remove()
226 iounmap(sharpsl->io); in sharpsl_nand_remove()
229 kfree(sharpsl); in sharpsl_nand_remove()