Re: Importing Flash and NAND subsystem for NetBSD

2011-02-22 Thread Adam Hoka
On Sun, 20 Feb 2011 19:00:38 + Mindaugas Rasiukevicius wrote: > Adam Hoka wrote: > > Latest update: http://www.netbsd.org/~ahoka/patches/flash_9.diff > > > > I will commit this in the following days if there are no other > > suggestions. > > - Why hamming code is sys/dev rather than libker

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-20 Thread Mindaugas Rasiukevicius
Adam Hoka wrote: > Latest update: http://www.netbsd.org/~ahoka/patches/flash_9.diff > > I will commit this in the following days if there are no other > suggestions. - Why hamming code is sys/dev rather than libkern? Perhaps also move nand_crc16() there as well? - nand_sync_thread_start: pass

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-18 Thread Adam Hoka
Latest update: http://www.netbsd.org/~ahoka/patches/flash_9.diff I will commit this in the following days if there are no other suggestions. Thanks. -- NetBSD - Simplicity is prerequisite for reliability

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-16 Thread Adam Hoka
On 14 Feb 2011 18:11:47 +0900 enami tsugutomo wrote: > Adam Hoka writes: > > > Updated patch (it was missing one file): > > > > http://www.netbsd.org/~ahoka/patches/flash_4.diff > > Is all allocated memory free'ed? At a first glance, I can't find free > for nbbt_bitmap and flash_if. > > ena

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-15 Thread Adam Hoka
On Mon, Feb 14, 2011 at 6:51 PM, Adam Hoka wrote: > Updated with suggestions from Joerg: > > http://www.netbsd.org/~ahoka/patches/flash_6.diff > > -- > NetBSD - Simplicity is prerequisite for reliability > Minor modifications: http://www.netbsd.org/~ahoka/patches/flash_7.diff -- NetBSD - Simpli

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-14 Thread Adam Hoka
Updated with suggestions from Joerg: http://www.netbsd.org/~ahoka/patches/flash_6.diff -- NetBSD - Simplicity is prerequisite for reliability

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-14 Thread Adam Hoka
New version: http://www.netbsd.org/~ahoka/patches/flash_5.diff I hope the popcount part is OK. -- NetBSD - Simplicity is prerequisite for reliability

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-14 Thread Matt Thomas
On Feb 14, 2011, at 12:46 AM, Adam Hoka wrote: > On Sun, 13 Feb 2011 10:44:45 -0800 > Matt Thomas wrote: > >> Use >> struct name { >> please (in flashio.h) > > Can you ellaborate on this please? struct foo { ... }; is not KNF. struct foo { ... }; is KNF.

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-14 Thread enami tsugutomo
Adam Hoka writes: > Updated patch (it was missing one file): > > http://www.netbsd.org/~ahoka/patches/flash_4.diff Is all allocated memory free'ed? At a first glance, I can't find free for nbbt_bitmap and flash_if. enami.

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-14 Thread Adam Hoka
On Sun, 13 Feb 2011 10:44:45 -0800 Matt Thomas wrote: > Use > struct name { > please (in flashio.h) Can you ellaborate on this please? -- NetBSD - Simplicity is prerequisite for reliability

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-13 Thread Matt Thomas
On Feb 13, 2011, at 2:20 PM, Joerg Sonnenberger wrote: > On Sun, Feb 13, 2011 at 02:11:30PM -0800, Matt Thomas wrote: >> >> On Feb 13, 2011, at 12:10 PM, Joerg Sonnenberger wrote: >> >>> On Sun, Feb 13, 2011 at 10:44:45AM -0800, Matt Thomas wrote: CountBitsInByte should be replaced by __bu

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-13 Thread Joerg Sonnenberger
On Sun, Feb 13, 2011 at 02:11:30PM -0800, Matt Thomas wrote: > > On Feb 13, 2011, at 12:10 PM, Joerg Sonnenberger wrote: > > > On Sun, Feb 13, 2011 at 10:44:45AM -0800, Matt Thomas wrote: > >> CountBitsInByte should be replaced by __builtin_popcount so that > >> machines with a popcount instructi

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-13 Thread Matt Thomas
On Feb 13, 2011, at 12:10 PM, Joerg Sonnenberger wrote: > On Sun, Feb 13, 2011 at 10:44:45AM -0800, Matt Thomas wrote: >> CountBitsInByte should be replaced by __builtin_popcount so that >> machines with a popcount instruction can use it. > > Which ones? There is no assembler version of popcount

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-13 Thread Joerg Sonnenberger
On Sun, Feb 13, 2011 at 10:44:45AM -0800, Matt Thomas wrote: > CountBitsInByte should be replaced by __builtin_popcount so that > machines with a popcount instruction can use it. Which ones? There is no assembler version of popcount at the moment. SPARC64 doesn't use it for ffs(), the AMD64 one ha

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-13 Thread David Laight
On Sun, Feb 13, 2011 at 10:44:45AM -0800, Matt Thomas wrote: > > consider implementing nand_crc16 via a nibble lookup table. Is it the 'standard' crc16 (x^16 + x^15 + x^2 + 1) ? There is a trivial xor and shift sequence for it (bytewise) that will be faster than the byte lookup on anything that c

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-13 Thread Adam Hoka
On Sun, 13 Feb 2011 10:44:45 -0800 Matt Thomas wrote: > > On Feb 13, 2011, at 7:30 AM, Adam Hoka wrote: > > > On Sun, 13 Feb 2011 15:23:19 +0100 > > Adam Hoka wrote: > > > >> Hi! > >> > >> The University of Szeged, Hungary developed a Flash and NAND subsystem for > >> NetBSD, which I would l

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-13 Thread Matt Thomas
On Feb 13, 2011, at 7:30 AM, Adam Hoka wrote: > On Sun, 13 Feb 2011 15:23:19 +0100 > Adam Hoka wrote: > >> Hi! >> >> The University of Szeged, Hungary developed a Flash and NAND subsystem for >> NetBSD, which I would like to import into src. Most of the code was written >> by me so direct any

Re: Importing Flash and NAND subsystem for NetBSD

2011-02-13 Thread Adam Hoka
On Sun, 13 Feb 2011 15:23:19 +0100 Adam Hoka wrote: > Hi! > > The University of Szeged, Hungary developed a Flash and NAND subsystem for > NetBSD, which I would like to import into src. Most of the code was written > by me so direct any questions and suggestions to me. A sample driver is > provi

Importing Flash and NAND subsystem for NetBSD

2011-02-13 Thread Adam Hoka
Hi! The University of Szeged, Hungary developed a Flash and NAND subsystem for NetBSD, which I would like to import into src. Most of the code was written by me so direct any questions and suggestions to me. A sample driver is provided for OMAP NAND controllers as found in BeagleBoard and DEVKIT80