View | Details | Raw Unified | Return to bug 3774 | Differences between
and this patch

Collapse All | Expand All

(-)1.39/drivers/acpi/Kconfig (-5 / +12 lines)
Lines 233-252 config ACPI_TOSHIBA Link Here
233
	  If you have a legacy free Toshiba laptop (such as the Libretto L1
233
	  If you have a legacy free Toshiba laptop (such as the Libretto L1
234
	  series), say Y.
234
	  series), say Y.
235
235
236
config ACPI_CUSTOM_DSDT
236
config ACPI_CUSTOM_TABLES
237
	bool "Include Custom DSDT"
237
	bool "Include Custom System Description Tables"
238
	depends on ACPI_INTERPRETER && !STANDALONE
238
	depends on ACPI_INTERPRETER && !STANDALONE
239
	default n 
239
	default n 
240
	help
240
	help
241
	  Thist option is to load a custom ACPI DSDT
241
	  This option is to load custom ACPI System Description Tables.
242
	  If you don't know what that is, say N.
242
	  If you don't know what that is, say N.
243
243
244
config ACPI_CUSTOM_DSDT_FILE
244
config ACPI_CUSTOM_DSDT_FILE
245
	string "Custom DSDT Table file to include"
245
	string "Custom DSDT Table file to include"
246
	depends on ACPI_CUSTOM_DSDT
246
	depends on ACPI_CUSTOM_TABLES
247
	default ""
247
	default ""
248
	help
248
	help
249
	  Enter the full path name to the file wich includes the AmlCode declaration.
249
	  Enter the full path name to the DSDT file wich includes the AmlCode declaration.
250
251
config ACPI_CUSTOM_SSDT_FILE
252
	string "Custom SSDT Table file to include"
253
	depends on ACPI_CUSTOM_TABLES
254
	default ""
255
	help
256
	  Enter the full path name to the SSDT file wich includes the AmlCode declaration.
250
257
251
config ACPI_BLACKLIST_YEAR
258
config ACPI_BLACKLIST_YEAR
252
	int "Disable ACPI for systems before Jan 1st this year"
259
	int "Disable ACPI for systems before Jan 1st this year"
(-)1.39/drivers/acpi/Makefile (+11 lines)
Lines 28-33 obj-$(CONFIG_ACPI_INTERPRETER) += osl.o Link Here
28
				   namespace/ parser/ resources/ tables/ \
28
				   namespace/ parser/ resources/ tables/ \
29
				   utilities/
29
				   utilities/
30
30
31
ifeq ($(CONFIG_ACPI_CUSTOM_TABLES), y)
32
	ifneq ($(CONFIG_ACPI_CUSTOM_DSDT_FILE), "")
33
		ACPI_CFLAGS += -DACPI_CUSTOM_DSDT
34
		obj-$(CONFIG_ACPI_INTERPRETER) += dsdt.o
35
	endif
36
	ifneq ($(CONFIG_ACPI_CUSTOM_SSDT_FILE), "")
37
		ACPI_CFLAGS += -DACPI_CUSTOM_SSDT
38
		obj-$(CONFIG_ACPI_INTERPRETER) += ssdt.o
39
	endif
40
endif
41
31
#
42
#
32
# ACPI Bus and Device Drivers
43
# ACPI Bus and Device Drivers
33
#
44
#
(-)1.59/drivers/acpi/osl.c (-9 / +22 lines)
Lines 55-62 struct acpi_os_dpc Link Here
55
    void		    *context;
55
    void		    *context;
56
};
56
};
57
57
58
#ifdef CONFIG_ACPI_CUSTOM_DSDT
58
#ifdef CONFIG_ACPI_CUSTOM_TABLES
59
#include CONFIG_ACPI_CUSTOM_DSDT_FILE
59
extern struct acpi_table_header *acpi_table_dsdt(void);
60
extern struct acpi_table_header *acpi_table_ssdt(void);
60
#endif
61
#endif
61
62
62
#ifdef ENABLE_DEBUGGER
63
#ifdef ENABLE_DEBUGGER
Lines 244-257 acpi_os_table_override (struct acpi_tabl Link Here
244
	if (!existing_table || !new_table)
245
	if (!existing_table || !new_table)
245
		return AE_BAD_PARAMETER;
246
		return AE_BAD_PARAMETER;
246
247
247
#ifdef CONFIG_ACPI_CUSTOM_DSDT
248
	if (strncmp(existing_table->signature, "DSDT", 4) == 0)
249
		*new_table = (struct acpi_table_header*)AmlCode;
250
	else
251
		*new_table = NULL;
252
#else
253
	*new_table = NULL;
248
	*new_table = NULL;
254
#endif
249
250
#ifdef CONFIG_ACPI_CUSTOM_TABLES
251
# ifdef ACPI_CUSTOM_DSDT
252
	if (strncmp(existing_table->signature, "DSDT", 4) == 0)
253
		*new_table = acpi_table_dsdt();
254
# endif
255
# ifdef ACPI_CUSTOM_SSDT
256
	if (strncmp(existing_table->signature, "SSDT", 4) == 0) {
257
		static int ssdt_overrided = 0;
258
259
		if (ssdt_overrided)
260
			return AE_ALREADY_EXISTS;
261
262
		*new_table = acpi_table_ssdt();
263
		ssdt_overrided = 1;
264
	}
265
# endif
266
#endif	/* CONFIG_ACPI_CUSTOM_TABLES */
267
255
	return AE_OK;
268
	return AE_OK;
256
}
269
}
257
270
(-) (+34 lines)
Added Link Here
1
/*
2
 *  dsdt.c - DSDT override approach
3
 *
4
 *  Copyright (C) 2004 Zhu Yi <yi.zhu@intel.com>
5
 *
6
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7
 *
8
 *  This program is free software; you can redistribute it and/or modify
9
 *  it under the terms of the GNU General Public License as published by
10
 *  the Free Software Foundation; either version 2 of the License, or
11
 *  (at your option) any later version.
12
 *
13
 *  This program is distributed in the hope that it will be useful,
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 *  GNU General Public License for more details.
17
 *
18
 *  You should have received a copy of the GNU General Public License
19
 *  along with this program; if not, write to the Free Software
20
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
 *
22
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
 *
24
 */
25
26
#include <linux/config.h>
27
28
static
29
#include CONFIG_ACPI_CUSTOM_DSDT_FILE
30
31
struct acpi_table_header * acpi_table_dsdt(void)
32
{
33
	return (struct acpi_table_header *)AmlCode;
34
}
(-) (+34 lines)
Added Link Here
1
/*
2
 *  ssdt.c - SSDT override approach
3
 *
4
 *  Copyright (C) 2004 Zhu Yi <yi.zhu@intel.com>
5
 *
6
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7
 *
8
 *  This program is free software; you can redistribute it and/or modify
9
 *  it under the terms of the GNU General Public License as published by
10
 *  the Free Software Foundation; either version 2 of the License, or
11
 *  (at your option) any later version.
12
 *
13
 *  This program is distributed in the hope that it will be useful,
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 *  GNU General Public License for more details.
17
 *
18
 *  You should have received a copy of the GNU General Public License
19
 *  along with this program; if not, write to the Free Software
20
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
 *
22
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
 *
24
 */
25
26
#include <linux/config.h>
27
28
static
29
#include CONFIG_ACPI_CUSTOM_SSDT_FILE
30
31
struct acpi_table_header * acpi_table_ssdt(void)
32
{
33
	return (struct acpi_table_header *)AmlCode;
34
}

Return to bug 3774