s3c6400.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // SPDX-License-Identifier: GPL-2.0
  2. //
  3. // Copyright 2009 Simtec Electronics
  4. // Ben Dooks <[email protected]>
  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 <asm/irq.h>
  26. #include "regs-clock.h"
  27. #include "cpu.h"
  28. #include "devs.h"
  29. #include "sdhci.h"
  30. #include "iic-core.h"
  31. #include "s3c64xx.h"
  32. #include "onenand-core-s3c64xx.h"
  33. void __init s3c6400_map_io(void)
  34. {
  35. /* setup SDHCI */
  36. s3c6400_default_sdhci0();
  37. s3c6400_default_sdhci1();
  38. s3c6400_default_sdhci2();
  39. /* the i2c devices are directly compatible with s3c2440 */
  40. s3c_i2c0_setname("s3c2440-i2c");
  41. s3c_device_nand.name = "s3c6400-nand";
  42. s3c_onenand_setname("s3c6400-onenand");
  43. s3c64xx_onenand1_setname("s3c6400-onenand");
  44. }
  45. void __init s3c6400_init_irq(void)
  46. {
  47. /* VIC0 does not have IRQS 5..7,
  48. * VIC1 is fully populated. */
  49. s3c64xx_init_irq(~0 & ~(0xf << 5), ~0);
  50. }
  51. static struct bus_type s3c6400_subsys = {
  52. .name = "s3c6400-core",
  53. .dev_name = "s3c6400-core",
  54. };
  55. static struct device s3c6400_dev = {
  56. .bus = &s3c6400_subsys,
  57. };
  58. static int __init s3c6400_core_init(void)
  59. {
  60. /* Not applicable when using DT. */
  61. if (of_have_populated_dt() || soc_is_s3c64xx())
  62. return 0;
  63. return subsys_system_register(&s3c6400_subsys, NULL);
  64. }
  65. core_initcall(s3c6400_core_init);
  66. int __init s3c6400_init(void)
  67. {
  68. printk("S3C6400: Initialising architecture\n");
  69. return device_register(&s3c6400_dev);
  70. }