NFSv4.1/flexfiles: Fix a protocol error in layoutreturn
[linux/fpc-iii.git] / arch / blackfin / include / asm / bfin_sport.h
blob50b9dfd4839f7b5bf12ccb5a9e8e0063f689e125
1 /*
2 * bfin_sport.h - interface to Blackfin SPORTs
4 * Copyright 2004-2009 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
8 #ifndef __BFIN_SPORT_H__
9 #define __BFIN_SPORT_H__
12 #include <linux/types.h>
13 #include <uapi/asm/bfin_sport.h>
16 * All Blackfin system MMRs are padded to 32bits even if the register
17 * itself is only 16bits. So use a helper macro to streamline this.
19 #define __BFP(m) u16 m; u16 __pad_##m
20 struct sport_register {
21 __BFP(tcr1);
22 __BFP(tcr2);
23 __BFP(tclkdiv);
24 __BFP(tfsdiv);
25 union {
26 u32 tx32;
27 u16 tx16;
29 u32 __pad_tx;
30 union {
31 u32 rx32; /* use the anomaly wrapper below */
32 u16 rx16;
34 u32 __pad_rx;
35 __BFP(rcr1);
36 __BFP(rcr2);
37 __BFP(rclkdiv);
38 __BFP(rfsdiv);
39 __BFP(stat);
40 __BFP(chnl);
41 __BFP(mcmc1);
42 __BFP(mcmc2);
43 u32 mtcs0;
44 u32 mtcs1;
45 u32 mtcs2;
46 u32 mtcs3;
47 u32 mrcs0;
48 u32 mrcs1;
49 u32 mrcs2;
50 u32 mrcs3;
52 #undef __BFP
54 struct bfin_snd_platform_data {
55 const unsigned short *pin_req;
58 #define bfin_read_sport_rx32(base) \
59 ({ \
60 struct sport_register *__mmrs = (void *)base; \
61 u32 __ret; \
62 unsigned long flags; \
63 if (ANOMALY_05000473) \
64 local_irq_save(flags); \
65 __ret = __mmrs->rx32; \
66 if (ANOMALY_05000473) \
67 local_irq_restore(flags); \
68 __ret; \
71 #endif