/*************************************************************************** * Copyright (c) 2011, Broadcom Corporation * All Rights Reserved * Confidential Property of Broadcom Corporation * * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. * * $brcm_Workfile: $ * $brcm_Revision: $ * $brcm_Date: $ * * Module Description: spi interface for jtag flash programmer. * * Revision History: * * $brcm_Log: $ * * ***************************************************************************/ #if !defined(__JFLU_SPI_H__) #define __JFLU_SPI_H__ #define SPI_OK 0 #define SPI_ERROR 1 /* structure describing spi flash */ typedef struct spi_flash_t { unsigned char se_cmd; unsigned int sector_size; unsigned int page_size; } spi_flash_t ; void jflu_spi_init(spi_flash_t * flash); int jflu_spi_sector_erase(spi_flash_t * flash, unsigned int offset); int jflu_spi_page_program(spi_flash_t * flash, unsigned int offset, unsigned char *buf, int len); int jflu_spi_identify(spi_flash_t * flash); #endif