@@ -101,11 +101,15 @@ static int __opb_write(struct fsi_master_aspeed *aspeed, u32 addr,
101
101
u32 reg , status ;
102
102
int ret ;
103
103
104
- writel (CMD_WRITE , base + OPB0_RW );
105
- writel (transfer_size , base + OPB0_XFER_SIZE );
106
- writel (addr , base + OPB0_FSI_ADDR );
107
- writel (val , base + OPB0_FSI_DATA_W );
108
- writel (0x1 , base + OPB_IRQ_CLEAR );
104
+ /*
105
+ * The ordering of these writes up until the trigger
106
+ * write does not matter, so use writel_relaxed.
107
+ */
108
+ writel_relaxed (CMD_WRITE , base + OPB0_RW );
109
+ writel_relaxed (transfer_size , base + OPB0_XFER_SIZE );
110
+ writel_relaxed (addr , base + OPB0_FSI_ADDR );
111
+ writel_relaxed (val , base + OPB0_FSI_DATA_W );
112
+ writel_relaxed (0x1 , base + OPB_IRQ_CLEAR );
109
113
writel (0x1 , base + OPB_TRIGGER );
110
114
111
115
ret = readl_poll_timeout (base + OPB_IRQ_STATUS , reg ,
@@ -149,10 +153,14 @@ static int __opb_read(struct fsi_master_aspeed *aspeed, uint32_t addr,
149
153
u32 result , reg ;
150
154
int status , ret ;
151
155
152
- writel (CMD_READ , base + OPB0_RW );
153
- writel (transfer_size , base + OPB0_XFER_SIZE );
154
- writel (addr , base + OPB0_FSI_ADDR );
155
- writel (0x1 , base + OPB_IRQ_CLEAR );
156
+ /*
157
+ * The ordering of these writes up until the trigger
158
+ * write does not matter, so use writel_relaxed.
159
+ */
160
+ writel_relaxed (CMD_READ , base + OPB0_RW );
161
+ writel_relaxed (transfer_size , base + OPB0_XFER_SIZE );
162
+ writel_relaxed (addr , base + OPB0_FSI_ADDR );
163
+ writel_relaxed (0x1 , base + OPB_IRQ_CLEAR );
156
164
writel (0x1 , base + OPB_TRIGGER );
157
165
158
166
ret = readl_poll_timeout (base + OPB_IRQ_STATUS , reg ,
0 commit comments