board-generic.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * linux/arch/arm/mach-omap/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 <asm/hardware.h>
  22. #include <asm/mach-types.h>
  23. #include <asm/mach/arch.h>
  24. #include <asm/mach/map.h>
  25. #include <asm/arch/gpio.h>
  26. #include <asm/arch/mux.h>
  27. #include <asm/arch/usb.h>
  28. #include <asm/arch/board.h>
  29. #include <asm/arch/common.h>
  30. static void __init omap_generic_init_irq(void)
  31. {
  32. omap_init_irq();
  33. }
  34. static struct omap_uart_config generic_uart_config __initdata = {
  35. .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
  36. };
  37. static struct omap_mmc_config generic_mmc_config __initdata = {
  38. .mmc [0] = {
  39. .enabled = 0,
  40. .wire4 = 0,
  41. .wp_pin = -1,
  42. .power_pin = -1,
  43. .switch_pin = -1,
  44. },
  45. };
  46. static struct omap_board_config_kernel generic_config[] = {
  47. { OMAP_TAG_UART, &generic_uart_config },
  48. { OMAP_TAG_MMC, &generic_mmc_config },
  49. };
  50. static void __init omap_generic_init(void)
  51. {
  52. omap_board_config = generic_config;
  53. omap_board_config_size = ARRAY_SIZE(generic_config);
  54. omap_serial_init();
  55. }
  56. static void __init omap_generic_map_io(void)
  57. {
  58. omap_map_common_io();
  59. }
  60. MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
  61. /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
  62. .phys_io = 0x48000000,
  63. .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
  64. .boot_params = 0x80000100,
  65. .map_io = omap_generic_map_io,
  66. .init_irq = omap_generic_init_irq,
  67. .init_machine = omap_generic_init,
  68. .timer = &omap_timer,
  69. MACHINE_END