s3c2442.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* linux/arch/arm/mach-s3c2442/s3c2442.c
  2. *
  3. * Copyright (c) 2004-2005 Simtec Electronics
  4. * http://armlinux.simtec.co.uk/
  5. * Ben Dooks <ben@simtec.co.uk>
  6. *
  7. * S3C2442 core and lock support
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  22. */
  23. #include <linux/init.h>
  24. #include <linux/module.h>
  25. #include <linux/kernel.h>
  26. #include <linux/list.h>
  27. #include <linux/errno.h>
  28. #include <linux/err.h>
  29. #include <linux/device.h>
  30. #include <linux/syscore_ops.h>
  31. #include <linux/interrupt.h>
  32. #include <linux/ioport.h>
  33. #include <linux/mutex.h>
  34. #include <linux/gpio.h>
  35. #include <linux/clk.h>
  36. #include <linux/io.h>
  37. #include <mach/hardware.h>
  38. #include <mach/gpio-samsung.h>
  39. #include <linux/atomic.h>
  40. #include <asm/irq.h>
  41. #include <mach/regs-clock.h>
  42. #include <plat/cpu.h>
  43. #include <plat/pm.h>
  44. #include <plat/gpio-core.h>
  45. #include <plat/gpio-cfg.h>
  46. #include <plat/gpio-cfg-helpers.h>
  47. #include "common.h"
  48. static struct device s3c2442_dev = {
  49. .bus = &s3c2442_subsys,
  50. };
  51. int __init s3c2442_init(void)
  52. {
  53. printk("S3C2442: Initialising architecture\n");
  54. #ifdef CONFIG_PM_SLEEP
  55. register_syscore_ops(&s3c2410_pm_syscore_ops);
  56. register_syscore_ops(&s3c24xx_irq_syscore_ops);
  57. register_syscore_ops(&s3c244x_pm_syscore_ops);
  58. #endif
  59. return device_register(&s3c2442_dev);
  60. }
  61. void __init s3c2442_map_io(void)
  62. {
  63. s3c244x_map_io();
  64. s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1down;
  65. s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1down;
  66. }