1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2008 Michal Simek <monstr@monstr.eu>
4 * Copyright (C) 2006 Atmark Techno, Inc.
7 #ifndef _ASM_MICROBLAZE_CHECKSUM_H
8 #define _ASM_MICROBLAZE_CHECKSUM_H
11 * computes the checksum of the TCP/UDP pseudo-header
12 * returns a 16-bit checksum, already complemented
14 #define csum_tcpudp_nofold csum_tcpudp_nofold
16 csum_tcpudp_nofold(__be32 saddr
, __be32 daddr
, __u32 len
,
17 __u8 proto
, __wsum sum
)
19 __asm__("add %0, %0, %1\n\t"
24 : "d" (saddr
), "d" (daddr
),
25 #ifdef __MICROBLAZEEL__
26 "d" ((len
+ proto
) << 8)
34 #include <asm-generic/checksum.h>
36 #endif /* _ASM_MICROBLAZE_CHECKSUM_H */