io.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * linux/arch/arm/mach-tcc8k/io.c
  3. *
  4. * (C) 2009 Hans J. Koch <hjk@linutronix.de>
  5. *
  6. * derived from TCC83xx io.c
  7. * Copyright (C) Telechips, Inc.
  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/init.h>
  14. #include <linux/io.h>
  15. #include <linux/kernel.h>
  16. #include <asm/mach/map.h>
  17. #include <mach/tcc8k-regs.h>
  18. /*
  19. * The machine specific code may provide the extra mapping besides the
  20. * default mapping provided here.
  21. */
  22. static struct map_desc tcc8k_io_desc[] __initdata = {
  23. {
  24. .virtual = (unsigned long)CS1_BASE_VIRT,
  25. .pfn = __phys_to_pfn(CS1_BASE),
  26. .length = CS1_SIZE,
  27. .type = MT_DEVICE,
  28. }, {
  29. .virtual = (unsigned long)AHB_PERI_BASE_VIRT,
  30. .pfn = __phys_to_pfn(AHB_PERI_BASE),
  31. .length = AHB_PERI_SIZE,
  32. .type = MT_DEVICE,
  33. }, {
  34. .virtual = (unsigned long)APB0_PERI_BASE_VIRT,
  35. .pfn = __phys_to_pfn(APB0_PERI_BASE),
  36. .length = APB0_PERI_SIZE,
  37. .type = MT_DEVICE,
  38. }, {
  39. .virtual = (unsigned long)APB1_PERI_BASE_VIRT,
  40. .pfn = __phys_to_pfn(APB1_PERI_BASE),
  41. .length = APB1_PERI_SIZE,
  42. .type = MT_DEVICE,
  43. }, {
  44. .virtual = (unsigned long)EXT_MEM_CTRL_BASE_VIRT,
  45. .pfn = __phys_to_pfn(EXT_MEM_CTRL_BASE),
  46. .length = EXT_MEM_CTRL_SIZE,
  47. .type = MT_DEVICE,
  48. },
  49. };
  50. /*
  51. * Maps common IO regions for tcc8k.
  52. *
  53. */
  54. void __init tcc8k_map_common_io(void)
  55. {
  56. iotable_init(tcc8k_io_desc, ARRAY_SIZE(tcc8k_io_desc));
  57. }