blob: d1a0f80c4a99311f211eca147ad8bc27a636c3d0 [file] [log] [blame]
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Mock IO functions.
*
* Copyright (C) 2018, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#ifndef _ASM_UM_IO_MOCK_H
#define _ASM_UM_IO_MOCK_H
#include <asm/io-mock-shared.h>
#include <test/mock.h>
DECLARE_FUNCTION_MOCK(readb,
RETURNS(u8), PARAMS(const volatile void __iomem *));
DECLARE_FUNCTION_MOCK(readw,
RETURNS(u16), PARAMS(const volatile void __iomem *));
DECLARE_FUNCTION_MOCK(readl,
RETURNS(u32), PARAMS(const volatile void __iomem *));
#ifdef CONFIG_64BIT
DECLARE_FUNCTION_MOCK(readq,
RETURNS(u64), PARAMS(const volatile void __iomem *));
#endif /* CONFIG_64BIT */
DECLARE_FUNCTION_MOCK_VOID_RETURN(writeb,
PARAMS(u8, const volatile void __iomem *));
DECLARE_FUNCTION_MOCK_VOID_RETURN(writew,
PARAMS(u16, const volatile void __iomem *));
DECLARE_FUNCTION_MOCK_VOID_RETURN(writel,
PARAMS(u32, const volatile void __iomem *));
#ifdef CONFIG_64BIT
DECLARE_FUNCTION_MOCK_VOID_RETURN(writeq,
PARAMS(u64, const volatile void __iomem *));
#endif /* CONFIG_64BIT */
#endif /* _ASM_UM_IO_MOCK_H */