s3c6400.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // SPDX-License-Identifier: GPL-2.0
  2. //
  3. // Copyright 2009 Simtec Electronics
  4. // Ben Dooks <ben@simtec.co.uk>
  5. // http://armlinux.simtec.co.uk/
  6. /*
  7. * NOTE: Code in this file is not used when booting with Device Tree support.
  8. */
  9. #include <linux/kernel.h>
  10. #include <linux/types.h>
  11. #include <linux/interrupt.h>
  12. #include <linux/list.h>
  13. #include <linux/timer.h>
  14. #include <linux/init.h>
  15. #include <linux/clk.h>
  16. #include <linux/io.h>
  17. #include <linux/device.h>
  18. #include <linux/serial_core.h>
  19. #include <linux/serial_s3c.h>
  20. #include <linux/platform_device.h>
  21. #include <linux/of.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 <mach/regs-clock.h>
  29. #include <plat/cpu.h>
  30. #include <plat/devs.h>
  31. #include <plat/sdhci.h>
  32. #include <plat/iic-core.h>
  33. #include "common.h"
  34. #include "onenand-core.h"
  35. void __init s3c6400_map_io(void)
  36. {
  37. /* setup SDHCI */
  38. s3c6400_default_sdhci0();
  39. s3c6400_default_sdhci1();
  40. s3c6400_default_sdhci2();
  41. /* the i2c devices are directly compatible with s3c2440 */
  42. s3c_i2c0_setname("s3c2440-i2c");
  43. s3c_device_nand.name = "s3c6400-nand";
  44. s3c_onenand_setname("s3c6400-onenand");
  45. s3c64xx_onenand1_setname("s3c6400-onenand");
  46. }
  47. void __init s3c6400_init_irq(void)
  48. {
  49. /* VIC0 does not have IRQS 5..7,
  50. * VIC1 is fully populated. */
  51. s3c64xx_init_irq(~0 & ~(0xf << 5), ~0);
  52. }
  53. static struct bus_type s3c6400_subsys = {
  54. .name = "s3c6400-core",
  55. .dev_name = "s3c6400-core",
  56. };
  57. static struct device s3c6400_dev = {
  58. .bus = &s3c6400_subsys,
  59. };
  60. static int __init s3c6400_core_init(void)
  61. {
  62. /* Not applicable when using DT. */
  63. if (of_have_populated_dt() || soc_is_s3c64xx())
  64. return 0;
  65. return subsys_system_register(&s3c6400_subsys, NULL);
  66. }
  67. core_initcall(s3c6400_core_init);
  68. int __init s3c6400_init(void)
  69. {
  70. printk("S3C6400: Initialising architecture\n");
  71. return device_register(&s3c6400_dev);
  72. }