Hi,

I'd like to hear comments about this.
I am working with a fairly recent denx kernel tree (linuxppc_2_4_devel) and 
have noticed that apparently support for physmap MTD mapping driver is 
missing. Since physmap.c version 1.29 on, flash start address, size and 
buswidth have to be setup by the board support package, but mpc8xx uses a 
centralized .c file (arch/ppc/m8xx_setup.c) and include-files from 
arch/platforms/*, so there is no way of specifying flash geometry.
I suggest something like this to solve the problem. If there is a better place 
to put this, please let me know.

------------------------- begin patch --------------------------
---?arch/ppc/kernel/m8xx_setup.c.orig
+++?arch/ppc/kernel/m8xx_setup.c
@@?-35,6?+35,9?@@
?#include?<linux/ioport.h>
?#include?<linux/bootmem.h>
?#include?<linux/seq_file.h>
+#if?defined(CONFIG_MTD_PHYSMAP)?&&?defined(CONFIG_MTD) 
+#include?<linux/mtd/physmap.h> 
+#endif 
?
?#include?<asm/mmu.h>
?#include?<asm/processor.h>
@@?-510,4?+513,8?@@
?#if?defined(CONFIG_IDE_8xx_PCCARD)?||?defined(CONFIG_IDE_8xx_DIRECT)
????     m8xx_ide_init();
?#endif
+#if?defined(CONFIG_MTD_PHYSMAP)?&&?defined(CONFIG_MTD) 
+       /*?we?use?generic?physmap?mapping?driver?and?we?use?partitions?*/
+       physmap_configure(CONFIG_MTD_PHYSMAP_START,?CONFIG_MTD_PHYSMAP_LEN,?
CONFIG_MTD_PHYSMAP_BUSWIDTH,?NULL);
+#endif 
?}
-------------------------- end patch -------------------------------

Greetings,

-- 
David Jander
Protonic Holland.

Reply via email to