public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Re: block device for 2.0
@ 2000-11-17  8:05 Erwin Authried
  2000-11-17  9:02 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Erwin Authried @ 2000-11-17  8:05 UTC (permalink / raw)
  To: 'mtd@infradead.org'

Nicolas Pitre[SMTP:nico@cam.org] wrote:
> 
> Why not the other way around, i.e. CONFIG_MTD_BLOCK and CONFIG_MTD_BLOCK_RO?
> The read-only one is more the "special case" than the read-write one...
> 
> 
> Nicolas
> 
Ok., I have modified it this way. I don't know in detail what kind of changes are planned
for module support, thus I'd like to know if it's ok. to modify cfi_probe.c to be able to
compile without module support before I commit that:

-Erwin


#ifdef CONFIG_MODULES
        sprintf(probename, "cfi_cmdset_%4.4X", type);
        probe_function = (void *)get_module_symbol(NULL, probename);
        if (!probe_function) {
                request_module(probename);

                probe_function = (void *)get_module_symbol(NULL, probename);
        }

        if (probe_function) {
                (*probe_function)(map, primary, base);
                put_module_symbol((unsigned long)probe_function);
                return;
        }
#else
        switch(type){
#ifdef CONFIG_MTD_CFI_INTELEXT
        case 0x0001:
                cfi_cmdset_0001(map,primary,base);
                return;
#endif
#ifdef CONFIG_MTD_CFI_AMDSTD
        case 0x0002:
                cfi_cmdset_0002(map,primary,base);
                return;
#endif
        }
#endif  /* CONFIG_MODULES */






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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* block device for 2.0
@ 2000-11-16 14:36 Erwin Authried
  2000-11-16 23:44 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Erwin Authried @ 2000-11-16 14:36 UTC (permalink / raw)
  To: 'mtd@infradead.org'

I have now got all important modules running to
support ROM, CFI and RAM with uClinux. I have
used an old version of mtdblk.c (1.14) for block
access, for several reasons:
*The current driver uses kernel_thread. I don't know
  if/how that could be used in 2.0
* Caching is used. In uClinux, where RAM is valuable,
  RAM with the size of one erase sector would be wasted.
  With flashes that have 64KB or 128KB erase sectors,
  thats a lot of wasted memory.
* When the block driver is used as replacement for
  the blkmem.c ROM driver, caching isn't of any use at all.
  I think that will be the main (or the only?) purpose
  of the blockdriver in uClinux.

I thought it might be best to have the choice between the
old, uncached block block driver (for uClinux) or the new driver
as a configuration option. Are there any better ideas?

Regards,

Erwin




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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-11-17  9:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-17  8:05 block device for 2.0 Erwin Authried
2000-11-17  9:02 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2000-11-16 14:36 Erwin Authried
2000-11-16 23:44 ` David Woodhouse
2000-11-17  1:18   ` Nicolas Pitre
2000-11-17  1:24     ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox