io.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * linux/arch/arm/mach-omap2/io.c
  3. *
  4. * OMAP2 I/O mapping code
  5. *
  6. * Copyright (C) 2005 Nokia Corporation
  7. * Author: Juha Yrjölä <juha.yrjola@nokia.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #include <linux/config.h>
  14. #include <linux/module.h>
  15. #include <linux/kernel.h>
  16. #include <linux/init.h>
  17. #include <asm/mach/map.h>
  18. #include <asm/io.h>
  19. #include <asm/arch/mux.h>
  20. extern void omap_sram_init(void);
  21. extern int omap2_clk_init(void);
  22. extern void omap2_check_revision(void);
  23. /*
  24. * The machine specific code may provide the extra mapping besides the
  25. * default mapping provided here.
  26. */
  27. static struct map_desc omap2_io_desc[] __initdata = {
  28. {
  29. .virtual = L3_24XX_VIRT,
  30. .pfn = __phys_to_pfn(L3_24XX_PHYS),
  31. .length = L3_24XX_SIZE,
  32. .type = MT_DEVICE
  33. },
  34. {
  35. .virtual = L4_24XX_VIRT,
  36. .pfn = __phys_to_pfn(L4_24XX_PHYS),
  37. .length = L4_24XX_SIZE,
  38. .type = MT_DEVICE
  39. }
  40. };
  41. void __init omap_map_common_io(void)
  42. {
  43. iotable_init(omap2_io_desc, ARRAY_SIZE(omap2_io_desc));
  44. omap2_check_revision();
  45. omap_sram_init();
  46. omap2_mux_init();
  47. omap2_clk_init();
  48. }