mach-smdk6400.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* linux/arch/arm/mach-s3c6400/mach-smdk6400.c
  2. *
  3. * Copyright 2008 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  5. * http://armlinux.simtec.co.uk/
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/types.h>
  13. #include <linux/interrupt.h>
  14. #include <linux/list.h>
  15. #include <linux/timer.h>
  16. #include <linux/init.h>
  17. #include <linux/serial_core.h>
  18. #include <linux/platform_device.h>
  19. #include <linux/i2c.h>
  20. #include <linux/io.h>
  21. #include <asm/mach-types.h>
  22. #include <asm/mach/arch.h>
  23. #include <asm/mach/map.h>
  24. #include <asm/mach/irq.h>
  25. #include <mach/hardware.h>
  26. #include <mach/map.h>
  27. #include <plat/regs-serial.h>
  28. #include <plat/s3c6400.h>
  29. #include <plat/clock.h>
  30. #include <plat/devs.h>
  31. #include <plat/cpu.h>
  32. #include <plat/iic.h>
  33. #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
  34. #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
  35. #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
  36. static struct s3c2410_uartcfg smdk6400_uartcfgs[] __initdata = {
  37. [0] = {
  38. .hwport = 0,
  39. .flags = 0,
  40. .ucon = 0x3c5,
  41. .ulcon = 0x03,
  42. .ufcon = 0x51,
  43. },
  44. [1] = {
  45. .hwport = 1,
  46. .flags = 0,
  47. .ucon = 0x3c5,
  48. .ulcon = 0x03,
  49. .ufcon = 0x51,
  50. },
  51. };
  52. static struct map_desc smdk6400_iodesc[] = {};
  53. static void __init smdk6400_map_io(void)
  54. {
  55. s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc));
  56. s3c24xx_init_clocks(12000000);
  57. s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs));
  58. }
  59. static struct platform_device *smdk6400_devices[] __initdata = {
  60. &s3c_device_hsmmc1,
  61. &s3c_device_i2c0,
  62. };
  63. static struct i2c_board_info i2c_devs[] __initdata = {
  64. { I2C_BOARD_INFO("wm8753", 0x1A), },
  65. { I2C_BOARD_INFO("24c08", 0x50), },
  66. };
  67. static void __init smdk6400_machine_init(void)
  68. {
  69. i2c_register_board_info(0, i2c_devs, ARRAY_SIZE(i2c_devs));
  70. platform_add_devices(smdk6400_devices, ARRAY_SIZE(smdk6400_devices));
  71. }
  72. MACHINE_START(SMDK6400, "SMDK6400")
  73. /* Maintainer: Ben Dooks <ben@fluff.org> */
  74. .phys_io = S3C_PA_UART & 0xfff00000,
  75. .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
  76. .boot_params = S3C64XX_PA_SDRAM + 0x100,
  77. .init_irq = s3c6400_init_irq,
  78. .map_io = smdk6400_map_io,
  79. .init_machine = smdk6400_machine_init,
  80. .timer = &s3c24xx_timer,
  81. MACHINE_END