mach-smdk2413.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /* linux/arch/arm/mach-s3c2410/mach-smdk2413.c
  2. *
  3. * Copyright (c) 2006 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  5. *
  6. * Thanks to Dimity Andric (TomTom) and Steven Ryu (Samsung) for the
  7. * loans of SMDK2413 to work with.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #include <linux/kernel.h>
  14. #include <linux/types.h>
  15. #include <linux/interrupt.h>
  16. #include <linux/list.h>
  17. #include <linux/timer.h>
  18. #include <linux/init.h>
  19. #include <linux/platform_device.h>
  20. #include <asm/mach/arch.h>
  21. #include <asm/mach/map.h>
  22. #include <asm/mach/irq.h>
  23. #include <asm/hardware.h>
  24. #include <asm/hardware/iomd.h>
  25. #include <asm/setup.h>
  26. #include <asm/io.h>
  27. #include <asm/irq.h>
  28. #include <asm/mach-types.h>
  29. //#include <asm/debug-ll.h>
  30. #include <asm/arch/regs-serial.h>
  31. #include <asm/arch/regs-gpio.h>
  32. #include <asm/arch/regs-lcd.h>
  33. #include <asm/arch/idle.h>
  34. #include <asm/arch/fb.h>
  35. #include "s3c2410.h"
  36. #include "s3c2412.h"
  37. #include "clock.h"
  38. #include "devs.h"
  39. #include "cpu.h"
  40. #include "common-smdk.h"
  41. static struct map_desc smdk2413_iodesc[] __initdata = {
  42. };
  43. static struct s3c2410_uartcfg smdk2413_uartcfgs[] __initdata = {
  44. [0] = {
  45. .hwport = 0,
  46. .flags = 0,
  47. .ucon = 0x3c5,
  48. .ulcon = 0x03,
  49. .ufcon = 0x51,
  50. },
  51. [1] = {
  52. .hwport = 1,
  53. .flags = 0,
  54. .ucon = 0x3c5,
  55. .ulcon = 0x03,
  56. .ufcon = 0x51,
  57. },
  58. /* IR port */
  59. [2] = {
  60. .hwport = 2,
  61. .flags = 0,
  62. .ucon = 0x3c5,
  63. .ulcon = 0x43,
  64. .ufcon = 0x51,
  65. }
  66. };
  67. static struct platform_device *smdk2413_devices[] __initdata = {
  68. &s3c_device_usb,
  69. //&s3c_device_lcd,
  70. &s3c_device_wdt,
  71. &s3c_device_i2c,
  72. &s3c_device_iis,
  73. };
  74. static struct s3c24xx_board smdk2413_board __initdata = {
  75. .devices = smdk2413_devices,
  76. .devices_count = ARRAY_SIZE(smdk2413_devices)
  77. };
  78. static void __init smdk2413_fixup(struct machine_desc *desc,
  79. struct tag *tags, char **cmdline,
  80. struct meminfo *mi)
  81. {
  82. if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) {
  83. mi->nr_banks=1;
  84. mi->bank[0].start = 0x30000000;
  85. mi->bank[0].size = SZ_64M;
  86. mi->bank[0].node = 0;
  87. }
  88. }
  89. static void __init smdk2413_map_io(void)
  90. {
  91. s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc));
  92. s3c24xx_init_clocks(12000000);
  93. s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs));
  94. s3c24xx_set_board(&smdk2413_board);
  95. }
  96. static void __init smdk2413_machine_init(void)
  97. {
  98. smdk_machine_init();
  99. }
  100. MACHINE_START(S3C2413, "S3C2413")
  101. /* Maintainer: Ben Dooks <ben@fluff.org> */
  102. .phys_io = S3C2410_PA_UART,
  103. .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
  104. .boot_params = S3C2410_SDRAM_PA + 0x100,
  105. .fixup = smdk2413_fixup,
  106. .init_irq = s3c24xx_init_irq,
  107. .map_io = smdk2413_map_io,
  108. .init_machine = smdk2413_machine_init,
  109. .timer = &s3c24xx_timer,
  110. MACHINE_END
  111. MACHINE_START(SMDK2413, "SMDK2413")
  112. /* Maintainer: Ben Dooks <ben@fluff.org> */
  113. .phys_io = S3C2410_PA_UART,
  114. .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
  115. .boot_params = S3C2410_SDRAM_PA + 0x100,
  116. .fixup = smdk2413_fixup,
  117. .init_irq = s3c24xx_init_irq,
  118. .map_io = smdk2413_map_io,
  119. .init_machine = smdk2413_machine_init,
  120. .timer = &s3c24xx_timer,
  121. MACHINE_END