avengers_lite.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * linux/arch/arm/mach-mmp/avengers_lite.c
  3. *
  4. * Support for the Marvell PXA168-based Avengers lite Development Platform.
  5. *
  6. * Copyright (C) 2009-2010 Marvell International Ltd.
  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. * publishhed by the Free Software Foundation.
  11. */
  12. #include <linux/init.h>
  13. #include <linux/kernel.h>
  14. #include <linux/gpio-pxa.h>
  15. #include <linux/platform_device.h>
  16. #include <asm/mach-types.h>
  17. #include <asm/mach/arch.h>
  18. #include "addr-map.h"
  19. #include "mfp-pxa168.h"
  20. #include "pxa168.h"
  21. #include "irqs.h"
  22. #include "common.h"
  23. #include <linux/delay.h>
  24. /* Avengers lite MFP configurations */
  25. static unsigned long avengers_lite_pin_config_V16F[] __initdata = {
  26. /* DEBUG_UART */
  27. GPIO88_UART2_TXD,
  28. GPIO89_UART2_RXD,
  29. };
  30. static struct pxa_gpio_platform_data pxa168_gpio_pdata = {
  31. .irq_base = MMP_GPIO_TO_IRQ(0),
  32. };
  33. static void __init avengers_lite_init(void)
  34. {
  35. mfp_config(ARRAY_AND_SIZE(avengers_lite_pin_config_V16F));
  36. /* on-chip devices */
  37. pxa168_add_uart(2);
  38. platform_device_add_data(&pxa168_device_gpio, &pxa168_gpio_pdata,
  39. sizeof(struct pxa_gpio_platform_data));
  40. platform_device_register(&pxa168_device_gpio);
  41. }
  42. MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
  43. .map_io = mmp_map_io,
  44. .nr_irqs = MMP_NR_IRQS,
  45. .init_irq = pxa168_init_irq,
  46. .init_time = pxa168_timer_init,
  47. .init_machine = avengers_lite_init,
  48. .restart = pxa168_restart,
  49. MACHINE_END