s3c6400.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /* linux/arch/arm/mach-s3c6410/cpu.c
  2. *
  3. * Copyright 2009 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/clk.h>
  18. #include <linux/io.h>
  19. #include <linux/sysdev.h>
  20. #include <linux/serial_core.h>
  21. #include <linux/platform_device.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 <asm/irq.h>
  27. #include <plat/cpu-freq.h>
  28. #include <plat/regs-serial.h>
  29. #include <plat/regs-clock.h>
  30. #include <plat/cpu.h>
  31. #include <plat/devs.h>
  32. #include <plat/clock.h>
  33. #include <plat/sdhci.h>
  34. #include <plat/iic-core.h>
  35. #include <plat/s3c6400.h>
  36. void __init s3c6400_map_io(void)
  37. {
  38. /* setup SDHCI */
  39. s3c6400_default_sdhci0();
  40. s3c6400_default_sdhci1();
  41. s3c6400_default_sdhci2();
  42. /* the i2c devices are directly compatible with s3c2440 */
  43. s3c_i2c0_setname("s3c2440-i2c");
  44. s3c_device_nand.name = "s3c6400-nand";
  45. }
  46. void __init s3c6400_init_clocks(int xtal)
  47. {
  48. printk(KERN_DEBUG "%s: initialising clocks\n", __func__);
  49. s3c24xx_register_baseclocks(xtal);
  50. s3c64xx_register_clocks();
  51. s3c6400_register_clocks(S3C6400_CLKDIV0_ARM_MASK);
  52. s3c6400_setup_clocks();
  53. }
  54. void __init s3c6400_init_irq(void)
  55. {
  56. /* VIC0 does not have IRQS 5..7,
  57. * VIC1 is fully populated. */
  58. s3c64xx_init_irq(~0 & ~(0xf << 5), ~0);
  59. }
  60. struct sysdev_class s3c6400_sysclass = {
  61. .name = "s3c6400-core",
  62. };
  63. static struct sys_device s3c6400_sysdev = {
  64. .cls = &s3c6400_sysclass,
  65. };
  66. static int __init s3c6400_core_init(void)
  67. {
  68. return sysdev_class_register(&s3c6400_sysclass);
  69. }
  70. core_initcall(s3c6400_core_init);
  71. int __init s3c6400_init(void)
  72. {
  73. printk("S3C6400: Initialising architecture\n");
  74. return sysdev_register(&s3c6400_sysdev);
  75. }