ioremap.c 630 B

12345678910111213141516171819202122232425262728
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  4. */
  5. #include <asm/io.h>
  6. #include <asm-generic/early_ioremap.h>
  7. void __init __iomem *early_ioremap(u64 phys_addr, unsigned long size)
  8. {
  9. return ((void __iomem *)TO_CACHE(phys_addr));
  10. }
  11. void __init early_iounmap(void __iomem *addr, unsigned long size)
  12. {
  13. }
  14. void *early_memremap_ro(resource_size_t phys_addr, unsigned long size)
  15. {
  16. return early_memremap(phys_addr, size);
  17. }
  18. void *early_memremap_prot(resource_size_t phys_addr, unsigned long size,
  19. unsigned long prot_val)
  20. {
  21. return early_memremap(phys_addr, size);
  22. }