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