dataOperationOfSprayTerminal.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * sh73a0 processor support
  3. *
  4. * Copyright (C) 2010 Takashi Yoshii
  5. * Copyright (C) 2010 Magnus Damm
  6. * Copyright (C) 2008 Yoshihiro Shimoda
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; version 2 of the License.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include <linux/kernel.h>
  22. #include <linux/init.h>
  23. #include <linux/interrupt.h>
  24. #include <linux/irq.h>
  25. #include <linux/platform_device.h>
  26. #include <linux/delay.h>
  27. #include <linux/input.h>
  28. #include <linux/io.h>
  29. #include <linux/serial_sci.h>
  30. #include <linux/sh_dma.h>
  31. #include <linux/sh_intc.h>
  32. #include <linux/sh_timer.h>
  33. #include <mach/dma-register.h>
  34. #include <mach/hardware.h>
  35. #include <mach/irqs.h>
  36. #include <mach/sh73a0.h>
  37. #include <mach/common.h>
  38. #include <asm/mach-types.h>
  39. #include <asm/mach/map.h>
  40. #include <asm/mach/arch.h>
  41. #include <asm/mach/time.h>
  42. static struct map_desc sh73a0_io_desc[] __initdata = {
  43. /* create a 1:1 entity map for 0xe6xxxxxx
  44. * used by CPGA, INTC and PFC.
  45. */
  46. {
  47. .virtual = 0xe6000000,
  48. .pfn = __phys_to_pfn(0xe6000000),
  49. .length = 256 << 20,
  50. .type = MT_DEVICE_NONSHARED
  51. },
  52. };
  53. void __init sh73a0_map_io(void)
  54. {
  55. iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
  56. }
  57. static struct plat_sci_port scif0_platform_data = {
  58. .mapbase = 0xe6c40000,
  59. .flags = UPF_BOOT_AUTOCONF,
  60. .scscr = SCSCR_RE | SCSCR_TE,
  61. .scbrr_algo_id = SCBRR_ALGO_4,
  62. .type = PORT_SCIFA,
  63. .irqs = { gic_spi(72), gic_spi(72),
  64. gic_spi(72), gic_spi(72) },
  65. };
  66. static struct platform_device scif0_device = {
  67. .name = "sh-sci",
  68. .id = 0,
  69. .dev = {
  70. .platform_data = &scif0_platform_data,
  71. },
  72. };
  73. static struct plat_sci_port scif1_platform_data = {
  74. .mapbase = 0xe6c50000,
  75. .flags = UPF_BOOT_AUTOCONF,
  76. .scscr = SCSCR_RE | SCSCR_TE,