board-4430sdp.c 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * Board support file for OMAP4430 SDP.
  3. *
  4. * Copyright (C) 2009 Texas Instruments
  5. *
  6. * Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
  7. *
  8. * Based on mach-omap2/board-3430sdp.c
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/init.h>
  16. #include <linux/platform_device.h>
  17. #include <linux/io.h>
  18. #include <linux/gpio.h>
  19. #include <mach/hardware.h>
  20. #include <asm/mach-types.h>
  21. #include <asm/mach/arch.h>
  22. #include <asm/mach/map.h>
  23. #include <mach/board.h>
  24. #include <mach/common.h>
  25. #include <mach/control.h>
  26. #include <mach/timer-gp.h>
  27. #include <asm/hardware/gic.h>
  28. static struct platform_device sdp4430_lcd_device = {
  29. .name = "sdp4430_lcd",
  30. .id = -1,
  31. };
  32. static struct platform_device *sdp4430_devices[] __initdata = {
  33. &sdp4430_lcd_device,
  34. };
  35. static struct omap_uart_config sdp4430_uart_config __initdata = {
  36. .enabled_uarts = (1 << 0) | (1 << 1) | (1 << 2),
  37. };
  38. static struct omap_lcd_config sdp4430_lcd_config __initdata = {
  39. .ctrl_name = "internal",
  40. };
  41. static struct omap_board_config_kernel sdp4430_config[] __initdata = {
  42. { OMAP_TAG_UART, &sdp4430_uart_config },
  43. { OMAP_TAG_LCD, &sdp4430_lcd_config },
  44. };
  45. static void __init gic_init_irq(void)
  46. {
  47. gic_dist_init(0, IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29);
  48. gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE));
  49. }
  50. static void __init omap_4430sdp_init_irq(void)
  51. {
  52. omap2_init_common_hw(NULL);
  53. #ifdef CONFIG_OMAP_32K_TIMER
  54. omap2_gp_clockevent_set_gptimer(1);
  55. #endif
  56. gic_init_irq();
  57. omap_gpio_init();
  58. }
  59. static void __init omap_4430sdp_init(void)
  60. {
  61. platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
  62. omap_board_config = sdp4430_config;
  63. omap_board_config_size = ARRAY_SIZE(sdp4430_config);
  64. omap_serial_init();
  65. }
  66. static void __init omap_4430sdp_map_io(void)
  67. {
  68. omap2_set_globals_443x();
  69. omap2_map_common_io();
  70. }
  71. MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
  72. /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
  73. .phys_io = 0x48000000,
  74. .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
  75. .boot_params = 0x80000100,
  76. .map_io = omap_4430sdp_map_io,
  77. .init_irq = omap_4430sdp_init_irq,
  78. .init_machine = omap_4430sdp_init,
  79. .timer = &omap_timer,
  80. MACHINE_END