/* meson_spifc_fill_buffer() - copy data from memory to device buffer @spifc: the Meson SPI device @buf: the source buffer @len: number of bytes to copy  */
static void meson_spifc_fill_buffer(struct meson_spifc_priv *spifc, const u8 *buf, int len)
/* meson_spifc_fill_buffer() - copy data from memory to device buffer @spifc: the Meson SPI device @buf: the source buffer @len: number of bytes to copy  */
static void meson_spifc_fill_buffer(struct meson_spifc_priv *spifc, const u8 *buf, int len)
{
	u32 data = 0;
	int i = 0;
	while (i < len) {
		if (len - i >= 4)
			data = *(u32 *)buf;
		else
			memcpy(&data, buf, len - i);
		regmap_write(spifc->regmap, REG_C0 + i, data);
		buf += 4;
		i += 4;
	}
}