Lines Matching refs:sharpsl

17 #include <linux/mtd/sharpsl.h>
62 struct sharpsl_nand *sharpsl = mtd_to_sharpsl(nand_to_mtd(chip));
71 writeb((readb(sharpsl->io + FLASHCTL) & ~0x17) | bits, sharpsl->io + FLASHCTL);
80 struct sharpsl_nand *sharpsl = mtd_to_sharpsl(nand_to_mtd(chip));
81 return !((readb(sharpsl->io + FLASHCTL) & FLRYBY) == 0);
86 struct sharpsl_nand *sharpsl = mtd_to_sharpsl(nand_to_mtd(chip));
87 writeb(0, sharpsl->io + ECCCLRR);
93 struct sharpsl_nand *sharpsl = mtd_to_sharpsl(nand_to_mtd(chip));
94 ecc_code[0] = ~readb(sharpsl->io + ECCLPUB);
95 ecc_code[1] = ~readb(sharpsl->io + ECCLPLB);
96 ecc_code[2] = (~readb(sharpsl->io + ECCCP) << 2) | 0x03;
97 return readb(sharpsl->io + ECCCNTR) != 0;
128 struct sharpsl_nand *sharpsl;
137 sharpsl = kzalloc(sizeof(struct sharpsl_nand), GFP_KERNEL);
138 if (!sharpsl)
149 sharpsl->io = ioremap(r->start, resource_size(r));
150 if (!sharpsl->io) {
157 this = (struct nand_chip *)(&sharpsl->chip);
159 nand_controller_init(&sharpsl->controller);
160 sharpsl->controller.ops = &sharpsl_ops;
161 this->controller = &sharpsl->controller;
168 platform_set_drvdata(pdev, sharpsl);
173 writeb(readb(sharpsl->io + FLASHCTL) | FLWP, sharpsl->io + FLASHCTL);
176 this->legacy.IO_ADDR_R = sharpsl->io + FLASHIO;
177 this->legacy.IO_ADDR_W = sharpsl->io + FLASHIO;
191 mtd->name = "sharpsl-nand";
205 iounmap(sharpsl->io);
208 kfree(sharpsl);
217 struct sharpsl_nand *sharpsl = platform_get_drvdata(pdev);
218 struct nand_chip *chip = &sharpsl->chip;
228 iounmap(sharpsl->io);
231 kfree(sharpsl);
238 .name = "sharpsl-nand",