From 347f24fdad5a0e9fa4c93173630ceb50b09b5a28 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 20 Mar 2024 02:44:57 +0000 Subject: [PATCH] start implementing io_mapping --- sys/dev/pci/drm/include/linux/io-mapping.h | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sys/dev/pci/drm/include/linux/io-mapping.h b/sys/dev/pci/drm/include/linux/io-mapping.h index 7a49ffef9da..87930d29761 100644 --- a/sys/dev/pci/drm/include/linux/io-mapping.h +++ b/sys/dev/pci/drm/include/linux/io-mapping.h @@ -3,4 +3,34 @@ #ifndef _LINUX_IO_MAPPING_H #define _LINUX_IO_MAPPING_H +#include + +struct io_mapping { + resource_size_t base; + unsigned long size; + void *iomem; +}; + +static inline void * +io_mapping_map_wc(struct io_mapping *map, unsigned long off, unsigned long size) +{ + return ((uint8_t *)map->iomem + off); +} + +static inline void +io_mapping_unmap(void *va) +{ +} + +static inline void * +io_mapping_map_local_wc(struct io_mapping *map, unsigned long off) +{ + return ((uint8_t *)map->iomem + off); +} + +static inline void +io_mapping_unmap_local(void *va) +{ +} + #endif -- 2.20.1