mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
/spare/repo/libata-dev branch 'v2.6.13'
This commit is contained in:
commit
2fca877b68
4486 changed files with 333428 additions and 143836 deletions
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
/* Version string */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20050309
|
||||
#define ACPI_CA_VERSION 0x20050408
|
||||
|
||||
/*
|
||||
* OS name, used for the _OS object. The _OS object is essentially obsolete,
|
||||
|
|
@ -130,9 +130,8 @@
|
|||
#define ACPI_MAX_GPE_BLOCKS 2
|
||||
#define ACPI_GPE_REGISTER_WIDTH 8
|
||||
|
||||
/*
|
||||
* Method info (in WALK_STATE), containing local variables and argumetns
|
||||
*/
|
||||
/* Method info (in WALK_STATE), containing local variables and argumetns */
|
||||
|
||||
#define ACPI_METHOD_NUM_LOCALS 8
|
||||
#define ACPI_METHOD_MAX_LOCAL 7
|
||||
|
||||
|
|
|
|||
|
|
@ -61,9 +61,7 @@ struct argument_info
|
|||
|
||||
|
||||
#define PARAM_LIST(pl) pl
|
||||
|
||||
#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose)
|
||||
|
||||
#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
|
||||
acpi_os_printf PARAM_LIST(fp);}
|
||||
|
||||
|
|
@ -71,13 +69,9 @@ struct argument_info
|
|||
#define EX_SINGLE_STEP 2
|
||||
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
|
||||
/*
|
||||
* dbxface - external debugger interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_db_initialize (
|
||||
void);
|
||||
|
|
@ -92,20 +86,10 @@ acpi_db_single_step (
|
|||
union acpi_parse_object *op,
|
||||
u32 op_type);
|
||||
|
||||
acpi_status
|
||||
acpi_db_start_command (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *op);
|
||||
|
||||
void
|
||||
acpi_db_method_end (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
|
||||
/*
|
||||
* dbcmds - debug commands and output routines
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_db_disassemble_method (
|
||||
char *name);
|
||||
|
|
@ -177,57 +161,30 @@ acpi_db_find_references (
|
|||
char *object_arg);
|
||||
|
||||
void
|
||||
acpi_db_display_locks (void);
|
||||
|
||||
acpi_db_display_locks (
|
||||
void);
|
||||
|
||||
void
|
||||
acpi_db_display_resources (
|
||||
char *object_arg);
|
||||
|
||||
void
|
||||
acpi_db_display_gpes (void);
|
||||
acpi_db_display_gpes (
|
||||
void);
|
||||
|
||||
void
|
||||
acpi_db_check_integrity (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_db_integrity_walk (
|
||||
acpi_handle obj_handle,
|
||||
u32 nesting_level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
acpi_status
|
||||
acpi_db_walk_and_match_name (
|
||||
acpi_handle obj_handle,
|
||||
u32 nesting_level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
acpi_status
|
||||
acpi_db_walk_for_references (
|
||||
acpi_handle obj_handle,
|
||||
u32 nesting_level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
acpi_status
|
||||
acpi_db_walk_for_specific_objects (
|
||||
acpi_handle obj_handle,
|
||||
u32 nesting_level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
void
|
||||
acpi_db_generate_gpe (
|
||||
char *gpe_arg,
|
||||
char *block_arg);
|
||||
|
||||
|
||||
/*
|
||||
* dbdisply - debug display commands
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_db_display_method_info (
|
||||
union acpi_parse_object *op);
|
||||
|
|
@ -271,19 +228,10 @@ acpi_db_display_argument_object (
|
|||
union acpi_operand_object *obj_desc,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
void
|
||||
acpi_db_dump_parser_descriptor (
|
||||
union acpi_parse_object *op);
|
||||
|
||||
void *
|
||||
acpi_db_get_pointer (
|
||||
void *target);
|
||||
|
||||
|
||||
/*
|
||||
* dbexec - debugger control method execution
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_db_execute (
|
||||
char *name,
|
||||
|
|
@ -296,44 +244,15 @@ acpi_db_create_execution_threads (
|
|||
char *num_loops_arg,
|
||||
char *method_name_arg);
|
||||
|
||||
acpi_status
|
||||
acpi_db_execute_method (
|
||||
struct acpi_db_method_info *info,
|
||||
struct acpi_buffer *return_obj);
|
||||
|
||||
void
|
||||
acpi_db_execute_setup (
|
||||
struct acpi_db_method_info *info);
|
||||
|
||||
u32
|
||||
acpi_db_get_outstanding_allocations (
|
||||
void);
|
||||
|
||||
void ACPI_SYSTEM_XFACE
|
||||
acpi_db_method_thread (
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_db_execution_walk (
|
||||
acpi_handle obj_handle,
|
||||
u32 nesting_level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
|
||||
/*
|
||||
* dbfileio - Debugger file I/O commands
|
||||
*/
|
||||
|
||||
acpi_object_type
|
||||
acpi_db_match_argument (
|
||||
char *user_argument,
|
||||
struct argument_info *arguments);
|
||||
|
||||
acpi_status
|
||||
ae_local_load_table (
|
||||
struct acpi_table_header *table_ptr);
|
||||
|
||||
void
|
||||
acpi_db_close_debug_file (
|
||||
void);
|
||||
|
|
@ -356,16 +275,17 @@ acpi_db_read_table_from_file (
|
|||
char *filename,
|
||||
struct acpi_table_header **table);
|
||||
|
||||
|
||||
/*
|
||||
* dbhistry - debugger HISTORY command
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_db_add_to_history (
|
||||
char *command_line);
|
||||
|
||||
void
|
||||
acpi_db_display_history (void);
|
||||
acpi_db_display_history (
|
||||
void);
|
||||
|
||||
char *
|
||||
acpi_db_get_from_history (
|
||||
|
|
@ -375,7 +295,6 @@ acpi_db_get_from_history (
|
|||
/*
|
||||
* dbinput - user front-end to the AML debugger
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_db_command_dispatch (
|
||||
char *input_buffer,
|
||||
|
|
@ -386,70 +305,27 @@ void ACPI_SYSTEM_XFACE
|
|||
acpi_db_execute_thread (
|
||||
void *context);
|
||||
|
||||
void
|
||||
acpi_db_display_help (
|
||||
char *help_type);
|
||||
|
||||
char *
|
||||
acpi_db_get_next_token (
|
||||
char *string,
|
||||
char **next);
|
||||
|
||||
u32
|
||||
acpi_db_get_line (
|
||||
char *input_buffer);
|
||||
|
||||
u32
|
||||
acpi_db_match_command (
|
||||
char *user_command);
|
||||
|
||||
void
|
||||
acpi_db_single_thread (
|
||||
void);
|
||||
|
||||
|
||||
/*
|
||||
* dbstats - Generation and display of ACPI table statistics
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_db_generate_statistics (
|
||||
union acpi_parse_object *root,
|
||||
u8 is_method);
|
||||
|
||||
|
||||
acpi_status
|
||||
acpi_db_display_statistics (
|
||||
char *type_arg);
|
||||
|
||||
acpi_status
|
||||
acpi_db_classify_one_object (
|
||||
acpi_handle obj_handle,
|
||||
u32 nesting_level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
void
|
||||
acpi_db_count_namespace_objects (
|
||||
void);
|
||||
|
||||
void
|
||||
acpi_db_enumerate_object (
|
||||
union acpi_operand_object *obj_desc);
|
||||
|
||||
|
||||
/*
|
||||
* dbutils - AML debugger utilities
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_db_set_output_destination (
|
||||
u32 where);
|
||||
|
||||
void
|
||||
acpi_db_dump_buffer (
|
||||
u32 address);
|
||||
|
||||
void
|
||||
acpi_db_dump_object (
|
||||
union acpi_object *obj_desc,
|
||||
|
|
@ -459,14 +335,8 @@ void
|
|||
acpi_db_prep_namestring (
|
||||
char *name);
|
||||
|
||||
|
||||
acpi_status
|
||||
acpi_db_second_pass_parse (
|
||||
union acpi_parse_object *root);
|
||||
|
||||
struct acpi_namespace_node *
|
||||
acpi_db_local_ns_lookup (
|
||||
char *name);
|
||||
|
||||
|
||||
#endif /* __ACDEBUG_H__ */
|
||||
|
|
|
|||
|
|
@ -102,58 +102,16 @@ acpi_status (*asl_walk_callback) (
|
|||
/*
|
||||
* dmwalk
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_dm_walk_parse_tree (
|
||||
union acpi_parse_object *op,
|
||||
asl_walk_callback descending_callback,
|
||||
asl_walk_callback ascending_callback,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_dm_descending_op (
|
||||
union acpi_parse_object *op,
|
||||
u32 level,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_dm_ascending_op (
|
||||
union acpi_parse_object *op,
|
||||
u32 level,
|
||||
void *context);
|
||||
|
||||
|
||||
/*
|
||||
* dmopcode
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_dm_validate_name (
|
||||
char *name,
|
||||
union acpi_parse_object *op);
|
||||
|
||||
u32
|
||||
acpi_dm_dump_name (
|
||||
char *name);
|
||||
|
||||
void
|
||||
acpi_dm_unicode (
|
||||
union acpi_parse_object *op);
|
||||
|
||||
void
|
||||
acpi_dm_disassemble (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *origin,
|
||||
u32 num_opcodes);
|
||||
|
||||
void
|
||||
acpi_dm_namestring (
|
||||
char *name);
|
||||
|
||||
void
|
||||
acpi_dm_display_path (
|
||||
union acpi_parse_object *op);
|
||||
|
||||
/*
|
||||
* dmopcode
|
||||
*/
|
||||
void
|
||||
acpi_dm_disassemble_one_op (
|
||||
struct acpi_walk_state *walk_state,
|
||||
|
|
@ -164,19 +122,10 @@ void
|
|||
acpi_dm_decode_internal_object (
|
||||
union acpi_operand_object *obj_desc);
|
||||
|
||||
u32
|
||||
acpi_dm_block_type (
|
||||
union acpi_parse_object *op);
|
||||
|
||||
u32
|
||||
acpi_dm_list_type (
|
||||
union acpi_parse_object *op);
|
||||
|
||||
acpi_status
|
||||
acpi_ps_display_object_pathname (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *op);
|
||||
|
||||
void
|
||||
acpi_dm_method_flags (
|
||||
union acpi_parse_object *op);
|
||||
|
|
@ -197,10 +146,6 @@ void
|
|||
acpi_dm_match_op (
|
||||
union acpi_parse_object *op);
|
||||
|
||||
void
|
||||
acpi_dm_match_keyword (
|
||||
union acpi_parse_object *op);
|
||||
|
||||
u8
|
||||
acpi_dm_comma_if_list_member (
|
||||
union acpi_parse_object *op);
|
||||
|
|
@ -211,13 +156,25 @@ acpi_dm_comma_if_field_member (
|
|||
|
||||
|
||||
/*
|
||||
* dmobject
|
||||
* dmnames
|
||||
*/
|
||||
u32
|
||||
acpi_dm_dump_name (
|
||||
char *name);
|
||||
|
||||
acpi_status
|
||||
acpi_ps_display_object_pathname (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *op);
|
||||
|
||||
void
|
||||
acpi_dm_decode_node (
|
||||
struct acpi_namespace_node *node);
|
||||
acpi_dm_namestring (
|
||||
char *name);
|
||||
|
||||
|
||||
/*
|
||||
* dmobject
|
||||
*/
|
||||
void
|
||||
acpi_dm_display_internal_object (
|
||||
union acpi_operand_object *obj_desc,
|
||||
|
|
@ -241,6 +198,16 @@ acpi_dm_dump_method_info (
|
|||
/*
|
||||
* dmbuffer
|
||||
*/
|
||||
void
|
||||
acpi_dm_disasm_byte_list (
|
||||
u32 level,
|
||||
u8 *byte_data,
|
||||
u32 byte_count);
|
||||
|
||||
void
|
||||
acpi_dm_byte_list (
|
||||
struct acpi_op_walk_info *info,
|
||||
union acpi_parse_object *op);
|
||||
|
||||
void
|
||||
acpi_is_eisa_id (
|
||||
|
|
@ -262,18 +229,6 @@ acpi_dm_is_string_buffer (
|
|||
/*
|
||||
* dmresrc
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_dm_disasm_byte_list (
|
||||
u32 level,
|
||||
u8 *byte_data,
|
||||
u32 byte_count);
|
||||
|
||||
void
|
||||
acpi_dm_byte_list (
|
||||
struct acpi_op_walk_info *info,
|
||||
union acpi_parse_object *op);
|
||||
|
||||
void
|
||||
acpi_dm_resource_descriptor (
|
||||
struct acpi_op_walk_info *info,
|
||||
|
|
@ -296,19 +251,10 @@ void
|
|||
acpi_dm_decode_attribute (
|
||||
u8 attribute);
|
||||
|
||||
|
||||
/*
|
||||
* dmresrcl
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_dm_io_flags (
|
||||
u8 flags);
|
||||
|
||||
void
|
||||
acpi_dm_memory_flags (
|
||||
u8 flags,
|
||||
u8 specific_flags);
|
||||
|
||||
void
|
||||
acpi_dm_word_descriptor (
|
||||
struct asl_word_address_desc *resource,
|
||||
|
|
@ -373,7 +319,6 @@ acpi_dm_vendor_large_descriptor (
|
|||
/*
|
||||
* dmresrcs
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_dm_irq_descriptor (
|
||||
struct asl_irq_format_desc *resource,
|
||||
|
|
@ -420,7 +365,6 @@ acpi_dm_vendor_small_descriptor (
|
|||
/*
|
||||
* dmutils
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_dm_add_to_external_list (
|
||||
char *path);
|
||||
|
|
|
|||
|
|
@ -50,40 +50,9 @@
|
|||
#define NAMEOF_ARG_NTE "__A0"
|
||||
|
||||
|
||||
/* Common interfaces */
|
||||
|
||||
acpi_status
|
||||
acpi_ds_obj_stack_push (
|
||||
void *object,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_obj_stack_pop (
|
||||
u32 pop_count,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
void *
|
||||
acpi_ds_obj_stack_get_value (
|
||||
u32 index,
|
||||
struct acpi_walk_state *walk_state);
|
||||
#endif
|
||||
|
||||
acpi_status
|
||||
acpi_ds_obj_stack_pop_object (
|
||||
union acpi_operand_object **object,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
|
||||
/* dsopcode - support for late evaluation */
|
||||
|
||||
acpi_status
|
||||
acpi_ds_execute_arguments (
|
||||
struct acpi_namespace_node *node,
|
||||
struct acpi_namespace_node *scope_node,
|
||||
u32 aml_length,
|
||||
u8 *aml_start);
|
||||
|
||||
/*
|
||||
* dsopcode - support for late evaluation
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_get_buffer_field_arguments (
|
||||
union acpi_operand_object *obj_desc);
|
||||
|
|
@ -100,15 +69,6 @@ acpi_status
|
|||
acpi_ds_get_package_arguments (
|
||||
union acpi_operand_object *obj_desc);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_init_buffer_field (
|
||||
u16 aml_opcode,
|
||||
union acpi_operand_object *obj_desc,
|
||||
union acpi_operand_object *buffer_desc,
|
||||
union acpi_operand_object *offset_desc,
|
||||
union acpi_operand_object *length_desc,
|
||||
union acpi_operand_object *result_desc);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_eval_buffer_field_operands (
|
||||
struct acpi_walk_state *walk_state,
|
||||
|
|
@ -130,9 +90,9 @@ acpi_ds_initialize_region (
|
|||
acpi_handle obj_handle);
|
||||
|
||||
|
||||
/* dsctrl - Parser/Interpreter interface, control stack routines */
|
||||
|
||||
|
||||
/*
|
||||
* dsctrl - Parser/Interpreter interface, control stack routines
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_exec_begin_control_op (
|
||||
struct acpi_walk_state *walk_state,
|
||||
|
|
@ -144,9 +104,9 @@ acpi_ds_exec_end_control_op (
|
|||
union acpi_parse_object *op);
|
||||
|
||||
|
||||
/* dsexec - Parser/Interpreter interface, method execution callbacks */
|
||||
|
||||
|
||||
/*
|
||||
* dsexec - Parser/Interpreter interface, method execution callbacks
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_get_predicate_value (
|
||||
struct acpi_walk_state *walk_state,
|
||||
|
|
@ -162,14 +122,9 @@ acpi_ds_exec_end_op (
|
|||
struct acpi_walk_state *state);
|
||||
|
||||
|
||||
/* dsfield - Parser/Interpreter interface for AML fields */
|
||||
|
||||
acpi_status
|
||||
acpi_ds_get_field_names (
|
||||
struct acpi_create_field_info *info,
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *arg);
|
||||
|
||||
/*
|
||||
* dsfield - Parser/Interpreter interface for AML fields
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_create_field (
|
||||
union acpi_parse_object *op,
|
||||
|
|
@ -199,8 +154,9 @@ acpi_ds_init_field_objects (
|
|||
struct acpi_walk_state *walk_state);
|
||||
|
||||
|
||||
/* dsload - Parser/Interpreter interface, namespace load callbacks */
|
||||
|
||||
/*
|
||||
* dsload - Parser/Interpreter interface, namespace load callbacks
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_load1_begin_op (
|
||||
struct acpi_walk_state *walk_state,
|
||||
|
|
@ -225,9 +181,9 @@ acpi_ds_init_callbacks (
|
|||
u32 pass_number);
|
||||
|
||||
|
||||
/* dsmthdat - method data (locals/args) */
|
||||
|
||||
|
||||
/*
|
||||
* dsmthdat - method data (locals/args)
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_store_object_to_local (
|
||||
u16 opcode,
|
||||
|
|
@ -250,14 +206,6 @@ u8
|
|||
acpi_ds_is_method_value (
|
||||
union acpi_operand_object *obj_desc);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_object_type
|
||||
acpi_ds_method_data_get_type (
|
||||
u16 opcode,
|
||||
u32 index,
|
||||
struct acpi_walk_state *walk_state);
|
||||
#endif
|
||||
|
||||
acpi_status
|
||||
acpi_ds_method_data_get_value (
|
||||
u16 opcode,
|
||||
|
|
@ -265,12 +213,6 @@ acpi_ds_method_data_get_value (
|
|||
struct acpi_walk_state *walk_state,
|
||||
union acpi_operand_object **dest_desc);
|
||||
|
||||
void
|
||||
acpi_ds_method_data_delete_value (
|
||||
u16 opcode,
|
||||
u32 index,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_method_data_init_args (
|
||||
union acpi_operand_object **params,
|
||||
|
|
@ -288,16 +230,10 @@ void
|
|||
acpi_ds_method_data_init (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_method_data_set_value (
|
||||
u16 opcode,
|
||||
u32 index,
|
||||
union acpi_operand_object *object,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
|
||||
/* dsmethod - Parser/Interpreter interface - control method parsing */
|
||||
|
||||
/*
|
||||
* dsmethod - Parser/Interpreter interface - control method parsing
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_parse_method (
|
||||
acpi_handle obj_handle);
|
||||
|
|
@ -324,20 +260,18 @@ acpi_ds_begin_method_execution (
|
|||
struct acpi_namespace_node *calling_method_node);
|
||||
|
||||
|
||||
/* dsobj - Parser/Interpreter interface - object initialization and conversion */
|
||||
|
||||
acpi_status
|
||||
acpi_ds_init_one_object (
|
||||
acpi_handle obj_handle,
|
||||
u32 level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
/*
|
||||
* dsinit
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_initialize_objects (
|
||||
struct acpi_table_desc *table_desc,
|
||||
struct acpi_namespace_node *start_node);
|
||||
|
||||
|
||||
/*
|
||||
* dsobject - Parser/Interpreter interface - object initialization and conversion
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_build_internal_buffer_obj (
|
||||
struct acpi_walk_state *walk_state,
|
||||
|
|
@ -352,12 +286,6 @@ acpi_ds_build_internal_package_obj (
|
|||
u32 package_length,
|
||||
union acpi_operand_object **obj_desc);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_build_internal_object (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *op,
|
||||
union acpi_operand_object **obj_desc_ptr);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_init_object_from_op (
|
||||
struct acpi_walk_state *walk_state,
|
||||
|
|
@ -372,8 +300,9 @@ acpi_ds_create_node (
|
|||
union acpi_parse_object *op);
|
||||
|
||||
|
||||
/* dsutils - Parser/Interpreter interface utility routines */
|
||||
|
||||
/*
|
||||
* dsutils - Parser/Interpreter interface utility routines
|
||||
*/
|
||||
void
|
||||
acpi_ds_clear_implicit_return (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
|
@ -418,7 +347,6 @@ acpi_ds_clear_operands (
|
|||
/*
|
||||
* dswscope - Scope Stack manipulation
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ds_scope_stack_push (
|
||||
struct acpi_namespace_node *node,
|
||||
|
|
@ -435,7 +363,18 @@ acpi_ds_scope_stack_clear (
|
|||
struct acpi_walk_state *walk_state);
|
||||
|
||||
|
||||
/* dswstate - parser WALK_STATE management routines */
|
||||
/*
|
||||
* dswstate - parser WALK_STATE management routines
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_obj_stack_push (
|
||||
void *object,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_obj_stack_pop (
|
||||
u32 pop_count,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
struct acpi_walk_state *
|
||||
acpi_ds_create_walk_state (
|
||||
|
|
@ -454,12 +393,6 @@ acpi_ds_init_aml_walk (
|
|||
struct acpi_parameter_info *info,
|
||||
u32 pass_number);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_ds_obj_stack_delete_all (
|
||||
struct acpi_walk_state *walk_state);
|
||||
#endif
|
||||
|
||||
acpi_status
|
||||
acpi_ds_obj_stack_pop_and_delete (
|
||||
u32 pop_count,
|
||||
|
|
@ -494,19 +427,7 @@ struct acpi_walk_state *
|
|||
acpi_ds_get_current_walk_state (
|
||||
struct acpi_thread_state *thread);
|
||||
|
||||
#ifdef ACPI_ENABLE_OBJECT_CACHE
|
||||
void
|
||||
acpi_ds_delete_walk_state_cache (
|
||||
void);
|
||||
#endif
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_ds_result_insert (
|
||||
void *object,
|
||||
u32 index,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_result_remove (
|
||||
union acpi_operand_object **object,
|
||||
|
|
@ -529,4 +450,10 @@ acpi_ds_result_pop_from_bottom (
|
|||
union acpi_operand_object **object,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
#ifdef ACPI_ENABLE_OBJECT_CACHE
|
||||
void
|
||||
acpi_ds_delete_walk_state_cache (
|
||||
void);
|
||||
#endif
|
||||
|
||||
#endif /* _ACDISPAT_H_ */
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@
|
|||
#define __ACEVENTS_H__
|
||||
|
||||
|
||||
/*
|
||||
* evevent
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ev_initialize_events (
|
||||
void);
|
||||
|
|
@ -53,28 +56,14 @@ acpi_status
|
|||
acpi_ev_install_xrupt_handlers (
|
||||
void);
|
||||
|
||||
|
||||
/*
|
||||
* Evfixed - Fixed event handling
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ev_fixed_event_initialize (
|
||||
void);
|
||||
|
||||
u32
|
||||
acpi_ev_fixed_event_detect (
|
||||
void);
|
||||
|
||||
u32
|
||||
acpi_ev_fixed_event_dispatch (
|
||||
u32 event);
|
||||
|
||||
|
||||
/*
|
||||
* Evmisc
|
||||
* evmisc
|
||||
*/
|
||||
|
||||
u8
|
||||
acpi_ev_is_notify_object (
|
||||
struct acpi_namespace_node *node);
|
||||
|
|
@ -100,24 +89,10 @@ acpi_ev_queue_notify_request (
|
|||
struct acpi_namespace_node *node,
|
||||
u32 notify_value);
|
||||
|
||||
void ACPI_SYSTEM_XFACE
|
||||
acpi_ev_notify_dispatch (
|
||||
void *context);
|
||||
|
||||
|
||||
/*
|
||||
* Evgpe - GPE handling and dispatch
|
||||
* evgpe - GPE handling and dispatch
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ev_walk_gpe_list (
|
||||
ACPI_GPE_CALLBACK gpe_walk_callback,
|
||||
u32 flags);
|
||||
|
||||
u8
|
||||
acpi_ev_valid_gpe_event (
|
||||
struct acpi_gpe_event_info *gpe_event_info);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_update_gpe_enable_masks (
|
||||
struct acpi_gpe_event_info *gpe_event_info,
|
||||
|
|
@ -137,9 +112,23 @@ acpi_ev_get_gpe_event_info (
|
|||
acpi_handle gpe_device,
|
||||
u32 gpe_number);
|
||||
|
||||
|
||||
/*
|
||||
* evgpeblk
|
||||
*/
|
||||
u8
|
||||
acpi_ev_valid_gpe_event (
|
||||
struct acpi_gpe_event_info *gpe_event_info);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_gpe_initialize (
|
||||
void);
|
||||
acpi_ev_walk_gpe_list (
|
||||
ACPI_GPE_CALLBACK gpe_walk_callback,
|
||||
u32 flags);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_delete_gpe_handlers (
|
||||
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_create_gpe_block (
|
||||
|
|
@ -154,11 +143,6 @@ acpi_status
|
|||
acpi_ev_delete_gpe_block (
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_delete_gpe_handlers (
|
||||
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
|
||||
u32
|
||||
acpi_ev_gpe_dispatch (
|
||||
struct acpi_gpe_event_info *gpe_event_info,
|
||||
|
|
@ -177,10 +161,14 @@ acpi_status
|
|||
acpi_ev_check_for_wake_only_gpe (
|
||||
struct acpi_gpe_event_info *gpe_event_info);
|
||||
|
||||
/*
|
||||
* Evregion - Address Space handling
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ev_gpe_initialize (
|
||||
void);
|
||||
|
||||
|
||||
/*
|
||||
* evregion - Address Space handling
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ev_install_region_handlers (
|
||||
void);
|
||||
|
|
@ -197,13 +185,6 @@ acpi_ev_address_space_dispatch (
|
|||
u32 bit_width,
|
||||
void *value);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_install_handler (
|
||||
acpi_handle obj_handle,
|
||||
u32 level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_attach_region (
|
||||
union acpi_operand_object *handler_obj,
|
||||
|
|
@ -233,17 +214,10 @@ acpi_ev_execute_reg_method (
|
|||
union acpi_operand_object *region_obj,
|
||||
u32 function);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_reg_run (
|
||||
acpi_handle obj_handle,
|
||||
u32 level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
/*
|
||||
* Evregini - Region initialization and setup
|
||||
* evregini - Region initialization and setup
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ev_system_memory_region_setup (
|
||||
acpi_handle handle,
|
||||
|
|
@ -293,9 +267,8 @@ acpi_ev_initialize_region (
|
|||
|
||||
|
||||
/*
|
||||
* Evsci - SCI (System Control Interrupt) handling/dispatch
|
||||
* evsci - SCI (System Control Interrupt) handling/dispatch
|
||||
*/
|
||||
|
||||
u32 ACPI_SYSTEM_XFACE
|
||||
acpi_ev_gpe_xrupt_handler (
|
||||
void *context);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
/*
|
||||
* Exceptions returned by external ACPI interfaces
|
||||
*/
|
||||
|
||||
#define AE_CODE_ENVIRONMENTAL 0x0000
|
||||
#define AE_CODE_PROGRAMMER 0x1000
|
||||
#define AE_CODE_ACPI_TABLES 0x2000
|
||||
|
|
@ -99,6 +98,7 @@
|
|||
|
||||
#define AE_CODE_ENV_MAX 0x001E
|
||||
|
||||
|
||||
/*
|
||||
* Programmer exceptions
|
||||
*/
|
||||
|
|
@ -168,6 +168,7 @@
|
|||
|
||||
#define AE_CODE_AML_MAX 0x0021
|
||||
|
||||
|
||||
/*
|
||||
* Internal exceptions used for control
|
||||
*/
|
||||
|
|
@ -188,6 +189,7 @@
|
|||
|
||||
#ifdef DEFINE_ACPI_GLOBALS
|
||||
|
||||
|
||||
/*
|
||||
* String versions of the exception codes above
|
||||
* These strings must match the corresponding defines exactly
|
||||
|
|
@ -304,5 +306,4 @@ char const *acpi_gbl_exception_names_ctrl[] =
|
|||
|
||||
#endif /* ACPI GLOBALS */
|
||||
|
||||
|
||||
#endif /* __ACEXCEP_H__ */
|
||||
|
|
|
|||
|
|
@ -146,15 +146,15 @@ ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;
|
|||
ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS;
|
||||
ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS;
|
||||
/*
|
||||
* Since there may be multiple SSDTs and PSDTS, a single pointer is not
|
||||
* Since there may be multiple SSDTs and PSDTs, a single pointer is not
|
||||
* sufficient; Therefore, there isn't one!
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Handle both ACPI 1.0 and ACPI 2.0 Integer widths
|
||||
* If we are running a method that exists in a 32-bit ACPI table.
|
||||
* Use only 32 bits of the Integer for conversion.
|
||||
* Handle both ACPI 1.0 and ACPI 2.0 Integer widths:
|
||||
* If we are executing a method that exists in a 32-bit ACPI table,
|
||||
* use only the lower 32 bits of the (internal) 64-bit Integer.
|
||||
*/
|
||||
ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
|
||||
ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
|
||||
|
|
@ -246,6 +246,7 @@ ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer;
|
|||
ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Interpreter globals
|
||||
|
|
@ -268,6 +269,7 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step;
|
|||
|
||||
ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Hardware globals
|
||||
|
|
@ -298,7 +300,6 @@ ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock;
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
ACPI_EXTERN u8 acpi_gbl_db_output_flags;
|
||||
|
||||
#ifdef ACPI_DISASSEMBLER
|
||||
|
|
@ -353,5 +354,4 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
|
|||
|
||||
#endif /* ACPI_DEBUGGER */
|
||||
|
||||
|
||||
#endif /* __ACGLOBAL_H__ */
|
||||
|
|
|
|||
|
|
@ -46,24 +46,28 @@
|
|||
|
||||
|
||||
/* PM Timer ticks per second (HZ) */
|
||||
|
||||
#define PM_TIMER_FREQUENCY 3579545
|
||||
|
||||
/* Values for the _SST reserved method */
|
||||
|
||||
#define ACPI_SST_INDICATOR_OFF 0
|
||||
#define ACPI_SST_WORKING 1
|
||||
#define ACPI_SST_WAKING 2
|
||||
#define ACPI_SST_SLEEPING 3
|
||||
#define ACPI_SST_SLEEP_CONTEXT 4
|
||||
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
|
||||
/*
|
||||
* hwacpi - high level functions
|
||||
*/
|
||||
acpi_status
|
||||
acpi_hw_initialize (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_hw_shutdown (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_hw_initialize_system_info (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_hw_set_mode (
|
||||
u32 mode);
|
||||
|
|
@ -72,12 +76,10 @@ u32
|
|||
acpi_hw_get_mode (
|
||||
void);
|
||||
|
||||
u32
|
||||
acpi_hw_get_mode_capabilities (
|
||||
void);
|
||||
|
||||
/* Register I/O Prototypes */
|
||||
|
||||
/*
|
||||
* hwregs - ACPI Register I/O
|
||||
*/
|
||||
struct acpi_bit_register_info *
|
||||
acpi_hw_get_bit_register_info (
|
||||
u32 register_id);
|
||||
|
|
@ -111,8 +113,9 @@ acpi_hw_clear_acpi_status (
|
|||
u32 flags);
|
||||
|
||||
|
||||
/* GPE support */
|
||||
|
||||
/*
|
||||
* hwgpe - GPE support
|
||||
*/
|
||||
acpi_status
|
||||
acpi_hw_write_gpe_enable_reg (
|
||||
struct acpi_gpe_event_info *gpe_event_info);
|
||||
|
|
@ -131,12 +134,12 @@ acpi_hw_clear_gpe_block (
|
|||
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_hw_get_gpe_status (
|
||||
struct acpi_gpe_event_info *gpe_event_info,
|
||||
acpi_event_status *event_status);
|
||||
#endif
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
acpi_status
|
||||
acpi_hw_disable_all_gpes (
|
||||
|
|
@ -155,15 +158,11 @@ acpi_hw_enable_runtime_gpe_block (
|
|||
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
|
||||
acpi_status
|
||||
acpi_hw_enable_wakeup_gpe_block (
|
||||
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
|
||||
|
||||
/* ACPI Timer prototypes */
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
/*
|
||||
* hwtimer - ACPI Timer prototypes
|
||||
*/
|
||||
acpi_status
|
||||
acpi_get_timer_resolution (
|
||||
u32 *resolution);
|
||||
|
|
@ -177,6 +176,7 @@ acpi_get_timer_duration (
|
|||
u32 start_ticks,
|
||||
u32 end_ticks,
|
||||
u32 *time_elapsed);
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
|
||||
#endif /* __ACHWARE_H__ */
|
||||
|
|
|
|||
|
|
@ -48,37 +48,9 @@
|
|||
#define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1]))
|
||||
|
||||
|
||||
acpi_status
|
||||
acpi_ex_resolve_operands (
|
||||
u16 opcode,
|
||||
union acpi_operand_object **stack_ptr,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_check_object_type (
|
||||
acpi_object_type type_needed,
|
||||
acpi_object_type this_type,
|
||||
void *object);
|
||||
|
||||
/*
|
||||
* exxface - External interpreter interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_load_table (
|
||||
acpi_table_type table_id);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_execute_method (
|
||||
struct acpi_namespace_node *method_node,
|
||||
union acpi_operand_object **params,
|
||||
union acpi_operand_object **return_obj_desc);
|
||||
|
||||
|
||||
/*
|
||||
* exconvrt - object conversion
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_convert_to_integer (
|
||||
union acpi_operand_object *obj_desc,
|
||||
|
|
@ -110,59 +82,16 @@ acpi_ex_convert_to_target_type (
|
|||
union acpi_operand_object **result_desc,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
u32
|
||||
acpi_ex_convert_to_ascii (
|
||||
acpi_integer integer,
|
||||
u16 base,
|
||||
u8 *string,
|
||||
u8 max_length);
|
||||
|
||||
/*
|
||||
* exfield - ACPI AML (p-code) execution - field manipulation
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_common_buffer_setup (
|
||||
union acpi_operand_object *obj_desc,
|
||||
u32 buffer_length,
|
||||
u32 *datum_count);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_extract_from_field (
|
||||
union acpi_operand_object *obj_desc,
|
||||
void *buffer,
|
||||
u32 buffer_length);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_insert_into_field (
|
||||
union acpi_operand_object *obj_desc,
|
||||
void *buffer,
|
||||
u32 buffer_length);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_setup_region (
|
||||
union acpi_operand_object *obj_desc,
|
||||
u32 field_datum_byte_offset);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_access_region (
|
||||
union acpi_operand_object *obj_desc,
|
||||
u32 field_datum_byte_offset,
|
||||
acpi_integer *value,
|
||||
u32 read_write);
|
||||
|
||||
u8
|
||||
acpi_ex_register_overflow (
|
||||
union acpi_operand_object *obj_desc,
|
||||
acpi_integer value);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_field_datum_io (
|
||||
union acpi_operand_object *obj_desc,
|
||||
u32 field_datum_byte_offset,
|
||||
acpi_integer *value,
|
||||
u32 read_write);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_write_with_update_rule (
|
||||
union acpi_operand_object *obj_desc,
|
||||
|
|
@ -198,41 +127,39 @@ acpi_ex_write_data_to_field (
|
|||
union acpi_operand_object *obj_desc,
|
||||
union acpi_operand_object **result_desc);
|
||||
|
||||
|
||||
/*
|
||||
* exmisc - ACPI AML (p-code) execution - specific opcodes
|
||||
* exfldio - low level field I/O
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ex_extract_from_field (
|
||||
union acpi_operand_object *obj_desc,
|
||||
void *buffer,
|
||||
u32 buffer_length);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_opcode_3A_0T_0R (
|
||||
struct acpi_walk_state *walk_state);
|
||||
acpi_ex_insert_into_field (
|
||||
union acpi_operand_object *obj_desc,
|
||||
void *buffer,
|
||||
u32 buffer_length);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_opcode_3A_1T_1R (
|
||||
struct acpi_walk_state *walk_state);
|
||||
acpi_ex_access_region (
|
||||
union acpi_operand_object *obj_desc,
|
||||
u32 field_datum_byte_offset,
|
||||
acpi_integer *value,
|
||||
u32 read_write);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_opcode_6A_0T_1R (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
u8
|
||||
acpi_ex_do_match (
|
||||
u32 match_op,
|
||||
union acpi_operand_object *package_obj,
|
||||
union acpi_operand_object *match_obj);
|
||||
|
||||
/*
|
||||
* exmisc - misc support routines
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ex_get_object_reference (
|
||||
union acpi_operand_object *obj_desc,
|
||||
union acpi_operand_object **return_desc,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_resolve_multiple (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_operand_object *operand,
|
||||
acpi_object_type *return_type,
|
||||
union acpi_operand_object **return_desc);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_concat_template (
|
||||
union acpi_operand_object *obj_desc,
|
||||
|
|
@ -308,13 +235,6 @@ acpi_ex_create_method (
|
|||
/*
|
||||
* exconfig - dynamic table load/unload
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_add_table (
|
||||
struct acpi_table_header *table,
|
||||
struct acpi_namespace_node *parent_node,
|
||||
union acpi_operand_object **ddb_handle);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_load_op (
|
||||
union acpi_operand_object *obj_desc,
|
||||
|
|
@ -334,7 +254,6 @@ acpi_ex_unload_table (
|
|||
/*
|
||||
* exmutex - mutex support
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_acquire_mutex (
|
||||
union acpi_operand_object *time_desc,
|
||||
|
|
@ -354,15 +273,10 @@ void
|
|||
acpi_ex_unlink_mutex (
|
||||
union acpi_operand_object *obj_desc);
|
||||
|
||||
void
|
||||
acpi_ex_link_mutex (
|
||||
union acpi_operand_object *obj_desc,
|
||||
struct acpi_thread_state *thread);
|
||||
|
||||
/*
|
||||
* exprep - ACPI AML (p-code) execution - prep utilities
|
||||
* exprep - ACPI AML execution - prep utilities
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_prep_common_field_object (
|
||||
union acpi_operand_object *obj_desc,
|
||||
|
|
@ -375,10 +289,10 @@ acpi_status
|
|||
acpi_ex_prep_field_value (
|
||||
struct acpi_create_field_info *info);
|
||||
|
||||
|
||||
/*
|
||||
* exsystem - Interface to OS services
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_system_do_notify_op (
|
||||
union acpi_operand_object *value,
|
||||
|
|
@ -421,9 +335,8 @@ acpi_ex_system_wait_semaphore (
|
|||
|
||||
|
||||
/*
|
||||
* exmonadic - ACPI AML (p-code) execution, monadic operators
|
||||
* exoparg1 - ACPI AML execution, 1 operand
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_opcode_0A_0T_1R (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
|
@ -445,9 +358,8 @@ acpi_ex_opcode_1A_1T_0R (
|
|||
struct acpi_walk_state *walk_state);
|
||||
|
||||
/*
|
||||
* exdyadic - ACPI AML (p-code) execution, dyadic operators
|
||||
* exoparg2 - ACPI AML execution, 2 operands
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_opcode_2A_0T_0R (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
|
@ -466,21 +378,56 @@ acpi_ex_opcode_2A_2T_1R (
|
|||
|
||||
|
||||
/*
|
||||
* exresolv - Object resolution and get value functions
|
||||
* exoparg3 - ACPI AML execution, 3 operands
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ex_opcode_3A_0T_0R (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_opcode_3A_1T_1R (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
|
||||
/*
|
||||
* exoparg6 - ACPI AML execution, 6 operands
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ex_opcode_6A_0T_1R (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
|
||||
/*
|
||||
* exresolv - Object resolution and get value functions
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ex_resolve_to_value (
|
||||
union acpi_operand_object **stack_ptr,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_resolve_multiple (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_operand_object *operand,
|
||||
acpi_object_type *return_type,
|
||||
union acpi_operand_object **return_desc);
|
||||
|
||||
|
||||
/*
|
||||
* exresnte - resolve namespace node
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ex_resolve_node_to_value (
|
||||
struct acpi_namespace_node **stack_ptr,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
|
||||
/*
|
||||
* exresop - resolve operand to value
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ex_resolve_object_to_value (
|
||||
acpi_ex_resolve_operands (
|
||||
u16 opcode,
|
||||
union acpi_operand_object **stack_ptr,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
|
|
@ -488,7 +435,6 @@ acpi_ex_resolve_object_to_value (
|
|||
/*
|
||||
* exdump - Interpreter debug output routines
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_ex_dump_operand (
|
||||
union acpi_operand_object *obj_desc,
|
||||
|
|
@ -504,7 +450,7 @@ acpi_ex_dump_operands (
|
|||
char *module_name,
|
||||
u32 line_number);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
void
|
||||
acpi_ex_dump_object_descriptor (
|
||||
union acpi_operand_object *object,
|
||||
|
|
@ -514,46 +460,12 @@ void
|
|||
acpi_ex_dump_node (
|
||||
struct acpi_namespace_node *node,
|
||||
u32 flags);
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
void
|
||||
acpi_ex_out_string (
|
||||
char *title,
|
||||
char *value);
|
||||
|
||||
void
|
||||
acpi_ex_out_pointer (
|
||||
char *title,
|
||||
void *value);
|
||||
|
||||
void
|
||||
acpi_ex_out_integer (
|
||||
char *title,
|
||||
u32 value);
|
||||
|
||||
void
|
||||
acpi_ex_out_address (
|
||||
char *title,
|
||||
acpi_physical_address value);
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
/*
|
||||
* exnames - interpreter/scanner name load/execute
|
||||
* exnames - AML namestring support
|
||||
*/
|
||||
|
||||
char *
|
||||
acpi_ex_allocate_name_string (
|
||||
u32 prefix_count,
|
||||
u32 num_name_segs);
|
||||
|
||||
u32
|
||||
acpi_ex_good_char (
|
||||
u32 character);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_name_segment (
|
||||
u8 **in_aml_address,
|
||||
char *name_string);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_get_name_string (
|
||||
acpi_object_type data_type,
|
||||
|
|
@ -561,28 +473,16 @@ acpi_ex_get_name_string (
|
|||
char **out_name_string,
|
||||
u32 *out_name_length);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_do_name (
|
||||
acpi_object_type data_type,
|
||||
acpi_interpreter_mode load_exec_mode);
|
||||
|
||||
|
||||
/*
|
||||
* exstore - Object store support
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_store (
|
||||
union acpi_operand_object *val_desc,
|
||||
union acpi_operand_object *dest_desc,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_store_object_to_index (
|
||||
union acpi_operand_object *val_desc,
|
||||
union acpi_operand_object *dest_desc,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ex_store_object_to_node (
|
||||
union acpi_operand_object *source_desc,
|
||||
|
|
@ -593,10 +493,10 @@ acpi_ex_store_object_to_node (
|
|||
#define ACPI_IMPLICIT_CONVERSION TRUE
|
||||
#define ACPI_NO_IMPLICIT_CONVERSION FALSE
|
||||
|
||||
/*
|
||||
* exstoren
|
||||
*/
|
||||
|
||||
/*
|
||||
* exstoren - resolve/store object
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ex_resolve_object (
|
||||
union acpi_operand_object **source_desc_ptr,
|
||||
|
|
@ -612,9 +512,8 @@ acpi_ex_store_object_to_object (
|
|||
|
||||
|
||||
/*
|
||||
* excopy - object copy
|
||||
* exstorob - store object - buffer/string
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_store_buffer_to_buffer (
|
||||
union acpi_operand_object *source_desc,
|
||||
|
|
@ -625,6 +524,10 @@ acpi_ex_store_string_to_string (
|
|||
union acpi_operand_object *source_desc,
|
||||
union acpi_operand_object *target_desc);
|
||||
|
||||
|
||||
/*
|
||||
* excopy - object copy
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ex_copy_integer_to_index_field (
|
||||
union acpi_operand_object *source_desc,
|
||||
|
|
@ -645,10 +548,10 @@ acpi_ex_copy_integer_to_buffer_field (
|
|||
union acpi_operand_object *source_desc,
|
||||
union acpi_operand_object *target_desc);
|
||||
|
||||
|
||||
/*
|
||||
* exutils - interpreter/scanner utilities
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_enter_interpreter (
|
||||
void);
|
||||
|
|
@ -669,11 +572,6 @@ void
|
|||
acpi_ex_release_global_lock (
|
||||
u8 locked);
|
||||
|
||||
u32
|
||||
acpi_ex_digits_needed (
|
||||
acpi_integer value,
|
||||
u32 base);
|
||||
|
||||
void
|
||||
acpi_ex_eisa_id_to_string (
|
||||
u32 numeric_id,
|
||||
|
|
@ -688,7 +586,6 @@ acpi_ex_unsigned_integer_to_string (
|
|||
/*
|
||||
* exregion - default op_region handlers
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ex_system_memory_space_handler (
|
||||
u32 function,
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ typedef u32 acpi_mutex_handle;
|
|||
*
|
||||
* NOTE: any changes here must be reflected in the acpi_gbl_mutex_names table also!
|
||||
*/
|
||||
|
||||
#define ACPI_MTX_EXECUTE 0
|
||||
#define ACPI_MTX_INTERPRETER 1
|
||||
#define ACPI_MTX_PARSER 2
|
||||
|
|
@ -151,13 +150,13 @@ typedef u16 acpi_owner_id;
|
|||
#define ACPI_FIELD_DWORD_GRANULARITY 4
|
||||
#define ACPI_FIELD_QWORD_GRANULARITY 8
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Namespace typedefs and structs
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/* Operational modes of the AML interpreter/scanner */
|
||||
|
||||
typedef enum
|
||||
|
|
@ -176,7 +175,6 @@ typedef enum
|
|||
* data_type is used to differentiate between internal descriptors, and MUST
|
||||
* be the first byte in this structure.
|
||||
*/
|
||||
|
||||
union acpi_name_union
|
||||
{
|
||||
u32 integer;
|
||||
|
|
@ -415,7 +413,6 @@ struct acpi_field_info
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#define ACPI_CONTROL_NORMAL 0xC0
|
||||
#define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1
|
||||
#define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2
|
||||
|
|
@ -424,6 +421,7 @@ struct acpi_field_info
|
|||
|
||||
|
||||
/* Forward declarations */
|
||||
|
||||
struct acpi_walk_state ;
|
||||
struct acpi_obj_mutex;
|
||||
union acpi_parse_object ;
|
||||
|
|
@ -601,7 +599,6 @@ struct acpi_opcode_info
|
|||
u8 type; /* Opcode type */
|
||||
};
|
||||
|
||||
|
||||
union acpi_parse_value
|
||||
{
|
||||
acpi_integer integer; /* Integer constant (Up to 64 bits) */
|
||||
|
|
@ -613,7 +610,6 @@ union acpi_parse_value
|
|||
union acpi_parse_object *arg; /* arguments and contained ops */
|
||||
};
|
||||
|
||||
|
||||
#define ACPI_PARSE_COMMON \
|
||||
u8 data_type; /* To differentiate various internal objs */\
|
||||
u8 flags; /* Type of Op */\
|
||||
|
|
@ -691,7 +687,6 @@ struct acpi_parse_obj_asl
|
|||
char parse_op_name[12];
|
||||
};
|
||||
|
||||
|
||||
union acpi_parse_object
|
||||
{
|
||||
struct acpi_parse_obj_common common;
|
||||
|
|
@ -834,7 +829,6 @@ struct acpi_bit_register_info
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/* resource_type values */
|
||||
|
||||
#define ACPI_RESOURCE_TYPE_MEMORY_RANGE 0
|
||||
|
|
|
|||
|
|
@ -539,11 +539,6 @@
|
|||
|
||||
|
||||
#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b)
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#define ACPI_DUMP_TABLES(a,b) acpi_ns_dump_tables(a,b)
|
||||
#endif
|
||||
|
||||
#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d)
|
||||
#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a)
|
||||
#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
|
||||
|
|
@ -596,11 +591,6 @@
|
|||
#define ACPI_DUMP_STACK_ENTRY(a)
|
||||
#define ACPI_DUMP_OPERANDS(a,b,c,d,e)
|
||||
#define ACPI_DUMP_ENTRY(a,b)
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#define ACPI_DUMP_TABLES(a,b)
|
||||
#endif
|
||||
|
||||
#define ACPI_DUMP_PATHNAME(a,b,c,d)
|
||||
#define ACPI_DUMP_RESOURCE_LIST(a)
|
||||
#define ACPI_DUMP_BUFFER(a,b)
|
||||
|
|
|
|||
84
include/acpi/acnames.h
Normal file
84
include/acpi/acnames.h
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Name: acnames.h - Global names and strings
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2005, R. Byron Moore
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions, and the following disclaimer,
|
||||
* without modification.
|
||||
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
* substantially similar to the "NO WARRANTY" disclaimer below
|
||||
* ("Disclaimer") and any redistribution must be conditioned upon
|
||||
* including a substantially similar Disclaimer requirement for further
|
||||
* binary redistribution.
|
||||
* 3. Neither the names of the above-listed copyright holders nor the names
|
||||
* of any contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") version 2 as published by the Free
|
||||
* Software Foundation.
|
||||
*
|
||||
* NO WARRANTY
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef __ACNAMES_H__
|
||||
#define __ACNAMES_H__
|
||||
|
||||
/* Method names - these methods can appear anywhere in the namespace */
|
||||
|
||||
#define METHOD_NAME__HID "_HID"
|
||||
#define METHOD_NAME__CID "_CID"
|
||||
#define METHOD_NAME__UID "_UID"
|
||||
#define METHOD_NAME__ADR "_ADR"
|
||||
#define METHOD_NAME__INI "_INI"
|
||||
#define METHOD_NAME__STA "_STA"
|
||||
#define METHOD_NAME__REG "_REG"
|
||||
#define METHOD_NAME__SEG "_SEG"
|
||||
#define METHOD_NAME__BBN "_BBN"
|
||||
#define METHOD_NAME__PRT "_PRT"
|
||||
#define METHOD_NAME__CRS "_CRS"
|
||||
#define METHOD_NAME__PRS "_PRS"
|
||||
#define METHOD_NAME__PRW "_PRW"
|
||||
#define METHOD_NAME__SRS "_SRS"
|
||||
|
||||
/* Method names - these methods must appear at the namespace root */
|
||||
|
||||
#define METHOD_NAME__BFS "\\_BFS"
|
||||
#define METHOD_NAME__GTS "\\_GTS"
|
||||
#define METHOD_NAME__PTS "\\_PTS"
|
||||
#define METHOD_NAME__SST "\\_SI._SST"
|
||||
#define METHOD_NAME__WAK "\\_WAK"
|
||||
|
||||
/* Definitions of the predefined namespace names */
|
||||
|
||||
#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */
|
||||
#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */
|
||||
#define ACPI_SYS_BUS_NAME (u32) 0x5F53425F /* Sys bus name is "_SB_" */
|
||||
|
||||
#define ACPI_NS_ROOT_PATH "\\"
|
||||
#define ACPI_NS_SYSTEM_BUS "_SB_"
|
||||
|
||||
|
||||
#endif /* __ACNAMES_H__ */
|
||||
|
||||
|
||||
|
|
@ -57,17 +57,6 @@
|
|||
#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */
|
||||
#define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */
|
||||
|
||||
|
||||
/* Definitions of the predefined namespace names */
|
||||
|
||||
#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */
|
||||
#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */
|
||||
#define ACPI_SYS_BUS_NAME (u32) 0x5F53425F /* Sys bus name is "_SB_" */
|
||||
|
||||
#define ACPI_NS_ROOT_PATH "\\"
|
||||
#define ACPI_NS_SYSTEM_BUS "_SB_"
|
||||
|
||||
|
||||
/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */
|
||||
|
||||
#define ACPI_NS_NO_UPSEARCH 0
|
||||
|
|
@ -80,10 +69,9 @@
|
|||
#define ACPI_NS_WALK_NO_UNLOCK FALSE
|
||||
|
||||
|
||||
acpi_status
|
||||
acpi_ns_load_namespace (
|
||||
void);
|
||||
|
||||
/*
|
||||
* nsinit - Namespace initialization
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ns_initialize_objects (
|
||||
void);
|
||||
|
|
@ -93,23 +81,22 @@ acpi_ns_initialize_devices (
|
|||
void);
|
||||
|
||||
|
||||
/* Namespace init - nsxfinit */
|
||||
/*
|
||||
* nsload - Namespace loading
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ns_load_namespace (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_init_one_device (
|
||||
acpi_handle obj_handle,
|
||||
u32 nesting_level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_init_one_object (
|
||||
acpi_handle obj_handle,
|
||||
u32 level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
acpi_ns_load_table (
|
||||
struct acpi_table_desc *table_desc,
|
||||
struct acpi_namespace_node *node);
|
||||
|
||||
|
||||
/*
|
||||
* nswalk - walk the namespace
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ns_walk_namespace (
|
||||
acpi_object_type type,
|
||||
|
|
@ -126,37 +113,24 @@ acpi_ns_get_next_node (
|
|||
struct acpi_namespace_node *parent,
|
||||
struct acpi_namespace_node *child);
|
||||
|
||||
void
|
||||
acpi_ns_delete_namespace_by_owner (
|
||||
u16 table_id);
|
||||
|
||||
|
||||
/* Namespace loading - nsload */
|
||||
|
||||
acpi_status
|
||||
acpi_ns_one_complete_parse (
|
||||
u32 pass_number,
|
||||
struct acpi_table_desc *table_desc);
|
||||
|
||||
/*
|
||||
* nsparse - table parsing
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ns_parse_table (
|
||||
struct acpi_table_desc *table_desc,
|
||||
struct acpi_namespace_node *scope);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_load_table (
|
||||
struct acpi_table_desc *table_desc,
|
||||
struct acpi_namespace_node *node);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_load_table_by_type (
|
||||
acpi_table_type table_type);
|
||||
acpi_ns_one_complete_parse (
|
||||
u32 pass_number,
|
||||
struct acpi_table_desc *table_desc);
|
||||
|
||||
|
||||
/*
|
||||
* Top-level namespace access - nsaccess
|
||||
* nsaccess - Top-level namespace access
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ns_root_initialize (
|
||||
void);
|
||||
|
|
@ -173,9 +147,8 @@ acpi_ns_lookup (
|
|||
|
||||
|
||||
/*
|
||||
* Named object allocation/deallocation - nsalloc
|
||||
* nsalloc - Named object allocation/deallocation
|
||||
*/
|
||||
|
||||
struct acpi_namespace_node *
|
||||
acpi_ns_create_node (
|
||||
u32 name);
|
||||
|
|
@ -188,6 +161,10 @@ void
|
|||
acpi_ns_delete_namespace_subtree (
|
||||
struct acpi_namespace_node *parent_handle);
|
||||
|
||||
void
|
||||
acpi_ns_delete_namespace_by_owner (
|
||||
u16 table_id);
|
||||
|
||||
void
|
||||
acpi_ns_detach_object (
|
||||
struct acpi_namespace_node *node);
|
||||
|
|
@ -201,36 +178,16 @@ acpi_ns_compare_names (
|
|||
char *name1,
|
||||
char *name2);
|
||||
|
||||
void
|
||||
acpi_ns_remove_reference (
|
||||
struct acpi_namespace_node *node);
|
||||
|
||||
|
||||
/*
|
||||
* Namespace modification - nsmodify
|
||||
* nsdump - Namespace dump/print utilities
|
||||
*/
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_ns_unload_namespace (
|
||||
acpi_handle handle);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_delete_subtree (
|
||||
acpi_handle start_handle);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Namespace dump/print utilities - nsdump
|
||||
*/
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
void
|
||||
acpi_ns_dump_tables (
|
||||
acpi_handle search_base,
|
||||
u32 max_depth);
|
||||
#endif
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
void
|
||||
acpi_ns_dump_entry (
|
||||
|
|
@ -249,19 +206,6 @@ acpi_ns_print_pathname (
|
|||
u32 num_segments,
|
||||
char *pathname);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_ns_dump_one_device (
|
||||
acpi_handle obj_handle,
|
||||
u32 level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
|
||||
void
|
||||
acpi_ns_dump_root_devices (
|
||||
void);
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
acpi_status
|
||||
acpi_ns_dump_one_object (
|
||||
acpi_handle obj_handle,
|
||||
|
|
@ -269,7 +213,7 @@ acpi_ns_dump_one_object (
|
|||
void *context,
|
||||
void **return_value);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
void
|
||||
acpi_ns_dump_objects (
|
||||
acpi_object_type type,
|
||||
|
|
@ -277,13 +221,12 @@ acpi_ns_dump_objects (
|
|||
u32 max_depth,
|
||||
u32 ownder_id,
|
||||
acpi_handle start_handle);
|
||||
#endif
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
|
||||
/*
|
||||
* Namespace evaluation functions - nseval
|
||||
* nseval - Namespace evaluation functions
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ns_evaluate_by_handle (
|
||||
struct acpi_parameter_info *info);
|
||||
|
|
@ -298,40 +241,14 @@ acpi_ns_evaluate_relative (
|
|||
char *pathname,
|
||||
struct acpi_parameter_info *info);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_execute_control_method (
|
||||
struct acpi_parameter_info *info);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_get_object_value (
|
||||
struct acpi_parameter_info *info);
|
||||
|
||||
|
||||
/*
|
||||
* Parent/Child/Peer utility functions
|
||||
* nsnames - Name and Scope manipulation
|
||||
*/
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_name
|
||||
acpi_ns_find_parent_name (
|
||||
struct acpi_namespace_node *node_to_search);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Name and Scope manipulation - nsnames
|
||||
*/
|
||||
|
||||
u32
|
||||
acpi_ns_opens_scope (
|
||||
acpi_object_type type);
|
||||
|
||||
void
|
||||
acpi_ns_build_external_path (
|
||||
struct acpi_namespace_node *node,
|
||||
acpi_size size,
|
||||
char *name_buffer);
|
||||
|
||||
char *
|
||||
acpi_ns_get_external_pathname (
|
||||
struct acpi_namespace_node *node);
|
||||
|
|
@ -363,9 +280,8 @@ acpi_ns_get_pathname_length (
|
|||
|
||||
|
||||
/*
|
||||
* Object management for namespace nodes - nsobject
|
||||
* nsobject - Object management for namespace nodes
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ns_attach_object (
|
||||
struct acpi_namespace_node *node,
|
||||
|
|
@ -399,9 +315,8 @@ acpi_ns_get_attached_data (
|
|||
|
||||
|
||||
/*
|
||||
* Namespace searching and entry - nssearch
|
||||
* nssearch - Namespace searching and entry
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ns_search_and_enter (
|
||||
u32 entry_name,
|
||||
|
|
@ -428,17 +343,12 @@ acpi_ns_install_node (
|
|||
|
||||
|
||||
/*
|
||||
* Utility functions - nsutils
|
||||
* nsutils - Utility functions
|
||||
*/
|
||||
|
||||
u8
|
||||
acpi_ns_valid_root_prefix (
|
||||
char prefix);
|
||||
|
||||
u8
|
||||
acpi_ns_valid_path_separator (
|
||||
char sep);
|
||||
|
||||
acpi_object_type
|
||||
acpi_ns_get_type (
|
||||
struct acpi_namespace_node *node);
|
||||
|
|
@ -511,5 +421,4 @@ struct acpi_namespace_node *
|
|||
acpi_ns_get_next_valid_node (
|
||||
struct acpi_namespace_node *node);
|
||||
|
||||
|
||||
#endif /* __ACNAMESP_H__ */
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ struct acpi_object_integer
|
|||
acpi_integer value;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Note: The String and Buffer object must be identical through the Pointer
|
||||
* element. There is code that depends on this.
|
||||
|
|
@ -468,7 +469,6 @@ union acpi_operand_object
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/* Object descriptor types */
|
||||
|
||||
#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */
|
||||
|
|
|
|||
325
include/acpi/acopcode.h
Normal file
325
include/acpi/acopcode.h
Normal file
|
|
@ -0,0 +1,325 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Name: acopcode.h - AML opcode information for the AML parser and interpreter
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2005, R. Byron Moore
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions, and the following disclaimer,
|
||||
* without modification.
|
||||
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
* substantially similar to the "NO WARRANTY" disclaimer below
|
||||
* ("Disclaimer") and any redistribution must be conditioned upon
|
||||
* including a substantially similar Disclaimer requirement for further
|
||||
* binary redistribution.
|
||||
* 3. Neither the names of the above-listed copyright holders nor the names
|
||||
* of any contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") version 2 as published by the Free
|
||||
* Software Foundation.
|
||||
*
|
||||
* NO WARRANTY
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef __ACOPCODE_H__
|
||||
#define __ACOPCODE_H__
|
||||
|
||||
#define MAX_EXTENDED_OPCODE 0x88
|
||||
#define NUM_EXTENDED_OPCODE (MAX_EXTENDED_OPCODE + 1)
|
||||
#define MAX_INTERNAL_OPCODE
|
||||
#define NUM_INTERNAL_OPCODE (MAX_INTERNAL_OPCODE + 1)
|
||||
|
||||
/* Used for non-assigned opcodes */
|
||||
|
||||
#define _UNK 0x6B
|
||||
|
||||
/*
|
||||
* Reserved ASCII characters. Do not use any of these for
|
||||
* internal opcodes, since they are used to differentiate
|
||||
* name strings from AML opcodes
|
||||
*/
|
||||
#define _ASC 0x6C
|
||||
#define _NAM 0x6C
|
||||
#define _PFX 0x6D
|
||||
|
||||
|
||||
/*
|
||||
* All AML opcodes and the parse-time arguments for each. Used by the AML
|
||||
* parser Each list is compressed into a 32-bit number and stored in the
|
||||
* master opcode table (in psopcode.c).
|
||||
*/
|
||||
#define ARGP_ACCESSFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_ACQUIRE_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_WORDDATA)
|
||||
#define ARGP_ADD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_ALIAS_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_NAME)
|
||||
#define ARGP_ARG0 ARG_NONE
|
||||
#define ARGP_ARG1 ARG_NONE
|
||||
#define ARGP_ARG2 ARG_NONE
|
||||
#define ARGP_ARG3 ARG_NONE
|
||||
#define ARGP_ARG4 ARG_NONE
|
||||
#define ARGP_ARG5 ARG_NONE
|
||||
#define ARGP_ARG6 ARG_NONE
|
||||
#define ARGP_BANK_FIELD_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_TERMARG, ARGP_BYTEDATA, ARGP_FIELDLIST)
|
||||
#define ARGP_BIT_AND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_BIT_NAND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_BIT_NOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_BIT_NOT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_BIT_OR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_BIT_XOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_BREAK_OP ARG_NONE
|
||||
#define ARGP_BREAK_POINT_OP ARG_NONE
|
||||
#define ARGP_BUFFER_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_BYTELIST)
|
||||
#define ARGP_BYTE_OP ARGP_LIST1 (ARGP_BYTEDATA)
|
||||
#define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
|
||||
#define ARGP_CONTINUE_OP ARG_NONE
|
||||
#define ARGP_COPY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SIMPLENAME)
|
||||
#define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
#define ARGP_CREATE_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
#define ARGP_CREATE_DWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
#define ARGP_CREATE_FIELD_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
#define ARGP_CREATE_QWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
#define ARGP_CREATE_WORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
#define ARGP_DATA_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_DEBUG_OP ARG_NONE
|
||||
#define ARGP_DECREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_TERMARG)
|
||||
#define ARGP_DEVICE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST)
|
||||
#define ARGP_DIVIDE_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET, ARGP_TARGET)
|
||||
#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
|
||||
#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
|
||||
#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
|
||||
#define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG)
|
||||
#define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST)
|
||||
#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_FIND_SET_RIGHT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_FROM_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_IF_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
|
||||
#define ARGP_INCREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_INDEX_FIELD_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_BYTEDATA, ARGP_FIELDLIST)
|
||||
#define ARGP_INDEX_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_LAND_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_LEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_LGREATER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_LGREATEREQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_LLESS_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_LLESSEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_LNOT_OP ARGP_LIST1 (ARGP_TERMARG)
|
||||
#define ARGP_LNOTEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_LOAD_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_SUPERNAME)
|
||||
#define ARGP_LOAD_TABLE_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_LOCAL0 ARG_NONE
|
||||
#define ARGP_LOCAL1 ARG_NONE
|
||||
#define ARGP_LOCAL2 ARG_NONE
|
||||
#define ARGP_LOCAL3 ARG_NONE
|
||||
#define ARGP_LOCAL4 ARG_NONE
|
||||
#define ARGP_LOCAL5 ARG_NONE
|
||||
#define ARGP_LOCAL6 ARG_NONE
|
||||
#define ARGP_LOCAL7 ARG_NONE
|
||||
#define ARGP_LOR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_MATCH_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_METHOD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMLIST)
|
||||
#define ARGP_METHODCALL_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_MID_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_MOD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_MULTIPLY_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_MUTEX_OP ARGP_LIST2 (ARGP_NAME, ARGP_BYTEDATA)
|
||||
#define ARGP_NAME_OP ARGP_LIST2 (ARGP_NAME, ARGP_DATAOBJ)
|
||||
#define ARGP_NAMEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_NAMEPATH_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_NOOP_OP ARG_NONE
|
||||
#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
|
||||
#define ARGP_ONE_OP ARG_NONE
|
||||
#define ARGP_ONES_OP ARG_NONE
|
||||
#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST)
|
||||
#define ARGP_POWER_RES_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_WORDDATA, ARGP_OBJLIST)
|
||||
#define ARGP_PROCESSOR_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_BYTEDATA, ARGP_OBJLIST)
|
||||
#define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA)
|
||||
#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_RELEASE_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_RESERVEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_RESET_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_RETURN_OP ARGP_LIST1 (ARGP_TERMARG)
|
||||
#define ARGP_REVISION_OP ARG_NONE
|
||||
#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST)
|
||||
#define ARGP_SHIFT_LEFT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_SHIFT_RIGHT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_SIGNAL_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_SIZE_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_SLEEP_OP ARGP_LIST1 (ARGP_TERMARG)
|
||||
#define ARGP_STALL_OP ARGP_LIST1 (ARGP_TERMARG)
|
||||
#define ARGP_STATICSTRING_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_STORE_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SUPERNAME)
|
||||
#define ARGP_STRING_OP ARGP_LIST1 (ARGP_CHARLIST)
|
||||
#define ARGP_SUBTRACT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_THERMAL_ZONE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST)
|
||||
#define ARGP_TIMER_OP ARG_NONE
|
||||
#define ARGP_TO_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_TO_BUFFER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_TO_DEC_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_TO_HEX_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_TO_INTEGER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_TO_STRING_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_UNLOAD_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_VAR_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_DATAOBJLIST)
|
||||
#define ARGP_WAIT_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
|
||||
#define ARGP_WHILE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
|
||||
#define ARGP_WORD_OP ARGP_LIST1 (ARGP_WORDDATA)
|
||||
#define ARGP_ZERO_OP ARG_NONE
|
||||
|
||||
|
||||
/*
|
||||
* All AML opcodes and the runtime arguments for each. Used by the AML
|
||||
* interpreter Each list is compressed into a 32-bit number and stored
|
||||
* in the master opcode table (in psopcode.c).
|
||||
*
|
||||
* (Used by prep_operands procedure and the ASL Compiler)
|
||||
*/
|
||||
#define ARGI_ACCESSFIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_INTEGER)
|
||||
#define ARGI_ADD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_ALIAS_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_ARG0 ARG_NONE
|
||||
#define ARGI_ARG1 ARG_NONE
|
||||
#define ARGI_ARG2 ARG_NONE
|
||||
#define ARGI_ARG3 ARG_NONE
|
||||
#define ARGI_ARG4 ARG_NONE
|
||||
#define ARGI_ARG5 ARG_NONE
|
||||
#define ARGI_ARG6 ARG_NONE
|
||||
#define ARGI_BANK_FIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_BREAK_OP ARG_NONE
|
||||
#define ARGI_BREAK_POINT_OP ARG_NONE
|
||||
#define ARGI_BUFFER_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_BYTE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
|
||||
#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF)
|
||||
#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
|
||||
#define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET)
|
||||
#define ARGI_CREATE_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
|
||||
#define ARGI_CREATE_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
|
||||
#define ARGI_CREATE_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
|
||||
#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_INTEGER, ARGI_INTEGER, ARGI_REFERENCE)
|
||||
#define ARGI_CREATE_QWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
|
||||
#define ARGI_CREATE_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
|
||||
#define ARGI_DATA_REGION_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_STRING)
|
||||
#define ARGI_DEBUG_OP ARG_NONE
|
||||
#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
|
||||
#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REF_OR_STRING)
|
||||
#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF, ARGI_TARGETREF)
|
||||
#define ARGI_DWORD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_ELSE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_EVENT_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
|
||||
#define ARGI_FIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_IF_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
|
||||
#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_LAND_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
|
||||
#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
|
||||
#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
|
||||
#define ARGI_LGREATEREQUAL_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
|
||||
#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION_OR_FIELD,ARGI_TARGETREF)
|
||||
#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_ANYTYPE)
|
||||
#define ARGI_LOCAL0 ARG_NONE
|
||||
#define ARGI_LOCAL1 ARG_NONE
|
||||
#define ARGI_LOCAL2 ARG_NONE
|
||||
#define ARGI_LOCAL3 ARG_NONE
|
||||
#define ARGI_LOCAL4 ARG_NONE
|
||||
#define ARGI_LOCAL5 ARG_NONE
|
||||
#define ARGI_LOCAL6 ARG_NONE
|
||||
#define ARGI_LOCAL7 ARG_NONE
|
||||
#define ARGI_LOR_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
|
||||
#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_COMPUTEDATA, ARGI_INTEGER,ARGI_COMPUTEDATA,ARGI_INTEGER)
|
||||
#define ARGI_METHOD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFER_OR_STRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_NAME_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_NAMEDFIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_NAMEPATH_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_NOOP_OP ARG_NONE
|
||||
#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER)
|
||||
#define ARGI_ONE_OP ARG_NONE
|
||||
#define ARGI_ONES_OP ARG_NONE
|
||||
#define ARGI_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_POWER_RES_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_PROCESSOR_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_QWORD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_OBJECT_REF)
|
||||
#define ARGI_REGION_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
|
||||
#define ARGI_RELEASE_OP ARGI_LIST1 (ARGI_MUTEX)
|
||||
#define ARGI_RESERVEDFIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_RESET_OP ARGI_LIST1 (ARGI_EVENT)
|
||||
#define ARGI_RETURN_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_REVISION_OP ARG_NONE
|
||||
#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT)
|
||||
#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_DATAOBJECT)
|
||||
#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_STALL_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_STATICSTRING_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_STORE_OP ARGI_LIST2 (ARGI_DATAREFOBJ, ARGI_TARGETREF)
|
||||
#define ARGI_STRING_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_TIMER_OP ARG_NONE
|
||||
#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET)
|
||||
#define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
|
||||
#define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
|
||||
#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
|
||||
#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
|
||||
#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET)
|
||||
#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
|
||||
#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE)
|
||||
#define ARGI_VAR_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER)
|
||||
#define ARGI_WHILE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_WORD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_ZERO_OP ARG_NONE
|
||||
|
||||
#endif /* __ACOPCODE_H__ */
|
||||
|
|
@ -64,8 +64,17 @@
|
|||
|
||||
#define ACPI_PARSE_DEFERRED_OP 0x0100
|
||||
|
||||
/* Parser external interfaces */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Parser interfaces
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* psxface - Parser external interfaces
|
||||
*/
|
||||
acpi_status
|
||||
acpi_psx_load_table (
|
||||
u8 *pcode_addr,
|
||||
|
|
@ -76,23 +85,13 @@ acpi_psx_execute (
|
|||
struct acpi_parameter_info *info);
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Parser interfaces
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/* psargs - Parse AML opcode arguments */
|
||||
|
||||
/*
|
||||
* psargs - Parse AML opcode arguments
|
||||
*/
|
||||
u8 *
|
||||
acpi_ps_get_next_package_end (
|
||||
struct acpi_parse_state *parser_state);
|
||||
|
||||
u32
|
||||
acpi_ps_get_next_package_length (
|
||||
struct acpi_parse_state *parser_state);
|
||||
|
||||
char *
|
||||
acpi_ps_get_next_namestring (
|
||||
struct acpi_parse_state *parser_state);
|
||||
|
|
@ -110,10 +109,6 @@ acpi_ps_get_next_namepath (
|
|||
union acpi_parse_object *arg,
|
||||
u8 method_call);
|
||||
|
||||
union acpi_parse_object *
|
||||
acpi_ps_get_next_field (
|
||||
struct acpi_parse_state *parser_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ps_get_next_arg (
|
||||
struct acpi_walk_state *walk_state,
|
||||
|
|
@ -122,8 +117,9 @@ acpi_ps_get_next_arg (
|
|||
union acpi_parse_object **return_arg);
|
||||
|
||||
|
||||
/* psfind */
|
||||
|
||||
/*
|
||||
* psfind
|
||||
*/
|
||||
union acpi_parse_object *
|
||||
acpi_ps_find_name (
|
||||
union acpi_parse_object *scope,
|
||||
|
|
@ -135,8 +131,9 @@ acpi_ps_get_parent (
|
|||
union acpi_parse_object *op);
|
||||
|
||||
|
||||
/* psopcode - AML Opcode information */
|
||||
|
||||
/*
|
||||
* psopcode - AML Opcode information
|
||||
*/
|
||||
const struct acpi_opcode_info *
|
||||
acpi_ps_get_opcode_info (
|
||||
u16 opcode);
|
||||
|
|
@ -146,56 +143,25 @@ acpi_ps_get_opcode_name (
|
|||
u16 opcode);
|
||||
|
||||
|
||||
/* psparse - top level parsing routines */
|
||||
|
||||
u32
|
||||
acpi_ps_get_opcode_size (
|
||||
u32 opcode);
|
||||
|
||||
void
|
||||
acpi_ps_complete_this_op (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *op);
|
||||
|
||||
acpi_status
|
||||
acpi_ps_next_parse_state (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *op,
|
||||
acpi_status callback_status);
|
||||
|
||||
acpi_status
|
||||
acpi_ps_find_object (
|
||||
struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object **out_op);
|
||||
|
||||
void
|
||||
acpi_ps_delete_parse_tree (
|
||||
union acpi_parse_object *root);
|
||||
|
||||
acpi_status
|
||||
acpi_ps_parse_loop (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
/*
|
||||
* psparse - top level parsing routines
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ps_parse_aml (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ps_parse_table (
|
||||
u8 *aml,
|
||||
u32 aml_size,
|
||||
acpi_parse_downwards descending_callback,
|
||||
acpi_parse_upwards ascending_callback,
|
||||
union acpi_parse_object **root_object);
|
||||
u32
|
||||
acpi_ps_get_opcode_size (
|
||||
u32 opcode);
|
||||
|
||||
u16
|
||||
acpi_ps_peek_opcode (
|
||||
struct acpi_parse_state *state);
|
||||
|
||||
|
||||
/* psscope - Scope stack management routines */
|
||||
|
||||
|
||||
/*
|
||||
* psscope - Scope stack management routines
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ps_init_scope (
|
||||
struct acpi_parse_state *parser_state,
|
||||
|
|
@ -228,8 +194,9 @@ acpi_ps_cleanup_scope (
|
|||
struct acpi_parse_state *state);
|
||||
|
||||
|
||||
/* pstree - parse tree manipulation routines */
|
||||
|
||||
/*
|
||||
* pstree - parse tree manipulation routines
|
||||
*/
|
||||
void
|
||||
acpi_ps_append_arg(
|
||||
union acpi_parse_object *op,
|
||||
|
|
@ -247,20 +214,17 @@ acpi_ps_get_arg(
|
|||
union acpi_parse_object *op,
|
||||
u32 argn);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
union acpi_parse_object *
|
||||
acpi_ps_get_child (
|
||||
union acpi_parse_object *op);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
union acpi_parse_object *
|
||||
acpi_ps_get_depth_next (
|
||||
union acpi_parse_object *origin,
|
||||
union acpi_parse_object *op);
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
|
||||
/* pswalk - parse tree walk routines */
|
||||
|
||||
/*
|
||||
* pswalk - parse tree walk routines
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ps_walk_parsed_aml (
|
||||
union acpi_parse_object *start_op,
|
||||
|
|
@ -283,9 +247,14 @@ acpi_status
|
|||
acpi_ps_delete_completed_op (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
void
|
||||
acpi_ps_delete_parse_tree (
|
||||
union acpi_parse_object *root);
|
||||
|
||||
/* psutils - parser utilities */
|
||||
|
||||
/*
|
||||
* psutils - parser utilities
|
||||
*/
|
||||
union acpi_parse_object *
|
||||
acpi_ps_create_scope_op (
|
||||
void);
|
||||
|
|
@ -303,12 +272,6 @@ void
|
|||
acpi_ps_free_op (
|
||||
union acpi_parse_object *op);
|
||||
|
||||
#ifdef ACPI_ENABLE_OBJECT_CACHE
|
||||
void
|
||||
acpi_ps_delete_parse_cache (
|
||||
void);
|
||||
#endif
|
||||
|
||||
u8
|
||||
acpi_ps_is_leading_char (
|
||||
u32 c);
|
||||
|
|
@ -317,20 +280,27 @@ u8
|
|||
acpi_ps_is_prefix_char (
|
||||
u32 c);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
u32
|
||||
acpi_ps_get_name(
|
||||
union acpi_parse_object *op);
|
||||
#endif
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
void
|
||||
acpi_ps_set_name(
|
||||
union acpi_parse_object *op,
|
||||
u32 name);
|
||||
|
||||
#ifdef ACPI_ENABLE_OBJECT_CACHE
|
||||
void
|
||||
acpi_ps_delete_parse_cache (
|
||||
void);
|
||||
#endif
|
||||
|
||||
/* psdump - display parser tree */
|
||||
|
||||
/*
|
||||
* psdump - display parser tree
|
||||
*/
|
||||
u32
|
||||
acpi_ps_sprint_path (
|
||||
char *buffer_start,
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
* We put them here because we don't want to duplicate them
|
||||
* in the rest of the source code again and again.
|
||||
*/
|
||||
#include "acnames.h" /* Global ACPI names and strings */
|
||||
#include "acconfig.h" /* Configuration constants */
|
||||
#include "platform/acenv.h" /* Target environment specific items */
|
||||
#include "actypes.h" /* Fundamental common data types */
|
||||
|
|
|
|||
|
|
@ -108,6 +108,21 @@ typedef int (*acpi_op_unbind) (struct acpi_device *device);
|
|||
typedef int (*acpi_op_match) (struct acpi_device *device,
|
||||
struct acpi_driver *driver);
|
||||
|
||||
struct acpi_bus_ops {
|
||||
u32 acpi_op_add:1;
|
||||
u32 acpi_op_remove:1;
|
||||
u32 acpi_op_lock:1;
|
||||
u32 acpi_op_start:1;
|
||||
u32 acpi_op_stop:1;
|
||||
u32 acpi_op_suspend:1;
|
||||
u32 acpi_op_resume:1;
|
||||
u32 acpi_op_scan:1;
|
||||
u32 acpi_op_bind:1;
|
||||
u32 acpi_op_unbind:1;
|
||||
u32 acpi_op_match:1;
|
||||
u32 reserved:21;
|
||||
};
|
||||
|
||||
struct acpi_device_ops {
|
||||
acpi_op_add add;
|
||||
acpi_op_remove remove;
|
||||
|
|
@ -327,15 +342,36 @@ int acpi_bus_generate_event (struct acpi_device *device, u8 type, int data);
|
|||
int acpi_bus_receive_event (struct acpi_bus_event *event);
|
||||
int acpi_bus_register_driver (struct acpi_driver *driver);
|
||||
int acpi_bus_unregister_driver (struct acpi_driver *driver);
|
||||
int acpi_bus_scan (struct acpi_device *start);
|
||||
int acpi_bus_add (struct acpi_device **child, struct acpi_device *parent,
|
||||
acpi_handle handle, int type);
|
||||
int acpi_bus_start (struct acpi_device *device);
|
||||
|
||||
|
||||
int acpi_match_ids (struct acpi_device *device, char *ids);
|
||||
int acpi_create_dir(struct acpi_device *);
|
||||
void acpi_remove_dir(struct acpi_device *);
|
||||
|
||||
|
||||
/*
|
||||
* Bind physical devices with ACPI devices
|
||||
*/
|
||||
#include <linux/device.h>
|
||||
struct acpi_bus_type {
|
||||
struct list_head list;
|
||||
struct bus_type *bus;
|
||||
/* For general devices under the bus*/
|
||||
int (*find_device)(struct device *, acpi_handle*);
|
||||
/* For bridges, such as PCI root bridge, IDE controller */
|
||||
int (*find_bridge)(struct device *, acpi_handle *);
|
||||
};
|
||||
int register_acpi_bus_type(struct acpi_bus_type *);
|
||||
int unregister_acpi_bus_type(struct acpi_bus_type *);
|
||||
struct device *acpi_get_physical_device(acpi_handle);
|
||||
/* helper */
|
||||
acpi_handle acpi_get_child(acpi_handle, acpi_integer);
|
||||
acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
|
||||
#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->firmware_data))
|
||||
|
||||
#endif /*CONFIG_ACPI_BUS*/
|
||||
|
||||
#endif /*__ACPI_BUS_H__*/
|
||||
|
|
|
|||
|
|
@ -56,8 +56,9 @@
|
|||
/* ACPI PCI Interrupt Link (pci_link.c) */
|
||||
|
||||
int acpi_irq_penalty_init (void);
|
||||
int acpi_pci_link_get_irq (acpi_handle handle, int index, int *edge_level,
|
||||
int acpi_pci_link_allocate_irq (acpi_handle handle, int index, int *edge_level,
|
||||
int *active_high_low, char **name);
|
||||
int acpi_pci_link_free_irq(acpi_handle handle);
|
||||
|
||||
/* ACPI PCI Interrupt Routing (pci_irq.c) */
|
||||
|
||||
|
|
@ -68,6 +69,7 @@ void acpi_pci_irq_del_prt (int segment, int bus);
|
|||
|
||||
struct pci_bus;
|
||||
|
||||
acpi_status acpi_get_pci_id (acpi_handle handle, struct acpi_pci_id *id);
|
||||
int acpi_pci_bind (struct acpi_device *device);
|
||||
int acpi_pci_unbind (struct acpi_device *device);
|
||||
int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus);
|
||||
|
|
@ -108,5 +110,10 @@ int acpi_ec_ecdt_probe (void);
|
|||
|
||||
int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
Hot Keys
|
||||
-------------------------------------------------------------------------- */
|
||||
|
||||
extern int acpi_specific_hotkey_enabled;
|
||||
|
||||
#endif /*__ACPI_DRIVERS_H__*/
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ struct acpi_signal_fatal_info
|
|||
/*
|
||||
* OSL Initialization and shutdown primitives
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_os_initialize (
|
||||
void);
|
||||
|
|
@ -92,7 +91,6 @@ acpi_os_terminate (
|
|||
/*
|
||||
* ACPI Table interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_os_get_root_pointer (
|
||||
u32 flags,
|
||||
|
|
@ -112,7 +110,6 @@ acpi_os_table_override (
|
|||
/*
|
||||
* Synchronization primitives
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_os_create_semaphore (
|
||||
u32 max_units,
|
||||
|
|
@ -156,7 +153,6 @@ acpi_os_release_lock (
|
|||
/*
|
||||
* Memory allocation and mapping
|
||||
*/
|
||||
|
||||
void *
|
||||
acpi_os_allocate (
|
||||
acpi_size size);
|
||||
|
|
@ -187,7 +183,6 @@ acpi_os_get_physical_address (
|
|||
/*
|
||||
* Interrupt handlers
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_os_install_interrupt_handler (
|
||||
u32 gsi,
|
||||
|
|
@ -203,7 +198,6 @@ acpi_os_remove_interrupt_handler (
|
|||
/*
|
||||
* Threads and Scheduling
|
||||
*/
|
||||
|
||||
u32
|
||||
acpi_os_get_thread_id (
|
||||
void);
|
||||
|
|
@ -234,7 +228,6 @@ acpi_os_stall (
|
|||
/*
|
||||
* Platform and hardware-independent I/O interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_os_read_port (
|
||||
acpi_io_address address,
|
||||
|
|
@ -251,7 +244,6 @@ acpi_os_write_port (
|
|||
/*
|
||||
* Platform and hardware-independent physical memory interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_os_read_memory (
|
||||
acpi_physical_address address,
|
||||
|
|
@ -270,7 +262,6 @@ acpi_os_write_memory (
|
|||
* Note: Can't use "Register" as a parameter, changed to "Reg" --
|
||||
* certain compilers complain.
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_os_read_pci_configuration (
|
||||
struct acpi_pci_id *pci_id,
|
||||
|
|
@ -288,7 +279,6 @@ acpi_os_write_pci_configuration (
|
|||
/*
|
||||
* Interim function needed for PCI IRQ routing
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_os_derive_pci_id(
|
||||
acpi_handle rhandle,
|
||||
|
|
@ -298,7 +288,6 @@ acpi_os_derive_pci_id(
|
|||
/*
|
||||
* Miscellaneous
|
||||
*/
|
||||
|
||||
u8
|
||||
acpi_os_readable (
|
||||
void *pointer,
|
||||
|
|
@ -323,7 +312,6 @@ acpi_os_signal (
|
|||
/*
|
||||
* Debug print routines
|
||||
*/
|
||||
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_os_printf (
|
||||
const char *format,
|
||||
|
|
@ -339,11 +327,10 @@ acpi_os_redirect_output (
|
|||
void *destination);
|
||||
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
/*
|
||||
* Debug input
|
||||
*/
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
u32
|
||||
acpi_os_get_line (
|
||||
char *buffer);
|
||||
|
|
@ -353,7 +340,6 @@ acpi_os_get_line (
|
|||
/*
|
||||
* Directory manipulation
|
||||
*/
|
||||
|
||||
void *
|
||||
acpi_os_open_directory (
|
||||
char *pathname,
|
||||
|
|
@ -377,7 +363,6 @@ acpi_os_close_directory (
|
|||
/*
|
||||
* Debug
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_os_dbg_assert(
|
||||
void *failed_assertion,
|
||||
|
|
@ -385,5 +370,4 @@ acpi_os_dbg_assert(
|
|||
u32 line_number,
|
||||
char *message);
|
||||
|
||||
|
||||
#endif /* __ACPIOSXF_H__ */
|
||||
|
|
|
|||
|
|
@ -50,10 +50,9 @@
|
|||
#include "actbl.h"
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Global interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_initialize_subsystem (
|
||||
void);
|
||||
|
|
@ -106,9 +105,8 @@ acpi_install_initialization_handler (
|
|||
#endif
|
||||
|
||||
/*
|
||||
* ACPI Memory manager
|
||||
* ACPI Memory managment
|
||||
*/
|
||||
|
||||
void *
|
||||
acpi_allocate (
|
||||
u32 size);
|
||||
|
|
@ -125,7 +123,6 @@ acpi_free (
|
|||
/*
|
||||
* ACPI table manipulation interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_find_root_pointer (
|
||||
u32 flags,
|
||||
|
|
@ -168,7 +165,6 @@ acpi_get_firmware_table (
|
|||
/*
|
||||
* Namespace and name interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_walk_namespace (
|
||||
acpi_object_type type,
|
||||
|
|
@ -218,7 +214,6 @@ acpi_get_data (
|
|||
/*
|
||||
* Object manipulation and enumeration
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_evaluate_object (
|
||||
acpi_handle object,
|
||||
|
|
@ -262,7 +257,6 @@ acpi_get_parent (
|
|||
/*
|
||||
* Event handler interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_install_fixed_event_handler (
|
||||
u32 acpi_event,
|
||||
|
|
@ -319,7 +313,6 @@ acpi_install_exception_handler (
|
|||
/*
|
||||
* Event interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_acquire_global_lock (
|
||||
u16 timeout,
|
||||
|
|
@ -404,7 +397,6 @@ acpi_remove_gpe_block (
|
|||
/*
|
||||
* Resource interfaces
|
||||
*/
|
||||
|
||||
typedef
|
||||
acpi_status (*ACPI_WALK_RESOURCE_CALLBACK) (
|
||||
struct acpi_resource *resource,
|
||||
|
|
@ -448,7 +440,6 @@ acpi_resource_to_address64 (
|
|||
/*
|
||||
* Hardware (ACPI device) interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_get_register (
|
||||
u32 register_id,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
/*
|
||||
* Function prototypes called from Acpi* APIs
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_rs_get_prt_method_data (
|
||||
acpi_handle handle,
|
||||
|
|
@ -60,12 +59,12 @@ acpi_rs_get_crs_method_data (
|
|||
acpi_handle handle,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_rs_get_prs_method_data (
|
||||
acpi_handle handle,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
#endif
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
acpi_status
|
||||
acpi_rs_get_method_data (
|
||||
|
|
@ -95,61 +94,9 @@ acpi_rs_create_pci_routing_table (
|
|||
|
||||
|
||||
/*
|
||||
* Function prototypes called from acpi_rs_create*
|
||||
* rsdump
|
||||
*/
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
void
|
||||
acpi_rs_dump_irq (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_address16 (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_address32 (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_address64 (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_dma (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_io (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_extended_irq (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_fixed_io (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_fixed_memory32 (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_memory24 (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_memory32 (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_start_depend_fns (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
void
|
||||
acpi_rs_dump_vendor_specific (
|
||||
union acpi_resource_data *data);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
void
|
||||
acpi_rs_dump_resource_list (
|
||||
struct acpi_resource *resource);
|
||||
|
|
@ -157,8 +104,12 @@ acpi_rs_dump_resource_list (
|
|||
void
|
||||
acpi_rs_dump_irq_list (
|
||||
u8 *route_table);
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
|
||||
/*
|
||||
* rscalc
|
||||
*/
|
||||
acpi_status
|
||||
acpi_rs_get_byte_stream_start (
|
||||
u8 *byte_stream_buffer,
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@
|
|||
* Walk state - current state of a parse tree walk. Used for both a leisurely stroll through
|
||||
* the tree (for whatever reason), and for control method execution.
|
||||
*/
|
||||
|
||||
#define ACPI_NEXT_OP_DOWNWARD 1
|
||||
#define ACPI_NEXT_OP_UPWARD 2
|
||||
|
||||
|
|
|
|||
|
|
@ -50,17 +50,9 @@
|
|||
#define SIZE_IN_HEADER 0
|
||||
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_tb_handle_to_object (
|
||||
u16 table_id,
|
||||
struct acpi_table_desc **table_desc);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* tbconvrt - Table conversion routines
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_tb_convert_to_xsdt (
|
||||
struct acpi_table_desc *table_info);
|
||||
|
|
@ -78,10 +70,10 @@ acpi_tb_get_table_count (
|
|||
struct rsdp_descriptor *RSDP,
|
||||
struct acpi_table_header *RSDT);
|
||||
|
||||
|
||||
/*
|
||||
* tbget - Table "get" routines
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_tb_get_table (
|
||||
struct acpi_pointer *address,
|
||||
|
|
@ -98,17 +90,6 @@ acpi_tb_get_table_body (
|
|||
struct acpi_table_header *header,
|
||||
struct acpi_table_desc *table_info);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_get_this_table (
|
||||
struct acpi_pointer *address,
|
||||
struct acpi_table_header *header,
|
||||
struct acpi_table_desc *table_info);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_table_override (
|
||||
struct acpi_table_header *header,
|
||||
struct acpi_table_desc *table_info);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_get_table_ptr (
|
||||
acpi_table_type table_type,
|
||||
|
|
@ -127,35 +108,22 @@ acpi_status
|
|||
acpi_tb_validate_rsdt (
|
||||
struct acpi_table_header *table_ptr);
|
||||
|
||||
|
||||
/*
|
||||
* tbgetall - get multiple required tables
|
||||
*/
|
||||
acpi_status
|
||||
acpi_tb_get_required_tables (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_get_primary_table (
|
||||
struct acpi_pointer *address,
|
||||
struct acpi_table_desc *table_info);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_get_secondary_table (
|
||||
struct acpi_pointer *address,
|
||||
acpi_string signature,
|
||||
struct acpi_table_desc *table_info);
|
||||
|
||||
/*
|
||||
* tbinstall - Table installation
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_tb_install_table (
|
||||
struct acpi_table_desc *table_info);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_match_signature (
|
||||
char *signature,
|
||||
struct acpi_table_desc *table_info,
|
||||
u8 search_type);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_recognize_table (
|
||||
struct acpi_table_desc *table_info,
|
||||
|
|
@ -170,7 +138,6 @@ acpi_tb_init_table_descriptor (
|
|||
/*
|
||||
* tbremove - Table removal and deletion
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_tb_delete_all_tables (
|
||||
void);
|
||||
|
|
@ -189,28 +156,8 @@ acpi_tb_uninstall_table (
|
|||
|
||||
|
||||
/*
|
||||
* tbrsd - RSDP, RSDT utilities
|
||||
* tbxfroot - RSDP, RSDT utilities
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_tb_get_table_rsdt (
|
||||
void);
|
||||
|
||||
u8 *
|
||||
acpi_tb_scan_memory_for_rsdp (
|
||||
u8 *start_address,
|
||||
u32 length);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_find_rsdp (
|
||||
struct acpi_table_desc *table_info,
|
||||
u32 flags);
|
||||
|
||||
|
||||
/*
|
||||
* tbutils - common table utilities
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_tb_find_table (
|
||||
char *signature,
|
||||
|
|
@ -219,6 +166,14 @@ acpi_tb_find_table (
|
|||
struct acpi_table_header **table_ptr);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_get_table_rsdt (
|
||||
void);
|
||||
|
||||
|
||||
/*
|
||||
* tbutils - common table utilities
|
||||
*/
|
||||
acpi_status
|
||||
acpi_tb_verify_table_checksum (
|
||||
struct acpi_table_header *table_header);
|
||||
|
||||
|
|
@ -231,5 +186,4 @@ acpi_status
|
|||
acpi_tb_validate_table_header (
|
||||
struct acpi_table_header *table_header);
|
||||
|
||||
|
||||
#endif /* __ACTABLES_H__ */
|
||||
|
|
|
|||
|
|
@ -133,7 +133,6 @@ struct acpi_table_header /* ACPI common table header */
|
|||
#define DUAL_PIC 0
|
||||
#define MULTIPLE_APIC 1
|
||||
|
||||
|
||||
/* Master MADT */
|
||||
|
||||
struct multiple_apic_table
|
||||
|
|
@ -144,7 +143,6 @@ struct multiple_apic_table
|
|||
u32 reserved1 : 31;
|
||||
};
|
||||
|
||||
|
||||
/* Values for Type in APIC_HEADER_DEF */
|
||||
|
||||
#define APIC_PROCESSOR 0
|
||||
|
|
|
|||
|
|
@ -478,7 +478,6 @@ typedef u32 acpi_object_type;
|
|||
#define ACPI_TYPE_INVALID 0x1E
|
||||
#define ACPI_TYPE_NOT_FOUND 0xFF
|
||||
|
||||
|
||||
/*
|
||||
* Bitmapped ACPI types. Used internally only
|
||||
*/
|
||||
|
|
@ -803,7 +802,6 @@ struct acpi_system_info
|
|||
/*
|
||||
* Types specific to the OS service interfaces
|
||||
*/
|
||||
|
||||
typedef u32
|
||||
(ACPI_SYSTEM_XFACE *acpi_osd_handler) (
|
||||
void *context);
|
||||
|
|
|
|||
|
|
@ -52,13 +52,6 @@ acpi_status (*acpi_pkg_callback) (
|
|||
union acpi_generic_state *state,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_walk_package_tree (
|
||||
union acpi_operand_object *source_object,
|
||||
void *target_object,
|
||||
acpi_pkg_callback walk_callback,
|
||||
void *context);
|
||||
|
||||
struct acpi_pkg_info
|
||||
{
|
||||
u8 *free_space;
|
||||
|
|
@ -79,37 +72,13 @@ struct acpi_pkg_info
|
|||
#define DB_QWORD_DISPLAY 8
|
||||
|
||||
|
||||
/* Global initialization interfaces */
|
||||
|
||||
/*
|
||||
* utglobal - Global data structures and procedures
|
||||
*/
|
||||
void
|
||||
acpi_ut_init_globals (
|
||||
void);
|
||||
|
||||
void
|
||||
acpi_ut_terminate (
|
||||
void);
|
||||
|
||||
|
||||
/*
|
||||
* ut_init - miscellaneous initialization and shutdown
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ut_hardware_initialize (
|
||||
void);
|
||||
|
||||
void
|
||||
acpi_ut_subsystem_shutdown (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_validate_fadt (
|
||||
void);
|
||||
|
||||
/*
|
||||
* ut_global - Global data structures and procedures
|
||||
*/
|
||||
|
||||
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
||||
|
||||
char *
|
||||
|
|
@ -157,9 +126,24 @@ acpi_ut_allocate_owner_id (
|
|||
|
||||
|
||||
/*
|
||||
* ut_clib - Local implementations of C library functions
|
||||
* utinit - miscellaneous initialization and shutdown
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ut_hardware_initialize (
|
||||
void);
|
||||
|
||||
void
|
||||
acpi_ut_subsystem_shutdown (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_validate_fadt (
|
||||
void);
|
||||
|
||||
|
||||
/*
|
||||
* utclib - Local implementations of C library functions
|
||||
*/
|
||||
#ifndef ACPI_USE_SYSTEM_CLIBRARY
|
||||
|
||||
acpi_size
|
||||
|
|
@ -260,10 +244,10 @@ extern const u8 _acpi_ctype[];
|
|||
|
||||
#endif /* ACPI_USE_SYSTEM_CLIBRARY */
|
||||
|
||||
/*
|
||||
* ut_copy - Object construction and conversion interfaces
|
||||
*/
|
||||
|
||||
/*
|
||||
* utcopy - Object construction and conversion interfaces
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ut_build_simple_object(
|
||||
union acpi_operand_object *obj,
|
||||
|
|
@ -277,30 +261,11 @@ acpi_ut_build_package_object (
|
|||
u8 *buffer,
|
||||
u32 *space_used);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_copy_ielement_to_eelement (
|
||||
u8 object_type,
|
||||
union acpi_operand_object *source_object,
|
||||
union acpi_generic_state *state,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_copy_ielement_to_ielement (
|
||||
u8 object_type,
|
||||
union acpi_operand_object *source_object,
|
||||
union acpi_generic_state *state,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_copy_iobject_to_eobject (
|
||||
union acpi_operand_object *obj,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_copy_esimple_to_isimple(
|
||||
union acpi_object *user_obj,
|
||||
union acpi_operand_object **return_obj);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_copy_eobject_to_iobject (
|
||||
union acpi_object *obj,
|
||||
|
|
@ -311,17 +276,6 @@ acpi_ut_copy_isimple_to_isimple (
|
|||
union acpi_operand_object *source_obj,
|
||||
union acpi_operand_object *dest_obj);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_copy_ipackage_to_ipackage (
|
||||
union acpi_operand_object *source_obj,
|
||||
union acpi_operand_object *dest_obj,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_copy_simple_object (
|
||||
union acpi_operand_object *source_desc,
|
||||
union acpi_operand_object *dest_desc);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_copy_iobject_to_iobject (
|
||||
union acpi_operand_object *source_desc,
|
||||
|
|
@ -330,9 +284,8 @@ acpi_ut_copy_iobject_to_iobject (
|
|||
|
||||
|
||||
/*
|
||||
* ut_create - Object creation
|
||||
* utcreate - Object creation
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ut_update_object_reference (
|
||||
union acpi_operand_object *object,
|
||||
|
|
@ -340,9 +293,8 @@ acpi_ut_update_object_reference (
|
|||
|
||||
|
||||
/*
|
||||
* ut_debug - Debug interfaces
|
||||
* utdebug - Debug interfaces
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_ut_init_stack_ptr_trace (
|
||||
void);
|
||||
|
|
@ -440,11 +392,14 @@ acpi_ut_debug_print_raw (
|
|||
|
||||
|
||||
/*
|
||||
* ut_delete - Object deletion
|
||||
* utdelete - Object deletion and reference counts
|
||||
*/
|
||||
void
|
||||
acpi_ut_add_reference (
|
||||
union acpi_operand_object *object);
|
||||
|
||||
void
|
||||
acpi_ut_delete_internal_obj (
|
||||
acpi_ut_remove_reference (
|
||||
union acpi_operand_object *object);
|
||||
|
||||
void
|
||||
|
|
@ -461,25 +416,8 @@ acpi_ut_delete_internal_object_list (
|
|||
|
||||
|
||||
/*
|
||||
* ut_eval - object evaluation
|
||||
* uteval - object evaluation
|
||||
*/
|
||||
|
||||
/* Method name strings */
|
||||
|
||||
#define METHOD_NAME__HID "_HID"
|
||||
#define METHOD_NAME__CID "_CID"
|
||||
#define METHOD_NAME__UID "_UID"
|
||||
#define METHOD_NAME__ADR "_ADR"
|
||||
#define METHOD_NAME__STA "_STA"
|
||||
#define METHOD_NAME__REG "_REG"
|
||||
#define METHOD_NAME__SEG "_SEG"
|
||||
#define METHOD_NAME__BBN "_BBN"
|
||||
#define METHOD_NAME__PRT "_PRT"
|
||||
#define METHOD_NAME__CRS "_CRS"
|
||||
#define METHOD_NAME__PRS "_PRS"
|
||||
#define METHOD_NAME__PRW "_PRW"
|
||||
|
||||
|
||||
acpi_status
|
||||
acpi_ut_osi_implementation (
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
|
@ -522,39 +460,10 @@ acpi_ut_execute_sxds (
|
|||
struct acpi_namespace_node *device_node,
|
||||
u8 *highest);
|
||||
|
||||
/*
|
||||
* ut_mutex - mutual exclusion interfaces
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ut_mutex_initialize (
|
||||
void);
|
||||
|
||||
void
|
||||
acpi_ut_mutex_terminate (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_create_mutex (
|
||||
acpi_mutex_handle mutex_id);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_delete_mutex (
|
||||
acpi_mutex_handle mutex_id);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_acquire_mutex (
|
||||
acpi_mutex_handle mutex_id);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_release_mutex (
|
||||
acpi_mutex_handle mutex_id);
|
||||
|
||||
|
||||
/*
|
||||
* ut_object - internal object create/delete/cache routines
|
||||
* utobject - internal object create/delete/cache routines
|
||||
*/
|
||||
|
||||
union acpi_operand_object *
|
||||
acpi_ut_create_internal_object_dbg (
|
||||
char *module_name,
|
||||
|
|
@ -587,50 +496,15 @@ union acpi_operand_object *
|
|||
acpi_ut_create_string_object (
|
||||
acpi_size string_size);
|
||||
|
||||
|
||||
/*
|
||||
* ut_ref_cnt - Object reference count management
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_ut_add_reference (
|
||||
union acpi_operand_object *object);
|
||||
|
||||
void
|
||||
acpi_ut_remove_reference (
|
||||
union acpi_operand_object *object);
|
||||
|
||||
/*
|
||||
* ut_size - Object size routines
|
||||
*/
|
||||
|
||||
acpi_status
|
||||
acpi_ut_get_simple_object_size (
|
||||
union acpi_operand_object *obj,
|
||||
acpi_size *obj_length);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_get_package_object_size (
|
||||
union acpi_operand_object *obj,
|
||||
acpi_size *obj_length);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_get_object_size(
|
||||
union acpi_operand_object *obj,
|
||||
acpi_size *obj_length);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_get_element_length (
|
||||
u8 object_type,
|
||||
union acpi_operand_object *source_object,
|
||||
union acpi_generic_state *state,
|
||||
void *context);
|
||||
|
||||
|
||||
/*
|
||||
* ut_state - Generic state creation/cache routines
|
||||
* utstate - Generic state creation/cache routines
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_ut_push_generic_state (
|
||||
union acpi_generic_state **list_head,
|
||||
|
|
@ -666,14 +540,14 @@ acpi_ut_create_update_state_and_push (
|
|||
u16 action,
|
||||
union acpi_generic_state **state_list);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_ut_create_pkg_state_and_push (
|
||||
void *internal_object,
|
||||
void *external_object,
|
||||
u16 index,
|
||||
union acpi_generic_state **state_list);
|
||||
#endif
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
union acpi_generic_state *
|
||||
acpi_ut_create_control_state (
|
||||
|
|
@ -693,15 +567,10 @@ acpi_ut_delete_object_cache (
|
|||
void);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* utmisc
|
||||
* utmath
|
||||
*/
|
||||
|
||||
void
|
||||
acpi_ut_print_string (
|
||||
char *string,
|
||||
u8 max_length);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_divide (
|
||||
acpi_integer in_dividend,
|
||||
|
|
@ -716,6 +585,25 @@ acpi_ut_short_divide (
|
|||
acpi_integer *out_quotient,
|
||||
u32 *out_remainder);
|
||||
|
||||
/*
|
||||
* utmisc
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ut_walk_package_tree (
|
||||
union acpi_operand_object *source_object,
|
||||
void *target_object,
|
||||
acpi_pkg_callback walk_callback,
|
||||
void *context);
|
||||
|
||||
char *
|
||||
acpi_ut_strupr (
|
||||
char *src_string);
|
||||
|
||||
void
|
||||
acpi_ut_print_string (
|
||||
char *string,
|
||||
u8 max_length);
|
||||
|
||||
u8
|
||||
acpi_ut_valid_acpi_name (
|
||||
u32 name);
|
||||
|
|
@ -734,11 +622,21 @@ acpi_ut_strtoul64 (
|
|||
|
||||
#define ACPI_ANY_BASE 0
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
char *
|
||||
acpi_ut_strupr (
|
||||
char *src_string);
|
||||
#endif
|
||||
acpi_status
|
||||
acpi_ut_mutex_initialize (
|
||||
void);
|
||||
|
||||
void
|
||||
acpi_ut_mutex_terminate (
|
||||
void);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_acquire_mutex (
|
||||
acpi_mutex_handle mutex_id);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_release_mutex (
|
||||
acpi_mutex_handle mutex_id);
|
||||
|
||||
u8 *
|
||||
acpi_ut_get_resource_end_tag (
|
||||
|
|
@ -768,9 +666,8 @@ acpi_ut_display_init_pathname (
|
|||
|
||||
|
||||
/*
|
||||
* Utalloc - memory allocation and object caching
|
||||
* utalloc - memory allocation and object caching
|
||||
*/
|
||||
|
||||
void *
|
||||
acpi_ut_acquire_from_cache (
|
||||
u32 list_id);
|
||||
|
|
@ -795,9 +692,6 @@ acpi_ut_initialize_buffer (
|
|||
struct acpi_buffer *buffer,
|
||||
acpi_size required_length);
|
||||
|
||||
|
||||
/* Memory allocation functions */
|
||||
|
||||
void *
|
||||
acpi_ut_allocate (
|
||||
acpi_size size,
|
||||
|
|
@ -812,9 +706,7 @@ acpi_ut_callocate (
|
|||
char *module,
|
||||
u32 line);
|
||||
|
||||
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
|
||||
void *
|
||||
acpi_ut_allocate_and_track (
|
||||
acpi_size size,
|
||||
|
|
@ -836,34 +728,11 @@ acpi_ut_free_and_track (
|
|||
char *module,
|
||||
u32 line);
|
||||
|
||||
struct acpi_debug_mem_block *
|
||||
acpi_ut_find_allocation (
|
||||
u32 list_id,
|
||||
void *allocation);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_track_allocation (
|
||||
u32 list_id,
|
||||
struct acpi_debug_mem_block *address,
|
||||
acpi_size size,
|
||||
u8 alloc_type,
|
||||
u32 component,
|
||||
char *module,
|
||||
u32 line);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_remove_allocation (
|
||||
u32 list_id,
|
||||
struct acpi_debug_mem_block *address,
|
||||
u32 component,
|
||||
char *module,
|
||||
u32 line);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
void
|
||||
acpi_ut_dump_allocation_info (
|
||||
void);
|
||||
#endif
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
void
|
||||
acpi_ut_dump_allocations (
|
||||
|
|
@ -871,5 +740,4 @@ acpi_ut_dump_allocations (
|
|||
char *module);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _ACUTILS_H */
|
||||
|
|
|
|||
|
|
@ -146,8 +146,7 @@
|
|||
|
||||
/* prefixed opcodes */
|
||||
|
||||
#define AML_EXTOP (u16) 0x005b
|
||||
|
||||
#define AML_EXTOP (u16) 0x005b /* prefix for 2-byte opcodes */
|
||||
|
||||
#define AML_MUTEX_OP (u16) 0x5b01
|
||||
#define AML_EVENT_OP (u16) 0x5b02
|
||||
|
|
@ -194,7 +193,6 @@
|
|||
* Use only "Unknown" AML opcodes, don't attempt to use
|
||||
* any valid ACPI ASCII values (A-Z, 0-9, '-')
|
||||
*/
|
||||
|
||||
#define AML_INT_NAMEPATH_OP (u16) 0x002d
|
||||
#define AML_INT_NAMEDFIELD_OP (u16) 0x0030
|
||||
#define AML_INT_RESERVEDFIELD_OP (u16) 0x0031
|
||||
|
|
@ -214,7 +212,6 @@
|
|||
* There can be up to 31 unique argument types
|
||||
* Zero is reserved as end-of-list indicator
|
||||
*/
|
||||
|
||||
#define ARGP_BYTEDATA 0x01
|
||||
#define ARGP_BYTELIST 0x02
|
||||
#define ARGP_CHARLIST 0x03
|
||||
|
|
@ -295,7 +292,6 @@
|
|||
/*
|
||||
* opcode groups and types
|
||||
*/
|
||||
|
||||
#define OPGRP_NAMED 0x01
|
||||
#define OPGRP_FIELD 0x02
|
||||
#define OPGRP_BYTELIST 0x04
|
||||
|
|
@ -381,6 +377,12 @@
|
|||
#define AML_TYPE_UNDEFINED 0x19
|
||||
#define AML_TYPE_BOGUS 0x1A
|
||||
|
||||
/* AML Package Length encodings */
|
||||
|
||||
#define ACPI_AML_PACKAGE_TYPE1 0x40
|
||||
#define ACPI_AML_PACKAGE_TYPE2 0x4000
|
||||
#define ACPI_AML_PACKAGE_TYPE3 0x400000
|
||||
#define ACPI_AML_PACKAGE_TYPE4 0x40000000
|
||||
|
||||
/*
|
||||
* Opcode classes
|
||||
|
|
|
|||
29
include/acpi/pdc_intel.h
Normal file
29
include/acpi/pdc_intel.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
/* _PDC bit definition for Intel processors */
|
||||
|
||||
#ifndef __PDC_INTEL_H__
|
||||
#define __PDC_INTEL_H__
|
||||
|
||||
#define ACPI_PDC_P_FFH (0x0001)
|
||||
#define ACPI_PDC_C_C1_HALT (0x0002)
|
||||
#define ACPI_PDC_T_FFH (0x0004)
|
||||
#define ACPI_PDC_SMP_C1PT (0x0008)
|
||||
#define ACPI_PDC_SMP_C2C3 (0x0010)
|
||||
#define ACPI_PDC_SMP_P_SWCOORD (0x0020)
|
||||
#define ACPI_PDC_SMP_C_SWCOORD (0x0040)
|
||||
#define ACPI_PDC_SMP_T_SWCOORD (0x0080)
|
||||
#define ACPI_PDC_C_C1_FFH (0x0100)
|
||||
|
||||
|
||||
#define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \
|
||||
ACPI_PDC_C_C1_HALT)
|
||||
|
||||
#define ACPI_PDC_EST_CAPABILITY_SMP_MSR (ACPI_PDC_EST_CAPABILITY_SMP | \
|
||||
ACPI_PDC_P_FFH)
|
||||
|
||||
#define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \
|
||||
ACPI_PDC_SMP_C1PT | \
|
||||
ACPI_PDC_C_C1_HALT)
|
||||
|
||||
#endif /* __PDC_INTEL_H__ */
|
||||
|
||||
|
|
@ -198,6 +198,7 @@
|
|||
#endif
|
||||
#endif /* !DEBUGGER_THREADING */
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* C library configuration
|
||||
|
|
@ -209,7 +210,6 @@
|
|||
* Use the standard C library headers.
|
||||
* We want to keep these to a minimum.
|
||||
*/
|
||||
|
||||
#ifdef ACPI_USE_STANDARD_HEADERS
|
||||
/*
|
||||
* Use the standard headers from the standard locations
|
||||
|
|
@ -224,14 +224,8 @@
|
|||
/*
|
||||
* We will be linking to the standard Clib functions
|
||||
*/
|
||||
|
||||
#define ACPI_STRSTR(s1,s2) strstr((s1), (s2))
|
||||
#define ACPI_STRCHR(s1,c) strchr((s1), (c))
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#define ACPI_STRUPR(s) (void) acpi_ut_strupr ((s))
|
||||
#endif
|
||||
|
||||
#define ACPI_STRLEN(s) (acpi_size) strlen((s))
|
||||
#define ACPI_STRCPY(d,s) (void) strcpy((d), (s))
|
||||
#define ACPI_STRNCPY(d,s,n) (void) strncpy((d), (s), (acpi_size)(n))
|
||||
|
|
@ -254,14 +248,15 @@
|
|||
#define ACPI_IS_ALPHA isalpha
|
||||
#define ACPI_IS_ASCII isascii
|
||||
|
||||
#else
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Not using native C library, use local implementations
|
||||
*
|
||||
*****************************************************************************/
|
||||
#else
|
||||
|
||||
/*
|
||||
/*
|
||||
* Use local definitions of C library macros and functions
|
||||
* NOTE: The function implementations may not be as efficient
|
||||
* as an inline or assembly code implementation provided by a
|
||||
|
|
@ -278,14 +273,12 @@ typedef char *va_list;
|
|||
/*
|
||||
* Storage alignment properties
|
||||
*/
|
||||
|
||||
#define _AUPBND (sizeof (acpi_native_int) - 1)
|
||||
#define _ADNBND (sizeof (acpi_native_int) - 1)
|
||||
|
||||
/*
|
||||
* Variable argument list macro definitions
|
||||
*/
|
||||
|
||||
#define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd)))
|
||||
#define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND))))
|
||||
#define va_end(ap) (void) 0
|
||||
|
|
@ -296,11 +289,6 @@ typedef char *va_list;
|
|||
|
||||
#define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2))
|
||||
#define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c))
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
#define ACPI_STRUPR(s) (void) acpi_ut_strupr ((s))
|
||||
#endif
|
||||
|
||||
#define ACPI_STRLEN(s) (acpi_size) acpi_ut_strlen ((s))
|
||||
#define ACPI_STRCPY(d,s) (void) acpi_ut_strcpy ((d), (s))
|
||||
#define ACPI_STRNCPY(d,s,n) (void) acpi_ut_strncpy ((d), (s), (acpi_size)(n))
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/config.h>
|
||||
|
||||
#include <asm/acpi.h>
|
||||
|
||||
#define ACPI_PROCESSOR_BUSY_METRIC 10
|
||||
|
||||
#define ACPI_PROCESSOR_MAX_POWER 8
|
||||
|
|
@ -14,6 +16,8 @@
|
|||
#define ACPI_PROCESSOR_MAX_THROTTLE 250 /* 25% */
|
||||
#define ACPI_PROCESSOR_MAX_DUTY_WIDTH 4
|
||||
|
||||
#define ACPI_PDC_REVISION_ID 0x1
|
||||
|
||||
/* Power Management */
|
||||
|
||||
struct acpi_processor_cx;
|
||||
|
|
@ -59,6 +63,9 @@ struct acpi_processor_power {
|
|||
u32 bm_activity;
|
||||
int count;
|
||||
struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
|
||||
|
||||
/* the _PDC objects passed by the driver, if any */
|
||||
struct acpi_object_list *pdc;
|
||||
};
|
||||
|
||||
/* Performance Management */
|
||||
|
|
@ -82,8 +89,6 @@ struct acpi_processor_px {
|
|||
acpi_integer status; /* success indicator */
|
||||
};
|
||||
|
||||
#define ACPI_PDC_REVISION_ID 0x1
|
||||
|
||||
struct acpi_processor_performance {
|
||||
unsigned int state;
|
||||
unsigned int platform_limit;
|
||||
|
|
@ -179,7 +184,32 @@ int acpi_processor_notify_smm(struct module *calling_module);
|
|||
extern struct acpi_processor *processors[NR_CPUS];
|
||||
extern struct acpi_processor_errata errata;
|
||||
|
||||
int acpi_processor_set_pdc(struct acpi_processor *pr,
|
||||
struct acpi_object_list *pdc_in);
|
||||
|
||||
#ifdef ARCH_HAS_POWER_PDC_INIT
|
||||
void acpi_processor_power_init_pdc(struct acpi_processor_power *pow,
|
||||
unsigned int cpu);
|
||||
void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
|
||||
unsigned int cpu);
|
||||
#else
|
||||
static inline void acpi_processor_power_init_pdc(
|
||||
struct acpi_processor_power *pow, unsigned int cpu)
|
||||
{
|
||||
pow->pdc = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void acpi_processor_power_init_bm_check(
|
||||
struct acpi_processor_flags *flags, unsigned int cpu)
|
||||
{
|
||||
flags->bm_check = 1;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* in processor_perflib.c */
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
void acpi_processor_ppc_init(void);
|
||||
void acpi_processor_ppc_exit(void);
|
||||
|
|
|
|||
6
include/asm-alpha/emergency-restart.h
Normal file
6
include/asm-alpha/emergency-restart.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef _ASM_EMERGENCY_RESTART_H
|
||||
#define _ASM_EMERGENCY_RESTART_H
|
||||
|
||||
#include <asm-generic/emergency-restart.h>
|
||||
|
||||
#endif /* _ASM_EMERGENCY_RESTART_H */
|
||||
|
|
@ -57,7 +57,6 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
|
|||
* Given a kernel address, find the home node of the underlying memory.
|
||||
*/
|
||||
#define kvaddr_to_nid(kaddr) pa_to_nid(__pa(kaddr))
|
||||
#define node_mem_map(nid) (NODE_DATA(nid)->node_mem_map)
|
||||
#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
|
||||
|
||||
#define local_mapnr(kvaddr) \
|
||||
|
|
@ -108,7 +107,7 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
|
|||
#define pfn_to_page(pfn) \
|
||||
({ \
|
||||
unsigned long kaddr = (unsigned long)__va((pfn) << PAGE_SHIFT); \
|
||||
(node_mem_map(kvaddr_to_nid(kaddr)) + local_mapnr(kaddr)); \
|
||||
(NODE_DATA(kvaddr_to_nid(kaddr))->node_mem_map + local_mapnr(kaddr)); \
|
||||
})
|
||||
|
||||
#define page_to_pfn(page) \
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ struct pci_controller {
|
|||
|
||||
extern void pcibios_set_master(struct pci_dev *dev);
|
||||
|
||||
extern inline void pcibios_penalize_isa_irq(int irq)
|
||||
extern inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
@ -223,6 +223,25 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr,
|
|||
/* Nothing to do. */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
|
||||
enum pci_dma_burst_strategy *strat,
|
||||
unsigned long *strategy_parameter)
|
||||
{
|
||||
unsigned long cacheline_size;
|
||||
u8 byte;
|
||||
|
||||
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
|
||||
if (byte == 0)
|
||||
cacheline_size = 1024;
|
||||
else
|
||||
cacheline_size = (int) byte * 4;
|
||||
|
||||
*strat = PCI_DMA_BURST_BOUNDARY;
|
||||
*strategy_parameter = cacheline_size;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* TODO: integrate with include/asm-generic/pci.h ? */
|
||||
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
|
||||
{
|
||||
|
|
@ -232,6 +251,9 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
|
|||
extern void pcibios_resource_to_bus(struct pci_dev *, struct pci_bus_region *,
|
||||
struct resource *);
|
||||
|
||||
extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
|
||||
struct pci_bus_region *region);
|
||||
|
||||
#define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
|
||||
|
||||
static inline int pci_proc_domain(struct pci_bus *bus)
|
||||
|
|
|
|||
|
|
@ -132,6 +132,12 @@
|
|||
#define __S110 _PAGE_S(0)
|
||||
#define __S111 _PAGE_S(0)
|
||||
|
||||
/*
|
||||
* pgprot_noncached() is only for infiniband pci support, and a real
|
||||
* implementation for RAM would be more complicated.
|
||||
*/
|
||||
#define pgprot_noncached(prot) (prot)
|
||||
|
||||
/*
|
||||
* BAD_PAGETABLE is used when we need a bogus page-table, while
|
||||
* BAD_PAGE is used for a bogus page.
|
||||
|
|
|
|||
|
|
@ -22,54 +22,9 @@
|
|||
#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SERIAL_MANY_PORTS
|
||||
#define FOURPORT_FLAGS ASYNC_FOURPORT
|
||||
#define ACCENT_FLAGS 0
|
||||
#define BOCA_FLAGS 0
|
||||
#endif
|
||||
|
||||
#define STD_SERIAL_PORT_DEFNS \
|
||||
#define SERIAL_PORT_DFNS \
|
||||
/* UART CLK PORT IRQ FLAGS */ \
|
||||
{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
|
||||
{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
|
||||
{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
|
||||
{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
|
||||
|
||||
|
||||
#ifdef CONFIG_SERIAL_MANY_PORTS
|
||||
#define EXTRA_SERIAL_PORT_DEFNS \
|
||||
{ 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \
|
||||
{ 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \
|
||||
{ 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \
|
||||
{ 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \
|
||||
{ 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \
|
||||
{ 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \
|
||||
{ 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \
|
||||
{ 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \
|
||||
{ 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \
|
||||
{ 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \
|
||||
{ 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \
|
||||
{ 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \
|
||||
{ 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \
|
||||
{ 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \
|
||||
{ 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \
|
||||
{ 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \
|
||||
{ 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \
|
||||
{ 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \
|
||||
{ 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \
|
||||
{ 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \
|
||||
{ 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \
|
||||
{ 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \
|
||||
{ 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \
|
||||
{ 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \
|
||||
{ 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \
|
||||
{ 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \
|
||||
{ 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \
|
||||
{ 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */
|
||||
#else
|
||||
#define EXTRA_SERIAL_PORT_DEFNS
|
||||
#endif
|
||||
|
||||
#define SERIAL_PORT_DFNS \
|
||||
STD_SERIAL_PORT_DEFNS \
|
||||
EXTRA_SERIAL_PORT_DEFNS
|
||||
|
|
|
|||
|
|
@ -443,22 +443,19 @@ __xchg_u64(volatile long *m, unsigned long val)
|
|||
if something tries to do an invalid xchg(). */
|
||||
extern void __xchg_called_with_bad_pointer(void);
|
||||
|
||||
static inline unsigned long
|
||||
__xchg(volatile void *ptr, unsigned long x, int size)
|
||||
{
|
||||
switch (size) {
|
||||
case 1:
|
||||
return __xchg_u8(ptr, x);
|
||||
case 2:
|
||||
return __xchg_u16(ptr, x);
|
||||
case 4:
|
||||
return __xchg_u32(ptr, x);
|
||||
case 8:
|
||||
return __xchg_u64(ptr, x);
|
||||
}
|
||||
__xchg_called_with_bad_pointer();
|
||||
return x;
|
||||
}
|
||||
#define __xchg(ptr, x, size) \
|
||||
({ \
|
||||
unsigned long __xchg__res; \
|
||||
volatile void *__xchg__ptr = (ptr); \
|
||||
switch (size) { \
|
||||
case 1: __xchg__res = __xchg_u8(__xchg__ptr, x); break; \
|
||||
case 2: __xchg__res = __xchg_u16(__xchg__ptr, x); break; \
|
||||
case 4: __xchg__res = __xchg_u32(__xchg__ptr, x); break; \
|
||||
case 8: __xchg__res = __xchg_u64(__xchg__ptr, x); break; \
|
||||
default: __xchg_called_with_bad_pointer(); __xchg__res = x; \
|
||||
} \
|
||||
__xchg__res; \
|
||||
})
|
||||
|
||||
#define xchg(ptr,x) \
|
||||
({ \
|
||||
|
|
|
|||
|
|
@ -377,8 +377,13 @@
|
|||
#define __NR_add_key 439
|
||||
#define __NR_request_key 440
|
||||
#define __NR_keyctl 441
|
||||
#define __NR_ioprio_set 442
|
||||
#define __NR_ioprio_get 443
|
||||
#define __NR_inotify_init 444
|
||||
#define __NR_inotify_add_watch 445
|
||||
#define __NR_inotify_rm_watch 446
|
||||
|
||||
#define NR_SYSCALLS 442
|
||||
#define NR_SYSCALLS 447
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ struct imxfb_mach_info {
|
|||
u_int pcr;
|
||||
u_int pwmr;
|
||||
u_int lscr1;
|
||||
u_int dmacr;
|
||||
|
||||
u_char * fixed_screen_cpu;
|
||||
dma_addr_t fixed_screen_dma;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* include/asm-arm/arch-ixp2000/ixp2000-gpio.h
|
||||
* include/asm-arm/arch-ixp2000/gpio.h
|
||||
*
|
||||
* Copyright (C) 2002 Intel Corporation.
|
||||
*
|
||||
|
|
@ -16,26 +16,18 @@
|
|||
* Use this instead of directly setting the GPIO registers.
|
||||
* GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb)
|
||||
*/
|
||||
#ifndef _ASM_ARCH_IXP2000_GPIO_H_
|
||||
#define _ASM_ARCH_IXP2000_GPIO_H_
|
||||
#ifndef __ASM_ARCH_GPIO_H
|
||||
#define __ASM_ARCH_GPIO_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#define GPIO_OUT 0x0
|
||||
#define GPIO_IN 0x80
|
||||
|
||||
#define GPIO_IN 0
|
||||
#define GPIO_OUT 1
|
||||
|
||||
#define IXP2000_GPIO_LOW 0
|
||||
#define IXP2000_GPIO_HIGH 1
|
||||
|
||||
#define GPIO_NO_EDGES 0
|
||||
#define GPIO_FALLING_EDGE 1
|
||||
#define GPIO_RISING_EDGE 2
|
||||
#define GPIO_BOTH_EDGES 3
|
||||
#define GPIO_LEVEL_LOW 4
|
||||
#define GPIO_LEVEL_HIGH 8
|
||||
|
||||
extern void set_GPIO_IRQ_edge(int gpio_nr, int edge);
|
||||
extern void set_GPIO_IRQ_level(int gpio_nr, int level);
|
||||
extern void gpio_line_config(int line, int style);
|
||||
extern void gpio_line_config(int line, int direction);
|
||||
|
||||
static inline int gpio_line_get(int line)
|
||||
{
|
||||
|
|
@ -45,11 +37,12 @@ static inline int gpio_line_get(int line)
|
|||
static inline void gpio_line_set(int line, int value)
|
||||
{
|
||||
if (value == IXP2000_GPIO_HIGH) {
|
||||
ixp_reg_write(IXP2000_GPIO_POSR, BIT(line));
|
||||
} else if (value == IXP2000_GPIO_LOW)
|
||||
ixp_reg_write(IXP2000_GPIO_POCR, BIT(line));
|
||||
ixp2000_reg_write(IXP2000_GPIO_POSR, 1 << line);
|
||||
} else if (value == IXP2000_GPIO_LOW) {
|
||||
ixp2000_reg_write(IXP2000_GPIO_POCR, 1 << line);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* ASM_ARCH_IXP2000_GPIO_H_ */
|
||||
|
||||
#endif /* ASM_ARCH_IXP2000_GPIO_H_ */
|
||||
|
|
|
|||
|
|
@ -17,18 +17,23 @@
|
|||
|
||||
#define IO_SPACE_LIMIT 0xffffffff
|
||||
#define __mem_pci(a) (a)
|
||||
#define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
|
||||
|
||||
/*
|
||||
* The IXP2400 before revision B0 asserts byte lanes for PCI I/O
|
||||
* The A? revisions of the IXP2000s assert byte lanes for PCI I/O
|
||||
* transactions the other way round (MEM transactions don't have this
|
||||
* issue), so we need to override the standard functions. B0 and later
|
||||
* have a bit that can be set to 1 to get the 'proper' behavior, but
|
||||
* since that isn't available on the A? revisions we just keep doing
|
||||
* things manually.
|
||||
* issue), so if we want to support those models, we need to override
|
||||
* the standard I/O functions.
|
||||
*
|
||||
* B0 and later have a bit that can be set to 1 to get the proper
|
||||
* behavior for I/O transactions, which then allows us to use the
|
||||
* standard I/O functions. This is what we do if the user does not
|
||||
* explicitly ask for support for pre-B0.
|
||||
*/
|
||||
#define alignb(addr) (void __iomem *)((unsigned long)addr ^ 3)
|
||||
#define alignw(addr) (void __iomem *)((unsigned long)addr ^ 2)
|
||||
#ifdef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
|
||||
#define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
|
||||
|
||||
#define alignb(addr) (void __iomem *)((unsigned long)(addr) ^ 3)
|
||||
#define alignw(addr) (void __iomem *)((unsigned long)(addr) ^ 2)
|
||||
|
||||
#define outb(v,p) __raw_writeb((v),alignb(___io(p)))
|
||||
#define outw(v,p) __raw_writew((v),alignw(___io(p)))
|
||||
|
|
@ -48,6 +53,81 @@
|
|||
#define insw(p,d,l) __raw_readsw(alignw(___io(p)),d,l)
|
||||
#define insl(p,d,l) __raw_readsl(___io(p),d,l)
|
||||
|
||||
#define __is_io_address(p) ((((unsigned long)(p)) & ~(IXP2000_PCI_IO_SIZE - 1)) == IXP2000_PCI_IO_VIRT_BASE)
|
||||
|
||||
#define ioread8(p) \
|
||||
({ \
|
||||
unsigned int __v; \
|
||||
\
|
||||
if (__is_io_address(p)) { \
|
||||
__v = __raw_readb(alignb(p)); \
|
||||
} else { \
|
||||
__v = __raw_readb(p); \
|
||||
} \
|
||||
\
|
||||
__v; \
|
||||
}) \
|
||||
|
||||
#define ioread16(p) \
|
||||
({ \
|
||||
unsigned int __v; \
|
||||
\
|
||||
if (__is_io_address(p)) { \
|
||||
__v = __raw_readw(alignw(p)); \
|
||||
} else { \
|
||||
__v = le16_to_cpu(__raw_readw(p)); \
|
||||
} \
|
||||
\
|
||||
__v; \
|
||||
})
|
||||
|
||||
#define ioread32(p) \
|
||||
({ \
|
||||
unsigned int __v; \
|
||||
\
|
||||
if (__is_io_address(p)) { \
|
||||
__v = __raw_readl(p); \
|
||||
} else { \
|
||||
__v = le32_to_cpu(__raw_readl(p)); \
|
||||
} \
|
||||
\
|
||||
__v; \
|
||||
})
|
||||
|
||||
#define iowrite8(v,p) \
|
||||
({ \
|
||||
if (__is_io_address(p)) { \
|
||||
__raw_writeb((v), alignb(p)); \
|
||||
} else { \
|
||||
__raw_writeb((v), p); \
|
||||
} \
|
||||
})
|
||||
|
||||
#define iowrite16(v,p) \
|
||||
({ \
|
||||
if (__is_io_address(p)) { \
|
||||
__raw_writew((v), alignw(p)); \
|
||||
} else { \
|
||||
__raw_writew(cpu_to_le16(v), p); \
|
||||
} \
|
||||
})
|
||||
|
||||
#define iowrite32(v,p) \
|
||||
({ \
|
||||
if (__is_io_address(p)) { \
|
||||
__raw_writel((v), p); \
|
||||
} else { \
|
||||
__raw_writel(cpu_to_le32(v), p); \
|
||||
} \
|
||||
})
|
||||
|
||||
#define ioport_map(port, nr) ___io(port)
|
||||
|
||||
#define ioport_unmap(addr)
|
||||
#else
|
||||
#define __io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_ARCH_IXDP2X01
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
* On board CPLD memory map
|
||||
*/
|
||||
#define IXDP2X00_PHYS_CPLD_BASE 0xc7000000
|
||||
#define IXDP2X00_VIRT_CPLD_BASE 0xfafff000
|
||||
#define IXDP2X00_CPLD_SIZE 0x00001000
|
||||
#define IXDP2X00_VIRT_CPLD_BASE 0xfe000000
|
||||
#define IXDP2X00_CPLD_SIZE 0x00100000
|
||||
|
||||
|
||||
#define IXDP2X00_CPLD_REG(x) \
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
#define __IXDP2X01_H__
|
||||
|
||||
#define IXDP2X01_PHYS_CPLD_BASE 0xc6024000
|
||||
#define IXDP2X01_VIRT_CPLD_BASE 0xfafff000
|
||||
#define IXDP2X01_CPLD_REGION_SIZE 0x00001000
|
||||
#define IXDP2X01_VIRT_CPLD_BASE 0xfe000000
|
||||
#define IXDP2X01_CPLD_REGION_SIZE 0x00100000
|
||||
|
||||
#define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg)
|
||||
#define IXDP2X01_CPLD_PHYS_REG(reg) (volatile u32*)(IXDP2X01_PHYS_CPLD_BASE | reg)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,21 @@
|
|||
#ifndef _IXP2000_REGS_H_
|
||||
#define _IXP2000_REGS_H_
|
||||
|
||||
/*
|
||||
* IXP2000 linux memory map:
|
||||
*
|
||||
* virt phys size
|
||||
* fb000000 db000000 16M PCI CFG1
|
||||
* fc000000 da000000 16M PCI CFG0
|
||||
* fd000000 d8000000 16M PCI I/O
|
||||
* fe[0-7]00000 8M per-platform mappings
|
||||
* feb00000 c8000000 1M MSF
|
||||
* fec00000 df000000 1M PCI CSRs
|
||||
* fed00000 de000000 1M PCI CREG
|
||||
* fee00000 d6000000 1M INTCTL
|
||||
* fef00000 c0000000 1M CAP
|
||||
*/
|
||||
|
||||
/*
|
||||
* Static I/O regions.
|
||||
*
|
||||
|
|
@ -71,6 +86,10 @@
|
|||
#define IXP2000_PCI_CSR_VIRT_BASE 0xfec00000
|
||||
#define IXP2000_PCI_CSR_SIZE 0x00100000
|
||||
|
||||
#define IXP2000_MSF_PHYS_BASE 0xc8000000
|
||||
#define IXP2000_MSF_VIRT_BASE 0xfeb00000
|
||||
#define IXP2000_MSF_SIZE 0x00100000
|
||||
|
||||
#define IXP2000_PCI_IO_PHYS_BASE 0xd8000000
|
||||
#define IXP2000_PCI_IO_VIRT_BASE 0xfd000000
|
||||
#define IXP2000_PCI_IO_SIZE 0x01000000
|
||||
|
|
@ -241,7 +260,7 @@
|
|||
#define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */
|
||||
#define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */
|
||||
#define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */
|
||||
#define PCI_CONTROL_PNR (1 << 17) /* PCI Not Reset bit */
|
||||
#define PCI_CONTROL_IEE (1 << 17) /* I/O cycle Endian swap Enable */
|
||||
|
||||
#define IXP2000_PCI_RST_REL (1 << 2)
|
||||
#define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF)
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ static inline unsigned int ixp2000_is_pcimaster(void)
|
|||
}
|
||||
|
||||
void ixp2000_map_io(void);
|
||||
void ixp2000_uart_init(void);
|
||||
void ixp2000_init_irq(void);
|
||||
void ixp2000_init_time(unsigned long);
|
||||
unsigned long ixp2000_gettimeoffset(void);
|
||||
|
|
@ -138,30 +139,10 @@ struct ixp2000_flash_data {
|
|||
unsigned long (*bank_setup)(unsigned long);
|
||||
};
|
||||
|
||||
/*
|
||||
* GPIO helper functions
|
||||
*/
|
||||
#define GPIO_IN 0
|
||||
#define GPIO_OUT 1
|
||||
|
||||
extern void gpio_line_config(int line, int style);
|
||||
|
||||
static inline int gpio_line_get(int line)
|
||||
{
|
||||
return (((*IXP2000_GPIO_PLR) >> line) & 1);
|
||||
}
|
||||
|
||||
static inline void gpio_line_set(int line, int value)
|
||||
{
|
||||
if (value)
|
||||
ixp2000_reg_write(IXP2000_GPIO_POSR, (1 << line));
|
||||
else
|
||||
ixp2000_reg_write(IXP2000_GPIO_POCR, (1 << line));
|
||||
}
|
||||
|
||||
struct ixp2000_i2c_pins {
|
||||
unsigned long sda_pin;
|
||||
unsigned long scl_pin;
|
||||
};
|
||||
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@
|
|||
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
|
||||
* area for the same reason. ;)
|
||||
*/
|
||||
#define VMALLOC_END 0xfaffefff
|
||||
#define VMALLOC_END 0xfb000000
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
tst \rx, #1 @ MMU enabled?
|
||||
moveq \rx, #0xc8000000
|
||||
movne \rx, #0xff000000
|
||||
orrne \rx, \rx, #0x00b00000
|
||||
add \rx,\rx,#3 @ Uart regs are at off set of 3 if
|
||||
@ byte writes used - Big Endian.
|
||||
.endm
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Author: Deepak Saxena <dsaxena@plexity.net>
|
||||
*
|
||||
* Copyright (C) 2002-2004 MontaVista Software, Inc.
|
||||
* Copyright (C) 2002-2005 MontaVista Software, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
|
|
@ -383,6 +383,180 @@ __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count)
|
|||
*vaddr++ = inl(io_addr);
|
||||
}
|
||||
|
||||
#define __is_io_address(p) (((unsigned long)p >= 0x0) && \
|
||||
((unsigned long)p <= 0x0000ffff))
|
||||
static inline unsigned int
|
||||
__ixp4xx_ioread8(void __iomem *port)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
return (unsigned int)__ixp4xx_inb((unsigned int)port);
|
||||
else
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
return (unsigned int)__raw_readb((u32)port);
|
||||
#else
|
||||
return (unsigned int)__ixp4xx_readb((u32)port);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ixp4xx_ioread8_rep(u32 port, u8 *vaddr, u32 count)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
__ixp4xx_insb(port, vaddr, count);
|
||||
else
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
__raw_readsb((void __iomem *)port, vaddr, count);
|
||||
#else
|
||||
__ixp4xx_readsb(port, vaddr, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
__ixp4xx_ioread16(void __iomem *port)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
return (unsigned int)__ixp4xx_inw((unsigned int)port);
|
||||
else
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
return le16_to_cpu(__raw_readw((u32)port));
|
||||
#else
|
||||
return (unsigned int)__ixp4xx_readw((u32)port);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ixp4xx_ioread16_rep(u32 port, u16 *vaddr, u32 count)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
__ixp4xx_insw(port, vaddr, count);
|
||||
else
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
__raw_readsw((void __iomem *)port, vaddr, count);
|
||||
#else
|
||||
__ixp4xx_readsw(port, vaddr, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
__ixp4xx_ioread32(void __iomem *port)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
return (unsigned int)__ixp4xx_inl((unsigned int)port);
|
||||
else {
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
return le32_to_cpu(__raw_readl((u32)port));
|
||||
#else
|
||||
return (unsigned int)__ixp4xx_readl((u32)port);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ixp4xx_ioread32_rep(u32 port, u32 *vaddr, u32 count)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
__ixp4xx_insl(port, vaddr, count);
|
||||
else
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
__raw_readsl((void __iomem *)port, vaddr, count);
|
||||
#else
|
||||
__ixp4xx_readsl(port, vaddr, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ixp4xx_iowrite8(u8 value, void __iomem *port)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
__ixp4xx_outb(value, (unsigned int)port);
|
||||
else
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
__raw_writeb(value, (u32)port);
|
||||
#else
|
||||
__ixp4xx_writeb(value, (u32)port);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ixp4xx_iowrite8_rep(u32 port, u8 *vaddr, u32 count)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
__ixp4xx_outsb(port, vaddr, count);
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
__raw_writesb((void __iomem *)port, vaddr, count);
|
||||
#else
|
||||
__ixp4xx_writesb(port, vaddr, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ixp4xx_iowrite16(u16 value, void __iomem *port)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
__ixp4xx_outw(value, (unsigned int)port);
|
||||
else
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
__raw_writew(cpu_to_le16(value), (u32)port);
|
||||
#else
|
||||
__ixp4xx_writew(value, (u32)port);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ixp4xx_iowrite16_rep(u32 port, u16 *vaddr, u32 count)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
__ixp4xx_outsw(port, vaddr, count);
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
__raw_readsw((void __iomem *)port, vaddr, count);
|
||||
#else
|
||||
__ixp4xx_writesw(port, vaddr, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ixp4xx_iowrite32(u32 value, void __iomem *port)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
__ixp4xx_outl(value, (unsigned int)port);
|
||||
else
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
__raw_writel(cpu_to_le32(value), (u32)port);
|
||||
#else
|
||||
__ixp4xx_writel(value, (u32)port);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ixp4xx_iowrite32_rep(u32 port, u32 *vaddr, u32 count)
|
||||
{
|
||||
if (__is_io_address(port))
|
||||
__ixp4xx_outsl(port, vaddr, count);
|
||||
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
||||
__raw_readsl((void __iomem *)port, vaddr, count);
|
||||
#else
|
||||
__ixp4xx_outsl(port, vaddr, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
#define ioread8(p) __ixp4xx_ioread8(p)
|
||||
#define ioread16(p) __ixp4xx_ioread16(p)
|
||||
#define ioread32(p) __ixp4xx_ioread32(p)
|
||||
|
||||
#define ioread8_rep(p, v, c) __ixp4xx_ioread8_rep(p, v, c)
|
||||
#define ioread16_rep(p, v, c) __ixp4xx_ioread16_rep(p, v, c)
|
||||
#define ioread32_rep(p, v, c) __ixp4xx_ioread32_rep(p, v, c)
|
||||
|
||||
#define iowrite8(v,p) __ixp4xx_iowrite8(v,p)
|
||||
#define iowrite16(v,p) __ixp4xx_iowrite16(v,p)
|
||||
#define iowrite32(v,p) __ixp4xx_iowrite32(v,p)
|
||||
|
||||
#define iowrite8_rep(p, v, c) __ixp4xx_iowrite8_rep(p, v, c)
|
||||
#define iowrite16_rep(p, v, c) __ixp4xx_iowrite16_rep(p, v, c)
|
||||
#define iowrite32_rep(p, v, c) __ixp4xx_iowrite32_rep(p, v, c)
|
||||
|
||||
#define ioport_map(port, nr) ((void __iomem*)port)
|
||||
#define ioport_unmap(addr)
|
||||
|
||||
#endif // __ASM_ARM_ARCH_IO_H
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,16 @@
|
|||
#define IXP4XX_PERIPHERAL_BASE_VIRT (0xFFBF2000)
|
||||
#define IXP4XX_PERIPHERAL_REGION_SIZE (0x0000C000)
|
||||
|
||||
/*
|
||||
* Debug UART
|
||||
*
|
||||
* This is basically a remap of UART1 into a region that is section
|
||||
* aligned so that it * can be used with the low-level debug code.
|
||||
*/
|
||||
#define IXP4XX_DEBUG_UART_BASE_PHYS (0xC8000000)
|
||||
#define IXP4XX_DEBUG_UART_BASE_VIRT (0xffb00000)
|
||||
#define IXP4XX_DEBUG_UART_REGION_SIZE (0x00001000)
|
||||
|
||||
#define IXP4XX_EXP_CS0_OFFSET 0x00
|
||||
#define IXP4XX_EXP_CS1_OFFSET 0x04
|
||||
#define IXP4XX_EXP_CS2_OFFSET 0x08
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@
|
|||
|
||||
/*
|
||||
* We use IXP425 General purpose timer for our timer needs, it runs at
|
||||
* 66.66... MHz
|
||||
* 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
|
||||
* timer register ignores the bottom 2 bits of the LATCH value.
|
||||
*/
|
||||
#define CLOCK_TICK_RATE (66666666)
|
||||
#define FREQ 66666666
|
||||
#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
|
||||
|
||||
|
|
|
|||
|
|
@ -34,11 +34,6 @@
|
|||
/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
|
||||
#define OMAP1610_ETHR_START 0x04000300
|
||||
|
||||
/* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */
|
||||
#define OMAP_NOR_FLASH_SIZE SZ_32M
|
||||
#define OMAP_NOR_FLASH_START1 0x0C000000 /* CS3 */
|
||||
#define OMAP_NOR_FLASH_START2 0x0A000000 /* CS2B */
|
||||
|
||||
/* Samsung NAND flash at CS2B or CS3(NAND Boot) */
|
||||
#define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */
|
||||
#define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */
|
||||
|
|
|
|||
|
|
@ -30,11 +30,6 @@
|
|||
/* In OMAP1710 H3 the Ethernet is directly connected to CS1 */
|
||||
#define OMAP1710_ETHR_START 0x04000300
|
||||
|
||||
/* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */
|
||||
#define OMAP_NOR_FLASH_SIZE SZ_32M
|
||||
#define OMAP_NOR_FLASH_START1 0x0C000000 /* CS3 */
|
||||
#define OMAP_NOR_FLASH_START2 0x0A000000 /* CS2B */
|
||||
|
||||
/* Samsung NAND flash at CS2B or CS3(NAND Boot) */
|
||||
#define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */
|
||||
#define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */
|
||||
|
|
|
|||
|
|
@ -32,10 +32,5 @@
|
|||
/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */
|
||||
#define OMAP_OSK_ETHR_START 0x04800300
|
||||
|
||||
/* Micron NOR flash at CS3 mapped to address 0x0 if BM bit is 1 */
|
||||
#define OMAP_OSK_NOR_FLASH_BASE 0xD8000000
|
||||
#define OMAP_OSK_NOR_FLASH_SIZE SZ_32M
|
||||
#define OMAP_OSK_NOR_FLASH_START 0x00000000
|
||||
|
||||
#endif /* __ASM_ARCH_OMAP_OSK_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -16,10 +16,11 @@
|
|||
/* Different peripheral ids */
|
||||
#define OMAP_TAG_CLOCK 0x4f01
|
||||
#define OMAP_TAG_MMC 0x4f02
|
||||
#define OMAP_TAG_UART 0x4f03
|
||||
#define OMAP_TAG_SERIAL_CONSOLE 0x4f03
|
||||
#define OMAP_TAG_USB 0x4f04
|
||||
#define OMAP_TAG_LCD 0x4f05
|
||||
#define OMAP_TAG_GPIO_SWITCH 0x4f06
|
||||
#define OMAP_TAG_UART 0x4f07
|
||||
|
||||
#define OMAP_TAG_BOOT_REASON 0x4f80
|
||||
#define OMAP_TAG_FLASH_PART 0x4f81
|
||||
|
|
@ -35,7 +36,7 @@ struct omap_mmc_config {
|
|||
s16 mmc1_switch_pin, mmc2_switch_pin;
|
||||
};
|
||||
|
||||
struct omap_uart_config {
|
||||
struct omap_serial_console_config {
|
||||
u8 console_uart;
|
||||
u32 console_speed;
|
||||
};
|
||||
|
|
@ -82,7 +83,8 @@ struct omap_lcd_config {
|
|||
*/
|
||||
#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
|
||||
#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
|
||||
#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
|
||||
#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
|
||||
#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
|
||||
struct omap_gpio_switch_config {
|
||||
char name[12];
|
||||
u16 gpio;
|
||||
|
|
@ -99,6 +101,10 @@ struct omap_boot_reason_config {
|
|||
char reason_str[12];
|
||||
};
|
||||
|
||||
struct omap_uart_config {
|
||||
/* Bit field of UARTs present; bit 0 --> UART1 */
|
||||
unsigned int enabled_uarts;
|
||||
};
|
||||
|
||||
struct omap_board_config_entry {
|
||||
u16 tag;
|
||||
|
|
|
|||
36
include/asm-arm/arch-omap/common.h
Normal file
36
include/asm-arm/arch-omap/common.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* linux/include/asm-arm/arch-omap/common.h
|
||||
*
|
||||
* Header for code common to all OMAP machines.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
|
||||
#define __ARCH_ARM_MACH_OMAP_COMMON_H
|
||||
|
||||
struct sys_timer;
|
||||
|
||||
extern void omap_map_common_io(void);
|
||||
extern struct sys_timer omap_timer;
|
||||
extern void omap_serial_init(int ports[]);
|
||||
|
||||
#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
|
||||
|
|
@ -241,6 +241,7 @@ extern void omap_dma_unlink_lch (int lch_head, int lch_queue);
|
|||
extern dma_addr_t omap_get_dma_src_pos(int lch);
|
||||
extern dma_addr_t omap_get_dma_dst_pos(int lch);
|
||||
extern void omap_clear_dma(int lch);
|
||||
extern int omap_dma_running(void);
|
||||
|
||||
/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
|
||||
extern int omap_dma_in_1510_mode(void);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,19 @@
|
|||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* Timers
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
#define OMAP_MPU_TIMER1_BASE (0xfffec500)
|
||||
#define OMAP_MPU_TIMER2_BASE (0xfffec600)
|
||||
#define OMAP_MPU_TIMER3_BASE (0xfffec700)
|
||||
#define MPU_TIMER_FREE (1 << 6)
|
||||
#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
|
||||
#define MPU_TIMER_AR (1 << 1)
|
||||
#define MPU_TIMER_ST (1 << 0)
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* Clocks
|
||||
|
|
@ -78,6 +91,7 @@
|
|||
|
||||
/* DSP clock control */
|
||||
#define DSP_CONFIG_REG_BASE (0xe1008000)
|
||||
#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
|
||||
#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
|
||||
#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
|
||||
|
||||
|
|
@ -88,6 +102,7 @@
|
|||
*/
|
||||
#define ULPD_REG_BASE (0xfffe0800)
|
||||
#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14)
|
||||
#define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24)
|
||||
#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30)
|
||||
# define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */
|
||||
# define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */
|
||||
|
|
@ -268,17 +283,10 @@
|
|||
* Processor specific defines
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef CONFIG_ARCH_OMAP730
|
||||
|
||||
#include "omap730.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1510
|
||||
#include "omap1510.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP16XX
|
||||
#include "omap16xx.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@
|
|||
#define INT_1610_GPIO_BANK3 (41 + IH2_BASE)
|
||||
#define INT_1610_MMC2 (42 + IH2_BASE)
|
||||
#define INT_1610_CF (43 + IH2_BASE)
|
||||
#define INT_1610_WAKE_UP_REQ (46 + IH2_BASE)
|
||||
#define INT_1610_GPIO_BANK4 (48 + IH2_BASE)
|
||||
#define INT_1610_SPI (49 + IH2_BASE)
|
||||
#define INT_1610_DMA_CH6 (53 + IH2_BASE)
|
||||
|
|
@ -238,6 +239,8 @@
|
|||
#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE)
|
||||
#define IH_BOARD_BASE (16 + IH_MPUIO_BASE)
|
||||
|
||||
#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
extern void omap_init_irq(void);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ typedef enum {
|
|||
J19_1610_ETM_D6,
|
||||
J18_1610_ETM_D7,
|
||||
|
||||
/* OMAP-1610 GPIO */
|
||||
/* OMAP16XX GPIO */
|
||||
P20_1610_GPIO4,
|
||||
V9_1610_GPIO7,
|
||||
W8_1610_GPIO9,
|
||||
|
|
@ -241,6 +241,9 @@ typedef enum {
|
|||
AA20_1610_GPIO_41,
|
||||
W19_1610_GPIO48,
|
||||
M7_1610_GPIO62,
|
||||
V14_16XX_GPIO37,
|
||||
R9_16XX_GPIO18,
|
||||
L14_16XX_GPIO49,
|
||||
|
||||
/* OMAP-1610 uWire */
|
||||
V19_1610_UWIRE_SCLK,
|
||||
|
|
@ -285,12 +288,13 @@ typedef enum {
|
|||
V6_USB2_TXD,
|
||||
W5_USB2_SE0,
|
||||
|
||||
/* UART1 1610 */
|
||||
|
||||
/* 16XX UART */
|
||||
R13_1610_UART1_TX,
|
||||
V14_1610_UART1_RX,
|
||||
V14_16XX_UART1_RX,
|
||||
R14_1610_UART1_CTS,
|
||||
AA15_1610_UART1_RTS,
|
||||
R9_16XX_UART2_RX,
|
||||
L14_16XX_UART3_RX,
|
||||
|
||||
/* I2C OMAP-1610 */
|
||||
I2C_SCL,
|
||||
|
|
@ -332,7 +336,7 @@ typedef enum {
|
|||
* Table of various FUNC_MUX and PULL_DWN combinations for each device.
|
||||
* See also reg_cfg_t above for the lookup table.
|
||||
*/
|
||||
static reg_cfg_set __initdata_or_module
|
||||
static const reg_cfg_set __initdata_or_module
|
||||
reg_cfg_table[] = {
|
||||
/*
|
||||
* description mux mode mux pull pull pull pu_pd pu dbg
|
||||
|
|
@ -455,7 +459,7 @@ MUX_CFG("L19_1610_ETM_D0", 5, 18, 1, 0, 26, 0, 0, 0, 1)
|
|||
MUX_CFG("J19_1610_ETM_D6", 5, 0, 1, 0, 20, 0, 0, 0, 1)
|
||||
MUX_CFG("J18_1610_ETM_D7", 5, 27, 1, 0, 19, 0, 0, 0, 1)
|
||||
|
||||
/* OMAP-1610 GPIO */
|
||||
/* OMAP16XX GPIO */
|
||||
MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1)
|
||||
MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1)
|
||||
MUX_CFG("W8_1610_GPIO9", B, 21, 0, 2, 23, 0, 2, 1, 1)
|
||||
|
|
@ -465,6 +469,9 @@ MUX_CFG("V5_1610_GPIO24", B, 15, 7, 2, 21, 0, 2, 1, 1)
|
|||
MUX_CFG("AA20_1610_GPIO_41", 9, 9, 7, 1, 31, 0, 1, 1, 1)
|
||||
MUX_CFG("W19_1610_GPIO48", 8, 15, 7, 1, 23, 1, 1, 0, 1)
|
||||
MUX_CFG("M7_1610_GPIO62", 10, 0, 0, 4, 24, 0, 4, 0, 1)
|
||||
MUX_CFG("V14_16XX_GPIO37", 9, 18, 7, 2, 2, 0, 2, 2, 0)
|
||||
MUX_CFG("R9_16XX_GPIO18", C, 18, 7, 3, 0, 0, 3, 0, 0)
|
||||
MUX_CFG("L14_16XX_GPIO49", 6, 3, 7, 0, 31, 0, 0, 31, 0)
|
||||
|
||||
/* OMAP-1610 uWire */
|
||||
MUX_CFG("V19_1610_UWIRE_SCLK", 8, 6, 0, 1, 20, 0, 1, 1, 1)
|
||||
|
|
@ -503,16 +510,17 @@ MUX_CFG("Y10_USB0_SUSP", B, 3, 5, 2, 17, 0, 2, 0, 1)
|
|||
MUX_CFG("W9_USB2_TXEN", B, 9, 1, NA, 0, 0, NA, 0, 1)
|
||||
MUX_CFG("AA9_USB2_VP", B, 6, 1, NA, 0, 0, NA, 0, 1)
|
||||
MUX_CFG("Y5_USB2_RCV", C, 21, 1, NA, 0, 0, NA, 0, 1)
|
||||
MUX_CFG("R8_USB2_VM", C, 18, 1, NA, 0, 0, NA, 0, 1)
|
||||
MUX_CFG("R9_USB2_VM", C, 18, 1, NA, 0, 0, NA, 0, 1)
|
||||
MUX_CFG("V6_USB2_TXD", C, 27, 2, NA, 0, 0, NA, 0, 1)
|
||||
MUX_CFG("W5_USB2_SE0", C, 24, 2, NA, 0, 0, NA, 0, 1)
|
||||
|
||||
|
||||
/* UART1 */
|
||||
/* 16XX UART */
|
||||
MUX_CFG("R13_1610_UART1_TX", A, 12, 6, 2, 10, 0, 2, 10, 1)
|
||||
MUX_CFG("V14_1610_UART1_RX", 9, 18, 0, 2, 2, 0, 2, 2, 1)
|
||||
MUX_CFG("V14_16XX_UART1_RX", 9, 18, 0, 2, 2, 0, 2, 2, 1)
|
||||
MUX_CFG("R14_1610_UART1_CTS", 9, 15, 0, 2, 1, 0, 2, 1, 1)
|
||||
MUX_CFG("AA15_1610_UART1_RTS", 9, 12, 1, 2, 0, 0, 2, 0, 1)
|
||||
MUX_CFG("R9_16XX_UART2_RX", C, 18, 0, 3, 0, 0, 3, 0, 1)
|
||||
MUX_CFG("L14_16XX_UART3_RX", 6, 3, 0, 0, 31, 0, 0, 31, 1)
|
||||
|
||||
/* I2C interface */
|
||||
MUX_CFG("I2C_SCL", 7, 24, 0, NA, 0, 0, NA, 0, 0)
|
||||
|
|
|
|||
|
|
@ -183,5 +183,37 @@
|
|||
#define OMAP16XX_PWL_ENABLE (OMAP16XX_PWL_BASE + 0x00)
|
||||
#define OMAP16XX_PWL_CLK_ENABLE (OMAP16XX_PWL_BASE + 0x04)
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------------
|
||||
* Watchdog timer
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* 32-bit Watchdog timer in OMAP 16XX */
|
||||
#define OMAP_16XX_WATCHDOG_BASE (0xfffeb000)
|
||||
#define OMAP_16XX_WIDR (OMAP_16XX_WATCHDOG_BASE + 0x00)
|
||||
#define OMAP_16XX_WD_SYSCONFIG (OMAP_16XX_WATCHDOG_BASE + 0x10)
|
||||
#define OMAP_16XX_WD_SYSSTATUS (OMAP_16XX_WATCHDOG_BASE + 0x14)
|
||||
#define OMAP_16XX_WCLR (OMAP_16XX_WATCHDOG_BASE + 0x24)
|
||||
#define OMAP_16XX_WCRR (OMAP_16XX_WATCHDOG_BASE + 0x28)
|
||||
#define OMAP_16XX_WLDR (OMAP_16XX_WATCHDOG_BASE + 0x2c)
|
||||
#define OMAP_16XX_WTGR (OMAP_16XX_WATCHDOG_BASE + 0x30)
|
||||
#define OMAP_16XX_WWPS (OMAP_16XX_WATCHDOG_BASE + 0x34)
|
||||
#define OMAP_16XX_WSPR (OMAP_16XX_WATCHDOG_BASE + 0x48)
|
||||
|
||||
#define WCLR_PRE_SHIFT 5
|
||||
#define WCLR_PTV_SHIFT 2
|
||||
|
||||
#define WWPS_W_PEND_WSPR (1 << 4)
|
||||
#define WWPS_W_PEND_WTGR (1 << 3)
|
||||
#define WWPS_W_PEND_WLDR (1 << 2)
|
||||
#define WWPS_W_PEND_WCRR (1 << 1)
|
||||
#define WWPS_W_PEND_WCLR (1 << 0)
|
||||
|
||||
#define WSPR_ENABLE_0 (0x0000bbbb)
|
||||
#define WSPR_ENABLE_1 (0x00004444)
|
||||
#define WSPR_DISABLE_0 (0x0000aaaa)
|
||||
#define WSPR_DISABLE_1 (0x00005555)
|
||||
|
||||
#endif /* __ASM_ARCH_OMAP16XX_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
#ifndef __ASM_ARCH_SYSTEM_H
|
||||
#define __ASM_ARCH_SYSTEM_H
|
||||
#include <linux/config.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
static inline void arch_idle(void)
|
||||
{
|
||||
|
|
@ -14,7 +16,24 @@ static inline void arch_idle(void)
|
|||
|
||||
static inline void arch_reset(char mode)
|
||||
{
|
||||
omap_writew(1, ARM_RSTCT1);
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP16XX
|
||||
/*
|
||||
* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
|
||||
* "Global Software Reset Affects Traffic Controller Frequency".
|
||||
*/
|
||||
if (cpu_is_omap5912()) {
|
||||
omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
|
||||
DPLL_CTL);
|
||||
omap_writew(0x8, ARM_RSTCT1);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_MACH_VOICEBLUE
|
||||
if (machine_is_voiceblue())
|
||||
voiceblue_reset();
|
||||
else
|
||||
#endif
|
||||
omap_writew(1, ARM_RSTCT1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -28,6 +28,66 @@
|
|||
#ifndef __ASM_ARCH_TPS65010_H
|
||||
#define __ASM_ARCH_TPS65010_H
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* Registers, all 8 bits
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define TPS_CHGSTATUS 0x01
|
||||
# define TPS_CHG_USB (1 << 7)
|
||||
# define TPS_CHG_AC (1 << 6)
|
||||
# define TPS_CHG_THERM (1 << 5)
|
||||
# define TPS_CHG_TERM (1 << 4)
|
||||
# define TPS_CHG_TAPER_TMO (1 << 3)
|
||||
# define TPS_CHG_CHG_TMO (1 << 2)
|
||||
# define TPS_CHG_PRECHG_TMO (1 << 1)
|
||||
# define TPS_CHG_TEMP_ERR (1 << 0)
|
||||
#define TPS_REGSTATUS 0x02
|
||||
# define TPS_REG_ONOFF (1 << 7)
|
||||
# define TPS_REG_COVER (1 << 6)
|
||||
# define TPS_REG_UVLO (1 << 5)
|
||||
# define TPS_REG_NO_CHG (1 << 4) /* tps65013 */
|
||||
# define TPS_REG_PG_LD02 (1 << 3)
|
||||
# define TPS_REG_PG_LD01 (1 << 2)
|
||||
# define TPS_REG_PG_MAIN (1 << 1)
|
||||
# define TPS_REG_PG_CORE (1 << 0)
|
||||
#define TPS_MASK1 0x03
|
||||
#define TPS_MASK2 0x04
|
||||
#define TPS_ACKINT1 0x05
|
||||
#define TPS_ACKINT2 0x06
|
||||
#define TPS_CHGCONFIG 0x07
|
||||
# define TPS_CHARGE_POR (1 << 7) /* 65010/65012 */
|
||||
# define TPS65013_AUA (1 << 7) /* 65011/65013 */
|
||||
# define TPS_CHARGE_RESET (1 << 6)
|
||||
# define TPS_CHARGE_FAST (1 << 5)
|
||||
# define TPS_CHARGE_CURRENT (3 << 3)
|
||||
# define TPS_VBUS_500MA (1 << 2)
|
||||
# define TPS_VBUS_CHARGING (1 << 1)
|
||||
# define TPS_CHARGE_ENABLE (1 << 0)
|
||||
#define TPS_LED1_ON 0x08
|
||||
#define TPS_LED1_PER 0x09
|
||||
#define TPS_LED2_ON 0x0a
|
||||
#define TPS_LED2_PER 0x0b
|
||||
#define TPS_VDCDC1 0x0c
|
||||
# define TPS_ENABLE_LP (1 << 3)
|
||||
#define TPS_VDCDC2 0x0d
|
||||
#define TPS_VREGS1 0x0e
|
||||
# define TPS_LDO2_ENABLE (1 << 7)
|
||||
# define TPS_LDO2_OFF (1 << 6)
|
||||
# define TPS_VLDO2_3_0V (3 << 4)
|
||||
# define TPS_VLDO2_2_75V (2 << 4)
|
||||
# define TPS_VLDO2_2_5V (1 << 4)
|
||||
# define TPS_VLDO2_1_8V (0 << 4)
|
||||
# define TPS_LDO1_ENABLE (1 << 3)
|
||||
# define TPS_LDO1_OFF (1 << 2)
|
||||
# define TPS_VLDO1_3_0V (3 << 0)
|
||||
# define TPS_VLDO1_2_75V (2 << 0)
|
||||
# define TPS_VLDO1_2_5V (1 << 0)
|
||||
# define TPS_VLDO1_ADJ (0 << 0)
|
||||
#define TPS_MASK3 0x0f
|
||||
#define TPS_DEFGPIO 0x10
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* Macros used by exported functions
|
||||
|
|
@ -71,10 +131,26 @@ extern int tps65010_set_gpio_out_value(unsigned gpio, unsigned value);
|
|||
*/
|
||||
extern int tps65010_set_led(unsigned led, unsigned mode);
|
||||
|
||||
/* tps65010_set_vib parameter:
|
||||
* value: ON or OFF
|
||||
*/
|
||||
extern int tps65010_set_vib(unsigned value);
|
||||
|
||||
/* tps65010_set_low_pwr parameter:
|
||||
* mode: ON or OFF
|
||||
*/
|
||||
extern int tps65010_set_low_pwr(unsigned mode);
|
||||
|
||||
/* tps65010_config_vregs1 parameter:
|
||||
* value to be written to VREGS1 register
|
||||
* Note: The complete register is written, set all bits you need
|
||||
*/
|
||||
extern int tps65010_config_vregs1(unsigned value);
|
||||
|
||||
/* tps65013_set_low_pwr parameter:
|
||||
* mode: ON or OFF
|
||||
*/
|
||||
extern int tps65013_set_low_pwr(unsigned mode);
|
||||
|
||||
#endif /* __ASM_ARCH_TPS65010_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,15 @@
|
|||
# define HMC_TLLATTACH (1 << 6)
|
||||
# define OTG_HMC(w) (((w)>>0)&0x3f)
|
||||
#define OTG_CTRL_REG OTG_REG32(0x0c)
|
||||
# define OTG_USB2_EN (1 << 29)
|
||||
# define OTG_USB2_DP (1 << 28)
|
||||
# define OTG_USB2_DM (1 << 27)
|
||||
# define OTG_USB1_EN (1 << 26)
|
||||
# define OTG_USB1_DP (1 << 25)
|
||||
# define OTG_USB1_DM (1 << 24)
|
||||
# define OTG_USB0_EN (1 << 23)
|
||||
# define OTG_USB0_DP (1 << 22)
|
||||
# define OTG_USB0_DM (1 << 21)
|
||||
# define OTG_ASESSVLD (1 << 20)
|
||||
# define OTG_BSESSEND (1 << 19)
|
||||
# define OTG_BSESSVLD (1 << 18)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "hardware.h"
|
||||
|
||||
.macro addruart,rx
|
||||
mrc p15, 0, \rx, c1, c0
|
||||
tst \rx, #1 @ MMU enabled?
|
||||
|
|
|
|||
37
include/asm-arm/arch-pxa/mtd-xip.h
Normal file
37
include/asm-arm/arch-pxa/mtd-xip.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* MTD primitives for XIP support. Architecture specific functions
|
||||
*
|
||||
* Do not include this file directly. It's included from linux/mtd/xip.h
|
||||
*
|
||||
* Author: Nicolas Pitre
|
||||
* Created: Nov 2, 2004
|
||||
* Copyright: (C) 2004 MontaVista Software, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_PXA_MTD_XIP_H__
|
||||
#define __ARCH_PXA_MTD_XIP_H__
|
||||
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
|
||||
#define xip_irqpending() (ICIP & ICMR)
|
||||
|
||||
/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
|
||||
#define xip_currtime() (OSCR)
|
||||
#define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4)
|
||||
|
||||
/*
|
||||
* xip_cpu_idle() is used when waiting for a delay equal or larger than
|
||||
* the system timer tick period. This should put the CPU into idle mode
|
||||
* to save power and to be woken up only when some interrupts are pending.
|
||||
* As above, this should not rely upon standard kernel code.
|
||||
*/
|
||||
|
||||
#define xip_cpu_idle() asm volatile ("mcr p14, 0, %0, c7, c0, 0" :: "r" (1))
|
||||
|
||||
#endif /* __ARCH_PXA_MTD_XIP_H__ */
|
||||
|
|
@ -1505,6 +1505,7 @@
|
|||
#define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */
|
||||
#define PSSR_RDH (1 << 5) /* Read Disable Hold */
|
||||
#define PSSR_PH (1 << 4) /* Peripheral Control Hold */
|
||||
#define PSSR_STS (1 << 3) /* Standby Mode Status */
|
||||
#define PSSR_VFS (1 << 2) /* VDD Fault Status */
|
||||
#define PSSR_BFS (1 << 1) /* Battery Fault Status */
|
||||
#define PSSR_SSS (1 << 0) /* Software Sleep Status */
|
||||
|
|
@ -1965,6 +1966,7 @@
|
|||
#define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */
|
||||
#define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */
|
||||
|
||||
#define MDREFR_K0DB4 (1 << 29) /* SDCLK0 Divide by 4 Control/Status */
|
||||
#define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */
|
||||
#define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */
|
||||
#define MDREFR_K0FREE (1 << 23) /* SDRAM Free-Running Control */
|
||||
|
|
|
|||
49
include/asm-arm/arch-s3c2410/audio.h
Normal file
49
include/asm-arm/arch-s3c2410/audio.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/* linux/include/asm-arm/arch-s3c2410/audio.h
|
||||
*
|
||||
* (c) 2004-2005 Simtec Electronics
|
||||
* http://www.simtec.co.uk/products/SWLINUX/
|
||||
* Ben Dooks <ben@simtec.co.uk>
|
||||
*
|
||||
* S3C24XX - Audio platfrom_device info
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Changelog:
|
||||
* 20-Nov-2004 BJD Created file
|
||||
* 07-Mar-2005 BJD Added suspend/resume calls
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_AUDIO_H
|
||||
#define __ASM_ARCH_AUDIO_H __FILE__
|
||||
|
||||
/* struct s3c24xx_iis_ops
|
||||
*
|
||||
* called from the s3c24xx audio core to deal with the architecture
|
||||
* or the codec's setup and control.
|
||||
*
|
||||
* the pointer to itself is passed through in case the caller wants to
|
||||
* embed this in an larger structure for easy reference to it's context.
|
||||
*/
|
||||
|
||||
struct s3c24xx_iis_ops {
|
||||
struct module *owner;
|
||||
|
||||
int (*startup)(struct s3c24xx_iis_ops *me);
|
||||
void (*shutdown)(struct s3c24xx_iis_ops *me);
|
||||
int (*suspend)(struct s3c24xx_iis_ops *me);
|
||||
int (*resume)(struct s3c24xx_iis_ops *me);
|
||||
|
||||
int (*open)(struct s3c24xx_iis_ops *me, snd_pcm_substream_t *strm);
|
||||
int (*close)(struct s3c24xx_iis_ops *me, snd_pcm_substream_t *strm);
|
||||
int (*prepare)(struct s3c24xx_iis_ops *me, snd_pcm_substream_t *strm, snd_pcm_runtime_t *rt);
|
||||
};
|
||||
|
||||
struct s3c24xx_platdata_iis {
|
||||
const char *codec_clk;
|
||||
struct s3c24xx_iis_ops *ops;
|
||||
int (*match_dev)(struct device *dev);
|
||||
};
|
||||
|
||||
#endif /* __ASM_ARCH_AUDIO_H */
|
||||
|
|
@ -15,6 +15,9 @@
|
|||
* 12-03-2004 BJD Updated include protection
|
||||
* 07-03-2005 BJD Added FIFO size flags and S3C2440 MPLL
|
||||
* 05-04-2005 LCVR Added IISFCON definitions for the S3C2400
|
||||
* 18-07-2005 DA Change IISCON_MPLL to IISMOD_MPLL
|
||||
* Correct IISMOD_256FS and IISMOD_384FS
|
||||
* Add IISCON_PSCEN
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_REGS_IIS_H
|
||||
|
|
@ -22,7 +25,6 @@
|
|||
|
||||
#define S3C2410_IISCON (0x00)
|
||||
|
||||
#define S3C2440_IISCON_MPLL (1<<9)
|
||||
#define S3C2410_IISCON_LRINDEX (1<<8)
|
||||
#define S3C2410_IISCON_TXFIFORDY (1<<7)
|
||||
#define S3C2410_IISCON_RXFIFORDY (1<<6)
|
||||
|
|
@ -30,10 +32,12 @@
|
|||
#define S3C2410_IISCON_RXDMAEN (1<<4)
|
||||
#define S3C2410_IISCON_TXIDLE (1<<3)
|
||||
#define S3C2410_IISCON_RXIDLE (1<<2)
|
||||
#define S3C2410_IISCON_PSCEN (1<<1)
|
||||
#define S3C2410_IISCON_IISEN (1<<0)
|
||||
|
||||
#define S3C2410_IISMOD (0x04)
|
||||
|
||||
#define S3C2440_IISMOD_MPLL (1<<9)
|
||||
#define S3C2410_IISMOD_SLAVE (1<<8)
|
||||
#define S3C2410_IISMOD_NOXFER (0<<6)
|
||||
#define S3C2410_IISMOD_RXMODE (1<<6)
|
||||
|
|
@ -46,8 +50,8 @@
|
|||
#define S3C2410_IISMOD_8BIT (0<<3)
|
||||
#define S3C2410_IISMOD_16BIT (1<<3)
|
||||
#define S3C2410_IISMOD_BITMASK (1<<3)
|
||||
#define S3C2410_IISMOD_256FS (0<<1)
|
||||
#define S3C2410_IISMOD_384FS (1<<1)
|
||||
#define S3C2410_IISMOD_256FS (0<<2)
|
||||
#define S3C2410_IISMOD_384FS (1<<2)
|
||||
#define S3C2410_IISMOD_16FS (0<<0)
|
||||
#define S3C2410_IISMOD_32FS (1<<0)
|
||||
#define S3C2410_IISMOD_48FS (2<<0)
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
* Changelog:
|
||||
* 11-Sep-2004 BJD Created file
|
||||
* 21-Sep-2004 BJD Updated port info
|
||||
* 09-Aug-2005 BJD Renamed s3c2410_report_oc s3c2410_usb_report_oc
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_USBCONTROL_H
|
||||
|
|
@ -35,7 +36,7 @@ struct s3c2410_hcd_info {
|
|||
void (*report_oc)(struct s3c2410_hcd_info *, int ports);
|
||||
};
|
||||
|
||||
static void inline s3c2410_report_oc(struct s3c2410_hcd_info *info, int ports)
|
||||
static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports)
|
||||
{
|
||||
if (info->report_oc != NULL) {
|
||||
(info->report_oc)(info, ports);
|
||||
|
|
|
|||
26
include/asm-arm/arch-sa1100/mtd-xip.h
Normal file
26
include/asm-arm/arch-sa1100/mtd-xip.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* MTD primitives for XIP support. Architecture specific functions
|
||||
*
|
||||
* Do not include this file directly. It's included from linux/mtd/xip.h
|
||||
*
|
||||
* Author: Nicolas Pitre
|
||||
* Created: Nov 2, 2004
|
||||
* Copyright: (C) 2004 MontaVista Software, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SA1100_MTD_XIP_H__
|
||||
#define __ARCH_SA1100_MTD_XIP_H__
|
||||
|
||||
#define xip_irqpending() (ICIP & ICMR)
|
||||
|
||||
/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
|
||||
#define xip_currtime() (OSCR)
|
||||
#define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4)
|
||||
|
||||
#endif /* __ARCH_SA1100_MTD_XIP_H__ */
|
||||
|
|
@ -21,38 +21,8 @@
|
|||
*/
|
||||
#define __PORT_PCIO(x) (!((x) & 0x80000000))
|
||||
|
||||
/*
|
||||
* Dynamic IO functions - let the compiler
|
||||
* optimize the expressions
|
||||
*/
|
||||
#define DECLARE_DYN_OUT(fnsuffix,instr) \
|
||||
static inline void __out##fnsuffix (unsigned int value, unsigned int port) \
|
||||
{ \
|
||||
unsigned long temp; \
|
||||
__asm__ __volatile__( \
|
||||
"tst %2, #0x80000000\n\t" \
|
||||
"mov %0, %4\n\t" \
|
||||
"addeq %0, %0, %3\n\t" \
|
||||
"str" instr " %1, [%0, %2] @ out" #fnsuffix \
|
||||
: "=&r" (temp) \
|
||||
: "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \
|
||||
: "cc"); \
|
||||
}
|
||||
#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
|
||||
|
||||
#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
|
||||
static inline unsigned sz __in##fnsuffix (unsigned int port) \
|
||||
{ \
|
||||
unsigned long temp, value; \
|
||||
__asm__ __volatile__( \
|
||||
"tst %2, #0x80000000\n\t" \
|
||||
"mov %0, %4\n\t" \
|
||||
"addeq %0, %0, %3\n\t" \
|
||||
"ldr" instr " %1, [%0, %2] @ in" #fnsuffix \
|
||||
: "=&r" (temp), "=r" (value) \
|
||||
: "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \
|
||||
: "cc"); \
|
||||
return (unsigned sz)value; \
|
||||
}
|
||||
|
||||
static inline unsigned int __ioaddr (unsigned int port) \
|
||||
{ \
|
||||
|
|
@ -62,123 +32,8 @@ static inline unsigned int __ioaddr (unsigned int port) \
|
|||
return (unsigned int)(IO_BASE + (port)); \
|
||||
}
|
||||
|
||||
#define DECLARE_IO(sz,fnsuffix,instr) \
|
||||
DECLARE_DYN_OUT(fnsuffix,instr) \
|
||||
DECLARE_DYN_IN(sz,fnsuffix,instr)
|
||||
|
||||
DECLARE_IO(char,b,"b")
|
||||
DECLARE_IO(short,w,"h")
|
||||
DECLARE_IO(long,l,"")
|
||||
|
||||
#undef DECLARE_IO
|
||||
#undef DECLARE_DYN_OUT
|
||||
#undef DECLARE_DYN_IN
|
||||
|
||||
/*
|
||||
* Constant address IO functions
|
||||
*
|
||||
* These have to be macros for the 'J' constraint to work -
|
||||
* +/-4096 immediate operand.
|
||||
*/
|
||||
#define __outbc(value,port) \
|
||||
({ \
|
||||
if (__PORT_PCIO((port))) \
|
||||
__asm__ __volatile__( \
|
||||
"strb %0, [%1, %2] @ outbc" \
|
||||
: : "r" (value), "r" (PCIO_BASE), "Jr" (port)); \
|
||||
else \
|
||||
__asm__ __volatile__( \
|
||||
"strb %0, [%1, %2] @ outbc" \
|
||||
: : "r" (value), "r" (IO_BASE), "r" (port)); \
|
||||
})
|
||||
|
||||
#define __inbc(port) \
|
||||
({ \
|
||||
unsigned char result; \
|
||||
if (__PORT_PCIO((port))) \
|
||||
__asm__ __volatile__( \
|
||||
"ldrb %0, [%1, %2] @ inbc" \
|
||||
: "=r" (result) : "r" (PCIO_BASE), "Jr" (port)); \
|
||||
else \
|
||||
__asm__ __volatile__( \
|
||||
"ldrb %0, [%1, %2] @ inbc" \
|
||||
: "=r" (result) : "r" (IO_BASE), "r" (port)); \
|
||||
result; \
|
||||
})
|
||||
|
||||
#define __outwc(value,port) \
|
||||
({ \
|
||||
unsigned long v = value; \
|
||||
if (__PORT_PCIO((port))) \
|
||||
__asm__ __volatile__( \
|
||||
"strh %0, [%1, %2] @ outwc" \
|
||||
: : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" (port)); \
|
||||
else \
|
||||
__asm__ __volatile__( \
|
||||
"strh %0, [%1, %2] @ outwc" \
|
||||
: : "r" (v|v<<16), "r" (IO_BASE), "r" (port)); \
|
||||
})
|
||||
|
||||
#define __inwc(port) \
|
||||
({ \
|
||||
unsigned short result; \
|
||||
if (__PORT_PCIO((port))) \
|
||||
__asm__ __volatile__( \
|
||||
"ldrh %0, [%1, %2] @ inwc" \
|
||||
: "=r" (result) : "r" (PCIO_BASE), "Jr" (port)); \
|
||||
else \
|
||||
__asm__ __volatile__( \
|
||||
"ldrh %0, [%1, %2] @ inwc" \
|
||||
: "=r" (result) : "r" (IO_BASE), "r" (port)); \
|
||||
result & 0xffff; \
|
||||
})
|
||||
|
||||
#define __outlc(value,port) \
|
||||
({ \
|
||||
unsigned long v = value; \
|
||||
if (__PORT_PCIO((port))) \
|
||||
__asm__ __volatile__( \
|
||||
"str %0, [%1, %2] @ outlc" \
|
||||
: : "r" (v), "r" (PCIO_BASE), "Jr" (port)); \
|
||||
else \
|
||||
__asm__ __volatile__( \
|
||||
"str %0, [%1, %2] @ outlc" \
|
||||
: : "r" (v), "r" (IO_BASE), "r" (port)); \
|
||||
})
|
||||
|
||||
#define __inlc(port) \
|
||||
({ \
|
||||
unsigned long result; \
|
||||
if (__PORT_PCIO((port))) \
|
||||
__asm__ __volatile__( \
|
||||
"ldr %0, [%1, %2] @ inlc" \
|
||||
: "=r" (result) : "r" (PCIO_BASE), "Jr" (port)); \
|
||||
else \
|
||||
__asm__ __volatile__( \
|
||||
"ldr %0, [%1, %2] @ inlc" \
|
||||
: "=r" (result) : "r" (IO_BASE), "r" (port)); \
|
||||
result; \
|
||||
})
|
||||
|
||||
#define __ioaddrc(port) \
|
||||
({ \
|
||||
unsigned long addr; \
|
||||
if (__PORT_PCIO((port))) \
|
||||
addr = PCIO_BASE + (port); \
|
||||
else \
|
||||
addr = IO_BASE + (port); \
|
||||
addr; \
|
||||
})
|
||||
|
||||
#define __mem_pci(addr) (addr)
|
||||
|
||||
#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
|
||||
#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
|
||||
#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
|
||||
#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
|
||||
#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
|
||||
#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
|
||||
|
||||
/*
|
||||
* Translated address IO functions
|
||||
*
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
#include <asm/system.h>
|
||||
|
||||
#define smp_mb__before_clear_bit() do { } while (0)
|
||||
#define smp_mb__after_clear_bit() do { } while (0)
|
||||
#define smp_mb__before_clear_bit() mb()
|
||||
#define smp_mb__after_clear_bit() mb()
|
||||
|
||||
/*
|
||||
* These functions are the basis of our bit ops.
|
||||
|
|
@ -229,6 +229,7 @@ extern int _find_next_zero_bit_be(const void * p, int size, int offset);
|
|||
extern int _find_first_bit_be(const unsigned long *p, unsigned size);
|
||||
extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
/*
|
||||
* The __* form of bitops are non-atomic and may be reordered.
|
||||
*/
|
||||
|
|
@ -241,6 +242,10 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
|
|||
(__builtin_constant_p(nr) ? \
|
||||
____atomic_##name(nr, p) : \
|
||||
_##name##_be(nr,p))
|
||||
#else
|
||||
#define ATOMIC_BITOP_LE(name,nr,p) _##name##_le(nr,p)
|
||||
#define ATOMIC_BITOP_BE(name,nr,p) _##name##_be(nr,p)
|
||||
#endif
|
||||
|
||||
#define NONATOMIC_BITOP(name,nr,p) \
|
||||
(____nonatomic_##name(nr, p))
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifdef CONFIG_BUG
|
||||
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||
extern volatile void __bug(const char *file, int line, void *data);
|
||||
extern void __bug(const char *file, int line, void *data) __attribute__((noreturn));
|
||||
|
||||
/* give file/line information */
|
||||
#define BUG() __bug(__FILE__, __LINE__, NULL)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ extern struct processor {
|
|||
/*
|
||||
* Special stuff for a reset
|
||||
*/
|
||||
volatile void (*reset)(unsigned long addr);
|
||||
void (*reset)(unsigned long addr) __attribute__((noreturn));
|
||||
/*
|
||||
* Idle the processor
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -41,4 +41,4 @@ extern int cpu_do_idle(void);
|
|||
extern void cpu_dcache_clean_area(void *, int);
|
||||
extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
|
||||
extern void cpu_set_pte(pte_t *ptep, pte_t pte);
|
||||
extern volatile void cpu_reset(unsigned long addr);
|
||||
extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
|
||||
|
|
|
|||
6
include/asm-arm/emergency-restart.h
Normal file
6
include/asm-arm/emergency-restart.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef _ASM_EMERGENCY_RESTART_H
|
||||
#define _ASM_EMERGENCY_RESTART_H
|
||||
|
||||
#include <asm-generic/emergency-restart.h>
|
||||
|
||||
#endif /* _ASM_EMERGENCY_RESTART_H */
|
||||
21
include/asm-arm/hardware/arm_timer.h
Normal file
21
include/asm-arm/hardware/arm_timer.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef __ASM_ARM_HARDWARE_ARM_TIMER_H
|
||||
#define __ASM_ARM_HARDWARE_ARM_TIMER_H
|
||||
|
||||
#define TIMER_LOAD 0x00
|
||||
#define TIMER_VALUE 0x04
|
||||
#define TIMER_CTRL 0x08
|
||||
#define TIMER_CTRL_ONESHOT (1 << 0)
|
||||
#define TIMER_CTRL_32BIT (1 << 1)
|
||||
#define TIMER_CTRL_DIV1 (0 << 2)
|
||||
#define TIMER_CTRL_DIV16 (1 << 2)
|
||||
#define TIMER_CTRL_DIV256 (2 << 2)
|
||||
#define TIMER_CTRL_IE (1 << 5) /* Interrupt Enable (versatile only) */
|
||||
#define TIMER_CTRL_PERIODIC (1 << 6)
|
||||
#define TIMER_CTRL_ENABLE (1 << 7)
|
||||
|
||||
#define TIMER_INTCLR 0x0c
|
||||
#define TIMER_RIS 0x10
|
||||
#define TIMER_MIS 0x14
|
||||
#define TIMER_BGLOAD 0x18
|
||||
|
||||
#endif
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* This file contains the i386 architecture specific IDE code.
|
||||
* This file contains the ARM architecture specific IDE code.
|
||||
*/
|
||||
|
||||
#ifndef __ASMARM_IDE_H
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ extern void __readwrite_bug(const char *fn);
|
|||
* only. Their primary purpose is to access PCI and ISA peripherals.
|
||||
*
|
||||
* Note that for a big endian machine, this implies that the following
|
||||
* big endian mode connectivity is in place, as described by numerious
|
||||
* big endian mode connectivity is in place, as described by numerous
|
||||
* ARM documents:
|
||||
*
|
||||
* PCI: D0-D7 D8-D15 D16-D23 D24-D31
|
||||
|
|
@ -275,6 +275,7 @@ extern void __iounmap(void __iomem *addr);
|
|||
/*
|
||||
* io{read,write}{8,16,32} macros
|
||||
*/
|
||||
#ifndef ioread8
|
||||
#define ioread8(p) ({ unsigned int __v = __raw_readb(p); __v; })
|
||||
#define ioread16(p) ({ unsigned int __v = le16_to_cpu(__raw_readw(p)); __v; })
|
||||
#define ioread32(p) ({ unsigned int __v = le32_to_cpu(__raw_readl(p)); __v; })
|
||||
|
|
@ -293,6 +294,7 @@ extern void __iounmap(void __iomem *addr);
|
|||
|
||||
extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
|
||||
extern void ioport_unmap(void __iomem *addr);
|
||||
#endif
|
||||
|
||||
struct pci_dev;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@
|
|||
" blmi " #fail \
|
||||
: \
|
||||
: "r" (ptr), "I" (1) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
smp_mb(); \
|
||||
})
|
||||
|
||||
#define __down_op_ret(ptr,fail) \
|
||||
|
|
@ -48,12 +49,14 @@
|
|||
" mov %0, ip" \
|
||||
: "=&r" (ret) \
|
||||
: "r" (ptr), "I" (1) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
smp_mb(); \
|
||||
ret; \
|
||||
})
|
||||
|
||||
#define __up_op(ptr,wake) \
|
||||
({ \
|
||||
smp_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
"@ up_op\n" \
|
||||
"1: ldrex lr, [%0]\n" \
|
||||
|
|
@ -61,12 +64,12 @@
|
|||
" strex ip, lr, [%0]\n" \
|
||||
" teq ip, #0\n" \
|
||||
" bne 1b\n" \
|
||||
" teq lr, #0\n" \
|
||||
" cmp lr, #0\n" \
|
||||
" movle ip, %0\n" \
|
||||
" blle " #wake \
|
||||
: \
|
||||
: "r" (ptr), "I" (1) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
})
|
||||
|
||||
/*
|
||||
|
|
@ -92,15 +95,17 @@
|
|||
" blne " #fail \
|
||||
: \
|
||||
: "r" (ptr), "I" (RW_LOCK_BIAS) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
smp_mb(); \
|
||||
})
|
||||
|
||||
#define __up_op_write(ptr,wake) \
|
||||
({ \
|
||||
smp_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
"@ up_op_read\n" \
|
||||
"1: ldrex lr, [%0]\n" \
|
||||
" add lr, lr, %1\n" \
|
||||
" adds lr, lr, %1\n" \
|
||||
" strex ip, lr, [%0]\n" \
|
||||
" teq ip, #0\n" \
|
||||
" bne 1b\n" \
|
||||
|
|
@ -108,7 +113,7 @@
|
|||
" blcs " #wake \
|
||||
: \
|
||||
: "r" (ptr), "I" (RW_LOCK_BIAS) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
})
|
||||
|
||||
#define __down_op_read(ptr,fail) \
|
||||
|
|
@ -116,6 +121,7 @@
|
|||
|
||||
#define __up_op_read(ptr,wake) \
|
||||
({ \
|
||||
smp_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
"@ up_op_read\n" \
|
||||
"1: ldrex lr, [%0]\n" \
|
||||
|
|
@ -128,7 +134,7 @@
|
|||
" bleq " #wake \
|
||||
: \
|
||||
: "r" (ptr), "I" (1) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
})
|
||||
|
||||
#else
|
||||
|
|
@ -148,7 +154,8 @@
|
|||
" blmi " #fail \
|
||||
: \
|
||||
: "r" (ptr), "I" (1) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
smp_mb(); \
|
||||
})
|
||||
|
||||
#define __down_op_ret(ptr,fail) \
|
||||
|
|
@ -169,12 +176,14 @@
|
|||
" mov %0, ip" \
|
||||
: "=&r" (ret) \
|
||||
: "r" (ptr), "I" (1) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
smp_mb(); \
|
||||
ret; \
|
||||
})
|
||||
|
||||
#define __up_op(ptr,wake) \
|
||||
({ \
|
||||
smp_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
"@ up_op\n" \
|
||||
" mrs ip, cpsr\n" \
|
||||
|
|
@ -188,7 +197,7 @@
|
|||
" blle " #wake \
|
||||
: \
|
||||
: "r" (ptr), "I" (1) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
})
|
||||
|
||||
/*
|
||||
|
|
@ -215,7 +224,8 @@
|
|||
" blne " #fail \
|
||||
: \
|
||||
: "r" (ptr), "I" (RW_LOCK_BIAS) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
smp_mb(); \
|
||||
})
|
||||
|
||||
#define __up_op_write(ptr,wake) \
|
||||
|
|
@ -233,7 +243,8 @@
|
|||
" blcs " #wake \
|
||||
: \
|
||||
: "r" (ptr), "I" (RW_LOCK_BIAS) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
smp_mb(); \
|
||||
})
|
||||
|
||||
#define __down_op_read(ptr,fail) \
|
||||
|
|
@ -241,6 +252,7 @@
|
|||
|
||||
#define __up_op_read(ptr,wake) \
|
||||
({ \
|
||||
smp_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
"@ up_op_read\n" \
|
||||
" mrs ip, cpsr\n" \
|
||||
|
|
@ -254,7 +266,7 @@
|
|||
" bleq " #wake \
|
||||
: \
|
||||
: "r" (ptr), "I" (1) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
: "ip", "lr", "cc"); \
|
||||
})
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ struct machine_desc {
|
|||
* page tabe entry */
|
||||
|
||||
const char *name; /* architecture name */
|
||||
unsigned int param_offset; /* parameter page */
|
||||
unsigned long boot_params; /* tagged list */
|
||||
|
||||
unsigned int video_start; /* start of video RAM */
|
||||
unsigned int video_end; /* end of video RAM */
|
||||
|
|
@ -54,38 +54,6 @@ const struct machine_desc __mach_desc_##_type \
|
|||
.nr = MACH_TYPE_##_type, \
|
||||
.name = _name,
|
||||
|
||||
#define MAINTAINER(n)
|
||||
|
||||
#define BOOT_MEM(_pram,_pio,_vio) \
|
||||
.phys_ram = _pram, \
|
||||
.phys_io = _pio, \
|
||||
.io_pg_offst = ((_vio)>>18)&0xfffc,
|
||||
|
||||
#define BOOT_PARAMS(_params) \
|
||||
.param_offset = _params,
|
||||
|
||||
#define VIDEO(_start,_end) \
|
||||
.video_start = _start, \
|
||||
.video_end = _end,
|
||||
|
||||
#define DISABLE_PARPORT(_n) \
|
||||
.reserve_lp##_n = 1,
|
||||
|
||||
#define SOFT_REBOOT \
|
||||
.soft_reboot = 1,
|
||||
|
||||
#define FIXUP(_func) \
|
||||
.fixup = _func,
|
||||
|
||||
#define MAPIO(_func) \
|
||||
.map_io = _func,
|
||||
|
||||
#define INITIRQ(_func) \
|
||||
.init_irq = _func,
|
||||
|
||||
#define INIT_MACHINE(_func) \
|
||||
.init_machine = _func,
|
||||
|
||||
#define MACHINE_END \
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,31 @@ struct sys_timer {
|
|||
void (*suspend)(void);
|
||||
void (*resume)(void);
|
||||
unsigned long (*offset)(void);
|
||||
|
||||
#ifdef CONFIG_NO_IDLE_HZ
|
||||
struct dyn_tick_timer *dyn_tick;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NO_IDLE_HZ
|
||||
|
||||
#define DYN_TICK_SKIPPING (1 << 2)
|
||||
#define DYN_TICK_ENABLED (1 << 1)
|
||||
#define DYN_TICK_SUITABLE (1 << 0)
|
||||
|
||||
struct dyn_tick_timer {
|
||||
unsigned int state; /* Current state */
|
||||
int (*enable)(void); /* Enables dynamic tick */
|
||||
int (*disable)(void); /* Disables dynamic tick */
|
||||
void (*reprogram)(unsigned long); /* Reprograms the timer */
|
||||
int (*handler)(int, void *, struct pt_regs *);
|
||||
};
|
||||
|
||||
void timer_dyn_reprogram(void);
|
||||
#else
|
||||
#define timer_dyn_reprogram() do { } while (0)
|
||||
#endif
|
||||
|
||||
extern struct sys_timer *system_timer;
|
||||
extern void timer_tick(struct pt_regs *);
|
||||
|
||||
|
|
|
|||
26
include/asm-arm/mtd-xip.h
Normal file
26
include/asm-arm/mtd-xip.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* MTD primitives for XIP support. Architecture specific functions
|
||||
*
|
||||
* Do not include this file directly. It's included from linux/mtd/xip.h
|
||||
*
|
||||
* Author: Nicolas Pitre
|
||||
* Created: Nov 2, 2004
|
||||
* Copyright: (C) 2004 MontaVista Software, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $
|
||||
*/
|
||||
|
||||
#ifndef __ARM_MTD_XIP_H__
|
||||
#define __ARM_MTD_XIP_H__
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/arch/mtd-xip.h>
|
||||
|
||||
/* fill instruction prefetch */
|
||||
#define xip_iprefetch() do { asm volatile (".rep 8; nop; .endr"); } while (0)
|
||||
|
||||
#endif /* __ARM_MTD_XIP_H__ */
|
||||
|
|
@ -14,7 +14,7 @@ static inline void pcibios_set_master(struct pci_dev *dev)
|
|||
/* No special bus mastering setup handling */
|
||||
}
|
||||
|
||||
static inline void pcibios_penalize_isa_irq(int irq)
|
||||
static inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
@ -42,6 +42,16 @@ static inline void pcibios_penalize_isa_irq(int irq)
|
|||
#define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME)
|
||||
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL))
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
|
||||
enum pci_dma_burst_strategy *strat,
|
||||
unsigned long *strategy_parameter)
|
||||
{
|
||||
*strat = PCI_DMA_BURST_INFINITY;
|
||||
*strategy_parameter = ~0UL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define HAVE_PCI_MMAP
|
||||
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
|
||||
enum pci_mmap_state mmap_state, int write_combine);
|
||||
|
|
@ -50,6 +60,10 @@ extern void
|
|||
pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
|
||||
struct resource *res);
|
||||
|
||||
extern void
|
||||
pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
|
||||
struct pci_bus_region *region);
|
||||
|
||||
static inline void pcibios_add_platform_entries(struct pci_dev *dev)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,13 @@ static inline void pte_free(struct page *pte)
|
|||
__free_page(pte);
|
||||
}
|
||||
|
||||
static inline void __pmd_populate(pmd_t *pmdp, unsigned long pmdval)
|
||||
{
|
||||
pmdp[0] = __pmd(pmdval);
|
||||
pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t));
|
||||
flush_pmd_entry(pmdp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Populate the pmdp entry with a pointer to the pte. This pmd is part
|
||||
* of the mm address space.
|
||||
|
|
@ -99,32 +106,19 @@ static inline void
|
|||
pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep)
|
||||
{
|
||||
unsigned long pte_ptr = (unsigned long)ptep;
|
||||
unsigned long pmdval;
|
||||
|
||||
BUG_ON(mm != &init_mm);
|
||||
|
||||
/*
|
||||
* The pmd must be loaded with the physical
|
||||
* address of the PTE table
|
||||
*/
|
||||
pte_ptr -= PTRS_PER_PTE * sizeof(void *);
|
||||
pmdval = __pa(pte_ptr) | _PAGE_KERNEL_TABLE;
|
||||
pmdp[0] = __pmd(pmdval);
|
||||
pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t));
|
||||
flush_pmd_entry(pmdp);
|
||||
__pmd_populate(pmdp, __pa(pte_ptr) | _PAGE_KERNEL_TABLE);
|
||||
}
|
||||
|
||||
static inline void
|
||||
pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *ptep)
|
||||
{
|
||||
unsigned long pmdval;
|
||||
|
||||
BUG_ON(mm == &init_mm);
|
||||
|
||||
pmdval = page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE;
|
||||
pmdp[0] = __pmd(pmdval);
|
||||
pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t));
|
||||
flush_pmd_entry(pmdp);
|
||||
__pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -188,12 +188,18 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
|
|||
/*
|
||||
* - extended small page/tiny page
|
||||
*/
|
||||
#define PTE_EXT_XN (1 << 0) /* v6 */
|
||||
#define PTE_EXT_AP_MASK (3 << 4)
|
||||
#define PTE_EXT_AP0 (1 << 4)
|
||||
#define PTE_EXT_AP1 (2 << 4)
|
||||
#define PTE_EXT_AP_UNO_SRO (0 << 4)
|
||||
#define PTE_EXT_AP_UNO_SRW (1 << 4)
|
||||
#define PTE_EXT_AP_URO_SRW (2 << 4)
|
||||
#define PTE_EXT_AP_URW_SRW (3 << 4)
|
||||
#define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0)
|
||||
#define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1)
|
||||
#define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0)
|
||||
#define PTE_EXT_TEX(x) ((x) << 6) /* v5 */
|
||||
#define PTE_EXT_APX (1 << 9) /* v6 */
|
||||
#define PTE_EXT_SHARED (1 << 10) /* v6 */
|
||||
#define PTE_EXT_NG (1 << 11) /* v6 */
|
||||
|
||||
/*
|
||||
* - small page
|
||||
|
|
@ -224,6 +230,8 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
|
|||
#define L_PTE_WRITE (1 << 5)
|
||||
#define L_PTE_EXEC (1 << 6)
|
||||
#define L_PTE_DIRTY (1 << 7)
|
||||
#define L_PTE_SHARED (1 << 10) /* shared between CPUs (v6) */
|
||||
#define L_PTE_ASID (1 << 11) /* non-global (use ASID, v6) */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ typedef unsigned long sigset_t;
|
|||
#define SIGSTKSZ 8192
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define SA_TIMER 0x40000000
|
||||
#define SA_IRQNOMASK 0x08000000
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,6 @@
|
|||
|
||||
#define raw_smp_processor_id() (current_thread_info()->cpu)
|
||||
|
||||
extern cpumask_t cpu_present_mask;
|
||||
#define cpu_possible_map cpu_present_mask
|
||||
|
||||
/*
|
||||
* at the moment, there's not a big penalty for changing CPUs
|
||||
* (the >big< penalty is running SMP in the first place)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@
|
|||
/*
|
||||
* ARMv6 Spin-locking.
|
||||
*
|
||||
* We (exclusively) read the old value, and decrement it. If it
|
||||
* hits zero, we may have won the lock, so we try (exclusively)
|
||||
* storing it.
|
||||
* We exclusively read the old value. If it is zero, we may have
|
||||
* won the lock, so we try exclusively storing it. A memory barrier
|
||||
* is required after we get a lock, and before we release it, because
|
||||
* V6 CPUs are assumed to have weakly ordered memory.
|
||||
*
|
||||
* Unlocked value: 0
|
||||
* Locked value: 1
|
||||
|
|
@ -41,7 +42,9 @@ static inline void _raw_spin_lock(spinlock_t *lock)
|
|||
" bne 1b"
|
||||
: "=&r" (tmp)
|
||||
: "r" (&lock->lock), "r" (1)
|
||||
: "cc", "memory");
|
||||
: "cc");
|
||||
|
||||
smp_mb();
|
||||
}
|
||||
|
||||
static inline int _raw_spin_trylock(spinlock_t *lock)
|
||||
|
|
@ -54,18 +57,25 @@ static inline int _raw_spin_trylock(spinlock_t *lock)
|
|||
" strexeq %0, %2, [%1]"
|
||||
: "=&r" (tmp)
|
||||
: "r" (&lock->lock), "r" (1)
|
||||
: "cc", "memory");
|
||||
: "cc");
|
||||
|
||||
return tmp == 0;
|
||||
if (tmp == 0) {
|
||||
smp_mb();
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void _raw_spin_unlock(spinlock_t *lock)
|
||||
{
|
||||
smp_mb();
|
||||
|
||||
__asm__ __volatile__(
|
||||
" str %1, [%0]"
|
||||
:
|
||||
: "r" (&lock->lock), "r" (0)
|
||||
: "cc", "memory");
|
||||
: "cc");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -79,7 +89,8 @@ typedef struct {
|
|||
} rwlock_t;
|
||||
|
||||
#define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
|
||||
#define rwlock_init(x) do { *(x) + RW_LOCK_UNLOCKED; } while (0)
|
||||
#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while (0)
|
||||
#define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0)
|
||||
|
||||
/*
|
||||
* Write locks are easy - we just set bit 31. When unlocking, we can
|
||||
|
|
@ -97,16 +108,40 @@ static inline void _raw_write_lock(rwlock_t *rw)
|
|||
" bne 1b"
|
||||
: "=&r" (tmp)
|
||||
: "r" (&rw->lock), "r" (0x80000000)
|
||||
: "cc", "memory");
|
||||
: "cc");
|
||||
|
||||
smp_mb();
|
||||
}
|
||||
|
||||
static inline int _raw_write_trylock(rwlock_t *rw)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
__asm__ __volatile__(
|
||||
"1: ldrex %0, [%1]\n"
|
||||
" teq %0, #0\n"
|
||||
" strexeq %0, %2, [%1]"
|
||||
: "=&r" (tmp)
|
||||
: "r" (&rw->lock), "r" (0x80000000)
|
||||
: "cc");
|
||||
|
||||
if (tmp == 0) {
|
||||
smp_mb();
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void _raw_write_unlock(rwlock_t *rw)
|
||||
{
|
||||
smp_mb();
|
||||
|
||||
__asm__ __volatile__(
|
||||
"str %1, [%0]"
|
||||
:
|
||||
: "r" (&rw->lock), "r" (0)
|
||||
: "cc", "memory");
|
||||
: "cc");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -133,11 +168,17 @@ static inline void _raw_read_lock(rwlock_t *rw)
|
|||
" bmi 1b"
|
||||
: "=&r" (tmp), "=&r" (tmp2)
|
||||
: "r" (&rw->lock)
|
||||
: "cc", "memory");
|
||||
: "cc");
|
||||
|
||||
smp_mb();
|
||||
}
|
||||
|
||||
static inline void _raw_read_unlock(rwlock_t *rw)
|
||||
{
|
||||
unsigned long tmp, tmp2;
|
||||
|
||||
smp_mb();
|
||||
|
||||
__asm__ __volatile__(
|
||||
"1: ldrex %0, [%2]\n"
|
||||
" sub %0, %0, #1\n"
|
||||
|
|
@ -146,24 +187,9 @@ static inline void _raw_read_unlock(rwlock_t *rw)
|
|||
" bne 1b"
|
||||
: "=&r" (tmp), "=&r" (tmp2)
|
||||
: "r" (&rw->lock)
|
||||
: "cc", "memory");
|
||||
: "cc");
|
||||
}
|
||||
|
||||
#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
|
||||
|
||||
static inline int _raw_write_trylock(rwlock_t *rw)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
__asm__ __volatile__(
|
||||
"1: ldrex %0, [%1]\n"
|
||||
" teq %0, #0\n"
|
||||
" strexeq %0, %2, [%1]"
|
||||
: "=&r" (tmp)
|
||||
: "r" (&rw->lock), "r" (0x80000000)
|
||||
: "cc", "memory");
|
||||
|
||||
return tmp == 0;
|
||||
}
|
||||
|
||||
#endif /* __ASM_SPINLOCK_H */
|
||||
|
|
|
|||
|
|
@ -89,6 +89,6 @@ struct stat64 {
|
|||
unsigned long st_ctime_nsec;
|
||||
|
||||
unsigned long long st_ino;
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -85,7 +85,9 @@ struct pt_regs;
|
|||
void die(const char *msg, struct pt_regs *regs, int err)
|
||||
__attribute__((noreturn));
|
||||
|
||||
void die_if_kernel(const char *str, struct pt_regs *regs, int err);
|
||||
struct siginfo;
|
||||
void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info,
|
||||
unsigned long err, unsigned long trap);
|
||||
|
||||
void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
|
||||
struct pt_regs *),
|
||||
|
|
@ -137,7 +139,12 @@ extern unsigned int user_debug;
|
|||
#define vectors_high() (0)
|
||||
#endif
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
#define mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \
|
||||
: : "r" (0) : "memory")
|
||||
#else
|
||||
#define mb() __asm__ __volatile__ ("" : : : "memory")
|
||||
#endif
|
||||
#define rmb() mb()
|
||||
#define wmb() mb()
|
||||
#define read_barrier_depends() do { } while(0)
|
||||
|
|
@ -145,34 +152,12 @@ extern unsigned int user_debug;
|
|||
#define set_wmb(var, value) do { var = value; wmb(); } while (0)
|
||||
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/*
|
||||
* Define our own context switch locking. This allows us to enable
|
||||
* interrupts over the context switch, otherwise we end up with high
|
||||
* interrupt latency. The real problem area is switch_mm() which may
|
||||
* do a full cache flush.
|
||||
* switch_mm() may do a full cache flush over the context switch,
|
||||
* so enable interrupts over the context switch to avoid high
|
||||
* latency.
|
||||
*/
|
||||
#define prepare_arch_switch(rq,next) \
|
||||
do { \
|
||||
spin_lock(&(next)->switch_lock); \
|
||||
spin_unlock_irq(&(rq)->lock); \
|
||||
} while (0)
|
||||
|
||||
#define finish_arch_switch(rq,prev) \
|
||||
spin_unlock(&(prev)->switch_lock)
|
||||
|
||||
#define task_running(rq,p) \
|
||||
((rq)->curr == (p) || spin_is_locked(&(p)->switch_lock))
|
||||
#else
|
||||
/*
|
||||
* Our UP-case is more simple, but we assume knowledge of how
|
||||
* spin_unlock_irq() and friends are implemented. This avoids
|
||||
* us needlessly decrementing and incrementing the preempt count.
|
||||
*/
|
||||
#define prepare_arch_switch(rq,next) local_irq_enable()
|
||||
#define finish_arch_switch(rq,prev) spin_unlock(&(rq)->lock)
|
||||
#define task_running(rq,p) ((rq)->curr == (p))
|
||||
#endif
|
||||
#define __ARCH_WANT_INTERRUPTS_ON_CTXSW
|
||||
|
||||
/*
|
||||
* switch_to(prev, next) should switch from task `prev' to `next'
|
||||
|
|
@ -312,7 +297,6 @@ do { \
|
|||
})
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#error SMP not supported
|
||||
|
||||
#define smp_mb() mb()
|
||||
#define smp_rmb() rmb()
|
||||
|
|
@ -326,6 +310,8 @@ do { \
|
|||
#define smp_wmb() barrier()
|
||||
#define smp_read_barrier_depends() do { } while(0)
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110)
|
||||
/*
|
||||
* On the StrongARM, "swp" is terminally broken since it bypasses the
|
||||
|
|
@ -338,6 +324,9 @@ do { \
|
|||
*
|
||||
* We choose (1) since its the "easiest" to achieve here and is not
|
||||
* dependent on the processor type.
|
||||
*
|
||||
* NOTE that this solution won't work on an SMP system, so explcitly
|
||||
* forbid it here.
|
||||
*/
|
||||
#define swp_is_buggy
|
||||
#endif
|
||||
|
|
@ -349,42 +338,73 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
|
|||
#ifdef swp_is_buggy
|
||||
unsigned long flags;
|
||||
#endif
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
unsigned int tmp;
|
||||
#endif
|
||||
|
||||
switch (size) {
|
||||
#ifdef swp_is_buggy
|
||||
case 1:
|
||||
local_irq_save(flags);
|
||||
ret = *(volatile unsigned char *)ptr;
|
||||
*(volatile unsigned char *)ptr = x;
|
||||
local_irq_restore(flags);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
local_irq_save(flags);
|
||||
ret = *(volatile unsigned long *)ptr;
|
||||
*(volatile unsigned long *)ptr = x;
|
||||
local_irq_restore(flags);
|
||||
break;
|
||||
#else
|
||||
case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]"
|
||||
: "=&r" (ret)
|
||||
: "r" (x), "r" (ptr)
|
||||
: "memory", "cc");
|
||||
break;
|
||||
case 4: __asm__ __volatile__ ("swp %0, %1, [%2]"
|
||||
: "=&r" (ret)
|
||||
: "r" (x), "r" (ptr)
|
||||
: "memory", "cc");
|
||||
break;
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
case 1:
|
||||
asm volatile("@ __xchg1\n"
|
||||
"1: ldrexb %0, [%3]\n"
|
||||
" strexb %1, %2, [%3]\n"
|
||||
" teq %1, #0\n"
|
||||
" bne 1b"
|
||||
: "=&r" (ret), "=&r" (tmp)
|
||||
: "r" (x), "r" (ptr)
|
||||
: "memory", "cc");
|
||||
break;
|
||||
case 4:
|
||||
asm volatile("@ __xchg4\n"
|
||||
"1: ldrex %0, [%3]\n"
|
||||
" strex %1, %2, [%3]\n"
|
||||
" teq %1, #0\n"
|
||||
" bne 1b"
|
||||
: "=&r" (ret), "=&r" (tmp)
|
||||
: "r" (x), "r" (ptr)
|
||||
: "memory", "cc");
|
||||
break;
|
||||
#elif defined(swp_is_buggy)
|
||||
#ifdef CONFIG_SMP
|
||||
#error SMP is not supported on this platform
|
||||
#endif
|
||||
default: __bad_xchg(ptr, size), ret = 0;
|
||||
case 1:
|
||||
local_irq_save(flags);
|
||||
ret = *(volatile unsigned char *)ptr;
|
||||
*(volatile unsigned char *)ptr = x;
|
||||
local_irq_restore(flags);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
local_irq_save(flags);
|
||||
ret = *(volatile unsigned long *)ptr;
|
||||
*(volatile unsigned long *)ptr = x;
|
||||
local_irq_restore(flags);
|
||||
break;
|
||||
#else
|
||||
case 1:
|
||||
asm volatile("@ __xchg1\n"
|
||||
" swpb %0, %1, [%2]"
|
||||
: "=&r" (ret)
|
||||
: "r" (x), "r" (ptr)
|
||||
: "memory", "cc");
|
||||
break;
|
||||
case 4:
|
||||
asm volatile("@ __xchg4\n"
|
||||
" swp %0, %1, [%2]"
|
||||
: "=&r" (ret)
|
||||
: "r" (x), "r" (ptr)
|
||||
: "memory", "cc");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
__bad_xchg(ptr, size), ret = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#define arch_align_stack(x) (x)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ struct cpu_context_save {
|
|||
*/
|
||||
struct thread_info {
|
||||
unsigned long flags; /* low level flags */
|
||||
__s32 preempt_count; /* 0 => preemptable, <0 => bug */
|
||||
int preempt_count; /* 0 => preemptable, <0 => bug */
|
||||
mm_segment_t addr_limit; /* address limit */
|
||||
struct task_struct *task; /* main task structure */
|
||||
struct exec_domain *exec_domain; /* execution domain */
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ extern struct cpu_tlb_fns cpu_tlb;
|
|||
|
||||
#define tlb_flag(f) ((always_tlb_flags & (f)) || (__tlb_flag & possible_tlb_flags & (f)))
|
||||
|
||||
static inline void flush_tlb_all(void)
|
||||
static inline void local_flush_tlb_all(void)
|
||||
{
|
||||
const int zero = 0;
|
||||
const unsigned int __tlb_flag = __cpu_tlb_flags;
|
||||
|
|
@ -253,7 +253,7 @@ static inline void flush_tlb_all(void)
|
|||
asm("mcr%? p15, 0, %0, c8, c5, 0" : : "r" (zero));
|
||||
}
|
||||
|
||||
static inline void flush_tlb_mm(struct mm_struct *mm)
|
||||
static inline void local_flush_tlb_mm(struct mm_struct *mm)
|
||||
{
|
||||
const int zero = 0;
|
||||
const int asid = ASID(mm);
|
||||
|
|
@ -282,7 +282,7 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
|
|||
}
|
||||
|
||||
static inline void
|
||||
flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
|
||||
local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
|
||||
{
|
||||
const int zero = 0;
|
||||
const unsigned int __tlb_flag = __cpu_tlb_flags;
|
||||
|
|
@ -313,7 +313,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
|
|||
asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (uaddr));
|
||||
}
|
||||
|
||||
static inline void flush_tlb_kernel_page(unsigned long kaddr)
|
||||
static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
|
||||
{
|
||||
const int zero = 0;
|
||||
const unsigned int __tlb_flag = __cpu_tlb_flags;
|
||||
|
|
@ -384,8 +384,24 @@ static inline void clean_pmd_entry(pmd_t *pmd)
|
|||
/*
|
||||
* Convert calls to our calling convention.
|
||||
*/
|
||||
#define flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)
|
||||
#define flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e)
|
||||
#define local_flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)
|
||||
#define local_flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e)
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
#define flush_tlb_all local_flush_tlb_all
|
||||
#define flush_tlb_mm local_flush_tlb_mm
|
||||
#define flush_tlb_page local_flush_tlb_page
|
||||
#define flush_tlb_kernel_page local_flush_tlb_kernel_page
|
||||
#define flush_tlb_range local_flush_tlb_range
|
||||
#define flush_tlb_kernel_range local_flush_tlb_kernel_range
|
||||
#else
|
||||
extern void flush_tlb_all(void);
|
||||
extern void flush_tlb_mm(struct mm_struct *mm);
|
||||
extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr);
|
||||
extern void flush_tlb_kernel_page(unsigned long kaddr);
|
||||
extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
|
||||
extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* if PG_dcache_dirty is set for the page, we need to ensure that any
|
||||
|
|
|
|||
|
|
@ -350,6 +350,11 @@
|
|||
#endif
|
||||
|
||||
#define __NR_vserver (__NR_SYSCALL_BASE+313)
|
||||
#define __NR_ioprio_set (__NR_SYSCALL_BASE+314)
|
||||
#define __NR_ioprio_get (__NR_SYSCALL_BASE+315)
|
||||
#define __NR_inotify_init (__NR_SYSCALL_BASE+316)
|
||||
#define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317)
|
||||
#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318)
|
||||
|
||||
/*
|
||||
* The following SWIs are ARM private.
|
||||
|
|
|
|||
6
include/asm-arm26/emergency-restart.h
Normal file
6
include/asm-arm26/emergency-restart.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef _ASM_EMERGENCY_RESTART_H
|
||||
#define _ASM_EMERGENCY_RESTART_H
|
||||
|
||||
#include <asm-generic/emergency-restart.h>
|
||||
|
||||
#endif /* _ASM_EMERGENCY_RESTART_H */
|
||||
|
|
@ -30,34 +30,16 @@
|
|||
#if defined(CONFIG_ARCH_A5K)
|
||||
/* UART CLK PORT IRQ FLAGS */
|
||||
|
||||
#define STD_SERIAL_PORT_DEFNS \
|
||||
#define SERIAL_PORT_DFNS \
|
||||
{ 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \
|
||||
{ 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */
|
||||
|
||||
#else
|
||||
|
||||
#define STD_SERIAL_PORT_DEFNS \
|
||||
#define SERIAL_PORT_DFNS \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS0 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS1 */
|
||||
|
||||
#endif
|
||||
|
||||
#define EXTRA_SERIAL_PORT_DEFNS \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS2 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS3 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS4 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS5 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS6 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS7 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS8 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS9 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS10 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS11 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS12 */ \
|
||||
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */
|
||||
|
||||
#define SERIAL_PORT_DFNS \
|
||||
STD_SERIAL_PORT_DEFNS \
|
||||
EXTRA_SERIAL_PORT_DEFNS
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ struct cpu_context_save {
|
|||
*/
|
||||
struct thread_info {
|
||||
unsigned long flags; /* low level flags */
|
||||
__s32 preempt_count; /* 0 => preemptable, <0 => bug */
|
||||
int preempt_count; /* 0 => preemptable, <0 => bug */
|
||||
mm_segment_t addr_limit; /* address limit */
|
||||
struct task_struct *task; /* main task structure */
|
||||
struct exec_domain *exec_domain; /* execution domain */
|
||||
|
|
|
|||
7
include/asm-cris/arch-v10/atomic.h
Normal file
7
include/asm-cris/arch-v10/atomic.h
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#ifndef __ASM_CRIS_ARCH_ATOMIC__
|
||||
#define __ASM_CRIS_ARCH_ATOMIC__
|
||||
|
||||
#define cris_atomic_save(addr, flags) local_irq_save(flags);
|
||||
#define cris_atomic_restore(addr, flags) local_irq_restore(flags);
|
||||
|
||||
#endif
|
||||
|
|
@ -51,7 +51,7 @@ extern inline unsigned long ffz(unsigned long w)
|
|||
*
|
||||
* Undefined if no bit exists, so code should check against 0 first.
|
||||
*/
|
||||
extern __inline__ unsigned long __ffs(unsigned long word)
|
||||
extern inline unsigned long __ffs(unsigned long word)
|
||||
{
|
||||
return cris_swapnwbrlz(~word);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,3 +44,31 @@
|
|||
#define USB_RX_DMA_NBR 9
|
||||
|
||||
#endif
|
||||
|
||||
enum dma_owner
|
||||
{
|
||||
dma_eth,
|
||||
dma_ser0,
|
||||
dma_ser1, /* Async and sync */
|
||||
dma_ser2,
|
||||
dma_ser3, /* Async and sync */
|
||||
dma_ata,
|
||||
dma_par0,
|
||||
dma_par1,
|
||||
dma_ext0,
|
||||
dma_ext1,
|
||||
dma_int6,
|
||||
dma_int7,
|
||||
dma_usb,
|
||||
dma_scsi0,
|
||||
dma_scsi1
|
||||
};
|
||||
|
||||
/* Masks used by cris_request_dma options: */
|
||||
#define DMA_VERBOSE_ON_ERROR (1<<0)
|
||||
#define DMA_PANIC_ON_ERROR ((1<<1)|DMA_VERBOSE_ON_ERROR)
|
||||
|
||||
int cris_request_dma(unsigned int dmanr, const char * device_id,
|
||||
unsigned options, enum dma_owner owner);
|
||||
|
||||
void cris_free_dma(unsigned int dmanr, const char * device_id);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue