Command line parameters for physmap.c

Joan Bertran jbertran at cirsa.com
Fri Sep 19 11:18:11 EDT 2003


  Hi,

  I'm programming an embedded linux under an x86, booting from
  a PCI rom and i found interesting to give the rom address
  through kernel command line composed by the bios instead
  of writing a pci mapping driver because the internal rom map
  could be known only by the bios.

  I have several questions
 - Why physmap.c depends on cfi_probe if it can work with map_rom?

 - Would you find interesting to be able to pass physmap addresses
   as parameters (module or kernel cmd line parameters)

   To test if it is posible i have modified physmap.c
   and drivers/mtd/maps/Config.in

  Regards.

  Here are the diffs.


$ diff physmap.c physmap.c.ORIGINAL
19,20c19,20
< #define WINDOW_ADDR rom_address
< #define WINDOW_SIZE rom_size
---
> #define WINDOW_ADDR CONFIG_MTD_PHYSMAP_START
> #define WINDOW_SIZE CONFIG_MTD_PHYSMAP_LEN
23,49d22
< MODULE_PARM(rom_address, "i");
< MODULE_PARM_DESC(rom_address, "Rom Address of the flash");
< MODULE_PARM(rom_size, "i");
< MODULE_PARM_DESC(rom_size, "Size of the flash mapping");
<
< static size_t rom_address = CONFIG_MTD_PHYSMAP_START;
< static unsigned rom_size  = CONFIG_MTD_PHYSMAP_LEN;
<
<
< /* options - nonmodular */
< #ifndef MODULE
< static int __init set_rom_size(char *str)
< {
<       rom_size = simple_strtoul(str,NULL,0);
<       return 1;
< }
<
< static int __init set_rom_address(char *str)
< {
<       rom_address = simple_strtoul(str,NULL,0);
<       return 1;
< }
<
< __setup("rom_size=", set_rom_size);
< __setup("rom_address=", set_rom_address);
< #endif
<
97c70
<       size: CONFIG_MTD_PHYSMAP_LEN,   //WINDOW_SIZE,
---
>       size: WINDOW_SIZE,
150d122
<     physmap_map.size = WINDOW_SIZE;


$ diff Config.in Config.in.ORIGINAL
9c9
< dep_tristate '  CFI Flash device in physical memory map' CONFIG_MTD_PHYSMAP
$CONFIG_MTD
---
> dep_tristate '  CFI Flash device in physical memory map' CONFIG_MTD_PHYSMAP
$CONFIG_MTD_GEN_PROBE

________________________________________________________________________________
____
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información CONFIDENCIAL sometida a secreto profesional o cuya divulgación
esté prohibida en virtud de la legislación vigente. Si ha recibido este
mensaje por error, le rogamos que nos lo comunique inmediatamente por esta
misma vía o por teléfono (34 93 739 67 00) y proceda a su destrucción.
Nótese que el correo electrónico vía Internet no permite asegurar ni la
confidencialidad de los mensajes que se transmiten ni la correcta recepción
de los mismos.  En el caso de que el destinatario de este mensaje no
consintiera la utilización del correo electrónico vía Internet, rogamos lo
ponga en nuestro conocimiento de manera inmediata.

This message is intended exclusively for its addressee and may contain
information that is CONFIDENTIAL and protected by a professional privilege
or which disclosure is prohibited by law. If this message has been received
in error, please immediately notify us via e-mail or by telephone (34 93
739 67 00) and delete it.
Please note that Internet e-mail does not guarantee the confidentiality or
the proper receipt of the messages sent.  If the addressee of this message
does not consent to the use of Internet e-mail, please communicate it to us
immediately.
________________________________________________________________________________
____




More information about the linux-mtd mailing list