Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
awilliam
GitHub Repository: awilliam/linux-vfio
Path: blob/master/arch/unicore32/include/mach/hardware.h
10818 views
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
15
#ifndef __MACH_PUV3_HARDWARE_H__
16
#define __MACH_PUV3_HARDWARE_H__
17
18
#include "PKUnity.h"
19
20
#ifndef __ASSEMBLY__
21
#define io_p2v(x) (void __iomem *)((x) - PKUNITY_MMIO_BASE)
22
#define io_v2p(x) (phys_addr_t)((x) + PKUNITY_MMIO_BASE)
23
#else
24
#define io_p2v(x) ((x) - PKUNITY_MMIO_BASE)
25
#define io_v2p(x) ((x) + PKUNITY_MMIO_BASE)
26
#endif
27
28
#define PCIBIOS_MIN_IO 0x4000 /* should lower than 64KB */
29
#define PCIBIOS_MIN_MEM io_v2p(PKUNITY_PCIMEM_BASE)
30
31
/*
32
* We override the standard dma-mask routines for bouncing.
33
*/
34
#define HAVE_ARCH_PCI_SET_DMA_MASK
35
36
#define pcibios_assign_all_busses() 1
37
38
#endif /* __MACH_PUV3_HARDWARE_H__ */
39
40