Skip to contentSkip to conversation

block device for 2.0

DISCUSSION Erwin Authried 2 participants 2 messages Nov 17, 2000 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Nicolas Pitre[SMTP:[email protected]] 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 [email protected]

#1 lore raw
Quoted 4 lines · [email protected] said:

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:

I think we need to rewrite the part that load/calls the command set code. It's fairly horrible.

--
dwmw2

To unsubscribe, send "unsubscribe mtd" to [email protected]