cpu.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* linux/arch/arm/plat-s3c/include/plat/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. /* per-cpu initialisation function table. */
  24. struct cpu_table {
  25. unsigned long idcode;
  26. unsigned long idmask;
  27. void (*map_io)(void);
  28. void (*init_uarts)(struct s3c2410_uartcfg *cfg, int no);
  29. void (*init_clocks)(int xtal);
  30. int (*init)(void);
  31. const char *name;
  32. };
  33. extern void s3c_init_cpu(unsigned long idcode,
  34. struct cpu_table *cpus, unsigned int cputab_size);
  35. /* core initialisation functions */
  36. extern void s3c24xx_init_irq(void);
  37. extern void s3c64xx_init_irq(u32 vic0, u32 vic1);
  38. extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
  39. extern void s3c64xx_init_io(struct map_desc *mach_desc, int size);
  40. extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
  41. extern void s3c24xx_init_clocks(int xtal);
  42. extern void s3c24xx_init_uartdevs(char *name,
  43. struct s3c24xx_uart_resources *res,
  44. struct s3c2410_uartcfg *cfg, int no);
  45. /* timer for 2410/2440 */
  46. struct sys_timer;
  47. extern struct sys_timer s3c24xx_timer;
  48. /* system device classes */
  49. extern struct sysdev_class s3c2410_sysclass;
  50. extern struct sysdev_class s3c2410a_sysclass;
  51. extern struct sysdev_class s3c2412_sysclass;
  52. extern struct sysdev_class s3c2440_sysclass;
  53. extern struct sysdev_class s3c2442_sysclass;
  54. extern struct sysdev_class s3c2443_sysclass;
  55. extern struct sysdev_class s3c6410_sysclass;
  56. extern struct sysdev_class s3c64xx_sysclass;