2 * linux/arch/arm/mach-omap/dsp/uaccess_dsp.S
4 * user memory access functions for DSP driver
6 * Copyright (C) 2004,2005 Nokia Corporation
8 * Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * 2004/06/29: DSP Gateway version 3.3
27 #include <linux/linkage.h>
28 #include <asm/assembler.h>
32 /* Prototype: int __arch_copy_to_user_dsp_2b(void *to, const char *from)
33 * Purpose : copy 2 bytes to user memory from kernel(DSP) memory
34 * escaping from unexpected byte swap using __arch_copy_to_user()
35 * in OMAP architecture.
36 * Params : to - user memory
37 * : from - kernel(DSP) memory
38 * Returns : success = 0, failure = 2
41 ENTRY(__arch_copy_to_user_dsp_2b)
45 USER( strbt r4, [r0], #1) @ May fault
46 USER( strbt r3, [r0], #1) @ May fault
48 LOADREGS(fd,sp!,{r4, pc})
53 LOADREGS(fd,sp!, {r4, pc})
56 /* Prototype: unsigned long __arch_copy_from_user_dsp_2b(void *to, const void *from);
57 * Purpose : copy 2 bytes from user memory to kernel(DSP) memory
58 * escaping from unexpected byte swap using __arch_copy_to_user()
59 * in OMAP architecture.
60 * Params : to - kernel (DSP) memory
61 * : from - user memory
62 * Returns : success = 0, failure = 2
65 ENTRY(__arch_copy_from_user_dsp_2b)
67 USER( ldrbt r3, [r1], #1) @ May fault
68 USER( ldrbt r4, [r1], #1) @ May fault
72 LOADREGS(fd,sp!,{r4, pc})
79 LOADREGS(fd,sp!, {r4, pc})