blob: 513fa7816d761d39d91bde1a051c7b859d1206de [file] [log] [blame]
#ifndef __SPI_FLASH_H
#define __SPI_FLASH_H
/*
* (C) Copyright 2010 Quantenna Communications Inc.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
extern unsigned spi_flash_size(void);
extern unsigned spi_flash_sector_size(void);
#if defined(TOPAZ_TINY_UBOOT)
extern int spi_flash_read(u32 flash_addr, u8 *mem_addr, u32 size, u32 *ret_size);
extern int spi_flash_erase(u32 flash_addr, u32 size);
extern int spi_flash_write(u32 flash_addr, u8 *mem_addr, u32 size, u32 *ret_size);
#endif
#endif // #ifndef __SPI_FLASH_H