setup.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * arch/mips/vr41xx/nec-cmbvr4133/setup.c
  3. *
  4. * Setup for the NEC CMB-VR4133.
  5. *
  6. * Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com> and
  7. * Alex Sapkov <asapkov@ru.mvista.com>
  8. *
  9. * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under
  10. * the terms of the GNU General Public License version 2. This program
  11. * is licensed "as is" without any warranty of any kind, whether express
  12. * or implied.
  13. *
  14. * Support for CMBVR4133 board in 2.6
  15. * Author: Manish Lachwani (mlachwani@mvista.com)
  16. */
  17. #include <linux/init.h>
  18. #include <linux/ide.h>
  19. #include <linux/ioport.h>
  20. #include <asm/reboot.h>
  21. #include <asm/time.h>
  22. #include <asm/vr41xx/cmbvr4133.h>
  23. #include <asm/bootinfo.h>
  24. #ifdef CONFIG_MTD
  25. #include <linux/mtd/physmap.h>
  26. #include <linux/mtd/partitions.h>
  27. #include <linux/mtd/mtd.h>
  28. #include <linux/mtd/map.h>
  29. static struct mtd_partition cmbvr4133_mtd_parts[] = {
  30. {
  31. .name = "User FS",
  32. .size = 0x1be0000,
  33. .offset = 0,
  34. .mask_flags = 0,
  35. },
  36. {
  37. .name = "PMON",
  38. .size = 0x140000,
  39. .offset = MTDPART_OFS_APPEND,
  40. .mask_flags = MTD_WRITEABLE, /* force read-only */
  41. },
  42. {
  43. .name = "User FS2",
  44. .size = MTDPART_SIZ_FULL,
  45. .offset = MTDPART_OFS_APPEND,
  46. .mask_flags = 0,
  47. }
  48. };
  49. #define number_partitions (sizeof(cmbvr4133_mtd_parts)/sizeof(struct mtd_partition))
  50. #endif
  51. extern void i8259_init(void);
  52. static void __init nec_cmbvr4133_setup(void)
  53. {
  54. #ifdef CONFIG_ROCKHOPPER
  55. extern void disable_pcnet(void);
  56. disable_pcnet();
  57. #endif
  58. set_io_port_base(KSEG1ADDR(0x16000000));
  59. mips_machtype = MACH_NEC_CMBVR4133;
  60. #ifdef CONFIG_PCI
  61. #ifdef CONFIG_ROCKHOPPER
  62. ali_m5229_preinit();
  63. #endif
  64. #endif
  65. #ifdef CONFIG_ROCKHOPPER
  66. rockhopper_init_irq();
  67. #endif
  68. #ifdef CONFIG_MTD
  69. /* we use generic physmap mapping driver and we use partitions */
  70. physmap_configure(0x1C000000, 0x02000000, 4, NULL);
  71. physmap_set_partitions(cmbvr4133_mtd_parts, number_partitions);
  72. #endif
  73. /* 128 MB memory support */
  74. add_memory_region(0, 0x08000000, BOOT_MEM_RAM);
  75. #ifdef CONFIG_ROCKHOPPER
  76. i8259_init();
  77. #endif
  78. }