hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/char/tpm/tpm_tis.c
....@@ -50,31 +50,6 @@
5050 return container_of(data, struct tpm_tis_tcg_phy, priv);
5151 }
5252
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
-
7853 static int interrupts = -1;
7954 module_param(interrupts, int, 0444);
8055 MODULE_PARM_DESC(interrupts, "Enable interrupts");
....@@ -194,7 +169,7 @@
194169 struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
195170
196171 while (len--)
197
- tpm_tis_iowrite8(*value++, phy->iobase, addr);
172
+ iowrite8(*value++, phy->iobase + addr);
198173
199174 return 0;
200175 }
....@@ -221,7 +196,7 @@
221196 {
222197 struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
223198
224
- tpm_tis_iowrite32(value, phy->iobase, addr);
199
+ iowrite32(value, phy->iobase + addr);
225200
226201 return 0;
227202 }