s3c6400.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* linux/arch/arm/mach-s3c64xx/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/device.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 <mach/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/onenand-core.h>
  36. #include "common.h"
  37. void __init s3c6400_map_io(void)
  38. {
  39. /* setup SDHCI */
  40. s3c6400_default_sdhci0();
  41. s3c6400_default_sdhci1();
  42. s3c6400_default_sdhci2();
  43. /* the i2c devices are directly compatible with s3c2440 */
  44. s3c_i2c0_setname("s3c2440-i2c");
  45. s3c_device_nand.name = "s3c6400-nand";
  46. s3c_onenand_setname("s3c6400-onenand");
  47. s3c64xx_onenand1_setname("s3c6400-onenand");
  48. }
  49. void __init s3c6400_init_clocks(int xtal)
  50. {
  51. s3c64xx_register_clocks(xtal, S3C6400_CLKDIV0_ARM_MASK);
  52. s3c64xx_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. static struct bus_type s3c6400_subsys = {
  61. .name = "s3c6400-core",
  62. .dev_name = "s3c6400-core",
  63. };
  64. static struct device s3c6400_dev = {
  65. .bus = &s3c6400_subsys,
  66. };
  67. static int __init s3c6400_core_init(void)
  68. {
  69. return subsys_system_register(&s3c6400_subsys, NULL);
  70. }
  71. core_initcall(s3c6400_core_init);
  72. int __init s3c6400_init(void)
  73. {
  74. printk("S3C6400: Initialising architecture\n");
  75. return device_register(&s3c6400_dev);
  76. }