[flashrom] [RFC] National Semiconductor DP83815 NIC patch

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Fri Jun 4 16:13:15 CEST 2010


On 04.06.2010 05:07, Andrew Morgan wrote:
> I have a couple of Netgear FA311 network cards, which have DP83815DVNG
> chips on board, and a space to mount a 32-pin boot ROM socket. Looking
> at the datasheet for the chip I have created this patch.
>
> The datasheet suggests that reads and writes must be done 32 bits at a
> time, and only at 32 bit offsets. This seems strange for chips which
> have an 8 bit data bus.
>
> I don't think this code is ready for inclusion in flashrom yet, but if
> anyone has a card with this chip and can test it out then give it a
> go. I'm pretty sure it won't just work though. It might even destroy
> your computer/house/planet.
>
> I can't test it yet because the cards don't have a 32pin socket
> mounted on them. If and when I can add one then I can do some tests.
>
> This is my first 'large' patch so let me know what I have got wrong. :)
>
> Signed-off-by: Andrew Morgan <ziltro at ziltro.com>

Oh, it looks really nice.

In fact, we could commit this instantly except for two reasons:
1. It's untested, and completely untested drivers should default to no
in the Makefile. Once we have the first successful test, we can change
it to yes.
2. The INB/OUTB for data contradicts the datasheet (I know, the
datasheet might very well be wrong), so a comment would be appreciated
in those places, e.g. "The datasheet says this register can only be
accessed with full 32 bit width, but that would make 8 bit writes
impossible. Due to that, we assume the meaning was garbled in translation."

Hm. It is entirely possible that the datasheet means the register access
mode is 32 bit. The contents of the data register might only care about
the lowest 8 bits. That would also mean your driver could work...

Change those two things, and you get an ack from me and I'll commit.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list