Drop all duplicate newlines. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
MTD_UADDR_UNNECESSARY, /* Does not require any address */
};
-
struct unlock_addr {
u32 addr1;
u32 addr2;
};
-
/*
* I don't like the fact that the first entry in unlock_addrs[]
* exists, but is for MTD_UADDR_NOT_SUPPORTED - and, therefore,
}
};
-
struct amd_flash_info {
const __u16 mfr_id;
const __u16 dev_id;
#ifndef __UBOOT__
static LIST_HEAD(mtd_notifiers);
-
#define MTD_DEVT(index) MKDEV(MTD_CHAR_MAJOR, (index)*2)
/* REVISIT once MTD uses the driver model better, whoever allocates
}
EXPORT_SYMBOL_GPL(get_mtd_device);
-
int __get_mtd_device(struct mtd_info *mtd)
{
int err;
CFG_SYS_NAND_ECCSIZE)
#define ECCTOTAL (ECCSTEPS * CFG_SYS_NAND_ECCBYTES)
-
/*
* NAND command for large page NAND devices (2k)
*/
hwctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE);
-
/*
* Program and erase have their own busy handlers status, sequential
* in and status need no delay.
for (i = 0; i < pktsize/4; i++)
bufptr[i] = readl(&info->reg->buf_dataport);
-
bufptr += pktsize/4;
if (rdcount >= pktnum)
priv->bufnum_mask = 0;
break;
-
default:
printf("ifc nand: bad csor %#x: bad page size\n", csor);
return -ENODEV;
max_ecc = min(round_down(max_ecc, 2),
nand_info->max_ecc_strength_supported);
-
/* search a supported ecc strength that makes bbm */
/* located in data chunk */
geo->ecc_strength = chip->ecc_strength_ds;
info->gpmi_regs = devm_ioremap(dev, res.start, resource_size(&res));
-
ret = dev_read_resource_byname(dev, "bch", &res);
if (ret)
return ret;
return ret;
}
-
/**
* nand_write_page_raw - [INTERN] raw page write function
* @mtd: mtd info structure
return 0;
}
-
/**
* nand_write_subpage_hwecc - [REPLACEABLE] hardware ECC based subpage write
* @mtd: mtd info structure
return 0;
}
-
/**
* nand_write_page_syndrome - [REPLACEABLE] hardware ECC syndrome based page write
* @mtd: mtd info structure
* this file might be covered by the GNU General Public License.
*/
-
#include <linux/errno.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand_ecc.h>
CFG_SYS_NAND_ECCSIZE)
#define ECCTOTAL (ECCSTEPS * CFG_SYS_NAND_ECCBYTES)
-
#if (CONFIG_SYS_NAND_PAGE_SIZE <= 512)
/*
* NAND command for small page NAND devices (512)
for (i = 0; i < ECCTOTAL; i++)
ecc_code[i] = oob_data[nand_ecc_pos[i]];
-
for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
this->ecc.hwctl(mtd, NAND_ECC_READ);
this->read_buf(mtd, p, eccsize);
chipnr = (int)(offset >> chip->chip_shift);
chip->select_chip(mtd, chipnr);
-
if ((offset & (mtd->writesize - 1)) != 0) {
printf("nand_get_lock_status: "
"Start address must be beginning of "
return 0;
}
-
/**
* elm_config - Configure ELM module
* @level: 4 / 8 / 16 bit BCH
BCH_16_BIT
};
-
/* BCH syndrome registers */
struct syndrome {
u32 syndrome_fragment_x[7]; /* 0x400, 0x404.... 0x418 */
#define NFC_CTL_PAGE_SIZE_MASK (0xf << 8)
#define NFC_CTL_PAGE_SIZE(a) ((fls(a) - 11) << 8)
-
#define NFC_ECC_EN (1 << 0)
#define NFC_ECC_PIPELINE (1 << 3)
#define NFC_ECC_EXCEPTION (1 << 4)
#define NFC_ECC_RANDOM_EN (1 << 9)
#define NFC_ECC_RANDOM_DIRECTION (1 << 10)
-
#define NFC_ADDR_NUM_OFFSET 16
#define NFC_SEND_ADDR (1 << 19)
#define NFC_ACCESS_DIR (1 << 20)
return 0;
}
-
/**
* Read raw page data without ecc
*
(0x5 << 0)) /* t_rc from nand_cycles */
#endif
-
#define ZYNQ_NAND_DIRECT_CMD ((0x4 << 23) | /* Chip 0 from interface 1 */ \
(0x2 << 21)) /* UpdateRegs operation */
#endif
#include <linux/mtd/spinand.h>
-
#define SPINAND_MFR_PARAGON 0xa1
-
#define PN26G0XA_STATUS_ECC_BITMASK (3 << 4)
#define PN26G0XA_STATUS_ECC_NONE_DETECTED (0 << 4)
#define PN26G0XA_STATUS_ECC_ERRORED (2 << 4)
#define PN26G0XA_STATUS_ECC_8_CORRECTED (3 << 4)
-
static SPINAND_OP_VARIANTS(read_cache_variants,
SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0),
SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
SPINAND_PROG_LOAD(false, 0, NULL, 0));
-
static int pn26g0xa_ooblayout_ecc(struct mtd_info *mtd, int section,
struct mtd_oob_region *region)
{
.rfree = pn26g0xa_ooblayout_free,
};
-
static const struct spinand_info paragon_spinand_table[] = {
SPINAND_INFO("PN26G01A",
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xe1),
return -EIO;
}
-
return 0;
}
return ret;
}
-
#ifdef CONFIG_MTD_ONENAND_VERIFY_WRITE
/**
* onenand_verify_oob - [GENERIC] verify the oob contents after a write
return bbm->isbad_bbt(mtd, ofs, allowbbt);
}
-
/**
* onenand_erase - [MTD Interface] erase block(s)
* @param mtd MTD device structure
onenand_do_lock_cmd(mtd, ofs, len, ONENAND_CMD_UNLOCK);
}
-
/**
* onenand_check_features - Check and set OneNAND features
* @param mtd MTD data structure
if (addrc != 2 || sizec != 2)
return -EINVAL;
-
ret = clk_get_by_index(dev, 0, &clk);
if (ret < 0) {
dev_err(dev, "Failed to get RPC clock\n");
/* Get software write-protect value (BP bits) */
int spi_flash_cmd_get_sw_write_prot(struct spi_flash *flash);
-
#if CONFIG_IS_ENABLED(SPI_FLASH_MTD)
int spi_flash_mtd_register(struct spi_flash *flash);
void spi_flash_mtd_unregister(struct spi_flash *flash);
if (err)
goto out_slab;
-
/* Attach MTD devices */
for (i = 0; i < mtd_devs; i++) {
struct mtd_dev_param *p = &mtd_dev_param[i];
return roundup(size, ubi->leb_size);
}
-
/**
* new_fm_vhdr - allocate a new volume header for fastmap usage.
* @ubi: UBI device description object
goto fail_bad;
}
-
if (fm->max_pool_size > UBI_FM_MAX_POOL_SIZE ||
fm->max_pool_size < 0) {
ubi_err(ubi, "bad maximal pool size: %i", fm->max_pool_size);
}
fmh->scrub_peb_count = cpu_to_be32(scrub_peb_count);
-
list_for_each_entry(ubi_wrk, &ubi->works, list) {
if (ubi_is_erase_work(ubi_wrk)) {
wl_e = ubi_wrk->e;