prom.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * linux/arch/mips/tx4938/toshiba_rbtx4938/prom.c
  3. *
  4. * rbtx4938 specific prom routines
  5. * Copyright (C) 2000-2001 Toshiba Corporation
  6. *
  7. * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
  8. * terms of the GNU General Public License version 2. This program is
  9. * licensed "as is" without any warranty of any kind, whether express
  10. * or implied.
  11. *
  12. * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
  13. */
  14. #include <linux/init.h>
  15. #include <linux/mm.h>
  16. #include <linux/sched.h>
  17. #include <linux/bootmem.h>
  18. #include <asm/addrspace.h>
  19. #include <asm/bootinfo.h>
  20. #include <asm/tx4938/tx4938.h>
  21. void __init prom_init_cmdline(void)
  22. {
  23. int argc = (int) fw_arg0;
  24. char **argv = (char **) fw_arg1;
  25. int i;
  26. /* ignore all built-in args if any f/w args given */
  27. if (argc > 1) {
  28. *arcs_cmdline = '\0';
  29. }
  30. for (i = 1; i < argc; i++) {
  31. if (i != 1) {
  32. strcat(arcs_cmdline, " ");
  33. }
  34. strcat(arcs_cmdline, argv[i]);
  35. }
  36. }
  37. void __init prom_init(void)
  38. {
  39. extern int tx4938_get_mem_size(void);
  40. int msize;
  41. #ifndef CONFIG_TX4938_NAND_BOOT
  42. prom_init_cmdline();
  43. #endif
  44. msize = tx4938_get_mem_size();
  45. add_memory_region(0, msize << 20, BOOT_MEM_RAM);
  46. return;
  47. }
  48. void __init prom_free_prom_memory(void)
  49. {
  50. }
  51. void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
  52. {
  53. return;
  54. }
  55. const char *get_system_type(void)
  56. {
  57. return "Toshiba RBTX4938";
  58. }
  59. char * __init prom_getcmdline(void)
  60. {
  61. return &(arcs_cmdline[0]);
  62. }