public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Jason Gunthorpe <jgg@deltatee.com>
Cc: mtd@infradead.org
Subject: Re: Common Flash Interface probe code.
Date: Tue, 13 Jun 2000 08:40:55 +0100	[thread overview]
Message-ID: <29382.960882055@cygnus.co.uk> (raw)
In-Reply-To: <Pine.LNX.3.96.1000612232952.6204A-100000@white.priv.deltatee.com>


jgg@deltatee.com said:
>  Assuming the flash is CFI it looks like your detector will find the
> first 4 chips, but not the second set. 

That's correct so far. Don't worry - the machine I'm working with has two 
flash chips mapped one after the other, so I'm going to be fixing that.

I'll even throw in actual read/write/erase code, rather than just probe :)

jgg@deltatee.com said:
>  Wots up with this? Some of the ARM ports have 'interesting' IO..

#define readb(p)	(panic("readb called, but not implemented"),0)

Which brings me to the other thing I wanted to discuss with you - because
Linux drivers basically needs to have a readb function per bus, the old
'mapped' code isn't quite generic enough.

I've put together a 'struct map_info' which contains read/write functions 
for the raw memory addresses, and these can handle paging if necessary. See 
include/linux/mtd/map.h and what I've done to kernel/vmax301.c for details.

There's an indirection per access, but it's cleaner like that, and in fact 
the overhead isn't _too_ horrible - flash is bloody slow anyway so we don't 
care too much about it there, and for accessing RAM or even reading flash, 
you have the copy_from() and copy_to() functions where the cost is O(1).

Care to offer an opinion? Especially as it's your code I'm replacing, so I 
know you've thought about this stuff.

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

  parent reply	other threads:[~2000-06-13  7:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-12 12:04 Common Flash Interface probe code David Woodhouse
2000-06-13  5:53 ` Jason Gunthorpe
2000-06-13  6:34   ` M-Systems Disk-On-Chip driver Adi Linden
2000-06-13  7:44     ` David Woodhouse
2000-06-13 13:48       ` Adi Linden
2000-06-13 14:28         ` David Woodhouse
2000-06-13  7:40   ` David Woodhouse [this message]
2000-06-13 15:30     ` Common Flash Interface probe code Jason Gunthorpe
2000-06-13 16:11       ` David Woodhouse
2000-06-13 17:16         ` Jason Gunthorpe
2000-06-13 17:54           ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2004-07-06  7:45 Reynolds-Lear, Matthew

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29382.960882055@cygnus.co.uk \
    --to=dwmw2@infradead.org \
    --cc=jgg@deltatee.com \
    --cc=mtd@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox