s3c6400.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. /*
  12. * NOTE: Code in this file is not used when booting with Device Tree support.
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/types.h>
  16. #include <linux/interrupt.h>
  17. #include <linux/list.h>
  18. #include <linux/timer.h>
  19. #include <linux/init.h>
  20. #include <linux/clk.h>
  21. #include <linux/io.h>
  22. #include <linux/device.h>
  23. #include <linux/serial_core.h>
  24. #include <linux/serial_s3c.h>
  25. #include <linux/platform_device.h>
  26. #include <linux/of.h>
  27. #include <asm/mach/arch.h>
  28. #include <asm/mach/map.h>
  29. #include <asm/mach/irq.h>
  30. #include <mach/hardware.h>
  31. #include <asm/irq.h>
  32. #include <plat/cpu-freq.h>
  33. #include <mach/regs-clock.h>
  34. #include <plat/cpu.h>
  35. #include <plat/devs.h>
  36. #include <plat/sdhci.h>
  37. #include <plat/iic-core.h>
  38. #include "common.h"
  39. #include "onenand-core.h"
  40. void __init s3c6400_map_io(void)
  41. {
  42. /* setup SDHCI */
  43. s3c6400_default_sdhci0();
  44. s3c6400_default_sdhci1();
  45. s3c6400_default_sdhci2();
  46. /* the i2c devices are directly compatible with s3c2440 */
  47. s3c_i2c0_setname("s3c2440-i2c");
  48. s3c_device_nand.name = "s3c6400-nand";
  49. s3c_onenand_setname("s3c6400-onenand");
  50. s3c64xx_onenand1_setname("s3c6400-onenand");
  51. }
  52. void __init s3c6400_init_irq(void)
  53. {
  54. /* VIC0 does not have IRQS 5..7,
  55. * VIC1 is fully populated. */
  56. s3c64xx_init_irq(~0 & ~(0xf << 5), ~0);
  57. }
  58. static struct bus_type s3c6400_subsys = {
  59. .name = "s3c6400-core",
  60. .dev_name = "s3c6400-core",
  61. };
  62. static struct device s3c6400_dev = {
  63. .bus = &s3c6400_subsys,
  64. };
  65. static int __init s3c6400_core_init(void)
  66. {
  67. /* Not applicable when using DT. */
  68. if (of_have_populated_dt() || soc_is_s3c64xx())
  69. return 0;
  70. return subsys_system_register(&s3c6400_subsys, NULL);
  71. }
  72. core_initcall(s3c6400_core_init);
  73. int __init s3c6400_init(void)
  74. {
  75. printk("S3C6400: Initialising architecture\n");
  76. return device_register(&s3c6400_dev);
  77. }