relay: add buffer-only channels; useful for early logging
[linux-2.6/mini2440.git] / include / linux / firmware-map.h
blobacbdbcc160518ab81fb7c7197d661a37b5303aab
1 /*
2 * include/linux/firmware-map.h:
3 * Copyright (C) 2008 SUSE LINUX Products GmbH
4 * by Bernhard Walle <bwalle@suse.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License v2.0 as published by
8 * the Free Software Foundation
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #ifndef _LINUX_FIRMWARE_MAP_H
17 #define _LINUX_FIRMWARE_MAP_H
19 #include <linux/list.h>
20 #include <linux/kobject.h>
23 * provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled
25 #ifdef CONFIG_FIRMWARE_MEMMAP
27 /**
28 * Adds a firmware mapping entry. This function uses kmalloc() for memory
29 * allocation. Use firmware_map_add_early() if you want to use the bootmem
30 * allocator.
32 * That function must be called before late_initcall.
34 * @start: Start of the memory range.
35 * @end: End of the memory range (inclusive).
36 * @type: Type of the memory range.
38 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
40 int firmware_map_add(resource_size_t start, resource_size_t end,
41 const char *type);
43 /**
44 * Adds a firmware mapping entry. This function uses the bootmem allocator
45 * for memory allocation. Use firmware_map_add() if you want to use kmalloc().
47 * That function must be called before late_initcall.
49 * @start: Start of the memory range.
50 * @end: End of the memory range (inclusive).
51 * @type: Type of the memory range.
53 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
55 int firmware_map_add_early(resource_size_t start, resource_size_t end,
56 const char *type);
58 #else /* CONFIG_FIRMWARE_MEMMAP */
60 static inline int firmware_map_add(resource_size_t start, resource_size_t end,
61 const char *type)
63 return 0;
66 static inline int firmware_map_add_early(resource_size_t start,
67 resource_size_t end, const char *type)
69 return 0;
72 #endif /* CONFIG_FIRMWARE_MEMMAP */
74 #endif /* _LINUX_FIRMWARE_MAP_H */