phys2bus.h 417 B

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