s3c2410.c (7e534323c416216e8ac45b5633fb0a5e5137e5b5) | s3c2410.c (c0739d85723a381302907f9613392d7ac8515176) |
---|---|
1/* 2 * Copyright © 2004-2008 Simtec Electronics 3 * http://armlinux.simtec.co.uk/ 4 * Ben Dooks <ben@simtec.co.uk> 5 * 6 * Samsung S3C2410/S3C2440/S3C2412 NAND driver 7 * 8 * This program is free software; you can redistribute it and/or modify --- 682 unchanged lines hidden (view full) --- 691 if (len & 3) { 692 buf += len & ~3; 693 694 for (; len & 3; len--) 695 *buf++ = readb(info->regs + S3C2440_NFDATA); 696 } 697} 698 | 1/* 2 * Copyright © 2004-2008 Simtec Electronics 3 * http://armlinux.simtec.co.uk/ 4 * Ben Dooks <ben@simtec.co.uk> 5 * 6 * Samsung S3C2410/S3C2440/S3C2412 NAND driver 7 * 8 * This program is free software; you can redistribute it and/or modify --- 682 unchanged lines hidden (view full) --- 691 if (len & 3) { 692 buf += len & ~3; 693 694 for (; len & 3; len--) 695 *buf++ = readb(info->regs + S3C2440_NFDATA); 696 } 697} 698 |
699static void s3c2410_nand_write_buf(struct mtd_info *mtd, const u_char *buf, | 699static void s3c2410_nand_write_buf(struct nand_chip *this, const u_char *buf, |
700 int len) 701{ | 700 int len) 701{ |
702 struct nand_chip *this = mtd_to_nand(mtd); | |
703 writesb(this->IO_ADDR_W, buf, len); 704} 705 | 702 writesb(this->IO_ADDR_W, buf, len); 703} 704 |
706static void s3c2440_nand_write_buf(struct mtd_info *mtd, const u_char *buf, | 705static void s3c2440_nand_write_buf(struct nand_chip *this, const u_char *buf, |
707 int len) 708{ | 706 int len) 707{ |
708 struct mtd_info *mtd = nand_to_mtd(this); |
|
709 struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd); 710 711 writesl(info->regs + S3C2440_NFDATA, buf, len >> 2); 712 713 /* cleanup any fractional write */ 714 if (len & 3) { 715 buf += len & ~3; 716 --- 584 unchanged lines hidden --- | 709 struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd); 710 711 writesl(info->regs + S3C2440_NFDATA, buf, len >> 2); 712 713 /* cleanup any fractional write */ 714 if (len & 3) { 715 buf += len & ~3; 716 --- 584 unchanged lines hidden --- |