board-4430sdp.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 <plat/board.h>
  24. #include <plat/common.h>
  25. #include <plat/control.h>
  26. #include <plat/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) | (1 << 3),
  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_LCD, &sdp4430_lcd_config },
  43. };
  44. static void __init gic_init_irq(void)
  45. {
  46. void __iomem *base;
  47. /* Static mapping, never released */
  48. base = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);
  49. BUG_ON(!base);
  50. gic_dist_init(0, base, 29);
  51. /* Static mapping, never released */
  52. gic_cpu_base_addr = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
  53. BUG_ON(!gic_cpu_base_addr);
  54. gic_cpu_init(0, gic_cpu_base_addr);
  55. }
  56. static void __init omap_4430sdp_init_irq(void)
  57. {
  58. omap_board_config = sdp4430_config;
  59. omap_board_config_size = ARRAY_SIZE(sdp4430_config);
  60. omap2_init_common_hw(NULL, NULL);
  61. #ifdef CONFIG_OMAP_32K_TIMER
  62. omap2_gp_clockevent_set_gptimer(1);
  63. #endif
  64. gic_init_irq();
  65. omap_gpio_init();
  66. }
  67. static void __init omap_4430sdp_init(void)
  68. {
  69. platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
  70. omap_serial_init();
  71. }
  72. static void __init omap_4430sdp_map_io(void)
  73. {
  74. omap2_set_globals_443x();
  75. omap2_map_common_io();
  76. }
  77. MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
  78. /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
  79. .phys_io = 0x48000000,
  80. .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
  81. .boot_params = 0x80000100,
  82. .map_io = omap_4430sdp_map_io,
  83. .init_irq = omap_4430sdp_init_irq,
  84. .init_machine = omap_4430sdp_init,
  85. .timer = &omap_timer,
  86. MACHINE_END