Signed-off-by: Robinson P. Tryon bishop.robinson@gmail.com
I did my best to interpret the data sheet properly. I wasn't sure if the TEST registers were important or not, so I left them in. I'm still not sure about whether I should put a copyright notice in the file, so feel free to keep or kill that line as appropriate.
Comparing the specs for the FDC37B78x and the FDC37B72x you can see that there's a whole lot of duplication in the dump table. At first glance, the global config (apart from the chip ID), the floppy, parallel port, and serial ports have exactly the same register layout for both chip families.
Is there some way that we can factor out these common data?
On Sat, Oct 06, 2007 at 12:50:52PM -0400, Robinson Tryon wrote:
Comparing the specs for the FDC37B78x and the FDC37B72x you can see that there's a whole lot of duplication in the dump table. At first glance, the global config (apart from the chip ID), the floppy, parallel port, and serial ports have exactly the same register layout for both chip families.
Is there some way that we can factor out these common data?
No, I don't think that's practicable.
While refactoring code is a good thing in general, this is just a bunch of numbers and I don't see a way to sensibly factor this out.
Uwe.
On Sun, Oct 07, 2007 at 12:05:05AM +0200, Uwe Hermann wrote:
Is there some way that we can factor out these common data?
No, I don't think that's practicable.
Depends on how much values would be duplicate I think.
While refactoring code is a good thing in general, this is just a bunch of numbers and I don't see a way to sensibly factor this out.
Easy, just split the current table into LDN data common for more than one chip, and LDN data specific to each chip, then add code to create the current table from that.
//Peter
On 10/7/07, Peter Stuge peter@stuge.se wrote:
On Sun, Oct 07, 2007 at 12:05:05AM +0200, Uwe Hermann wrote:
Is there some way that we can factor out these common data?
No, I don't think that's practicable.
Depends on how much values would be duplicate I think.
For the smsc superios I've just been working on - the keyboard and COM1 registers are practically all the same - I think that Parallel Port was all the same, too - COM2 is almost always the same (the first register is sometimes 0x00, sometimes NANA... so practically we might actually consider these the same).
While refactoring code is a good thing in general, this is just a bunch of numbers and I don't see a way to sensibly factor this out.
Easy, just split the current table into LDN data common for more than one chip, and LDN data specific to each chip, then add code to create the current table from that.
Either way is fine with me.
On Sun, Oct 07, 2007 at 05:05:57PM -0400, Robinson Tryon wrote:
On 10/7/07, Peter Stuge peter@stuge.se wrote:
On Sun, Oct 07, 2007 at 12:05:05AM +0200, Uwe Hermann wrote:
Is there some way that we can factor out these common data?
No, I don't think that's practicable.
Depends on how much values would be duplicate I think.
For the smsc superios I've just been working on
- the keyboard and COM1 registers are practically all the same
- I think that Parallel Port was all the same, too
- COM2 is almost always the same (the first register is sometimes
0x00, sometimes NANA... so practically we might actually consider these the same).
Nope, I really wouldn't do that. Don't bother with factoring out here, way too much hassle and #ifdef-hell for no real gain.
Uwe.
On Sat, Oct 06, 2007 at 12:00:31PM -0400, Robinson Tryon wrote:
Signed-off-by: Robinson P. Tryon bishop.robinson@gmail.com
Thanks, r2831.
Uwe.