12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /*
- * Data Flash (non-linear)
- * -----------------------
- * |(0) KFC 64K |
- * ------------------------
- * |... |
- * -------------------------
- *
- *
- */
- #ifndef __SISSPI_INTERFACE_H
- #define __SISSPI_INTERFACE_H
- #include <linux/ioctl.h>
- #include <linux/types.h>
- #include <asm/mips-boards/drvmem.h>
- #include <drv_devices.h>
- #include <drv_spi_flashalloc_internal.h>
- #define DATAFLASH 0x200000
- #define CODEFLASH 0x100000
- ////////////
- extern int spi_write_flash(void *flashaddr, void *dramaddr, unsigned long size);
- extern bool spi_protect(__u32 addr);
- extern bool spi_unprotect(__u32 addr);
- extern void spi_cmd_rw_lock(void);
- extern void spi_cmd_rw_unlock(void);
- extern bool erase(int value,__u32 addr );
- extern __u8 spi_dmawrite(__u32 dest,__u32 src,__u32 size);
- extern int spi_read_flash(void *dramaddr, void *flashaddr, unsigned long size);
- extern int spi_sif_wqlis_empty(void);
- extern u32 lookup_flashtable_addr_bytag(char* sys_tag);
- extern int spi_update_module(char *module_name, char *update_data, u32 update_data_size);
- extern void SPI_Cmd_GPIOMode_RW(u16 writecnt, u8 *writebuf, u16 readcnt, u8 *readbuf);
- extern __u32 DetectRealFlashSize(void);
- extern __u32 GetNorFlashStatus(char *FlashID);
- extern void spi_encrypt_control(bool set_bit);
- #endif
|