board-generic.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * linux/arch/arm/mach-omap2/board-generic.c
  3. *
  4. * Copyright (C) 2005 Nokia Corporation
  5. * Author: Paul Mundt <paul.mundt@nokia.com>
  6. *
  7. * Modified from mach-omap/omap1/board-generic.c
  8. *
  9. * Code for generic OMAP2 board. Should work on many OMAP2 systems where
  10. * the bootloader passes the board-specific data to the kernel.
  11. * Do not put any board specific code to this file; create a new machine
  12. * type if you need custom low-level initializations.
  13. *
  14. * This program is free software; you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License version 2 as
  16. * published by the Free Software Foundation.
  17. */
  18. #include <linux/kernel.h>
  19. #include <linux/init.h>
  20. #include <linux/device.h>
  21. #include <mach/hardware.h>
  22. #include <asm/mach-types.h>
  23. #include <asm/mach/arch.h>
  24. #include <asm/mach/map.h>
  25. #include <mach/gpio.h>
  26. #include <plat/usb.h>
  27. #include <plat/board.h>
  28. #include <plat/common.h>
  29. static struct omap_board_config_kernel generic_config[] = {
  30. };
  31. static void __init omap_generic_init_irq(void)
  32. {
  33. omap_board_config = generic_config;
  34. omap_board_config_size = ARRAY_SIZE(generic_config);
  35. omap2_init_common_hw(NULL, NULL);
  36. omap_init_irq();
  37. }
  38. static void __init omap_generic_init(void)
  39. {
  40. omap_serial_init();
  41. }
  42. static void __init omap_generic_map_io(void)
  43. {
  44. if (cpu_is_omap242x()) {
  45. omap2_set_globals_242x();
  46. omap242x_map_common_io();
  47. } else if (cpu_is_omap243x()) {
  48. omap2_set_globals_243x();
  49. omap243x_map_common_io();
  50. } else if (cpu_is_omap34xx()) {
  51. omap2_set_globals_3xxx();
  52. omap34xx_map_common_io();
  53. } else if (cpu_is_omap44xx()) {
  54. omap2_set_globals_443x();
  55. omap44xx_map_common_io();
  56. }
  57. }
  58. /* XXX This machine entry name should be updated */
  59. MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
  60. /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
  61. .boot_params = 0x80000100,
  62. .map_io = omap_generic_map_io,
  63. .reserve = omap_reserve,
  64. .init_irq = omap_generic_init_irq,
  65. .init_machine = omap_generic_init,
  66. .timer = &omap_timer,
  67. MACHINE_END