.. | .. |
---|
50 | 50 | return container_of(data, struct tpm_tis_tcg_phy, priv); |
---|
51 | 51 | } |
---|
52 | 52 | |
---|
53 | | -#ifdef CONFIG_PREEMPT_RT |
---|
54 | | -/* |
---|
55 | | - * Flushes previous write operations to chip so that a subsequent |
---|
56 | | - * ioread*()s won't stall a cpu. |
---|
57 | | - */ |
---|
58 | | -static inline void tpm_tis_flush(void __iomem *iobase) |
---|
59 | | -{ |
---|
60 | | - ioread8(iobase + TPM_ACCESS(0)); |
---|
61 | | -} |
---|
62 | | -#else |
---|
63 | | -#define tpm_tis_flush(iobase) do { } while (0) |
---|
64 | | -#endif |
---|
65 | | - |
---|
66 | | -static inline void tpm_tis_iowrite8(u8 b, void __iomem *iobase, u32 addr) |
---|
67 | | -{ |
---|
68 | | - iowrite8(b, iobase + addr); |
---|
69 | | - tpm_tis_flush(iobase); |
---|
70 | | -} |
---|
71 | | - |
---|
72 | | -static inline void tpm_tis_iowrite32(u32 b, void __iomem *iobase, u32 addr) |
---|
73 | | -{ |
---|
74 | | - iowrite32(b, iobase + addr); |
---|
75 | | - tpm_tis_flush(iobase); |
---|
76 | | -} |
---|
77 | | - |
---|
78 | 53 | static int interrupts = -1; |
---|
79 | 54 | module_param(interrupts, int, 0444); |
---|
80 | 55 | MODULE_PARM_DESC(interrupts, "Enable interrupts"); |
---|
.. | .. |
---|
194 | 169 | struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data); |
---|
195 | 170 | |
---|
196 | 171 | while (len--) |
---|
197 | | - tpm_tis_iowrite8(*value++, phy->iobase, addr); |
---|
| 172 | + iowrite8(*value++, phy->iobase + addr); |
---|
198 | 173 | |
---|
199 | 174 | return 0; |
---|
200 | 175 | } |
---|
.. | .. |
---|
221 | 196 | { |
---|
222 | 197 | struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data); |
---|
223 | 198 | |
---|
224 | | - tpm_tis_iowrite32(value, phy->iobase, addr); |
---|
| 199 | + iowrite32(value, phy->iobase + addr); |
---|
225 | 200 | |
---|
226 | 201 | return 0; |
---|
227 | 202 | } |
---|