2 * Copyright (C) 2008 Michal Simek <monstr@monstr.eu>
3 * Copyright (C) 2006 Atmark Techno, Inc.
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
10 #ifndef _ASM_MICROBLAZE_CHECKSUM_H
11 #define _ASM_MICROBLAZE_CHECKSUM_H
14 * computes the checksum of the TCP/UDP pseudo-header
15 * returns a 16-bit checksum, already complemented
17 #define csum_tcpudp_nofold csum_tcpudp_nofold
19 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
20 unsigned short proto, __wsum sum)
22 __asm__("add %0, %0, %1\n\t"
27 : "d" (saddr), "d" (daddr),
28 #ifdef __MICROBLAZEEL__
29 "d" ((len + proto) << 8)
37 #include <asm-generic/checksum.h>
39 #endif /* _ASM_MICROBLAZE_CHECKSUM_H */