io.c 740 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2011 Picochip Ltd., Jamie Iles
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * All enquiries to support@picochip.com
  9. */
  10. #include <linux/io.h>
  11. #include <linux/mm.h>
  12. #include <linux/module.h>
  13. #include <linux/of.h>
  14. #include <asm/mach/map.h>
  15. #include <mach/map.h>
  16. #include <mach/picoxcell_soc.h>
  17. #include "common.h"
  18. void __init picoxcell_map_io(void)
  19. {
  20. struct map_desc io_map = {
  21. .virtual = PHYS_TO_IO(PICOXCELL_PERIPH_BASE),
  22. .pfn = __phys_to_pfn(PICOXCELL_PERIPH_BASE),
  23. .length = PICOXCELL_PERIPH_LENGTH,
  24. .type = MT_DEVICE,
  25. };
  26. iotable_init(&io_map, 1);
  27. }