Patch attached.
//Peter
Peter Stuge wrote:
Patch attached.
//Peter
flashrom: Remove dead M-Systems Disk on Chip code
DOC support has been disabled by default for many years. The write function does nothing but print text. It has a call to write_page_md2802() commented out, but that function does not exist. This is dead code with ugly #ifdefs.
Updates README to reflect that there was a time when there was code, but it didn't work. Removes M-Systems #defines and also includes svn rm msys_doc.*
Signed-off-by: Peter Stuge peter@stuge.se
Absolutely NACK.
The reason the code is not compiled in per default is that the probing takes forever. Still, no reason to drop support.
I don't think we should drop features because we don't like a few ifdefs.
On Sun, Jun 22, 2008 at 12:24:25PM +0200, Stefan Reinauer wrote:
The write function does nothing but print text. It has a call to write_page_md2802() commented out, but that function does not exist. This is dead code with ugly #ifdefs.
Absolutely NACK.
Please reconsider my patch.
The reason the code is not compiled in per default is that the probing takes forever. Still, no reason to drop support.
I don't think we should drop features because we don't like a few ifdefs.
That is not the most important reason. Please look at the code. Probe may actually work, but read, erase and write simply can not:
int read_md2802(struct flashchip *flash, uint8_t *buf) { return 0; }
int erase_md2802(struct flashchip *flash) { volatile uint8_t *bios = flash->virtual_memory;
return 1;
*(volatile uint8_t *)(bios + 0x5555) = 0xAA; *(volatile uint8_t *)(bios + 0x2AAA) = 0x55; *(volatile uint8_t *)(bios + 0x5555) = 0x80;
*(volatile uint8_t *)(bios + 0x5555) = 0xAA; *(volatile uint8_t *)(bios + 0x2AAA) = 0x55; *(volatile uint8_t *)(bios + 0x5555) = 0x10; }
int write_md2802(struct flashchip *flash, uint8_t *buf) { int i; int total_size = flash->total_size * 1024; int page_size = flash->page_size; volatile uint8_t *bios = flash->virtual_memory;
return (1);
Immediate return. But even if it had not been there:
erase_md2802(flash); if (*bios != (uint8_t) 0xff) { printf("ERASE FAILED!\n"); return -1; } printf("Programming page: "); for (i = 0; i < total_size / page_size; i++) { printf("%04d at address: 0x%08x", i, i * page_size); //write_page_md2802(bios, buf + i * page_size, bios + i * page_size, page_size);
This call is commented out because write_page_md2802() does not exist.
printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); } printf("\n"); //protect_md2802(bios);
return 0; }
The simple fact is that this flash driver is not complete. If a patch had been sent to the list that added a driver like this today it would have been NAKed by a screaming horde of people. :)
I don't know how to justify keeping this code around.
//Peter
On 22.06.2008 12:24, Stefan Reinauer wrote:
Peter Stuge wrote:
Patch attached.
//Peter
flashrom: Remove dead M-Systems Disk on Chip code
DOC support has been disabled by default for many years. The write function does nothing but print text. It has a call to write_page_md2802() commented out, but that function does not exist. This is dead code with ugly #ifdefs.
Updates README to reflect that there was a time when there was code, but it didn't work. Removes M-Systems #defines and also includes svn rm msys_doc.*
Signed-off-by: Peter Stuge peter@stuge.se
Absolutely NACK.
The reason the code is not compiled in per default is that the probing takes forever. Still, no reason to drop support.
No, the flashrom DoC code in subversion never worked. The write functions were commented out already at the time flashrom was checked in into the v2 tree at the end of the year 2003. The code in flashrom has been useless since forever. By the way, I checked the DoC code in another repository (v1 flash_and_burn), and that code also never worked.
I don't think we should drop features because we don't like a few ifdefs.
Agreed. Dropping code that _never_ worked is very reasonable, though.
Regards, Carl-Daniel
I agree that we should never remove working code. The DoC code never worked, sadly, and we instead were lucky enough to have mtd to use for read/write of DoC. parts.
But DoC is mostly dead IMHO. M-systems never figured out the importance of open interfaces. Does anyone use DoC any more?
ron
On Wed, Jun 25, 2008 at 08:52:18AM -0700, ron minnich wrote:
I agree that we should never remove working code. The DoC code never worked, sadly, and we instead were lucky enough to have mtd to use for read/write of DoC. parts.
Do you have a HOWTO or URL?
But DoC is mostly dead IMHO. M-systems never figured out the importance of open interfaces. Does anyone use DoC any more?
Well not really "use", but I do have some older GX1 systems in production here which do have DoC in them (which I currently don't use as I have no idea how to program them etc.).
I think I tried some mtd utils a few months back but without much success -- maybe bugs, maybe I just don't understand how this DoC stuff is supposed to work in general; it sure is a strange piece of proprietary hardware/software indeed. I read something about special closed-source DOS tools you need to "format" the thing first and whatnot...
Uwe.
On Thu, Jun 26, 2008 at 5:02 AM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Wed, Jun 25, 2008 at 08:52:18AM -0700, ron minnich wrote:
I agree that we should never remove working code. The DoC code never worked, sadly, and we instead were lucky enough to have mtd to use for read/write of DoC. parts.
Do you have a HOWTO or URL?
no, my last usage of them was 7 years ago.
ron