blob: 617053c0f556b6803735431649b39f95086b5475 [file] [log] [blame]
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +00001/*
2 * This file is part of the flashrom project.
3 *
4 * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
5 * Copyright (C) 2009 Carl-Daniel Hailfinger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
Peter Lemenkov4adf8a62010-06-01 10:13:17 +000022#include <stdio.h>
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000023#include <string.h>
24#include <stdlib.h>
25#include <time.h>
26#include "flash.h"
27#include "flashchips.h"
Carl-Daniel Hailfinger5b997c32010-07-27 22:41:39 +000028#include "programmer.h"
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000029
Mathias Krausea60faab2011-01-17 07:50:42 +000030static const char wiki_header[] = "= Supported devices =\n\n\
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000031<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
Stefan Taunerf74a7b92011-09-14 22:09:48 +000032background-color:#eeeeee; text-align:right; border:1px solid #aabbcc;\">\
33<small>\n\
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000034Please do '''not''' edit these tables in the wiki directly, they are \
35generated by pasting '''flashrom -z''' output.<br />\
36'''Last update:''' %s(generated by flashrom %s)\n</small></div>\n";
37
Stefan Tauner00ec0272012-07-29 02:04:21 +000038static const char th_start[] = "| valign=\"top\"|\n\n\
39{| border=\"0\" style=\"font-size: smaller\" valign=\"top\"\n\
40|- bgcolor=\"#6699dd\"\n";
41
Carl-Daniel Hailfinger71127722010-05-31 15:27:27 +000042#if CONFIG_INTERNAL == 1
Stefan Tauner00ec0272012-07-29 02:04:21 +000043static const char chipset_th[] = "\
44! align=\"left\" | Vendor\n\
45! align=\"left\" | Southbridge\n\
46! align=\"center\" | PCI IDs\n\
Stefan Taunerf74a7b92011-09-14 22:09:48 +000047! align=\"center\" | Status\n\n";
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000048
Stefan Tauner00ec0272012-07-29 02:04:21 +000049static const char board_th[] = "\
50! align=\"left\" | Vendor\n\
51! align=\"left\" | Mainboard\n\
52! align=\"left\" | Required option\n\
Stefan Taunerf74a7b92011-09-14 22:09:48 +000053! align=\"center\" | Status\n\n";
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000054
Mathias Krausea60faab2011-01-17 07:50:42 +000055static const char board_intro[] = "\
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000056\n== Supported mainboards ==\n\n\
57In general, it is very likely that flashrom works out of the box even if your \
58mainboard is not listed below.\n\nThis is a list of mainboards where we have \
59verified that they either do or do not need any special initialization to \
60make flashrom work (given flashrom supports the respective chipset and flash \
61chip), or that they do not yet work at all. If they do not work, support may \
62or may not be added later.\n\n\
Stefan Taunerd06d9412011-06-12 19:47:55 +000063Mainboards (or individual revisions) which don't appear in the list may or may \
64not work (we don't know, someone has to give it a try). Please report any \
65further verified mainboards on the [[Mailinglist|mailing list]].\n";
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +000066#endif
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000067
Stefan Tauner00ec0272012-07-29 02:04:21 +000068static const char chip_th[] = "\
Stefan Taunerf74a7b92011-09-14 22:09:48 +000069! align=\"left\" | Vendor\n\
70! align=\"left\" | Device\n\
71! align=\"center\" | Size [kB]\n\
72! align=\"center\" | Type\n\
73! align=\"center\" colspan=\"4\" | Status\n\
74! align=\"center\" colspan=\"2\" | Voltage [V]\n\n\
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000075|- bgcolor=\"#6699ff\"\n| colspan=\"4\" | &nbsp;\n\
Stefan Taunerf74a7b92011-09-14 22:09:48 +000076| Probe\n| Read\n| Erase\n| Write\n\
Paul Menzel018d4822011-10-21 12:33:07 +000077| align=\"center\" | Min \n| align=\"center\" | Max\n\n";
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000078
Stefan Tauner00ec0272012-07-29 02:04:21 +000079static const char programmer_th[] = "\
80! align=\"left\" | Vendor\n\
81! align=\"left\" | Device\n\
82! align=\"center\" | PCI IDs\n\
Stefan Taunerf74a7b92011-09-14 22:09:48 +000083! align=\"center\" | Status\n\n";
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000084
Stefan Tauner00ec0272012-07-29 02:04:21 +000085static const char programmer_intro[] = "\
86\n== Supported programmers ==\n\n\
87This is a list of supported PCI devices flashrom can use as programmer:\n\n{";
88
Carl-Daniel Hailfinger71127722010-05-31 15:27:27 +000089#if CONFIG_INTERNAL == 1
Mathias Krausea60faab2011-01-17 07:50:42 +000090static const char laptop_intro[] = "\n== Supported laptops/notebooks ==\n\n\
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000091In general, flashing laptops is more difficult because laptops\n\n\
92* often use the flash chip for stuff besides the BIOS,\n\
93* often have special protection stuff which has to be handled by flashrom,\n\
94* often use flash translation circuits which need drivers in flashrom.\n\n\
95<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
96background-color:#ff6666; align:right; border:1px solid #000000;\">\n\
97'''IMPORTANT:''' At this point we recommend to '''not''' use flashrom on \
98untested laptops unless you have a means to recover from a flashing that goes \
99wrong (a working backup flash chip and/or good soldering skills).\n</div>\n";
100
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000101static void print_supported_chipsets_wiki(int cols)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000102{
Stefan Tauner00ec0272012-07-29 02:04:21 +0000103 int i;
104 unsigned int lines_per_col;
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000105 const struct penable *e;
Stefan Tauner00ec0272012-07-29 02:04:21 +0000106 int enablescount = 0, color = 1;
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000107
108 for (e = chipset_enables; e->vendor_name != NULL; e++)
109 enablescount++;
110
Stefan Tauner00ec0272012-07-29 02:04:21 +0000111 /* +1 to force the resulting number of columns to be < cols */
112 lines_per_col = enablescount / cols + ((enablescount%cols) > 0 ? 1 : 0);
113
114 printf("\n== Supported chipsets ==\n\nTotal amount of supported chipsets: '''%d'''\n\n"
115 "{| border=\"0\" valign=\"top\"\n", enablescount);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000116
117 e = chipset_enables;
Stefan Tauner00ec0272012-07-29 02:04:21 +0000118 for (i = 0; e[i].vendor_name != NULL; i++) {
119 if ((i % lines_per_col) == 0)
120 printf("%s%s", th_start, chipset_th);
121
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000122 /* Alternate colors if the vendor changes. */
123 if (i > 0 && strcmp(e[i].vendor_name, e[i - 1].vendor_name))
124 color = !color;
125
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000126 printf("|- bgcolor=\"#%s\"\n| %s || %s "
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000127 "|| %04x:%04x || %s\n", (color) ? "eeeeee" : "dddddd",
128 e[i].vendor_name, e[i].device_name,
129 e[i].vendor_id, e[i].device_id,
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000130 (e[i].status == OK) ? "{{OK}}" : "{{?3}}");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000131
Stefan Tauner00ec0272012-07-29 02:04:21 +0000132 if (((i % lines_per_col) + 1) == lines_per_col)
133 printf("\n|}\n\n");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000134 }
135
Stefan Tauner00ec0272012-07-29 02:04:21 +0000136 /* end inner table if it did not fill the last column fully */
137 if (((i % lines_per_col)) > 0)
138 printf("\n|}\n\n");
139 printf("\n\n|}\n");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000140}
141
Stefan Tauner00ec0272012-07-29 02:04:21 +0000142static void wiki_helper(const char *devicetype, int cols, const struct board_info boards[])
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000143{
Stefan Tauner00ec0272012-07-29 02:04:21 +0000144 int i, k;
145 unsigned int boardcount, lines_per_col;
Stefan Tauner2c20b282012-07-28 19:35:26 +0000146 unsigned int boardcount_good = 0, boardcount_bad = 0, boardcount_nt = 0;
147 int num_notes = 0, color = 1;
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000148 char *notes = calloc(1, 1);
149 char tmp[900 + 1];
Carl-Daniel Hailfinger97d5b122011-08-31 16:19:50 +0000150 const struct board_match *b = board_matches;
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000151
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000152 for (i = 0; boards[i].vendor != NULL; i++) {
Stefan Tauner2c20b282012-07-28 19:35:26 +0000153 if (boards[i].working == OK)
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000154 boardcount_good++;
Stefan Tauner2c20b282012-07-28 19:35:26 +0000155 else if (boards[i].working == NT)
156 boardcount_nt++;
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000157 else
158 boardcount_bad++;
159 }
Stefan Tauner00ec0272012-07-29 02:04:21 +0000160 boardcount = boardcount_good + boardcount_nt + boardcount_bad;
161
162 /* +1 to force the resulting number of columns to be < cols */
163 lines_per_col = boardcount / cols + ((boardcount%cols) > 0 ? 1 : 0);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000164
Stefan Tauner2c20b282012-07-28 19:35:26 +0000165 printf("\n\nTotal amount of known good boards %s: '''%d'''; "
166 "Untested (e.g. user vanished before testing new code): '''%d'''; "
167 "Not yet supported (i.e. known-bad): '''%d'''.\n\n"
Stefan Tauner00ec0272012-07-29 02:04:21 +0000168 "{| border=\"0\" valign=\"top\"\n", devicetype, boardcount_good, boardcount_nt, boardcount_bad);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000169
Stefan Tauner00ec0272012-07-29 02:04:21 +0000170 for (i = 0; boards[i].vendor != NULL; i++) {
171 if ((i % lines_per_col) == 0)
172 printf("%s%s", th_start, board_th);
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000173
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000174 /* Alternate colors if the vendor changes. */
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000175 if (i > 0 && strcmp(boards[i].vendor, boards[i - 1].vendor))
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000176 color = !color;
177
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000178 k = 0;
Carl-Daniel Hailfinger4146ced2010-06-07 11:10:43 +0000179 while ((b[k].vendor_name != NULL) &&
180 (strcmp(b[k].vendor_name, boards[i].vendor) ||
181 strcmp(b[k].board_name, boards[i].name))) {
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000182 k++;
183 }
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000184
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000185 printf("|- bgcolor=\"#%s\"\n| %s || %s%s %s%s || %s%s%s%s "
186 "|| {{%s}}", (color) ? "eeeeee" : "dddddd",
187 boards[i].vendor,
188 boards[i].url ? "[" : "",
189 boards[i].url ? boards[i].url : "",
190 boards[i].name,
191 boards[i].url ? "]" : "",
Carl-Daniel Hailfinger2d927fb2012-01-04 00:48:27 +0000192 b[k].lb_vendor ? "-p internal:mainboard=" : "&mdash;",
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000193 b[k].lb_vendor ? b[k].lb_vendor : "",
194 b[k].lb_vendor ? ":" : "",
195 b[k].lb_vendor ? b[k].lb_part : "",
Stefan Tauner2c20b282012-07-28 19:35:26 +0000196 (boards[i].working == OK) ? "OK" :
197 (boards[i].working == NT) ? "?3" : "No");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000198
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000199 if (boards[i].note) {
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000200 printf("<sup>%d</sup>\n", num_notes + 1);
Mathias Krausea60faab2011-01-17 07:50:42 +0000201 snprintf(tmp, sizeof(tmp), "<sup>%d</sup> %s<br />\n",
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000202 1 + num_notes++, boards[i].note);
Mathias Krausea60faab2011-01-17 07:50:42 +0000203 notes = strcat_realloc(notes, tmp);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000204 } else {
205 printf("\n");
206 }
207
Stefan Tauner00ec0272012-07-29 02:04:21 +0000208 if (((i % lines_per_col) + 1) == lines_per_col)
209 printf("\n|}\n\n");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000210 }
211
Stefan Tauner00ec0272012-07-29 02:04:21 +0000212 /* end inner table if it did not fill the last column fully */
213 if (((i % lines_per_col)) > 0)
214 printf("\n|}\n\n");
215 printf("\n\n|}\n");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000216
217 if (num_notes > 0)
218 printf("\n<small>\n%s</small>\n", notes);
219 free(notes);
220}
221
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000222static void print_supported_boards_wiki(void)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000223{
224 printf("%s", board_intro);
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000225 wiki_helper("boards", 2, boards_known);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000226
227 printf("%s", laptop_intro);
Peter Lemenkov4adf8a62010-06-01 10:13:17 +0000228 wiki_helper("laptops", 1, laptops_known);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000229}
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +0000230#endif
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000231
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000232static void print_supported_chips_wiki(int cols)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000233{
Stefan Tauner00ec0272012-07-29 02:04:21 +0000234 unsigned int lines_per_col;
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000235 uint32_t t;
Stefan Tauner00155492011-06-26 20:45:35 +0000236 char *s;
Stefan Taunerf74a7b92011-09-14 22:09:48 +0000237 char vmax[6];
238 char vmin[6];
Stefan Tauner00ec0272012-07-29 02:04:21 +0000239 const struct flashchip *f, *old = NULL;
240 int i = 0, c = 1, chipcount = 0;
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000241
Stefan Tauner93f70232011-07-26 14:33:46 +0000242 for (f = flashchips; f->name != NULL; f++) {
Stefan Tauner035492a2012-02-03 22:32:09 +0000243 /* Don't count generic entries. */
244 if (!strncmp(f->vendor, "Unknown", 7) ||
245 !strncmp(f->vendor, "Programmer", 10) ||
246 !strncmp(f->name, "unknown", 7))
Stefan Tauner4c5665f2012-02-17 20:03:37 +0000247 continue;
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000248 chipcount++;
Stefan Tauner93f70232011-07-26 14:33:46 +0000249 }
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000250
Stefan Tauner00ec0272012-07-29 02:04:21 +0000251 /* +1 to force the resulting number of columns to be < cols */
252 lines_per_col = chipcount / cols + ((chipcount%cols) > 0 ? 1 : 0);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000253
Stefan Tauner00ec0272012-07-29 02:04:21 +0000254 printf("\n== Supported chips ==\n\nTotal amount of supported chips: '''%d'''\n\n"
255 "{| border=\"0\" valign=\"top\"\n", chipcount);
256
257 for (f = flashchips; f->name != NULL; f++) {
Stefan Tauner035492a2012-02-03 22:32:09 +0000258 /* Don't print generic entries. */
259 if (!strncmp(f->vendor, "Unknown", 7) ||
260 !strncmp(f->vendor, "Programmer", 10) ||
261 !strncmp(f->name, "unknown", 7))
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000262 continue;
263
Stefan Tauner00ec0272012-07-29 02:04:21 +0000264 if ((i % lines_per_col) == 0)
265 printf("%s%s", th_start, chip_th);
266
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000267 /* Alternate colors if the vendor changes. */
268 if (old != NULL && strcmp(old->vendor, f->vendor))
269 c = !c;
270
Stefan Tauner00ec0272012-07-29 02:04:21 +0000271 old = f;
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000272 t = f->tested;
Stefan Tauner00155492011-06-26 20:45:35 +0000273 s = flashbuses_to_text(f->bustype);
Stefan Taunerf74a7b92011-09-14 22:09:48 +0000274 sprintf(vmin, "%0.03f", f->voltage.min / (double)1000);
275 sprintf(vmax, "%0.03f", f->voltage.max / (double)1000);
276 /* '{{%s}}' is used in combination with 'OK', 'No' and '?3' to
277 * select special formatting templates for the bg color. */
278 printf("|- bgcolor=\"#%s\"\n| %s || %s || align=\"right\" | %d "
279 "|| %s || {{%s}} || {{%s}} || {{%s}} || {{%s}}"
280 "|| %s || %s \n",
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000281 (c == 1) ? "eeeeee" : "dddddd", f->vendor, f->name,
Stefan Tauner00155492011-06-26 20:45:35 +0000282 f->total_size, s,
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000283 (t & TEST_OK_PROBE) ? "OK" :
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000284 (t & TEST_BAD_PROBE) ? "No" : "?3",
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000285 (t & TEST_OK_READ) ? "OK" :
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000286 (t & TEST_BAD_READ) ? "No" : "?3",
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000287 (t & TEST_OK_ERASE) ? "OK" :
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000288 (t & TEST_BAD_ERASE) ? "No" : "?3",
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000289 (t & TEST_OK_WRITE) ? "OK" :
Stefan Taunerf74a7b92011-09-14 22:09:48 +0000290 (t & TEST_BAD_WRITE) ? "No" : "?3",
291 f->voltage.min ? vmin : "N/A",
292 f->voltage.min ? vmax : "N/A");
Stefan Tauner00155492011-06-26 20:45:35 +0000293 free(s);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000294
Stefan Tauner00ec0272012-07-29 02:04:21 +0000295 if (((i % lines_per_col) + 1) == lines_per_col)
296 printf("\n|}\n\n");
297 i++;
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000298 }
Stefan Tauner00ec0272012-07-29 02:04:21 +0000299 /* end inner table if it did not fill the last column fully */
300 if (((i % lines_per_col)) > 0)
301 printf("\n|}\n\n");
302 printf("|}\n\n");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000303}
304
Carl-Daniel Hailfingerd9535582011-03-08 00:09:11 +0000305/* Not needed for CONFIG_INTERNAL, but for all other PCI-based programmers. */
Carl-Daniel Hailfingerb713d2e2011-05-08 00:24:18 +0000306#if CONFIG_NIC3COM+CONFIG_NICREALTEK+CONFIG_NICNATSEMI+CONFIG_GFXNVIDIA+CONFIG_DRKAISER+CONFIG_SATASII+CONFIG_ATAHPT+CONFIG_NICINTEL+CONFIG_NICINTEL_SPI+CONFIG_OGP_SPI+CONFIG_SATAMV >= 1
Carl-Daniel Hailfingerad3cc552010-07-03 11:02:10 +0000307static void print_supported_pcidevs_wiki(const struct pcidev_status *devs)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000308{
309 int i = 0;
310 static int c = 0;
311
312 /* Alternate colors if the vendor changes. */
313 c = !c;
314
315 for (i = 0; devs[i].vendor_name != NULL; i++) {
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000316 printf("|- bgcolor=\"#%s\"\n| %s || %s || "
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000317 "%04x:%04x || {{%s}}\n", (c) ? "eeeeee" : "dddddd",
318 devs[i].vendor_name, devs[i].device_name,
319 devs[i].vendor_id, devs[i].device_id,
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000320 (devs[i].status == NT) ? "?3" : "OK");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000321 }
322}
Carl-Daniel Hailfingerd9535582011-03-08 00:09:11 +0000323#endif
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000324
Carl-Daniel Hailfingerf5292052009-11-17 09:57:34 +0000325void print_supported_wiki(void)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000326{
327 time_t t = time(NULL);
328
329 printf(wiki_header, ctime(&t), flashrom_version);
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000330 print_supported_chips_wiki(2);
Carl-Daniel Hailfinger9e3a6c42010-10-08 12:40:09 +0000331#if CONFIG_INTERNAL == 1
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000332 print_supported_chipsets_wiki(3);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000333 print_supported_boards_wiki();
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +0000334#endif
Stefan Tauner00ec0272012-07-29 02:04:21 +0000335 printf("%s%s%s", programmer_intro, th_start, programmer_th);
336
Carl-Daniel Hailfinger71127722010-05-31 15:27:27 +0000337#if CONFIG_NIC3COM == 1
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000338 print_supported_pcidevs_wiki(nics_3com);
339#endif
Carl-Daniel Hailfinger71127722010-05-31 15:27:27 +0000340#if CONFIG_NICREALTEK == 1
Uwe Hermann829ed842010-05-24 17:39:14 +0000341 print_supported_pcidevs_wiki(nics_realtek);
Uwe Hermann829ed842010-05-24 17:39:14 +0000342#endif
Andrew Morgan74a828a2010-07-21 15:12:07 +0000343#if CONFIG_NICNATSEMI == 1
344 print_supported_pcidevs_wiki(nics_natsemi);
345#endif
Carl-Daniel Hailfinger71127722010-05-31 15:27:27 +0000346#if CONFIG_GFXNVIDIA == 1
Uwe Hermann2b5cb512009-10-06 20:25:48 +0000347 print_supported_pcidevs_wiki(gfx_nvidia);
348#endif
Carl-Daniel Hailfinger71127722010-05-31 15:27:27 +0000349#if CONFIG_DRKAISER == 1
Uwe Hermann07c54c82009-09-25 01:31:51 +0000350 print_supported_pcidevs_wiki(drkaiser_pcidev);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000351#endif
Carl-Daniel Hailfinger71127722010-05-31 15:27:27 +0000352#if CONFIG_SATASII == 1
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000353 print_supported_pcidevs_wiki(satas_sii);
354#endif
Carl-Daniel Hailfinger71127722010-05-31 15:27:27 +0000355#if CONFIG_ATAHPT == 1
Uwe Hermannddd5c9e2010-02-21 21:17:00 +0000356 print_supported_pcidevs_wiki(ata_hpt);
357#endif
Carl-Daniel Hailfingerb713d2e2011-05-08 00:24:18 +0000358#if CONFIG_NICINTEL == 1
359 print_supported_pcidevs_wiki(nics_intel);
360#endif
Idwer Vollering004f4b72010-09-03 18:21:21 +0000361#if CONFIG_NICINTEL_SPI == 1
362 print_supported_pcidevs_wiki(nics_intel_spi);
363#endif
Mark Marshall90021f22010-12-03 14:48:11 +0000364#if CONFIG_OGP_SPI == 1
365 print_supported_pcidevs_wiki(ogp_spi);
366#endif
Carl-Daniel Hailfinger9a1105c2011-02-04 21:37:59 +0000367#if CONFIG_SATAMV == 1
368 print_supported_pcidevs_wiki(satas_mv);
369#endif
Stefan Tauner00ec0272012-07-29 02:04:21 +0000370 printf("\n|}\n\n|}\n");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000371}
372