board-omapl138-hawk.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Hawkboard.org based on TI's OMAP-L138 Platform
  3. *
  4. * Initial code: Syed Mohammed Khasim
  5. *
  6. * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com
  7. *
  8. * This file is licensed under the terms of the GNU General Public License
  9. * version 2. This program is licensed "as is" without any warranty of
  10. * any kind, whether express or implied.
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <linux/console.h>
  15. #include <linux/gpio.h>
  16. #include <asm/mach-types.h>
  17. #include <asm/mach/arch.h>
  18. #include <mach/cp_intc.h>
  19. #include <mach/da8xx.h>
  20. static struct davinci_uart_config omapl138_hawk_uart_config __initdata = {
  21. .enabled_uarts = 0x7,
  22. };
  23. static __init void omapl138_hawk_init(void)
  24. {
  25. int ret;
  26. davinci_serial_init(&omapl138_hawk_uart_config);
  27. ret = da8xx_register_watchdog();
  28. if (ret)
  29. pr_warning("omapl138_hawk_init: "
  30. "watchdog registration failed: %d\n",
  31. ret);
  32. }
  33. #ifdef CONFIG_SERIAL_8250_CONSOLE
  34. static int __init omapl138_hawk_console_init(void)
  35. {
  36. if (!machine_is_omapl138_hawkboard())
  37. return 0;
  38. return add_preferred_console("ttyS", 2, "115200");
  39. }
  40. console_initcall(omapl138_hawk_console_init);
  41. #endif
  42. static void __init omapl138_hawk_map_io(void)
  43. {
  44. da850_init();
  45. }
  46. MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard")
  47. .boot_params = (DA8XX_DDR_BASE + 0x100),
  48. .map_io = omapl138_hawk_map_io,
  49. .init_irq = cp_intc_init,
  50. .timer = &davinci_timer,
  51. .init_machine = omapl138_hawk_init,
  52. MACHINE_END