w90p910.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * linux/arch/arm/mach-w90x900/w90p910.c
  3. *
  4. * Based on linux/arch/arm/plat-s3c24xx/s3c244x.c by Ben Dooks
  5. *
  6. * Copyright (c) 2008 Nuvoton technology corporation.
  7. *
  8. * Wan ZongShun <mcuos.com@gmail.com>
  9. *
  10. * W90P910 cpu support
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation;version 2 of the License.
  15. *
  16. */
  17. #include <linux/kernel.h>
  18. #include <linux/types.h>
  19. #include <linux/interrupt.h>
  20. #include <linux/list.h>
  21. #include <linux/timer.h>
  22. #include <linux/init.h>
  23. #include <linux/platform_device.h>
  24. #include <linux/io.h>
  25. #include <linux/serial_8250.h>
  26. #include <asm/mach/arch.h>
  27. #include <asm/mach/map.h>
  28. #include <asm/mach/irq.h>
  29. #include <asm/irq.h>
  30. #include <mach/hardware.h>
  31. #include <mach/regs-serial.h>
  32. #include "cpu.h"
  33. /* Initial IO mappings */
  34. static struct map_desc w90p910_iodesc[] __initdata = {
  35. IODESC_ENT(IRQ),
  36. IODESC_ENT(GCR),
  37. IODESC_ENT(UART),
  38. IODESC_ENT(TIMER),
  39. IODESC_ENT(EBI),
  40. IODESC_ENT(USBEHCIHOST),
  41. IODESC_ENT(USBOHCIHOST),
  42. IODESC_ENT(ADC),
  43. /*IODESC_ENT(LCD),*/
  44. };
  45. /* Initial serial platform data */
  46. struct plat_serial8250_port w90p910_uart_data[] = {
  47. W90X900_8250PORT(UART0),
  48. };
  49. struct platform_device w90p910_serial_device = {
  50. .name = "serial8250",
  51. .id = PLAT8250_DEV_PLATFORM,
  52. .dev = {
  53. .platform_data = w90p910_uart_data,
  54. },
  55. };
  56. /*Init W90P910 evb io*/
  57. void __init w90p910_map_io(struct map_desc *mach_desc, int mach_size)
  58. {
  59. unsigned long idcode = 0x0;
  60. iotable_init(w90p910_iodesc, ARRAY_SIZE(w90p910_iodesc));
  61. idcode = __raw_readl(W90X900PDID);
  62. if (idcode != W90P910_CPUID)
  63. printk(KERN_ERR "CPU type 0x%08lx is not W90P910\n", idcode);
  64. }
  65. /*Init W90P910 clock*/
  66. void __init w90p910_init_clocks(int xtal)
  67. {
  68. }
  69. static int __init w90p910_init_cpu(void)
  70. {
  71. return 0;
  72. }
  73. static int __init w90x900_arch_init(void)
  74. {
  75. return w90p910_init_cpu();
  76. }
  77. arch_initcall(w90x900_arch_init);