s3c6410.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // SPDX-License-Identifier: GPL-2.0
  2. //
  3. // Copyright 2008 Simtec Electronics
  4. // Copyright 2008 Simtec Electronics
  5. // Ben Dooks <[email protected]>
  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 <asm/irq.h>
  27. #include <linux/soc/samsung/s3c-pm.h>
  28. #include "regs-clock.h"
  29. #include "cpu.h"
  30. #include "devs.h"
  31. #include "sdhci.h"
  32. #include "adc-core.h"
  33. #include "iic-core.h"
  34. #include "ata-core-s3c64xx.h"
  35. #include "s3c64xx.h"
  36. #include "onenand-core-s3c64xx.h"
  37. void __init s3c6410_map_io(void)
  38. {
  39. /* initialise device information early */
  40. s3c6410_default_sdhci0();
  41. s3c6410_default_sdhci1();
  42. s3c6410_default_sdhci2();
  43. /* the i2c devices are directly compatible with s3c2440 */
  44. s3c_i2c0_setname("s3c2440-i2c");
  45. s3c_i2c1_setname("s3c2440-i2c");
  46. s3c_adc_setname("s3c64xx-adc");
  47. s3c_device_nand.name = "s3c6400-nand";
  48. s3c_onenand_setname("s3c6410-onenand");
  49. s3c64xx_onenand1_setname("s3c6410-onenand");
  50. s3c_cfcon_setname("s3c64xx-pata");
  51. }
  52. void __init s3c6410_init_irq(void)
  53. {
  54. /* VIC0 is missing IRQ7, VIC1 is fully populated. */
  55. s3c64xx_init_irq(~0 & ~(1 << 7), ~0);
  56. }
  57. struct bus_type s3c6410_subsys = {
  58. .name = "s3c6410-core",
  59. .dev_name = "s3c6410-core",
  60. };
  61. static struct device s3c6410_dev = {
  62. .bus = &s3c6410_subsys,
  63. };
  64. static int __init s3c6410_core_init(void)
  65. {
  66. /* Not applicable when using DT. */
  67. if (of_have_populated_dt() || !soc_is_s3c64xx())
  68. return 0;
  69. return subsys_system_register(&s3c6410_subsys, NULL);
  70. }
  71. core_initcall(s3c6410_core_init);
  72. int __init s3c6410_init(void)
  73. {
  74. printk("S3C6410: Initialising architecture\n");
  75. return device_register(&s3c6410_dev);
  76. }