mx31lilly.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * LILLY-1131 module support
  3. *
  4. * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
  5. *
  6. * based on code for other MX31 boards,
  7. *
  8. * Copyright 2005-2007 Freescale Semiconductor
  9. * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com>
  10. * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation; either version 2 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  25. */
  26. #include <linux/types.h>
  27. #include <linux/init.h>
  28. #include <linux/clk.h>
  29. #include <asm/mach-types.h>
  30. #include <asm/mach/arch.h>
  31. #include <asm/mach/time.h>
  32. #include <asm/mach/map.h>
  33. #include <mach/hardware.h>
  34. #include <mach/common.h>
  35. #include <mach/iomux-mx3.h>
  36. #include <mach/board-mx31lilly.h>
  37. #include "devices.h"
  38. /*
  39. * This file contains module-specific initialization routines for LILLY-1131.
  40. * Initialization of peripherals found on the baseboard is implemented in the
  41. * appropriate baseboard support code.
  42. */
  43. static int mx31lilly_baseboard;
  44. core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444);
  45. static void __init mx31lilly_board_init(void)
  46. {
  47. switch (mx31lilly_baseboard) {
  48. case MX31LILLY_NOBOARD:
  49. break;
  50. case MX31LILLY_DB:
  51. mx31lilly_db_init();
  52. break;
  53. default:
  54. printk(KERN_ERR "Illegal mx31lilly_baseboard type %d\n",
  55. mx31lilly_baseboard);
  56. }
  57. }
  58. static void __init mx31lilly_timer_init(void)
  59. {
  60. mx31_clocks_init(26000000);
  61. }
  62. static struct sys_timer mx31lilly_timer = {
  63. .init = mx31lilly_timer_init,
  64. };
  65. MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
  66. .phys_io = AIPS1_BASE_ADDR,
  67. .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
  68. .boot_params = PHYS_OFFSET + 0x100,
  69. .map_io = mx31_map_io,
  70. .init_irq = mxc_init_irq,
  71. .init_machine = mx31lilly_board_init,
  72. .timer = &mx31lilly_timer,
  73. MACHINE_END