hardware.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * linux/arch/unicore32/include/mach/hardware.h
  3. *
  4. * Code specific to PKUnity SoC and UniCore ISA
  5. *
  6. * Copyright (C) 2001-2010 GUAN Xue-tao
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * This file contains the hardware definitions for PKUnity architecture
  13. */
  14. #ifndef __MACH_PUV3_HARDWARE_H__
  15. #define __MACH_PUV3_HARDWARE_H__
  16. #include "PKUnity.h"
  17. #define io_p2v(x) ((x) - PKUNITY_MMIO_BASE)
  18. #define io_v2p(x) ((x) + PKUNITY_MMIO_BASE)
  19. #ifndef __ASSEMBLY__
  20. # define __REG(x) (*((volatile unsigned long *)io_p2v(x)))
  21. # define __PREG(x) (io_v2p((unsigned long)&(x)))
  22. #else
  23. # define __REG(x) io_p2v(x)
  24. # define __PREG(x) io_v2p(x)
  25. #endif
  26. #define PCIBIOS_MIN_IO 0x4000 /* should lower than 64KB */
  27. #define PCIBIOS_MIN_MEM PKUNITY_PCIMEM_BASE
  28. /*
  29. * We override the standard dma-mask routines for bouncing.
  30. */
  31. #define HAVE_ARCH_PCI_SET_DMA_MASK
  32. #define pcibios_assign_all_busses() 1
  33. #endif /* __MACH_PUV3_HARDWARE_H__ */