prom.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. mips_machgroup = MACH_GROUP_TOSHIBA;
  45. mips_machtype = MACH_TOSHIBA_RBTX4938;
  46. msize = tx4938_get_mem_size();
  47. add_memory_region(0, msize << 20, BOOT_MEM_RAM);
  48. return;
  49. }
  50. void __init prom_free_prom_memory(void)
  51. {
  52. }
  53. void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
  54. {
  55. return;
  56. }
  57. const char *get_system_type(void)
  58. {
  59. return "Toshiba RBTX4938";
  60. }
  61. char * __init prom_getcmdline(void)
  62. {
  63. return &(arcs_cmdline[0]);
  64. }