cpu.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /* linux/arch/arm/mach-s5pc100/cpu.c
  2. *
  3. * Copyright 2009 Samsung Electronics Co.
  4. * Byungho Min <bhmin@samsung.com>
  5. *
  6. * Based on mach-s3c6410/cpu.c
  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 <mach/map.h>
  28. #include <asm/irq.h>
  29. #include <plat/cpu-freq.h>
  30. #include <plat/regs-serial.h>
  31. #include <plat/cpu.h>
  32. #include <plat/devs.h>
  33. #include <plat/clock.h>
  34. #include <plat/sdhci.h>
  35. #include <plat/iic-core.h>
  36. #include <plat/s5pc100.h>
  37. /* Initial IO mappings */
  38. static struct map_desc s5pc100_iodesc[] __initdata = {
  39. };
  40. /* s5pc100_map_io
  41. *
  42. * register the standard cpu IO areas
  43. */
  44. void __init s5pc100_map_io(void)
  45. {
  46. iotable_init(s5pc100_iodesc, ARRAY_SIZE(s5pc100_iodesc));
  47. /* initialise device information early */
  48. }
  49. void __init s5pc100_init_clocks(int xtal)
  50. {
  51. printk(KERN_DEBUG "%s: initialising clocks\n", __func__);
  52. s3c24xx_register_baseclocks(xtal);
  53. s5pc1xx_register_clocks();
  54. s5pc100_register_clocks();
  55. s5pc100_setup_clocks();
  56. }
  57. void __init s5pc100_init_irq(void)
  58. {
  59. u32 vic_valid[] = {~0, ~0, ~0};
  60. /* VIC0, VIC1, and VIC2 are fully populated. */
  61. s5pc1xx_init_irq(vic_valid, ARRAY_SIZE(vic_valid));
  62. }
  63. struct sysdev_class s5pc100_sysclass = {
  64. .name = "s5pc100-core",
  65. };
  66. static struct sys_device s5pc100_sysdev = {
  67. .cls = &s5pc100_sysclass,
  68. };
  69. static int __init s5pc100_core_init(void)
  70. {
  71. return sysdev_class_register(&s5pc100_sysclass);
  72. }
  73. core_initcall(s5pc100_core_init);
  74. int __init s5pc100_init(void)
  75. {
  76. printk(KERN_DEBUG "S5PC100: Initialising architecture\n");
  77. return sysdev_register(&s5pc100_sysdev);
  78. }