board-ldp.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * linux/arch/arm/mach-omap2/board-ldp.c
  3. *
  4. * Copyright (C) 2008 Texas Instruments Inc.
  5. * Nishant Kamat <nskamat@ti.com>
  6. *
  7. * Modified from mach-omap2/board-3430sdp.c
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #include <linux/kernel.h>
  14. #include <linux/init.h>
  15. #include <linux/platform_device.h>
  16. #include <linux/delay.h>
  17. #include <linux/input.h>
  18. #include <linux/workqueue.h>
  19. #include <linux/err.h>
  20. #include <linux/clk.h>
  21. #include <linux/spi/spi.h>
  22. #include <linux/spi/ads7846.h>
  23. #include <mach/hardware.h>
  24. #include <asm/mach-types.h>
  25. #include <asm/mach/arch.h>
  26. #include <asm/mach/map.h>
  27. #include <mach/board-ldp.h>
  28. #include <mach/mcspi.h>
  29. #include <mach/gpio.h>
  30. #include <mach/board.h>
  31. #include <mach/common.h>
  32. #include <mach/gpmc.h>
  33. #include <asm/io.h>
  34. #include <asm/delay.h>
  35. #include <mach/control.h>
  36. static void __init omap_ldp_init_irq(void)
  37. {
  38. omap2_init_common_hw();
  39. omap_init_irq();
  40. omap_gpio_init();
  41. }
  42. static struct omap_uart_config ldp_uart_config __initdata = {
  43. .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
  44. };
  45. static struct omap_board_config_kernel ldp_config[] __initdata = {
  46. { OMAP_TAG_UART, &ldp_uart_config },
  47. };
  48. static int __init omap_i2c_init(void)
  49. {
  50. omap_register_i2c_bus(1, 2600, NULL, 0);
  51. omap_register_i2c_bus(2, 400, NULL, 0);
  52. omap_register_i2c_bus(3, 400, NULL, 0);
  53. return 0;
  54. }
  55. static void __init omap_ldp_init(void)
  56. {
  57. omap_i2c_init();
  58. omap_board_config = ldp_config;
  59. omap_board_config_size = ARRAY_SIZE(ldp_config);
  60. omap_serial_init();
  61. }
  62. static void __init omap_ldp_map_io(void)
  63. {
  64. omap2_set_globals_343x();
  65. omap2_map_common_io();
  66. }
  67. MACHINE_START(OMAP_LDP, "OMAP LDP board")
  68. .phys_io = 0x48000000,
  69. .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
  70. .boot_params = 0x80000100,
  71. .map_io = omap_ldp_map_io,
  72. .init_irq = omap_ldp_init_irq,
  73. .init_machine = omap_ldp_init,
  74. .timer = &omap_timer,
  75. MACHINE_END