#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/device.h>
phys_addr_t channels_phys;
unsigned int sw_nmasters;
static struct intel_th_channel __iomem *
sth_channel(struct sth_device *sth, unsigned int master, unsigned int channel)
struct intel_th_channel __iomem *sw_map = sth->channels;
return &sw_map[(master - sth->stm.sw_start) * sth->stm.sw_nchannels +
static void sth_iowrite(void __iomem *dest, const unsigned char *payload,
writeq_relaxed(*(u64 *)payload, dest);
writel_relaxed(*(u32 *)payload, dest);
writew_relaxed(*(u16 *)payload, dest);
writeb_relaxed(*(u8 *)payload, dest);
static ssize_t notrace sth_stm_packet(struct stm_data *stm_data,