Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
41788f5e
Commit
41788f5e
authored
May 08, 2003
by
Andy Grover
Browse files
Options
Browse Files
Download
Plain Diff
Merge groveronline.com:/root/bk/linux-2.5
into groveronline.com:/root/bk/linux-acpi
parents
f4b89042
55dcca60
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
186 additions
and
144 deletions
+186
-144
drivers/acpi/ec.c
drivers/acpi/ec.c
+11
-11
drivers/acpi/events/evgpe.c
drivers/acpi/events/evgpe.c
+2
-2
drivers/acpi/events/evgpeblk.c
drivers/acpi/events/evgpeblk.c
+2
-2
drivers/acpi/hardware/hwgpe.c
drivers/acpi/hardware/hwgpe.c
+12
-12
drivers/acpi/hardware/hwregs.c
drivers/acpi/hardware/hwregs.c
+56
-64
drivers/acpi/hardware/hwtimer.c
drivers/acpi/hardware/hwtimer.c
+1
-1
drivers/acpi/resources/rsxface.c
drivers/acpi/resources/rsxface.c
+9
-3
drivers/acpi/tables/tbconvrt.c
drivers/acpi/tables/tbconvrt.c
+88
-24
include/acpi/acconfig.h
include/acpi/acconfig.h
+1
-1
include/acpi/acglobal.h
include/acpi/acglobal.h
+2
-0
include/acpi/achware.h
include/acpi/achware.h
+2
-4
include/acpi/acmacros.h
include/acpi/acmacros.h
+0
-20
No files found.
drivers/acpi/ec.c
View file @
41788f5e
...
...
@@ -113,7 +113,7 @@ acpi_ec_wait (
switch
(
event
)
{
case
ACPI_EC_EVENT_OBF
:
do
{
acpi_hw_low_level_read
(
8
,
&
acpi_ec_status
,
&
ec
->
status_addr
,
0
);
acpi_hw_low_level_read
(
8
,
&
acpi_ec_status
,
&
ec
->
status_addr
);
if
(
acpi_ec_status
&
ACPI_EC_FLAG_OBF
)
return
0
;
udelay
(
ACPI_EC_UDELAY
);
...
...
@@ -121,7 +121,7 @@ acpi_ec_wait (
break
;
case
ACPI_EC_EVENT_IBE
:
do
{
acpi_hw_low_level_read
(
8
,
&
acpi_ec_status
,
&
ec
->
status_addr
,
0
);
acpi_hw_low_level_read
(
8
,
&
acpi_ec_status
,
&
ec
->
status_addr
);
if
(
!
(
acpi_ec_status
&
ACPI_EC_FLAG_IBF
))
return
0
;
udelay
(
ACPI_EC_UDELAY
);
...
...
@@ -161,18 +161,18 @@ acpi_ec_read (
spin_lock_irqsave
(
&
ec
->
lock
,
flags
);
acpi_hw_low_level_write
(
8
,
ACPI_EC_COMMAND_READ
,
&
ec
->
command_addr
,
0
);
acpi_hw_low_level_write
(
8
,
ACPI_EC_COMMAND_READ
,
&
ec
->
command_addr
);
result
=
acpi_ec_wait
(
ec
,
ACPI_EC_EVENT_IBE
);
if
(
result
)
goto
end
;
acpi_hw_low_level_write
(
8
,
address
,
&
ec
->
data_addr
,
0
);
acpi_hw_low_level_write
(
8
,
address
,
&
ec
->
data_addr
);
result
=
acpi_ec_wait
(
ec
,
ACPI_EC_EVENT_OBF
);
if
(
result
)
goto
end
;
acpi_hw_low_level_read
(
8
,
data
,
&
ec
->
data_addr
,
0
);
acpi_hw_low_level_read
(
8
,
data
,
&
ec
->
data_addr
);
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Read [%02x] from address [%02x]
\n
"
,
*
data
,
address
));
...
...
@@ -211,17 +211,17 @@ acpi_ec_write (
spin_lock_irqsave
(
&
ec
->
lock
,
flags
);
acpi_hw_low_level_write
(
8
,
ACPI_EC_COMMAND_WRITE
,
&
ec
->
command_addr
,
0
);
acpi_hw_low_level_write
(
8
,
ACPI_EC_COMMAND_WRITE
,
&
ec
->
command_addr
);
result
=
acpi_ec_wait
(
ec
,
ACPI_EC_EVENT_IBE
);
if
(
result
)
goto
end
;
acpi_hw_low_level_write
(
8
,
address
,
&
ec
->
data_addr
,
0
);
acpi_hw_low_level_write
(
8
,
address
,
&
ec
->
data_addr
);
result
=
acpi_ec_wait
(
ec
,
ACPI_EC_EVENT_IBE
);
if
(
result
)
goto
end
;
acpi_hw_low_level_write
(
8
,
data
,
&
ec
->
data_addr
,
0
);
acpi_hw_low_level_write
(
8
,
data
,
&
ec
->
data_addr
);
result
=
acpi_ec_wait
(
ec
,
ACPI_EC_EVENT_IBE
);
if
(
result
)
goto
end
;
...
...
@@ -310,12 +310,12 @@ acpi_ec_query (
*/
spin_lock_irqsave
(
&
ec
->
lock
,
flags
);
acpi_hw_low_level_write
(
8
,
ACPI_EC_COMMAND_QUERY
,
&
ec
->
command_addr
,
0
);
acpi_hw_low_level_write
(
8
,
ACPI_EC_COMMAND_QUERY
,
&
ec
->
command_addr
);
result
=
acpi_ec_wait
(
ec
,
ACPI_EC_EVENT_OBF
);
if
(
result
)
goto
end
;
acpi_hw_low_level_read
(
8
,
data
,
&
ec
->
data_addr
,
0
);
acpi_hw_low_level_read
(
8
,
data
,
&
ec
->
data_addr
);
if
(
!*
data
)
result
=
-
ENODATA
;
...
...
@@ -355,7 +355,7 @@ acpi_ec_gpe_query (
goto
end
;
spin_lock_irqsave
(
&
ec
->
lock
,
flags
);
acpi_hw_low_level_read
(
8
,
&
value
,
&
ec
->
command_addr
,
0
);
acpi_hw_low_level_read
(
8
,
&
value
,
&
ec
->
command_addr
);
spin_unlock_irqrestore
(
&
ec
->
lock
,
flags
);
/* TBD: Implement asynch events!
...
...
drivers/acpi/events/evgpe.c
View file @
41788f5e
...
...
@@ -170,7 +170,7 @@ acpi_ev_gpe_detect (
/* Read the Status Register */
status
=
acpi_hw_low_level_read
(
ACPI_GPE_REGISTER_WIDTH
,
&
in_value
,
&
gpe_register_info
->
status_address
,
0
);
&
gpe_register_info
->
status_address
);
gpe_register_info
->
status
=
(
u8
)
in_value
;
if
(
ACPI_FAILURE
(
status
))
{
goto
unlock_and_exit
;
...
...
@@ -179,7 +179,7 @@ acpi_ev_gpe_detect (
/* Read the Enable Register */
status
=
acpi_hw_low_level_read
(
ACPI_GPE_REGISTER_WIDTH
,
&
in_value
,
&
gpe_register_info
->
enable_address
,
0
);
&
gpe_register_info
->
enable_address
);
gpe_register_info
->
enable
=
(
u8
)
in_value
;
if
(
ACPI_FAILURE
(
status
))
{
goto
unlock_and_exit
;
...
...
drivers/acpi/events/evgpeblk.c
View file @
41788f5e
...
...
@@ -634,13 +634,13 @@ acpi_ev_create_gpe_info_blocks (
* by writing a '0'.
*/
status
=
acpi_hw_low_level_write
(
ACPI_GPE_REGISTER_WIDTH
,
0x00
,
&
this_register
->
enable_address
,
0
);
&
this_register
->
enable_address
);
if
(
ACPI_FAILURE
(
status
))
{
goto
error_exit
;
}
status
=
acpi_hw_low_level_write
(
ACPI_GPE_REGISTER_WIDTH
,
0xFF
,
&
this_register
->
status_address
,
0
);
&
this_register
->
status_address
);
if
(
ACPI_FAILURE
(
status
))
{
goto
error_exit
;
}
...
...
drivers/acpi/hardware/hwgpe.c
View file @
41788f5e
...
...
@@ -77,7 +77,7 @@ acpi_hw_enable_gpe (
* to enable the GPE, and write out the new register.
*/
status
=
acpi_hw_low_level_read
(
8
,
&
in_byte
,
&
gpe_event_info
->
register_info
->
enable_address
,
0
);
&
gpe_event_info
->
register_info
->
enable_address
);
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
}
...
...
@@ -85,7 +85,7 @@ acpi_hw_enable_gpe (
/* Write with the new GPE bit enabled */
status
=
acpi_hw_low_level_write
(
8
,
(
in_byte
|
gpe_event_info
->
bit_mask
),
&
gpe_event_info
->
register_info
->
enable_address
,
0
);
&
gpe_event_info
->
register_info
->
enable_address
);
return
(
status
);
}
...
...
@@ -164,7 +164,7 @@ acpi_hw_disable_gpe (
* and write out the new register value to disable the GPE.
*/
status
=
acpi_hw_low_level_read
(
8
,
&
in_byte
,
&
gpe_register_info
->
enable_address
,
0
);
&
gpe_register_info
->
enable_address
);
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
}
...
...
@@ -172,7 +172,7 @@ acpi_hw_disable_gpe (
/* Write the byte with this GPE bit cleared */
status
=
acpi_hw_low_level_write
(
8
,
(
in_byte
&
~
(
gpe_event_info
->
bit_mask
)),
&
gpe_register_info
->
enable_address
,
0
);
&
gpe_register_info
->
enable_address
);
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
}
...
...
@@ -246,7 +246,7 @@ acpi_hw_clear_gpe (
* clear this GPE.
*/
status
=
acpi_hw_low_level_write
(
8
,
gpe_event_info
->
bit_mask
,
&
gpe_event_info
->
register_info
->
status_address
,
0
);
&
gpe_event_info
->
register_info
->
status_address
);
return
(
status
);
}
...
...
@@ -293,7 +293,7 @@ acpi_hw_get_gpe_status (
/* GPE Enabled? */
status
=
acpi_hw_low_level_read
(
8
,
&
in_byte
,
&
gpe_register_info
->
enable_address
,
0
);
status
=
acpi_hw_low_level_read
(
8
,
&
in_byte
,
&
gpe_register_info
->
enable_address
);
if
(
ACPI_FAILURE
(
status
))
{
goto
unlock_and_exit
;
}
...
...
@@ -310,7 +310,7 @@ acpi_hw_get_gpe_status (
/* GPE active (set)? */
status
=
acpi_hw_low_level_read
(
8
,
&
in_byte
,
&
gpe_register_info
->
status_address
,
0
);
status
=
acpi_hw_low_level_read
(
8
,
&
in_byte
,
&
gpe_register_info
->
status_address
);
if
(
ACPI_FAILURE
(
status
))
{
goto
unlock_and_exit
;
}
...
...
@@ -360,7 +360,7 @@ acpi_hw_disable_gpe_block (
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
status
=
acpi_hw_low_level_write
(
8
,
0x00
,
&
gpe_block
->
register_info
[
i
].
enable_address
,
(
u32
)
i
);
&
gpe_block
->
register_info
[
i
].
enable_address
);
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
}
...
...
@@ -401,7 +401,7 @@ acpi_hw_clear_gpe_block (
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
status
=
acpi_hw_low_level_write
(
8
,
0xFF
,
&
gpe_block
->
register_info
[
i
].
status_address
,
(
u32
)
i
);
&
gpe_block
->
register_info
[
i
].
status_address
);
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
}
...
...
@@ -447,7 +447,7 @@ acpi_hw_disable_non_wakeup_gpe_block (
* will be using it to restore all the GPEs later.
*/
status
=
acpi_hw_low_level_read
(
8
,
&
in_value
,
&
gpe_register_info
->
enable_address
,
0
);
&
gpe_register_info
->
enable_address
);
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
}
...
...
@@ -458,7 +458,7 @@ acpi_hw_disable_non_wakeup_gpe_block (
* Disable all GPEs except wakeup GPEs.
*/
status
=
acpi_hw_low_level_write
(
8
,
gpe_register_info
->
wake_enable
,
&
gpe_register_info
->
enable_address
,
0
);
&
gpe_register_info
->
enable_address
);
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
}
...
...
@@ -539,7 +539,7 @@ acpi_hw_enable_non_wakeup_gpe_block (
* Blast them back in.
*/
status
=
acpi_hw_low_level_write
(
8
,
gpe_register_info
->
enable
,
&
gpe_register_info
->
enable_address
,
0
);
&
gpe_register_info
->
enable_address
);
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
}
...
...
drivers/acpi/hardware/hwregs.c
View file @
41788f5e
This diff is collapsed.
Click to expand it.
drivers/acpi/hardware/hwtimer.c
View file @
41788f5e
...
...
@@ -108,7 +108,7 @@ acpi_get_timer (
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
}
status
=
acpi_hw_low_level_read
(
32
,
ticks
,
&
acpi_gbl_FADT
->
xpm_tmr_blk
,
0
);
status
=
acpi_hw_low_level_read
(
32
,
ticks
,
&
acpi_gbl_FADT
->
xpm_tmr_blk
);
return_ACPI_STATUS
(
status
);
}
...
...
drivers/acpi/resources/rsxface.c
View file @
41788f5e
...
...
@@ -379,25 +379,31 @@ acpi_resource_to_address64 (
{
struct
acpi_resource_address16
*
address16
;
struct
acpi_resource_address32
*
address32
;
struct
acpi_resource_address64
*
address64
;
switch
(
resource
->
id
)
{
case
ACPI_RSTYPE_ADDRESS16
:
address16
=
(
struct
acpi_resource_address16
*
)
&
resource
->
data
;
ACPI_COPY_ADDRESS
(
out
,
address16
);
break
;
case
ACPI_RSTYPE_ADDRESS32
:
address32
=
(
struct
acpi_resource_address32
*
)
&
resource
->
data
;
ACPI_COPY_ADDRESS
(
out
,
address32
);
break
;
case
ACPI_RSTYPE_ADDRESS64
:
address64
=
(
struct
acpi_resource_address64
*
)
&
resource
->
data
;
ACPI_COPY_ADDRESS
(
out
,
address64
);
/* Simple copy for 64 bit source */
ACPI_MEMCPY
(
out
,
&
resource
->
data
,
sizeof
(
struct
acpi_resource_address64
));
break
;
default:
return
(
AE_BAD_PARAMETER
);
}
...
...
drivers/acpi/tables/tbconvrt.c
View file @
41788f5e
...
...
@@ -164,6 +164,36 @@ acpi_tb_convert_to_xsdt (
}
/******************************************************************************
*
* FUNCTION: acpi_tb_init_generic_address
*
* PARAMETERS: new_gas_struct - GAS struct to be initialized
* register_bit_width - Width of this register
* Address - Address of the register
*
* RETURN: None
*
* DESCRIPTION: Initialize a GAS structure.
*
******************************************************************************/
static
void
acpi_tb_init_generic_address
(
struct
acpi_generic_address
*
new_gas_struct
,
u8
register_bit_width
,
acpi_physical_address
address
)
{
ACPI_STORE_ADDRESS
(
new_gas_struct
->
address
,
address
);
new_gas_struct
->
address_space_id
=
ACPI_ADR_SPACE_SYSTEM_IO
;
new_gas_struct
->
register_bit_width
=
register_bit_width
;
new_gas_struct
->
register_bit_offset
=
0
;
new_gas_struct
->
reserved
=
0
;
}
/*******************************************************************************
*
* FUNCTION: acpi_tb_convert_fadt1
...
...
@@ -233,14 +263,34 @@ acpi_tb_convert_fadt1 (
/*
* Convert the V1.0 block addresses to V2.0 GAS structures
*/
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm1a_evt_blk
,
local_fadt
->
pm1_evt_len
,
local_fadt
->
V1_pm1a_evt_blk
);
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm1b_evt_blk
,
local_fadt
->
pm1_evt_len
,
local_fadt
->
V1_pm1b_evt_blk
);
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm1a_cnt_blk
,
local_fadt
->
pm1_cnt_len
,
local_fadt
->
V1_pm1a_cnt_blk
);
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm1b_cnt_blk
,
local_fadt
->
pm1_cnt_len
,
local_fadt
->
V1_pm1b_cnt_blk
);
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm2_cnt_blk
,
local_fadt
->
pm2_cnt_len
,
local_fadt
->
V1_pm2_cnt_blk
);
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm_tmr_blk
,
local_fadt
->
pm_tm_len
,
local_fadt
->
V1_pm_tmr_blk
);
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xgpe0_blk
,
0
,
local_fadt
->
V1_gpe0_blk
);
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xgpe1_blk
,
0
,
local_fadt
->
V1_gpe1_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm1a_evt_blk
,
local_fadt
->
pm1_evt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm1a_evt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm1b_evt_blk
,
local_fadt
->
pm1_evt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm1b_evt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm1a_cnt_blk
,
local_fadt
->
pm1_cnt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm1a_cnt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm1b_cnt_blk
,
local_fadt
->
pm1_cnt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm1b_cnt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm2_cnt_blk
,
local_fadt
->
pm2_cnt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm2_cnt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm_tmr_blk
,
local_fadt
->
pm_tm_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm_tmr_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xgpe0_blk
,
0
,
(
acpi_physical_address
)
local_fadt
->
V1_gpe0_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xgpe1_blk
,
0
,
(
acpi_physical_address
)
local_fadt
->
V1_gpe1_blk
);
/* Create separate GAS structs for the PM1 Enable registers */
acpi_tb_init_generic_address
(
&
acpi_gbl_xpm1a_enable
,
(
u8
)
ACPI_DIV_2
(
acpi_gbl_FADT
->
pm1_evt_len
),
(
acpi_physical_address
)
(
local_fadt
->
xpm1a_evt_blk
.
address
+
ACPI_DIV_2
(
acpi_gbl_FADT
->
pm1_evt_len
)));
acpi_tb_init_generic_address
(
&
acpi_gbl_xpm1b_enable
,
(
u8
)
ACPI_DIV_2
(
acpi_gbl_FADT
->
pm1_evt_len
),
(
acpi_physical_address
)
(
local_fadt
->
xpm1b_evt_blk
.
address
+
ACPI_DIV_2
(
acpi_gbl_FADT
->
pm1_evt_len
)));
}
...
...
@@ -282,44 +332,58 @@ acpi_tb_convert_fadt2 (
}
if
(
!
(
local_fadt
->
xpm1a_evt_blk
.
address
))
{
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm1a_evt_blk
,
local_fadt
->
pm1_evt_len
,
local_fadt
->
V1_pm1a_evt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm1a_evt_blk
,
local_fadt
->
pm1_evt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm1a_evt_blk
);
}
if
(
!
(
local_fadt
->
xpm1b_evt_blk
.
address
))
{
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm1b_evt_blk
,
local_fadt
->
pm1_evt_len
,
local_fadt
->
V1_pm1b_evt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm1b_evt_blk
,
local_fadt
->
pm1_evt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm1b_evt_blk
);
}
if
(
!
(
local_fadt
->
xpm1a_cnt_blk
.
address
))
{
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm1a_cnt_blk
,
local_fadt
->
pm1_cnt_len
,
local_fadt
->
V1_pm1a_cnt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm1a_cnt_blk
,
local_fadt
->
pm1_cnt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm1a_cnt_blk
);
}
if
(
!
(
local_fadt
->
xpm1b_cnt_blk
.
address
))
{
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm1b_cnt_blk
,
local_fadt
->
pm1_cnt_len
,
local_fadt
->
V1_pm1b_cnt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm1b_cnt_blk
,
local_fadt
->
pm1_cnt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm1b_cnt_blk
);
}
if
(
!
(
local_fadt
->
xpm2_cnt_blk
.
address
))
{
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm2_cnt_blk
,
local_fadt
->
pm2_cnt_len
,
local_fadt
->
V1_pm2_cnt_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm2_cnt_blk
,
local_fadt
->
pm2_cnt_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm2_cnt_blk
);
}
if
(
!
(
local_fadt
->
xpm_tmr_blk
.
address
))
{
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xpm_tmr_blk
,
local_fadt
->
pm_tm_len
,
local_fadt
->
V1_pm_tmr_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xpm_tmr_blk
,
local_fadt
->
pm_tm_len
,
(
acpi_physical_address
)
local_fadt
->
V1_pm_tmr_blk
);
}
if
(
!
(
local_fadt
->
xgpe0_blk
.
address
))
{
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xgpe0_blk
,
0
,
local_fadt
->
V1_gpe0_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xgpe0_blk
,
0
,
(
acpi_physical_address
)
local_fadt
->
V1_gpe0_blk
);
}
if
(
!
(
local_fadt
->
xgpe1_blk
.
address
))
{
ASL_BUILD_GAS_FROM_V1_ENTRY
(
local_fadt
->
xgpe1_blk
,
0
,
local_fadt
->
V1_gpe1_blk
);
acpi_tb_init_generic_address
(
&
local_fadt
->
xgpe1_blk
,
0
,
(
acpi_physical_address
)
local_fadt
->
V1_gpe1_blk
);
}
/* Create separate GAS structs for the PM1 Enable registers */
acpi_tb_init_generic_address
(
&
acpi_gbl_xpm1a_enable
,
(
u8
)
ACPI_DIV_2
(
acpi_gbl_FADT
->
pm1_evt_len
),
(
acpi_physical_address
)
(
local_fadt
->
xpm1a_evt_blk
.
address
+
ACPI_DIV_2
(
acpi_gbl_FADT
->
pm1_evt_len
)));
acpi_gbl_xpm1a_enable
.
address_space_id
=
local_fadt
->
xpm1a_evt_blk
.
address_space_id
;
acpi_tb_init_generic_address
(
&
acpi_gbl_xpm1b_enable
,
(
u8
)
ACPI_DIV_2
(
acpi_gbl_FADT
->
pm1_evt_len
),
(
acpi_physical_address
)
(
local_fadt
->
xpm1b_evt_blk
.
address
+
ACPI_DIV_2
(
acpi_gbl_FADT
->
pm1_evt_len
)));
acpi_gbl_xpm1b_enable
.
address_space_id
=
local_fadt
->
xpm1b_evt_blk
.
address_space_id
;
}
...
...
include/acpi/acconfig.h
View file @
41788f5e
...
...
@@ -64,7 +64,7 @@
/* Version string */
#define ACPI_CA_VERSION 0x200304
18
#define ACPI_CA_VERSION 0x200304
24
/* Maximum objects in the various object caches */
...
...
include/acpi/acglobal.h
View file @
41788f5e
...
...
@@ -105,6 +105,8 @@ ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS;
*/
ACPI_EXTERN
u8
acpi_gbl_integer_bit_width
;
ACPI_EXTERN
u8
acpi_gbl_integer_byte_width
;
ACPI_EXTERN
struct
acpi_generic_address
acpi_gbl_xpm1a_enable
;
ACPI_EXTERN
struct
acpi_generic_address
acpi_gbl_xpm1b_enable
;
/*
* Since there may be multiple SSDTs and PSDTS, a single pointer is not
...
...
include/acpi/achware.h
View file @
41788f5e
...
...
@@ -98,15 +98,13 @@ acpi_status
acpi_hw_low_level_read
(
u32
width
,
u32
*
value
,
struct
acpi_generic_address
*
reg
,
u32
offset
);
struct
acpi_generic_address
*
reg
);
acpi_status
acpi_hw_low_level_write
(
u32
width
,
u32
value
,
struct
acpi_generic_address
*
reg
,
u32
offset
);
struct
acpi_generic_address
*
reg
);
acpi_status
acpi_hw_clear_acpi_status
(
...
...
include/acpi/acmacros.h
View file @
41788f5e
...
...
@@ -440,26 +440,6 @@
#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH))
/*
* Build a GAS structure from earlier ACPI table entries (V1.0 and 0.71 extensions)
*
* 1) Address space
* 2) Length in bytes -- convert to length in bits
* 3) Bit offset is zero
* 4) Reserved field is zero
* 5) Expand address to 64 bits
*/
#define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d) do {a.address_space_id = (u8) d;\
a.register_bit_width = (u8) ACPI_MUL_8 (b);\
a.register_bit_offset = 0;\
a.reserved = 0;\
ACPI_STORE_ADDRESS (a.address,(acpi_physical_address) c);} while (0)
/* ACPI V1.0 entries -- address space is always I/O */
#define ASL_BUILD_GAS_FROM_V1_ENTRY(a,b,c) ASL_BUILD_GAS_FROM_ENTRY(a,b,c,ACPI_ADR_SPACE_SYSTEM_IO)
/*
* Reporting macros that are never compiled out
*/
...
...
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