s3c6410.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // SPDX-License-Identifier: GPL-2.0
  2. //
  3. // Copyright 2008 Simtec Electronics
  4. // Copyright 2008 Simtec Electronics
  5. // Ben Dooks <ben@simtec.co.uk>
  6. // http://armlinux.simtec.co.uk/
  7. /*
  8. * NOTE: Code in this file is not used when booting with Device Tree support.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/types.h>
  12. #include <linux/interrupt.h>
  13. #include <linux/list.h>
  14. #include <linux/timer.h>
  15. #include <linux/init.h>
  16. #include <linux/clk.h>
  17. #include <linux/io.h>
  18. #include <linux/device.h>
  19. #include <linux/serial_core.h>
  20. #include <linux/serial_s3c.h>
  21. #include <linux/platform_device.h>
  22. #include <linux/of.h>
  23. #include <asm/mach/arch.h>
  24. #include <asm/mach/map.h>
  25. #include <asm/mach/irq.h>
  26. #include <mach/hardware.h>
  27. #include <asm/irq.h>
  28. #include <plat/cpu-freq.h>
  29. #include <mach/regs-clock.h>
  30. #include <plat/cpu.h>
  31. #include <plat/devs.h>
  32. #include <plat/sdhci.h>
  33. #include <plat/adc-core.h>
  34. #include <plat/iic-core.h>
  35. #include "ata-core.h"
  36. #include "common.h"
  37. #include "onenand-core.h"
  38. void __init s3c6410_map_io(void)
  39. {
  40. /* initialise device information early */
  41. s3c6410_default_sdhci0();
  42. s3c6410_default_sdhci1();
  43. s3c6410_default_sdhci2();
  44. /* the i2c devices are directly compatible with s3c2440 */
  45. s3c_i2c0_setname("s3c2440-i2c");
  46. s3c_i2c1_setname("s3c2440-i2c");
  47. s3c_adc_setname("s3c64xx-adc");
  48. s3c_device_nand.name = "s3c6400-nand";
  49. s3c_onenand_setname("s3c6410-onenand");
  50. s3c64xx_onenand1_setname("s3c6410-onenand");
  51. s3c_cfcon_setname("s3c64xx-pata");
  52. }
  53. void __init s3c6410_init_irq(void)
  54. {
  55. /* VIC0 is missing IRQ7, VIC1 is fully populated. */
  56. s3c64xx_init_irq(~0 & ~(1 << 7), ~0);
  57. }
  58. struct bus_type s3c6410_subsys = {
  59. .name = "s3c6410-core",
  60. .dev_name = "s3c6410-core",
  61. };
  62. static struct device s3c6410_dev = {
  63. .bus = &s3c6410_subsys,
  64. };
  65. static int __init s3c6410_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(&s3c6410_subsys, NULL);
  71. }
  72. core_initcall(s3c6410_core_init);
  73. int __init s3c6410_init(void)
  74. {
  75. printk("S3C6410: Initialising architecture\n");
  76. return device_register(&s3c6410_dev);
  77. }