setup.c 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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/config.h>
  18. #include <linux/init.h>
  19. #include <linux/ide.h>
  20. #include <linux/ioport.h>
  21. #include <asm/reboot.h>
  22. #include <asm/time.h>
  23. #include <asm/vr41xx/cmbvr4133.h>
  24. #include <asm/bootinfo.h>
  25. #ifdef CONFIG_MTD
  26. #include <linux/mtd/physmap.h>
  27. #include <linux/mtd/partitions.h>
  28. #include <linux/mtd/mtd.h>
  29. #include <linux/mtd/map.h>
  30. static struct mtd_partition cmbvr4133_mtd_parts[] = {
  31. {
  32. .name = "User FS",
  33. .size = 0x1be0000,
  34. .offset = 0,
  35. .mask_flags = 0,
  36. },
  37. {
  38. .name = "PMON",
  39. .size = 0x140000,
  40. .offset = MTDPART_OFS_APPEND,
  41. .mask_flags = MTD_WRITEABLE, /* force read-only */
  42. },
  43. {
  44. .name = "User FS2",
  45. .size = MTDPART_SIZ_FULL,
  46. .offset = MTDPART_OFS_APPEND,
  47. .mask_flags = 0,
  48. }
  49. };
  50. #define number_partitions (sizeof(cmbvr4133_mtd_parts)/sizeof(struct mtd_partition))
  51. #endif
  52. extern void i8259_init(void);
  53. static int __init nec_cmbvr4133_setup(void)
  54. {
  55. #ifdef CONFIG_ROCKHOPPER
  56. extern void disable_pcnet(void);
  57. disable_pcnet();
  58. #endif
  59. set_io_port_base(KSEG1ADDR(0x16000000));
  60. mips_machgroup = MACH_GROUP_NEC_VR41XX;
  61. mips_machtype = MACH_NEC_CMBVR4133;
  62. #ifdef CONFIG_PCI
  63. #ifdef CONFIG_ROCKHOPPER
  64. ali_m5229_preinit();
  65. #endif
  66. #endif
  67. #ifdef CONFIG_ROCKHOPPER
  68. rockhopper_init_irq();
  69. #endif
  70. #ifdef CONFIG_MTD
  71. /* we use generic physmap mapping driver and we use partitions */
  72. physmap_configure(0x1C000000, 0x02000000, 4, NULL);
  73. physmap_set_partitions(cmbvr4133_mtd_parts, number_partitions);
  74. #endif
  75. /* 128 MB memory support */
  76. add_memory_region(0, 0x08000000, BOOT_MEM_RAM);
  77. #ifdef CONFIG_ROCKHOPPER
  78. i8259_init();
  79. #endif
  80. return 0;
  81. }
  82. early_initcall(nec_cmbvr4133_setup);