s3c6410.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* linux/arch/arm/mach-s3c64xx/s3c6410.c
  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. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. /*
  13. * NOTE: Code in this file is not used when booting with Device Tree support.
  14. */
  15. #include <linux/kernel.h>
  16. #include <linux/types.h>
  17. #include <linux/interrupt.h>
  18. #include <linux/list.h>
  19. #include <linux/timer.h>
  20. #include <linux/init.h>
  21. #include <linux/clk.h>
  22. #include <linux/io.h>
  23. #include <linux/device.h>
  24. #include <linux/serial_core.h>
  25. #include <linux/platform_device.h>
  26. #include <linux/of.h>
  27. #include <asm/mach/arch.h>
  28. #include <asm/mach/map.h>
  29. #include <asm/mach/irq.h>
  30. #include <mach/hardware.h>
  31. #include <asm/irq.h>
  32. #include <plat/cpu-freq.h>
  33. #include <plat/regs-serial.h>
  34. #include <mach/regs-clock.h>
  35. #include <plat/cpu.h>
  36. #include <plat/devs.h>
  37. #include <plat/clock.h>
  38. #include <plat/sdhci.h>
  39. #include <plat/ata-core.h>
  40. #include <plat/adc-core.h>
  41. #include <plat/iic-core.h>
  42. #include <plat/onenand-core.h>
  43. #include "common.h"
  44. void __init s3c6410_map_io(void)
  45. {
  46. /* initialise device information early */
  47. s3c6410_default_sdhci0();
  48. s3c6410_default_sdhci1();
  49. s3c6410_default_sdhci2();
  50. /* the i2c devices are directly compatible with s3c2440 */
  51. s3c_i2c0_setname("s3c2440-i2c");
  52. s3c_i2c1_setname("s3c2440-i2c");
  53. s3c_adc_setname("s3c64xx-adc");
  54. s3c_device_nand.name = "s3c6400-nand";
  55. s3c_onenand_setname("s3c6410-onenand");
  56. s3c64xx_onenand1_setname("s3c6410-onenand");
  57. s3c_cfcon_setname("s3c64xx-pata");
  58. }
  59. void __init s3c6410_init_irq(void)
  60. {
  61. /* VIC0 is missing IRQ7, VIC1 is fully populated. */
  62. s3c64xx_init_irq(~0 & ~(1 << 7), ~0);
  63. }
  64. struct bus_type s3c6410_subsys = {
  65. .name = "s3c6410-core",
  66. .dev_name = "s3c6410-core",
  67. };
  68. static struct device s3c6410_dev = {
  69. .bus = &s3c6410_subsys,
  70. };
  71. static int __init s3c6410_core_init(void)
  72. {
  73. /* Not applicable when using DT. */
  74. if (of_have_populated_dt())
  75. return 0;
  76. return subsys_system_register(&s3c6410_subsys, NULL);
  77. }
  78. core_initcall(s3c6410_core_init);
  79. int __init s3c6410_init(void)
  80. {
  81. printk("S3C6410: Initialising architecture\n");
  82. return device_register(&s3c6410_dev);
  83. }