Thomas Gleixner | d952367 | 2019-05-29 07:18:01 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Bernhard Walle | 69ac9cd | 2008-06-27 13:12:54 +0200 | [diff] [blame] | 2 | /* |
| 3 | * include/linux/firmware-map.h: |
| 4 | * Copyright (C) 2008 SUSE LINUX Products GmbH |
Bernhard Walle | 97bef7d | 2009-02-18 14:48:40 -0800 | [diff] [blame] | 5 | * by Bernhard Walle <bernhard.walle@gmx.de> |
Bernhard Walle | 69ac9cd | 2008-06-27 13:12:54 +0200 | [diff] [blame] | 6 | */ |
| 7 | #ifndef _LINUX_FIRMWARE_MAP_H |
| 8 | #define _LINUX_FIRMWARE_MAP_H |
| 9 | |
| 10 | #include <linux/list.h> |
Bernhard Walle | 69ac9cd | 2008-06-27 13:12:54 +0200 | [diff] [blame] | 11 | |
| 12 | /* |
| 13 | * provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled |
| 14 | */ |
| 15 | #ifdef CONFIG_FIRMWARE_MEMMAP |
| 16 | |
Yinghai Lu | 3b0fde0 | 2009-06-16 15:31:16 -0700 | [diff] [blame] | 17 | int firmware_map_add_early(u64 start, u64 end, const char *type); |
akpm@linux-foundation.org | d96ae53 | 2010-03-05 13:41:58 -0800 | [diff] [blame] | 18 | int firmware_map_add_hotplug(u64 start, u64 end, const char *type); |
Yasuaki Ishimatsu | 46c66c4 | 2013-02-22 16:32:56 -0800 | [diff] [blame] | 19 | int firmware_map_remove(u64 start, u64 end, const char *type); |
Bernhard Walle | 69ac9cd | 2008-06-27 13:12:54 +0200 | [diff] [blame] | 20 | |
| 21 | #else /* CONFIG_FIRMWARE_MEMMAP */ |
| 22 | |
akpm@linux-foundation.org | d96ae53 | 2010-03-05 13:41:58 -0800 | [diff] [blame] | 23 | static inline int firmware_map_add_early(u64 start, u64 end, const char *type) |
Bernhard Walle | 69ac9cd | 2008-06-27 13:12:54 +0200 | [diff] [blame] | 24 | { |
| 25 | return 0; |
| 26 | } |
| 27 | |
akpm@linux-foundation.org | d96ae53 | 2010-03-05 13:41:58 -0800 | [diff] [blame] | 28 | static inline int firmware_map_add_hotplug(u64 start, u64 end, const char *type) |
Bernhard Walle | 69ac9cd | 2008-06-27 13:12:54 +0200 | [diff] [blame] | 29 | { |
| 30 | return 0; |
| 31 | } |
| 32 | |
Yasuaki Ishimatsu | 46c66c4 | 2013-02-22 16:32:56 -0800 | [diff] [blame] | 33 | static inline int firmware_map_remove(u64 start, u64 end, const char *type) |
| 34 | { |
| 35 | return 0; |
| 36 | } |
| 37 | |
Bernhard Walle | 69ac9cd | 2008-06-27 13:12:54 +0200 | [diff] [blame] | 38 | #endif /* CONFIG_FIRMWARE_MEMMAP */ |
| 39 | |
| 40 | #endif /* _LINUX_FIRMWARE_MAP_H */ |