From 3b524b81ddcd92f10091d9a2bdb9e3163f5fbe71 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Mon, 16 Oct 2006 19:13:53 +0000 Subject: [PATCH] try again. git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@23 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- src/include/cpu/generic/i386/arch/byteorder.h | 33 +++++++++++++++++++ .../cpu/generic/{x86 => i386}/arch/swab.h | 0 .../cpu/generic/{x86 => i386}/pci_ops.h | 0 3 files changed, 33 insertions(+) create mode 100644 src/include/cpu/generic/i386/arch/byteorder.h rename src/include/cpu/generic/{x86 => i386}/arch/swab.h (100%) rename src/include/cpu/generic/{x86 => i386}/pci_ops.h (100%) diff --git a/src/include/cpu/generic/i386/arch/byteorder.h b/src/include/cpu/generic/i386/arch/byteorder.h new file mode 100644 index 0000000000..aec4861e24 --- /dev/null +++ b/src/include/cpu/generic/i386/arch/byteorder.h @@ -0,0 +1,33 @@ +/* + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ +#ifndef _BYTEORDER_H +#define _BYTEORDER_H + +#define __LITTLE_ENDIAN 1234 + +#include + +#define cpu_to_le32(x) ((unsigned int)(x)) +#define le32_to_cpu(x) ((unsigned int)(x)) +#define cpu_to_le16(x) ((unsigned short)(x)) +#define le16_to_cpu(x) ((unsigned short)(x)) +#define cpu_to_be32(x) swab32((x)) +#define be32_to_cpu(x) swab32((x)) +#define cpu_to_be16(x) swab16((x)) +#define be16_to_cpu(x) swab16((x)) + +#endif /* _BYTEORDER_H */ diff --git a/src/include/cpu/generic/x86/arch/swab.h b/src/include/cpu/generic/i386/arch/swab.h similarity index 100% rename from src/include/cpu/generic/x86/arch/swab.h rename to src/include/cpu/generic/i386/arch/swab.h diff --git a/src/include/cpu/generic/x86/pci_ops.h b/src/include/cpu/generic/i386/pci_ops.h similarity index 100% rename from src/include/cpu/generic/x86/pci_ops.h rename to src/include/cpu/generic/i386/pci_ops.h