phys2bus.h 421 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright 2015 Stephen Warren
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _BUS_ADDR_H
  7. #define _BUS_ADDR_H
  8. #ifdef CONFIG_PHYS_TO_BUS
  9. unsigned long phys_to_bus(unsigned long phys);
  10. unsigned long bus_to_phys(unsigned long bus);
  11. #else
  12. static inline unsigned long phys_to_bus(unsigned long phys)
  13. {
  14. return phys;
  15. }
  16. static inline unsigned long bus_to_phys(unsigned long bus)
  17. {
  18. return bus;
  19. }
  20. #endif
  21. #endif