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