mx1ads.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * arch/arm/mach-imx/mx1ads.c
  3. *
  4. * Initially based on:
  5. * linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c
  6. * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de>
  7. *
  8. * 2004 (c) MontaVista Software, Inc.
  9. *
  10. * This file is licensed under the terms of the GNU General Public
  11. * License version 2. This program is licensed "as is" without any
  12. * warranty of any kind, whether express or implied.
  13. */
  14. #include <linux/device.h>
  15. #include <linux/init.h>
  16. #include <linux/platform_device.h>
  17. #include <asm/system.h>
  18. #include <asm/hardware.h>
  19. #include <asm/irq.h>
  20. #include <asm/pgtable.h>
  21. #include <asm/page.h>
  22. #include <asm/mach/map.h>
  23. #include <asm/mach-types.h>
  24. #include <asm/mach/arch.h>
  25. #include <linux/interrupt.h>
  26. #include "generic.h"
  27. #include <asm/serial.h>
  28. static struct resource cs89x0_resources[] = {
  29. [0] = {
  30. .start = IMX_CS4_PHYS + 0x300,
  31. .end = IMX_CS4_PHYS + 0x300 + 16,
  32. .flags = IORESOURCE_MEM,
  33. },
  34. [1] = {
  35. .start = IRQ_GPIOC(17),
  36. .end = IRQ_GPIOC(17),
  37. .flags = IORESOURCE_IRQ,
  38. },
  39. };
  40. static struct platform_device cs89x0_device = {
  41. .name = "cirrus-cs89x0",
  42. .num_resources = ARRAY_SIZE(cs89x0_resources),
  43. .resource = cs89x0_resources,
  44. };
  45. static struct platform_device *devices[] __initdata = {
  46. &cs89x0_device,
  47. };
  48. static void __init
  49. mx1ads_init(void)
  50. {
  51. #ifdef CONFIG_LEDS
  52. imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2);
  53. #endif
  54. platform_add_devices(devices, ARRAY_SIZE(devices));
  55. }
  56. static void __init
  57. mx1ads_map_io(void)
  58. {
  59. imx_map_io();
  60. }
  61. MACHINE_START(MX1ADS, "Motorola MX1ADS")
  62. /* Maintainer: Sascha Hauer, Pengutronix */
  63. .phys_io = 0x00200000,
  64. .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc,
  65. .boot_params = 0x08000100,
  66. .map_io = mx1ads_map_io,
  67. .init_irq = imx_init_irq,
  68. .timer = &imx_timer,
  69. .init_machine = mx1ads_init,
  70. MACHINE_END