···11+/*22+ * linux/arch/unicore32/include/mach/bitfield.h33+ *44+ * Code specific to PKUnity SoC and UniCore ISA55+ *66+ * Copyright (C) 2001-2010 GUAN Xue-tao77+ *88+ * This program is free software; you can redistribute it and/or modify99+ * it under the terms of the GNU General Public License version 2 as1010+ * published by the Free Software Foundation.1111+ */1212+#ifndef __MACH_PUV3_BITFIELD_H__1313+#define __MACH_PUV3_BITFIELD_H__1414+1515+#ifndef __ASSEMBLY__1616+#define UData(Data) ((unsigned long) (Data))1717+#else1818+#define UData(Data) (Data)1919+#endif2020+2121+#define FIELD(val, vmask, vshift) (((val) & ((UData(1) << (vmask)) - 1)) << (vshift))2222+#define FMASK(vmask, vshift) (((UData(1) << (vmask)) - 1) << (vshift))2323+2424+#endif /* __MACH_PUV3_BITFIELD_H__ */
+45
arch/unicore32/include/mach/hardware.h
···11+/*22+ * linux/arch/unicore32/include/mach/hardware.h33+ *44+ * Code specific to PKUnity SoC and UniCore ISA55+ *66+ * Copyright (C) 2001-2010 GUAN Xue-tao77+ *88+ * This program is free software; you can redistribute it and/or modify99+ * it under the terms of the GNU General Public License version 2 as1010+ * published by the Free Software Foundation.1111+ *1212+ * This file contains the hardware definitions for PKUnity architecture1313+ */1414+1515+#ifndef __MACH_PUV3_HARDWARE_H__1616+#define __MACH_PUV3_HARDWARE_H__1717+1818+#include "PKUnity.h"1919+2020+#define io_p2v(x) ((x) - PKUNITY_IOSPACE_BASE)2121+#define io_v2p(x) ((x) + PKUNITY_IOSPACE_BASE)2222+2323+#ifndef __ASSEMBLY__2424+2525+# define __REG(x) (*((volatile unsigned long *)io_p2v(x)))2626+# define __PREG(x) (io_v2p((unsigned long)&(x)))2727+2828+#else2929+3030+# define __REG(x) io_p2v(x)3131+# define __PREG(x) io_v2p(x)3232+3333+#endif3434+3535+#define PCIBIOS_MIN_IO 0x4000 /* should lower than 64KB */3636+#define PCIBIOS_MIN_MEM PKUNITY_PCIMEM_BASE3737+3838+/*3939+ * We override the standard dma-mask routines for bouncing.4040+ */4141+#define HAVE_ARCH_PCI_SET_DMA_MASK4242+4343+#define pcibios_assign_all_busses() 14444+4545+#endif /* __MACH_PUV3_HARDWARE_H__ */