summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/drivers/mtd/chips/rtl819x/spi_flash.h
blob: 3681a65315ab17781cb2bf3dbcd34a295836542a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _MTD_SPI_PROBE_H_
#define _MTD_SPI_PROBE_H_

struct spi_chip_mtd
{
	unsigned int 		chip_id;
	unsigned int		extra_id;
	unsigned int		sectorSize;
	unsigned int 		deviceSize;
	unsigned int 		uiClkMhz;
	char*				name;
};

struct spi_chip_info 
{
	char* name;
	unsigned int chip_select;
	struct spi_chip_mtd *flash;
	
	void (*destroy)(struct spi_chip_info *chip_info);

	unsigned int (*read)(unsigned int  from, unsigned int  to, unsigned int  size, unsigned int uiChip);
	unsigned int (*write)(unsigned int  from, unsigned int  to, unsigned int  size, unsigned int uiChip);
	int (*erase)(unsigned int  addr, unsigned int uiChip);
};

#endif /* _MTD_SPI_PROBE_H_ */