Page MenuHomeFreeBSD

Implement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100)
ClosedPublic

Authored by jhibbits on Apr 4 2015, 3:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 6:39 AM
Unknown Object (File)
Fri, Apr 26, 6:22 AM
Unknown Object (File)
Dec 24 2023, 2:47 PM
Unknown Object (File)
Dec 19 2023, 6:34 PM
Unknown Object (File)
Aug 21 2023, 3:05 PM
Unknown Object (File)
Jul 2 2023, 11:45 PM
Unknown Object (File)
Jun 26 2023, 11:17 PM
Unknown Object (File)
Jun 16 2023, 3:22 AM
Subscribers

Details

Summary

This has been tested on the RB800, but should work on the RB333, RB600, and
RB1100 as well.

It's currently missing ECC support, but read and write are complete.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhibbits retitled this revision from to Implement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100).
jhibbits updated this object.
jhibbits edited the test plan for this revision. (Show Details)
jhibbits added a reviewer: imp.
sys/dev/nand/nfc_rb.c
3 ↗(On Diff #4660)

Why this?

103–110 ↗(On Diff #4660)

This looks like fun. It also looks like code copied from somewhere else...

232 ↗(On Diff #4660)

read_region? Is that really right?

257 ↗(On Diff #4660)

I didn't see where you asserted the CS for this chip. Are you relying on the boot loader to do that, or is it hard wired?
It will pull more power when CS is asserted.

sys/dev/nand/nfc_rb.c
3 ↗(On Diff #4660)

This started life as a copy of nfc_mv.c. The only remaining original method, though, is write_buf, which is almost identical to the original.

103–110 ↗(On Diff #4660)

Copied in spirit from the Linux driver (had to get the eccpositions from somewhere).

232 ↗(On Diff #4660)

The Linux driver does a memcpy(), so this seemed appropriate. Is there a better option?

257 ↗(On Diff #4660)

CS is the nce GPIO. I don't see a deselect_cs, so just enabled it in the send_command() and send_address() methods. I guess it can be moved here.

imp edited edge metadata.

This looks good to me. Feel free to do or not do the comments (except the last one: the code under review is fine and preferable).

sys/dev/nand/nfc_rb.c
3 ↗(On Diff #4660)

That's de-minimus, also the write_buf method looks to be one of the few ways to express this...

232 ↗(On Diff #4660)

No, this is good. You are reading a buffer, not a FIFO like I though originally...

257 ↗(On Diff #4660)

I wouldn't. I'd just enable it like you are now until the NAND system can cope with multiple CS for real. Better to have everybody do the same thing...

This revision is now accepted and ready to land.May 4 2015, 7:54 PM
This revision was automatically updated to reflect the committed changes.