cpu.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * arch/arm/mach-w90x900/cpu.h
  3. *
  4. * Based on linux/include/asm-arm/plat-s3c24xx/cpu.h by Ben Dooks
  5. *
  6. * Copyright (c) 2008 Nuvoton technology corporation
  7. * All rights reserved.
  8. *
  9. * Header file for W90X900 CPU support
  10. *
  11. * Wan ZongShun <mcuos.com@gmail.com>
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License version 2 as
  15. * published by the Free Software Foundation.
  16. *
  17. */
  18. #define IODESC_ENT(y) \
  19. { \
  20. .virtual = (unsigned long)W90X900_VA_##y, \
  21. .pfn = __phys_to_pfn(W90X900_PA_##y), \
  22. .length = W90X900_SZ_##y, \
  23. .type = MT_DEVICE, \
  24. }
  25. /*Cpu identifier register*/
  26. #define W90X900PDID W90X900_VA_GCR
  27. #define W90P910_CPUID 0x02900910
  28. #define W90P920_CPUID 0x02900920
  29. #define W90P950_CPUID 0x02900950
  30. #define W90N960_CPUID 0x02900960
  31. struct w90x900_uartcfg;
  32. struct map_desc;
  33. struct sys_timer;
  34. /* core initialisation functions */
  35. extern void w90x900_init_irq(void);
  36. extern void w90p910_init_io(struct map_desc *mach_desc, int size);
  37. extern void w90p910_init_uarts(struct w90x900_uartcfg *cfg, int no);
  38. extern void w90p910_init_clocks(void);
  39. extern void w90p910_map_io(struct map_desc *mach_desc, int size);
  40. extern struct platform_device w90p910_serial_device;
  41. extern struct sys_timer w90x900_timer;
  42. extern void w90p910_clock_source(struct device *dev, unsigned char *src);
  43. #define W90X900_8250PORT(name) \
  44. { \
  45. .membase = name##_BA, \
  46. .mapbase = name##_PA, \
  47. .irq = IRQ_##name, \
  48. .uartclk = 11313600, \
  49. .regshift = 2, \
  50. .iotype = UPIO_MEM, \
  51. .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
  52. }