mach-rx3715.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /* linux/arch/arm/mach-s3c2410/mach-rx3715.c
  2. *
  3. * Copyright (c) 2003,2004 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  5. *
  6. * http://www.handhelds.org/projects/rx3715.html
  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 version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * Modifications:
  13. * 16-Sep-2004 BJD Copied from mach-h1940.c
  14. * 25-Oct-2004 BJD Updates for 2.6.10-rc1
  15. * 10-Jan-2005 BJD Removed include of s3c2410.h s3c2440.h
  16. * 14-Jan-2005 BJD Added new clock init
  17. * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
  18. * 14-Mar-2005 BJD Fixed __iomem warnings
  19. * 20-Sep-2005 BJD Added static to non-exported items
  20. */
  21. #include <linux/kernel.h>
  22. #include <linux/types.h>
  23. #include <linux/interrupt.h>
  24. #include <linux/list.h>
  25. #include <linux/timer.h>
  26. #include <linux/init.h>
  27. #include <linux/tty.h>
  28. #include <linux/console.h>
  29. #include <linux/serial_core.h>
  30. #include <linux/serial.h>
  31. #include <asm/mach/arch.h>
  32. #include <asm/mach/map.h>
  33. #include <asm/mach/irq.h>
  34. #include <asm/hardware.h>
  35. #include <asm/hardware/iomd.h>
  36. #include <asm/io.h>
  37. #include <asm/irq.h>
  38. #include <asm/mach-types.h>
  39. #include <asm/arch/regs-serial.h>
  40. #include <asm/arch/regs-gpio.h>
  41. #include "clock.h"
  42. #include "devs.h"
  43. #include "cpu.h"
  44. #include "pm.h"
  45. static struct map_desc rx3715_iodesc[] __initdata = {
  46. /* dump ISA space somewhere unused */
  47. { (u32)S3C24XX_VA_ISA_WORD, S3C2410_CS3, SZ_16M, MT_DEVICE },
  48. { (u32)S3C24XX_VA_ISA_BYTE, S3C2410_CS3, SZ_16M, MT_DEVICE },
  49. };
  50. static struct s3c24xx_uart_clksrc rx3715_serial_clocks[] = {
  51. [0] = {
  52. .name = "fclk",
  53. .divisor = 0,
  54. .min_baud = 0,
  55. .max_baud = 0,
  56. }
  57. };
  58. static struct s3c2410_uartcfg rx3715_uartcfgs[] = {
  59. [0] = {
  60. .hwport = 0,
  61. .flags = 0,
  62. .ucon = 0x3c5,
  63. .ulcon = 0x03,
  64. .ufcon = 0x51,
  65. .clocks = rx3715_serial_clocks,
  66. .clocks_size = ARRAY_SIZE(rx3715_serial_clocks),
  67. },
  68. [1] = {
  69. .hwport = 1,
  70. .flags = 0,
  71. .ucon = 0x3c5,
  72. .ulcon = 0x03,
  73. .ufcon = 0x00,
  74. .clocks = rx3715_serial_clocks,
  75. .clocks_size = ARRAY_SIZE(rx3715_serial_clocks),
  76. },
  77. /* IR port */
  78. [2] = {
  79. .hwport = 2,
  80. .uart_flags = UPF_CONS_FLOW,
  81. .ucon = 0x3c5,
  82. .ulcon = 0x43,
  83. .ufcon = 0x51,
  84. .clocks = rx3715_serial_clocks,
  85. .clocks_size = ARRAY_SIZE(rx3715_serial_clocks),
  86. }
  87. };
  88. static struct platform_device *rx3715_devices[] __initdata = {
  89. &s3c_device_usb,
  90. &s3c_device_lcd,
  91. &s3c_device_wdt,
  92. &s3c_device_i2c,
  93. &s3c_device_iis,
  94. };
  95. static struct s3c24xx_board rx3715_board __initdata = {
  96. .devices = rx3715_devices,
  97. .devices_count = ARRAY_SIZE(rx3715_devices)
  98. };
  99. static void __init rx3715_map_io(void)
  100. {
  101. s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
  102. s3c24xx_init_clocks(16934000);
  103. s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
  104. s3c24xx_set_board(&rx3715_board);
  105. }
  106. static void __init rx3715_init_irq(void)
  107. {
  108. s3c24xx_init_irq();
  109. }
  110. #ifdef CONFIG_PM
  111. static void __init rx3715_init_machine(void)
  112. {
  113. s3c2410_pm_init();
  114. }
  115. #else
  116. #define rx3715_init_machine NULL
  117. #endif
  118. MACHINE_START(RX3715, "IPAQ-RX3715")
  119. /* Maintainer: Ben Dooks <ben@fluff.org> */
  120. .phys_ram = S3C2410_SDRAM_PA,
  121. .phys_io = S3C2410_PA_UART,
  122. .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
  123. .boot_params = S3C2410_SDRAM_PA + 0x100,
  124. .map_io = rx3715_map_io,
  125. .init_irq = rx3715_init_irq,
  126. .init_machine = rx3715_init_machine,
  127. .timer = &s3c24xx_timer,
  128. MACHINE_END