Dan Williams | 6bc7561 | 2015-06-17 17:23:32 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright(c) 2013-2015 Intel Corporation. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of version 2 of the GNU General Public License as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, but |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 | * General Public License for more details. |
| 12 | */ |
| 13 | #ifndef __NFIT_TEST_H__ |
| 14 | #define __NFIT_TEST_H__ |
Dan Williams | f295e53 | 2016-06-17 11:08:06 -0700 | [diff] [blame] | 15 | #include <linux/list.h> |
Dan Williams | 6bc7561 | 2015-06-17 17:23:32 -0400 | [diff] [blame] | 16 | |
| 17 | struct nfit_test_resource { |
| 18 | struct list_head list; |
| 19 | struct resource *res; |
| 20 | struct device *dev; |
| 21 | void *buf; |
| 22 | }; |
| 23 | |
| 24 | typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t); |
| 25 | void __iomem *__wrap_ioremap_nocache(resource_size_t offset, |
| 26 | unsigned long size); |
| 27 | void __wrap_iounmap(volatile void __iomem *addr); |
| 28 | void nfit_test_setup(nfit_test_lookup_fn lookup); |
| 29 | void nfit_test_teardown(void); |
Dan Williams | f295e53 | 2016-06-17 11:08:06 -0700 | [diff] [blame] | 30 | struct nfit_test_resource *get_nfit_res(resource_size_t resource); |
Dan Williams | 6bc7561 | 2015-06-17 17:23:32 -0400 | [diff] [blame] | 31 | #endif |