cpu.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* linux/include/asm-arm/plat-s3c24xx/cpu.h
  2. *
  3. * Copyright (c) 2004-2005 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  5. *
  6. * Header file for S3C24XX CPU support
  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. /* todo - fix when rmk changes iodescs to use `void __iomem *` */
  13. #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
  14. #ifndef MHZ
  15. #define MHZ (1000*1000)
  16. #endif
  17. #define print_mhz(m) ((m) / MHZ), ((m / 1000) % 1000)
  18. /* forward declaration */
  19. struct s3c24xx_uart_resources;
  20. struct platform_device;
  21. struct s3c2410_uartcfg;
  22. struct map_desc;
  23. /* core initialisation functions */
  24. #if defined (CONFIG_CPU_S3C6400) || defined (CONFIG_CPU_S3C6410)
  25. extern void s3c_init_irq(void);
  26. #endif
  27. extern void s3c24xx_init_irq(void);
  28. extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
  29. extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
  30. extern void s3c24xx_init_clocks(int xtal);
  31. extern void s3c24xx_init_uartdevs(char *name,
  32. struct s3c24xx_uart_resources *res,
  33. struct s3c2410_uartcfg *cfg, int no);
  34. /* the board structure is used at first initialsation time
  35. * to get info such as the devices to register for this
  36. * board. This is done because platfrom_add_devices() cannot
  37. * be called from the map_io entry.
  38. */
  39. struct s3c24xx_board {
  40. struct platform_device **devices;
  41. unsigned int devices_count;
  42. struct clk **clocks;
  43. unsigned int clocks_count;
  44. };
  45. extern void s3c24xx_set_board(struct s3c24xx_board *board);
  46. /* timer for 2410/2440 */
  47. struct sys_timer;
  48. extern struct sys_timer s3c24xx_timer;
  49. /* system device classes */
  50. extern struct sysdev_class s3c2410_sysclass;
  51. extern struct sysdev_class s3c2412_sysclass;
  52. extern struct sysdev_class s3c2416_sysclass;
  53. extern struct sysdev_class s3c2440_sysclass;
  54. extern struct sysdev_class s3c2442_sysclass;
  55. extern struct sysdev_class s3c2443_sysclass;
  56. extern struct sysdev_class s3c2450_sysclass;
  57. extern struct sysdev_class s3c6400_sysclass;