cpu.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* linux/arch/arm/mach-s3c6410/cpu.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. #include <linux/kernel.h>
  13. #include <linux/types.h>
  14. #include <linux/interrupt.h>
  15. #include <linux/list.h>
  16. #include <linux/timer.h>
  17. #include <linux/init.h>
  18. #include <linux/clk.h>
  19. #include <linux/io.h>
  20. #include <linux/sysdev.h>
  21. #include <linux/serial_core.h>
  22. #include <linux/platform_device.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 <plat/regs-serial.h>
  30. #include <plat/cpu.h>
  31. #include <plat/devs.h>
  32. #include <plat/clock.h>
  33. #include <plat/s3c6400.h>
  34. #include <plat/s3c6410.h>
  35. /* Initial IO mappings */
  36. static struct map_desc s3c6410_iodesc[] __initdata = {
  37. };
  38. /* s3c6410_map_io
  39. *
  40. * register the standard cpu IO areas
  41. */
  42. void __init s3c6410_map_io(void)
  43. {
  44. iotable_init(s3c6410_iodesc, ARRAY_SIZE(s3c6410_iodesc));
  45. }
  46. void __init s3c6410_init_clocks(int xtal)
  47. {
  48. printk(KERN_DEBUG "%s: initialising clocks\n", __func__);
  49. s3c24xx_register_baseclocks(xtal);
  50. s3c64xx_register_clocks();
  51. s3c6400_register_clocks();
  52. s3c6400_setup_clocks();
  53. }
  54. void __init s3c6410_init_irq(void)
  55. {
  56. /* VIC0 is missing IRQ7, VIC1 is fully populated. */
  57. s3c64xx_init_irq(~0 & ~(1 << 7), ~0);
  58. }
  59. struct sysdev_class s3c6410_sysclass = {
  60. .name = "s3c6410-core",
  61. };
  62. static struct sys_device s3c6410_sysdev = {
  63. .cls = &s3c6410_sysclass,
  64. };
  65. static int __init s3c6410_core_init(void)
  66. {
  67. return sysdev_class_register(&s3c6410_sysclass);
  68. }
  69. core_initcall(s3c6410_core_init);
  70. int __init s3c6410_init(void)
  71. {
  72. printk("S3C6410: Initialising architecture\n");
  73. return sysdev_register(&s3c6410_sysdev);
  74. }