blob: 4723bbfa1c2643fe004d36b5b44367644ea524d9 [file] [log] [blame]
Feng Tang13e82d02009-08-14 15:17:53 -04001/* sfi.h Simple Firmware Interface */
2
3/*
4
5 This file is provided under a dual BSD/GPLv2 license. When using or
6 redistributing this file, you may do so under either license.
7
8 GPL LICENSE SUMMARY
9
10 Copyright(c) 2009 Intel Corporation. All rights reserved.
11
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of version 2 of the GNU General Public License as
14 published by the Free Software Foundation.
15
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
24 The full GNU General Public License is included in this distribution
25 in the file called LICENSE.GPL.
26
27 BSD LICENSE
28
29 Copyright(c) 2009 Intel Corporation. All rights reserved.
30
31 Redistribution and use in source and binary forms, with or without
32 modification, are permitted provided that the following conditions
33 are met:
34
35 * Redistributions of source code must retain the above copyright
36 notice, this list of conditions and the following disclaimer.
37 * Redistributions in binary form must reproduce the above copyright
38 notice, this list of conditions and the following disclaimer in
39 the documentation and/or other materials provided with the
40 distribution.
41 * Neither the name of Intel Corporation nor the names of its
42 contributors may be used to endorse or promote products derived
43 from this software without specific prior written permission.
44
45 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
46 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
47 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
48 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
49 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
50 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
51 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
52 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
53 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
54 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
55 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56
57*/
58
59#ifndef _LINUX_SFI_ACPI_H
60#define _LINUX_SFI_ACPI_H
61
Lv Zhengc099eac2013-12-06 16:51:59 +080062#include <linux/acpi.h>
63#include <linux/sfi.h>
64
Feng Tang13e82d02009-08-14 15:17:53 -040065#ifdef CONFIG_SFI
Lv Zheng8b484632013-12-03 08:49:16 +080066#include <acpi/acpi.h> /* FIXME: inclusion should be removed */
Feng Tang13e82d02009-08-14 15:17:53 -040067
68extern int sfi_acpi_table_parse(char *signature, char *oem_id,
69 char *oem_table_id,
70 int (*handler)(struct acpi_table_header *));
71
Jiang Liu39703852012-06-22 14:55:21 +080072static inline int __init acpi_sfi_table_parse(char *signature,
Feng Tang13e82d02009-08-14 15:17:53 -040073 int (*handler)(struct acpi_table_header *))
74{
75 if (!acpi_table_parse(signature, handler))
76 return 0;
77
78 return sfi_acpi_table_parse(signature, NULL, NULL, handler);
79}
80#else /* !CONFIG_SFI */
81
82static inline int sfi_acpi_table_parse(char *signature, char *oem_id,
83 char *oem_table_id,
84 int (*handler)(struct acpi_table_header *))
85{
86 return -1;
87}
88
Jiang Liu39703852012-06-22 14:55:21 +080089static inline int __init acpi_sfi_table_parse(char *signature,
Feng Tang13e82d02009-08-14 15:17:53 -040090 int (*handler)(struct acpi_table_header *))
91{
92 return acpi_table_parse(signature, handler);
93}
94#endif /* !CONFIG_SFI */
95
96#endif /*_LINUX_SFI_ACPI_H*/