blob: e9066de6586efdede8232c57cbd6ec24e6df6067 [file] [log] [blame]
Luc Verhaegen8e3a6002007-04-04 22:45:58 +00001/*
2 * flash rom utility: enable flash writes (board specific)
3 *
4 * Copyright (C) 2005-2007 coresystems GmbH <stepan@coresystems.de>
5 * Copyright (C) 2006 Uwe Hermann <uwe@hermann-uwe.de>
6 * Copyright (C) 2007 Luc Verhaegen <libv@skynet.be>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2
11 *
12 */
13
14/*
15 * Contains the board specific flash enables.
16 */
17
18#include <stdio.h>
19#include <pci/pci.h>
20#include <stdint.h>
21#include <string.h>
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000022#include "flash.h"
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000023
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000024/*
Uwe Hermannffec5f32007-08-23 16:08:21 +000025 * Helper functions for many Winbond Super I/Os of the W836xx range.
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000026 */
27#define W836_INDEX 0x2E
28#define W836_DATA 0x2F
29
30/* Enter extended functions */
Uwe Hermanna7e05482007-05-09 10:17:44 +000031static void w836xx_ext_enter(void)
Mondrian Nuessleaef1c7c2007-05-03 10:09:23 +000032{
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000033 outb(0x87, W836_INDEX);
34 outb(0x87, W836_INDEX);
35}
Mondrian Nuessleaef1c7c2007-05-03 10:09:23 +000036
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000037/* Leave extended functions */
Uwe Hermanna7e05482007-05-09 10:17:44 +000038static void w836xx_ext_leave(void)
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000039{
40 outb(0xAA, W836_INDEX);
41}
Mondrian Nuessleaef1c7c2007-05-03 10:09:23 +000042
Uwe Hermannffec5f32007-08-23 16:08:21 +000043/* General functions for reading/writing Winbond Super I/Os. */
Uwe Hermanna7e05482007-05-09 10:17:44 +000044static unsigned char wbsio_read(unsigned char index)
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000045{
46 outb(index, W836_INDEX);
47 return inb(W836_DATA);
48}
Mondrian Nuessleaef1c7c2007-05-03 10:09:23 +000049
Uwe Hermanna7e05482007-05-09 10:17:44 +000050static void wbsio_write(unsigned char index, unsigned char data)
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000051{
52 outb(index, W836_INDEX);
53 outb(data, W836_DATA);
54}
Mondrian Nuessleaef1c7c2007-05-03 10:09:23 +000055
Uwe Hermannffec5f32007-08-23 16:08:21 +000056static void wbsio_mask(unsigned char index, unsigned char data,
57 unsigned char mask)
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000058{
59 unsigned char tmp;
Mondrian Nuessleaef1c7c2007-05-03 10:09:23 +000060
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000061 outb(index, W836_INDEX);
62 tmp = inb(W836_DATA) & ~mask;
63 outb(tmp | (data & mask), W836_DATA);
Mondrian Nuessleaef1c7c2007-05-03 10:09:23 +000064}
65
Uwe Hermannffec5f32007-08-23 16:08:21 +000066/**
67 * Winbond W83627HF: Raise GPIO24.
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000068 *
69 * Suited for:
Uwe Hermannffec5f32007-08-23 16:08:21 +000070 * - Agami Aruma
71 * - IWILL DK8-HTX
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000072 */
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000073static int w83627hf_gpio24_raise(const char *name)
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000074{
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000075 w836xx_ext_enter();
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000076
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000077 /* Is this the w83627hf? */
Uwe Hermanna7e05482007-05-09 10:17:44 +000078 if (wbsio_read(0x20) != 0x52) { /* SIO device ID register */
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000079 fprintf(stderr, "\nERROR: %s: W83627HF: Wrong ID: 0x%02X.\n",
80 name, wbsio_read(0x20));
81 w836xx_ext_leave();
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000082 return -1;
83 }
84
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000085 /* PIN89S: WDTO/GP24 multiplex -> GPIO24 */
86 wbsio_mask(0x2B, 0x10, 0x10);
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000087
Uwe Hermanna7e05482007-05-09 10:17:44 +000088 wbsio_write(0x07, 0x08); /* Select logical device 8: GPIO port 2 */
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000089
Uwe Hermanna7e05482007-05-09 10:17:44 +000090 wbsio_mask(0x30, 0x01, 0x01); /* Activate logical device. */
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000091
Uwe Hermanna7e05482007-05-09 10:17:44 +000092 wbsio_mask(0xF0, 0x00, 0x10); /* GPIO24 -> output */
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000093
Uwe Hermanna7e05482007-05-09 10:17:44 +000094 wbsio_mask(0xF2, 0x00, 0x10); /* Clear GPIO24 inversion */
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000095
Uwe Hermanna7e05482007-05-09 10:17:44 +000096 wbsio_mask(0xF1, 0x10, 0x10); /* Raise GPIO24 */
Luc Verhaegen7977f4e2007-05-04 04:47:04 +000097
98 w836xx_ext_leave();
Luc Verhaegen8e3a6002007-04-04 22:45:58 +000099
100 return 0;
101}
102
Uwe Hermannffec5f32007-08-23 16:08:21 +0000103/**
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000104 * Suited for VIAs EPIA M and MII, and maybe other CLE266 based EPIAs.
105 *
Uwe Hermannffec5f32007-08-23 16:08:21 +0000106 * We don't need to do this when using LinuxBIOS, GPIO15 is never lowered there.
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000107 */
Luc Verhaegen7977f4e2007-05-04 04:47:04 +0000108static int board_via_epia_m(const char *name)
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000109{
Uwe Hermanna7e05482007-05-09 10:17:44 +0000110 struct pci_dev *dev;
111 unsigned int base;
112 uint8_t val;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000113
Uwe Hermanna7e05482007-05-09 10:17:44 +0000114 dev = pci_dev_find(0x1106, 0x3177); /* VT8235 ISA bridge */
115 if (!dev) {
116 fprintf(stderr, "\nERROR: VT8235 ISA Bridge not found.\n");
117 return -1;
118 }
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000119
Uwe Hermanna7e05482007-05-09 10:17:44 +0000120 /* GPIO12-15 -> output */
121 val = pci_read_byte(dev, 0xE4);
122 val |= 0x10;
123 pci_write_byte(dev, 0xE4, val);
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000124
Uwe Hermanna7e05482007-05-09 10:17:44 +0000125 /* Get Power Management IO address. */
126 base = pci_read_word(dev, 0x88) & 0xFF80;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000127
Uwe Hermanna7e05482007-05-09 10:17:44 +0000128 /* enable GPIO15 which is connected to write protect. */
129 val = inb(base + 0x4D);
130 val |= 0x80;
131 outb(val, base + 0x4D);
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000132
Uwe Hermanna7e05482007-05-09 10:17:44 +0000133 return 0;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000134}
135
Uwe Hermannffec5f32007-08-23 16:08:21 +0000136/**
Luc Verhaegen32707542007-07-04 17:51:49 +0000137 * Suited for:
Uwe Hermannffec5f32007-08-23 16:08:21 +0000138 * - ASUS A7V8X-MX SE and A7V400-MX: AMD K7 + VIA KM400A + VT8235
139 * - Tyan Tomcat K7M: AMD Geode NX + VIA KM400 + VT8237.
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000140 */
Luc Verhaegen7977f4e2007-05-04 04:47:04 +0000141static int board_asus_a7v8x_mx(const char *name)
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000142{
Uwe Hermanna7e05482007-05-09 10:17:44 +0000143 struct pci_dev *dev;
144 uint8_t val;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000145
Uwe Hermanna7e05482007-05-09 10:17:44 +0000146 dev = pci_dev_find(0x1106, 0x3177); /* VT8235 ISA bridge */
Luc Verhaegen32707542007-07-04 17:51:49 +0000147 if (!dev)
148 dev = pci_dev_find(0x1106, 0x3227); /* VT8237 ISA bridge */
Uwe Hermanna7e05482007-05-09 10:17:44 +0000149 if (!dev) {
Luc Verhaegen32707542007-07-04 17:51:49 +0000150 fprintf(stderr, "\nERROR: VT823x ISA bridge not found.\n");
Uwe Hermanna7e05482007-05-09 10:17:44 +0000151 return -1;
152 }
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000153
Uwe Hermanna7e05482007-05-09 10:17:44 +0000154 /* This bit is marked reserved actually */
155 val = pci_read_byte(dev, 0x59);
156 val &= 0x7F;
157 pci_write_byte(dev, 0x59, val);
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000158
Luc Verhaegen7977f4e2007-05-04 04:47:04 +0000159 /* Raise ROM MEMW# line on Winbond w83697 SuperIO */
Uwe Hermanna7e05482007-05-09 10:17:44 +0000160 w836xx_ext_enter();
Luc Verhaegen7977f4e2007-05-04 04:47:04 +0000161
Uwe Hermanna7e05482007-05-09 10:17:44 +0000162 if (!(wbsio_read(0x24) & 0x02)) /* flash rom enabled? */
163 wbsio_mask(0x24, 0x08, 0x08); /* enable MEMW# */
Luc Verhaegen7977f4e2007-05-04 04:47:04 +0000164
165 w836xx_ext_leave();
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000166
Uwe Hermanna7e05482007-05-09 10:17:44 +0000167 return 0;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000168}
169
Uwe Hermannffec5f32007-08-23 16:08:21 +0000170/**
Luc Verhaegen6b141752007-05-20 16:16:13 +0000171 * Suited for ASUS P5A.
172 *
173 * This is rather nasty code, but there's no way to do this cleanly.
174 * We're basically talking to some unknown device on SMBus, my guess
175 * is that it is the Winbond W83781D that lives near the DIP BIOS.
176 */
Luc Verhaegen6b141752007-05-20 16:16:13 +0000177static int board_asus_p5a(const char *name)
178{
179 uint8_t tmp;
180 int i;
181
182#define ASUSP5A_LOOP 5000
183
184 outb(0x00, 0xE807);
185 outb(0xEF, 0xE803);
186
187 outb(0xFF, 0xE800);
188
189 for (i = 0; i < ASUSP5A_LOOP; i++) {
190 outb(0xE1, 0xFF);
191 if (inb(0xE800) & 0x04)
192 break;
193 }
194
195 if (i == ASUSP5A_LOOP) {
196 printf("%s: Unable to contact device.\n", name);
197 return -1;
198 }
199
200 outb(0x20, 0xE801);
201 outb(0x20, 0xE1);
202
203 outb(0xFF, 0xE802);
204
205 for (i = 0; i < ASUSP5A_LOOP; i++) {
206 tmp = inb(0xE800);
207 if (tmp & 0x70)
208 break;
209 }
210
211 if ((i == ASUSP5A_LOOP) || !(tmp & 0x10)) {
212 printf("%s: failed to read device.\n", name);
213 return -1;
214 }
215
216 tmp = inb(0xE804);
217 tmp &= ~0x02;
218
219 outb(0x00, 0xE807);
220 outb(0xEE, 0xE803);
221
222 outb(tmp, 0xE804);
223
224 outb(0xFF, 0xE800);
225 outb(0xE1, 0xFF);
226
227 outb(0x20, 0xE801);
228 outb(0x20, 0xE1);
229
230 outb(0xFF, 0xE802);
231
232 for (i = 0; i < ASUSP5A_LOOP; i++) {
233 tmp = inb(0xE800);
234 if (tmp & 0x70)
235 break;
236 }
237
238 if ((i == ASUSP5A_LOOP) || !(tmp & 0x10)) {
239 printf("%s: failed to write to device.\n", name);
240 return -1;
241 }
242
243 return 0;
244}
245
Stefan Reinauer1c283f42007-06-05 12:51:52 +0000246static int board_ibm_x3455(const char *name)
247{
248 uint8_t byte;
249
Uwe Hermanne823ee02007-06-05 15:02:18 +0000250 /* Set GPIO lines in the Broadcom HT-1000 southbridge. */
Stefan Reinauer1c283f42007-06-05 12:51:52 +0000251 outb(0x45, 0xcd6);
252 byte = inb(0xcd7);
Uwe Hermanne823ee02007-06-05 15:02:18 +0000253 outb(byte | 0x20, 0xcd7);
Stefan Reinauer1c283f42007-06-05 12:51:52 +0000254
255 return 0;
256}
257
Luc Verhaegenfdd0c582007-08-11 16:59:11 +0000258/**
259 * Suited for EPoX EP-BX3, and maybe some other Intel 440BX based boards.
260 */
261static int board_epox_ep_bx3(const char *name)
262{
263 uint8_t tmp;
264
265 /* Raise GPIO22. */
266 tmp = inb(0x4036);
267 outb(tmp, 0xEB);
268
269 tmp |= 0x40;
270
271 outb(tmp, 0x4036);
272 outb(tmp, 0xEB);
273
274 return 0;
275}
276
Uwe Hermannffec5f32007-08-23 16:08:21 +0000277/**
278 * We use 2 sets of IDs here, you're free to choose which is which. This
279 * is to provide a very high degree of certainty when matching a board on
280 * the basis of subsystem/card IDs. As not every vendor handles
281 * subsystem/card IDs in a sane manner.
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000282 *
Uwe Hermannffec5f32007-08-23 16:08:21 +0000283 * Keep the second set NULLed if it should be ignored.
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000284 */
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000285struct board_pciid_enable {
Uwe Hermanna7e05482007-05-09 10:17:44 +0000286 /* Any device, but make it sensible, like the isa bridge. */
287 uint16_t first_vendor;
288 uint16_t first_device;
289 uint16_t first_card_vendor;
290 uint16_t first_card_device;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000291
Uwe Hermanna7e05482007-05-09 10:17:44 +0000292 /* Any device, but make it sensible, like
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000293 * the host bridge. May be NULL
294 */
Uwe Hermanna7e05482007-05-09 10:17:44 +0000295 uint16_t second_vendor;
296 uint16_t second_device;
297 uint16_t second_card_vendor;
298 uint16_t second_card_device;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000299
Uwe Hermanna7e05482007-05-09 10:17:44 +0000300 /* From linuxbios table */
301 char *lb_vendor;
302 char *lb_part;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000303
Uwe Hermanna7e05482007-05-09 10:17:44 +0000304 char *name;
305 int (*enable) (const char *name);
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000306};
307
308struct board_pciid_enable board_pciid_enables[] = {
Uwe Hermanna7e05482007-05-09 10:17:44 +0000309 {0x1022, 0x7468, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
310 "iwill", "dk8_htx", "IWILL DK8-HTX", w83627hf_gpio24_raise},
311 {0x1022, 0x746B, 0x1022, 0x36C0, 0x0000, 0x0000, 0x0000, 0x0000,
312 "AGAMI", "ARUMA", "agami Aruma", w83627hf_gpio24_raise},
313 {0x1106, 0x3177, 0x1106, 0xAA01, 0x1106, 0x3123, 0x1106, 0xAA01,
314 NULL, NULL, "VIA EPIA M/MII/...", board_via_epia_m},
315 {0x1106, 0x3177, 0x1043, 0x80A1, 0x1106, 0x3205, 0x1043, 0x8118,
316 NULL, NULL, "ASUS A7V8-MX SE", board_asus_a7v8x_mx},
Luc Verhaegen32707542007-07-04 17:51:49 +0000317 {0x8086, 0x1076, 0x8086, 0x1176, 0x1106, 0x3059, 0x10f1, 0x2498,
318 NULL, NULL, "Tyan Tomcat K7M", board_asus_a7v8x_mx},
Luc Verhaegen6b141752007-05-20 16:16:13 +0000319 {0x10B9, 0x1541, 0x0000, 0x0000, 0x10B9, 0x1533, 0x0000, 0x0000,
320 "asus", "p5a", "ASUS P5A", board_asus_p5a},
Stefan Reinauer1c283f42007-06-05 12:51:52 +0000321 {0x1166, 0x0205, 0x1014, 0x0347, 0x0000, 0x0000, 0x0000, 0x0000,
322 "ibm", "x3455", "IBM x3455", board_ibm_x3455},
Luc Verhaegenfdd0c582007-08-11 16:59:11 +0000323 {0x8086, 0x7110, 0x0000, 0x0000, 0x8086, 0x7190, 0x0000, 0x0000,
324 "epox", "ep-bx3", "EPoX EP-BX3", board_epox_ep_bx3},
Uwe Hermanna7e05482007-05-09 10:17:44 +0000325 {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL} /* Keep this */
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000326};
327
Uwe Hermannffec5f32007-08-23 16:08:21 +0000328/**
329 * Match boards on LinuxBIOS table gathered vendor and part name.
330 * Require main PCI IDs to match too as extra safety.
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000331 */
Uwe Hermanna7e05482007-05-09 10:17:44 +0000332static struct board_pciid_enable *board_match_linuxbios_name(char *vendor,
333 char *part)
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000334{
Uwe Hermanna7e05482007-05-09 10:17:44 +0000335 struct board_pciid_enable *board = board_pciid_enables;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000336
Uwe Hermanna7e05482007-05-09 10:17:44 +0000337 for (; board->name; board++) {
338 if (!board->lb_vendor || strcmp(board->lb_vendor, vendor))
339 continue;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000340
Uwe Hermanna7e05482007-05-09 10:17:44 +0000341 if (!board->lb_part || strcmp(board->lb_part, part))
342 continue;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000343
Uwe Hermanna7e05482007-05-09 10:17:44 +0000344 if (!pci_dev_find(board->first_vendor, board->first_device))
345 continue;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000346
Uwe Hermanna7e05482007-05-09 10:17:44 +0000347 if (board->second_vendor &&
348 !pci_dev_find(board->second_vendor, board->second_device))
349 continue;
350 return board;
351 }
352 return NULL;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000353}
354
Uwe Hermannffec5f32007-08-23 16:08:21 +0000355/**
356 * Match boards on PCI IDs and subsystem IDs.
357 * Second set of IDs can be main only or missing completely.
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000358 */
359static struct board_pciid_enable *board_match_pci_card_ids(void)
360{
Uwe Hermanna7e05482007-05-09 10:17:44 +0000361 struct board_pciid_enable *board = board_pciid_enables;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000362
Uwe Hermanna7e05482007-05-09 10:17:44 +0000363 for (; board->name; board++) {
364 if (!board->first_card_vendor || !board->first_card_device)
365 continue;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000366
Uwe Hermanna7e05482007-05-09 10:17:44 +0000367 if (!pci_card_find(board->first_vendor, board->first_device,
368 board->first_card_vendor,
369 board->first_card_device))
370 continue;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000371
Uwe Hermanna7e05482007-05-09 10:17:44 +0000372 if (board->second_vendor) {
373 if (board->second_card_vendor) {
374 if (!pci_card_find(board->second_vendor,
375 board->second_device,
376 board->second_card_vendor,
377 board->second_card_device))
378 continue;
379 } else {
380 if (!pci_dev_find(board->second_vendor,
381 board->second_device))
382 continue;
383 }
384 }
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000385
Uwe Hermanna7e05482007-05-09 10:17:44 +0000386 return board;
387 }
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000388
Uwe Hermanna7e05482007-05-09 10:17:44 +0000389 return NULL;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000390}
391
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000392int board_flash_enable(char *vendor, char *part)
393{
Uwe Hermanna7e05482007-05-09 10:17:44 +0000394 struct board_pciid_enable *board = NULL;
395 int ret = 0;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000396
Uwe Hermanna7e05482007-05-09 10:17:44 +0000397 if (vendor && part)
398 board = board_match_linuxbios_name(vendor, part);
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000399
Uwe Hermanna7e05482007-05-09 10:17:44 +0000400 if (!board)
401 board = board_match_pci_card_ids();
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000402
Uwe Hermanna7e05482007-05-09 10:17:44 +0000403 if (board) {
404 printf("Found board \"%s\": Enabling flash write... ",
405 board->name);
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000406
Uwe Hermanna7e05482007-05-09 10:17:44 +0000407 ret = board->enable(board->name);
408 if (ret)
409 printf("Failed!\n");
410 else
411 printf("OK.\n");
412 }
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000413
Uwe Hermanna7e05482007-05-09 10:17:44 +0000414 return ret;
Luc Verhaegen8e3a6002007-04-04 22:45:58 +0000415}