summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/flashrom.c b/flashrom.c
index 071c52e..8a97454 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -38,9 +38,9 @@ const char *flashrom_version = FLASHROM_VERSION;
char *chip_to_probe = NULL;
int verbose = 0;
-#if INTERNAL_SUPPORT == 1
+#if CONFIG_INTERNAL == 1
enum programmer programmer = PROGRAMMER_INTERNAL;
-#elif DUMMY_SUPPORT == 1
+#elif CONFIG_DUMMY == 1
enum programmer programmer = PROGRAMMER_DUMMY;
#else
/* If neither internal nor dummy are selected, we must pick a sensible default.
@@ -48,39 +48,39 @@ enum programmer programmer = PROGRAMMER_DUMMY;
* if more than one of them is selected. If only one is selected, it is clear
* that the user wants that one to become the default.
*/
-#if NIC3COM_SUPPORT+GFXNVIDIA_SUPPORT+DRKAISER_SUPPORT+SATASII_SUPPORT+ATAHPT_SUPPORT+FT2232_SPI_SUPPORT+SERPROG_SUPPORT+BUSPIRATE_SPI_SUPPORT+DEDIPROG_SUPPORT+NICREALTEK_SUPPORT > 1
-#error Please enable either CONFIG_DUMMY or CONFIG_INTERNAL or disable support for all external programmers except one.
+#if CONFIG_NIC3COM+CONFIG_NICREALTEK+CONFIG_GFXNVIDIA+CONFIG_DRKAISER+CONFIG_SATASII+CONFIG_ATAHPT+CONFIG_FT2232_SPI+CONFIG_SERPROG+CONFIG_BUSPIRATE_SPI+CONFIG_DEDIPROG > 1
+#error Please enable either CONFIG_DUMMY or CONFIG_INTERNAL or disable support for all programmers except one.
#endif
enum programmer programmer =
-#if NIC3COM_SUPPORT == 1
+#if CONFIG_NIC3COM == 1
PROGRAMMER_NIC3COM
#endif
-#if NICREALTEK_SUPPORT == 1
+#if CONFIG_NICREALTEK == 1
PROGRAMMER_NICREALTEK
PROGRAMMER_NICREALTEK2
#endif
-#if GFXNVIDIA_SUPPORT == 1
+#if CONFIG_GFXNVIDIA == 1
PROGRAMMER_GFXNVIDIA
#endif
-#if DRKAISER_SUPPORT == 1
+#if CONFIG_DRKAISER == 1
PROGRAMMER_DRKAISER
#endif
-#if SATASII_SUPPORT == 1
+#if CONFIG_SATASII == 1
PROGRAMMER_SATASII
#endif
-#if ATAHPT_SUPPORT == 1
+#if CONFIG_ATAHPT == 1
PROGRAMMER_ATAHPT
#endif
-#if FT2232_SPI_SUPPORT == 1
- PROGRAMMER_FT2232SPI
+#if CONFIG_FT2232_SPI == 1
+ PROGRAMMER_FT2232_SPI
#endif
-#if SERPROG_SUPPORT == 1
+#if CONFIG_SERPROG == 1
PROGRAMMER_SERPROG
#endif
-#if BUSPIRATE_SPI_SUPPORT == 1
- PROGRAMMER_BUSPIRATESPI
+#if CONFIG_BUSPIRATE_SPI == 1
+ PROGRAMMER_BUSPIRATE_SPI
#endif
-#if DEDIPROG_SUPPORT == 1
+#if CONFIG_DEDIPROG == 1
PROGRAMMER_DEDIPROG
#endif
;
@@ -107,7 +107,7 @@ struct decode_sizes max_rom_decode = {
};
const struct programmer_entry programmer_table[] = {
-#if INTERNAL_SUPPORT == 1
+#if CONFIG_INTERNAL == 1
{
.name = "internal",
.init = internal_init,
@@ -126,7 +126,7 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if DUMMY_SUPPORT == 1
+#if CONFIG_DUMMY == 1
{
.name = "dummy",
.init = dummy_init,
@@ -145,7 +145,7 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if NIC3COM_SUPPORT == 1
+#if CONFIG_NIC3COM == 1
{
.name = "nic3com",
.init = nic3com_init,
@@ -164,7 +164,7 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if NICREALTEK_SUPPORT == 1
+#if CONFIG_NICREALTEK == 1
{
.name = "nicrealtek",
.init = nicrealtek_init,
@@ -200,7 +200,7 @@ const struct programmer_entry programmer_table[] = {
#endif
-#if GFXNVIDIA_SUPPORT == 1
+#if CONFIG_GFXNVIDIA == 1
{
.name = "gfxnvidia",
.init = gfxnvidia_init,
@@ -219,7 +219,7 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if DRKAISER_SUPPORT == 1
+#if CONFIG_DRKAISER == 1
{
.name = "drkaiser",
.init = drkaiser_init,
@@ -238,7 +238,7 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if SATASII_SUPPORT == 1
+#if CONFIG_SATASII == 1
{
.name = "satasii",
.init = satasii_init,
@@ -257,7 +257,7 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if ATAHPT_SUPPORT == 1
+#if CONFIG_ATAHPT == 1
{
.name = "atahpt",
.init = atahpt_init,
@@ -276,7 +276,7 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if INTERNAL_SUPPORT == 1
+#if CONFIG_INTERNAL == 1
#if defined(__i386__) || defined(__x86_64__)
{
.name = "it87spi",
@@ -297,9 +297,9 @@ const struct programmer_entry programmer_table[] = {
#endif
#endif
-#if FT2232_SPI_SUPPORT == 1
+#if CONFIG_FT2232_SPI == 1
{
- .name = "ft2232spi",
+ .name = "ft2232_spi",
.init = ft2232_spi_init,
.shutdown = noop_shutdown, /* Missing shutdown */
.map_flash_region = fallback_map,
@@ -316,7 +316,7 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if SERPROG_SUPPORT == 1
+#if CONFIG_SERPROG == 1
{
.name = "serprog",
.init = serprog_init,
@@ -335,9 +335,9 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if BUSPIRATE_SPI_SUPPORT == 1
+#if CONFIG_BUSPIRATE_SPI == 1
{
- .name = "buspiratespi",
+ .name = "buspirate_spi",
.init = buspirate_spi_init,
.shutdown = buspirate_spi_shutdown,
.map_flash_region = fallback_map,
@@ -354,7 +354,7 @@ const struct programmer_entry programmer_table[] = {
},
#endif
-#if DEDIPROG_SUPPORT == 1
+#if CONFIG_DEDIPROG == 1
{
.name = "dediprog",
.init = dediprog_init,
@@ -1259,7 +1259,7 @@ int selfcheck(void)
msg_gerr("SPI programmer table miscompilation!\n");
ret = 1;
}
-#if BITBANG_SPI_SUPPORT == 1
+#if CONFIG_BITBANG_SPI == 1
if (bitbang_spi_master_count - 1 != BITBANG_SPI_INVALID) {
msg_gerr("Bitbanging SPI master table miscompilation!\n");
ret = 1;
@@ -1410,7 +1410,7 @@ int doit(struct flashchip *flash, int force, char *filename, int read_it, int wr
}
numbytes = fread(buf, 1, size, image);
-#if INTERNAL_SUPPORT == 1
+#if CONFIG_INTERNAL == 1
show_id(buf, size, force);
#endif
fclose(image);
OpenPOWER on IntegriCloud