lpc_aspeed: add mapping implementation
Add mapper implementation for Aspeed.
Change-Id: I4bc1cbaaa6c0bf57424b0c881cb087153d63597c
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/internal/sys.cpp b/internal/sys.cpp
index b61dfea..c87d5e6 100644
--- a/internal/sys.cpp
+++ b/internal/sys.cpp
@@ -17,6 +17,7 @@
#include "sys.hpp"
#include <fcntl.h>
+#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
@@ -53,6 +54,11 @@
return ::getpagesize();
}
+int SysImpl::ioctl(int fd, unsigned long request, void* param) const
+{
+ return ::ioctl(fd, request, param);
+}
+
SysImpl sys_impl;
} // namespace internal
diff --git a/internal/sys.hpp b/internal/sys.hpp
index fb824ef..9327799 100644
--- a/internal/sys.hpp
+++ b/internal/sys.hpp
@@ -34,6 +34,7 @@
off_t offset) const = 0;
virtual int munmap(void* addr, size_t length) const = 0;
virtual int getpagesize() const = 0;
+ virtual int ioctl(int fd, unsigned long request, void* param) const = 0;
};
/**
@@ -50,6 +51,7 @@
off_t offset) const override;
int munmap(void* addr, size_t length) const override;
int getpagesize() const override;
+ int ioctl(int fd, unsigned long request, void* param) const override;
};
/** @brief Default instantiation of sys */