Пример #1
0
#include "hisfc350_spi_n25q256a.c"
static struct spi_driver  spi_driver_n25q256a = {
	.wait_ready   = spi_general_wait_ready,
	.write_enable = spi_general_write_enable,
	.entry_4addr  = spi_n25q256a_entry_4addr,
	.bus_prepare  = spi_general_bus_prepare,
};
/*****************************************************************************/

struct spi_info hisfc350_spi_info_table[] =
{

	{
		"EN25QH256", {0x1C, 0x70, 0x19}, 3, (_64K * 512), _64K, 4,
		{
			&READ_STD(0, INFINITE, 50),
			&READ_FAST(1, INFINITE, 50),
			&READ_DUAL(1, INFINITE, 54),
			&READ_DUAL_ADDR(1, INFINITE, 54),
			0
		},

		{
			&WRITE_STD(0 , 256, 75),
			0
		},

		{
			&ERASE_SECTOR_64K(0, _64K, 75),
			0
		},
Пример #2
0
SET_ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 50);
SET_ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 64);
SET_ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 66);
SET_ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 75);
SET_ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 80);
SET_ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 86);
SET_ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 104);
SET_ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 108);

/*****************************************************************************/

struct spi_info spi_info_table[] = {
	/* name        id                id_len chipsize(Bytes) erasesize */
	{
		"at25fs010",  {0x1f, 0x66, 0x01}, 3,  _128K,  _32K, 3,
		{&READ_STD(0, INFINITE, 0), 0},  {&WRITE_STD(0, 256, 0), 0},
		{&ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 0), 0}
	},
	{
		"at25fs040",  {0x1f, 0x66, 0x04}, 3,  _512K,  _64K, 3,
		{&READ_STD(0, INFINITE, 0), 0},  {&WRITE_STD(0, 256, 0), 0},
		{&ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 0), 0}
	},

	{
		"at25df041a", {0x1f, 0x44, 0x01}, 3,  _512K,  _64K, 3,
		{&READ_STD(0, INFINITE, 0), 0},  {&WRITE_STD(0, 256, 0), 0},
		{&ERASE_SECTOR(0, SPI_IF_ERASE_SECTOR, 0), 0}
	},
	{
		"at25df641",  {0x1f, 0x48, 0x00}, 3,  _8M, _64K, 3,