setup.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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_machgroup = MACH_GROUP_NEC_VR41XX;
  60. mips_machtype = MACH_NEC_CMBVR4133;
  61. #ifdef CONFIG_PCI
  62. #ifdef CONFIG_ROCKHOPPER
  63. ali_m5229_preinit();
  64. #endif
  65. #endif
  66. #ifdef CONFIG_ROCKHOPPER
  67. rockhopper_init_irq();
  68. #endif
  69. #ifdef CONFIG_MTD
  70. /* we use generic physmap mapping driver and we use partitions */
  71. physmap_configure(0x1C000000, 0x02000000, 4, NULL);
  72. physmap_set_partitions(cmbvr4133_mtd_parts, number_partitions);
  73. #endif
  74. /* 128 MB memory support */
  75. add_memory_region(0, 0x08000000, BOOT_MEM_RAM);
  76. #ifdef CONFIG_ROCKHOPPER
  77. i8259_init();
  78. #endif
  79. }