constify the flash drivers

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1722 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent c0258e0026
commit ad51f4b9c6

@ -83,6 +83,10 @@
src/tap/usbconn/libftd2xx.c, src/tap/usbconn/libftdi.c,
src/tap/usbconn/libusb.c: Constify the USB cable drivers.
* include/urjtag/flash.h, src/flash/amd.c, src/flash/amd.h,
src/flash/amd_flash.c, src/flash/flash.c, src/flash/intel.c,
src/flash/intel.h: Constify the flash drivers.
2010-01-22 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_bit.c (cmd_bit_print_params): Fix strncat length handling.

@ -60,7 +60,7 @@ typedef struct
}
urj_flash_driver_t;
extern urj_flash_driver_t *urj_flash_flash_drivers[];
extern const urj_flash_driver_t *urj_flash_flash_drivers[];
/** @return URJ_STATUS_OK on success; URJ_STATUS_FAIL on error */
int urj_flash_detectflash (urj_log_level_t ll, urj_bus_t *bus, uint32_t adr);

@ -642,7 +642,7 @@ amd_flash_program32 (urj_flash_cfi_array_t *cfi_array, uint32_t adr,
return URJ_STATUS_OK;
}
urj_flash_driver_t urj_flash_amd_32_flash_driver = {
const urj_flash_driver_t urj_flash_amd_32_flash_driver = {
N_("AMD/Fujitsu Standard Command Set"),
N_("supported: AMD 29LV640D, 29LV641D, 29LV642D; 2x16 Bit"),
4, /* buswidth */
@ -654,7 +654,7 @@ urj_flash_driver_t urj_flash_amd_32_flash_driver = {
amd_flash_read_array,
};
urj_flash_driver_t urj_flash_amd_16_flash_driver = {
const urj_flash_driver_t urj_flash_amd_16_flash_driver = {
N_("AMD/Fujitsu Standard Command Set"),
N_("supported: AMD 29LV800B, S29GLxxxN; MX29LV640B, W19B320AT/B; 1x16 Bit"),
2, /* buswidth */
@ -666,7 +666,7 @@ urj_flash_driver_t urj_flash_amd_16_flash_driver = {
amd_flash_read_array,
};
urj_flash_driver_t urj_flash_amd_8_flash_driver = {
const urj_flash_driver_t urj_flash_amd_8_flash_driver = {
N_("AMD/Fujitsu Standard Command Set"),
N_("supported: AMD 29LV160, AMD 29LV065D, AMD 29LV040B, S29GLxxxN, W19B320AT/B; 1x8 Bit"),
1, /* buswidth */

@ -40,9 +40,9 @@
int urj_flash_amd_detect (urj_bus_t *bus, uint32_t adr,
urj_flash_cfi_array_t **urj_flash_cfi_array);
extern urj_flash_driver_t urj_flash_amd_32_flash_driver;
extern urj_flash_driver_t urj_flash_amd_16_flash_driver;
extern urj_flash_driver_t urj_flash_amd_8_flash_driver;
extern urj_flash_driver_t urj_flash_amd_29xx040_flash_driver; //20/09/2006
extern const urj_flash_driver_t urj_flash_amd_32_flash_driver;
extern const urj_flash_driver_t urj_flash_amd_16_flash_driver;
extern const urj_flash_driver_t urj_flash_amd_8_flash_driver;
extern const urj_flash_driver_t urj_flash_amd_29xx040_flash_driver;
#endif /* URJ_FLASH_H */

@ -409,7 +409,7 @@ amd_29xx040_unlock_block (urj_flash_cfi_array_t *cfi_array,
}
urj_flash_driver_t urj_flash_amd_29xx040_flash_driver = {
const urj_flash_driver_t urj_flash_amd_29xx040_flash_driver = {
N_("AMD Standard Command Set"),
N_("supported: AMD 29LV040B, 29C040B, 1x8 Bit"),
1, /* buswidth */

@ -51,7 +51,7 @@
#include "intel.h"
#include "amd.h"
urj_flash_driver_t *urj_flash_flash_drivers[] = {
const urj_flash_driver_t *urj_flash_flash_drivers[] = {
&urj_flash_amd_32_flash_driver,
&urj_flash_amd_16_flash_driver,
&urj_flash_amd_8_flash_driver,
@ -62,7 +62,7 @@ urj_flash_driver_t *urj_flash_flash_drivers[] = {
NULL
};
static urj_flash_driver_t *flash_driver = NULL;
static const urj_flash_driver_t *flash_driver = NULL;
static int
set_flash_driver (void)

@ -525,7 +525,7 @@ intel_flash_readarray (urj_flash_cfi_array_t *cfi_array)
URJ_BUS_WRITE (cfi_array->bus, cfi_array->address, 0x00FF00FF);
}
urj_flash_driver_t urj_flash_intel_32_flash_driver = {
const urj_flash_driver_t urj_flash_intel_32_flash_driver = {
N_("Intel Standard Command Set"),
N_("supported: 28Fxxxx, 2 x 16 bit"),
4, /* buswidth */
@ -537,7 +537,7 @@ urj_flash_driver_t urj_flash_intel_32_flash_driver = {
intel_flash_readarray32,
};
urj_flash_driver_t urj_flash_intel_16_flash_driver = {
const urj_flash_driver_t urj_flash_intel_16_flash_driver = {
N_("Intel Standard Command Set"),
N_("supported: 28Fxxxx, 1 x 16 bit"),
2, /* buswidth */
@ -549,7 +549,7 @@ urj_flash_driver_t urj_flash_intel_16_flash_driver = {
intel_flash_readarray,
};
urj_flash_driver_t urj_flash_intel_8_flash_driver = {
const urj_flash_driver_t urj_flash_intel_8_flash_driver = {
N_("Intel Standard Command Set"),
N_("supported: 28Fxxxx, 1 x 8 bit"),
1, /* buswidth */

@ -98,8 +98,8 @@
#define CFI_CHIP_INTEL_28F256K18 0x8807
#define CFI_CHIPN_INTEL_28F256K18 "28F256K18"
extern urj_flash_driver_t urj_flash_intel_32_flash_driver;
extern urj_flash_driver_t urj_flash_intel_16_flash_driver;
extern urj_flash_driver_t urj_flash_intel_8_flash_driver;
extern const urj_flash_driver_t urj_flash_intel_32_flash_driver;
extern const urj_flash_driver_t urj_flash_intel_16_flash_driver;
extern const urj_flash_driver_t urj_flash_intel_8_flash_driver;
#endif /* FLASH_INTEL_H */

Loading…
Cancel
Save