aaed2000.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * linux/arch/arm/mach-aaec2000/aaed2000.c
  3. *
  4. * Support for the Agilent AAED-2000 Development Platform.
  5. *
  6. * Copyright (c) 2005 Nicolas Bellido Y Ortega
  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. */
  13. #include <linux/module.h>
  14. #include <linux/kernel.h>
  15. #include <linux/init.h>
  16. #include <linux/device.h>
  17. #include <linux/major.h>
  18. #include <linux/interrupt.h>
  19. #include <asm/setup.h>
  20. #include <asm/memory.h>
  21. #include <asm/mach-types.h>
  22. #include <mach/hardware.h>
  23. #include <asm/irq.h>
  24. #include <asm/mach/arch.h>
  25. #include <asm/mach/map.h>
  26. #include <asm/mach/irq.h>
  27. #include <mach/aaed2000.h>
  28. #include "core.h"
  29. static void aaed2000_clcd_disable(struct clcd_fb *fb)
  30. {
  31. AAED_EXT_GPIO &= ~AAED_EGPIO_LCD_PWR_EN;
  32. }
  33. static void aaed2000_clcd_enable(struct clcd_fb *fb)
  34. {
  35. AAED_EXT_GPIO |= AAED_EGPIO_LCD_PWR_EN;
  36. }
  37. struct aaec2000_clcd_info clcd_info = {
  38. .enable = aaed2000_clcd_enable,
  39. .disable = aaed2000_clcd_disable,
  40. .panel = {
  41. .mode = {
  42. .name = "Sharp",
  43. .refresh = 60,
  44. .xres = 640,
  45. .yres = 480,
  46. .pixclock = 39721,
  47. .left_margin = 20,
  48. .right_margin = 44,
  49. .upper_margin = 21,
  50. .lower_margin = 34,
  51. .hsync_len = 96,
  52. .vsync_len = 2,
  53. .sync = 0,
  54. .vmode = FB_VMODE_NONINTERLACED,
  55. },
  56. .width = -1,
  57. .height = -1,
  58. .tim2 = TIM2_IVS | TIM2_IHS,
  59. .cntl = CNTL_LCDTFT,
  60. .bpp = 16,
  61. },
  62. };
  63. static void __init aaed2000_init_irq(void)
  64. {
  65. aaec2000_init_irq();
  66. }
  67. static void __init aaed2000_init(void)
  68. {
  69. aaec2000_set_clcd_plat_data(&clcd_info);
  70. }
  71. static struct map_desc aaed2000_io_desc[] __initdata = {
  72. {
  73. .virtual = EXT_GPIO_VBASE,
  74. .pfn = __phys_to_pfn(EXT_GPIO_PBASE),
  75. .length = EXT_GPIO_LENGTH,
  76. .type = MT_DEVICE
  77. },
  78. };
  79. static void __init aaed2000_map_io(void)
  80. {
  81. aaec2000_map_io();
  82. iotable_init(aaed2000_io_desc, ARRAY_SIZE(aaed2000_io_desc));
  83. }
  84. MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform")
  85. /* Maintainer: Nicolas Bellido Y Ortega */
  86. .phys_io = PIO_BASE,
  87. .io_pg_offst = ((VIO_BASE) >> 18) & 0xfffc,
  88. .map_io = aaed2000_map_io,
  89. .init_irq = aaed2000_init_irq,
  90. .timer = &aaec2000_timer,
  91. .init_machine = aaed2000_init,
  92. MACHINE_END