Home
last modified time | relevance | path

Searched +full:nand +full:- +full:oob +full:- +full:sector +full:- +full:size (Results 1 – 20 of 20) sorted by relevance

/linux/Documentation/devicetree/bindings/mtd/
H A Dbrcm,brcmnand.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Broadcom STB NAND Controller
10 - Brian Norris <computersforpeace@gmail.com>
11 - Kamal Dasu <kdasu.kdev@gmail.com>
12 - William Zhang <william.zhang@broadcom.com>
15 The Broadcom Set-Top Box NAND controller supports low-level access to raw NAND
16 flash chips. It has a memory-mapped register interface for both control
27 -- Additional SoC-specific NAND controller properties --
[all …]
/linux/drivers/mtd/nand/raw/
H A Dsm_common.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright © 2009 - Maxim Levitsky
9 /* Full oob structure as written on the flash */
21 /* one sector is always 512 bytes, but it can consist of two nand pages */
24 /* oob area is also 16 bytes, but might be from two pages */
27 /* This is maximum zone size, and all devices that have more that one zone
28 have this size */
31 /* support for small page nand */
39 static inline int sm_sector_valid(struct sm_oob *oob) in sm_sector_valid() argument
41 return hweight16(oob->data_status) >= 5; in sm_sector_valid()
[all …]
H A Dcadence-nand-controller.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Cadence NAND flash controller driver
12 #include <linux/dma-mapping.h>
26 * - PIO - can work in master or slave DMA
27 * - CDMA - needs Master DMA for accessing command descriptors.
28 * - Generic mode - can use only slave DMA.
31 * on NAND flash memory. Driver uses CDMA mode for
115 /* Size of last data sector. */
117 /* Size of not-last data sector. */
142 /* Transferred data block size for the slave DMA module. */
[all …]
H A Dtegra_nand.c1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright (C) 2014-2015 Lucas Stach <dev@lynxeye.de>
10 #include <linux/dma-mapping.h>
34 #define COMMAND_TRANS_SIZE(size) ((((size) - 1) & 0xf) << 20) argument
40 #define COMMAND_CLE_SIZE(size) ((((size) - 1) & 0x3) << 4) argument
41 #define COMMAND_ALE_SIZE(size) ((((size) - 1) & 0xf) << 0) argument
156 #define OFFSET(val, off) ((val) < (off) ? 0 : (val) - (off))
207 int bytes_per_step = DIV_ROUND_UP(BITS_PER_STEP_RS * chip->ecc.strength, in tegra_nand_ooblayout_rs_ecc()
211 return -ERANGE; in tegra_nand_ooblayout_rs_ecc()
213 oobregion->offset = SKIP_SPARE_BYTES; in tegra_nand_ooblayout_rs_ecc()
[all …]
H A Dsh_flctl.c1 // SPDX-License-Identifier: GPL-2.0
3 * SuperH FLCTL nand controller
8 * Based on fsl_elbc_nand.c, Copyright (c) 2006-2007 Freescale Semiconductor
16 #include <linux/dma-mapping.h>
37 return -ERANGE; in flctl_4secc_ooblayout_sp_ecc()
39 oobregion->offset = 0; in flctl_4secc_ooblayout_sp_ecc()
40 oobregion->length = chip->ecc.bytes; in flctl_4secc_ooblayout_sp_ecc()
49 return -ERANGE; in flctl_4secc_ooblayout_sp_free()
51 oobregion->offset = 12; in flctl_4secc_ooblayout_sp_free()
52 oobregion->length = 4; in flctl_4secc_ooblayout_sp_free()
[all …]
H A Dmtk_nand.c1 // SPDX-License-Identifier: GPL-2.0 OR MIT
3 * MTK NAND Flash controller driver.
6 * Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
10 #include <linux/dma-mapping.h>
19 #include <linux/mtd/nand-ecc-mtk.h>
21 /* NAND controller register definition */
89 #define MTK_NAME "mtk-nand"
117 * FDM: region used to store free OOB data
126 struct nand_chip nand; member
161 * supported spare size of each IP.
[all …]
H A Ddenali.c1 // SPDX-License-Identifier: GPL-2.0
3 * NAND Flash Controller Device Driver
4 * Copyright © 2009-2010, Intel Corporation and its suppliers.
6 * Copyright (c) 2017-2019 Socionext Inc.
12 #include <linux/dma-mapping.h>
23 #define DENALI_NAND_NAME "denali-nand"
31 #define DENALI_MAP10 (2 << 26) /* high-level control plane */
39 #define DENALI_BANK(denali) ((denali)->active_bank << 24)
41 #define DENALI_INVALID_BANK -1
50 return container_of(chip->controller, struct denali_controller, in to_denali_controller()
[all …]
H A Dr852.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright © 2009 - Maxim Levitsky
31 MODULE_PARM_DESC(debug, "Debug level (0-2)");
36 uint8_t reg = readb(dev->mmio + address); in r852_read_reg()
44 writeb(value, dev->mmio + address); in r852_write_reg()
51 uint32_t reg = le32_to_cpu(readl(dev->mmio + address)); in r852_read_reg_dword()
59 writel(cpu_to_le32(value), dev->mmio + address); in r852_write_reg_dword()
73 dev->dma_usable = (r852_read_reg(dev, R852_DMA_CAP) & in r852_dma_test()
76 if (!dev->dma_usable) in r852_dma_test()
81 dev->dma_usable = 0; in r852_dma_test()
[all …]
H A Dstm32_fmc2_nand.c1 // SPDX-License-Identifier: GPL-2.0
10 #include <linux/dma-mapping.h>
28 /* ECC step size */
37 /* Max requests done for a 8k nand page size */
256 struct stm32_fmc2_nand nand; member
295 struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller); in stm32_fmc2_nfc_timings_init()
296 struct stm32_fmc2_nand *nand = to_fmc2_nand(chip); in stm32_fmc2_nfc_timings_init() local
297 struct stm32_fmc2_timings *timings = &nand->timings; in stm32_fmc2_nfc_timings_init()
301 regmap_update_bits(nfc->regmap, FMC2_PCR, in stm32_fmc2_nfc_timings_init()
303 FIELD_PREP(FMC2_PCR_TCLR, timings->tclr) | in stm32_fmc2_nfc_timings_init()
[all …]
/linux/arch/mips/boot/dts/brcm/
H A Dbcm97xxx-nand-cs1-bch24.dtsi1 // SPDX-License-Identifier: GPL-2.0
2 &nand {
6 nand-on-flash-bbt;
8 nand-ecc-strength = <24>;
9 nand-ecc-step-size = <1024>;
10 brcm,nand-oob-sector-size = <27>;
13 compatible = "fixed-partitions";
14 #address-cells = <1>;
15 #size-cells = <1>;
H A Dbcm97xxx-nand-cs1-bch4.dtsi1 // SPDX-License-Identifier: GPL-2.0
2 &nand {
6 nand-on-flash-bbt;
8 nand-ecc-strength = <4>;
9 nand-ecc-step-size = <512>;
10 brcm,nand-oob-sector-size = <16>;
13 compatible = "fixed-partitions";
14 #address-cells = <1>;
15 #size-cells = <1>;
/linux/drivers/mtd/
H A Dsm_ftl.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright © 2009 - Maxim Levitsky
16 #include <linux/mtd/nand-ecc-sw-hamming.h>
17 #include "nand/raw/sm_common.h"
31 MODULE_PARM_DESC(debug, "Debug level (0-2)");
34 /* ------------------- sysfs attributes ---------------------------------- */
47 strncpy(buf, sm_attr->data, sm_attr->len); in sm_attr_show()
48 return sm_attr->len; in sm_attr_show()
61 vendor = kstrndup(ftl->cis_buffer + SM_CIS_VENDOR_OFFSET, in sm_create_sysfs_attributes()
62 SM_SMALL_PAGE - SM_CIS_VENDOR_OFFSET, GFP_KERNEL); in sm_create_sysfs_attributes()
[all …]
H A Dssfdc.c1 // SPDX-License-Identifier: GPL-2.0-only
54 unsigned long size; member
60 /* Must be ordered by size */
73 static int get_chs(unsigned long size, unsigned short *cyl, unsigned char *head, in get_chs() argument
80 while (chs_table[k].size > 0 && size > chs_table[k].size) in get_chs()
83 if (chs_table[k].size > 0) { in get_chs()
96 /* These bytes are the signature for the CIS/IDI sector */
101 /* Read and check for a valid CIS sector */
109 cis_sector = -1; in get_valid_cis_sector()
116 * Look for CIS/IDI sector on the first GOOD block (give up after 4 bad in get_valid_cis_sector()
[all …]
H A Dinftlmount.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * inftlmount.c -- INFTL mount code with extensive checks.
6 * Copyright © 2002-2003, Greg Ungerer (gerg@snapgear.com)
34 //struct inftl_oob oob; in find_boot_record()
37 struct INFTLMediaHeader *mh = &inftl->MediaHdr; in find_boot_record()
38 struct mtd_info *mtd = inftl->mbd.mtd; in find_boot_record()
49 inftl->EraseSize = inftl->mbd.mtd->erasesize; in find_boot_record()
50 inftl->nb_blocks = (u32)inftl->mbd.mtd->size / inftl->EraseSize; in find_boot_record()
52 inftl->MediaUnit = BLOCK_NIL; in find_boot_record()
55 for (block = 0; block < inftl->nb_blocks; block++) { in find_boot_record()
[all …]
/linux/arch/arm/boot/dts/broadcom/
H A Dbcm963138dvt.dts1 // SPDX-License-Identifier: GPL-2.0
6 /dts-v1/;
16 stdout-path = &serial0;
35 brcm,wp-not-connected;
40 nand-ecc-strength = <4>;
41 nand-ecc-step-size = <512>;
42 brcm,nand-oob-sector-size = <16>;
43 nand-on-flash-bbt;
H A Dbcm958300k.dts33 /dts-v1/;
35 #include "bcm-cygnus.dtsi"
47 stdout-path = "serial0:115200n8";
64 nand@1 {
67 nand-on-flash-bbt;
69 #address-cells = <1>;
70 #size-cells = <1>;
72 nand-ecc-strength = <24>;
73 nand-ecc-step-size = <1024>;
75 brcm,nand-oob-sector-size = <27>;
H A Dbcm958305k.dts33 /dts-v1/;
35 #include "bcm-cygnus.dtsi"
47 stdout-path = "serial0:115200n8";
72 nand@1 {
75 nand-on-flash-bbt;
77 #address-cells = <1>;
78 #size-cells = <1>;
80 nand-ecc-strength = <24>;
81 nand-ecc-step-size = <1024>;
83 brcm,nand-oob-sector-size = <27>;
H A Dbcm911360_entphn.dts33 /dts-v1/;
35 #include "bcm-cygnus.dtsi"
36 #include "dt-bindings/input/input.h"
47 stdout-path = "serial0:115200n8";
50 gpio-keys {
51 compatible = "gpio-keys";
53 button-hook {
74 assigned-clocks =
77 assigned-clock-rates = <525000000>, <300000000>;
86 nand@1 {
[all …]
H A Dbcm958625-meraki-mx6x-common.dtsi1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
5 * Copyright (C) 2020-2021 Matthew Hagan <mnhagan88@gmail.com>
8 #include "bcm-nsp.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
14 pwm-leds {
15 compatible = "pwm-leds";
17 led-1 {
21 max-brightness = <255>;
[all …]
/linux/arch/arm64/boot/dts/broadcom/stingray/
H A Dbcm958742-base.dtsi4 * Copyright(c) 2016-2017 Broadcom. All rights reserved.
33 #include "stingray-board-base.dtsi"
37 compatible = "regulator-gpio";
38 regulator-name = "sdio0_vddo_ctrl_reg";
39 regulator-type = "voltage";
40 regulator-min-microvolt = <1800000>;
41 regulator-max-microvolt = <3300000>;
48 compatible = "regulator-gpio";
49 regulator-name = "sdio1_vddo_ctrl_reg";
50 regulator-type = "voltage";
[all …]