2010-07-26 22:33:30 +00:00
|
|
|
/* -*- c++ -*- */
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2010 Ettus Research LLC
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
//we're working in bytes and byte addresses so we can run the same code with Flash chips of different sector sizes.
|
2010-10-05 18:53:43 +00:00
|
|
|
//it's really 1463736, but rounded up to 1.5MB
|
|
|
|
|
#define FPGA_IMAGE_SIZE_BYTES 1572864
|
2010-12-18 08:09:55 +00:00
|
|
|
//16K
|
|
|
|
|
#define FW_IMAGE_SIZE_BYTES 0x3fff
|
2010-07-26 22:33:30 +00:00
|
|
|
|
|
|
|
|
#define SAFE_FPGA_IMAGE_LOCATION_ADDR 0x00000000
|
2010-10-05 18:53:43 +00:00
|
|
|
#define SAFE_FW_IMAGE_LOCATION_ADDR 0x003F0000
|
|
|
|
|
#define PROD_FPGA_IMAGE_LOCATION_ADDR 0x00180000
|
|
|
|
|
#define PROD_FW_IMAGE_LOCATION_ADDR 0x00300000
|
2010-07-26 22:33:30 +00:00
|
|
|
|
|
|
|
|
int is_valid_fpga_image(uint32_t addr);
|
|
|
|
|
int is_valid_fw_image(uint32_t addr);
|
2010-12-15 19:58:02 +00:00
|
|
|
void start_program(void);
|
2011-04-22 18:28:27 +00:00
|
|
|
void do_the_bootload_thing(void);
|