[PATCH v6 2/2] mtd: nand: Add support for Arasan Nand Flash Controller

kbuild test robot lkp at intel.com
Mon Dec 5 01:16:23 PST 2016


Hi Punnaiah,

[auto build test ERROR on mtd/master]
[also build test ERROR on v4.9-rc8 next-20161205]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Punnaiah-Choudary-Kalluri/mtd-arasan-Add-device-tree-binding-documentation/20161205-162929
base:   git://git.infradead.org/linux-mtd.git master
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/mtd/nand/arasan_nand.c: In function 'anfc_read_buf':
>> drivers/mtd/nand/arasan_nand.c:348:3: error: implicit declaration of function 'readsl' [-Werror=implicit-function-declaration]
      readsl(nfc->base + DATA_PORT_OFST, bufptr, pktsize/4);
      ^~~~~~
   drivers/mtd/nand/arasan_nand.c: In function 'anfc_write_buf':
>> drivers/mtd/nand/arasan_nand.c:402:3: error: implicit declaration of function 'writesl' [-Werror=implicit-function-declaration]
      writesl(nfc->base + DATA_PORT_OFST, bufptr, pktsize/4);
      ^~~~~~~
   cc1: some warnings being treated as errors

vim +/readsl +348 drivers/mtd/nand/arasan_nand.c

   342			anfc_wait_for_event(nfc);
   343			buf_rd_cnt++;
   344	
   345			if (buf_rd_cnt == pktcount)
   346				anfc_enable_intrs(nfc, XFER_COMPLETE);
   347	
 > 348			readsl(nfc->base + DATA_PORT_OFST, bufptr, pktsize/4);
   349			bufptr += (pktsize / 4);
   350	
   351			if (buf_rd_cnt < pktcount)
   352				anfc_enable_intrs(nfc, (READ_READY | eccintr));
   353		}
   354	
   355		anfc_wait_for_event(nfc);
   356	}
   357	
   358	static void anfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
   359	{
   360		u32 pktcount, pktsize;
   361		unsigned int buf_wr_cnt = 0;
   362		u32 *bufptr = (u32 *)buf;
   363		struct nand_chip *chip = mtd_to_nand(mtd);
   364		struct anfc_nand_chip *achip = to_anfc_nand(chip);
   365		struct anfc *nfc = to_anfc(chip->controller);
   366		dma_addr_t paddr;
   367	
   368		if (nfc->iswriteoob) {
   369			pktsize = len;
   370			pktcount = 1;
   371		} else {
   372			pktsize = achip->pktsize;
   373			pktcount = mtd->writesize / pktsize;
   374		}
   375	
   376		anfc_setpktszcnt(nfc, pktsize, pktcount);
   377	
   378		if (nfc->dma) {
   379			paddr = dma_map_single(nfc->dev, (void *)buf, len,
   380					       DMA_TO_DEVICE);
   381			if (dma_mapping_error(nfc->dev, paddr)) {
   382				dev_err(nfc->dev, "Write buffer mapping error");
   383				return;
   384			}
   385			lo_hi_writeq(paddr, nfc->base + DMA_ADDR0_OFST);
   386			anfc_enable_intrs(nfc, XFER_COMPLETE);
   387			writel(PROG_PGPROG, nfc->base + PROG_OFST);
   388			anfc_wait_for_event(nfc);
   389			dma_unmap_single(nfc->dev, paddr, len, DMA_TO_DEVICE);
   390			return;
   391		}
   392	
   393		anfc_enable_intrs(nfc, WRITE_READY);
   394		writel(PROG_PGPROG, nfc->base + PROG_OFST);
   395	
   396		while (buf_wr_cnt < pktcount) {
   397			anfc_wait_for_event(nfc);
   398			buf_wr_cnt++;
   399			if (buf_wr_cnt == pktcount)
   400				anfc_enable_intrs(nfc, XFER_COMPLETE);
   401	
 > 402			writesl(nfc->base + DATA_PORT_OFST, bufptr, pktsize/4);
   403			bufptr += (pktsize / 4);
   404	
   405			if (buf_wr_cnt < pktcount)

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 56586 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20161205/11bedded/attachment-0001.gz>


More information about the linux-mtd mailing list