#include <linux/debugfs.h>
#include <linux/err.h>
+#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mailbox_client.h>
#include <linux/module.h>
struct mbox_test_device {
struct device *dev;
- void *mmio;
+ void __iomem *mmio;
struct mbox_chan *tx_channel;
struct mbox_chan *rx_channel;
char *rx_buffer;
if (tdev->mmio) {
print_hex_dump(KERN_INFO, "Client: Received [MMIO]: ",
DUMP_PREFIX_ADDRESS, MBOX_BYTES_PER_LINE, 1,
- tdev->mmio, MBOX_MAX_MSG_LEN, true);
- memcpy(tdev->rx_buffer, tdev->mmio, MBOX_MAX_MSG_LEN);
+ __io_virt(tdev->mmio), MBOX_MAX_MSG_LEN, true);
+ memcpy_fromio(tdev->rx_buffer, tdev->mmio, MBOX_MAX_MSG_LEN);
} else if (message) {
print_hex_dump(KERN_INFO, "Client: Received [API]: ",
if (tdev->mmio) {
if (tdev->signal)
- memcpy(tdev->mmio, tdev->message, MBOX_MAX_MSG_LEN);
+ memcpy_toio(tdev->mmio, tdev->message, MBOX_MAX_MSG_LEN);
else
- memcpy(tdev->mmio, message, MBOX_MAX_MSG_LEN);
+ memcpy_toio(tdev->mmio, message, MBOX_MAX_MSG_LEN);
}
}