| /OK3568_Linux_fs/kernel/drivers/mtd/spi-nor/ |
| H A D | core.c | 23 #include <linux/mtd/spi-nor.h> 32 struct spi_nor *nor; member 54 * @nor: pointer to 'struct spi_nor' 61 static bool spi_nor_spimem_bounce(struct spi_nor *nor, struct spi_mem_op *op) in spi_nor_spimem_bounce() argument 66 if (op->data.nbytes > nor->bouncebuf_size) in spi_nor_spimem_bounce() 67 op->data.nbytes = nor->bouncebuf_size; in spi_nor_spimem_bounce() 68 op->data.buf.in = nor->bouncebuf; in spi_nor_spimem_bounce() 77 * @nor: pointer to 'struct spi_nor' 82 static int spi_nor_spimem_exec_op(struct spi_nor *nor, struct spi_mem_op *op) in spi_nor_spimem_exec_op() argument 86 error = spi_mem_adjust_op_size(nor->spimem, op); in spi_nor_spimem_exec_op() [all …]
|
| H A D | Makefile | 3 spi-nor-objs := core.o sfdp.o 4 spi-nor-objs += atmel.o 5 spi-nor-objs += boya.o 6 spi-nor-objs += catalyst.o 7 spi-nor-objs += dosilicon.o 8 spi-nor-objs += eon.o 9 spi-nor-objs += esmt.o 10 spi-nor-objs += everspin.o 11 spi-nor-objs += fmsh.o 12 spi-nor-objs += fujitsu.o [all …]
|
| H A D | xilinx.c | 7 #include <linux/mtd/spi-nor.h> 29 static u32 s3an_convert_addr(struct spi_nor *nor, u32 addr) in s3an_convert_addr() argument 33 offset = addr % nor->page_size; in s3an_convert_addr() 34 page = addr / nor->page_size; in s3an_convert_addr() 35 page <<= (nor->page_size > 512) ? 10 : 9; in s3an_convert_addr() 40 static int xilinx_nor_setup(struct spi_nor *nor, in xilinx_nor_setup() argument 45 ret = spi_nor_xread_sr(nor, nor->bouncebuf); in xilinx_nor_setup() 49 nor->erase_opcode = SPINOR_OP_XSE; in xilinx_nor_setup() 50 nor->program_opcode = SPINOR_OP_XPP; in xilinx_nor_setup() 51 nor->read_opcode = SPINOR_OP_READ; in xilinx_nor_setup() [all …]
|
| H A D | sst.c | 7 #include <linux/mtd/spi-nor.h> 48 struct spi_nor *nor = mtd_to_spi_nor(mtd); in sst_write() local 52 dev_dbg(nor->dev, "to 0x%08x, len %zd\n", (u32)to, len); in sst_write() 54 ret = spi_nor_lock_and_prep(nor); in sst_write() 58 ret = spi_nor_write_enable(nor); in sst_write() 62 nor->sst_write_second = false; in sst_write() 66 nor->program_opcode = SPINOR_OP_BP; in sst_write() 69 ret = spi_nor_write_data(nor, to, 1, buf); in sst_write() 73 ret = spi_nor_wait_till_ready(nor); in sst_write() 83 nor->program_opcode = SPINOR_OP_AAI_WP; in sst_write() [all …]
|
| H A D | core.h | 86 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type 125 * struct spi_nor_erase_region - Structure to describe a SPI NOR erase region 129 * the last in the SPI NOR flash memory and to indicate 150 * struct spi_nor_erase_map - Structure to describe the SPI NOR erase map 154 * @uniform_region: a pre-allocated erase region for SPI NOR with a uniform 162 * uniform and non-uniform SPI NOR flash memories if they 174 * struct spi_nor_locking_ops - SPI NOR locking methods 175 * @lock: lock a region of the SPI NOR. 176 * @unlock: unlock a region of the SPI NOR. 177 * @is_locked: check if a region of the SPI NOR is completely locked [all …]
|
| H A D | sfdp.c | 9 #include <linux/mtd/spi-nor.h> 133 * @nor: pointer to a 'struct spi_nor' 140 static int spi_nor_read_raw(struct spi_nor *nor, u32 addr, size_t len, u8 *buf) in spi_nor_read_raw() argument 145 ret = spi_nor_read_data(nor, addr, len, buf); in spi_nor_read_raw() 160 * @nor: pointer to a 'struct spi_nor' 171 static int spi_nor_read_sfdp(struct spi_nor *nor, u32 addr, in spi_nor_read_sfdp() argument 177 read_opcode = nor->read_opcode; in spi_nor_read_sfdp() 178 addr_width = nor->addr_width; in spi_nor_read_sfdp() 179 read_dummy = nor->read_dummy; in spi_nor_read_sfdp() 181 nor->read_opcode = SPINOR_OP_RDSFDP; in spi_nor_read_sfdp() [all …]
|
| H A D | atmel.c | 7 #include <linux/mtd/spi-nor.h> 17 static int atmel_at25fs_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) in atmel_at25fs_lock() argument 22 static int atmel_at25fs_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len) in atmel_at25fs_unlock() argument 27 if (ofs || len != nor->params->size) in atmel_at25fs_unlock() 31 ret = spi_nor_write_sr_and_check(nor, 0); in atmel_at25fs_unlock() 33 dev_dbg(nor->dev, "unable to clear BP bits, WP# asserted?\n"); in atmel_at25fs_unlock() 38 static int atmel_at25fs_is_locked(struct spi_nor *nor, loff_t ofs, uint64_t len) in atmel_at25fs_is_locked() argument 49 static void atmel_at25fs_default_init(struct spi_nor *nor) in atmel_at25fs_default_init() argument 51 nor->params->locking_ops = &atmel_at25fs_locking_ops; in atmel_at25fs_default_init()
|
| /OK3568_Linux_fs/u-boot/drivers/mtd/spi/ |
| H A D | spi-nor-tiny.c | 20 #include <linux/mtd/spi-nor.h> 37 static int spi_nor_read_write_reg(struct spi_nor *nor, struct spi_mem_op in spi_nor_read_write_reg() argument 44 return spi_mem_exec_op(nor->spi, op); in spi_nor_read_write_reg() 47 static int spi_nor_read_reg(struct spi_nor *nor, u8 code, u8 *val, int len) in spi_nor_read_reg() argument 55 ret = spi_nor_read_write_reg(nor, &op, val); in spi_nor_read_reg() 63 static int spi_nor_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) in spi_nor_write_reg() argument 70 return spi_nor_read_write_reg(nor, &op, buf); in spi_nor_write_reg() 73 static ssize_t spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len, in spi_nor_read_data() argument 77 SPI_MEM_OP(SPI_MEM_OP_CMD(nor->read_opcode, 1), in spi_nor_read_data() 78 SPI_MEM_OP_ADDR(nor->addr_width, from, 1), in spi_nor_read_data() [all …]
|
| H A D | spi-nor-core.c | 20 #include <linux/mtd/spi-nor.h> 37 static int spi_nor_read_write_reg(struct spi_nor *nor, struct spi_mem_op in spi_nor_read_write_reg() argument 44 return spi_mem_exec_op(nor->spi, op); in spi_nor_read_write_reg() 47 static int spi_nor_read_reg(struct spi_nor *nor, u8 code, u8 *val, int len) in spi_nor_read_reg() argument 55 ret = spi_nor_read_write_reg(nor, &op, val); in spi_nor_read_reg() 63 static int spi_nor_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) in spi_nor_write_reg() argument 70 return spi_nor_read_write_reg(nor, &op, buf); in spi_nor_write_reg() 73 static ssize_t spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len, in spi_nor_read_data() argument 77 SPI_MEM_OP(SPI_MEM_OP_CMD(nor->read_opcode, 1), in spi_nor_read_data() 78 SPI_MEM_OP_ADDR(nor->addr_width, from, 1), in spi_nor_read_data() [all …]
|
| H A D | spi-nor-core.su | |
| H A D | Makefile | 9 spi-nor-y := sf_probe.o spi-nor-ids.o 14 spi-nor-y += spi-nor-tiny.o 16 spi-nor-y += spi-nor-core.o 19 spi-nor-y += spi-nor-core.o 22 obj-$(CONFIG_SPI_FLASH) += spi-nor.o
|
| /OK3568_Linux_fs/kernel/drivers/mtd/spi-nor/controllers/ |
| H A D | hisi-sfc.c | 3 * HiSilicon FMC SPI NOR flash controller driver 13 #include <linux/mtd/spi-nor.h> 99 struct spi_nor *nor[HIFMC_MAX_CHIP_NUM]; member 147 static int hisi_spi_nor_prep(struct spi_nor *nor) in hisi_spi_nor_prep() argument 149 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_prep() 170 static void hisi_spi_nor_unprep(struct spi_nor *nor) in hisi_spi_nor_unprep() argument 172 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_unprep() 179 static int hisi_spi_nor_op_reg(struct spi_nor *nor, in hisi_spi_nor_op_reg() argument 182 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_op_reg() 202 static int hisi_spi_nor_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in hisi_spi_nor_read_reg() argument [all …]
|
| H A D | aspeed-smc.c | 15 #include <linux/mtd/spi-nor.h> 100 struct spi_nor nor; member 119 * CE0 and CE1 can only be of type SPI. CE2 can be of type NOR but the 277 static void aspeed_smc_start_user(struct spi_nor *nor) in aspeed_smc_start_user() argument 279 struct aspeed_smc_chip *chip = nor->priv; in aspeed_smc_start_user() 296 static void aspeed_smc_stop_user(struct spi_nor *nor) in aspeed_smc_stop_user() argument 298 struct aspeed_smc_chip *chip = nor->priv; in aspeed_smc_stop_user() 308 static int aspeed_smc_prep(struct spi_nor *nor) in aspeed_smc_prep() argument 310 struct aspeed_smc_chip *chip = nor->priv; in aspeed_smc_prep() 316 static void aspeed_smc_unprep(struct spi_nor *nor) in aspeed_smc_unprep() argument [all …]
|
| H A D | nxp-spifi.c | 3 * SPI NOR driver for NXP SPI Flash Interface (SPIFI) 18 #include <linux/mtd/spi-nor.h> 59 struct spi_nor nor; member 126 static int nxp_spifi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in nxp_spifi_read_reg() argument 129 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read_reg() 149 static int nxp_spifi_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf, in nxp_spifi_write_reg() argument 152 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_write_reg() 173 static ssize_t nxp_spifi_read(struct spi_nor *nor, loff_t from, size_t len, in nxp_spifi_read() argument 176 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read() 188 static ssize_t nxp_spifi_write(struct spi_nor *nor, loff_t to, size_t len, in nxp_spifi_write() argument [all …]
|
| /OK3568_Linux_fs/u-boot/spl/drivers/mtd/spi/ |
| H A D | spi-nor-core.su | |
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/spi/ |
| H A D | mediatek,spi-mtk-nor.yaml | 4 $id: http://devicetree.org/schemas/spi/mediatek,spi-mtk-nor.yaml# 7 title: Serial NOR flash controller for MediaTek ARM SoCs 15 SPI NOR flash. There should be only one spi slave device following 17 for devices other than SPI NOR flash due to limited transfer 28 - mediatek,mt2701-nor 29 - mediatek,mt2712-nor 30 - mediatek,mt7622-nor 31 - mediatek,mt7623-nor 32 - mediatek,mt7629-nor 33 - mediatek,mt8192-nor [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/spi/ |
| H A D | Kconfig | 32 access the SPI NOR flash on platforms embedding this Altera 48 to access SPI NOR flash and other SPI peripherals. This driver 65 access the SPI NOR flash on platforms embedding this Broadcom 73 access the SPI NOR flash on platforms embedding these Broadcom 87 used to access the SPI NOR flash on platforms embedding this 94 access the SPI NOR flash on platforms embedding this Designware 101 access the SPI NOR flash on platforms embedding this Samsung 108 access the SPI NOR flash and SPI Data flash on platforms embedding 116 access the SPI NOR flash on platforms embedding this Intel 123 used to access the SPI NOR flash on platforms embedding this [all …]
|
| /OK3568_Linux_fs/kernel/include/linux/mtd/ |
| H A D | spi-nor.h | 296 * struct spi_nor_controller_ops - SPI NOR controller driver specific 304 * @read: read data from the SPI NOR. 305 * @write: write data to the SPI NOR. 306 * @erase: erase a sector of the SPI NOR at the offset @offs; if 307 * not provided by the driver, SPI NOR will send the erase 311 int (*prepare)(struct spi_nor *nor); 312 void (*unprepare)(struct spi_nor *nor); 313 int (*read_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, size_t len); 314 int (*write_reg)(struct spi_nor *nor, u8 opcode, const u8 *buf, 317 ssize_t (*read)(struct spi_nor *nor, loff_t from, size_t len, u8 *buf); [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/driver-api/mtd/ |
| H A D | spi-nor.rst | 2 SPI NOR framework 11 arbitrary streams of bytes, but rather are designed specifically for SPI NOR. 13 In particular, Freescale's QuadSPI controller must know the NOR commands to 18 details of the SPI NOR protocol. 24 With this new layer, the SPI NOR controller driver does not depend on the 35 SPI NOR chip 40 SPI NOR framework 46 SPI NOR chip 48 With the SPI NOR controller driver (Freescale QuadSPI), it looks like: 51 SPI NOR framework [all …]
|
| /OK3568_Linux_fs/u-boot/include/linux/mtd/ |
| H A D | spi-nor.h | 265 * struct spi_nor - Structure for defining a the SPI NOR layer 268 * @dev: point to a spi device, or a spi nor controller device. 269 * @info: spi-nor part JDEC MFR id and other info 270 * @page_size: the page size of the SPI NOR 280 * @flags: flag options for the current SPI-NOR (SNOR_F_*) 291 * @read: [DRIVER-SPECIFIC] read data from the SPI NOR 292 * @write: [DRIVER-SPECIFIC] write data to the SPI NOR 293 * @erase: [DRIVER-SPECIFIC] erase a sector of the SPI NOR 295 * spi-nor will send the erase opcode via write_reg() 296 * @flash_lock: [FLASH-SPECIFIC] lock a region of the SPI NOR [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mtd/ |
| H A D | hisilicon,fmc-spi-nor.txt | 1 HiSilicon SPI-NOR Flash Controller 4 - compatible : Should be "hisilicon,fmc-spi-nor" and one of the following strings: 5 "hisilicon,hi3519-spi-nor" 10 - clocks : handle to spi-nor flash controller clock. 13 spi-nor-controller@10000000 { 14 compatible = "hisilicon,hi3519-spi-nor", "hisilicon,fmc-spi-nor"; 20 spi-nor@0 { 21 compatible = "jedec,spi-nor";
|
| /OK3568_Linux_fs/u-boot/include/configs/ |
| H A D | mccmon6.h | 65 /* NOR 16-bit mode */ 75 /* NOR Flash MTD */ 84 #define MTDIDS_DEFAULT "nor0=8000000.nor" 86 "mtdparts=8000000.nor:" \ 87 "32m@0x0(mccmon6-image.nor)," \ 88 "256k@0x40000(u-boot-env.nor)," \ 89 "1m@0x80000(u-boot.nor)," \ 90 "8m@0x180000(kernel.nor)," \ 91 "8m@0x980000(swupdate-kernel.nor)," \ 92 "8m@0x1180000(swupdate-rootfs.nor)," \ [all …]
|
| H A D | dra7xx_evm.h | 199 /* Parallel NOR Support */ 201 /* NOR: device related configs */ 219 "128k(NOR.SPL)," \ 220 "128k(NOR.SPL.backup1)," \ 221 "128k(NOR.SPL.backup2)," \ 222 "128k(NOR.SPL.backup3)," \ 223 "256k(NOR.u-boot-spl-os)," \ 224 "1m(NOR.u-boot)," \ 225 "128k(NOR.u-boot-env)," \ 226 "128k(NOR.u-boot-env.backup1)," \ [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/boot/dts/fsl/ |
| H A D | mpc8536ds.dtsi | 13 * * Neither the name of Freescale Semiconductor nor the 36 nor@0,0 { 46 label = "ramdisk-nor"; 51 label = "diagnostic-nor"; 57 label = "dink-nor"; 63 label = "kernel-nor"; 68 label = "fs-nor"; 73 label = "dtb-nor"; 78 label = "u-boot-nor"; 145 compatible = "spansion,s25sl12801", "jedec,spi-nor"; [all …]
|
| /OK3568_Linux_fs/u-boot/board/freescale/mx35pdk/ |
| H A D | README | 43 and for NOR: 54 0x00080000-0x00480000 : "nor.Kernel" 55 0x00480000-0x02280000 : "nor.userfs" 56 0x02280000-0x03e80000 : "nor.rootfs" 74 U-Boot should be stored on the NOR flash. 82 Saving U-Boot in the NOR flash 85 Check the partition for boot in the NOR flash. Setting the mtdparts as reported, 90 0x00080000-0x00480000 : "nor.Kernel" 91 0x00480000-0x02280000 : "nor.userfs" 92 0x02280000-0x03e80000 : "nor.rootfs" [all …]
|