Integrating 2000 and Millenium drivers
Hi,
I'm fixing some little things on DOC2000 driver, and I'm wondering
if we could integrate 2k and Millenium drivers in a single file. There is so many common code in these two drivers that I guess we could do it like m-sys do: a single driver with a flag to enable all pipeline stuff from millenium and registers. A single variable pointing to the IO register would also be nice.
I agree that from a first version perspective it's better to develop
two drivers. We can work in all 2k or Mil little tricks without breaking the other. But maybe we are reaching a stable low level routines where the merge could be done.
I don't have the millenium hardware, so I would probably break
everything for millenium users if I make this merge. Is there someone with knowledge of DoC Mil (and spare time!) to help me with it?
BTW, I've just begin hacking DoC last month, so forgive me if I'm
missing some good reason why these drivers can't be merged...
Regards,
To unsubscribe, send "unsubscribe mtd" to [email protected]
I don't know the code very well, but I would push for code reuse where ever possibl
Maybe there should be three file ??? One that has the common/shared code,
one for Doc2000 specific code and one for DocMil specific code ???
Brendan Simon.
Quoted 16 lines · Miguel Freitas
Hi,
I'm fixing some little things on DOC2000 driver, and I'm wondering
if we could integrate 2k and Millenium drivers in a single file. There is so many common code in these two drivers that I guess we could do it like m-sys do: a single driver with a flag to enable all pipeline stuff from millenium and registers. A single variable pointing to the IO register would also be nice.
I agree that from a first version perspective it's better to develop
two drivers. We can work in all 2k or Mil little tricks without breaking the other. But maybe we are reaching a stable low level routines where the merge could be done.
I don't have the millenium hardware, so I would probably break
everything for millenium users if I make this merge. Is there someone with knowledge of DoC Mil (and spare time!) to help me with it?
Quoted 6 lines
BTW, I've just begin hacking DoC last month, so forgive me if I'm
missing some good reason why these drivers can't be merged...Regards,
To unsubscribe, send "unsubscribe mtd" to [email protected]
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 3 lines · [email protected] said:
BTW, I've just begin hacking DoC last month, so forgive me if I'm
missing some good reason why these drivers can't be merged...
There's no particularly good reason to keep them separate if we can merge them without killing the performance. I split them up so that I could point people at doc2001.c and say 'There. Make it work if you want to'.
Now that's done, I don't see any particular reason to keep them separate.
Code reuse is wonderful as long as it doesn't mean shitloads of conditional branches in the inner loop of the access functions. I think we can merge them without doing that, so why not?
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to [email protected]