setup-sh7619.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * SH7619 Setup
  3. *
  4. * Copyright (C) 2006 Yoshinori Sato
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/platform_device.h>
  11. #include <linux/init.h>
  12. #include <linux/serial.h>
  13. #include <asm/sci.h>
  14. static struct plat_sci_port sci_platform_data[] = {
  15. {
  16. .mapbase = 0xf8400000,
  17. .flags = UPF_BOOT_AUTOCONF,
  18. .type = PORT_SCIF,
  19. .irqs = { 88, 89, 91, 90},
  20. }, {
  21. .mapbase = 0xf8410000,
  22. .flags = UPF_BOOT_AUTOCONF,
  23. .type = PORT_SCIF,
  24. .irqs = { 92, 93, 95, 94},
  25. }, {
  26. .mapbase = 0xf8420000,
  27. .flags = UPF_BOOT_AUTOCONF,
  28. .type = PORT_SCIF,
  29. .irqs = { 96, 97, 99, 98},
  30. }, {
  31. .flags = 0,
  32. }
  33. };
  34. static struct platform_device sci_device = {
  35. .name = "sh-sci",
  36. .id = -1,
  37. .dev = {
  38. .platform_data = sci_platform_data,
  39. },
  40. };
  41. static struct platform_device *sh7619_devices[] __initdata = {
  42. &sci_device,
  43. };
  44. static int __init sh7619_devices_setup(void)
  45. {
  46. return platform_add_devices(sh7619_devices,
  47. ARRAY_SIZE(sh7619_devices));
  48. }
  49. __initcall(sh7619_devices_setup);
  50. #define INTC_IPRC 0xf8080000UL
  51. #define INTC_IPRD 0xf8080002UL
  52. #define CMI0_IRQ 86
  53. #define SCIF0_ERI_IRQ 88
  54. #define SCIF0_RXI_IRQ 89
  55. #define SCIF0_BRI_IRQ 90
  56. #define SCIF0_TXI_IRQ 91
  57. #define SCIF1_ERI_IRQ 92
  58. #define SCIF1_RXI_IRQ 93
  59. #define SCIF1_BRI_IRQ 94
  60. #define SCIF1_TXI_IRQ 95
  61. #define SCIF2_BRI_IRQ 96
  62. #define SCIF2_ERI_IRQ 97
  63. #define SCIF2_RXI_IRQ 98
  64. #define SCIF2_TXI_IRQ 99
  65. static struct ipr_data sh7619_ipr_map[] = {
  66. { CMI0_IRQ, INTC_IPRC, 1, 2 },
  67. { SCIF0_ERI_IRQ, INTC_IPRD, 3, 3 },
  68. { SCIF0_RXI_IRQ, INTC_IPRD, 3, 3 },
  69. { SCIF0_BRI_IRQ, INTC_IPRD, 3, 3 },
  70. { SCIF0_TXI_IRQ, INTC_IPRD, 3, 3 },
  71. { SCIF1_ERI_IRQ, INTC_IPRD, 2, 3 },
  72. { SCIF1_RXI_IRQ, INTC_IPRD, 2, 3 },
  73. { SCIF1_BRI_IRQ, INTC_IPRD, 2, 3 },
  74. { SCIF1_TXI_IRQ, INTC_IPRD, 2, 3 },
  75. { SCIF2_ERI_IRQ, INTC_IPRD, 1, 3 },
  76. { SCIF2_RXI_IRQ, INTC_IPRD, 1, 3 },
  77. { SCIF2_BRI_IRQ, INTC_IPRD, 1, 3 },
  78. { SCIF2_TXI_IRQ, INTC_IPRD, 1, 3 },
  79. };
  80. void __init init_IRQ_ipr(void)
  81. {
  82. make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map));
  83. }