Home
last modified time | relevance | path

Searched refs:nand (Results 1 – 25 of 598) sorted by relevance

12345678910>>...24

/linux/drivers/mtd/nand/
H A Dcore.c22 bool nanddev_isbad(struct nand_device *nand, const struct nand_pos *pos) in nanddev_isbad() argument
27 if (nanddev_bbt_is_initialized(nand)) { in nanddev_isbad()
31 entry = nanddev_bbt_pos_to_entry(nand, pos); in nanddev_isbad()
32 status = nanddev_bbt_get_block_status(nand, entry); in nanddev_isbad()
35 if (nand->ops->isbad(nand, pos)) in nanddev_isbad()
40 nanddev_bbt_set_block_status(nand, entry, status); in nanddev_isbad()
50 return nand->ops->isbad(nand, pos); in nanddev_isbad()
64 int nanddev_markbad(struct nand_device *nand, const struct nand_pos *pos) in nanddev_markbad() argument
66 struct mtd_info *mtd = nanddev_to_mtd(nand); in nanddev_markbad()
70 if (nanddev_isbad(nand, pos)) in nanddev_markbad()
[all …]
H A Decc.c112 int nand_ecc_init_ctx(struct nand_device *nand) in nand_ecc_init_ctx() argument
114 if (!nand->ecc.engine || !nand->ecc.engine->ops->init_ctx) in nand_ecc_init_ctx()
117 return nand->ecc.engine->ops->init_ctx(nand); in nand_ecc_init_ctx()
125 void nand_ecc_cleanup_ctx(struct nand_device *nand) in nand_ecc_cleanup_ctx() argument
127 if (nand->ecc.engine && nand->ecc.engine->ops->cleanup_ctx) in nand_ecc_cleanup_ctx()
128 nand->ecc.engine->ops->cleanup_ctx(nand); in nand_ecc_cleanup_ctx()
137 int nand_ecc_prepare_io_req(struct nand_device *nand, in nand_ecc_prepare_io_req() argument
140 if (!nand->ecc.engine || !nand->ecc.engine->ops->prepare_io_req) in nand_ecc_prepare_io_req()
143 return nand->ecc.engine->ops->prepare_io_req(nand, req); in nand_ecc_prepare_io_req()
152 int nand_ecc_finish_io_req(struct nand_device *nand, in nand_ecc_finish_io_req() argument
[all …]
H A Decc-sw-bch.c23 int nand_ecc_sw_bch_calculate(struct nand_device *nand, in nand_ecc_sw_bch_calculate() argument
26 struct nand_ecc_sw_bch_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_bch_calculate()
30 bch_encode(engine_conf->bch, buf, nand->ecc.ctx.conf.step_size, code); in nand_ecc_sw_bch_calculate()
49 int nand_ecc_sw_bch_correct(struct nand_device *nand, unsigned char *buf, in nand_ecc_sw_bch_correct() argument
52 struct nand_ecc_sw_bch_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_bch_correct()
53 unsigned int step_size = nand->ecc.ctx.conf.step_size; in nand_ecc_sw_bch_correct()
82 static void nand_ecc_sw_bch_cleanup(struct nand_device *nand) in nand_ecc_sw_bch_cleanup() argument
84 struct nand_ecc_sw_bch_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_bch_cleanup()
108 static int nand_ecc_sw_bch_init(struct nand_device *nand) in nand_ecc_sw_bch_init() argument
110 struct nand_ecc_sw_bch_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_bch_init()
[all …]
H A Dbbt.c23 int nanddev_bbt_init(struct nand_device *nand) in nanddev_bbt_init() argument
26 unsigned int nblocks = nanddev_neraseblocks(nand); in nanddev_bbt_init()
28 nand->bbt.cache = bitmap_zalloc(nblocks * bits_per_block, GFP_KERNEL); in nanddev_bbt_init()
29 if (!nand->bbt.cache) in nanddev_bbt_init()
42 void nanddev_bbt_cleanup(struct nand_device *nand) in nanddev_bbt_cleanup() argument
44 bitmap_free(nand->bbt.cache); in nanddev_bbt_cleanup()
57 int nanddev_bbt_update(struct nand_device *nand) in nanddev_bbt_update() argument
71 int nanddev_bbt_get_block_status(const struct nand_device *nand, in nanddev_bbt_get_block_status() argument
75 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_get_block_status()
80 if (entry >= nanddev_neraseblocks(nand)) in nanddev_bbt_get_block_status()
[all …]
H A Decc-sw-hamming.c362 int nand_ecc_sw_hamming_calculate(struct nand_device *nand, in nand_ecc_sw_hamming_calculate() argument
365 struct nand_ecc_sw_hamming_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_hamming_calculate()
366 unsigned int step_size = nand->ecc.ctx.conf.step_size; in nand_ecc_sw_hamming_calculate()
454 int nand_ecc_sw_hamming_correct(struct nand_device *nand, unsigned char *buf, in nand_ecc_sw_hamming_correct() argument
458 struct nand_ecc_sw_hamming_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_hamming_correct()
459 unsigned int step_size = nand->ecc.ctx.conf.step_size; in nand_ecc_sw_hamming_correct()
467 int nand_ecc_sw_hamming_init_ctx(struct nand_device *nand) in nand_ecc_sw_hamming_init_ctx() argument
469 struct nand_ecc_props *conf = &nand->ecc.ctx.conf; in nand_ecc_sw_hamming_init_ctx()
471 struct mtd_info *mtd = nanddev_to_mtd(nand); in nand_ecc_sw_hamming_init_ctx()
492 conf->step_size = nand->ecc.user_conf.step_size; in nand_ecc_sw_hamming_init_ctx()
[all …]
H A Decc-mxic.c124 static struct mxic_ecc_engine *nand_to_mxic(struct nand_device *nand) in nand_to_mxic() argument
126 struct nand_ecc_engine *eng = nand->ecc.engine; in nand_to_mxic()
137 struct nand_device *nand = mtd_to_nanddev(mtd); in mxic_ecc_ooblayout_ecc() local
138 struct mxic_ecc_ctx *ctx = nand_to_ecc_ctx(nand); in mxic_ecc_ooblayout_ecc()
152 struct nand_device *nand = mtd_to_nanddev(mtd); in mxic_ecc_ooblayout_free() local
153 struct mxic_ecc_ctx *ctx = nand_to_ecc_ctx(nand); in mxic_ecc_ooblayout_free()
219 static int mxic_ecc_init_ctx(struct nand_device *nand, struct device *dev) in mxic_ecc_init_ctx() argument
221 struct mxic_ecc_engine *mxic = nand_to_mxic(nand); in mxic_ecc_init_ctx()
222 struct nand_ecc_props *conf = &nand->ecc.ctx.conf; in mxic_ecc_init_ctx()
223 struct nand_ecc_props *reqs = &nand->ecc.requirements; in mxic_ecc_init_ctx()
[all …]
/linux/include/linux/mtd/
H A Dnand.h229 int (*erase)(struct nand_device *nand, const struct nand_pos *pos);
230 int (*markbad)(struct nand_device *nand, const struct nand_pos *pos);
231 bool (*isbad)(struct nand_device *nand, const struct nand_pos *pos);
261 int (*init_ctx)(struct nand_device *nand);
262 void (*cleanup_ctx)(struct nand_device *nand);
263 int (*prepare_io_req)(struct nand_device *nand,
265 int (*finish_io_req)(struct nand_device *nand,
301 void of_get_nand_ecc_user_config(struct nand_device *nand);
302 int nand_ecc_init_ctx(struct nand_device *nand);
303 void nand_ecc_cleanup_ctx(struct nand_device *nand);
[all …]
H A Dnand-ecc-sw-bch.h37 int nand_ecc_sw_bch_calculate(struct nand_device *nand,
39 int nand_ecc_sw_bch_correct(struct nand_device *nand, unsigned char *buf,
41 int nand_ecc_sw_bch_init_ctx(struct nand_device *nand);
42 void nand_ecc_sw_bch_cleanup_ctx(struct nand_device *nand);
47 static inline int nand_ecc_sw_bch_calculate(struct nand_device *nand, in nand_ecc_sw_bch_calculate() argument
54 static inline int nand_ecc_sw_bch_correct(struct nand_device *nand, in nand_ecc_sw_bch_correct() argument
62 static inline int nand_ecc_sw_bch_init_ctx(struct nand_device *nand) in nand_ecc_sw_bch_init_ctx() argument
67 static inline void nand_ecc_sw_bch_cleanup_ctx(struct nand_device *nand) {} in nand_ecc_sw_bch_cleanup_ctx() argument
H A Dnand-ecc-sw-hamming.h34 int nand_ecc_sw_hamming_init_ctx(struct nand_device *nand);
35 void nand_ecc_sw_hamming_cleanup_ctx(struct nand_device *nand);
38 int nand_ecc_sw_hamming_calculate(struct nand_device *nand,
44 int nand_ecc_sw_hamming_correct(struct nand_device *nand, unsigned char *buf,
50 static inline int nand_ecc_sw_hamming_init_ctx(struct nand_device *nand) in nand_ecc_sw_hamming_init_ctx() argument
55 static inline void nand_ecc_sw_hamming_cleanup_ctx(struct nand_device *nand) {} in nand_ecc_sw_hamming_cleanup_ctx() argument
64 static inline int nand_ecc_sw_hamming_calculate(struct nand_device *nand, in nand_ecc_sw_hamming_calculate() argument
79 static inline int nand_ecc_sw_hamming_correct(struct nand_device *nand, in nand_ecc_sw_hamming_correct() argument
/linux/drivers/mtd/nand/raw/
H A Dmeson_nand.c124 struct nand_chip nand; member
258 static struct meson_nfc_nand_chip *to_meson_nand(struct nand_chip *nand) in to_meson_nand() argument
260 return container_of(nand, struct meson_nfc_nand_chip, nand); in to_meson_nand()
263 static void meson_nfc_select_chip(struct nand_chip *nand, int chip) in meson_nfc_select_chip() argument
265 struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); in meson_nfc_select_chip()
266 struct meson_nfc *nfc = nand_get_controller_data(nand); in meson_nfc_select_chip()
306 static int meson_nfc_is_boot_page(struct nand_chip *nand, int page) in meson_nfc_is_boot_page() argument
308 const struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); in meson_nfc_is_boot_page()
310 return (nand->options & NAND_IS_BOOT_MEDIUM) && in meson_nfc_is_boot_page()
315 static void meson_nfc_cmd_access(struct nand_chip *nand, int raw, bool dir, int page) in meson_nfc_cmd_access() argument
[all …]
H A Dsunxi_nand.c194 struct nand_chip nand; member
203 static inline struct sunxi_nand_chip *to_sunxi_nand(struct nand_chip *nand) in to_sunxi_nand() argument
205 return container_of(nand, struct sunxi_nand_chip, nand); in to_sunxi_nand()
415 static void sunxi_nfc_select_chip(struct nand_chip *nand, unsigned int cs) in sunxi_nfc_select_chip() argument
417 struct mtd_info *mtd = nand_to_mtd(nand); in sunxi_nfc_select_chip()
418 struct sunxi_nand_chip *sunxi_nand = to_sunxi_nand(nand); in sunxi_nfc_select_chip()
419 struct sunxi_nfc *nfc = to_sunxi_nfc(sunxi_nand->nand.controller); in sunxi_nfc_select_chip()
430 ctl |= NFC_CE_SEL(sel->cs) | NFC_EN | NFC_PAGE_SHIFT(nand->page_shift); in sunxi_nfc_select_chip()
446 static void sunxi_nfc_read_buf(struct nand_chip *nand, uint8_t *buf, int len) in sunxi_nfc_read_buf() argument
448 struct sunxi_nand_chip *sunxi_nand = to_sunxi_nand(nand); in sunxi_nfc_read_buf()
[all …]
H A Dfsmc_nand.c146 struct nand_chip nand; member
253 return container_of(chip, struct fsmc_nand_data, nand); in nand_to_fsmc()
275 if (host->nand.options & NAND_BUSWIDTH_16) in fsmc_nand_setup()
347 static int fsmc_setup_interface(struct nand_chip *nand, int csline, in fsmc_setup_interface() argument
350 struct fsmc_nand_data *host = nand_to_fsmc(nand); in fsmc_setup_interface()
866 struct nand_chip *nand) in fsmc_nand_probe_config_dt() argument
872 nand->options = 0; in fsmc_nand_probe_config_dt()
876 nand->options |= NAND_BUSWIDTH_16; in fsmc_nand_probe_config_dt()
884 nand->options |= NAND_SKIP_BBTSCAN; in fsmc_nand_probe_config_dt()
909 static int fsmc_nand_attach_chip(struct nand_chip *nand) in fsmc_nand_attach_chip() argument
[all …]
H A Dmtk_nand.c126 struct nand_chip nand; member
178 static inline struct mtk_nfc_nand_chip *to_mtk_nand(struct nand_chip *nand) in to_mtk_nand() argument
180 return container_of(nand, struct mtk_nfc_nand_chip, nand); in to_mtk_nand()
499 static void mtk_nfc_select_target(struct nand_chip *nand, unsigned int cs) in mtk_nfc_select_target() argument
501 struct mtk_nfc *nfc = nand_get_controller_data(nand); in mtk_nfc_select_target()
502 struct mtk_nfc_nand_chip *mtk_nand = to_mtk_nand(nand); in mtk_nfc_select_target()
504 mtk_nfc_hw_runtime_config(nand_to_mtd(nand)); in mtk_nfc_select_target()
661 struct mtk_nfc_nand_chip *nand = to_mtk_nand(chip); in mtk_nfc_bad_mark_swap() local
662 u32 bad_pos = nand->bad_mark.pos; in mtk_nfc_bad_mark_swap()
665 bad_pos += nand->bad_mark.sec * mtk_data_len(chip); in mtk_nfc_bad_mark_swap()
[all …]
/linux/Documentation/devicetree/bindings/mtd/
H A Dsamsung-s3c2410.txt5 "samsung,s3c2410-nand"
6 "samsung,s3c2412-nand"
7 "samsung,s3c2440-nand"
9 - #address-cells, #size-cells : see nand-controller.yaml
10 - clocks : phandle to the nand controller clock
11 - clock-names : must contain "nand"
14 Child nodes representing the available nand chips.
17 - nand-ecc-mode : see nand-controller.yaml
18 - nand-on-flash-bbt : see nand-controller.yaml
26 nand-controller@4e000000 {
[all …]
H A Dnvidia-tegra20-nand.txt5 - "nvidia,tegra20-nand"
11 - nand
15 - nand
25 - nand-ecc-mode: String, operation mode of the NAND ecc mode. Currently only
27 - nand-ecc-algo: string, algorithm of NAND ECC.
29 - nand-bus-width : See nand-controller.yaml
30 - nand-on-flash-bbt: See nand-controller.yaml
31 - nand-ecc-strength: integer representing the number of bits to correct
36 - nand-ecc-maximize: See nand-controller.yaml
37 - nand-is-boot-medium: Makes sure only ECC strengths supported by the boot ROM
[all …]
H A Dvf610-nfc.txt10 - #address-cells: shall be set to 1. Encode the nand CS.
23 Children nodes represent the available nand chips. Currently the driver can
28 - nand-bus-width: see nand-controller.yaml
29 - nand-ecc-mode: see nand-controller.yaml
32 - nand-ecc-strength: supported strengths are 24 and 32 bit (see nand-controller.yaml)
33 - nand-ecc-step-size: step size equals page size, currently only 2k pages are
35 - nand-on-flash-bbt: see nand-controller.yaml
39 nfc: nand@400e0000 {
50 nand@0 {
53 nand-bus-width = <8>;
[all …]
H A Dhisi504-nand.txt10 - nand-bus-width: See nand-controller.yaml.
11 - nand-ecc-mode: Support none and hw ecc mode.
17 - nand-ecc-strength: Number of bits to correct per ECC step.
18 - nand-ecc-step-size: Number of data bytes covered by a single ECC step.
22 - nand-ecc-strength = <16>, nand-ecc-step-size = <1024>
29 nand: nand@4020000 {
33 nand-bus-width = <8>;
34 nand-ecc-mode = "hw";
35 nand-ecc-strength = <16>;
36 nand-ecc-step-size = <1024>;
H A Datmel-nand.txt12 "atmel,at91rm9200-nand-controller"
13 "atmel,at91sam9260-nand-controller"
14 "atmel,at91sam9261-nand-controller"
15 "atmel,at91sam9g45-nand-controller"
16 "atmel,sama5d3-nand-controller"
17 "microchip,sam9x60-nand-controller"
89 nand_controller: nand-controller {
90 compatible = "atmel,sama5d3-nand-controller";
98 nand@3 {
116 "atmel,at91rm9200-nand"
[all …]
H A Dmxic-nand.txt5 - compatible: should be "mxic,multi-itfc-v009-nand-controller"
17 See Documentation/devicetree/bindings/mtd/nand-controller.yaml
22 nand: nand-controller@43c30000 {
23 compatible = "mxic,multi-itfc-v009-nand-controller";
31 nand@0 {
33 nand-ecc-mode = "soft";
34 nand-ecc-algo = "bch";
H A Dfsmc-nand.txt5 - compatible : "st,spear600-fsmc-nand", "stericsson,fsmc-nand"
12 - nand-skip-bbtscan: Indicates the BBT scanning should be skipped
33 - nand-ecc-mode : see nand-controller.yaml
34 - nand-ecc-strength : see nand-controller.yaml
35 - nand-ecc-step-size : see nand-controller.yaml
43 compatible = "st,spear600-fsmc-nand";
53 nand-skip-bbtscan;
/linux/drivers/mtd/nand/raw/atmel/
H A Dnand-controller.c201 struct atmel_nand *nand);
203 int (*setup_interface)(struct atmel_nand *nand, int csline,
205 int (*exec_op)(struct atmel_nand *nand,
471 static void atmel_nand_data_in(struct atmel_nand *nand, void *buf, in atmel_nand_data_in() argument
476 nc = to_nand_controller(nand->base.controller); in atmel_nand_data_in()
485 !atmel_nand_dma_transfer(nc, buf, nand->activecs->io.dma, len, in atmel_nand_data_in()
489 if ((nand->base.options & NAND_BUSWIDTH_16) && !force_8bit) in atmel_nand_data_in()
490 ioread16_rep(nand->activecs->io.virt, buf, len / 2); in atmel_nand_data_in()
492 ioread8_rep(nand->activecs->io.virt, buf, len); in atmel_nand_data_in()
495 static void atmel_nand_data_out(struct atmel_nand *nand, const void *buf, in atmel_nand_data_out() argument
[all …]
/linux/Documentation/devicetree/bindings/pinctrl/
H A Dmarvell,kirkwood-pinctrl.txt24 mpp0 0 gpio, nand(io2), spi(cs)
25 mpp1 1 gpo, nand(io3), spi(mosi)
26 mpp2 2 gpo, nand(io4), spi(sck)
27 mpp3 3 gpo, nand(io5), spi(miso)
28 mpp4 4 gpio, nand(io6), uart0(rxd), ptp(clk)
29 mpp5 5 gpo, nand(io7), uart0(txd), ptp(trig)
45 mpp18 18 gpo, nand(io0)
46 mpp19 19 gpo, nand(io1)
62 mpp0 0 gpio, nand(io2), spi(cs)
63 mpp1 1 gpo, nand(io3), spi(mosi)
[all …]
H A Dlantiq,pinctrl-xway.txt56 ebu wait, nand ale, nand cs1, nand cle, spi_di, spi_do, spi_clk, spi_cs1,
67 ebu cs1, ebu wait, nand ale, nand cs1, nand cle, nand rdy, nand rd,
79 ebu cs1, ebu wait, nand ale, nand cs1, nand cle, nand rdy, nand rd,
93 exin0, exin1, exin2, exin4, nand ale, nand cs0, nand cs1, nand cle,
94 nand rdy, nand rd, nand_d0, nand_d1, nand_d2, nand_d3, nand_d4, nand_d5,
95 nand_d6, nand_d7, nand_d1, nand wr, nand wp, nand se, spi_di, spi_do,
/linux/drivers/mtd/nand/raw/ingenic/
H A Dingenic_nand_drv.c143 struct ingenic_nand *nand = to_ingenic_nand(nand_to_mtd(chip)); in ingenic_nand_ecc_hwctl() local
145 nand->reading = (mode == NAND_ECC_READ); in ingenic_nand_ecc_hwctl()
151 struct ingenic_nand *nand = to_ingenic_nand(nand_to_mtd(chip)); in ingenic_nand_ecc_calculate() local
152 struct ingenic_nfc *nfc = to_ingenic_nfc(nand->chip.controller); in ingenic_nand_ecc_calculate()
159 if (nand->reading) in ingenic_nand_ecc_calculate()
162 params.size = nand->chip.ecc.size; in ingenic_nand_ecc_calculate()
163 params.bytes = nand->chip.ecc.bytes; in ingenic_nand_ecc_calculate()
164 params.strength = nand->chip.ecc.strength; in ingenic_nand_ecc_calculate()
172 struct ingenic_nand *nand = to_ingenic_nand(nand_to_mtd(chip)); in ingenic_nand_ecc_correct() local
173 struct ingenic_nfc *nfc = to_ingenic_nfc(nand->chip.controller); in ingenic_nand_ecc_correct()
[all …]
/linux/arch/arm/boot/dts/microchip/
H A Dat91-linea.dtsi61 nand: nand@3 { label
64 nand-bus-width = <8>;
65 nand-ecc-mode = "hw";
66 nand-ecc-strength = <4>;
67 nand-ecc-step-size = <512>;
68 nand-on-flash-bbt;

12345678910>>...24