/* This functions needs to act like a macro to avoid pipeline reloads in the loops below. Use always_inline. This gains us about 160KiB/s and the bloat appears to be zero bytes (da830).  */
__attribute__((always_inline))
/* This functions needs to act like a macro to avoid pipeline reloads in the loops below. Use always_inline. This gains us about 160KiB/s and the bloat appears to be zero bytes (da830).  */
__attribute__((always_inline))
{
	u32	buf_reg_val;
	writel(data, &ds->regs->dat1);
	while ((buf_reg_val = readl(&ds->regs->buf)) & SPIBUF_RXEMPTY_MASK)
		;
	return buf_reg_val;
}