aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120-2.6/patches
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2007-06-22 10:16:47 +0000
committerGabor Juhos <juhosg@openwrt.org>2007-06-22 10:16:47 +0000
commite3fae5ca905afcd9d88798ce5fb4084188ea1680 (patch)
tree5e016d1536d3a3d4732e39014ba3bf892bcf1dbc /target/linux/adm5120-2.6/patches
parent0ef365248615a8c4796010f548f4e0d253d128df (diff)
downloadmaster-187ad058-e3fae5ca905afcd9d88798ce5fb4084188ea1680.tar.gz
master-187ad058-e3fae5ca905afcd9d88798ce5fb4084188ea1680.tar.bz2
master-187ad058-e3fae5ca905afcd9d88798ce5fb4084188ea1680.zip
[adm5120] add initial support for hardware accelerated byte swapping
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7708 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120-2.6/patches')
-rw-r--r--target/linux/adm5120-2.6/patches/001-adm5120.patch14
-rw-r--r--target/linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch38
2 files changed, 47 insertions, 5 deletions
diff --git a/target/linux/adm5120-2.6/patches/001-adm5120.patch b/target/linux/adm5120-2.6/patches/001-adm5120.patch
index 8cc60678e0..c14dde345a 100644
--- a/target/linux/adm5120-2.6/patches/001-adm5120.patch
+++ b/target/linux/adm5120-2.6/patches/001-adm5120.patch
@@ -2,7 +2,7 @@ Index: linux-2.6.21.1/arch/mips/Kconfig
===================================================================
--- linux-2.6.21.1.orig/arch/mips/Kconfig
+++ linux-2.6.21.1/arch/mips/Kconfig
-@@ -16,6 +16,21 @@ choice
+@@ -16,6 +16,17 @@ choice
prompt "System type"
default SGI_IP22
@@ -17,13 +17,17 @@ Index: linux-2.6.21.1/arch/mips/Kconfig
+ select SYS_SUPPORTS_32BIT_KERNEL
+ select GENERIC_GPIO
+
-+config PCI_ADM5120
-+ bool "Add PCI control support for ADM5120"
-+ depends on MIPS_ADM5120 && PCI
-+
config MIPS_MTX1
bool "4G Systems MTX-1 board"
select DMA_NONCOHERENT
+@@ -766,6 +775,7 @@
+
+ endchoice
+
++source "arch/mips/adm5120/Kconfig"
+ source "arch/mips/ddb5xxx/Kconfig"
+ source "arch/mips/gt64120/ev64120/Kconfig"
+ source "arch/mips/jazz/Kconfig"
Index: linux-2.6.21.1/arch/mips/Makefile
===================================================================
--- linux-2.6.21.1.orig/arch/mips/Makefile
diff --git a/target/linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch b/target/linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch
new file mode 100644
index 0000000000..a71dba2d03
--- /dev/null
+++ b/target/linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch
@@ -0,0 +1,38 @@
+--- linux-2.6.19.2/include/asm-mips/byteorder.h 2007-01-10 20:10:37.000000000 +0100
++++ linux-2.6.19.2.new/include/asm-mips/byteorder.h 2007-05-16 21:14:47.000000000 +0200
+@@ -58,6 +58,35 @@
+
+ #endif /* CONFIG_CPU_MIPSR2 */
+
++#ifdef CONFIG_ADM5120_HARDWARE_SWAB
++
++static __inline__ __attribute_const__ __u16 ___adm5120__swab16(__u16 x)
++{
++ __asm__ (
++ " sw %2, 0xC8(%1) \n"
++ " lhu %0, 0xCC(%1) \n"
++ : "=r" (x)
++ : "r" (0xB2000000), "r" (x));
++
++ return x;
++}
++
++static __inline__ __attribute_const__ __u32 ___adm5120__swab32(__u32 x)
++{
++ __asm__ (
++ " sw %2, 0xC8(%1) \n"
++ " lw %0, 0xCC(%1) \n"
++ : "=r" (x)
++ : "r" (0xB2000000), "r" (x));
++
++ return x;
++}
++
++#define __arch__swab16(x) ___adm5120__swab16(x)
++#define __arch__swab32(x) ___adm5120__swab32(x)
++
++#endif /* CONFIG_ADM5120_HARDWARE_SWAB */
++
+ #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+ # define __BYTEORDER_HAS_U64__
+ # define __SWAB_64_THRU_32__