txx9ndfmc.c (7e534323c416216e8ac45b5633fb0a5e5137e5b5) | txx9ndfmc.c (c0739d85723a381302907f9613392d7ac8515176) |
---|---|
1/* 2 * TXx9 NAND flash memory controller driver 3 * Based on RBTX49xx patch from CELF patch archive. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 * --- 95 unchanged lines hidden (view full) --- 104 105static uint8_t txx9ndfmc_read_byte(struct nand_chip *chip) 106{ 107 struct platform_device *dev = mtd_to_platdev(nand_to_mtd(chip)); 108 109 return txx9ndfmc_read(dev, TXX9_NDFDTR); 110} 111 | 1/* 2 * TXx9 NAND flash memory controller driver 3 * Based on RBTX49xx patch from CELF patch archive. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 * --- 95 unchanged lines hidden (view full) --- 104 105static uint8_t txx9ndfmc_read_byte(struct nand_chip *chip) 106{ 107 struct platform_device *dev = mtd_to_platdev(nand_to_mtd(chip)); 108 109 return txx9ndfmc_read(dev, TXX9_NDFDTR); 110} 111 |
112static void txx9ndfmc_write_buf(struct mtd_info *mtd, const uint8_t *buf, | 112static void txx9ndfmc_write_buf(struct nand_chip *chip, const uint8_t *buf, |
113 int len) 114{ | 113 int len) 114{ |
115 struct platform_device *dev = mtd_to_platdev(mtd); | 115 struct platform_device *dev = mtd_to_platdev(nand_to_mtd(chip)); |
116 void __iomem *ndfdtr = ndregaddr(dev, TXX9_NDFDTR); 117 u32 mcr = txx9ndfmc_read(dev, TXX9_NDFMCR); 118 119 txx9ndfmc_write(dev, mcr | TXX9_NDFMCR_WE, TXX9_NDFMCR); 120 while (len--) 121 __raw_writel(*buf++, ndfdtr); 122 txx9ndfmc_write(dev, mcr, TXX9_NDFMCR); 123} --- 299 unchanged lines hidden --- | 116 void __iomem *ndfdtr = ndregaddr(dev, TXX9_NDFDTR); 117 u32 mcr = txx9ndfmc_read(dev, TXX9_NDFMCR); 118 119 txx9ndfmc_write(dev, mcr | TXX9_NDFMCR_WE, TXX9_NDFMCR); 120 while (len--) 121 __raw_writel(*buf++, ndfdtr); 122 txx9ndfmc_write(dev, mcr, TXX9_NDFMCR); 123} --- 299 unchanged lines hidden --- |