Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
39340925
Commit
39340925
authored
Oct 03, 2009
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugzilla-14081' into release
parents
6effe5f5
478fa03b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
6 deletions
+46
-6
drivers/acpi/ec.c
drivers/acpi/ec.c
+46
-6
No files found.
drivers/acpi/ec.c
View file @
39340925
...
...
@@ -119,6 +119,8 @@ static struct acpi_ec {
}
*
boot_ec
,
*
first_ec
;
static
int
EC_FLAGS_MSI
;
/* Out-of-spec MSI controller */
static
int
EC_FLAGS_VALIDATE_ECDT
;
/* ASUStec ECDTs need to be validated */
static
int
EC_FLAGS_SKIP_DSDT_SCAN
;
/* Not all BIOS survive early DSDT scan */
/* --------------------------------------------------------------------------
Transaction Management
...
...
@@ -897,6 +899,44 @@ static const struct acpi_device_id ec_device_ids[] = {
{
""
,
0
},
};
/* Some BIOS do not survive early DSDT scan, skip it */
static
int
ec_skip_dsdt_scan
(
const
struct
dmi_system_id
*
id
)
{
EC_FLAGS_SKIP_DSDT_SCAN
=
1
;
return
0
;
}
/* ASUStek often supplies us with broken ECDT, validate it */
static
int
ec_validate_ecdt
(
const
struct
dmi_system_id
*
id
)
{
EC_FLAGS_VALIDATE_ECDT
=
1
;
return
0
;
}
/* MSI EC needs special treatment, enable it */
static
int
ec_flag_msi
(
const
struct
dmi_system_id
*
id
)
{
EC_FLAGS_MSI
=
1
;
EC_FLAGS_VALIDATE_ECDT
=
1
;
return
0
;
}
static
struct
dmi_system_id
__initdata
ec_dmi_table
[]
=
{
{
ec_skip_dsdt_scan
,
"Compal JFL92"
,
{
DMI_MATCH
(
DMI_BIOS_VENDOR
,
"COMPAL"
),
DMI_MATCH
(
DMI_BOARD_NAME
,
"JFL92"
)
},
NULL
},
{
ec_flag_msi
,
"MSI hardware"
,
{
DMI_MATCH
(
DMI_BIOS_VENDOR
,
"Micro-Star"
),
DMI_MATCH
(
DMI_CHASSIS_VENDOR
,
"MICRO-Star"
)
},
NULL
},
{
ec_validate_ecdt
,
"ASUS hardware"
,
{
DMI_MATCH
(
DMI_BIOS_VENDOR
,
"ASUS"
)
},
NULL
},
{},
};
int
__init
acpi_ec_ecdt_probe
(
void
)
{
acpi_status
status
;
...
...
@@ -909,11 +949,7 @@ int __init acpi_ec_ecdt_probe(void)
/*
* Generate a boot ec context
*/
if
(
dmi_name_in_vendors
(
"Micro-Star"
)
||
dmi_name_in_vendors
(
"Notebook"
))
{
pr_info
(
PREFIX
"Enabling special treatment for EC from MSI.
\n
"
);
EC_FLAGS_MSI
=
1
;
}
dmi_check_system
(
ec_dmi_table
);
status
=
acpi_get_table
(
ACPI_SIG_ECDT
,
1
,
(
struct
acpi_table_header
**
)
&
ecdt_ptr
);
if
(
ACPI_SUCCESS
(
status
))
{
...
...
@@ -924,7 +960,7 @@ int __init acpi_ec_ecdt_probe(void)
boot_ec
->
handle
=
ACPI_ROOT_OBJECT
;
acpi_get_handle
(
ACPI_ROOT_OBJECT
,
ecdt_ptr
->
id
,
&
boot_ec
->
handle
);
/* Don't trust ECDT, which comes from ASUSTek */
if
(
!
dmi_name_in_vendors
(
"ASUS"
)
&&
EC_FLAGS_MSI
==
0
)
if
(
!
EC_FLAGS_VALIDATE_ECDT
)
goto
install
;
saved_ec
=
kmalloc
(
sizeof
(
struct
acpi_ec
),
GFP_KERNEL
);
if
(
!
saved_ec
)
...
...
@@ -932,6 +968,10 @@ int __init acpi_ec_ecdt_probe(void)
memcpy
(
saved_ec
,
boot_ec
,
sizeof
(
struct
acpi_ec
));
/* fall through */
}
if
(
EC_FLAGS_SKIP_DSDT_SCAN
)
return
-
ENODEV
;
/* This workaround is needed only on some broken machines,
* which require early EC, but fail to provide ECDT */
printk
(
KERN_DEBUG
PREFIX
"Look up EC in DSDT
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment