
Add VIA VT6421A LPC programmer driver. Signed-off-by: Jonathan Kollasch <jakllsch@kollasch.net>

Dear Jonathan, Am Sonntag, den 26.06.2011, 23:33 +0000 schrieb Jonathan A. Kollasch:
VIA VT6421A LPC programmer
What is atavia? Is that an external programmer? If yes, please post a link with more information and add that too. Thanks, Paul

On Mon, 27 Jun 2011 02:04:26 +0200 Paul Menzel <paulepanter@users.sourceforge.net> wrote:
Dear Jonathan,
Am Sonntag, den 26.06.2011, 23:33 +0000 schrieb Jonathan A. Kollasch:
VIA VT6421A LPC programmer
What is atavia? Is that an external programmer? If yes, please post a link with more information and add that too. ata via.. named after atahtp.c i guess.
it is a sata pci card see http://www.via.com.tw/en/products/peripherals/serial-ata_raid/vt6421a/ -- Kind regards/Mit freundlichen Grüßen, Stefan Tauner

On Sun, Jun 26, 2011 at 11:33:33PM +0000, Jonathan A. Kollasch wrote:
Add VIA VT6421A LPC programmer driver.
Okay, so it still doesn't work. The 6421 is being clever, and coping with that is really something I don't care to do, at least right now. Jonathan Kollasch

Okay, so it still doesn't work. The 6421 is being clever, and coping with that is really something I don't care to do, at least right now.
Jonathan Kollasch
Hi, thanks for the patch. Could you tell us more about the problems you encountered? I may have some time after summer to play with that programmer, so some info would be appreciated :)
+static bool atavia_ready(void) +{ + int try; + uint8_t access; + bool status; + + for (status = false, try = 0; try < 300; try++) { + access = pci_read_byte(pcidev_dev, BROM_ACCESS); + if ((access & BROM_TRIGGER) == 0) { + status = true; + break; + } else { + programmer_delay(1); + continue; + } + } + + msg_pdbg("%s() %s after %d tries\n", __FUNCTION__, + status ? "suceeded" : "failed", try); + + return status; +} Is 'continue' required? msg_pdbg should be printed only if failed or should be spew? (generates 3*Chip_size_in_bytes number of lines in writing at least)
What about bool type usage in this project? We are using integers here :) Thanks, Tadas

On Wed, Jul 27, 2011 at 02:03:10AM +0300, Tadas Slotkus wrote:
Okay, so it still doesn't work. The 6421 is being clever, and coping with that is really something I don't care to do, at least right now.
Jonathan Kollasch
Hi, thanks for the patch. Could you tell us more about the problems you encountered? I may have some time after summer to play with that programmer, so some info would be appreciated :)
Doesn't work with some chips. Seems 1MiB chips seem to work almost universally, but not smaller ones.
Is 'continue' required?
No.
msg_pdbg should be printed only if failed or should be spew? (generates 3*Chip_size_in_bytes number of lines in writing at least)
Dunno, it hasn't bothered me yet.
What about bool type usage in this project? We are using integers here :)
Uh, I could care less, I sort of assumed we were C99. Jonathan Kollasch
participants (4)
-
Jonathan A. Kollasch
-
Paul Menzel
-
Stefan Tauner
-
Tadas Slotkus