Merge branch 'next' (accumulated 3.16 merge window patches) into master
Now that 3.15 is released, this merges the 'next' branch into 'master', bringing us to the normal situation where my 'master' branch is the merge window. * accumulated work in next: (6809 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
This commit is contained in:
+1
-3
@@ -62,8 +62,6 @@
|
||||
#include <acpi/acrestyp.h> /* Resource Descriptor structs */
|
||||
#include <acpi/acpiosxf.h> /* OSL interfaces (ACPICA-to-OS) */
|
||||
#include <acpi/acpixf.h> /* ACPI core subsystem external interfaces */
|
||||
#ifdef ACPI_NATIVE_INTERFACE_HEADER
|
||||
#include ACPI_NATIVE_INTERFACE_HEADER
|
||||
#endif
|
||||
#include <acpi/platform/acenvex.h> /* Extra environment-specific items */
|
||||
|
||||
#endif /* __ACPI_H__ */
|
||||
|
||||
@@ -131,6 +131,7 @@ static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile(
|
||||
struct acpi_scan_handler {
|
||||
const struct acpi_device_id *ids;
|
||||
struct list_head list_node;
|
||||
bool (*match)(char *idstr, const struct acpi_device_id **matchid);
|
||||
int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id);
|
||||
void (*detach)(struct acpi_device *dev);
|
||||
void (*bind)(struct device *phys_dev);
|
||||
@@ -232,7 +233,8 @@ struct acpi_hardware_id {
|
||||
struct acpi_pnp_type {
|
||||
u32 hardware_id:1;
|
||||
u32 bus_address:1;
|
||||
u32 reserved:30;
|
||||
u32 platform_id:1;
|
||||
u32 reserved:29;
|
||||
};
|
||||
|
||||
struct acpi_device_pnp {
|
||||
@@ -261,7 +263,8 @@ struct acpi_device_power_flags {
|
||||
u32 inrush_current:1; /* Serialize Dx->D0 */
|
||||
u32 power_removed:1; /* Optimize Dx->D0 */
|
||||
u32 ignore_parent:1; /* Power is independent of parent power state */
|
||||
u32 reserved:27;
|
||||
u32 dsw_present:1; /* _DSW present? */
|
||||
u32 reserved:26;
|
||||
};
|
||||
|
||||
struct acpi_device_power_state {
|
||||
@@ -406,6 +409,8 @@ extern struct kobject *acpi_kobj;
|
||||
extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int);
|
||||
void acpi_bus_private_data_handler(acpi_handle, void *);
|
||||
int acpi_bus_get_private_data(acpi_handle, void **);
|
||||
int acpi_bus_attach_private_data(acpi_handle, void *);
|
||||
void acpi_bus_detach_private_data(acpi_handle);
|
||||
void acpi_bus_no_hotplug(acpi_handle handle);
|
||||
extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32);
|
||||
extern int register_acpi_notifier(struct notifier_block *);
|
||||
|
||||
@@ -96,7 +96,12 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle);
|
||||
/* Arch-defined function to add a bus to the system */
|
||||
|
||||
struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root);
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
void pci_acpi_crs_quirks(void);
|
||||
#else
|
||||
static inline void pci_acpi_crs_quirks(void) { }
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
Processor
|
||||
|
||||
@@ -9,6 +9,9 @@ static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
|
||||
return ioremap_cache(phys, size);
|
||||
}
|
||||
|
||||
void __iomem *__init_refok
|
||||
acpi_os_map_iomem(acpi_physical_address phys, acpi_size size);
|
||||
void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size);
|
||||
void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size);
|
||||
|
||||
int acpi_os_map_generic_address(struct acpi_generic_address *addr);
|
||||
|
||||
+565
-271
@@ -46,7 +46,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20140214
|
||||
#define ACPI_CA_VERSION 0x20140424
|
||||
|
||||
#include <acpi/acconfig.h>
|
||||
#include <acpi/actypes.h>
|
||||
@@ -55,50 +55,239 @@
|
||||
|
||||
extern u8 acpi_gbl_permanent_mmap;
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Macros used for ACPICA globals and configuration
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Globals that are publically available
|
||||
* Ensure that global variables are defined and initialized only once.
|
||||
*
|
||||
* The use of these macros allows for a single list of globals (here)
|
||||
* in order to simplify maintenance of the code.
|
||||
*/
|
||||
extern u32 acpi_current_gpe_count;
|
||||
extern struct acpi_table_fadt acpi_gbl_FADT;
|
||||
extern u8 acpi_gbl_system_awake_and_running;
|
||||
extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */
|
||||
extern u8 acpi_gbl_osi_data;
|
||||
#ifdef DEFINE_ACPI_GLOBALS
|
||||
#define ACPI_GLOBAL(type,name) \
|
||||
extern type name; \
|
||||
type name
|
||||
|
||||
/* Runtime configuration of debug print levels */
|
||||
#define ACPI_INIT_GLOBAL(type,name,value) \
|
||||
type name=value
|
||||
|
||||
extern u32 acpi_dbg_level;
|
||||
extern u32 acpi_dbg_layer;
|
||||
#else
|
||||
#ifndef ACPI_GLOBAL
|
||||
#define ACPI_GLOBAL(type,name) \
|
||||
extern type name
|
||||
#endif
|
||||
|
||||
/* ACPICA runtime options */
|
||||
|
||||
extern u8 acpi_gbl_auto_serialize_methods;
|
||||
extern u8 acpi_gbl_copy_dsdt_locally;
|
||||
extern u8 acpi_gbl_create_osi_method;
|
||||
extern u8 acpi_gbl_disable_auto_repair;
|
||||
extern u8 acpi_gbl_disable_ssdt_table_load;
|
||||
extern u8 acpi_gbl_do_not_use_xsdt;
|
||||
extern u8 acpi_gbl_enable_aml_debug_object;
|
||||
extern u8 acpi_gbl_enable_interpreter_slack;
|
||||
extern u32 acpi_gbl_trace_flags;
|
||||
extern acpi_name acpi_gbl_trace_method_name;
|
||||
extern u8 acpi_gbl_truncate_io_addresses;
|
||||
extern u8 acpi_gbl_use32_bit_fadt_addresses;
|
||||
extern u8 acpi_gbl_use_default_register_widths;
|
||||
#ifndef ACPI_INIT_GLOBAL
|
||||
#define ACPI_INIT_GLOBAL(type,name,value) \
|
||||
extern type name
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hardware-reduced prototypes. All interfaces that use these macros will
|
||||
* be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
|
||||
* These macros configure the various ACPICA interfaces. They are
|
||||
* useful for generating stub inline functions for features that are
|
||||
* configured out of the current kernel or ACPICA application.
|
||||
*/
|
||||
#ifndef ACPI_EXTERNAL_RETURN_STATUS
|
||||
#define ACPI_EXTERNAL_RETURN_STATUS(prototype) \
|
||||
prototype;
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_EXTERNAL_RETURN_OK
|
||||
#define ACPI_EXTERNAL_RETURN_OK(prototype) \
|
||||
prototype;
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_EXTERNAL_RETURN_VOID
|
||||
#define ACPI_EXTERNAL_RETURN_VOID(prototype) \
|
||||
prototype;
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_EXTERNAL_RETURN_UINT32
|
||||
#define ACPI_EXTERNAL_RETURN_UINT32(prototype) \
|
||||
prototype;
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_EXTERNAL_RETURN_PTR
|
||||
#define ACPI_EXTERNAL_RETURN_PTR(prototype) \
|
||||
prototype;
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Public globals and runtime configuration options
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Enable "slack mode" of the AML interpreter? Default is FALSE, and the
|
||||
* interpreter strictly follows the ACPI specification. Setting to TRUE
|
||||
* allows the interpreter to ignore certain errors and/or bad AML constructs.
|
||||
*
|
||||
* Currently, these features are enabled by this flag:
|
||||
*
|
||||
* 1) Allow "implicit return" of last value in a control method
|
||||
* 2) Allow access beyond the end of an operation region
|
||||
* 3) Allow access to uninitialized locals/args (auto-init to integer 0)
|
||||
* 4) Allow ANY object type to be a source operand for the Store() operator
|
||||
* 5) Allow unresolved references (invalid target name) in package objects
|
||||
* 6) Enable warning messages for behavior that is not ACPI spec compliant
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
|
||||
|
||||
/*
|
||||
* Automatically serialize all methods that create named objects? Default
|
||||
* is TRUE, meaning that all non_serialized methods are scanned once at
|
||||
* table load time to determine those that create named objects. Methods
|
||||
* that create named objects are marked Serialized in order to prevent
|
||||
* possible run-time problems if they are entered by more than one thread.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE);
|
||||
|
||||
/*
|
||||
* Create the predefined _OSI method in the namespace? Default is TRUE
|
||||
* because ACPICA is fully compatible with other ACPI implementations.
|
||||
* Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
|
||||
|
||||
/*
|
||||
* Optionally use default values for the ACPI register widths. Set this to
|
||||
* TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
|
||||
|
||||
/*
|
||||
* Whether or not to verify the table checksum before installation. Set
|
||||
* this to TRUE to verify the table checksum before install it to the table
|
||||
* manager. Note that enabling this option causes errors to happen in some
|
||||
* OSPMs during early initialization stages. Default behavior is to do such
|
||||
* verification.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_verify_table_checksum, TRUE);
|
||||
|
||||
/*
|
||||
* Optionally enable output from the AML Debug Object.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
|
||||
|
||||
/*
|
||||
* Optionally copy the entire DSDT to local memory (instead of simply
|
||||
* mapping it.) There are some BIOSs that corrupt or replace the original
|
||||
* DSDT, creating the need for this option. Default is FALSE, do not copy
|
||||
* the DSDT.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
|
||||
|
||||
/*
|
||||
* Optionally ignore an XSDT if present and use the RSDT instead.
|
||||
* Although the ACPI specification requires that an XSDT be used instead
|
||||
* of the RSDT, the XSDT has been found to be corrupt or ill-formed on
|
||||
* some machines. Default behavior is to use the XSDT if present.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
|
||||
|
||||
/*
|
||||
* Optionally use 32-bit FADT addresses if and when there is a conflict
|
||||
* (address mismatch) between the 32-bit and 64-bit versions of the
|
||||
* address. Although ACPICA adheres to the ACPI specification which
|
||||
* requires the use of the corresponding 64-bit address if it is non-zero,
|
||||
* some machines have been found to have a corrupted non-zero 64-bit
|
||||
* address. Default is TRUE, favor the 32-bit addresses.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, TRUE);
|
||||
|
||||
/*
|
||||
* Optionally truncate I/O addresses to 16 bits. Provides compatibility
|
||||
* with other ACPI implementations. NOTE: During ACPICA initialization,
|
||||
* this value is set to TRUE if any Windows OSI strings have been
|
||||
* requested by the BIOS.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
|
||||
|
||||
/*
|
||||
* Disable runtime checking and repair of values returned by control methods.
|
||||
* Use only if the repair is causing a problem on a particular machine.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
|
||||
|
||||
/*
|
||||
* Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
|
||||
* This can be useful for debugging ACPI problems on some machines.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
|
||||
|
||||
/*
|
||||
* We keep track of the latest version of Windows that has been requested by
|
||||
* the BIOS. ACPI 5.0.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
|
||||
|
||||
/*
|
||||
* ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
|
||||
* that the ACPI hardware is no longer required. A flag in the FADT indicates
|
||||
* a reduced HW machine, and that flag is duplicated here for convenience.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
|
||||
|
||||
/*
|
||||
* This mechanism is used to trace a specified AML method. The method is
|
||||
* traced each time it is executed.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0);
|
||||
ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0);
|
||||
|
||||
/*
|
||||
* Runtime configuration of debug output control masks. We want the debug
|
||||
* switches statically initialized so they are already set when the debugger
|
||||
* is entered.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT);
|
||||
ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0);
|
||||
|
||||
/*
|
||||
* Other miscellaneous globals
|
||||
*/
|
||||
ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT);
|
||||
ACPI_GLOBAL(u32, acpi_current_gpe_count);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ACPICA public interface configuration.
|
||||
*
|
||||
* Interfaces that are configured out of the ACPICA build are replaced
|
||||
* by inlined stubs by default.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Hardware-reduced prototypes (default: Not hardware reduced).
|
||||
*
|
||||
* All ACPICA hardware-related interfaces that use these macros will be
|
||||
* configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
|
||||
* is set to TRUE.
|
||||
*
|
||||
* Note: This static build option for reduced hardware is intended to
|
||||
* reduce ACPICA code size if desired or necessary. However, even if this
|
||||
* option is not specified, the runtime behavior of ACPICA is dependent
|
||||
* on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
|
||||
* the flag will enable similar behavior -- ACPICA will not attempt
|
||||
* to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
|
||||
*/
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
|
||||
prototype;
|
||||
ACPI_EXTERNAL_RETURN_STATUS(prototype)
|
||||
|
||||
#define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
|
||||
prototype;
|
||||
ACPI_EXTERNAL_RETURN_OK(prototype)
|
||||
|
||||
#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
|
||||
prototype;
|
||||
ACPI_EXTERNAL_RETURN_VOID(prototype)
|
||||
|
||||
#else
|
||||
#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
|
||||
@@ -112,20 +301,61 @@ extern u8 acpi_gbl_use_default_register_widths;
|
||||
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
||||
/*
|
||||
* Error message prototypes (default: error messages enabled).
|
||||
*
|
||||
* All interfaces related to error and warning messages
|
||||
* will be configured out of the ACPICA build if the
|
||||
* ACPI_NO_ERROR_MESSAGE flag is defined.
|
||||
*/
|
||||
#ifndef ACPI_NO_ERROR_MESSAGES
|
||||
#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
|
||||
prototype;
|
||||
|
||||
#else
|
||||
#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
|
||||
static ACPI_INLINE prototype {return;}
|
||||
|
||||
#endif /* ACPI_NO_ERROR_MESSAGES */
|
||||
|
||||
/*
|
||||
* Debugging output prototypes (default: no debug output).
|
||||
*
|
||||
* All interfaces related to debug output messages
|
||||
* will be configured out of the ACPICA build unless the
|
||||
* ACPI_DEBUG_OUTPUT flag is defined.
|
||||
*/
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
|
||||
prototype;
|
||||
|
||||
#else
|
||||
#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
|
||||
static ACPI_INLINE prototype {return;}
|
||||
|
||||
#endif /* ACPI_DEBUG_OUTPUT */
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ACPICA public interface prototypes
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Initialization
|
||||
*/
|
||||
acpi_status __init
|
||||
acpi_initialize_tables(struct acpi_table_desc *initial_storage,
|
||||
u32 initial_table_count, u8 allow_resize);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
|
||||
acpi_initialize_tables(struct acpi_table_desc
|
||||
*initial_storage,
|
||||
u32 initial_table_count,
|
||||
u8 allow_resize))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_initialize_subsystem(void))
|
||||
|
||||
acpi_status __init acpi_initialize_subsystem(void);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_enable_subsystem(u32 flags))
|
||||
|
||||
acpi_status __init acpi_enable_subsystem(u32 flags);
|
||||
|
||||
acpi_status __init acpi_initialize_objects(u32 flags);
|
||||
|
||||
acpi_status __init acpi_terminate(void);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
|
||||
acpi_initialize_objects(u32 flags))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_terminate(void))
|
||||
|
||||
/*
|
||||
* Miscellaneous global interfaces
|
||||
@@ -133,155 +363,170 @@ acpi_status __init acpi_terminate(void);
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status acpi_subsystem_status(void);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_subsystem_status(void))
|
||||
#endif
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_system_info(struct acpi_buffer
|
||||
*ret_buffer))
|
||||
#endif
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_statistics(struct acpi_statistics *stats))
|
||||
ACPI_EXTERNAL_RETURN_PTR(const char
|
||||
*acpi_format_exception(acpi_status exception))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_purge_cached_objects(void))
|
||||
|
||||
acpi_status acpi_get_statistics(struct acpi_statistics *stats);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_install_interface(acpi_string interface_name))
|
||||
|
||||
const char *acpi_format_exception(acpi_status exception);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_remove_interface(acpi_string interface_name))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_update_interfaces(u8 action))
|
||||
|
||||
acpi_status acpi_purge_cached_objects(void);
|
||||
|
||||
acpi_status acpi_install_interface(acpi_string interface_name);
|
||||
|
||||
acpi_status acpi_remove_interface(acpi_string interface_name);
|
||||
|
||||
acpi_status acpi_update_interfaces(u8 action);
|
||||
|
||||
u32
|
||||
acpi_check_address_range(acpi_adr_space_type space_id,
|
||||
acpi_physical_address address,
|
||||
acpi_size length, u8 warn);
|
||||
|
||||
acpi_status
|
||||
acpi_decode_pld_buffer(u8 *in_buffer,
|
||||
acpi_size length, struct acpi_pld_info **return_buffer);
|
||||
ACPI_EXTERNAL_RETURN_UINT32(u32
|
||||
acpi_check_address_range(acpi_adr_space_type
|
||||
space_id,
|
||||
acpi_physical_address
|
||||
address, acpi_size length,
|
||||
u8 warn))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_decode_pld_buffer(u8 *in_buffer,
|
||||
acpi_size length,
|
||||
struct acpi_pld_info
|
||||
**return_buffer))
|
||||
|
||||
/*
|
||||
* ACPI table load/unload interfaces
|
||||
*/
|
||||
acpi_status acpi_load_table(struct acpi_table_header *table);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
|
||||
acpi_install_table(acpi_physical_address address,
|
||||
u8 physical))
|
||||
|
||||
acpi_status acpi_unload_parent_table(acpi_handle object);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_load_table(struct acpi_table_header *table))
|
||||
|
||||
acpi_status __init acpi_load_tables(void);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_unload_parent_table(acpi_handle object))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
|
||||
|
||||
/*
|
||||
* ACPI table manipulation interfaces
|
||||
*/
|
||||
acpi_status __init acpi_reallocate_root_table(void);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
|
||||
|
||||
acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
|
||||
acpi_find_root_pointer(acpi_size * rsdp_address))
|
||||
|
||||
acpi_status acpi_unload_table_id(acpi_owner_id id);
|
||||
|
||||
acpi_status
|
||||
acpi_get_table_header(acpi_string signature,
|
||||
u32 instance, struct acpi_table_header *out_table_header);
|
||||
|
||||
acpi_status
|
||||
acpi_get_table_with_size(acpi_string signature,
|
||||
u32 instance, struct acpi_table_header **out_table,
|
||||
acpi_size *tbl_size);
|
||||
|
||||
acpi_status
|
||||
acpi_get_table(acpi_string signature,
|
||||
u32 instance, struct acpi_table_header **out_table);
|
||||
|
||||
acpi_status
|
||||
acpi_get_table_by_index(u32 table_index, struct acpi_table_header **out_table);
|
||||
|
||||
acpi_status
|
||||
acpi_install_table_handler(acpi_table_handler handler, void *context);
|
||||
|
||||
acpi_status acpi_remove_table_handler(acpi_table_handler handler);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_table_header(acpi_string signature,
|
||||
u32 instance,
|
||||
struct acpi_table_header
|
||||
*out_table_header))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_table(acpi_string signature, u32 instance,
|
||||
struct acpi_table_header
|
||||
**out_table))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_table_by_index(u32 table_index,
|
||||
struct acpi_table_header
|
||||
**out_table))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_install_table_handler(acpi_table_handler
|
||||
handler, void *context))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_remove_table_handler(acpi_table_handler
|
||||
handler))
|
||||
|
||||
/*
|
||||
* Namespace and name interfaces
|
||||
*/
|
||||
acpi_status
|
||||
acpi_walk_namespace(acpi_object_type type,
|
||||
acpi_handle start_object,
|
||||
u32 max_depth,
|
||||
acpi_walk_callback descending_callback,
|
||||
acpi_walk_callback ascending_callback,
|
||||
void *context, void **return_value);
|
||||
|
||||
acpi_status
|
||||
acpi_get_devices(const char *HID,
|
||||
acpi_walk_callback user_function,
|
||||
void *context, void **return_value);
|
||||
|
||||
acpi_status
|
||||
acpi_get_name(acpi_handle object,
|
||||
u32 name_type, struct acpi_buffer *ret_path_ptr);
|
||||
|
||||
acpi_status
|
||||
acpi_get_handle(acpi_handle parent,
|
||||
acpi_string pathname, acpi_handle * ret_handle);
|
||||
|
||||
acpi_status
|
||||
acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data);
|
||||
|
||||
acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler);
|
||||
|
||||
acpi_status
|
||||
acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
|
||||
void (*callback)(void *));
|
||||
|
||||
acpi_status
|
||||
acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data);
|
||||
|
||||
acpi_status
|
||||
acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_walk_namespace(acpi_object_type type,
|
||||
acpi_handle start_object,
|
||||
u32 max_depth,
|
||||
acpi_walk_callback
|
||||
descending_callback,
|
||||
acpi_walk_callback
|
||||
ascending_callback,
|
||||
void *context,
|
||||
void **return_value))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_devices(const char *HID,
|
||||
acpi_walk_callback user_function,
|
||||
void *context,
|
||||
void **return_value))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_name(acpi_handle object, u32 name_type,
|
||||
struct acpi_buffer *ret_path_ptr))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_handle(acpi_handle parent,
|
||||
acpi_string pathname,
|
||||
acpi_handle * ret_handle))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_attach_data(acpi_handle object,
|
||||
acpi_object_handler handler,
|
||||
void *data))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_detach_data(acpi_handle object,
|
||||
acpi_object_handler handler))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_data(acpi_handle object,
|
||||
acpi_object_handler handler,
|
||||
void **data))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_debug_trace(char *name, u32 debug_level,
|
||||
u32 debug_layer, u32 flags))
|
||||
|
||||
/*
|
||||
* Object manipulation and enumeration
|
||||
*/
|
||||
acpi_status
|
||||
acpi_evaluate_object(acpi_handle object,
|
||||
acpi_string pathname,
|
||||
struct acpi_object_list *parameter_objects,
|
||||
struct acpi_buffer *return_object_buffer);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_evaluate_object(acpi_handle object,
|
||||
acpi_string pathname,
|
||||
struct acpi_object_list
|
||||
*parameter_objects,
|
||||
struct acpi_buffer
|
||||
*return_object_buffer))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_evaluate_object_typed(acpi_handle object,
|
||||
acpi_string pathname,
|
||||
struct acpi_object_list
|
||||
*external_params,
|
||||
struct acpi_buffer
|
||||
*return_buffer,
|
||||
acpi_object_type
|
||||
return_type))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_object_info(acpi_handle object,
|
||||
struct acpi_device_info
|
||||
**return_buffer))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_install_method(u8 *buffer))
|
||||
|
||||
acpi_status
|
||||
acpi_evaluate_object_typed(acpi_handle object,
|
||||
acpi_string pathname,
|
||||
struct acpi_object_list *external_params,
|
||||
struct acpi_buffer *return_buffer,
|
||||
acpi_object_type return_type);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_next_object(acpi_object_type type,
|
||||
acpi_handle parent,
|
||||
acpi_handle child,
|
||||
acpi_handle * out_handle))
|
||||
|
||||
acpi_status
|
||||
acpi_get_object_info(acpi_handle object,
|
||||
struct acpi_device_info **return_buffer);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_type(acpi_handle object,
|
||||
acpi_object_type * out_type))
|
||||
|
||||
acpi_status acpi_install_method(u8 *buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_get_next_object(acpi_object_type type,
|
||||
acpi_handle parent,
|
||||
acpi_handle child, acpi_handle * out_handle);
|
||||
|
||||
acpi_status acpi_get_type(acpi_handle object, acpi_object_type * out_type);
|
||||
|
||||
acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
|
||||
|
||||
acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_parent(acpi_handle object,
|
||||
acpi_handle * out_handle))
|
||||
|
||||
/*
|
||||
* Handler interfaces
|
||||
*/
|
||||
acpi_status
|
||||
acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_install_initialization_handler
|
||||
(acpi_init_handler handler, u32 function))
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
acpi_install_sci_handler(acpi_sci_handler
|
||||
address,
|
||||
void *context))
|
||||
acpi_install_sci_handler(acpi_sci_handler
|
||||
address,
|
||||
void *context))
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
acpi_remove_sci_handler(acpi_sci_handler
|
||||
address))
|
||||
@@ -313,30 +558,42 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
u32 gpe_number,
|
||||
acpi_gpe_handler
|
||||
address))
|
||||
acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type,
|
||||
acpi_notify_handler handler,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_remove_notify_handler(acpi_handle device,
|
||||
u32 handler_type, acpi_notify_handler handler);
|
||||
|
||||
acpi_status
|
||||
acpi_install_address_space_handler(acpi_handle device,
|
||||
acpi_adr_space_type space_id,
|
||||
acpi_adr_space_handler handler,
|
||||
acpi_adr_space_setup setup, void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_remove_address_space_handler(acpi_handle device,
|
||||
acpi_adr_space_type space_id,
|
||||
acpi_adr_space_handler handler);
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_install_notify_handler(acpi_handle device,
|
||||
u32 handler_type,
|
||||
acpi_notify_handler
|
||||
handler,
|
||||
void *context))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_remove_notify_handler(acpi_handle device,
|
||||
u32 handler_type,
|
||||
acpi_notify_handler
|
||||
handler))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_install_address_space_handler(acpi_handle
|
||||
device,
|
||||
acpi_adr_space_type
|
||||
space_id,
|
||||
acpi_adr_space_handler
|
||||
handler,
|
||||
acpi_adr_space_setup
|
||||
setup,
|
||||
void *context))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_remove_address_space_handler(acpi_handle
|
||||
device,
|
||||
acpi_adr_space_type
|
||||
space_id,
|
||||
acpi_adr_space_handler
|
||||
handler))
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status acpi_install_exception_handler(acpi_exception_handler handler);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_install_exception_handler
|
||||
(acpi_exception_handler handler))
|
||||
#endif
|
||||
|
||||
acpi_status acpi_install_interface_handler(acpi_interface_handler handler);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_install_interface_handler
|
||||
(acpi_interface_handler handler))
|
||||
|
||||
/*
|
||||
* Global Lock interfaces
|
||||
@@ -351,10 +608,14 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
/*
|
||||
* Interfaces to AML mutex objects
|
||||
*/
|
||||
acpi_status
|
||||
acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_acquire_mutex(acpi_handle handle,
|
||||
acpi_string pathname,
|
||||
u16 timeout))
|
||||
|
||||
acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_release_mutex(acpi_handle handle,
|
||||
acpi_string pathname))
|
||||
|
||||
/*
|
||||
* Fixed Event interfaces
|
||||
@@ -434,57 +695,69 @@ typedef
|
||||
acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_get_vendor_resource(acpi_handle device,
|
||||
char *name,
|
||||
struct acpi_vendor_uuid *uuid,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_get_current_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_vendor_resource(acpi_handle device,
|
||||
char *name,
|
||||
struct acpi_vendor_uuid
|
||||
*uuid,
|
||||
struct acpi_buffer
|
||||
*ret_buffer))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_current_resources(acpi_handle device,
|
||||
struct acpi_buffer
|
||||
*ret_buffer))
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_possible_resources(acpi_handle device,
|
||||
struct acpi_buffer
|
||||
*ret_buffer))
|
||||
#endif
|
||||
|
||||
acpi_status
|
||||
acpi_get_event_resources(acpi_handle device_handle,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_walk_resource_buffer(struct acpi_buffer *buffer,
|
||||
acpi_walk_resource_callback user_function,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_walk_resources(acpi_handle device,
|
||||
char *name,
|
||||
acpi_walk_resource_callback user_function, void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_set_current_resources(acpi_handle device, struct acpi_buffer *in_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_get_irq_routing_table(acpi_handle device, struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_resource_to_address64(struct acpi_resource *resource,
|
||||
struct acpi_resource_address64 *out);
|
||||
|
||||
acpi_status
|
||||
acpi_buffer_to_resource(u8 *aml_buffer,
|
||||
u16 aml_buffer_length,
|
||||
struct acpi_resource **resource_ptr);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_event_resources(acpi_handle device_handle,
|
||||
struct acpi_buffer
|
||||
*ret_buffer))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_walk_resource_buffer(struct acpi_buffer
|
||||
*buffer,
|
||||
acpi_walk_resource_callback
|
||||
user_function,
|
||||
void *context))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_walk_resources(acpi_handle device, char *name,
|
||||
acpi_walk_resource_callback
|
||||
user_function, void *context))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_set_current_resources(acpi_handle device,
|
||||
struct acpi_buffer
|
||||
*in_buffer))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_irq_routing_table(acpi_handle device,
|
||||
struct acpi_buffer
|
||||
*ret_buffer))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_resource_to_address64(struct acpi_resource
|
||||
*resource,
|
||||
struct
|
||||
acpi_resource_address64
|
||||
*out))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_buffer_to_resource(u8 *aml_buffer,
|
||||
u16 aml_buffer_length,
|
||||
struct acpi_resource
|
||||
**resource_ptr))
|
||||
|
||||
/*
|
||||
* Hardware (ACPI device) interfaces
|
||||
*/
|
||||
acpi_status acpi_reset(void);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_reset(void))
|
||||
|
||||
acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_read(u64 *value,
|
||||
struct acpi_generic_address *reg))
|
||||
|
||||
acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_write(u64 value,
|
||||
struct acpi_generic_address *reg))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
acpi_read_bit_register(u32 register_id,
|
||||
@@ -497,18 +770,20 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
/*
|
||||
* Sleep/Wake interfaces
|
||||
*/
|
||||
acpi_status
|
||||
acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_get_sleep_type_data(u8 sleep_state,
|
||||
u8 *slp_typ_a,
|
||||
u8 *slp_typ_b))
|
||||
|
||||
acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
|
||||
|
||||
acpi_status acpi_enter_sleep_state(u8 sleep_state);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_enter_sleep_state_prep(u8 sleep_state))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_enter_sleep_state(u8 sleep_state))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
|
||||
|
||||
acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
|
||||
|
||||
acpi_status acpi_leave_sleep_state(u8 sleep_state);
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||
acpi_leave_sleep_state_prep(u8 sleep_state))
|
||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_leave_sleep_state(u8 sleep_state))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
acpi_set_firmware_waking_vector(u32
|
||||
@@ -535,53 +810,72 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
/*
|
||||
* Error/Warning output
|
||||
*/
|
||||
ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_error(const char *module_name, u32 line_number, const char *format, ...);
|
||||
|
||||
ACPI_PRINTF_LIKE(4)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_exception(const char *module_name,
|
||||
u32 line_number, acpi_status status, const char *format, ...);
|
||||
|
||||
ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_warning(const char *module_name, u32 line_number, const char *format, ...);
|
||||
|
||||
ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_info(const char *module_name, u32 line_number, const char *format, ...);
|
||||
|
||||
ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_bios_error(const char *module_name,
|
||||
u32 line_number, const char *format, ...);
|
||||
|
||||
ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_bios_warning(const char *module_name,
|
||||
u32 line_number, const char *format, ...);
|
||||
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_error(const char *module_name,
|
||||
u32 line_number,
|
||||
const char *format, ...))
|
||||
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_exception(const char *module_name,
|
||||
u32 line_number,
|
||||
acpi_status status,
|
||||
const char *format, ...))
|
||||
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_warning(const char *module_name,
|
||||
u32 line_number,
|
||||
const char *format, ...))
|
||||
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_info(const char *module_name,
|
||||
u32 line_number,
|
||||
const char *format, ...))
|
||||
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_bios_error(const char *module_name,
|
||||
u32 line_number,
|
||||
const char *format, ...))
|
||||
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_bios_warning(const char *module_name,
|
||||
u32 line_number,
|
||||
const char *format, ...))
|
||||
|
||||
/*
|
||||
* Debug output
|
||||
*/
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_debug_print(u32 requested_debug_level,
|
||||
u32 line_number,
|
||||
const char *function_name,
|
||||
const char *module_name,
|
||||
u32 component_id,
|
||||
const char *format, ...))
|
||||
ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_debug_print_raw(u32 requested_debug_level,
|
||||
u32 line_number,
|
||||
const char *function_name,
|
||||
const char *module_name,
|
||||
u32 component_id,
|
||||
const char *format, ...))
|
||||
|
||||
ACPI_PRINTF_LIKE(6)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_debug_print(u32 requested_debug_level,
|
||||
u32 line_number,
|
||||
const char *function_name,
|
||||
const char *module_name,
|
||||
u32 component_id, const char *format, ...);
|
||||
/*
|
||||
* Divergences
|
||||
*/
|
||||
acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
|
||||
|
||||
ACPI_PRINTF_LIKE(6)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_debug_print_raw(u32 requested_debug_level,
|
||||
u32 line_number,
|
||||
const char *function_name,
|
||||
const char *module_name,
|
||||
u32 component_id, const char *format, ...);
|
||||
#endif
|
||||
acpi_status acpi_unload_table_id(acpi_owner_id id);
|
||||
|
||||
acpi_status
|
||||
acpi_get_table_with_size(acpi_string signature,
|
||||
u32 instance, struct acpi_table_header **out_table,
|
||||
acpi_size *tbl_size);
|
||||
|
||||
acpi_status
|
||||
acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
|
||||
void (*callback)(void *));
|
||||
|
||||
#endif /* __ACXFACE_H__ */
|
||||
|
||||
@@ -367,12 +367,11 @@ struct acpi_table_desc {
|
||||
|
||||
/* Masks for Flags field above */
|
||||
|
||||
#define ACPI_TABLE_ORIGIN_UNKNOWN (0)
|
||||
#define ACPI_TABLE_ORIGIN_MAPPED (1)
|
||||
#define ACPI_TABLE_ORIGIN_ALLOCATED (2)
|
||||
#define ACPI_TABLE_ORIGIN_OVERRIDE (4)
|
||||
#define ACPI_TABLE_ORIGIN_MASK (7)
|
||||
#define ACPI_TABLE_IS_LOADED (8)
|
||||
#define ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL (0) /* Virtual address, external maintained */
|
||||
#define ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL (1) /* Physical address, internally mapped */
|
||||
#define ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL (2) /* Virtual address, internallly allocated */
|
||||
#define ACPI_TABLE_ORIGIN_MASK (3)
|
||||
#define ACPI_TABLE_IS_LOADED (8)
|
||||
|
||||
/*
|
||||
* Get the remaining ACPI tables
|
||||
|
||||
@@ -675,7 +675,7 @@ enum acpi_madt_type {
|
||||
};
|
||||
|
||||
/*
|
||||
* MADT Sub-tables, correspond to Type in struct acpi_subtable_header
|
||||
* MADT Subtables, correspond to Type in struct acpi_subtable_header
|
||||
*/
|
||||
|
||||
/* 0: Processor Local APIC */
|
||||
@@ -918,7 +918,7 @@ enum acpi_srat_type {
|
||||
};
|
||||
|
||||
/*
|
||||
* SRAT Sub-tables, correspond to Type in struct acpi_subtable_header
|
||||
* SRAT Subtables, correspond to Type in struct acpi_subtable_header
|
||||
*/
|
||||
|
||||
/* 0: Processor Local APIC/SAPIC Affinity */
|
||||
|
||||
+68
-3
@@ -70,6 +70,7 @@
|
||||
#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
|
||||
#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
|
||||
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
|
||||
#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
|
||||
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
|
||||
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
|
||||
#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
|
||||
@@ -456,7 +457,7 @@ struct acpi_dmar_pci_path {
|
||||
};
|
||||
|
||||
/*
|
||||
* DMAR Sub-tables, correspond to Type in struct acpi_dmar_header
|
||||
* DMAR Subtables, correspond to Type in struct acpi_dmar_header
|
||||
*/
|
||||
|
||||
/* 0: Hardware Unit Definition */
|
||||
@@ -820,7 +821,71 @@ struct acpi_ivrs_memory {
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* MCFG - PCI Memory Mapped Configuration table and sub-table
|
||||
* LPIT - Low Power Idle Table
|
||||
*
|
||||
* Conforms to "ACPI Low Power Idle Table (LPIT) and _LPD Proposal (DRAFT)"
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct acpi_table_lpit {
|
||||
struct acpi_table_header header; /* Common ACPI table header */
|
||||
};
|
||||
|
||||
/* LPIT subtable header */
|
||||
|
||||
struct acpi_lpit_header {
|
||||
u32 type; /* Subtable type */
|
||||
u32 length; /* Subtable length */
|
||||
u16 unique_id;
|
||||
u16 reserved;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
/* Values for subtable Type above */
|
||||
|
||||
enum acpi_lpit_type {
|
||||
ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
|
||||
ACPI_LPIT_TYPE_SIMPLE_IO = 0x01
|
||||
};
|
||||
|
||||
/* Masks for Flags field above */
|
||||
|
||||
#define ACPI_LPIT_STATE_DISABLED (1)
|
||||
#define ACPI_LPIT_NO_COUNTER (1<<1)
|
||||
|
||||
/*
|
||||
* LPIT subtables, correspond to Type in struct acpi_lpit_header
|
||||
*/
|
||||
|
||||
/* 0x00: Native C-state instruction based LPI structure */
|
||||
|
||||
struct acpi_lpit_native {
|
||||
struct acpi_lpit_header header;
|
||||
struct acpi_generic_address entry_trigger;
|
||||
u32 residency;
|
||||
u32 latency;
|
||||
struct acpi_generic_address residency_counter;
|
||||
u64 counter_frequency;
|
||||
};
|
||||
|
||||
/* 0x01: Simple I/O based LPI structure */
|
||||
|
||||
struct acpi_lpit_io {
|
||||
struct acpi_lpit_header header;
|
||||
struct acpi_generic_address entry_trigger;
|
||||
u32 trigger_action;
|
||||
u64 trigger_value;
|
||||
u64 trigger_mask;
|
||||
struct acpi_generic_address minimum_idle_state;
|
||||
u32 residency;
|
||||
u32 latency;
|
||||
struct acpi_generic_address residency_counter;
|
||||
u64 counter_frequency;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* MCFG - PCI Memory Mapped Configuration table and subtable
|
||||
* Version 1
|
||||
*
|
||||
* Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
|
||||
@@ -923,7 +988,7 @@ enum acpi_slic_type {
|
||||
};
|
||||
|
||||
/*
|
||||
* SLIC Sub-tables, correspond to Type in struct acpi_slic_header
|
||||
* SLIC Subtables, correspond to Type in struct acpi_slic_header
|
||||
*/
|
||||
|
||||
/* 0: Public Key Structure */
|
||||
|
||||
@@ -329,6 +329,15 @@ typedef u32 acpi_physical_address;
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifdef ACPI_NO_MEM_ALLOCATIONS
|
||||
|
||||
#define ACPI_ALLOCATE(a) NULL
|
||||
#define ACPI_ALLOCATE_ZEROED(a) NULL
|
||||
#define ACPI_FREE(a)
|
||||
#define ACPI_MEM_TRACKING(a)
|
||||
|
||||
#else /* ACPI_NO_MEM_ALLOCATIONS */
|
||||
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
/*
|
||||
* Memory allocation tracking (used by acpi_exec to detect memory leaks)
|
||||
@@ -350,6 +359,8 @@ typedef u32 acpi_physical_address;
|
||||
|
||||
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
|
||||
|
||||
#endif /* ACPI_NO_MEM_ALLOCATIONS */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* ACPI Specification constants (Do not change unless the specification changes)
|
||||
@@ -928,9 +939,19 @@ struct acpi_object_list {
|
||||
* Miscellaneous common Data Structures used by the interfaces
|
||||
*/
|
||||
#define ACPI_NO_BUFFER 0
|
||||
|
||||
#ifdef ACPI_NO_MEM_ALLOCATIONS
|
||||
|
||||
#define ACPI_ALLOCATE_BUFFER (acpi_size) (0)
|
||||
#define ACPI_ALLOCATE_LOCAL_BUFFER (acpi_size) (0)
|
||||
|
||||
#else /* ACPI_NO_MEM_ALLOCATIONS */
|
||||
|
||||
#define ACPI_ALLOCATE_BUFFER (acpi_size) (-1) /* Let ACPICA allocate buffer */
|
||||
#define ACPI_ALLOCATE_LOCAL_BUFFER (acpi_size) (-2) /* For internal use only (enables tracking) */
|
||||
|
||||
#endif /* ACPI_NO_MEM_ALLOCATIONS */
|
||||
|
||||
struct acpi_buffer {
|
||||
acpi_size length; /* Length in bytes of the buffer */
|
||||
void *pointer; /* pointer to buffer */
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acenvex.h - Extra host and compiler configuration
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* 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 __ACENVEX_H__
|
||||
#define __ACENVEX_H__
|
||||
|
||||
/*! [Begin] no source code translation */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Extra host configuration files. All ACPICA headers are included before
|
||||
* including these files.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#if defined(_LINUX) || defined(__linux__)
|
||||
#include <acpi/platform/aclinuxex.h>
|
||||
|
||||
#endif
|
||||
|
||||
/*! [End] no source code translation !*/
|
||||
|
||||
#endif /* __ACENVEX_H__ */
|
||||
@@ -64,4 +64,15 @@
|
||||
*/
|
||||
#define ACPI_UNUSED_VAR __attribute__ ((unused))
|
||||
|
||||
/*
|
||||
* Some versions of gcc implement strchr() with a buggy macro. So,
|
||||
* undef it here. Prevents error messages of this form (usually from the
|
||||
* file getopt.c):
|
||||
*
|
||||
* error: logical '&&' with non-zero constant will always evaluate as true
|
||||
*/
|
||||
#ifdef strchr
|
||||
#undef strchr
|
||||
#endif
|
||||
|
||||
#endif /* __ACGCC_H__ */
|
||||
|
||||
+69
-140
@@ -48,7 +48,6 @@
|
||||
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
#define ACPI_USE_DO_WHILE_0
|
||||
#define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
@@ -71,7 +70,38 @@
|
||||
#ifdef EXPORT_ACPI_INTERFACES
|
||||
#include <linux/export.h>
|
||||
#endif
|
||||
#include <asm/acpi.h>
|
||||
#include <asm/acenv.h>
|
||||
|
||||
#ifndef CONFIG_ACPI
|
||||
|
||||
/* External globals for __KERNEL__, stubs is needed */
|
||||
|
||||
#define ACPI_GLOBAL(t,a)
|
||||
#define ACPI_INIT_GLOBAL(t,a,b)
|
||||
|
||||
/* Generating stubs for configurable ACPICA macros */
|
||||
|
||||
#define ACPI_NO_MEM_ALLOCATIONS
|
||||
|
||||
/* Generating stubs for configurable ACPICA functions */
|
||||
|
||||
#define ACPI_NO_ERROR_MESSAGES
|
||||
#undef ACPI_DEBUG_OUTPUT
|
||||
|
||||
/* External interface for __KERNEL__, stub is needed */
|
||||
|
||||
#define ACPI_EXTERNAL_RETURN_STATUS(prototype) \
|
||||
static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
|
||||
#define ACPI_EXTERNAL_RETURN_OK(prototype) \
|
||||
static ACPI_INLINE prototype {return(AE_OK);}
|
||||
#define ACPI_EXTERNAL_RETURN_VOID(prototype) \
|
||||
static ACPI_INLINE prototype {return;}
|
||||
#define ACPI_EXTERNAL_RETURN_UINT32(prototype) \
|
||||
static ACPI_INLINE prototype {return(0);}
|
||||
#define ACPI_EXTERNAL_RETURN_PTR(prototype) \
|
||||
static ACPI_INLINE prototype {return(NULL);}
|
||||
|
||||
#endif /* CONFIG_ACPI */
|
||||
|
||||
/* Host-dependent types and defines for in-kernel ACPICA */
|
||||
|
||||
@@ -83,6 +113,40 @@
|
||||
#define acpi_spinlock spinlock_t *
|
||||
#define acpi_cpu_flags unsigned long
|
||||
|
||||
/* Use native linux version of acpi_os_allocate_zeroed */
|
||||
|
||||
#define USE_NATIVE_ALLOCATE_ZEROED
|
||||
|
||||
/*
|
||||
* Overrides for in-kernel ACPICA
|
||||
*/
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_initialize
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_terminate
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate_zeroed
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_free
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_object
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_thread_id
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock
|
||||
|
||||
/*
|
||||
* OSL interfaces used by debugger/disassembler
|
||||
*/
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_readable
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_writable
|
||||
|
||||
/*
|
||||
* OSL interfaces used by utilities
|
||||
*/
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_redirect_output
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_line
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_name
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_directory
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_next_filename
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_directory
|
||||
|
||||
#else /* !__KERNEL__ */
|
||||
|
||||
#include <stdarg.h>
|
||||
@@ -91,22 +155,19 @@
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Disable kernel specific declarators */
|
||||
/* Define/disable kernel-specific declarators */
|
||||
|
||||
#ifndef __init
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
#ifndef __iomem
|
||||
#define __iomem
|
||||
#endif
|
||||
|
||||
/* Host-dependent types and defines for user-space ACPICA */
|
||||
|
||||
#define ACPI_FLUSH_CPU_CACHE()
|
||||
#define ACPI_CAST_PTHREAD_T(pthread) ((acpi_thread_id) (pthread))
|
||||
|
||||
#if defined(__ia64__) || defined(__x86_64__) || defined(__aarch64__)
|
||||
#if defined(__ia64__) || defined(__x86_64__) ||\
|
||||
defined(__aarch64__) || defined(__PPC64__)
|
||||
#define ACPI_MACHINE_WIDTH 64
|
||||
#define COMPILER_DEPENDENT_INT64 long
|
||||
#define COMPILER_DEPENDENT_UINT64 unsigned long
|
||||
@@ -127,136 +188,4 @@
|
||||
|
||||
#include <acpi/platform/acgcc.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
* FIXME: Inclusion of actypes.h
|
||||
* Linux kernel need this before defining inline OSL interfaces as
|
||||
* actypes.h need to be included to find ACPICA type definitions.
|
||||
* Since from ACPICA's perspective, the actypes.h should be included after
|
||||
* acenv.h (aclinux.h), this leads to a inclusion mis-ordering issue.
|
||||
*/
|
||||
#include <acpi/actypes.h>
|
||||
|
||||
/*
|
||||
* Overrides for in-kernel ACPICA
|
||||
*/
|
||||
acpi_status __init acpi_os_initialize(void);
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_initialize
|
||||
|
||||
acpi_status acpi_os_terminate(void);
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_terminate
|
||||
|
||||
/*
|
||||
* Memory allocation/deallocation
|
||||
*/
|
||||
|
||||
/*
|
||||
* The irqs_disabled() check is for resume from RAM.
|
||||
* Interrupts are off during resume, just like they are for boot.
|
||||
* However, boot has (system_state != SYSTEM_RUNNING)
|
||||
* to quiet __might_sleep() in kmalloc() and resume does not.
|
||||
*/
|
||||
static inline void *acpi_os_allocate(acpi_size size)
|
||||
{
|
||||
return kmalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
|
||||
}
|
||||
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate
|
||||
|
||||
/* Use native linux version of acpi_os_allocate_zeroed */
|
||||
|
||||
static inline void *acpi_os_allocate_zeroed(acpi_size size)
|
||||
{
|
||||
return kzalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
|
||||
}
|
||||
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate_zeroed
|
||||
#define USE_NATIVE_ALLOCATE_ZEROED
|
||||
|
||||
static inline void acpi_os_free(void *memory)
|
||||
{
|
||||
kfree(memory);
|
||||
}
|
||||
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_free
|
||||
|
||||
static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
|
||||
{
|
||||
return kmem_cache_zalloc(cache,
|
||||
irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
|
||||
}
|
||||
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_object
|
||||
|
||||
static inline acpi_thread_id acpi_os_get_thread_id(void)
|
||||
{
|
||||
return (acpi_thread_id) (unsigned long)current;
|
||||
}
|
||||
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_thread_id
|
||||
|
||||
#ifndef CONFIG_PREEMPT
|
||||
|
||||
/*
|
||||
* Used within ACPICA to show where it is safe to preempt execution
|
||||
* when CONFIG_PREEMPT=n
|
||||
*/
|
||||
#define ACPI_PREEMPTION_POINT() \
|
||||
do { \
|
||||
if (!irqs_disabled()) \
|
||||
cond_resched(); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* When lockdep is enabled, the spin_lock_init() macro stringifies it's
|
||||
* argument and uses that as a name for the lock in debugging.
|
||||
* By executing spin_lock_init() in a macro the key changes from "lock" for
|
||||
* all locks to the name of the argument of acpi_os_create_lock(), which
|
||||
* prevents lockdep from reporting false positives for ACPICA locks.
|
||||
*/
|
||||
#define acpi_os_create_lock(__handle) \
|
||||
({ \
|
||||
spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \
|
||||
if (lock) { \
|
||||
*(__handle) = lock; \
|
||||
spin_lock_init(*(__handle)); \
|
||||
} \
|
||||
lock ? AE_OK : AE_NO_MEMORY; \
|
||||
})
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock
|
||||
|
||||
void __iomem *acpi_os_map_memory(acpi_physical_address where, acpi_size length);
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_map_memory
|
||||
|
||||
void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_unmap_memory
|
||||
|
||||
/*
|
||||
* OSL interfaces used by debugger/disassembler
|
||||
*/
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_readable
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_writable
|
||||
|
||||
/*
|
||||
* OSL interfaces used by utilities
|
||||
*/
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_redirect_output
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_line
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_name
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_directory
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_next_filename
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_directory
|
||||
|
||||
/*
|
||||
* OSL interfaces added by Linux
|
||||
*/
|
||||
void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ACLINUX_H__ */
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: aclinuxex.h - Extra OS specific defines, etc. for Linux
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* 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 __ACLINUXEX_H__
|
||||
#define __ACLINUXEX_H__
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
* Overrides for in-kernel ACPICA
|
||||
*/
|
||||
acpi_status __init acpi_os_initialize(void);
|
||||
|
||||
acpi_status acpi_os_terminate(void);
|
||||
|
||||
/*
|
||||
* The irqs_disabled() check is for resume from RAM.
|
||||
* Interrupts are off during resume, just like they are for boot.
|
||||
* However, boot has (system_state != SYSTEM_RUNNING)
|
||||
* to quiet __might_sleep() in kmalloc() and resume does not.
|
||||
*/
|
||||
static inline void *acpi_os_allocate(acpi_size size)
|
||||
{
|
||||
return kmalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
|
||||
}
|
||||
|
||||
static inline void *acpi_os_allocate_zeroed(acpi_size size)
|
||||
{
|
||||
return kzalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
|
||||
}
|
||||
|
||||
static inline void acpi_os_free(void *memory)
|
||||
{
|
||||
kfree(memory);
|
||||
}
|
||||
|
||||
static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
|
||||
{
|
||||
return kmem_cache_zalloc(cache,
|
||||
irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
|
||||
}
|
||||
|
||||
static inline acpi_thread_id acpi_os_get_thread_id(void)
|
||||
{
|
||||
return (acpi_thread_id) (unsigned long)current;
|
||||
}
|
||||
|
||||
/*
|
||||
* When lockdep is enabled, the spin_lock_init() macro stringifies it's
|
||||
* argument and uses that as a name for the lock in debugging.
|
||||
* By executing spin_lock_init() in a macro the key changes from "lock" for
|
||||
* all locks to the name of the argument of acpi_os_create_lock(), which
|
||||
* prevents lockdep from reporting false positives for ACPICA locks.
|
||||
*/
|
||||
#define acpi_os_create_lock(__handle) \
|
||||
({ \
|
||||
spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \
|
||||
if (lock) { \
|
||||
*(__handle) = lock; \
|
||||
spin_lock_init(*(__handle)); \
|
||||
} \
|
||||
lock ? AE_OK : AE_NO_MEMORY; \
|
||||
})
|
||||
|
||||
/*
|
||||
* OSL interfaces added by Linux
|
||||
*/
|
||||
void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ACLINUXEX_H__ */
|
||||
@@ -19,11 +19,13 @@ struct acpi_device;
|
||||
#if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE)
|
||||
extern int acpi_video_register(void);
|
||||
extern void acpi_video_unregister(void);
|
||||
extern void acpi_video_unregister_backlight(void);
|
||||
extern int acpi_video_get_edid(struct acpi_device *device, int type,
|
||||
int device_id, void **edid);
|
||||
#else
|
||||
static inline int acpi_video_register(void) { return 0; }
|
||||
static inline void acpi_video_unregister(void) { return; }
|
||||
static inline void acpi_video_unregister_backlight(void) { return; }
|
||||
static inline int acpi_video_get_edid(struct acpi_device *device, int type,
|
||||
int device_id, void **edid)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#define __ASM_GENERIC_ATOMIC_H
|
||||
|
||||
#include <asm/cmpxchg.h>
|
||||
#include <asm/barrier.h>
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Force people to define core atomics */
|
||||
@@ -182,11 +183,5 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Assume that atomic operations are already serializing */
|
||||
#define smp_mb__before_atomic_dec() barrier()
|
||||
#define smp_mb__after_atomic_dec() barrier()
|
||||
#define smp_mb__before_atomic_inc() barrier()
|
||||
#define smp_mb__after_atomic_inc() barrier()
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_GENERIC_ATOMIC_H */
|
||||
|
||||
@@ -62,6 +62,14 @@
|
||||
#define set_mb(var, value) do { (var) = (value); mb(); } while (0)
|
||||
#endif
|
||||
|
||||
#ifndef smp_mb__before_atomic
|
||||
#define smp_mb__before_atomic() smp_mb()
|
||||
#endif
|
||||
|
||||
#ifndef smp_mb__after_atomic
|
||||
#define smp_mb__after_atomic() smp_mb()
|
||||
#endif
|
||||
|
||||
#define smp_store_release(p, v) \
|
||||
do { \
|
||||
compiletime_assert_atomic_type(*p); \
|
||||
|
||||
@@ -11,14 +11,7 @@
|
||||
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
/*
|
||||
* clear_bit may not imply a memory barrier
|
||||
*/
|
||||
#ifndef smp_mb__before_clear_bit
|
||||
#define smp_mb__before_clear_bit() smp_mb()
|
||||
#define smp_mb__after_clear_bit() smp_mb()
|
||||
#endif
|
||||
#include <asm/barrier.h>
|
||||
|
||||
#include <asm-generic/bitops/__ffs.h>
|
||||
#include <asm-generic/bitops/ffz.h>
|
||||
|
||||
@@ -80,7 +80,7 @@ static inline void set_bit(int nr, volatile unsigned long *addr)
|
||||
*
|
||||
* clear_bit() is atomic and may not be reordered. However, it does
|
||||
* not contain a memory barrier, so if it is used for locking purposes,
|
||||
* you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
|
||||
* you should call smp_mb__before_atomic() and/or smp_mb__after_atomic()
|
||||
* in order to ensure changes are visible on other processors.
|
||||
*/
|
||||
static inline void clear_bit(int nr, volatile unsigned long *addr)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#define clear_bit_unlock(nr, addr) \
|
||||
do { \
|
||||
smp_mb__before_clear_bit(); \
|
||||
smp_mb__before_atomic(); \
|
||||
clear_bit(nr, addr); \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -16,16 +16,13 @@ int dma_mmap_from_coherent(struct device *dev, struct vm_area_struct *vma,
|
||||
* Standard interface
|
||||
*/
|
||||
#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
|
||||
extern int
|
||||
dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
|
||||
dma_addr_t device_addr, size_t size, int flags);
|
||||
int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
|
||||
dma_addr_t device_addr, size_t size, int flags);
|
||||
|
||||
extern void
|
||||
dma_release_declared_memory(struct device *dev);
|
||||
void dma_release_declared_memory(struct device *dev);
|
||||
|
||||
extern void *
|
||||
dma_mark_declared_memory_occupied(struct device *dev,
|
||||
dma_addr_t device_addr, size_t size);
|
||||
void *dma_mark_declared_memory_occupied(struct device *dev,
|
||||
dma_addr_t device_addr, size_t size);
|
||||
#else
|
||||
#define dma_alloc_from_coherent(dev, size, handle, ret) (0)
|
||||
#define dma_release_from_coherent(dev, order, vaddr) (0)
|
||||
|
||||
@@ -3,10 +3,15 @@
|
||||
|
||||
#include <uapi/asm-generic/ioctl.h>
|
||||
|
||||
#ifdef __CHECKER__
|
||||
#define _IOC_TYPECHECK(t) (sizeof(t))
|
||||
#else
|
||||
/* provoke compile error for invalid uses of size argument */
|
||||
extern unsigned int __invalid_size_argument_for_IOC;
|
||||
#define _IOC_TYPECHECK(t) \
|
||||
((sizeof(t) == sizeof(t[1]) && \
|
||||
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
|
||||
sizeof(t) : __invalid_size_argument_for_IOC)
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_GENERIC_IOCTL_H */
|
||||
|
||||
@@ -233,6 +233,10 @@ static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
|
||||
# define pte_accessible(mm, pte) ((void)(pte), 1)
|
||||
#endif
|
||||
|
||||
#ifndef pte_present_nonuma
|
||||
#define pte_present_nonuma(pte) pte_present(pte)
|
||||
#endif
|
||||
|
||||
#ifndef flush_tlb_fix_spurious_fault
|
||||
#define flush_tlb_fix_spurious_fault(vma, address) flush_tlb_page(vma, address)
|
||||
#endif
|
||||
@@ -670,7 +674,7 @@ static inline int pmd_trans_unstable(pmd_t *pmd)
|
||||
static inline int pte_numa(pte_t pte)
|
||||
{
|
||||
return (pte_flags(pte) &
|
||||
(_PAGE_NUMA|_PAGE_PRESENT)) == _PAGE_NUMA;
|
||||
(_PAGE_NUMA|_PAGE_PROTNONE|_PAGE_PRESENT)) == _PAGE_NUMA;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -678,7 +682,7 @@ static inline int pte_numa(pte_t pte)
|
||||
static inline int pmd_numa(pmd_t pmd)
|
||||
{
|
||||
return (pmd_flags(pmd) &
|
||||
(_PAGE_NUMA|_PAGE_PRESENT)) == _PAGE_NUMA;
|
||||
(_PAGE_NUMA|_PAGE_PROTNONE|_PAGE_PRESENT)) == _PAGE_NUMA;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,22 +4,27 @@
|
||||
/*
|
||||
* This is the most generic implementation of unaligned accesses
|
||||
* and should work almost anywhere.
|
||||
*
|
||||
* If an architecture can handle unaligned accesses in hardware,
|
||||
* it may want to use the linux/unaligned/access_ok.h implementation
|
||||
* instead.
|
||||
*/
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
/* Set by the arch if it can handle unaligned accesses in hardware. */
|
||||
#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
# include <linux/unaligned/access_ok.h>
|
||||
#endif
|
||||
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
# include <linux/unaligned/le_struct.h>
|
||||
# include <linux/unaligned/be_byteshift.h>
|
||||
# ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
# include <linux/unaligned/le_struct.h>
|
||||
# include <linux/unaligned/be_byteshift.h>
|
||||
# endif
|
||||
# include <linux/unaligned/generic.h>
|
||||
# define get_unaligned __get_unaligned_le
|
||||
# define put_unaligned __put_unaligned_le
|
||||
#elif defined(__BIG_ENDIAN)
|
||||
# include <linux/unaligned/be_struct.h>
|
||||
# include <linux/unaligned/le_byteshift.h>
|
||||
# ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
# include <linux/unaligned/be_struct.h>
|
||||
# include <linux/unaligned/le_byteshift.h>
|
||||
# endif
|
||||
# include <linux/unaligned/generic.h>
|
||||
# define get_unaligned __get_unaligned_be
|
||||
# define put_unaligned __put_unaligned_be
|
||||
|
||||
@@ -139,52 +139,23 @@
|
||||
#define TRACE_SYSCALLS()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CLKSRC_OF
|
||||
#define CLKSRC_OF_TABLES() . = ALIGN(8); \
|
||||
VMLINUX_SYMBOL(__clksrc_of_table) = .; \
|
||||
*(__clksrc_of_table) \
|
||||
*(__clksrc_of_table_end)
|
||||
#else
|
||||
#define CLKSRC_OF_TABLES()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IRQCHIP
|
||||
#define IRQCHIP_OF_MATCH_TABLE() \
|
||||
#define ___OF_TABLE(cfg, name) _OF_TABLE_##cfg(name)
|
||||
#define __OF_TABLE(cfg, name) ___OF_TABLE(cfg, name)
|
||||
#define OF_TABLE(cfg, name) __OF_TABLE(config_enabled(cfg), name)
|
||||
#define _OF_TABLE_0(name)
|
||||
#define _OF_TABLE_1(name) \
|
||||
. = ALIGN(8); \
|
||||
VMLINUX_SYMBOL(__irqchip_begin) = .; \
|
||||
*(__irqchip_of_table) \
|
||||
*(__irqchip_of_end)
|
||||
#else
|
||||
#define IRQCHIP_OF_MATCH_TABLE()
|
||||
#endif
|
||||
VMLINUX_SYMBOL(__##name##_of_table) = .; \
|
||||
*(__##name##_of_table) \
|
||||
*(__##name##_of_table_end)
|
||||
|
||||
#ifdef CONFIG_COMMON_CLK
|
||||
#define CLK_OF_TABLES() . = ALIGN(8); \
|
||||
VMLINUX_SYMBOL(__clk_of_table) = .; \
|
||||
*(__clk_of_table) \
|
||||
*(__clk_of_table_end)
|
||||
#else
|
||||
#define CLK_OF_TABLES()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OF_RESERVED_MEM
|
||||
#define RESERVEDMEM_OF_TABLES() \
|
||||
. = ALIGN(8); \
|
||||
VMLINUX_SYMBOL(__reservedmem_of_table) = .; \
|
||||
*(__reservedmem_of_table) \
|
||||
*(__reservedmem_of_table_end)
|
||||
#else
|
||||
#define RESERVEDMEM_OF_TABLES()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define CPU_METHOD_OF_TABLES() . = ALIGN(8); \
|
||||
VMLINUX_SYMBOL(__cpu_method_of_table_begin) = .; \
|
||||
*(__cpu_method_of_table) \
|
||||
VMLINUX_SYMBOL(__cpu_method_of_table_end) = .;
|
||||
#else
|
||||
#define CPU_METHOD_OF_TABLES()
|
||||
#endif
|
||||
#define CLKSRC_OF_TABLES() OF_TABLE(CONFIG_CLKSRC_OF, clksrc)
|
||||
#define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip)
|
||||
#define CLK_OF_TABLES() OF_TABLE(CONFIG_COMMON_CLK, clk)
|
||||
#define RESERVEDMEM_OF_TABLES() OF_TABLE(CONFIG_OF_RESERVED_MEM, reservedmem)
|
||||
#define CPU_METHOD_OF_TABLES() OF_TABLE(CONFIG_SMP, cpu_method)
|
||||
#define EARLYCON_OF_TABLES() OF_TABLE(CONFIG_SERIAL_EARLYCON, earlycon)
|
||||
|
||||
#define KERNEL_DTB() \
|
||||
STRUCT_ALIGN(); \
|
||||
@@ -513,7 +484,8 @@
|
||||
CLKSRC_OF_TABLES() \
|
||||
CPU_METHOD_OF_TABLES() \
|
||||
KERNEL_DTB() \
|
||||
IRQCHIP_OF_MATCH_TABLE()
|
||||
IRQCHIP_OF_MATCH_TABLE() \
|
||||
EARLYCON_OF_TABLES()
|
||||
|
||||
#define INIT_TEXT \
|
||||
*(.init.text) \
|
||||
|
||||
@@ -55,15 +55,28 @@ extern const struct crypto_type crypto_ahash_type;
|
||||
int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err);
|
||||
int crypto_hash_walk_first(struct ahash_request *req,
|
||||
struct crypto_hash_walk *walk);
|
||||
int crypto_ahash_walk_first(struct ahash_request *req,
|
||||
struct crypto_hash_walk *walk);
|
||||
int crypto_hash_walk_first_compat(struct hash_desc *hdesc,
|
||||
struct crypto_hash_walk *walk,
|
||||
struct scatterlist *sg, unsigned int len);
|
||||
|
||||
static inline int crypto_ahash_walk_done(struct crypto_hash_walk *walk,
|
||||
int err)
|
||||
{
|
||||
return crypto_hash_walk_done(walk, err);
|
||||
}
|
||||
|
||||
static inline int crypto_hash_walk_last(struct crypto_hash_walk *walk)
|
||||
{
|
||||
return !(walk->entrylen | walk->total);
|
||||
}
|
||||
|
||||
static inline int crypto_ahash_walk_last(struct crypto_hash_walk *walk)
|
||||
{
|
||||
return crypto_hash_walk_last(walk);
|
||||
}
|
||||
|
||||
int crypto_register_ahash(struct ahash_alg *alg);
|
||||
int crypto_unregister_ahash(struct ahash_alg *alg);
|
||||
int ahash_register_instance(struct crypto_template *tmpl,
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Broadcom Corporation
|
||||
* Copyright 2013 Linaro Limited
|
||||
*
|
||||
* 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 version 2.
|
||||
*
|
||||
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
|
||||
* kind, whether express or implied; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _CLOCK_BCM21664_H
|
||||
#define _CLOCK_BCM21664_H
|
||||
|
||||
/*
|
||||
* This file defines the values used to specify clocks provided by
|
||||
* the clock control units (CCUs) on Broadcom BCM21664 family SoCs.
|
||||
*/
|
||||
|
||||
/* bcm21664 CCU device tree "compatible" strings */
|
||||
#define BCM21664_DT_ROOT_CCU_COMPAT "brcm,bcm21664-root-ccu"
|
||||
#define BCM21664_DT_AON_CCU_COMPAT "brcm,bcm21664-aon-ccu"
|
||||
#define BCM21664_DT_MASTER_CCU_COMPAT "brcm,bcm21664-master-ccu"
|
||||
#define BCM21664_DT_SLAVE_CCU_COMPAT "brcm,bcm21664-slave-ccu"
|
||||
|
||||
/* root CCU clock ids */
|
||||
|
||||
#define BCM21664_ROOT_CCU_FRAC_1M 0
|
||||
#define BCM21664_ROOT_CCU_CLOCK_COUNT 1
|
||||
|
||||
/* aon CCU clock ids */
|
||||
|
||||
#define BCM21664_AON_CCU_HUB_TIMER 0
|
||||
#define BCM21664_AON_CCU_CLOCK_COUNT 1
|
||||
|
||||
/* master CCU clock ids */
|
||||
|
||||
#define BCM21664_MASTER_CCU_SDIO1 0
|
||||
#define BCM21664_MASTER_CCU_SDIO2 1
|
||||
#define BCM21664_MASTER_CCU_SDIO3 2
|
||||
#define BCM21664_MASTER_CCU_SDIO4 3
|
||||
#define BCM21664_MASTER_CCU_SDIO1_SLEEP 4
|
||||
#define BCM21664_MASTER_CCU_SDIO2_SLEEP 5
|
||||
#define BCM21664_MASTER_CCU_SDIO3_SLEEP 6
|
||||
#define BCM21664_MASTER_CCU_SDIO4_SLEEP 7
|
||||
#define BCM21664_MASTER_CCU_CLOCK_COUNT 8
|
||||
|
||||
/* slave CCU clock ids */
|
||||
|
||||
#define BCM21664_SLAVE_CCU_UARTB 0
|
||||
#define BCM21664_SLAVE_CCU_UARTB2 1
|
||||
#define BCM21664_SLAVE_CCU_UARTB3 2
|
||||
#define BCM21664_SLAVE_CCU_BSC1 3
|
||||
#define BCM21664_SLAVE_CCU_BSC2 4
|
||||
#define BCM21664_SLAVE_CCU_BSC3 5
|
||||
#define BCM21664_SLAVE_CCU_BSC4 6
|
||||
#define BCM21664_SLAVE_CCU_CLOCK_COUNT 7
|
||||
|
||||
#endif /* _CLOCK_BCM21664_H */
|
||||
@@ -20,6 +20,18 @@
|
||||
* the clock control units (CCUs) on Broadcom BCM281XX family SoCs.
|
||||
*/
|
||||
|
||||
/*
|
||||
* These are the bcm281xx CCU device tree "compatible" strings.
|
||||
* We're stuck with using "bcm11351" in the string because wild
|
||||
* cards aren't allowed, and that name was the first one defined
|
||||
* in this family of devices.
|
||||
*/
|
||||
#define BCM281XX_DT_ROOT_CCU_COMPAT "brcm,bcm11351-root-ccu"
|
||||
#define BCM281XX_DT_AON_CCU_COMPAT "brcm,bcm11351-aon-ccu"
|
||||
#define BCM281XX_DT_HUB_CCU_COMPAT "brcm,bcm11351-hub-ccu"
|
||||
#define BCM281XX_DT_MASTER_CCU_COMPAT "brcm,bcm11351-master-ccu"
|
||||
#define BCM281XX_DT_SLAVE_CCU_COMPAT "brcm,bcm11351-slave-ccu"
|
||||
|
||||
/* root CCU clock ids */
|
||||
|
||||
#define BCM281XX_ROOT_CCU_FRAC_1M 0
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Berlin2 BG2/BG2CD clock tree IDs
|
||||
*/
|
||||
|
||||
#define CLKID_SYS 0
|
||||
#define CLKID_CPU 1
|
||||
#define CLKID_DRMFIGO 2
|
||||
#define CLKID_CFG 3
|
||||
#define CLKID_GFX 4
|
||||
#define CLKID_ZSP 5
|
||||
#define CLKID_PERIF 6
|
||||
#define CLKID_PCUBE 7
|
||||
#define CLKID_VSCOPE 8
|
||||
#define CLKID_NFC_ECC 9
|
||||
#define CLKID_VPP 10
|
||||
#define CLKID_APP 11
|
||||
#define CLKID_AUDIO0 12
|
||||
#define CLKID_AUDIO2 13
|
||||
#define CLKID_AUDIO3 14
|
||||
#define CLKID_AUDIO1 15
|
||||
#define CLKID_GFX3D_CORE 16
|
||||
#define CLKID_GFX3D_SYS 17
|
||||
#define CLKID_ARC 18
|
||||
#define CLKID_VIP 19
|
||||
#define CLKID_SDIO0XIN 20
|
||||
#define CLKID_SDIO1XIN 21
|
||||
#define CLKID_GFX3D_EXTRA 22
|
||||
#define CLKID_GC360 23
|
||||
#define CLKID_SDIO_DLLMST 24
|
||||
#define CLKID_GETH0 25
|
||||
#define CLKID_GETH1 26
|
||||
#define CLKID_SATA 27
|
||||
#define CLKID_AHBAPB 28
|
||||
#define CLKID_USB0 29
|
||||
#define CLKID_USB1 30
|
||||
#define CLKID_PBRIDGE 31
|
||||
#define CLKID_SDIO0 32
|
||||
#define CLKID_SDIO1 33
|
||||
#define CLKID_NFC 34
|
||||
#define CLKID_SMEMC 35
|
||||
#define CLKID_AUDIOHD 36
|
||||
#define CLKID_VIDEO0 37
|
||||
#define CLKID_VIDEO1 38
|
||||
#define CLKID_VIDEO2 39
|
||||
#define CLKID_TWD 40
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Berlin2 BG2Q clock tree IDs
|
||||
*/
|
||||
|
||||
#define CLKID_SYS 0
|
||||
#define CLKID_DRMFIGO 1
|
||||
#define CLKID_CFG 2
|
||||
#define CLKID_GFX2D 3
|
||||
#define CLKID_ZSP 4
|
||||
#define CLKID_PERIF 5
|
||||
#define CLKID_PCUBE 6
|
||||
#define CLKID_VSCOPE 7
|
||||
#define CLKID_NFC_ECC 8
|
||||
#define CLKID_VPP 9
|
||||
#define CLKID_APP 10
|
||||
#define CLKID_SDIO0XIN 11
|
||||
#define CLKID_SDIO1XIN 12
|
||||
#define CLKID_GFX2DAXI 13
|
||||
#define CLKID_GETH0 14
|
||||
#define CLKID_SATA 15
|
||||
#define CLKID_AHBAPB 16
|
||||
#define CLKID_USB0 17
|
||||
#define CLKID_USB1 18
|
||||
#define CLKID_USB2 19
|
||||
#define CLKID_USB3 20
|
||||
#define CLKID_PBRIDGE 21
|
||||
#define CLKID_SDIO 22
|
||||
#define CLKID_NFC 23
|
||||
#define CLKID_SMEMC 24
|
||||
#define CLKID_PCIE 25
|
||||
#define CLKID_TWD 26
|
||||
@@ -0,0 +1,258 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
|
||||
* Author: Tomasz Figa <t.figa@samsung.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Device Tree binding constants for Samsung Exynos3250 clock controllers.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLOCK_SAMSUNG_EXYNOS3250_CLOCK_H
|
||||
#define _DT_BINDINGS_CLOCK_SAMSUNG_EXYNOS3250_CLOCK_H
|
||||
|
||||
/*
|
||||
* Let each exported clock get a unique index, which is used on DT-enabled
|
||||
* platforms to lookup the clock from a clock specifier. These indices are
|
||||
* therefore considered an ABI and so must not be changed. This implies
|
||||
* that new clocks should be added either in free spaces between clock groups
|
||||
* or at the end.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Main CMU
|
||||
*/
|
||||
|
||||
#define CLK_OSCSEL 1
|
||||
#define CLK_FIN_PLL 2
|
||||
#define CLK_FOUT_APLL 3
|
||||
#define CLK_FOUT_VPLL 4
|
||||
#define CLK_FOUT_UPLL 5
|
||||
#define CLK_FOUT_MPLL 6
|
||||
|
||||
/* Muxes */
|
||||
#define CLK_MOUT_MPLL_USER_L 16
|
||||
#define CLK_MOUT_GDL 17
|
||||
#define CLK_MOUT_MPLL_USER_R 18
|
||||
#define CLK_MOUT_GDR 19
|
||||
#define CLK_MOUT_EBI 20
|
||||
#define CLK_MOUT_ACLK_200 21
|
||||
#define CLK_MOUT_ACLK_160 22
|
||||
#define CLK_MOUT_ACLK_100 23
|
||||
#define CLK_MOUT_ACLK_266_1 24
|
||||
#define CLK_MOUT_ACLK_266_0 25
|
||||
#define CLK_MOUT_ACLK_266 26
|
||||
#define CLK_MOUT_VPLL 27
|
||||
#define CLK_MOUT_EPLL_USER 28
|
||||
#define CLK_MOUT_EBI_1 29
|
||||
#define CLK_MOUT_UPLL 30
|
||||
#define CLK_MOUT_ACLK_400_MCUISP_SUB 31
|
||||
#define CLK_MOUT_MPLL 32
|
||||
#define CLK_MOUT_ACLK_400_MCUISP 33
|
||||
#define CLK_MOUT_VPLLSRC 34
|
||||
#define CLK_MOUT_CAM1 35
|
||||
#define CLK_MOUT_CAM_BLK 36
|
||||
#define CLK_MOUT_MFC 37
|
||||
#define CLK_MOUT_MFC_1 38
|
||||
#define CLK_MOUT_MFC_0 39
|
||||
#define CLK_MOUT_G3D 40
|
||||
#define CLK_MOUT_G3D_1 41
|
||||
#define CLK_MOUT_G3D_0 42
|
||||
#define CLK_MOUT_MIPI0 43
|
||||
#define CLK_MOUT_FIMD0 44
|
||||
#define CLK_MOUT_UART_ISP 45
|
||||
#define CLK_MOUT_SPI1_ISP 46
|
||||
#define CLK_MOUT_SPI0_ISP 47
|
||||
#define CLK_MOUT_TSADC 48
|
||||
#define CLK_MOUT_MMC1 49
|
||||
#define CLK_MOUT_MMC0 50
|
||||
#define CLK_MOUT_UART1 51
|
||||
#define CLK_MOUT_UART0 52
|
||||
#define CLK_MOUT_SPI1 53
|
||||
#define CLK_MOUT_SPI0 54
|
||||
#define CLK_MOUT_AUDIO 55
|
||||
#define CLK_MOUT_MPLL_USER_C 56
|
||||
#define CLK_MOUT_HPM 57
|
||||
#define CLK_MOUT_CORE 58
|
||||
#define CLK_MOUT_APLL 59
|
||||
#define CLK_MOUT_ACLK_266_SUB 60
|
||||
|
||||
/* Dividers */
|
||||
#define CLK_DIV_GPL 64
|
||||
#define CLK_DIV_GDL 65
|
||||
#define CLK_DIV_GPR 66
|
||||
#define CLK_DIV_GDR 67
|
||||
#define CLK_DIV_MPLL_PRE 68
|
||||
#define CLK_DIV_ACLK_400_MCUISP 69
|
||||
#define CLK_DIV_EBI 70
|
||||
#define CLK_DIV_ACLK_200 71
|
||||
#define CLK_DIV_ACLK_160 72
|
||||
#define CLK_DIV_ACLK_100 73
|
||||
#define CLK_DIV_ACLK_266 74
|
||||
#define CLK_DIV_CAM1 75
|
||||
#define CLK_DIV_CAM_BLK 76
|
||||
#define CLK_DIV_MFC 77
|
||||
#define CLK_DIV_G3D 78
|
||||
#define CLK_DIV_MIPI0_PRE 79
|
||||
#define CLK_DIV_MIPI0 80
|
||||
#define CLK_DIV_FIMD0 81
|
||||
#define CLK_DIV_UART_ISP 82
|
||||
#define CLK_DIV_SPI1_ISP_PRE 83
|
||||
#define CLK_DIV_SPI1_ISP 84
|
||||
#define CLK_DIV_SPI0_ISP_PRE 85
|
||||
#define CLK_DIV_SPI0_ISP 86
|
||||
#define CLK_DIV_TSADC_PRE 87
|
||||
#define CLK_DIV_TSADC 88
|
||||
#define CLK_DIV_MMC1_PRE 89
|
||||
#define CLK_DIV_MMC1 90
|
||||
#define CLK_DIV_MMC0_PRE 91
|
||||
#define CLK_DIV_MMC0 92
|
||||
#define CLK_DIV_UART1 93
|
||||
#define CLK_DIV_UART0 94
|
||||
#define CLK_DIV_SPI1_PRE 95
|
||||
#define CLK_DIV_SPI1 96
|
||||
#define CLK_DIV_SPI0_PRE 97
|
||||
#define CLK_DIV_SPI0 98
|
||||
#define CLK_DIV_PCM 99
|
||||
#define CLK_DIV_AUDIO 100
|
||||
#define CLK_DIV_I2S 101
|
||||
#define CLK_DIV_CORE2 102
|
||||
#define CLK_DIV_APLL 103
|
||||
#define CLK_DIV_PCLK_DBG 104
|
||||
#define CLK_DIV_ATB 105
|
||||
#define CLK_DIV_COREM 106
|
||||
#define CLK_DIV_CORE 107
|
||||
#define CLK_DIV_HPM 108
|
||||
#define CLK_DIV_COPY 109
|
||||
|
||||
/* Gates */
|
||||
#define CLK_ASYNC_G3D 128
|
||||
#define CLK_ASYNC_MFCL 129
|
||||
#define CLK_PPMULEFT 130
|
||||
#define CLK_GPIO_LEFT 131
|
||||
#define CLK_ASYNC_ISPMX 132
|
||||
#define CLK_ASYNC_FSYSD 133
|
||||
#define CLK_ASYNC_LCD0X 134
|
||||
#define CLK_ASYNC_CAMX 135
|
||||
#define CLK_PPMURIGHT 136
|
||||
#define CLK_GPIO_RIGHT 137
|
||||
#define CLK_MONOCNT 138
|
||||
#define CLK_TZPC6 139
|
||||
#define CLK_PROVISIONKEY1 140
|
||||
#define CLK_PROVISIONKEY0 141
|
||||
#define CLK_CMU_ISPPART 142
|
||||
#define CLK_TMU_APBIF 143
|
||||
#define CLK_KEYIF 144
|
||||
#define CLK_RTC 145
|
||||
#define CLK_WDT 146
|
||||
#define CLK_MCT 147
|
||||
#define CLK_SECKEY 148
|
||||
#define CLK_TZPC5 149
|
||||
#define CLK_TZPC4 150
|
||||
#define CLK_TZPC3 151
|
||||
#define CLK_TZPC2 152
|
||||
#define CLK_TZPC1 153
|
||||
#define CLK_TZPC0 154
|
||||
#define CLK_CMU_COREPART 155
|
||||
#define CLK_CMU_TOPPART 156
|
||||
#define CLK_PMU_APBIF 157
|
||||
#define CLK_SYSREG 158
|
||||
#define CLK_CHIP_ID 159
|
||||
#define CLK_QEJPEG 160
|
||||
#define CLK_PIXELASYNCM1 161
|
||||
#define CLK_PIXELASYNCM0 162
|
||||
#define CLK_PPMUCAMIF 163
|
||||
#define CLK_QEM2MSCALER 164
|
||||
#define CLK_QEGSCALER1 165
|
||||
#define CLK_QEGSCALER0 166
|
||||
#define CLK_SMMUJPEG 167
|
||||
#define CLK_SMMUM2M2SCALER 168
|
||||
#define CLK_SMMUGSCALER1 169
|
||||
#define CLK_SMMUGSCALER0 170
|
||||
#define CLK_JPEG 171
|
||||
#define CLK_M2MSCALER 172
|
||||
#define CLK_GSCALER1 173
|
||||
#define CLK_GSCALER0 174
|
||||
#define CLK_QEMFC 175
|
||||
#define CLK_PPMUMFC_L 176
|
||||
#define CLK_SMMUMFC_L 177
|
||||
#define CLK_MFC 178
|
||||
#define CLK_SMMUG3D 179
|
||||
#define CLK_QEG3D 180
|
||||
#define CLK_PPMUG3D 181
|
||||
#define CLK_G3D 182
|
||||
#define CLK_QE_CH1_LCD 183
|
||||
#define CLK_QE_CH0_LCD 184
|
||||
#define CLK_PPMULCD0 185
|
||||
#define CLK_SMMUFIMD0 186
|
||||
#define CLK_DSIM0 187
|
||||
#define CLK_FIMD0 188
|
||||
#define CLK_CAM1 189
|
||||
#define CLK_UART_ISP_TOP 190
|
||||
#define CLK_SPI1_ISP_TOP 191
|
||||
#define CLK_SPI0_ISP_TOP 192
|
||||
#define CLK_TSADC 193
|
||||
#define CLK_PPMUFILE 194
|
||||
#define CLK_USBOTG 195
|
||||
#define CLK_USBHOST 196
|
||||
#define CLK_SROMC 197
|
||||
#define CLK_SDMMC1 198
|
||||
#define CLK_SDMMC0 199
|
||||
#define CLK_PDMA1 200
|
||||
#define CLK_PDMA0 201
|
||||
#define CLK_PWM 202
|
||||
#define CLK_PCM 203
|
||||
#define CLK_I2S 204
|
||||
#define CLK_SPI1 205
|
||||
#define CLK_SPI0 206
|
||||
#define CLK_I2C7 207
|
||||
#define CLK_I2C6 208
|
||||
#define CLK_I2C5 209
|
||||
#define CLK_I2C4 210
|
||||
#define CLK_I2C3 211
|
||||
#define CLK_I2C2 212
|
||||
#define CLK_I2C1 213
|
||||
#define CLK_I2C0 214
|
||||
#define CLK_UART1 215
|
||||
#define CLK_UART0 216
|
||||
#define CLK_BLOCK_LCD 217
|
||||
#define CLK_BLOCK_G3D 218
|
||||
#define CLK_BLOCK_MFC 219
|
||||
#define CLK_BLOCK_CAM 220
|
||||
#define CLK_SMIES 221
|
||||
|
||||
/* Special clocks */
|
||||
#define CLK_SCLK_JPEG 224
|
||||
#define CLK_SCLK_M2MSCALER 225
|
||||
#define CLK_SCLK_GSCALER1 226
|
||||
#define CLK_SCLK_GSCALER0 227
|
||||
#define CLK_SCLK_MFC 228
|
||||
#define CLK_SCLK_G3D 229
|
||||
#define CLK_SCLK_MIPIDPHY2L 230
|
||||
#define CLK_SCLK_MIPI0 231
|
||||
#define CLK_SCLK_FIMD0 232
|
||||
#define CLK_SCLK_CAM1 233
|
||||
#define CLK_SCLK_UART_ISP 234
|
||||
#define CLK_SCLK_SPI1_ISP 235
|
||||
#define CLK_SCLK_SPI0_ISP 236
|
||||
#define CLK_SCLK_UPLL 237
|
||||
#define CLK_SCLK_TSADC 238
|
||||
#define CLK_SCLK_EBI 239
|
||||
#define CLK_SCLK_MMC1 240
|
||||
#define CLK_SCLK_MMC0 241
|
||||
#define CLK_SCLK_I2S 242
|
||||
#define CLK_SCLK_PCM 243
|
||||
#define CLK_SCLK_SPI1 244
|
||||
#define CLK_SCLK_SPI0 245
|
||||
#define CLK_SCLK_UART1 246
|
||||
#define CLK_SCLK_UART0 247
|
||||
|
||||
/*
|
||||
* Total number of clocks of main CMU.
|
||||
* NOTE: Must be equal to last clock ID increased by one.
|
||||
*/
|
||||
#define CLK_NR_CLKS 248
|
||||
|
||||
#endif /* _DT_BINDINGS_CLOCK_SAMSUNG_EXYNOS3250_CLOCK_H */
|
||||
@@ -33,6 +33,7 @@
|
||||
#define CLK_MOUT_MPLL_USER_C 18 /* Exynos4x12 only */
|
||||
#define CLK_MOUT_CORE 19
|
||||
#define CLK_MOUT_APLL 20
|
||||
#define CLK_SCLK_HDMIPHY 22
|
||||
|
||||
/* gate for special clocks (sclk) */
|
||||
#define CLK_SCLK_FIMC0 128
|
||||
@@ -181,7 +182,6 @@
|
||||
#define CLK_KEYIF 347
|
||||
#define CLK_AUDSS 348
|
||||
#define CLK_MIPI_HSI 349 /* Exynos4210 only */
|
||||
#define CLK_MDMA2 350 /* Exynos4210 only */
|
||||
#define CLK_PIXELASYNCM0 351
|
||||
#define CLK_PIXELASYNCM1 352
|
||||
#define CLK_FIMC_LITE0 353 /* Exynos4x12 only */
|
||||
|
||||
@@ -150,11 +150,30 @@
|
||||
#define CLK_G2D 345
|
||||
#define CLK_MDMA0 346
|
||||
#define CLK_SMMU_MDMA0 347
|
||||
#define CLK_SSS 348
|
||||
#define CLK_G3D 349
|
||||
#define CLK_SMMU_TV 350
|
||||
#define CLK_SMMU_FIMD1 351
|
||||
#define CLK_SMMU_2D 352
|
||||
#define CLK_SMMU_FIMC_ISP 353
|
||||
#define CLK_SMMU_FIMC_DRC 354
|
||||
#define CLK_SMMU_FIMC_SCC 355
|
||||
#define CLK_SMMU_FIMC_SCP 356
|
||||
#define CLK_SMMU_FIMC_FD 357
|
||||
#define CLK_SMMU_FIMC_MCU 358
|
||||
#define CLK_SMMU_FIMC_ODC 359
|
||||
#define CLK_SMMU_FIMC_DIS0 360
|
||||
#define CLK_SMMU_FIMC_DIS1 361
|
||||
#define CLK_SMMU_FIMC_3DNR 362
|
||||
#define CLK_SMMU_FIMC_LITE0 363
|
||||
#define CLK_SMMU_FIMC_LITE1 364
|
||||
#define CLK_CAMIF_TOP 365
|
||||
|
||||
/* mux clocks */
|
||||
#define CLK_MOUT_HDMI 1024
|
||||
#define CLK_MOUT_GPLL 1025
|
||||
|
||||
/* must be greater than maximal clock id */
|
||||
#define CLK_NR_CLKS 1025
|
||||
#define CLK_NR_CLKS 1026
|
||||
|
||||
#endif /* _DT_BINDINGS_CLOCK_EXYNOS_5250_H */
|
||||
|
||||
@@ -0,0 +1,469 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
|
||||
* Author: Rahul Sharma <rahul.sharma@samsung.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Provides Constants for Exynos5260 clocks.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_EXYNOS5260_H
|
||||
#define _DT_BINDINGS_CLK_EXYNOS5260_H
|
||||
|
||||
/* Clock names: <cmu><type><IP> */
|
||||
|
||||
/* List Of Clocks For CMU_TOP */
|
||||
|
||||
#define TOP_FOUT_DISP_PLL 1
|
||||
#define TOP_FOUT_AUD_PLL 2
|
||||
#define TOP_MOUT_AUDTOP_PLL_USER 3
|
||||
#define TOP_MOUT_AUD_PLL 4
|
||||
#define TOP_MOUT_DISP_PLL 5
|
||||
#define TOP_MOUT_BUSTOP_PLL_USER 6
|
||||
#define TOP_MOUT_MEMTOP_PLL_USER 7
|
||||
#define TOP_MOUT_MEDIATOP_PLL_USER 8
|
||||
#define TOP_MOUT_DISP_DISP_333 9
|
||||
#define TOP_MOUT_ACLK_DISP_333 10
|
||||
#define TOP_MOUT_DISP_DISP_222 11
|
||||
#define TOP_MOUT_ACLK_DISP_222 12
|
||||
#define TOP_MOUT_DISP_MEDIA_PIXEL 13
|
||||
#define TOP_MOUT_FIMD1 14
|
||||
#define TOP_MOUT_SCLK_PERI_SPI0_CLK 15
|
||||
#define TOP_MOUT_SCLK_PERI_SPI1_CLK 16
|
||||
#define TOP_MOUT_SCLK_PERI_SPI2_CLK 17
|
||||
#define TOP_MOUT_SCLK_PERI_UART0_UCLK 18
|
||||
#define TOP_MOUT_SCLK_PERI_UART2_UCLK 19
|
||||
#define TOP_MOUT_SCLK_PERI_UART1_UCLK 20
|
||||
#define TOP_MOUT_BUS4_BUSTOP_100 21
|
||||
#define TOP_MOUT_BUS4_BUSTOP_400 22
|
||||
#define TOP_MOUT_BUS3_BUSTOP_100 23
|
||||
#define TOP_MOUT_BUS3_BUSTOP_400 24
|
||||
#define TOP_MOUT_BUS2_BUSTOP_400 25
|
||||
#define TOP_MOUT_BUS2_BUSTOP_100 26
|
||||
#define TOP_MOUT_BUS1_BUSTOP_100 27
|
||||
#define TOP_MOUT_BUS1_BUSTOP_400 28
|
||||
#define TOP_MOUT_SCLK_FSYS_USB 29
|
||||
#define TOP_MOUT_SCLK_FSYS_MMC0_SDCLKIN_A 30
|
||||
#define TOP_MOUT_SCLK_FSYS_MMC1_SDCLKIN_A 31
|
||||
#define TOP_MOUT_SCLK_FSYS_MMC2_SDCLKIN_A 32
|
||||
#define TOP_MOUT_SCLK_FSYS_MMC0_SDCLKIN_B 33
|
||||
#define TOP_MOUT_SCLK_FSYS_MMC1_SDCLKIN_B 34
|
||||
#define TOP_MOUT_SCLK_FSYS_MMC2_SDCLKIN_B 35
|
||||
#define TOP_MOUT_ACLK_ISP1_266 36
|
||||
#define TOP_MOUT_ISP1_MEDIA_266 37
|
||||
#define TOP_MOUT_ACLK_ISP1_400 38
|
||||
#define TOP_MOUT_ISP1_MEDIA_400 39
|
||||
#define TOP_MOUT_SCLK_ISP1_SPI0 40
|
||||
#define TOP_MOUT_SCLK_ISP1_SPI1 41
|
||||
#define TOP_MOUT_SCLK_ISP1_UART 42
|
||||
#define TOP_MOUT_SCLK_ISP1_SENSOR2 43
|
||||
#define TOP_MOUT_SCLK_ISP1_SENSOR1 44
|
||||
#define TOP_MOUT_SCLK_ISP1_SENSOR0 45
|
||||
#define TOP_MOUT_ACLK_MFC_333 46
|
||||
#define TOP_MOUT_MFC_BUSTOP_333 47
|
||||
#define TOP_MOUT_ACLK_G2D_333 48
|
||||
#define TOP_MOUT_G2D_BUSTOP_333 49
|
||||
#define TOP_MOUT_ACLK_GSCL_FIMC 50
|
||||
#define TOP_MOUT_GSCL_BUSTOP_FIMC 51
|
||||
#define TOP_MOUT_ACLK_GSCL_333 52
|
||||
#define TOP_MOUT_GSCL_BUSTOP_333 53
|
||||
#define TOP_MOUT_ACLK_GSCL_400 54
|
||||
#define TOP_MOUT_M2M_MEDIATOP_400 55
|
||||
#define TOP_DOUT_ACLK_MFC_333 56
|
||||
#define TOP_DOUT_ACLK_G2D_333 57
|
||||
#define TOP_DOUT_SCLK_ISP1_SENSOR2_A 58
|
||||
#define TOP_DOUT_SCLK_ISP1_SENSOR1_A 59
|
||||
#define TOP_DOUT_SCLK_ISP1_SENSOR0_A 60
|
||||
#define TOP_DOUT_ACLK_GSCL_FIMC 61
|
||||
#define TOP_DOUT_ACLK_GSCL_400 62
|
||||
#define TOP_DOUT_ACLK_GSCL_333 63
|
||||
#define TOP_DOUT_SCLK_ISP1_SPI0_B 64
|
||||
#define TOP_DOUT_SCLK_ISP1_SPI0_A 65
|
||||
#define TOP_DOUT_ACLK_ISP1_400 66
|
||||
#define TOP_DOUT_ACLK_ISP1_266 67
|
||||
#define TOP_DOUT_SCLK_ISP1_UART 68
|
||||
#define TOP_DOUT_SCLK_ISP1_SPI1_B 69
|
||||
#define TOP_DOUT_SCLK_ISP1_SPI1_A 70
|
||||
#define TOP_DOUT_SCLK_ISP1_SENSOR2_B 71
|
||||
#define TOP_DOUT_SCLK_ISP1_SENSOR1_B 72
|
||||
#define TOP_DOUT_SCLK_ISP1_SENSOR0_B 73
|
||||
#define TOP_DOUTTOP__SCLK_HPM_TARGETCLK 74
|
||||
#define TOP_DOUT_SCLK_DISP_PIXEL 75
|
||||
#define TOP_DOUT_ACLK_DISP_222 76
|
||||
#define TOP_DOUT_ACLK_DISP_333 77
|
||||
#define TOP_DOUT_ACLK_BUS4_100 78
|
||||
#define TOP_DOUT_ACLK_BUS4_400 79
|
||||
#define TOP_DOUT_ACLK_BUS3_100 80
|
||||
#define TOP_DOUT_ACLK_BUS3_400 81
|
||||
#define TOP_DOUT_ACLK_BUS2_100 82
|
||||
#define TOP_DOUT_ACLK_BUS2_400 83
|
||||
#define TOP_DOUT_ACLK_BUS1_100 84
|
||||
#define TOP_DOUT_ACLK_BUS1_400 85
|
||||
#define TOP_DOUT_SCLK_PERI_SPI1_B 86
|
||||
#define TOP_DOUT_SCLK_PERI_SPI1_A 87
|
||||
#define TOP_DOUT_SCLK_PERI_SPI0_B 88
|
||||
#define TOP_DOUT_SCLK_PERI_SPI0_A 89
|
||||
#define TOP_DOUT_SCLK_PERI_UART0 90
|
||||
#define TOP_DOUT_SCLK_PERI_UART2 91
|
||||
#define TOP_DOUT_SCLK_PERI_UART1 92
|
||||
#define TOP_DOUT_SCLK_PERI_SPI2_B 93
|
||||
#define TOP_DOUT_SCLK_PERI_SPI2_A 94
|
||||
#define TOP_DOUT_ACLK_PERI_AUD 95
|
||||
#define TOP_DOUT_ACLK_PERI_66 96
|
||||
#define TOP_DOUT_SCLK_FSYS_MMC0_SDCLKIN_B 97
|
||||
#define TOP_DOUT_SCLK_FSYS_MMC0_SDCLKIN_A 98
|
||||
#define TOP_DOUT_SCLK_FSYS_USBDRD30_SUSPEND_CLK 99
|
||||
#define TOP_DOUT_ACLK_FSYS_200 100
|
||||
#define TOP_DOUT_SCLK_FSYS_MMC2_SDCLKIN_B 101
|
||||
#define TOP_DOUT_SCLK_FSYS_MMC2_SDCLKIN_A 102
|
||||
#define TOP_DOUT_SCLK_FSYS_MMC1_SDCLKIN_B 103
|
||||
#define TOP_DOUT_SCLK_FSYS_MMC1_SDCLKIN_A 104
|
||||
#define TOP_SCLK_FIMD1 105
|
||||
#define TOP_SCLK_MMC2 106
|
||||
#define TOP_SCLK_MMC1 107
|
||||
#define TOP_SCLK_MMC0 108
|
||||
#define PHYCLK_DPTX_PHY_CH3_TXD_CLK 109
|
||||
#define PHYCLK_DPTX_PHY_CH2_TXD_CLK 110
|
||||
#define PHYCLK_DPTX_PHY_CH1_TXD_CLK 111
|
||||
#define PHYCLK_DPTX_PHY_CH0_TXD_CLK 112
|
||||
#define phyclk_hdmi_phy_tmds_clko 113
|
||||
#define PHYCLK_HDMI_PHY_PIXEL_CLKO 114
|
||||
#define PHYCLK_HDMI_LINK_O_TMDS_CLKHI 115
|
||||
#define PHYCLK_MIPI_DPHY_4L_M_TXBYTECLKHS 116
|
||||
#define PHYCLK_DPTX_PHY_O_REF_CLK_24M 117
|
||||
#define PHYCLK_DPTX_PHY_CLK_DIV2 118
|
||||
#define PHYCLK_MIPI_DPHY_4L_M_RXCLKESC0 119
|
||||
#define PHYCLK_USBHOST20_PHY_PHYCLOCK 120
|
||||
#define PHYCLK_USBHOST20_PHY_FREECLK 121
|
||||
#define PHYCLK_USBHOST20_PHY_CLK48MOHCI 122
|
||||
#define PHYCLK_USBDRD30_UDRD30_PIPE_PCLK 123
|
||||
#define PHYCLK_USBDRD30_UDRD30_PHYCLOCK 124
|
||||
#define TOP_NR_CLK 125
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_EGL */
|
||||
|
||||
#define EGL_FOUT_EGL_PLL 1
|
||||
#define EGL_FOUT_EGL_DPLL 2
|
||||
#define EGL_MOUT_EGL_B 3
|
||||
#define EGL_MOUT_EGL_PLL 4
|
||||
#define EGL_DOUT_EGL_PLL 5
|
||||
#define EGL_DOUT_EGL_PCLK_DBG 6
|
||||
#define EGL_DOUT_EGL_ATCLK 7
|
||||
#define EGL_DOUT_PCLK_EGL 8
|
||||
#define EGL_DOUT_ACLK_EGL 9
|
||||
#define EGL_DOUT_EGL2 10
|
||||
#define EGL_DOUT_EGL1 11
|
||||
#define EGL_NR_CLK 12
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_KFC */
|
||||
|
||||
#define KFC_FOUT_KFC_PLL 1
|
||||
#define KFC_MOUT_KFC_PLL 2
|
||||
#define KFC_MOUT_KFC 3
|
||||
#define KFC_DOUT_KFC_PLL 4
|
||||
#define KFC_DOUT_PCLK_KFC 5
|
||||
#define KFC_DOUT_ACLK_KFC 6
|
||||
#define KFC_DOUT_KFC_PCLK_DBG 7
|
||||
#define KFC_DOUT_KFC_ATCLK 8
|
||||
#define KFC_DOUT_KFC2 9
|
||||
#define KFC_DOUT_KFC1 10
|
||||
#define KFC_NR_CLK 11
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_MIF */
|
||||
|
||||
#define MIF_FOUT_MEM_PLL 1
|
||||
#define MIF_FOUT_MEDIA_PLL 2
|
||||
#define MIF_FOUT_BUS_PLL 3
|
||||
#define MIF_MOUT_CLK2X_PHY 4
|
||||
#define MIF_MOUT_MIF_DREX2X 5
|
||||
#define MIF_MOUT_CLKM_PHY 6
|
||||
#define MIF_MOUT_MIF_DREX 7
|
||||
#define MIF_MOUT_MEDIA_PLL 8
|
||||
#define MIF_MOUT_BUS_PLL 9
|
||||
#define MIF_MOUT_MEM_PLL 10
|
||||
#define MIF_DOUT_ACLK_BUS_100 11
|
||||
#define MIF_DOUT_ACLK_BUS_200 12
|
||||
#define MIF_DOUT_ACLK_MIF_466 13
|
||||
#define MIF_DOUT_CLK2X_PHY 14
|
||||
#define MIF_DOUT_CLKM_PHY 15
|
||||
#define MIF_DOUT_BUS_PLL 16
|
||||
#define MIF_DOUT_MEM_PLL 17
|
||||
#define MIF_DOUT_MEDIA_PLL 18
|
||||
#define MIF_CLK_LPDDR3PHY_WRAP1 19
|
||||
#define MIF_CLK_LPDDR3PHY_WRAP0 20
|
||||
#define MIF_CLK_MONOCNT 21
|
||||
#define MIF_CLK_MIF_RTC 22
|
||||
#define MIF_CLK_DREX1 23
|
||||
#define MIF_CLK_DREX0 24
|
||||
#define MIF_CLK_INTMEM 25
|
||||
#define MIF_SCLK_LPDDR3PHY_WRAP_U1 26
|
||||
#define MIF_SCLK_LPDDR3PHY_WRAP_U0 27
|
||||
#define MIF_NR_CLK 28
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_G3D */
|
||||
|
||||
#define G3D_FOUT_G3D_PLL 1
|
||||
#define G3D_MOUT_G3D_PLL 2
|
||||
#define G3D_DOUT_PCLK_G3D 3
|
||||
#define G3D_DOUT_ACLK_G3D 4
|
||||
#define G3D_CLK_G3D_HPM 5
|
||||
#define G3D_CLK_G3D 6
|
||||
#define G3D_NR_CLK 7
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_AUD */
|
||||
|
||||
#define AUD_MOUT_SCLK_AUD_PCM 1
|
||||
#define AUD_MOUT_SCLK_AUD_I2S 2
|
||||
#define AUD_MOUT_AUD_PLL_USER 3
|
||||
#define AUD_DOUT_ACLK_AUD_131 4
|
||||
#define AUD_DOUT_SCLK_AUD_UART 5
|
||||
#define AUD_DOUT_SCLK_AUD_PCM 6
|
||||
#define AUD_DOUT_SCLK_AUD_I2S 7
|
||||
#define AUD_CLK_AUD_UART 8
|
||||
#define AUD_CLK_PCM 9
|
||||
#define AUD_CLK_I2S 10
|
||||
#define AUD_CLK_DMAC 11
|
||||
#define AUD_CLK_SRAMC 12
|
||||
#define AUD_SCLK_AUD_UART 13
|
||||
#define AUD_SCLK_PCM 14
|
||||
#define AUD_SCLK_I2S 15
|
||||
#define AUD_NR_CLK 16
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_MFC */
|
||||
|
||||
#define MFC_MOUT_ACLK_MFC_333_USER 1
|
||||
#define MFC_DOUT_PCLK_MFC_83 2
|
||||
#define MFC_CLK_MFC 3
|
||||
#define MFC_CLK_SMMU2_MFCM1 4
|
||||
#define MFC_CLK_SMMU2_MFCM0 5
|
||||
#define MFC_NR_CLK 6
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_GSCL */
|
||||
|
||||
#define GSCL_MOUT_ACLK_CSIS 1
|
||||
#define GSCL_MOUT_ACLK_GSCL_FIMC_USER 2
|
||||
#define GSCL_MOUT_ACLK_M2M_400_USER 3
|
||||
#define GSCL_MOUT_ACLK_GSCL_333_USER 4
|
||||
#define GSCL_DOUT_ACLK_CSIS_200 5
|
||||
#define GSCL_DOUT_PCLK_M2M_100 6
|
||||
#define GSCL_CLK_PIXEL_GSCL1 7
|
||||
#define GSCL_CLK_PIXEL_GSCL0 8
|
||||
#define GSCL_CLK_MSCL1 9
|
||||
#define GSCL_CLK_MSCL0 10
|
||||
#define GSCL_CLK_GSCL1 11
|
||||
#define GSCL_CLK_GSCL0 12
|
||||
#define GSCL_CLK_FIMC_LITE_D 13
|
||||
#define GSCL_CLK_FIMC_LITE_B 14
|
||||
#define GSCL_CLK_FIMC_LITE_A 15
|
||||
#define GSCL_CLK_CSIS1 16
|
||||
#define GSCL_CLK_CSIS0 17
|
||||
#define GSCL_CLK_SMMU3_LITE_D 18
|
||||
#define GSCL_CLK_SMMU3_LITE_B 19
|
||||
#define GSCL_CLK_SMMU3_LITE_A 20
|
||||
#define GSCL_CLK_SMMU3_GSCL0 21
|
||||
#define GSCL_CLK_SMMU3_GSCL1 22
|
||||
#define GSCL_CLK_SMMU3_MSCL0 23
|
||||
#define GSCL_CLK_SMMU3_MSCL1 24
|
||||
#define GSCL_SCLK_CSIS1_WRAP 25
|
||||
#define GSCL_SCLK_CSIS0_WRAP 26
|
||||
#define GSCL_NR_CLK 27
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_FSYS */
|
||||
|
||||
#define FSYS_MOUT_PHYCLK_USBHOST20_PHYCLK_USER 1
|
||||
#define FSYS_MOUT_PHYCLK_USBHOST20_FREECLK_USER 2
|
||||
#define FSYS_MOUT_PHYCLK_USBHOST20_CLK48MOHCI_USER 3
|
||||
#define FSYS_MOUT_PHYCLK_USBDRD30_PIPE_PCLK_USER 4
|
||||
#define FSYS_MOUT_PHYCLK_USBDRD30_PHYCLOCK_USER 5
|
||||
#define FSYS_CLK_TSI 6
|
||||
#define FSYS_CLK_USBLINK 7
|
||||
#define FSYS_CLK_USBHOST20 8
|
||||
#define FSYS_CLK_USBDRD30 9
|
||||
#define FSYS_CLK_SROMC 10
|
||||
#define FSYS_CLK_PDMA 11
|
||||
#define FSYS_CLK_MMC2 12
|
||||
#define FSYS_CLK_MMC1 13
|
||||
#define FSYS_CLK_MMC0 14
|
||||
#define FSYS_CLK_RTIC 15
|
||||
#define FSYS_CLK_SMMU_RTIC 16
|
||||
#define FSYS_PHYCLK_USBDRD30 17
|
||||
#define FSYS_PHYCLK_USBHOST20 18
|
||||
#define FSYS_NR_CLK 19
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_PERI */
|
||||
|
||||
#define PERI_MOUT_SCLK_SPDIF 1
|
||||
#define PERI_MOUT_SCLK_I2SCOD 2
|
||||
#define PERI_MOUT_SCLK_PCM 3
|
||||
#define PERI_DOUT_I2S 4
|
||||
#define PERI_DOUT_PCM 5
|
||||
#define PERI_CLK_WDT_KFC 6
|
||||
#define PERI_CLK_WDT_EGL 7
|
||||
#define PERI_CLK_HSIC3 8
|
||||
#define PERI_CLK_HSIC2 9
|
||||
#define PERI_CLK_HSIC1 10
|
||||
#define PERI_CLK_HSIC0 11
|
||||
#define PERI_CLK_PCM 12
|
||||
#define PERI_CLK_MCT 13
|
||||
#define PERI_CLK_I2S 14
|
||||
#define PERI_CLK_I2CHDMI 15
|
||||
#define PERI_CLK_I2C7 16
|
||||
#define PERI_CLK_I2C6 17
|
||||
#define PERI_CLK_I2C5 18
|
||||
#define PERI_CLK_I2C4 19
|
||||
#define PERI_CLK_I2C9 20
|
||||
#define PERI_CLK_I2C8 21
|
||||
#define PERI_CLK_I2C11 22
|
||||
#define PERI_CLK_I2C10 23
|
||||
#define PERI_CLK_HDMICEC 24
|
||||
#define PERI_CLK_EFUSE_WRITER 25
|
||||
#define PERI_CLK_ABB 26
|
||||
#define PERI_CLK_UART2 27
|
||||
#define PERI_CLK_UART1 28
|
||||
#define PERI_CLK_UART0 29
|
||||
#define PERI_CLK_ADC 30
|
||||
#define PERI_CLK_TMU4 31
|
||||
#define PERI_CLK_TMU3 32
|
||||
#define PERI_CLK_TMU2 33
|
||||
#define PERI_CLK_TMU1 34
|
||||
#define PERI_CLK_TMU0 35
|
||||
#define PERI_CLK_SPI2 36
|
||||
#define PERI_CLK_SPI1 37
|
||||
#define PERI_CLK_SPI0 38
|
||||
#define PERI_CLK_SPDIF 39
|
||||
#define PERI_CLK_PWM 40
|
||||
#define PERI_CLK_UART4 41
|
||||
#define PERI_CLK_CHIPID 42
|
||||
#define PERI_CLK_PROVKEY0 43
|
||||
#define PERI_CLK_PROVKEY1 44
|
||||
#define PERI_CLK_SECKEY 45
|
||||
#define PERI_CLK_TOP_RTC 46
|
||||
#define PERI_CLK_TZPC10 47
|
||||
#define PERI_CLK_TZPC9 48
|
||||
#define PERI_CLK_TZPC8 49
|
||||
#define PERI_CLK_TZPC7 50
|
||||
#define PERI_CLK_TZPC6 51
|
||||
#define PERI_CLK_TZPC5 52
|
||||
#define PERI_CLK_TZPC4 53
|
||||
#define PERI_CLK_TZPC3 54
|
||||
#define PERI_CLK_TZPC2 55
|
||||
#define PERI_CLK_TZPC1 56
|
||||
#define PERI_CLK_TZPC0 57
|
||||
#define PERI_SCLK_UART2 58
|
||||
#define PERI_SCLK_UART1 59
|
||||
#define PERI_SCLK_UART0 60
|
||||
#define PERI_SCLK_SPI2 61
|
||||
#define PERI_SCLK_SPI1 62
|
||||
#define PERI_SCLK_SPI0 63
|
||||
#define PERI_SCLK_SPDIF 64
|
||||
#define PERI_SCLK_I2S 65
|
||||
#define PERI_SCLK_PCM1 66
|
||||
#define PERI_NR_CLK 67
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_DISP */
|
||||
|
||||
#define DISP_MOUT_SCLK_HDMI_SPDIF 1
|
||||
#define DISP_MOUT_SCLK_HDMI_PIXEL 2
|
||||
#define DISP_MOUT_PHYCLK_MIPI_DPHY_4LMRXCLK_ESC0_USER 3
|
||||
#define DISP_MOUT_PHYCLK_HDMI_PHY_TMDS_CLKO_USER 4
|
||||
#define DISP_MOUT_PHYCLK_HDMI_PHY_REF_CLKO_USER 5
|
||||
#define DISP_MOUT_HDMI_PHY_PIXEL 6
|
||||
#define DISP_MOUT_PHYCLK_HDMI_LINK_O_TMDS_CLKHI_USER 7
|
||||
#define DISP_MOUT_PHYCLK_MIPI_DPHY_4L_M_TXBYTE_CLKHS 8
|
||||
#define DISP_MOUT_PHYCLK_DPTX_PHY_O_REF_CLK_24M_USER 9
|
||||
#define DISP_MOUT_PHYCLK_DPTX_PHY_CLK_DIV2_USER 10
|
||||
#define DISP_MOUT_PHYCLK_DPTX_PHY_CH3_TXD_CLK_USER 11
|
||||
#define DISP_MOUT_PHYCLK_DPTX_PHY_CH2_TXD_CLK_USER 12
|
||||
#define DISP_MOUT_PHYCLK_DPTX_PHY_CH1_TXD_CLK_USER 13
|
||||
#define DISP_MOUT_PHYCLK_DPTX_PHY_CH0_TXD_CLK_USER 14
|
||||
#define DISP_MOUT_ACLK_DISP_222_USER 15
|
||||
#define DISP_MOUT_SCLK_DISP_PIXEL_USER 16
|
||||
#define DISP_MOUT_ACLK_DISP_333_USER 17
|
||||
#define DISP_DOUT_SCLK_HDMI_PHY_PIXEL_CLKI 18
|
||||
#define DISP_DOUT_SCLK_FIMD1_EXTCLKPLL 19
|
||||
#define DISP_DOUT_PCLK_DISP_111 20
|
||||
#define DISP_CLK_SMMU_TV 21
|
||||
#define DISP_CLK_SMMU_FIMD1M1 22
|
||||
#define DISP_CLK_SMMU_FIMD1M0 23
|
||||
#define DISP_CLK_PIXEL_MIXER 24
|
||||
#define DISP_CLK_PIXEL_DISP 25
|
||||
#define DISP_CLK_MIXER 26
|
||||
#define DISP_CLK_MIPIPHY 27
|
||||
#define DISP_CLK_HDMIPHY 28
|
||||
#define DISP_CLK_HDMI 29
|
||||
#define DISP_CLK_FIMD1 30
|
||||
#define DISP_CLK_DSIM1 31
|
||||
#define DISP_CLK_DPPHY 32
|
||||
#define DISP_CLK_DP 33
|
||||
#define DISP_SCLK_PIXEL 34
|
||||
#define DISP_MOUT_HDMI_PHY_PIXEL_USER 35
|
||||
#define DISP_NR_CLK 36
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_G2D */
|
||||
|
||||
#define G2D_MOUT_ACLK_G2D_333_USER 1
|
||||
#define G2D_DOUT_PCLK_G2D_83 2
|
||||
#define G2D_CLK_SMMU3_JPEG 3
|
||||
#define G2D_CLK_MDMA 4
|
||||
#define G2D_CLK_JPEG 5
|
||||
#define G2D_CLK_G2D 6
|
||||
#define G2D_CLK_SSS 7
|
||||
#define G2D_CLK_SLIM_SSS 8
|
||||
#define G2D_CLK_SMMU_SLIM_SSS 9
|
||||
#define G2D_CLK_SMMU_SSS 10
|
||||
#define G2D_CLK_SMMU_MDMA 11
|
||||
#define G2D_CLK_SMMU3_G2D 12
|
||||
#define G2D_NR_CLK 13
|
||||
|
||||
|
||||
/* List Of Clocks For CMU_ISP */
|
||||
|
||||
#define ISP_MOUT_ISP_400_USER 1
|
||||
#define ISP_MOUT_ISP_266_USER 2
|
||||
#define ISP_DOUT_SCLK_MPWM 3
|
||||
#define ISP_DOUT_CA5_PCLKDBG 4
|
||||
#define ISP_DOUT_CA5_ATCLKIN 5
|
||||
#define ISP_DOUT_PCLK_ISP_133 6
|
||||
#define ISP_DOUT_PCLK_ISP_66 7
|
||||
#define ISP_CLK_GIC 8
|
||||
#define ISP_CLK_WDT 9
|
||||
#define ISP_CLK_UART 10
|
||||
#define ISP_CLK_SPI1 11
|
||||
#define ISP_CLK_SPI0 12
|
||||
#define ISP_CLK_SMMU_SCALERP 13
|
||||
#define ISP_CLK_SMMU_SCALERC 14
|
||||
#define ISP_CLK_SMMU_ISPCX 15
|
||||
#define ISP_CLK_SMMU_ISP 16
|
||||
#define ISP_CLK_SMMU_FD 17
|
||||
#define ISP_CLK_SMMU_DRC 18
|
||||
#define ISP_CLK_PWM 19
|
||||
#define ISP_CLK_MTCADC 20
|
||||
#define ISP_CLK_MPWM 21
|
||||
#define ISP_CLK_MCUCTL 22
|
||||
#define ISP_CLK_I2C1 23
|
||||
#define ISP_CLK_I2C0 24
|
||||
#define ISP_CLK_FIMC_SCALERP 25
|
||||
#define ISP_CLK_FIMC_SCALERC 26
|
||||
#define ISP_CLK_FIMC 27
|
||||
#define ISP_CLK_FIMC_FD 28
|
||||
#define ISP_CLK_FIMC_DRC 29
|
||||
#define ISP_CLK_CA5 30
|
||||
#define ISP_SCLK_SPI0_EXT 31
|
||||
#define ISP_SCLK_SPI1_EXT 32
|
||||
#define ISP_SCLK_UART_EXT 33
|
||||
#define ISP_NR_CLK 34
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef _DT_BINDINGS_CLOCK_EXYNOS_5410_H
|
||||
#define _DT_BINDINGS_CLOCK_EXYNOS_5410_H
|
||||
|
||||
/* core clocks */
|
||||
#define CLK_FIN_PLL 1
|
||||
#define CLK_FOUT_APLL 2
|
||||
#define CLK_FOUT_CPLL 3
|
||||
#define CLK_FOUT_MPLL 4
|
||||
#define CLK_FOUT_BPLL 5
|
||||
#define CLK_FOUT_KPLL 6
|
||||
|
||||
/* gate for special clocks (sclk) */
|
||||
#define CLK_SCLK_UART0 128
|
||||
#define CLK_SCLK_UART1 129
|
||||
#define CLK_SCLK_UART2 130
|
||||
#define CLK_SCLK_UART3 131
|
||||
#define CLK_SCLK_MMC0 132
|
||||
#define CLK_SCLK_MMC1 133
|
||||
#define CLK_SCLK_MMC2 134
|
||||
|
||||
/* gate clocks */
|
||||
#define CLK_UART0 257
|
||||
#define CLK_UART1 258
|
||||
#define CLK_UART2 259
|
||||
#define CLK_UART3 260
|
||||
#define CLK_MCT 315
|
||||
#define CLK_MMC0 351
|
||||
#define CLK_MMC1 352
|
||||
#define CLK_MMC2 353
|
||||
|
||||
#define CLK_NR_CLKS 512
|
||||
|
||||
#endif /* _DT_BINDINGS_CLOCK_EXYNOS_5410_H */
|
||||
@@ -58,6 +58,9 @@
|
||||
#define CLK_SCLK_GSCL_WA 156
|
||||
#define CLK_SCLK_GSCL_WB 157
|
||||
#define CLK_SCLK_HDMIPHY 158
|
||||
#define CLK_MAU_EPLL 159
|
||||
#define CLK_SCLK_HSIC_12M 160
|
||||
#define CLK_SCLK_MPHY_IXTAL24 161
|
||||
|
||||
/* gate clocks */
|
||||
#define CLK_ACLK66_PERIC 256
|
||||
@@ -69,10 +72,10 @@
|
||||
#define CLK_I2C1 262
|
||||
#define CLK_I2C2 263
|
||||
#define CLK_I2C3 264
|
||||
#define CLK_I2C4 265
|
||||
#define CLK_I2C5 266
|
||||
#define CLK_I2C6 267
|
||||
#define CLK_I2C7 268
|
||||
#define CLK_USI0 265
|
||||
#define CLK_USI1 266
|
||||
#define CLK_USI2 267
|
||||
#define CLK_USI3 268
|
||||
#define CLK_I2C_HDMI 269
|
||||
#define CLK_TSADC 270
|
||||
#define CLK_SPI0 271
|
||||
@@ -85,9 +88,9 @@
|
||||
#define CLK_PCM2 278
|
||||
#define CLK_PWM 279
|
||||
#define CLK_SPDIF 280
|
||||
#define CLK_I2C8 281
|
||||
#define CLK_I2C9 282
|
||||
#define CLK_I2C10 283
|
||||
#define CLK_USI4 281
|
||||
#define CLK_USI5 282
|
||||
#define CLK_USI6 283
|
||||
#define CLK_ACLK66_PSGEN 300
|
||||
#define CLK_CHIPID 301
|
||||
#define CLK_SYSREG 302
|
||||
@@ -140,7 +143,8 @@
|
||||
#define CLK_HDMI 413
|
||||
#define CLK_ACLK300_DISP1 420
|
||||
#define CLK_FIMD1 421
|
||||
#define CLK_SMMU_FIMD1 422
|
||||
#define CLK_SMMU_FIMD1M0 422
|
||||
#define CLK_SMMU_FIMD1M1 423
|
||||
#define CLK_ACLK166 430
|
||||
#define CLK_MIXER 431
|
||||
#define CLK_ACLK266 440
|
||||
@@ -152,6 +156,7 @@
|
||||
#define CLK_JPEG 451
|
||||
#define CLK_JPEG2 452
|
||||
#define CLK_SMMU_JPEG 453
|
||||
#define CLK_SMMU_JPEG2 454
|
||||
#define CLK_ACLK300_GSCL 460
|
||||
#define CLK_SMMU_GSCL0 461
|
||||
#define CLK_SMMU_GSCL1 462
|
||||
@@ -159,7 +164,7 @@
|
||||
#define CLK_GSCL_WB 464
|
||||
#define CLK_GSCL0 465
|
||||
#define CLK_GSCL1 466
|
||||
#define CLK_CLK_3AA 467
|
||||
#define CLK_FIMC_3AA 467
|
||||
#define CLK_ACLK266_G2D 470
|
||||
#define CLK_SSS 471
|
||||
#define CLK_SLIM_SSS 472
|
||||
@@ -172,12 +177,32 @@
|
||||
#define CLK_SMMU_FIMCL1 493
|
||||
#define CLK_SMMU_FIMCL3 494
|
||||
#define CLK_FIMC_LITE3 495
|
||||
#define CLK_FIMC_LITE0 496
|
||||
#define CLK_FIMC_LITE1 497
|
||||
#define CLK_ACLK_G3D 500
|
||||
#define CLK_G3D 501
|
||||
#define CLK_SMMU_MIXER 502
|
||||
#define CLK_SMMU_G2D 503
|
||||
#define CLK_SMMU_MDMA0 504
|
||||
#define CLK_MC 505
|
||||
#define CLK_TOP_RTC 506
|
||||
#define CLK_SCLK_UART_ISP 510
|
||||
#define CLK_SCLK_SPI0_ISP 511
|
||||
#define CLK_SCLK_SPI1_ISP 512
|
||||
#define CLK_SCLK_PWM_ISP 513
|
||||
#define CLK_SCLK_ISP_SENSOR0 514
|
||||
#define CLK_SCLK_ISP_SENSOR1 515
|
||||
#define CLK_SCLK_ISP_SENSOR2 516
|
||||
#define CLK_ACLK432_SCALER 517
|
||||
#define CLK_ACLK432_CAM 518
|
||||
#define CLK_ACLK_FL1550_CAM 519
|
||||
#define CLK_ACLK550_CAM 520
|
||||
|
||||
/* mux clocks */
|
||||
#define CLK_MOUT_HDMI 640
|
||||
#define CLK_MOUT_G3D 641
|
||||
#define CLK_MOUT_VPLL 642
|
||||
#define CLK_MOUT_MAUDIO0 643
|
||||
|
||||
/* divider clocks */
|
||||
#define CLK_DOUT_PIXEL 768
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Linaro Ltd.
|
||||
* Copyright (c) 2014 Hisilicon Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __DTS_HIX5HD2_CLOCK_H
|
||||
#define __DTS_HIX5HD2_CLOCK_H
|
||||
|
||||
/* fixed rate */
|
||||
#define HIX5HD2_FIXED_1200M 1
|
||||
#define HIX5HD2_FIXED_400M 2
|
||||
#define HIX5HD2_FIXED_48M 3
|
||||
#define HIX5HD2_FIXED_24M 4
|
||||
#define HIX5HD2_FIXED_600M 5
|
||||
#define HIX5HD2_FIXED_300M 6
|
||||
#define HIX5HD2_FIXED_75M 7
|
||||
#define HIX5HD2_FIXED_200M 8
|
||||
#define HIX5HD2_FIXED_100M 9
|
||||
#define HIX5HD2_FIXED_40M 10
|
||||
#define HIX5HD2_FIXED_150M 11
|
||||
#define HIX5HD2_FIXED_1728M 12
|
||||
#define HIX5HD2_FIXED_28P8M 13
|
||||
#define HIX5HD2_FIXED_432M 14
|
||||
#define HIX5HD2_FIXED_345P6M 15
|
||||
#define HIX5HD2_FIXED_288M 16
|
||||
#define HIX5HD2_FIXED_60M 17
|
||||
#define HIX5HD2_FIXED_750M 18
|
||||
#define HIX5HD2_FIXED_500M 19
|
||||
#define HIX5HD2_FIXED_54M 20
|
||||
#define HIX5HD2_FIXED_27M 21
|
||||
#define HIX5HD2_FIXED_1500M 22
|
||||
#define HIX5HD2_FIXED_375M 23
|
||||
#define HIX5HD2_FIXED_187M 24
|
||||
#define HIX5HD2_FIXED_250M 25
|
||||
#define HIX5HD2_FIXED_125M 26
|
||||
#define HIX5HD2_FIXED_2P02M 27
|
||||
#define HIX5HD2_FIXED_50M 28
|
||||
#define HIX5HD2_FIXED_25M 29
|
||||
#define HIX5HD2_FIXED_83M 30
|
||||
|
||||
/* mux clocks */
|
||||
#define HIX5HD2_SFC_MUX 64
|
||||
#define HIX5HD2_MMC_MUX 65
|
||||
#define HIX5HD2_FEPHY_MUX 66
|
||||
|
||||
/* gate clocks */
|
||||
#define HIX5HD2_SFC_RST 128
|
||||
#define HIX5HD2_SFC_CLK 129
|
||||
#define HIX5HD2_MMC_CIU_CLK 130
|
||||
#define HIX5HD2_MMC_BIU_CLK 131
|
||||
#define HIX5HD2_MMC_CIU_RST 132
|
||||
|
||||
#define HIX5HD2_NR_CLKS 256
|
||||
#endif /* __DTS_HIX5HD2_CLOCK_H */
|
||||
@@ -0,0 +1,256 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Freescale Semiconductor, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __DT_BINDINGS_CLOCK_IMX6SX_H
|
||||
#define __DT_BINDINGS_CLOCK_IMX6SX_H
|
||||
|
||||
#define IMX6SX_CLK_DUMMY 0
|
||||
#define IMX6SX_CLK_CKIL 1
|
||||
#define IMX6SX_CLK_CKIH 2
|
||||
#define IMX6SX_CLK_OSC 3
|
||||
#define IMX6SX_CLK_PLL1_SYS 4
|
||||
#define IMX6SX_CLK_PLL2_BUS 5
|
||||
#define IMX6SX_CLK_PLL3_USB_OTG 6
|
||||
#define IMX6SX_CLK_PLL4_AUDIO 7
|
||||
#define IMX6SX_CLK_PLL5_VIDEO 8
|
||||
#define IMX6SX_CLK_PLL6_ENET 9
|
||||
#define IMX6SX_CLK_PLL7_USB_HOST 10
|
||||
#define IMX6SX_CLK_USBPHY1 11
|
||||
#define IMX6SX_CLK_USBPHY2 12
|
||||
#define IMX6SX_CLK_USBPHY1_GATE 13
|
||||
#define IMX6SX_CLK_USBPHY2_GATE 14
|
||||
#define IMX6SX_CLK_PCIE_REF 15
|
||||
#define IMX6SX_CLK_PCIE_REF_125M 16
|
||||
#define IMX6SX_CLK_ENET_REF 17
|
||||
#define IMX6SX_CLK_PLL2_PFD0 18
|
||||
#define IMX6SX_CLK_PLL2_PFD1 19
|
||||
#define IMX6SX_CLK_PLL2_PFD2 20
|
||||
#define IMX6SX_CLK_PLL2_PFD3 21
|
||||
#define IMX6SX_CLK_PLL3_PFD0 22
|
||||
#define IMX6SX_CLK_PLL3_PFD1 23
|
||||
#define IMX6SX_CLK_PLL3_PFD2 24
|
||||
#define IMX6SX_CLK_PLL3_PFD3 25
|
||||
#define IMX6SX_CLK_PLL2_198M 26
|
||||
#define IMX6SX_CLK_PLL3_120M 27
|
||||
#define IMX6SX_CLK_PLL3_80M 28
|
||||
#define IMX6SX_CLK_PLL3_60M 29
|
||||
#define IMX6SX_CLK_TWD 30
|
||||
#define IMX6SX_CLK_PLL4_POST_DIV 31
|
||||
#define IMX6SX_CLK_PLL4_AUDIO_DIV 32
|
||||
#define IMX6SX_CLK_PLL5_POST_DIV 33
|
||||
#define IMX6SX_CLK_PLL5_VIDEO_DIV 34
|
||||
#define IMX6SX_CLK_STEP 35
|
||||
#define IMX6SX_CLK_PLL1_SW 36
|
||||
#define IMX6SX_CLK_OCRAM_SEL 37
|
||||
#define IMX6SX_CLK_PERIPH_PRE 38
|
||||
#define IMX6SX_CLK_PERIPH2_PRE 39
|
||||
#define IMX6SX_CLK_PERIPH_CLK2_SEL 40
|
||||
#define IMX6SX_CLK_PERIPH2_CLK2_SEL 41
|
||||
#define IMX6SX_CLK_PCIE_AXI_SEL 42
|
||||
#define IMX6SX_CLK_GPU_AXI_SEL 43
|
||||
#define IMX6SX_CLK_GPU_CORE_SEL 44
|
||||
#define IMX6SX_CLK_EIM_SLOW_SEL 45
|
||||
#define IMX6SX_CLK_USDHC1_SEL 46
|
||||
#define IMX6SX_CLK_USDHC2_SEL 47
|
||||
#define IMX6SX_CLK_USDHC3_SEL 48
|
||||
#define IMX6SX_CLK_USDHC4_SEL 49
|
||||
#define IMX6SX_CLK_SSI1_SEL 50
|
||||
#define IMX6SX_CLK_SSI2_SEL 51
|
||||
#define IMX6SX_CLK_SSI3_SEL 52
|
||||
#define IMX6SX_CLK_QSPI1_SEL 53
|
||||
#define IMX6SX_CLK_PERCLK_SEL 54
|
||||
#define IMX6SX_CLK_VID_SEL 55
|
||||
#define IMX6SX_CLK_ESAI_SEL 56
|
||||
#define IMX6SX_CLK_LDB_DI0_DIV_SEL 57
|
||||
#define IMX6SX_CLK_LDB_DI1_DIV_SEL 58
|
||||
#define IMX6SX_CLK_CAN_SEL 59
|
||||
#define IMX6SX_CLK_UART_SEL 60
|
||||
#define IMX6SX_CLK_QSPI2_SEL 61
|
||||
#define IMX6SX_CLK_LDB_DI1_SEL 62
|
||||
#define IMX6SX_CLK_LDB_DI0_SEL 63
|
||||
#define IMX6SX_CLK_SPDIF_SEL 64
|
||||
#define IMX6SX_CLK_AUDIO_SEL 65
|
||||
#define IMX6SX_CLK_ENET_PRE_SEL 66
|
||||
#define IMX6SX_CLK_ENET_SEL 67
|
||||
#define IMX6SX_CLK_M4_PRE_SEL 68
|
||||
#define IMX6SX_CLK_M4_SEL 69
|
||||
#define IMX6SX_CLK_ECSPI_SEL 70
|
||||
#define IMX6SX_CLK_LCDIF1_PRE_SEL 71
|
||||
#define IMX6SX_CLK_LCDIF2_PRE_SEL 72
|
||||
#define IMX6SX_CLK_LCDIF1_SEL 73
|
||||
#define IMX6SX_CLK_LCDIF2_SEL 74
|
||||
#define IMX6SX_CLK_DISPLAY_SEL 75
|
||||
#define IMX6SX_CLK_CSI_SEL 76
|
||||
#define IMX6SX_CLK_CKO1_SEL 77
|
||||
#define IMX6SX_CLK_CKO2_SEL 78
|
||||
#define IMX6SX_CLK_CKO 79
|
||||
#define IMX6SX_CLK_PERIPH_CLK2 80
|
||||
#define IMX6SX_CLK_PERIPH2_CLK2 81
|
||||
#define IMX6SX_CLK_IPG 82
|
||||
#define IMX6SX_CLK_GPU_CORE_PODF 83
|
||||
#define IMX6SX_CLK_GPU_AXI_PODF 84
|
||||
#define IMX6SX_CLK_LCDIF1_PODF 85
|
||||
#define IMX6SX_CLK_QSPI1_PODF 86
|
||||
#define IMX6SX_CLK_EIM_SLOW_PODF 87
|
||||
#define IMX6SX_CLK_LCDIF2_PODF 88
|
||||
#define IMX6SX_CLK_PERCLK 89
|
||||
#define IMX6SX_CLK_VID_PODF 90
|
||||
#define IMX6SX_CLK_CAN_PODF 91
|
||||
#define IMX6SX_CLK_USDHC1_PODF 92
|
||||
#define IMX6SX_CLK_USDHC2_PODF 93
|
||||
#define IMX6SX_CLK_USDHC3_PODF 94
|
||||
#define IMX6SX_CLK_USDHC4_PODF 95
|
||||
#define IMX6SX_CLK_UART_PODF 96
|
||||
#define IMX6SX_CLK_ESAI_PRED 97
|
||||
#define IMX6SX_CLK_ESAI_PODF 98
|
||||
#define IMX6SX_CLK_SSI3_PRED 99
|
||||
#define IMX6SX_CLK_SSI3_PODF 100
|
||||
#define IMX6SX_CLK_SSI1_PRED 101
|
||||
#define IMX6SX_CLK_SSI1_PODF 102
|
||||
#define IMX6SX_CLK_QSPI2_PRED 103
|
||||
#define IMX6SX_CLK_QSPI2_PODF 104
|
||||
#define IMX6SX_CLK_SSI2_PRED 105
|
||||
#define IMX6SX_CLK_SSI2_PODF 106
|
||||
#define IMX6SX_CLK_SPDIF_PRED 107
|
||||
#define IMX6SX_CLK_SPDIF_PODF 108
|
||||
#define IMX6SX_CLK_AUDIO_PRED 109
|
||||
#define IMX6SX_CLK_AUDIO_PODF 110
|
||||
#define IMX6SX_CLK_ENET_PODF 111
|
||||
#define IMX6SX_CLK_M4_PODF 112
|
||||
#define IMX6SX_CLK_ECSPI_PODF 113
|
||||
#define IMX6SX_CLK_LCDIF1_PRED 114
|
||||
#define IMX6SX_CLK_LCDIF2_PRED 115
|
||||
#define IMX6SX_CLK_DISPLAY_PODF 116
|
||||
#define IMX6SX_CLK_CSI_PODF 117
|
||||
#define IMX6SX_CLK_LDB_DI0_DIV_3_5 118
|
||||
#define IMX6SX_CLK_LDB_DI0_DIV_7 119
|
||||
#define IMX6SX_CLK_LDB_DI1_DIV_3_5 120
|
||||
#define IMX6SX_CLK_LDB_DI1_DIV_7 121
|
||||
#define IMX6SX_CLK_CKO1_PODF 122
|
||||
#define IMX6SX_CLK_CKO2_PODF 123
|
||||
#define IMX6SX_CLK_PERIPH 124
|
||||
#define IMX6SX_CLK_PERIPH2 125
|
||||
#define IMX6SX_CLK_OCRAM 126
|
||||
#define IMX6SX_CLK_AHB 127
|
||||
#define IMX6SX_CLK_MMDC_PODF 128
|
||||
#define IMX6SX_CLK_ARM 129
|
||||
#define IMX6SX_CLK_AIPS_TZ1 130
|
||||
#define IMX6SX_CLK_AIPS_TZ2 131
|
||||
#define IMX6SX_CLK_APBH_DMA 132
|
||||
#define IMX6SX_CLK_ASRC_GATE 133
|
||||
#define IMX6SX_CLK_CAAM_MEM 134
|
||||
#define IMX6SX_CLK_CAAM_ACLK 135
|
||||
#define IMX6SX_CLK_CAAM_IPG 136
|
||||
#define IMX6SX_CLK_CAN1_IPG 137
|
||||
#define IMX6SX_CLK_CAN1_SERIAL 138
|
||||
#define IMX6SX_CLK_CAN2_IPG 139
|
||||
#define IMX6SX_CLK_CAN2_SERIAL 140
|
||||
#define IMX6SX_CLK_CPU_DEBUG 141
|
||||
#define IMX6SX_CLK_DCIC1 142
|
||||
#define IMX6SX_CLK_DCIC2 143
|
||||
#define IMX6SX_CLK_AIPS_TZ3 144
|
||||
#define IMX6SX_CLK_ECSPI1 145
|
||||
#define IMX6SX_CLK_ECSPI2 146
|
||||
#define IMX6SX_CLK_ECSPI3 147
|
||||
#define IMX6SX_CLK_ECSPI4 148
|
||||
#define IMX6SX_CLK_ECSPI5 149
|
||||
#define IMX6SX_CLK_EPIT1 150
|
||||
#define IMX6SX_CLK_EPIT2 151
|
||||
#define IMX6SX_CLK_ESAI_EXTAL 152
|
||||
#define IMX6SX_CLK_WAKEUP 153
|
||||
#define IMX6SX_CLK_GPT_BUS 154
|
||||
#define IMX6SX_CLK_GPT_SERIAL 155
|
||||
#define IMX6SX_CLK_GPU 156
|
||||
#define IMX6SX_CLK_OCRAM_S 157
|
||||
#define IMX6SX_CLK_CANFD 158
|
||||
#define IMX6SX_CLK_CSI 159
|
||||
#define IMX6SX_CLK_I2C1 160
|
||||
#define IMX6SX_CLK_I2C2 161
|
||||
#define IMX6SX_CLK_I2C3 162
|
||||
#define IMX6SX_CLK_OCOTP 163
|
||||
#define IMX6SX_CLK_IOMUXC 164
|
||||
#define IMX6SX_CLK_IPMUX1 165
|
||||
#define IMX6SX_CLK_IPMUX2 166
|
||||
#define IMX6SX_CLK_IPMUX3 167
|
||||
#define IMX6SX_CLK_TZASC1 168
|
||||
#define IMX6SX_CLK_LCDIF_APB 169
|
||||
#define IMX6SX_CLK_PXP_AXI 170
|
||||
#define IMX6SX_CLK_M4 171
|
||||
#define IMX6SX_CLK_ENET 172
|
||||
#define IMX6SX_CLK_DISPLAY_AXI 173
|
||||
#define IMX6SX_CLK_LCDIF2_PIX 174
|
||||
#define IMX6SX_CLK_LCDIF1_PIX 175
|
||||
#define IMX6SX_CLK_LDB_DI0 176
|
||||
#define IMX6SX_CLK_QSPI1 177
|
||||
#define IMX6SX_CLK_MLB 178
|
||||
#define IMX6SX_CLK_MMDC_P0_FAST 179
|
||||
#define IMX6SX_CLK_MMDC_P0_IPG 180
|
||||
#define IMX6SX_CLK_AXI 181
|
||||
#define IMX6SX_CLK_PCIE_AXI 182
|
||||
#define IMX6SX_CLK_QSPI2 183
|
||||
#define IMX6SX_CLK_PER1_BCH 184
|
||||
#define IMX6SX_CLK_PER2_MAIN 185
|
||||
#define IMX6SX_CLK_PWM1 186
|
||||
#define IMX6SX_CLK_PWM2 187
|
||||
#define IMX6SX_CLK_PWM3 188
|
||||
#define IMX6SX_CLK_PWM4 189
|
||||
#define IMX6SX_CLK_GPMI_BCH_APB 190
|
||||
#define IMX6SX_CLK_GPMI_BCH 191
|
||||
#define IMX6SX_CLK_GPMI_IO 192
|
||||
#define IMX6SX_CLK_GPMI_APB 193
|
||||
#define IMX6SX_CLK_ROM 194
|
||||
#define IMX6SX_CLK_SDMA 195
|
||||
#define IMX6SX_CLK_SPBA 196
|
||||
#define IMX6SX_CLK_SPDIF 197
|
||||
#define IMX6SX_CLK_SSI1_IPG 198
|
||||
#define IMX6SX_CLK_SSI2_IPG 199
|
||||
#define IMX6SX_CLK_SSI3_IPG 200
|
||||
#define IMX6SX_CLK_SSI1 201
|
||||
#define IMX6SX_CLK_SSI2 202
|
||||
#define IMX6SX_CLK_SSI3 203
|
||||
#define IMX6SX_CLK_UART_IPG 204
|
||||
#define IMX6SX_CLK_UART_SERIAL 205
|
||||
#define IMX6SX_CLK_SAI1 206
|
||||
#define IMX6SX_CLK_SAI2 207
|
||||
#define IMX6SX_CLK_USBOH3 208
|
||||
#define IMX6SX_CLK_USDHC1 209
|
||||
#define IMX6SX_CLK_USDHC2 210
|
||||
#define IMX6SX_CLK_USDHC3 211
|
||||
#define IMX6SX_CLK_USDHC4 212
|
||||
#define IMX6SX_CLK_EIM_SLOW 213
|
||||
#define IMX6SX_CLK_PWM8 214
|
||||
#define IMX6SX_CLK_VADC 215
|
||||
#define IMX6SX_CLK_GIS 216
|
||||
#define IMX6SX_CLK_I2C4 217
|
||||
#define IMX6SX_CLK_PWM5 218
|
||||
#define IMX6SX_CLK_PWM6 219
|
||||
#define IMX6SX_CLK_PWM7 220
|
||||
#define IMX6SX_CLK_CKO1 221
|
||||
#define IMX6SX_CLK_CKO2 222
|
||||
#define IMX6SX_CLK_IPP_DI0 223
|
||||
#define IMX6SX_CLK_IPP_DI1 224
|
||||
#define IMX6SX_CLK_ENET_AHB 225
|
||||
#define IMX6SX_CLK_OCRAM_PODF 226
|
||||
#define IMX6SX_CLK_GPT_3M 227
|
||||
#define IMX6SX_CLK_ENET_PTP 228
|
||||
#define IMX6SX_CLK_ENET_PTP_REF 229
|
||||
#define IMX6SX_CLK_ENET2_REF 230
|
||||
#define IMX6SX_CLK_ENET2_REF_125M 231
|
||||
#define IMX6SX_CLK_AUDIO 232
|
||||
#define IMX6SX_CLK_LVDS1_SEL 233
|
||||
#define IMX6SX_CLK_LVDS1_OUT 234
|
||||
#define IMX6SX_CLK_ASRC_IPG 235
|
||||
#define IMX6SX_CLK_ASRC_MEM 236
|
||||
#define IMX6SX_CLK_SAI1_IPG 237
|
||||
#define IMX6SX_CLK_SAI2_IPG 238
|
||||
#define IMX6SX_CLK_ESAI_IPG 239
|
||||
#define IMX6SX_CLK_ESAI_MEM 240
|
||||
#define IMX6SX_CLK_CLK_END 241
|
||||
|
||||
#endif /* __DT_BINDINGS_CLOCK_IMX6SX_H */
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2014 LSI Corporation
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_AXM5516_H
|
||||
#define _DT_BINDINGS_CLK_AXM5516_H
|
||||
|
||||
#define AXXIA_CLK_FAB_PLL 0
|
||||
#define AXXIA_CLK_CPU_PLL 1
|
||||
#define AXXIA_CLK_SYS_PLL 2
|
||||
#define AXXIA_CLK_SM0_PLL 3
|
||||
#define AXXIA_CLK_SM1_PLL 4
|
||||
#define AXXIA_CLK_FAB_DIV 5
|
||||
#define AXXIA_CLK_SYS_DIV 6
|
||||
#define AXXIA_CLK_NRCP_DIV 7
|
||||
#define AXXIA_CLK_CPU0_DIV 8
|
||||
#define AXXIA_CLK_CPU1_DIV 9
|
||||
#define AXXIA_CLK_CPU2_DIV 10
|
||||
#define AXXIA_CLK_CPU3_DIV 11
|
||||
#define AXXIA_CLK_PER_DIV 12
|
||||
#define AXXIA_CLK_MMC_DIV 13
|
||||
#define AXXIA_CLK_FAB 14
|
||||
#define AXXIA_CLK_SYS 15
|
||||
#define AXXIA_CLK_NRCP 16
|
||||
#define AXXIA_CLK_CPU0 17
|
||||
#define AXXIA_CLK_CPU1 18
|
||||
#define AXXIA_CLK_CPU2 19
|
||||
#define AXXIA_CLK_CPU3 20
|
||||
#define AXXIA_CLK_PER 21
|
||||
#define AXXIA_CLK_MMC 22
|
||||
|
||||
#endif
|
||||
@@ -51,7 +51,7 @@
|
||||
#define QDSS_TSCTR_CLK 34
|
||||
#define SFAB_ADM0_M0_A_CLK 35
|
||||
#define SFAB_ADM0_M1_A_CLK 36
|
||||
#define SFAB_ADM0_M2_A_CLK 37
|
||||
#define SFAB_ADM0_M2_H_CLK 37
|
||||
#define ADM0_CLK 38
|
||||
#define ADM0_PBUS_CLK 39
|
||||
#define MSS_XPU_CLK 40
|
||||
@@ -99,7 +99,7 @@
|
||||
#define CFPB2_H_CLK 82
|
||||
#define SFAB_CFPB_M_H_CLK 83
|
||||
#define CFPB_MASTER_H_CLK 84
|
||||
#define SFAB_CFPB_S_HCLK 85
|
||||
#define SFAB_CFPB_S_H_CLK 85
|
||||
#define CFPB_SPLITTER_H_CLK 86
|
||||
#define TSIF_H_CLK 87
|
||||
#define TSIF_INACTIVITY_TIMERS_CLK 88
|
||||
@@ -110,7 +110,6 @@
|
||||
#define CE1_SLEEP_CLK 93
|
||||
#define CE2_H_CLK 94
|
||||
#define CE2_CORE_CLK 95
|
||||
#define CE2_SLEEP_CLK 96
|
||||
#define SFPB_H_CLK_SRC 97
|
||||
#define SFPB_H_CLK 98
|
||||
#define SFAB_SFPB_M_H_CLK 99
|
||||
@@ -252,7 +251,7 @@
|
||||
#define MSS_S_H_CLK 235
|
||||
#define MSS_CXO_SRC_CLK 236
|
||||
#define SATA_H_CLK 237
|
||||
#define SATA_SRC_CLK 238
|
||||
#define SATA_CLK_SRC 238
|
||||
#define SATA_RXOOB_CLK 239
|
||||
#define SATA_PMALIVE_CLK 240
|
||||
#define SATA_PHY_REF_CLK 241
|
||||
|
||||
@@ -316,5 +316,9 @@
|
||||
#define GCC_CE2_CLK_SLEEP_ENA 299
|
||||
#define GCC_CE2_AXI_CLK_SLEEP_ENA 300
|
||||
#define GCC_CE2_AHB_CLK_SLEEP_ENA 301
|
||||
#define GPLL4 302
|
||||
#define GPLL4_VOTE 303
|
||||
#define GCC_SDCC1_CDCCAL_SLEEP_CLK 304
|
||||
#define GCC_SDCC1_CDCCAL_FF_CLK 305
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Renesas Solutions Corp.
|
||||
* Copyright (C) 2014 Wolfram Sang, Sang Engineering <wsa@sang-engineering.com>
|
||||
*
|
||||
* 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; version 2 of the License.
|
||||
*/
|
||||
|
||||
#ifndef __DT_BINDINGS_CLOCK_R7S72100_H__
|
||||
#define __DT_BINDINGS_CLOCK_R7S72100_H__
|
||||
|
||||
#define R7S72100_CLK_PLL 0
|
||||
|
||||
/* MSTP3 */
|
||||
#define R7S72100_CLK_MTU2 3
|
||||
|
||||
/* MSTP4 */
|
||||
#define R7S72100_CLK_SCIF0 7
|
||||
#define R7S72100_CLK_SCIF1 6
|
||||
#define R7S72100_CLK_SCIF2 5
|
||||
#define R7S72100_CLK_SCIF3 4
|
||||
#define R7S72100_CLK_SCIF4 3
|
||||
#define R7S72100_CLK_SCIF5 2
|
||||
#define R7S72100_CLK_SCIF6 1
|
||||
#define R7S72100_CLK_SCIF7 0
|
||||
|
||||
/* MSTP9 */
|
||||
#define R7S72100_CLK_I2C0 7
|
||||
#define R7S72100_CLK_I2C1 6
|
||||
#define R7S72100_CLK_I2C2 5
|
||||
#define R7S72100_CLK_I2C3 4
|
||||
|
||||
/* MSTP10 */
|
||||
#define R7S72100_CLK_SPI0 7
|
||||
#define R7S72100_CLK_SPI1 6
|
||||
#define R7S72100_CLK_SPI2 5
|
||||
#define R7S72100_CLK_SPI3 4
|
||||
#define R7S72100_CLK_SPI4 3
|
||||
|
||||
#endif /* __DT_BINDINGS_CLOCK_R7S72100_H__ */
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Horms Solutions Ltd.
|
||||
*
|
||||
* Contact: Simon Horman <horms@verge.net.au>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __DT_BINDINGS_CLOCK_R8A7779_H__
|
||||
#define __DT_BINDINGS_CLOCK_R8A7779_H__
|
||||
|
||||
/* CPG */
|
||||
#define R8A7779_CLK_PLLA 0
|
||||
#define R8A7779_CLK_Z 1
|
||||
#define R8A7779_CLK_ZS 2
|
||||
#define R8A7779_CLK_S 3
|
||||
#define R8A7779_CLK_S1 4
|
||||
#define R8A7779_CLK_P 5
|
||||
#define R8A7779_CLK_B 6
|
||||
#define R8A7779_CLK_OUT 7
|
||||
|
||||
/* MSTP 0 */
|
||||
#define R8A7779_CLK_HSPI 7
|
||||
#define R8A7779_CLK_TMU2 14
|
||||
#define R8A7779_CLK_TMU1 15
|
||||
#define R8A7779_CLK_TMU0 16
|
||||
#define R8A7779_CLK_HSCIF1 18
|
||||
#define R8A7779_CLK_HSCIF0 19
|
||||
#define R8A7779_CLK_SCIF5 21
|
||||
#define R8A7779_CLK_SCIF4 22
|
||||
#define R8A7779_CLK_SCIF3 23
|
||||
#define R8A7779_CLK_SCIF2 24
|
||||
#define R8A7779_CLK_SCIF1 25
|
||||
#define R8A7779_CLK_SCIF0 26
|
||||
#define R8A7779_CLK_I2C3 27
|
||||
#define R8A7779_CLK_I2C2 28
|
||||
#define R8A7779_CLK_I2C1 29
|
||||
#define R8A7779_CLK_I2C0 30
|
||||
|
||||
/* MSTP 1 */
|
||||
#define R8A7779_CLK_USB01 0
|
||||
#define R8A7779_CLK_USB2 1
|
||||
#define R8A7779_CLK_DU 3
|
||||
#define R8A7779_CLK_VIN2 8
|
||||
#define R8A7779_CLK_VIN1 9
|
||||
#define R8A7779_CLK_VIN0 10
|
||||
#define R8A7779_CLK_ETHER 14
|
||||
#define R8A7779_CLK_SATA 15
|
||||
#define R8A7779_CLK_PCIE 16
|
||||
#define R8A7779_CLK_VIN3 20
|
||||
|
||||
/* MSTP 3 */
|
||||
#define R8A7779_CLK_SDHI3 20
|
||||
#define R8A7779_CLK_SDHI2 21
|
||||
#define R8A7779_CLK_SDHI1 22
|
||||
#define R8A7779_CLK_SDHI0 23
|
||||
#define R8A7779_CLK_MMC1 30
|
||||
#define R8A7779_CLK_MMC0 31
|
||||
|
||||
|
||||
#endif /* __DT_BINDINGS_CLOCK_R8A7779_H__ */
|
||||
@@ -33,8 +33,8 @@
|
||||
#define R8A7790_CLK_TMU0 25
|
||||
#define R8A7790_CLK_VSP1_DU1 27
|
||||
#define R8A7790_CLK_VSP1_DU0 28
|
||||
#define R8A7790_CLK_VSP1_RT 30
|
||||
#define R8A7790_CLK_VSP1_SY 31
|
||||
#define R8A7790_CLK_VSP1_R 30
|
||||
#define R8A7790_CLK_VSP1_S 31
|
||||
|
||||
/* MSTP2 */
|
||||
#define R8A7790_CLK_SCIFA2 2
|
||||
@@ -50,6 +50,7 @@
|
||||
#define R8A7790_CLK_SYS_DMAC0 19
|
||||
|
||||
/* MSTP3 */
|
||||
#define R8A7790_CLK_IIC2 0
|
||||
#define R8A7790_CLK_TPU0 4
|
||||
#define R8A7790_CLK_MMCIF1 5
|
||||
#define R8A7790_CLK_SDHI3 11
|
||||
@@ -57,6 +58,8 @@
|
||||
#define R8A7790_CLK_SDHI1 13
|
||||
#define R8A7790_CLK_SDHI0 14
|
||||
#define R8A7790_CLK_MMCIF0 15
|
||||
#define R8A7790_CLK_IIC0 18
|
||||
#define R8A7790_CLK_IIC1 23
|
||||
#define R8A7790_CLK_SSUSB 28
|
||||
#define R8A7790_CLK_CMT1 29
|
||||
#define R8A7790_CLK_USBDMAC0 30
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#define R8A7791_CLK_TMU0 25
|
||||
#define R8A7791_CLK_VSP1_DU1 27
|
||||
#define R8A7791_CLK_VSP1_DU0 28
|
||||
#define R8A7791_CLK_VSP1_SY 31
|
||||
#define R8A7791_CLK_VSP1_S 31
|
||||
|
||||
/* MSTP2 */
|
||||
#define R8A7791_CLK_SCIFA2 2
|
||||
@@ -43,7 +43,8 @@
|
||||
#define R8A7791_CLK_SCIFB1 7
|
||||
#define R8A7791_CLK_MSIOF1 8
|
||||
#define R8A7791_CLK_SCIFB2 16
|
||||
#define R8A7791_CLK_DMAC 18
|
||||
#define R8A7791_CLK_SYS_DMAC1 18
|
||||
#define R8A7791_CLK_SYS_DMAC0 19
|
||||
|
||||
/* MSTP3 */
|
||||
#define R8A7791_CLK_TPU0 4
|
||||
@@ -51,6 +52,8 @@
|
||||
#define R8A7791_CLK_SDHI1 12
|
||||
#define R8A7791_CLK_SDHI0 14
|
||||
#define R8A7791_CLK_MMCIF0 15
|
||||
#define R8A7791_CLK_IIC0 18
|
||||
#define R8A7791_CLK_IIC1 23
|
||||
#define R8A7791_CLK_SSUSB 28
|
||||
#define R8A7791_CLK_CMT1 29
|
||||
#define R8A7791_CLK_USBDMAC0 30
|
||||
@@ -61,6 +64,7 @@
|
||||
#define R8A7791_CLK_PWM 23
|
||||
|
||||
/* MSTP7 */
|
||||
#define R8A7791_CLK_EHCI 3
|
||||
#define R8A7791_CLK_HSUSB 4
|
||||
#define R8A7791_CLK_HSCIF2 13
|
||||
#define R8A7791_CLK_SCIF5 14
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Device Tree binding constants clock controllers of Samsung S3C2410 and later.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLOCK_SAMSUNG_S3C2410_CLOCK_H
|
||||
#define _DT_BINDINGS_CLOCK_SAMSUNG_S3C2410_CLOCK_H
|
||||
|
||||
/*
|
||||
* Let each exported clock get a unique index, which is used on DT-enabled
|
||||
* platforms to lookup the clock from a clock specifier. These indices are
|
||||
* therefore considered an ABI and so must not be changed. This implies
|
||||
* that new clocks should be added either in free spaces between clock groups
|
||||
* or at the end.
|
||||
*/
|
||||
|
||||
/* Core clocks. */
|
||||
|
||||
/* id 1 is reserved */
|
||||
#define MPLL 2
|
||||
#define UPLL 3
|
||||
#define FCLK 4
|
||||
#define HCLK 5
|
||||
#define PCLK 6
|
||||
#define UCLK 7
|
||||
#define ARMCLK 8
|
||||
|
||||
/* pclk-gates */
|
||||
#define PCLK_UART0 16
|
||||
#define PCLK_UART1 17
|
||||
#define PCLK_UART2 18
|
||||
#define PCLK_I2C 19
|
||||
#define PCLK_SDI 20
|
||||
#define PCLK_SPI 21
|
||||
#define PCLK_ADC 22
|
||||
#define PCLK_AC97 23
|
||||
#define PCLK_I2S 24
|
||||
#define PCLK_PWM 25
|
||||
#define PCLK_RTC 26
|
||||
#define PCLK_GPIO 27
|
||||
|
||||
|
||||
/* hclk-gates */
|
||||
#define HCLK_LCD 32
|
||||
#define HCLK_USBH 33
|
||||
#define HCLK_USBD 34
|
||||
#define HCLK_NAND 35
|
||||
#define HCLK_CAM 36
|
||||
|
||||
|
||||
#define CAMIF 40
|
||||
|
||||
|
||||
/* Total number of clocks. */
|
||||
#define NR_CLKS (CAMIF + 1)
|
||||
|
||||
#endif /* _DT_BINDINGS_CLOCK_SAMSUNG_S3C2443_CLOCK_H */
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Device Tree binding constants clock controllers of Samsung S3C2412.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLOCK_SAMSUNG_S3C2412_CLOCK_H
|
||||
#define _DT_BINDINGS_CLOCK_SAMSUNG_S3C2412_CLOCK_H
|
||||
|
||||
/*
|
||||
* Let each exported clock get a unique index, which is used on DT-enabled
|
||||
* platforms to lookup the clock from a clock specifier. These indices are
|
||||
* therefore considered an ABI and so must not be changed. This implies
|
||||
* that new clocks should be added either in free spaces between clock groups
|
||||
* or at the end.
|
||||
*/
|
||||
|
||||
/* Core clocks. */
|
||||
|
||||
/* id 1 is reserved */
|
||||
#define MPLL 2
|
||||
#define UPLL 3
|
||||
#define MDIVCLK 4
|
||||
#define MSYSCLK 5
|
||||
#define USYSCLK 6
|
||||
#define HCLK 7
|
||||
#define PCLK 8
|
||||
#define ARMDIV 9
|
||||
#define ARMCLK 10
|
||||
|
||||
|
||||
/* Special clocks */
|
||||
#define SCLK_CAM 16
|
||||
#define SCLK_UART 17
|
||||
#define SCLK_I2S 18
|
||||
#define SCLK_USBD 19
|
||||
#define SCLK_USBH 20
|
||||
|
||||
/* pclk-gates */
|
||||
#define PCLK_WDT 32
|
||||
#define PCLK_SPI 33
|
||||
#define PCLK_I2S 34
|
||||
#define PCLK_I2C 35
|
||||
#define PCLK_ADC 36
|
||||
#define PCLK_RTC 37
|
||||
#define PCLK_GPIO 38
|
||||
#define PCLK_UART2 39
|
||||
#define PCLK_UART1 40
|
||||
#define PCLK_UART0 41
|
||||
#define PCLK_SDI 42
|
||||
#define PCLK_PWM 43
|
||||
#define PCLK_USBD 44
|
||||
|
||||
/* hclk-gates */
|
||||
#define HCLK_HALF 48
|
||||
#define HCLK_X2 49
|
||||
#define HCLK_SDRAM 50
|
||||
#define HCLK_USBH 51
|
||||
#define HCLK_LCD 52
|
||||
#define HCLK_NAND 53
|
||||
#define HCLK_DMA3 54
|
||||
#define HCLK_DMA2 55
|
||||
#define HCLK_DMA1 56
|
||||
#define HCLK_DMA0 57
|
||||
|
||||
/* Total number of clocks. */
|
||||
#define NR_CLKS (HCLK_DMA0 + 1)
|
||||
|
||||
#endif /* _DT_BINDINGS_CLOCK_SAMSUNG_S3C2412_CLOCK_H */
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Device Tree binding constants clock controllers of Samsung S3C2443 and later.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLOCK_SAMSUNG_S3C2443_CLOCK_H
|
||||
#define _DT_BINDINGS_CLOCK_SAMSUNG_S3C2443_CLOCK_H
|
||||
|
||||
/*
|
||||
* Let each exported clock get a unique index, which is used on DT-enabled
|
||||
* platforms to lookup the clock from a clock specifier. These indices are
|
||||
* therefore considered an ABI and so must not be changed. This implies
|
||||
* that new clocks should be added either in free spaces between clock groups
|
||||
* or at the end.
|
||||
*/
|
||||
|
||||
/* Core clocks. */
|
||||
#define MSYSCLK 1
|
||||
#define ESYSCLK 2
|
||||
#define ARMDIV 3
|
||||
#define ARMCLK 4
|
||||
#define HCLK 5
|
||||
#define PCLK 6
|
||||
|
||||
/* Special clocks */
|
||||
#define SCLK_HSSPI0 16
|
||||
#define SCLK_FIMD 17
|
||||
#define SCLK_I2S0 18
|
||||
#define SCLK_I2S1 19
|
||||
#define SCLK_HSMMC1 20
|
||||
#define SCLK_HSMMC_EXT 21
|
||||
#define SCLK_CAM 22
|
||||
#define SCLK_UART 23
|
||||
#define SCLK_USBH 24
|
||||
|
||||
/* Muxes */
|
||||
#define MUX_HSSPI0 32
|
||||
#define MUX_HSSPI1 33
|
||||
#define MUX_HSMMC0 34
|
||||
#define MUX_HSMMC1 35
|
||||
|
||||
/* hclk-gates */
|
||||
#define HCLK_DMA0 48
|
||||
#define HCLK_DMA1 49
|
||||
#define HCLK_DMA2 50
|
||||
#define HCLK_DMA3 51
|
||||
#define HCLK_DMA4 52
|
||||
#define HCLK_DMA5 53
|
||||
#define HCLK_DMA6 54
|
||||
#define HCLK_DMA7 55
|
||||
#define HCLK_CAM 56
|
||||
#define HCLK_LCD 57
|
||||
#define HCLK_USBH 58
|
||||
#define HCLK_USBD 59
|
||||
#define HCLK_IROM 60
|
||||
#define HCLK_HSMMC0 61
|
||||
#define HCLK_HSMMC1 62
|
||||
#define HCLK_CFC 63
|
||||
#define HCLK_SSMC 64
|
||||
#define HCLK_DRAM 65
|
||||
#define HCLK_2D 66
|
||||
|
||||
/* pclk-gates */
|
||||
#define PCLK_UART0 72
|
||||
#define PCLK_UART1 73
|
||||
#define PCLK_UART2 74
|
||||
#define PCLK_UART3 75
|
||||
#define PCLK_I2C0 76
|
||||
#define PCLK_SDI 77
|
||||
#define PCLK_SPI0 78
|
||||
#define PCLK_ADC 79
|
||||
#define PCLK_AC97 80
|
||||
#define PCLK_I2S0 81
|
||||
#define PCLK_PWM 82
|
||||
#define PCLK_WDT 83
|
||||
#define PCLK_RTC 84
|
||||
#define PCLK_GPIO 85
|
||||
#define PCLK_SPI1 86
|
||||
#define PCLK_CHIPID 87
|
||||
#define PCLK_I2C1 88
|
||||
#define PCLK_I2S1 89
|
||||
#define PCLK_PCM 90
|
||||
|
||||
/* Total number of clocks. */
|
||||
#define NR_CLKS (PCLK_PCM + 1)
|
||||
|
||||
#endif /* _DT_BINDINGS_CLOCK_SAMSUNG_S3C2443_CLOCK_H */
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* This header provides constants clk index STMicroelectronics
|
||||
* STiH415 SoC.
|
||||
*/
|
||||
#ifndef _CLK_STIH415
|
||||
#define _CLK_STIH415
|
||||
|
||||
/* CLOCKGEN A0 */
|
||||
#define CLK_ICN_REG 0
|
||||
#define CLK_ETH1_PHY 4
|
||||
|
||||
/* CLOCKGEN A1 */
|
||||
#define CLK_GMAC0_PHY 3
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* This header provides constants clk index STMicroelectronics
|
||||
* STiH416 SoC.
|
||||
*/
|
||||
#ifndef _CLK_STIH416
|
||||
#define _CLK_STIH416
|
||||
|
||||
/* CLOCKGEN A0 */
|
||||
#define CLK_ICN_REG 0
|
||||
#define CLK_ETH1_PHY 4
|
||||
|
||||
/* CLOCKGEN A1 */
|
||||
#define CLK_GMAC0_PHY 3
|
||||
|
||||
#endif
|
||||
@@ -337,6 +337,7 @@
|
||||
#define TEGRA114_CLK_CLK_OUT_3_MUX 308
|
||||
#define TEGRA114_CLK_DSIA_MUX 309
|
||||
#define TEGRA114_CLK_DSIB_MUX 310
|
||||
#define TEGRA114_CLK_CLK_MAX 311
|
||||
#define TEGRA114_CLK_XUSB_SS_DIV2 311
|
||||
#define TEGRA114_CLK_CLK_MAX 312
|
||||
|
||||
#endif /* _DT_BINDINGS_CLOCK_TEGRA114_CAR_H */
|
||||
|
||||
@@ -336,6 +336,7 @@
|
||||
#define TEGRA124_CLK_DSIA_MUX 309
|
||||
#define TEGRA124_CLK_DSIB_MUX 310
|
||||
#define TEGRA124_CLK_SOR0_LVDS 311
|
||||
#define TEGRA124_CLK_CLK_MAX 312
|
||||
#define TEGRA124_CLK_XUSB_SS_DIV2 312
|
||||
#define TEGRA124_CLK_CLK_MAX 313
|
||||
|
||||
#endif /* _DT_BINDINGS_CLOCK_TEGRA124_CAR_H */
|
||||
|
||||
@@ -62,12 +62,29 @@
|
||||
#define OMAP3630_CORE2_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x25a0) (val)
|
||||
#define OMAP3_WKUP_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x2a00) (val)
|
||||
#define AM33XX_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
|
||||
#define OMAP4_CORE_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0040) (val)
|
||||
#define OMAP4_WKUP_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0xe040) (val)
|
||||
#define AM4372_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
|
||||
#define OMAP5_CORE_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x2840) (val)
|
||||
#define OMAP5_WKUP_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0xc840) (val)
|
||||
#define DRA7XX_CORE_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x3400) (val)
|
||||
|
||||
/*
|
||||
* Macros to allow using the offset from the padconf physical address
|
||||
* instead of the offset from padconf base.
|
||||
*/
|
||||
#define OMAP_PADCONF_OFFSET(offset, base_offset) ((offset) - (base_offset))
|
||||
|
||||
#define OMAP4_IOPAD(offset, val) OMAP_PADCONF_OFFSET((offset), 0x0040) (val)
|
||||
#define OMAP5_IOPAD(offset, val) OMAP_PADCONF_OFFSET((offset), 0x0040) (val)
|
||||
|
||||
/*
|
||||
* Define some commonly used pins configured by the boards.
|
||||
* Note that some boards use alternative pins, so check
|
||||
* the schematics before using these.
|
||||
*/
|
||||
#define OMAP3_UART1_RX 0x152
|
||||
#define OMAP3_UART2_RX 0x14a
|
||||
#define OMAP3_UART3_RX 0x16e
|
||||
#define OMAP4_UART2_RX 0xdc
|
||||
#define OMAP4_UART3_RX 0x104
|
||||
#define OMAP4_UART4_RX 0x11c
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -22,5 +22,6 @@
|
||||
#define STIH415_USB0_SOFTRESET 3
|
||||
#define STIH415_USB1_SOFTRESET 4
|
||||
#define STIH415_USB2_SOFTRESET 5
|
||||
#define STIH415_KEYSCAN_SOFTRESET 6
|
||||
|
||||
#endif /* _DT_BINDINGS_RESET_CONTROLLER_STIH415 */
|
||||
|
||||
@@ -46,5 +46,6 @@
|
||||
#define STIH416_COMPO_A_SOFTRESET 25
|
||||
#define STIH416_VP8_DEC_SOFTRESET 26
|
||||
#define STIH416_VTG_MAIN_SOFTRESET 27
|
||||
#define STIH416_KEYSCAN_SOFTRESET 28
|
||||
|
||||
#endif /* _DT_BINDINGS_RESET_CONTROLLER_STIH416 */
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Steffen Trumtrar <s.trumtrar@pengutronix.de>
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_RESET_ALTR_RST_MGR_H
|
||||
#define _DT_BINDINGS_RESET_ALTR_RST_MGR_H
|
||||
|
||||
/* MPUMODRST */
|
||||
#define CPU0_RESET 0
|
||||
#define CPU1_RESET 1
|
||||
#define WDS_RESET 2
|
||||
#define SCUPER_RESET 3
|
||||
#define L2_RESET 4
|
||||
|
||||
/* PERMODRST */
|
||||
#define EMAC0_RESET 32
|
||||
#define EMAC1_RESET 33
|
||||
#define USB0_RESET 34
|
||||
#define USB1_RESET 35
|
||||
#define NAND_RESET 36
|
||||
#define QSPI_RESET 37
|
||||
#define L4WD0_RESET 38
|
||||
#define L4WD1_RESET 39
|
||||
#define OSC1TIMER0_RESET 40
|
||||
#define OSC1TIMER1_RESET 41
|
||||
#define SPTIMER0_RESET 42
|
||||
#define SPTIMER1_RESET 43
|
||||
#define I2C0_RESET 44
|
||||
#define I2C1_RESET 45
|
||||
#define I2C2_RESET 46
|
||||
#define I2C3_RESET 47
|
||||
#define UART0_RESET 48
|
||||
#define UART1_RESET 49
|
||||
#define SPIM0_RESET 50
|
||||
#define SPIM1_RESET 51
|
||||
#define SPIS0_RESET 52
|
||||
#define SPIS1_RESET 53
|
||||
#define SDMMC_RESET 54
|
||||
#define CAN0_RESET 55
|
||||
#define CAN1_RESET 56
|
||||
#define GPIO0_RESET 57
|
||||
#define GPIO1_RESET 58
|
||||
#define GPIO2_RESET 59
|
||||
#define DMA_RESET 60
|
||||
#define SDR_RESET 61
|
||||
|
||||
/* PER2MODRST */
|
||||
#define DMAIF0_RESET 64
|
||||
#define DMAIF1_RESET 65
|
||||
#define DMAIF2_RESET 66
|
||||
#define DMAIF3_RESET 67
|
||||
#define DMAIF4_RESET 68
|
||||
#define DMAIF5_RESET 69
|
||||
#define DMAIF6_RESET 70
|
||||
#define DMAIF7_RESET 71
|
||||
|
||||
/* BRGMODRST */
|
||||
#define HPS2FPGA_RESET 96
|
||||
#define LWHPS2FPGA_RESET 97
|
||||
#define FPGA2HPS_RESET 98
|
||||
|
||||
/* MISCMODRST*/
|
||||
#define ROM_RESET 128
|
||||
#define OCRAM_RESET 129
|
||||
#define SYSMGR_RESET 130
|
||||
#define SYSMGRCOLD_RESET 131
|
||||
#define FPGAMGR_RESET 132
|
||||
#define ACPIDMAP_RESET 133
|
||||
#define S2F_RESET 134
|
||||
#define S2FCOLD_RESET 135
|
||||
#define NRSTPIN_RESET 136
|
||||
#define TIMESTAMPCOLD_RESET 137
|
||||
#define CLKMGRCOLD_RESET 138
|
||||
#define SCANMGR_RESET 139
|
||||
#define FRZCTRLCOLD_RESET 140
|
||||
#define SYSDBG_RESET 141
|
||||
#define DBG_RESET 142
|
||||
#define TAPCOLD_RESET 143
|
||||
#define SDRCOLD_RESET 144
|
||||
|
||||
#endif
|
||||
@@ -58,7 +58,7 @@
|
||||
#define PPSS_PROC_RESET 41
|
||||
#define PPSS_RESET 42
|
||||
#define DMA_BAM_RESET 43
|
||||
#define SIC_TIC_RESET 44
|
||||
#define SPS_TIC_H_RESET 44
|
||||
#define SLIMBUS_H_RESET 45
|
||||
#define SFAB_CFPB_M_RESET 46
|
||||
#define SFAB_CFPB_S_RESET 47
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
#ifndef __DT_BINDINGS_QCOM_GSBI_H
|
||||
#define __DT_BINDINGS_QCOM_GSBI_H
|
||||
|
||||
#define GSBI_PROT_IDLE 0
|
||||
#define GSBI_PROT_I2C_UIM 1
|
||||
#define GSBI_PROT_I2C 2
|
||||
#define GSBI_PROT_SPI 3
|
||||
#define GSBI_PROT_UART_W_FC 4
|
||||
#define GSBI_PROT_UIM 5
|
||||
#define GSBI_PROT_I2C_UART 6
|
||||
|
||||
#define GSBI_CRCI_QUP 0
|
||||
#define GSBI_CRCI_UART 1
|
||||
|
||||
#endif
|
||||
+28
-2
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/dynamic_debug.h>
|
||||
|
||||
#include <acpi/acpi.h>
|
||||
#include <acpi/acpi_bus.h>
|
||||
@@ -184,6 +185,8 @@ extern int ec_transaction(u8 command,
|
||||
u8 *rdata, unsigned rdata_len);
|
||||
extern acpi_handle ec_get_handle(void);
|
||||
|
||||
extern bool acpi_is_pnp_device(struct acpi_device *);
|
||||
|
||||
#if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE)
|
||||
|
||||
typedef void (*wmi_notify_handler) (u32 value, void *context);
|
||||
@@ -554,14 +557,20 @@ static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }
|
||||
int acpi_dev_suspend_late(struct device *dev);
|
||||
int acpi_dev_resume_early(struct device *dev);
|
||||
int acpi_subsys_prepare(struct device *dev);
|
||||
void acpi_subsys_complete(struct device *dev);
|
||||
int acpi_subsys_suspend_late(struct device *dev);
|
||||
int acpi_subsys_resume_early(struct device *dev);
|
||||
int acpi_subsys_suspend(struct device *dev);
|
||||
int acpi_subsys_freeze(struct device *dev);
|
||||
#else
|
||||
static inline int acpi_dev_suspend_late(struct device *dev) { return 0; }
|
||||
static inline int acpi_dev_resume_early(struct device *dev) { return 0; }
|
||||
static inline int acpi_subsys_prepare(struct device *dev) { return 0; }
|
||||
static inline void acpi_subsys_complete(struct device *dev) {}
|
||||
static inline int acpi_subsys_suspend_late(struct device *dev) { return 0; }
|
||||
static inline int acpi_subsys_resume_early(struct device *dev) { return 0; }
|
||||
static inline int acpi_subsys_suspend(struct device *dev) { return 0; }
|
||||
static inline int acpi_subsys_freeze(struct device *dev) { return 0; }
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
|
||||
@@ -589,6 +598,14 @@ static inline __printf(3, 4) void
|
||||
acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {}
|
||||
#endif /* !CONFIG_ACPI */
|
||||
|
||||
#if defined(CONFIG_ACPI) && defined(CONFIG_DYNAMIC_DEBUG)
|
||||
__printf(3, 4)
|
||||
void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const char *fmt, ...);
|
||||
#else
|
||||
#define __acpi_handle_debug(descriptor, handle, fmt, ...) \
|
||||
acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* acpi_handle_<level>: Print message with ACPI prefix and object path
|
||||
*
|
||||
@@ -610,11 +627,19 @@ acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {}
|
||||
#define acpi_handle_info(handle, fmt, ...) \
|
||||
acpi_handle_printk(KERN_INFO, handle, fmt, ##__VA_ARGS__)
|
||||
|
||||
/* REVISIT: Support CONFIG_DYNAMIC_DEBUG when necessary */
|
||||
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
|
||||
#if defined(DEBUG)
|
||||
#define acpi_handle_debug(handle, fmt, ...) \
|
||||
acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#if defined(CONFIG_DYNAMIC_DEBUG)
|
||||
#define acpi_handle_debug(handle, fmt, ...) \
|
||||
do { \
|
||||
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
|
||||
if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \
|
||||
__acpi_handle_debug(&descriptor, handle, pr_fmt(fmt), \
|
||||
##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#else
|
||||
#define acpi_handle_debug(handle, fmt, ...) \
|
||||
({ \
|
||||
if (0) \
|
||||
@@ -622,5 +647,6 @@ acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {}
|
||||
0; \
|
||||
})
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /*_LINUX_ACPI_H*/
|
||||
|
||||
@@ -6,28 +6,9 @@
|
||||
|
||||
#include <linux/mmc/host.h>
|
||||
|
||||
|
||||
/*
|
||||
* These defines is places here due to access is needed from machine
|
||||
* configuration files. The ST Micro version does not have ROD and
|
||||
* reuse the voltage registers for direction settings.
|
||||
*/
|
||||
#define MCI_ST_DATA2DIREN (1 << 2)
|
||||
#define MCI_ST_CMDDIREN (1 << 3)
|
||||
#define MCI_ST_DATA0DIREN (1 << 4)
|
||||
#define MCI_ST_DATA31DIREN (1 << 5)
|
||||
#define MCI_ST_FBCLKEN (1 << 7)
|
||||
#define MCI_ST_DATA74DIREN (1 << 8)
|
||||
|
||||
/* Just some dummy forwarding */
|
||||
struct dma_chan;
|
||||
|
||||
/**
|
||||
* struct mmci_platform_data - platform configuration for the MMCI
|
||||
* (also known as PL180) block.
|
||||
* @f_max: the maximum operational frequency for this host in this
|
||||
* platform configuration. When this is specified it takes precedence
|
||||
* over the module parameter for the same frequency.
|
||||
* @ocr_mask: available voltages on the 4 pins from the block, this
|
||||
* is ignored if a regulator is used, see the MMC_VDD_* masks in
|
||||
* mmc/host.h
|
||||
@@ -42,37 +23,14 @@ struct dma_chan;
|
||||
* @gpio_wp: read this GPIO pin to see if the card is write protected
|
||||
* @gpio_cd: read this GPIO pin to detect card insertion
|
||||
* @cd_invert: true if the gpio_cd pin value is active low
|
||||
* @capabilities: the capabilities of the block as implemented in
|
||||
* this platform, signify anything MMC_CAP_* from mmc/host.h
|
||||
* @capabilities2: more capabilities, MMC_CAP2_* from mmc/host.h
|
||||
* @sigdir: a bit field indicating for what bits in the MMC bus the host
|
||||
* should enable signal direction indication.
|
||||
* @dma_filter: function used to select an appropriate RX and TX
|
||||
* DMA channel to be used for DMA, if and only if you're deploying the
|
||||
* generic DMA engine
|
||||
* @dma_rx_param: parameter passed to the DMA allocation
|
||||
* filter in order to select an appropriate RX channel. If
|
||||
* there is a bidirectional RX+TX channel, then just specify
|
||||
* this and leave dma_tx_param set to NULL
|
||||
* @dma_tx_param: parameter passed to the DMA allocation
|
||||
* filter in order to select an appropriate TX channel. If this
|
||||
* is NULL the driver will attempt to use the RX channel as a
|
||||
* bidirectional channel
|
||||
*/
|
||||
struct mmci_platform_data {
|
||||
unsigned int f_max;
|
||||
unsigned int ocr_mask;
|
||||
int (*ios_handler)(struct device *, struct mmc_ios *);
|
||||
unsigned int (*status)(struct device *);
|
||||
int gpio_wp;
|
||||
int gpio_cd;
|
||||
bool cd_invert;
|
||||
unsigned long capabilities;
|
||||
unsigned long capabilities2;
|
||||
u32 sigdir;
|
||||
bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
|
||||
void *dma_rx_param;
|
||||
void *dma_tx_param;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,42 @@
|
||||
#define _LINUX_ATOMIC_H
|
||||
#include <asm/atomic.h>
|
||||
|
||||
/*
|
||||
* Provide __deprecated wrappers for the new interface, avoid flag day changes.
|
||||
* We need the ugly external functions to break header recursion hell.
|
||||
*/
|
||||
#ifndef smp_mb__before_atomic_inc
|
||||
static inline void __deprecated smp_mb__before_atomic_inc(void)
|
||||
{
|
||||
extern void __smp_mb__before_atomic(void);
|
||||
__smp_mb__before_atomic();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef smp_mb__after_atomic_inc
|
||||
static inline void __deprecated smp_mb__after_atomic_inc(void)
|
||||
{
|
||||
extern void __smp_mb__after_atomic(void);
|
||||
__smp_mb__after_atomic();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef smp_mb__before_atomic_dec
|
||||
static inline void __deprecated smp_mb__before_atomic_dec(void)
|
||||
{
|
||||
extern void __smp_mb__before_atomic(void);
|
||||
__smp_mb__before_atomic();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef smp_mb__after_atomic_dec
|
||||
static inline void __deprecated smp_mb__after_atomic_dec(void)
|
||||
{
|
||||
extern void __smp_mb__after_atomic(void);
|
||||
__smp_mb__after_atomic();
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* atomic_add_unless - add unless the number is already a given value
|
||||
* @v: pointer of type atomic_t
|
||||
|
||||
@@ -40,6 +40,11 @@ enum backlight_type {
|
||||
BACKLIGHT_TYPE_MAX,
|
||||
};
|
||||
|
||||
enum backlight_notification {
|
||||
BACKLIGHT_REGISTERED,
|
||||
BACKLIGHT_UNREGISTERED,
|
||||
};
|
||||
|
||||
struct backlight_device;
|
||||
struct fb_info;
|
||||
|
||||
@@ -133,6 +138,8 @@ extern void devm_backlight_device_unregister(struct device *dev,
|
||||
extern void backlight_force_update(struct backlight_device *bd,
|
||||
enum backlight_update_reason reason);
|
||||
extern bool backlight_device_registered(enum backlight_type type);
|
||||
extern int backlight_register_notifier(struct notifier_block *nb);
|
||||
extern int backlight_unregister_notifier(struct notifier_block *nb);
|
||||
|
||||
#define to_backlight_device(obj) container_of(obj, struct backlight_device, dev)
|
||||
|
||||
|
||||
+1
-1
@@ -333,7 +333,7 @@ static inline struct bio *bio_next_split(struct bio *bio, int sectors,
|
||||
|
||||
extern struct bio_set *bioset_create(unsigned int, unsigned int);
|
||||
extern void bioset_free(struct bio_set *);
|
||||
extern mempool_t *biovec_create_pool(struct bio_set *bs, int pool_entries);
|
||||
extern mempool_t *biovec_create_pool(int pool_entries);
|
||||
|
||||
extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
|
||||
extern void bio_put(struct bio *);
|
||||
|
||||
@@ -32,6 +32,26 @@ extern unsigned long __sw_hweight64(__u64 w);
|
||||
*/
|
||||
#include <asm/bitops.h>
|
||||
|
||||
/*
|
||||
* Provide __deprecated wrappers for the new interface, avoid flag day changes.
|
||||
* We need the ugly external functions to break header recursion hell.
|
||||
*/
|
||||
#ifndef smp_mb__before_clear_bit
|
||||
static inline void __deprecated smp_mb__before_clear_bit(void)
|
||||
{
|
||||
extern void __smp_mb__before_atomic(void);
|
||||
__smp_mb__before_atomic();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef smp_mb__after_clear_bit
|
||||
static inline void __deprecated smp_mb__after_clear_bit(void)
|
||||
{
|
||||
extern void __smp_mb__after_atomic(void);
|
||||
__smp_mb__after_atomic();
|
||||
}
|
||||
#endif
|
||||
|
||||
#define for_each_set_bit(bit, addr, size) \
|
||||
for ((bit) = find_first_bit((addr), (size)); \
|
||||
(bit) < (size); \
|
||||
|
||||
+61
-40
@@ -8,7 +8,13 @@ struct blk_mq_tags;
|
||||
struct blk_mq_cpu_notifier {
|
||||
struct list_head list;
|
||||
void *data;
|
||||
void (*notify)(void *data, unsigned long action, unsigned int cpu);
|
||||
int (*notify)(void *data, unsigned long action, unsigned int cpu);
|
||||
};
|
||||
|
||||
struct blk_mq_ctxmap {
|
||||
unsigned int map_size;
|
||||
unsigned int bits_per_word;
|
||||
struct blk_align_bitmap *map;
|
||||
};
|
||||
|
||||
struct blk_mq_hw_ctx {
|
||||
@@ -18,7 +24,11 @@ struct blk_mq_hw_ctx {
|
||||
} ____cacheline_aligned_in_smp;
|
||||
|
||||
unsigned long state; /* BLK_MQ_S_* flags */
|
||||
struct delayed_work delayed_work;
|
||||
struct delayed_work run_work;
|
||||
struct delayed_work delay_work;
|
||||
cpumask_var_t cpumask;
|
||||
int next_cpu;
|
||||
int next_cpu_batch;
|
||||
|
||||
unsigned long flags; /* BLK_MQ_F_* flags */
|
||||
|
||||
@@ -27,13 +37,13 @@ struct blk_mq_hw_ctx {
|
||||
|
||||
void *driver_data;
|
||||
|
||||
struct blk_mq_ctxmap ctx_map;
|
||||
|
||||
unsigned int nr_ctx;
|
||||
struct blk_mq_ctx **ctxs;
|
||||
unsigned int nr_ctx_map;
|
||||
unsigned long *ctx_map;
|
||||
|
||||
struct request **rqs;
|
||||
struct list_head page_list;
|
||||
unsigned int wait_index;
|
||||
|
||||
struct blk_mq_tags *tags;
|
||||
|
||||
unsigned long queued;
|
||||
@@ -41,31 +51,40 @@ struct blk_mq_hw_ctx {
|
||||
#define BLK_MQ_MAX_DISPATCH_ORDER 10
|
||||
unsigned long dispatched[BLK_MQ_MAX_DISPATCH_ORDER];
|
||||
|
||||
unsigned int queue_depth;
|
||||
unsigned int numa_node;
|
||||
unsigned int cmd_size; /* per-request extra data */
|
||||
|
||||
atomic_t nr_active;
|
||||
|
||||
struct blk_mq_cpu_notifier cpu_notifier;
|
||||
struct kobject kobj;
|
||||
};
|
||||
|
||||
struct blk_mq_reg {
|
||||
struct blk_mq_tag_set {
|
||||
struct blk_mq_ops *ops;
|
||||
unsigned int nr_hw_queues;
|
||||
unsigned int queue_depth;
|
||||
unsigned int queue_depth; /* max hw supported */
|
||||
unsigned int reserved_tags;
|
||||
unsigned int cmd_size; /* per-request extra data */
|
||||
int numa_node;
|
||||
unsigned int timeout;
|
||||
unsigned int flags; /* BLK_MQ_F_* */
|
||||
void *driver_data;
|
||||
|
||||
struct blk_mq_tags **tags;
|
||||
|
||||
struct mutex tag_list_lock;
|
||||
struct list_head tag_list;
|
||||
};
|
||||
|
||||
typedef int (queue_rq_fn)(struct blk_mq_hw_ctx *, struct request *);
|
||||
typedef struct blk_mq_hw_ctx *(map_queue_fn)(struct request_queue *, const int);
|
||||
typedef struct blk_mq_hw_ctx *(alloc_hctx_fn)(struct blk_mq_reg *,unsigned int);
|
||||
typedef void (free_hctx_fn)(struct blk_mq_hw_ctx *, unsigned int);
|
||||
typedef int (init_hctx_fn)(struct blk_mq_hw_ctx *, void *, unsigned int);
|
||||
typedef void (exit_hctx_fn)(struct blk_mq_hw_ctx *, unsigned int);
|
||||
typedef int (init_request_fn)(void *, struct request *, unsigned int,
|
||||
unsigned int, unsigned int);
|
||||
typedef void (exit_request_fn)(void *, struct request *, unsigned int,
|
||||
unsigned int);
|
||||
|
||||
struct blk_mq_ops {
|
||||
/*
|
||||
@@ -85,12 +104,6 @@ struct blk_mq_ops {
|
||||
|
||||
softirq_done_fn *complete;
|
||||
|
||||
/*
|
||||
* Override for hctx allocations (should probably go)
|
||||
*/
|
||||
alloc_hctx_fn *alloc_hctx;
|
||||
free_hctx_fn *free_hctx;
|
||||
|
||||
/*
|
||||
* Called when the block layer side of a hardware queue has been
|
||||
* set up, allowing the driver to allocate/init matching structures.
|
||||
@@ -98,6 +111,14 @@ struct blk_mq_ops {
|
||||
*/
|
||||
init_hctx_fn *init_hctx;
|
||||
exit_hctx_fn *exit_hctx;
|
||||
|
||||
/*
|
||||
* Called for every command allocated by the block layer to allow
|
||||
* the driver to set up driver specific data.
|
||||
* Ditto for exit/teardown.
|
||||
*/
|
||||
init_request_fn *init_request;
|
||||
exit_request_fn *exit_request;
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -107,18 +128,24 @@ enum {
|
||||
|
||||
BLK_MQ_F_SHOULD_MERGE = 1 << 0,
|
||||
BLK_MQ_F_SHOULD_SORT = 1 << 1,
|
||||
BLK_MQ_F_SHOULD_IPI = 1 << 2,
|
||||
BLK_MQ_F_TAG_SHARED = 1 << 2,
|
||||
BLK_MQ_F_SG_MERGE = 1 << 3,
|
||||
BLK_MQ_F_SYSFS_UP = 1 << 4,
|
||||
|
||||
BLK_MQ_S_STOPPED = 0,
|
||||
BLK_MQ_S_TAG_ACTIVE = 1,
|
||||
|
||||
BLK_MQ_MAX_DEPTH = 2048,
|
||||
|
||||
BLK_MQ_CPU_WORK_BATCH = 8,
|
||||
};
|
||||
|
||||
struct request_queue *blk_mq_init_queue(struct blk_mq_reg *, void *);
|
||||
struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *);
|
||||
int blk_mq_register_disk(struct gendisk *);
|
||||
void blk_mq_unregister_disk(struct gendisk *);
|
||||
int blk_mq_init_commands(struct request_queue *, int (*init)(void *data, struct blk_mq_hw_ctx *, struct request *, unsigned int), void *data);
|
||||
void blk_mq_free_commands(struct request_queue *, void (*free)(void *data, struct blk_mq_hw_ctx *, struct request *, unsigned int), void *data);
|
||||
|
||||
int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set);
|
||||
void blk_mq_free_tag_set(struct blk_mq_tag_set *set);
|
||||
|
||||
void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule);
|
||||
|
||||
@@ -126,28 +153,28 @@ void blk_mq_insert_request(struct request *, bool, bool, bool);
|
||||
void blk_mq_run_queues(struct request_queue *q, bool async);
|
||||
void blk_mq_free_request(struct request *rq);
|
||||
bool blk_mq_can_queue(struct blk_mq_hw_ctx *);
|
||||
struct request *blk_mq_alloc_request(struct request_queue *q, int rw, gfp_t gfp);
|
||||
struct request *blk_mq_alloc_reserved_request(struct request_queue *q, int rw, gfp_t gfp);
|
||||
struct request *blk_mq_rq_from_tag(struct request_queue *q, unsigned int tag);
|
||||
struct request *blk_mq_alloc_request(struct request_queue *q, int rw,
|
||||
gfp_t gfp, bool reserved);
|
||||
struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag);
|
||||
|
||||
struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_index);
|
||||
struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_reg *, unsigned int);
|
||||
void blk_mq_free_single_hw_queue(struct blk_mq_hw_ctx *, unsigned int);
|
||||
struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int);
|
||||
|
||||
bool blk_mq_end_io_partial(struct request *rq, int error,
|
||||
unsigned int nr_bytes);
|
||||
static inline void blk_mq_end_io(struct request *rq, int error)
|
||||
{
|
||||
bool done = !blk_mq_end_io_partial(rq, error, blk_rq_bytes(rq));
|
||||
BUG_ON(!done);
|
||||
}
|
||||
void blk_mq_end_io(struct request *rq, int error);
|
||||
void __blk_mq_end_io(struct request *rq, int error);
|
||||
|
||||
void blk_mq_requeue_request(struct request *rq);
|
||||
void blk_mq_add_to_requeue_list(struct request *rq, bool at_head);
|
||||
void blk_mq_kick_requeue_list(struct request_queue *q);
|
||||
void blk_mq_complete_request(struct request *rq);
|
||||
|
||||
void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx);
|
||||
void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx);
|
||||
void blk_mq_stop_hw_queues(struct request_queue *q);
|
||||
void blk_mq_start_stopped_hw_queues(struct request_queue *q);
|
||||
void blk_mq_start_hw_queues(struct request_queue *q);
|
||||
void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async);
|
||||
void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs);
|
||||
void blk_mq_tag_busy_iter(struct blk_mq_tags *tags, void (*fn)(void *data, unsigned long *), void *data);
|
||||
|
||||
/*
|
||||
* Driver command data is immediately after the request. So subtract request
|
||||
@@ -162,12 +189,6 @@ static inline void *blk_mq_rq_to_pdu(struct request *rq)
|
||||
return (void *) rq + sizeof(*rq);
|
||||
}
|
||||
|
||||
static inline struct request *blk_mq_tag_to_rq(struct blk_mq_hw_ctx *hctx,
|
||||
unsigned int tag)
|
||||
{
|
||||
return hctx->rqs[tag];
|
||||
}
|
||||
|
||||
#define queue_for_each_hw_ctx(q, hctx, i) \
|
||||
for ((i) = 0; (i) < (q)->nr_hw_queues && \
|
||||
({ hctx = (q)->queue_hw_ctx[i]; 1; }); (i)++)
|
||||
|
||||
@@ -190,6 +190,7 @@ enum rq_flag_bits {
|
||||
__REQ_PM, /* runtime pm request */
|
||||
__REQ_END, /* last of chain of requests */
|
||||
__REQ_HASHED, /* on IO scheduler merge hash */
|
||||
__REQ_MQ_INFLIGHT, /* track inflight for MQ */
|
||||
__REQ_NR_BITS, /* stops here */
|
||||
};
|
||||
|
||||
@@ -243,5 +244,6 @@ enum rq_flag_bits {
|
||||
#define REQ_PM (1ULL << __REQ_PM)
|
||||
#define REQ_END (1ULL << __REQ_END)
|
||||
#define REQ_HASHED (1ULL << __REQ_HASHED)
|
||||
#define REQ_MQ_INFLIGHT (1ULL << __REQ_MQ_INFLIGHT)
|
||||
|
||||
#endif /* __LINUX_BLK_TYPES_H */
|
||||
|
||||
+41
-10
@@ -90,15 +90,15 @@ enum rq_cmd_type_bits {
|
||||
#define BLK_MAX_CDB 16
|
||||
|
||||
/*
|
||||
* try to put the fields that are referenced together in the same cacheline.
|
||||
* if you modify this structure, be sure to check block/blk-core.c:blk_rq_init()
|
||||
* as well!
|
||||
* Try to put the fields that are referenced together in the same cacheline.
|
||||
*
|
||||
* If you modify this structure, make sure to update blk_rq_init() and
|
||||
* especially blk_mq_rq_ctx_init() to take care of the added fields.
|
||||
*/
|
||||
struct request {
|
||||
struct list_head queuelist;
|
||||
union {
|
||||
struct call_single_data csd;
|
||||
struct work_struct mq_flush_work;
|
||||
unsigned long fifo_time;
|
||||
};
|
||||
|
||||
@@ -178,7 +178,6 @@ struct request {
|
||||
unsigned short ioprio;
|
||||
|
||||
void *special; /* opaque pointer available for LLD use */
|
||||
char *buffer; /* kaddr of the current segment if available */
|
||||
|
||||
int tag;
|
||||
int errors;
|
||||
@@ -336,7 +335,7 @@ struct request_queue {
|
||||
unsigned int *mq_map;
|
||||
|
||||
/* sw queues */
|
||||
struct blk_mq_ctx *queue_ctx;
|
||||
struct blk_mq_ctx __percpu *queue_ctx;
|
||||
unsigned int nr_queues;
|
||||
|
||||
/* hw dispatch queues */
|
||||
@@ -463,6 +462,10 @@ struct request_queue {
|
||||
struct request *flush_rq;
|
||||
spinlock_t mq_flush_lock;
|
||||
|
||||
struct list_head requeue_list;
|
||||
spinlock_t requeue_lock;
|
||||
struct work_struct requeue_work;
|
||||
|
||||
struct mutex sysfs_lock;
|
||||
|
||||
int bypass_depth;
|
||||
@@ -481,6 +484,9 @@ struct request_queue {
|
||||
wait_queue_head_t mq_freeze_wq;
|
||||
struct percpu_counter mq_usage_counter;
|
||||
struct list_head all_q_node;
|
||||
|
||||
struct blk_mq_tag_set *tag_set;
|
||||
struct list_head tag_set_list;
|
||||
};
|
||||
|
||||
#define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */
|
||||
@@ -504,6 +510,7 @@ struct request_queue {
|
||||
#define QUEUE_FLAG_SAME_FORCE 18 /* force complete on same CPU */
|
||||
#define QUEUE_FLAG_DEAD 19 /* queue tear-down finished */
|
||||
#define QUEUE_FLAG_INIT_DONE 20 /* queue is initialized */
|
||||
#define QUEUE_FLAG_NO_SG_MERGE 21 /* don't attempt to merge SG segments*/
|
||||
|
||||
#define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
|
||||
(1 << QUEUE_FLAG_STACKABLE) | \
|
||||
@@ -613,6 +620,15 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q)
|
||||
|
||||
#define rq_data_dir(rq) (((rq)->cmd_flags & 1) != 0)
|
||||
|
||||
/*
|
||||
* Driver can handle struct request, if it either has an old style
|
||||
* request_fn defined, or is blk-mq based.
|
||||
*/
|
||||
static inline bool queue_is_rq_based(struct request_queue *q)
|
||||
{
|
||||
return q->request_fn || q->mq_ops;
|
||||
}
|
||||
|
||||
static inline unsigned int blk_queue_cluster(struct request_queue *q)
|
||||
{
|
||||
return q->limits.cluster;
|
||||
@@ -937,6 +953,7 @@ extern struct request *blk_fetch_request(struct request_queue *q);
|
||||
*/
|
||||
extern bool blk_update_request(struct request *rq, int error,
|
||||
unsigned int nr_bytes);
|
||||
extern void blk_finish_request(struct request *rq, int error);
|
||||
extern bool blk_end_request(struct request *rq, int error,
|
||||
unsigned int nr_bytes);
|
||||
extern void blk_end_request_all(struct request *rq, int error);
|
||||
@@ -1053,7 +1070,6 @@ static inline void blk_post_runtime_resume(struct request_queue *q, int err) {}
|
||||
* schedule() where blk_schedule_flush_plug() is called.
|
||||
*/
|
||||
struct blk_plug {
|
||||
unsigned long magic; /* detect uninitialized use-cases */
|
||||
struct list_head list; /* requests */
|
||||
struct list_head mq_list; /* blk-mq requests */
|
||||
struct list_head cb_list; /* md requires an unplug callback */
|
||||
@@ -1102,7 +1118,8 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk)
|
||||
/*
|
||||
* tag stuff
|
||||
*/
|
||||
#define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED)
|
||||
#define blk_rq_tagged(rq) \
|
||||
((rq)->mq_ctx || ((rq)->cmd_flags & REQ_QUEUED))
|
||||
extern int blk_queue_start_tag(struct request_queue *, struct request *);
|
||||
extern struct request *blk_queue_find_tag(struct request_queue *, int);
|
||||
extern void blk_queue_end_tag(struct request_queue *, struct request *);
|
||||
@@ -1370,8 +1387,9 @@ static inline void put_dev_sector(Sector p)
|
||||
}
|
||||
|
||||
struct work_struct;
|
||||
int kblockd_schedule_work(struct request_queue *q, struct work_struct *work);
|
||||
int kblockd_schedule_delayed_work(struct request_queue *q, struct delayed_work *dwork, unsigned long delay);
|
||||
int kblockd_schedule_work(struct work_struct *work);
|
||||
int kblockd_schedule_delayed_work(struct delayed_work *dwork, unsigned long delay);
|
||||
int kblockd_schedule_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned long delay);
|
||||
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
/*
|
||||
@@ -1570,6 +1588,7 @@ static inline bool blk_integrity_is_initialized(struct gendisk *g)
|
||||
struct block_device_operations {
|
||||
int (*open) (struct block_device *, fmode_t);
|
||||
void (*release) (struct gendisk *, fmode_t);
|
||||
int (*rw_page)(struct block_device *, sector_t, struct page *, int rw);
|
||||
int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
|
||||
int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
|
||||
int (*direct_access) (struct block_device *, sector_t,
|
||||
@@ -1588,7 +1607,13 @@ struct block_device_operations {
|
||||
|
||||
extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int,
|
||||
unsigned long);
|
||||
extern int bdev_read_page(struct block_device *, sector_t, struct page *);
|
||||
extern int bdev_write_page(struct block_device *, sector_t, struct page *,
|
||||
struct writeback_control *);
|
||||
#else /* CONFIG_BLOCK */
|
||||
|
||||
struct block_device;
|
||||
|
||||
/*
|
||||
* stubs for when the block layer is configured out
|
||||
*/
|
||||
@@ -1624,6 +1649,12 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
|
||||
sector_t *error_sector)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BLOCK */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -58,9 +58,9 @@ extern void free_bootmem_late(unsigned long physaddr, unsigned long size);
|
||||
* Flags for reserve_bootmem (also if CONFIG_HAVE_ARCH_BOOTMEM_NODE,
|
||||
* the architecture-specific code should honor this).
|
||||
*
|
||||
* If flags is 0, then the return value is always 0 (success). If
|
||||
* flags contains BOOTMEM_EXCLUSIVE, then -EBUSY is returned if the
|
||||
* memory already was reserved.
|
||||
* If flags is BOOTMEM_DEFAULT, then the return value is always 0 (success).
|
||||
* If flags contains BOOTMEM_EXCLUSIVE, then -EBUSY is returned if the memory
|
||||
* already was reserved.
|
||||
*/
|
||||
#define BOOTMEM_DEFAULT 0
|
||||
#define BOOTMEM_EXCLUSIVE (1<<0)
|
||||
|
||||
@@ -207,8 +207,6 @@ void block_invalidatepage(struct page *page, unsigned int offset,
|
||||
unsigned int length);
|
||||
int block_write_full_page(struct page *page, get_block_t *get_block,
|
||||
struct writeback_control *wbc);
|
||||
int block_write_full_page_endio(struct page *page, get_block_t *get_block,
|
||||
struct writeback_control *wbc, bh_end_io_t *handler);
|
||||
int block_read_full_page(struct page*, get_block_t*);
|
||||
int block_is_partially_uptodate(struct page *page, unsigned long from,
|
||||
unsigned long count);
|
||||
@@ -278,7 +276,7 @@ static inline void get_bh(struct buffer_head *bh)
|
||||
|
||||
static inline void put_bh(struct buffer_head *bh)
|
||||
{
|
||||
smp_mb__before_atomic_dec();
|
||||
smp_mb__before_atomic();
|
||||
atomic_dec(&bh->b_count);
|
||||
}
|
||||
|
||||
|
||||
+102
-61
@@ -40,14 +40,14 @@ struct dentry;
|
||||
* through the clk_* api.
|
||||
*
|
||||
* @prepare: Prepare the clock for enabling. This must not return until
|
||||
* the clock is fully prepared, and it's safe to call clk_enable.
|
||||
* This callback is intended to allow clock implementations to
|
||||
* do any initialisation that may sleep. Called with
|
||||
* prepare_lock held.
|
||||
* the clock is fully prepared, and it's safe to call clk_enable.
|
||||
* This callback is intended to allow clock implementations to
|
||||
* do any initialisation that may sleep. Called with
|
||||
* prepare_lock held.
|
||||
*
|
||||
* @unprepare: Release the clock from its prepared state. This will typically
|
||||
* undo any work done in the @prepare callback. Called with
|
||||
* prepare_lock held.
|
||||
* undo any work done in the @prepare callback. Called with
|
||||
* prepare_lock held.
|
||||
*
|
||||
* @is_prepared: Queries the hardware to determine if the clock is prepared.
|
||||
* This function is allowed to sleep. Optional, if this op is not
|
||||
@@ -58,16 +58,16 @@ struct dentry;
|
||||
* Called with prepare mutex held. This function may sleep.
|
||||
*
|
||||
* @enable: Enable the clock atomically. This must not return until the
|
||||
* clock is generating a valid clock signal, usable by consumer
|
||||
* devices. Called with enable_lock held. This function must not
|
||||
* sleep.
|
||||
* clock is generating a valid clock signal, usable by consumer
|
||||
* devices. Called with enable_lock held. This function must not
|
||||
* sleep.
|
||||
*
|
||||
* @disable: Disable the clock atomically. Called with enable_lock held.
|
||||
* This function must not sleep.
|
||||
* This function must not sleep.
|
||||
*
|
||||
* @is_enabled: Queries the hardware to determine if the clock is enabled.
|
||||
* This function must not sleep. Optional, if this op is not
|
||||
* set then the enable count will be used.
|
||||
* This function must not sleep. Optional, if this op is not
|
||||
* set then the enable count will be used.
|
||||
*
|
||||
* @disable_unused: Disable the clock atomically. Only called from
|
||||
* clk_disable_unused for gate clocks with special needs.
|
||||
@@ -75,34 +75,35 @@ struct dentry;
|
||||
* sleep.
|
||||
*
|
||||
* @recalc_rate Recalculate the rate of this clock, by querying hardware. The
|
||||
* parent rate is an input parameter. It is up to the caller to
|
||||
* ensure that the prepare_mutex is held across this call.
|
||||
* Returns the calculated rate. Optional, but recommended - if
|
||||
* this op is not set then clock rate will be initialized to 0.
|
||||
* parent rate is an input parameter. It is up to the caller to
|
||||
* ensure that the prepare_mutex is held across this call.
|
||||
* Returns the calculated rate. Optional, but recommended - if
|
||||
* this op is not set then clock rate will be initialized to 0.
|
||||
*
|
||||
* @round_rate: Given a target rate as input, returns the closest rate actually
|
||||
* supported by the clock.
|
||||
* supported by the clock. The parent rate is an input/output
|
||||
* parameter.
|
||||
*
|
||||
* @determine_rate: Given a target rate as input, returns the closest rate
|
||||
* actually supported by the clock, and optionally the parent clock
|
||||
* that should be used to provide the clock rate.
|
||||
*
|
||||
* @get_parent: Queries the hardware to determine the parent of a clock. The
|
||||
* return value is a u8 which specifies the index corresponding to
|
||||
* the parent clock. This index can be applied to either the
|
||||
* .parent_names or .parents arrays. In short, this function
|
||||
* translates the parent value read from hardware into an array
|
||||
* index. Currently only called when the clock is initialized by
|
||||
* __clk_init. This callback is mandatory for clocks with
|
||||
* multiple parents. It is optional (and unnecessary) for clocks
|
||||
* with 0 or 1 parents.
|
||||
*
|
||||
* @set_parent: Change the input source of this clock; for clocks with multiple
|
||||
* possible parents specify a new parent by passing in the index
|
||||
* as a u8 corresponding to the parent in either the .parent_names
|
||||
* or .parents arrays. This function in affect translates an
|
||||
* array index into the value programmed into the hardware.
|
||||
* Returns 0 on success, -EERROR otherwise.
|
||||
* possible parents specify a new parent by passing in the index
|
||||
* as a u8 corresponding to the parent in either the .parent_names
|
||||
* or .parents arrays. This function in affect translates an
|
||||
* array index into the value programmed into the hardware.
|
||||
* Returns 0 on success, -EERROR otherwise.
|
||||
*
|
||||
* @get_parent: Queries the hardware to determine the parent of a clock. The
|
||||
* return value is a u8 which specifies the index corresponding to
|
||||
* the parent clock. This index can be applied to either the
|
||||
* .parent_names or .parents arrays. In short, this function
|
||||
* translates the parent value read from hardware into an array
|
||||
* index. Currently only called when the clock is initialized by
|
||||
* __clk_init. This callback is mandatory for clocks with
|
||||
* multiple parents. It is optional (and unnecessary) for clocks
|
||||
* with 0 or 1 parents.
|
||||
*
|
||||
* @set_rate: Change the rate of this clock. The requested rate is specified
|
||||
* by the second argument, which should typically be the return
|
||||
@@ -110,13 +111,6 @@ struct dentry;
|
||||
* which is likely helpful for most .set_rate implementation.
|
||||
* Returns 0 on success, -EERROR otherwise.
|
||||
*
|
||||
* @recalc_accuracy: Recalculate the accuracy of this clock. The clock accuracy
|
||||
* is expressed in ppb (parts per billion). The parent accuracy is
|
||||
* an input parameter.
|
||||
* Returns the calculated accuracy. Optional - if this op is not
|
||||
* set then clock accuracy will be initialized to parent accuracy
|
||||
* or 0 (perfect clock) if clock has no parent.
|
||||
*
|
||||
* @set_rate_and_parent: Change the rate and the parent of this clock. The
|
||||
* requested rate is specified by the second argument, which
|
||||
* should typically be the return of .round_rate call. The
|
||||
@@ -128,6 +122,18 @@ struct dentry;
|
||||
* separately via calls to .set_parent and .set_rate.
|
||||
* Returns 0 on success, -EERROR otherwise.
|
||||
*
|
||||
* @recalc_accuracy: Recalculate the accuracy of this clock. The clock accuracy
|
||||
* is expressed in ppb (parts per billion). The parent accuracy is
|
||||
* an input parameter.
|
||||
* Returns the calculated accuracy. Optional - if this op is not
|
||||
* set then clock accuracy will be initialized to parent accuracy
|
||||
* or 0 (perfect clock) if clock has no parent.
|
||||
*
|
||||
* @init: Perform platform-specific initialization magic.
|
||||
* This is not not used by any of the basic clock types.
|
||||
* Please consider other ways of solving initialization problems
|
||||
* before using this callback, as its use is discouraged.
|
||||
*
|
||||
* @debug_init: Set up type-specific debugfs entries for this clock. This
|
||||
* is called once, after the debugfs directory entry for this
|
||||
* clock has been created. The dentry pointer representing that
|
||||
@@ -157,15 +163,15 @@ struct clk_ops {
|
||||
void (*disable_unused)(struct clk_hw *hw);
|
||||
unsigned long (*recalc_rate)(struct clk_hw *hw,
|
||||
unsigned long parent_rate);
|
||||
long (*round_rate)(struct clk_hw *hw, unsigned long,
|
||||
unsigned long *);
|
||||
long (*round_rate)(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *parent_rate);
|
||||
long (*determine_rate)(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *best_parent_rate,
|
||||
struct clk **best_parent_clk);
|
||||
int (*set_parent)(struct clk_hw *hw, u8 index);
|
||||
u8 (*get_parent)(struct clk_hw *hw);
|
||||
int (*set_rate)(struct clk_hw *hw, unsigned long,
|
||||
unsigned long);
|
||||
int (*set_rate)(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long parent_rate);
|
||||
int (*set_rate_and_parent)(struct clk_hw *hw,
|
||||
unsigned long rate,
|
||||
unsigned long parent_rate, u8 index);
|
||||
@@ -254,12 +260,12 @@ void of_fixed_clk_setup(struct device_node *np);
|
||||
*
|
||||
* Flags:
|
||||
* CLK_GATE_SET_TO_DISABLE - by default this clock sets the bit at bit_idx to
|
||||
* enable the clock. Setting this flag does the opposite: setting the bit
|
||||
* disable the clock and clearing it enables the clock
|
||||
* enable the clock. Setting this flag does the opposite: setting the bit
|
||||
* disable the clock and clearing it enables the clock
|
||||
* CLK_GATE_HIWORD_MASK - The gate settings are only in lower 16-bit
|
||||
* of this register, and mask of gate bits are in higher 16-bit of this
|
||||
* register. While setting the gate bits, higher 16-bit should also be
|
||||
* updated to indicate changing gate bits.
|
||||
* of this register, and mask of gate bits are in higher 16-bit of this
|
||||
* register. While setting the gate bits, higher 16-bit should also be
|
||||
* updated to indicate changing gate bits.
|
||||
*/
|
||||
struct clk_gate {
|
||||
struct clk_hw hw;
|
||||
@@ -298,20 +304,24 @@ struct clk_div_table {
|
||||
*
|
||||
* Flags:
|
||||
* CLK_DIVIDER_ONE_BASED - by default the divisor is the value read from the
|
||||
* register plus one. If CLK_DIVIDER_ONE_BASED is set then the divider is
|
||||
* the raw value read from the register, with the value of zero considered
|
||||
* register plus one. If CLK_DIVIDER_ONE_BASED is set then the divider is
|
||||
* the raw value read from the register, with the value of zero considered
|
||||
* invalid, unless CLK_DIVIDER_ALLOW_ZERO is set.
|
||||
* CLK_DIVIDER_POWER_OF_TWO - clock divisor is 2 raised to the value read from
|
||||
* the hardware register
|
||||
* the hardware register
|
||||
* CLK_DIVIDER_ALLOW_ZERO - Allow zero divisors. For dividers which have
|
||||
* CLK_DIVIDER_ONE_BASED set, it is possible to end up with a zero divisor.
|
||||
* Some hardware implementations gracefully handle this case and allow a
|
||||
* zero divisor by not modifying their input clock
|
||||
* (divide by one / bypass).
|
||||
* CLK_DIVIDER_HIWORD_MASK - The divider settings are only in lower 16-bit
|
||||
* of this register, and mask of divider bits are in higher 16-bit of this
|
||||
* register. While setting the divider bits, higher 16-bit should also be
|
||||
* updated to indicate changing divider bits.
|
||||
* of this register, and mask of divider bits are in higher 16-bit of this
|
||||
* register. While setting the divider bits, higher 16-bit should also be
|
||||
* updated to indicate changing divider bits.
|
||||
* CLK_DIVIDER_ROUND_CLOSEST - Makes the best calculated divider to be rounded
|
||||
* to the closest integer instead of the up one.
|
||||
* CLK_DIVIDER_READ_ONLY - The divider settings are preconfigured and should
|
||||
* not be changed by the clock framework.
|
||||
*/
|
||||
struct clk_divider {
|
||||
struct clk_hw hw;
|
||||
@@ -327,8 +337,11 @@ struct clk_divider {
|
||||
#define CLK_DIVIDER_POWER_OF_TWO BIT(1)
|
||||
#define CLK_DIVIDER_ALLOW_ZERO BIT(2)
|
||||
#define CLK_DIVIDER_HIWORD_MASK BIT(3)
|
||||
#define CLK_DIVIDER_ROUND_CLOSEST BIT(4)
|
||||
#define CLK_DIVIDER_READ_ONLY BIT(5)
|
||||
|
||||
extern const struct clk_ops clk_divider_ops;
|
||||
extern const struct clk_ops clk_divider_ro_ops;
|
||||
struct clk *clk_register_divider(struct device *dev, const char *name,
|
||||
const char *parent_name, unsigned long flags,
|
||||
void __iomem *reg, u8 shift, u8 width,
|
||||
@@ -356,9 +369,9 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name,
|
||||
* CLK_MUX_INDEX_ONE - register index starts at 1, not 0
|
||||
* CLK_MUX_INDEX_BIT - register index is a single bit (power of two)
|
||||
* CLK_MUX_HIWORD_MASK - The mux settings are only in lower 16-bit of this
|
||||
* register, and mask of mux bits are in higher 16-bit of this register.
|
||||
* While setting the mux bits, higher 16-bit should also be updated to
|
||||
* indicate changing mux bits.
|
||||
* register, and mask of mux bits are in higher 16-bit of this register.
|
||||
* While setting the mux bits, higher 16-bit should also be updated to
|
||||
* indicate changing mux bits.
|
||||
*/
|
||||
struct clk_mux {
|
||||
struct clk_hw hw;
|
||||
@@ -413,6 +426,37 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
|
||||
const char *parent_name, unsigned long flags,
|
||||
unsigned int mult, unsigned int div);
|
||||
|
||||
/**
|
||||
* struct clk_fractional_divider - adjustable fractional divider clock
|
||||
*
|
||||
* @hw: handle between common and hardware-specific interfaces
|
||||
* @reg: register containing the divider
|
||||
* @mshift: shift to the numerator bit field
|
||||
* @mwidth: width of the numerator bit field
|
||||
* @nshift: shift to the denominator bit field
|
||||
* @nwidth: width of the denominator bit field
|
||||
* @lock: register lock
|
||||
*
|
||||
* Clock with adjustable fractional divider affecting its output frequency.
|
||||
*/
|
||||
|
||||
struct clk_fractional_divider {
|
||||
struct clk_hw hw;
|
||||
void __iomem *reg;
|
||||
u8 mshift;
|
||||
u32 mmask;
|
||||
u8 nshift;
|
||||
u32 nmask;
|
||||
u8 flags;
|
||||
spinlock_t *lock;
|
||||
};
|
||||
|
||||
extern const struct clk_ops clk_fractional_divider_ops;
|
||||
struct clk *clk_register_fractional_divider(struct device *dev,
|
||||
const char *name, const char *parent_name, unsigned long flags,
|
||||
void __iomem *reg, u8 mshift, u8 mwidth, u8 nshift, u8 nwidth,
|
||||
u8 clk_divider_flags, spinlock_t *lock);
|
||||
|
||||
/***
|
||||
* struct clk_composite - aggregate clock of mux, divider and gate clocks
|
||||
*
|
||||
@@ -498,10 +542,7 @@ struct clk_onecell_data {
|
||||
|
||||
extern struct of_device_id __clk_of_table;
|
||||
|
||||
#define CLK_OF_DECLARE(name, compat, fn) \
|
||||
static const struct of_device_id __clk_of_table_##name \
|
||||
__used __section(__clk_of_table) \
|
||||
= { .compatible = compat, .data = fn };
|
||||
#define CLK_OF_DECLARE(name, compat, fn) OF_DECLARE_1(clk, name, compat, fn)
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
int of_clk_add_provider(struct device_node *np,
|
||||
|
||||
@@ -155,6 +155,7 @@ extern void __iomem *at91_pmc_base;
|
||||
#define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */
|
||||
#define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */
|
||||
#define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [some SAM9] */
|
||||
#define AT91_PMC_OSCSEL (1 << 7) /* Slow Oscillator Selection [some SAM9] */
|
||||
#define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */
|
||||
#define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */
|
||||
#define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/*
|
||||
* Copyright 2013 Ideas On Board SPRL
|
||||
* Copyright 2013, 2014 Horms Solutions Ltd.
|
||||
*
|
||||
* Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
* Contact: Simon Horman <horms@verge.net.au>
|
||||
*
|
||||
* 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
|
||||
@@ -14,6 +16,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
void r8a7779_clocks_init(u32 mode);
|
||||
void rcar_gen2_clocks_init(u32 mode);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2013 - Hans de Goede <hdegoede@redhat.com>
|
||||
*
|
||||
* 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 program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_CLK_SUNXI_H_
|
||||
#define __LINUX_CLK_SUNXI_H_
|
||||
|
||||
#include <linux/clk.h>
|
||||
|
||||
void clk_sunxi_mmc_phase_control(struct clk *clk, u8 sample, u8 output);
|
||||
|
||||
#endif
|
||||
@@ -339,23 +339,13 @@ extern int clocksource_mmio_init(void __iomem *, const char *,
|
||||
|
||||
extern int clocksource_i8253_init(void);
|
||||
|
||||
struct device_node;
|
||||
typedef void(*clocksource_of_init_fn)(struct device_node *);
|
||||
#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
|
||||
OF_DECLARE_1(clksrc, name, compat, fn)
|
||||
|
||||
#ifdef CONFIG_CLKSRC_OF
|
||||
extern void clocksource_of_init(void);
|
||||
|
||||
#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
|
||||
static const struct of_device_id __clksrc_of_table_##name \
|
||||
__used __section(__clksrc_of_table) \
|
||||
= { .compatible = compat, \
|
||||
.data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn }
|
||||
#else
|
||||
static inline void clocksource_of_init(void) {}
|
||||
#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
|
||||
static const struct of_device_id __clksrc_of_table_##name \
|
||||
__attribute__((unused)) \
|
||||
= { .compatible = compat, \
|
||||
.data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn }
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_CLOCKSOURCE_H */
|
||||
|
||||
@@ -22,7 +22,7 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write,
|
||||
extern int fragmentation_index(struct zone *zone, unsigned int order);
|
||||
extern unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *mask,
|
||||
bool sync, bool *contended);
|
||||
enum migrate_mode mode, bool *contended);
|
||||
extern void compact_pgdat(pg_data_t *pgdat, int order);
|
||||
extern void reset_isolation_suitable(pg_data_t *pgdat);
|
||||
extern unsigned long compaction_suitable(struct zone *zone, int order);
|
||||
@@ -91,7 +91,7 @@ static inline bool compaction_restarting(struct zone *zone, int order)
|
||||
#else
|
||||
static inline unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *nodemask,
|
||||
bool sync, bool *contended)
|
||||
enum migrate_mode mode, bool *contended)
|
||||
{
|
||||
return COMPACT_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -13,12 +13,9 @@
|
||||
/* Intel ECC compiler doesn't support gcc specific asm stmts.
|
||||
* It uses intrinsics to do the equivalent things.
|
||||
*/
|
||||
#undef barrier
|
||||
#undef RELOC_HIDE
|
||||
#undef OPTIMIZER_HIDE_VAR
|
||||
|
||||
#define barrier() __memory_barrier()
|
||||
|
||||
#define RELOC_HIDE(ptr, off) \
|
||||
({ unsigned long __ptr; \
|
||||
__ptr = (unsigned long) (ptr); \
|
||||
|
||||
@@ -323,9 +323,18 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
||||
#endif
|
||||
#ifndef __compiletime_error
|
||||
# define __compiletime_error(message)
|
||||
# define __compiletime_error_fallback(condition) \
|
||||
/*
|
||||
* Sparse complains of variable sized arrays due to the temporary variable in
|
||||
* __compiletime_assert. Unfortunately we can't just expand it out to make
|
||||
* sparse see a constant array size without breaking compiletime_assert on old
|
||||
* versions of GCC (e.g. 4.2.4), so hide the array from sparse altogether.
|
||||
*/
|
||||
# ifndef __CHECKER__
|
||||
# define __compiletime_error_fallback(condition) \
|
||||
do { ((void)sizeof(char[1 - 2 * condition])); } while (0)
|
||||
#else
|
||||
# endif
|
||||
#endif
|
||||
#ifndef __compiletime_error_fallback
|
||||
# define __compiletime_error_fallback(condition) do { } while (0)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ struct cn_dev {
|
||||
int cn_add_callback(struct cb_id *id, const char *name,
|
||||
void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
|
||||
void cn_del_callback(struct cb_id *);
|
||||
int cn_netlink_send_mult(struct cn_msg *msg, u16 len, u32 portid, u32 group, gfp_t gfp_mask);
|
||||
int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 group, gfp_t gfp_mask);
|
||||
|
||||
int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
struct vt_struct;
|
||||
struct uni_pagedir;
|
||||
|
||||
#define NPAR 16
|
||||
|
||||
@@ -104,8 +105,8 @@ struct vc_data {
|
||||
unsigned int vc_bell_pitch; /* Console bell pitch */
|
||||
unsigned int vc_bell_duration; /* Console bell duration */
|
||||
struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */
|
||||
unsigned long vc_uni_pagedir;
|
||||
unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
|
||||
struct uni_pagedir *vc_uni_pagedir;
|
||||
struct uni_pagedir **vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
|
||||
bool vc_panic_force_write; /* when oops/panic this VC can accept forced output/blanking */
|
||||
/* additional information is in vt_kern.h */
|
||||
};
|
||||
|
||||
@@ -256,7 +256,6 @@ enum cpuhp_state {
|
||||
};
|
||||
|
||||
void cpu_startup_entry(enum cpuhp_state state);
|
||||
void cpu_idle(void);
|
||||
|
||||
void cpu_idle_poll_ctrl(bool enable);
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@ struct cpufreq_policy {
|
||||
bool transition_ongoing; /* Tracks transition status */
|
||||
spinlock_t transition_lock;
|
||||
wait_queue_head_t transition_wait;
|
||||
struct task_struct *transition_task; /* Task which is doing the transition */
|
||||
};
|
||||
|
||||
/* Only for ACPI */
|
||||
@@ -468,6 +469,55 @@ struct cpufreq_frequency_table {
|
||||
* order */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP)
|
||||
int dev_pm_opp_init_cpufreq_table(struct device *dev,
|
||||
struct cpufreq_frequency_table **table);
|
||||
void dev_pm_opp_free_cpufreq_table(struct device *dev,
|
||||
struct cpufreq_frequency_table **table);
|
||||
#else
|
||||
static inline int dev_pm_opp_init_cpufreq_table(struct device *dev,
|
||||
struct cpufreq_frequency_table
|
||||
**table)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline void dev_pm_opp_free_cpufreq_table(struct device *dev,
|
||||
struct cpufreq_frequency_table
|
||||
**table)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline bool cpufreq_next_valid(struct cpufreq_frequency_table **pos)
|
||||
{
|
||||
while ((*pos)->frequency != CPUFREQ_TABLE_END)
|
||||
if ((*pos)->frequency != CPUFREQ_ENTRY_INVALID)
|
||||
return true;
|
||||
else
|
||||
(*pos)++;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* cpufreq_for_each_entry - iterate over a cpufreq_frequency_table
|
||||
* @pos: the cpufreq_frequency_table * to use as a loop cursor.
|
||||
* @table: the cpufreq_frequency_table * to iterate over.
|
||||
*/
|
||||
|
||||
#define cpufreq_for_each_entry(pos, table) \
|
||||
for (pos = table; pos->frequency != CPUFREQ_TABLE_END; pos++)
|
||||
|
||||
/*
|
||||
* cpufreq_for_each_valid_entry - iterate over a cpufreq_frequency_table
|
||||
* excluding CPUFREQ_ENTRY_INVALID frequencies.
|
||||
* @pos: the cpufreq_frequency_table * to use as a loop cursor.
|
||||
* @table: the cpufreq_frequency_table * to iterate over.
|
||||
*/
|
||||
|
||||
#define cpufreq_for_each_valid_entry(pos, table) \
|
||||
for (pos = table; cpufreq_next_valid(&pos); pos++)
|
||||
|
||||
int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy,
|
||||
struct cpufreq_frequency_table *table);
|
||||
|
||||
|
||||
@@ -120,8 +120,6 @@ struct cpuidle_driver {
|
||||
#ifdef CONFIG_CPU_IDLE
|
||||
extern void disable_cpuidle(void);
|
||||
|
||||
extern int cpuidle_enabled(struct cpuidle_driver *drv,
|
||||
struct cpuidle_device *dev);
|
||||
extern int cpuidle_select(struct cpuidle_driver *drv,
|
||||
struct cpuidle_device *dev);
|
||||
extern int cpuidle_enter(struct cpuidle_driver *drv,
|
||||
@@ -145,13 +143,11 @@ extern void cpuidle_resume(void);
|
||||
extern int cpuidle_enable_device(struct cpuidle_device *dev);
|
||||
extern void cpuidle_disable_device(struct cpuidle_device *dev);
|
||||
extern int cpuidle_play_dead(void);
|
||||
extern void cpuidle_use_deepest_state(bool enable);
|
||||
|
||||
extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev);
|
||||
#else
|
||||
static inline void disable_cpuidle(void) { }
|
||||
static inline int cpuidle_enabled(struct cpuidle_driver *drv,
|
||||
struct cpuidle_device *dev)
|
||||
{return -ENODEV; }
|
||||
static inline int cpuidle_select(struct cpuidle_driver *drv,
|
||||
struct cpuidle_device *dev)
|
||||
{return -ENODEV; }
|
||||
@@ -180,6 +176,7 @@ static inline int cpuidle_enable_device(struct cpuidle_device *dev)
|
||||
{return -ENODEV; }
|
||||
static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
|
||||
static inline int cpuidle_play_dead(void) {return -ENODEV; }
|
||||
static inline void cpuidle_use_deepest_state(bool enable) {}
|
||||
static inline struct cpuidle_driver *cpuidle_get_cpu_driver(
|
||||
struct cpuidle_device *dev) {return NULL; }
|
||||
#endif
|
||||
|
||||
+26
-3
@@ -12,10 +12,31 @@
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/nodemask.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/jump_label.h>
|
||||
|
||||
#ifdef CONFIG_CPUSETS
|
||||
|
||||
extern int number_of_cpusets; /* How many cpusets are defined in system? */
|
||||
extern struct static_key cpusets_enabled_key;
|
||||
static inline bool cpusets_enabled(void)
|
||||
{
|
||||
return static_key_false(&cpusets_enabled_key);
|
||||
}
|
||||
|
||||
static inline int nr_cpusets(void)
|
||||
{
|
||||
/* jump label reference count + the top-level cpuset */
|
||||
return static_key_count(&cpusets_enabled_key) + 1;
|
||||
}
|
||||
|
||||
static inline void cpuset_inc(void)
|
||||
{
|
||||
static_key_slow_inc(&cpusets_enabled_key);
|
||||
}
|
||||
|
||||
static inline void cpuset_dec(void)
|
||||
{
|
||||
static_key_slow_dec(&cpusets_enabled_key);
|
||||
}
|
||||
|
||||
extern int cpuset_init(void);
|
||||
extern void cpuset_init_smp(void);
|
||||
@@ -32,13 +53,13 @@ extern int __cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask);
|
||||
|
||||
static inline int cpuset_node_allowed_softwall(int node, gfp_t gfp_mask)
|
||||
{
|
||||
return number_of_cpusets <= 1 ||
|
||||
return nr_cpusets() <= 1 ||
|
||||
__cpuset_node_allowed_softwall(node, gfp_mask);
|
||||
}
|
||||
|
||||
static inline int cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask)
|
||||
{
|
||||
return number_of_cpusets <= 1 ||
|
||||
return nr_cpusets() <= 1 ||
|
||||
__cpuset_node_allowed_hardwall(node, gfp_mask);
|
||||
}
|
||||
|
||||
@@ -124,6 +145,8 @@ static inline void set_mems_allowed(nodemask_t nodemask)
|
||||
|
||||
#else /* !CONFIG_CPUSETS */
|
||||
|
||||
static inline bool cpusets_enabled(void) { return false; }
|
||||
|
||||
static inline int cpuset_init(void) { return 0; }
|
||||
static inline void cpuset_init_smp(void) {}
|
||||
|
||||
|
||||
+34
-1
@@ -181,6 +181,12 @@ extern struct devfreq *devfreq_add_device(struct device *dev,
|
||||
const char *governor_name,
|
||||
void *data);
|
||||
extern int devfreq_remove_device(struct devfreq *devfreq);
|
||||
extern struct devfreq *devm_devfreq_add_device(struct device *dev,
|
||||
struct devfreq_dev_profile *profile,
|
||||
const char *governor_name,
|
||||
void *data);
|
||||
extern void devm_devfreq_remove_device(struct device *dev,
|
||||
struct devfreq *devfreq);
|
||||
|
||||
/* Supposed to be called by PM_SLEEP/PM_RUNTIME callbacks */
|
||||
extern int devfreq_suspend_device(struct devfreq *devfreq);
|
||||
@@ -193,6 +199,10 @@ extern int devfreq_register_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq);
|
||||
extern int devfreq_unregister_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq);
|
||||
extern int devm_devfreq_register_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq);
|
||||
extern void devm_devfreq_unregister_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq);
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
|
||||
/**
|
||||
@@ -220,7 +230,7 @@ static inline struct devfreq *devfreq_add_device(struct device *dev,
|
||||
const char *governor_name,
|
||||
void *data)
|
||||
{
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline int devfreq_remove_device(struct devfreq *devfreq)
|
||||
@@ -228,6 +238,19 @@ static inline int devfreq_remove_device(struct devfreq *devfreq)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline struct devfreq *devm_devfreq_add_device(struct device *dev,
|
||||
struct devfreq_dev_profile *profile,
|
||||
const char *governor_name,
|
||||
void *data)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline void devm_devfreq_remove_device(struct device *dev,
|
||||
struct devfreq *devfreq)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int devfreq_suspend_device(struct devfreq *devfreq)
|
||||
{
|
||||
return 0;
|
||||
@@ -256,6 +279,16 @@ static inline int devfreq_unregister_opp_notifier(struct device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int devm_devfreq_register_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline void devm_devfreq_unregister_opp_notifier(struct device *dev,
|
||||
struct devfreq *devfreq)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_PM_DEVFREQ */
|
||||
|
||||
#endif /* __LINUX_DEVFREQ_H__ */
|
||||
|
||||
+21
-2
@@ -623,6 +623,12 @@ static inline void *devm_kcalloc(struct device *dev,
|
||||
}
|
||||
extern void devm_kfree(struct device *dev, void *p);
|
||||
extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp);
|
||||
extern void *devm_kmemdup(struct device *dev, const void *src, size_t len,
|
||||
gfp_t gfp);
|
||||
|
||||
extern unsigned long devm_get_free_pages(struct device *dev,
|
||||
gfp_t gfp_mask, unsigned int order);
|
||||
extern void devm_free_pages(struct device *dev, unsigned long addr);
|
||||
|
||||
void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res);
|
||||
void __iomem *devm_request_and_ioremap(struct device *dev,
|
||||
@@ -673,6 +679,7 @@ struct acpi_dev_node {
|
||||
* variants, which GPIO pins act in what additional roles, and so
|
||||
* on. This shrinks the "Board Support Packages" (BSPs) and
|
||||
* minimizes board-specific #ifdefs in drivers.
|
||||
* @driver_data: Private pointer for driver specific info.
|
||||
* @power: For device power management.
|
||||
* See Documentation/power/devices.txt for details.
|
||||
* @pm_domain: Provide callbacks that are executed during system suspend,
|
||||
@@ -685,6 +692,7 @@ struct acpi_dev_node {
|
||||
* @coherent_dma_mask: Like dma_mask, but for alloc_coherent mapping as not all
|
||||
* hardware supports 64-bit addresses for consistent allocations
|
||||
* such descriptors.
|
||||
* @dma_pfn_offset: offset of DMA memory range relatively of RAM
|
||||
* @dma_parms: A low level driver may set these to teach IOMMU code about
|
||||
* segment limitations.
|
||||
* @dma_pools: Dma pools (if dma'ble device).
|
||||
@@ -734,6 +742,8 @@ struct device {
|
||||
device */
|
||||
void *platform_data; /* Platform specific data, device
|
||||
core doesn't touch it */
|
||||
void *driver_data; /* Driver data, set and get with
|
||||
dev_set/get_drvdata */
|
||||
struct dev_pm_info power;
|
||||
struct dev_pm_domain *pm_domain;
|
||||
|
||||
@@ -750,6 +760,7 @@ struct device {
|
||||
not all hardware supports
|
||||
64 bit addresses for consistent
|
||||
allocations such descriptors. */
|
||||
unsigned long dma_pfn_offset;
|
||||
|
||||
struct device_dma_parameters *dma_parms;
|
||||
|
||||
@@ -823,6 +834,16 @@ static inline void set_dev_node(struct device *dev, int node)
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void *dev_get_drvdata(const struct device *dev)
|
||||
{
|
||||
return dev->driver_data;
|
||||
}
|
||||
|
||||
static inline void dev_set_drvdata(struct device *dev, void *data)
|
||||
{
|
||||
dev->driver_data = data;
|
||||
}
|
||||
|
||||
static inline struct pm_subsys_data *dev_to_psd(struct device *dev)
|
||||
{
|
||||
return dev ? dev->power.subsys_data : NULL;
|
||||
@@ -907,8 +928,6 @@ extern int device_move(struct device *dev, struct device *new_parent,
|
||||
extern const char *device_get_devnode(struct device *dev,
|
||||
umode_t *mode, kuid_t *uid, kgid_t *gid,
|
||||
const char **tmp);
|
||||
extern void *dev_get_drvdata(const struct device *dev);
|
||||
extern int dev_set_drvdata(struct device *dev, void *data);
|
||||
|
||||
static inline bool device_supports_offline(struct device *dev)
|
||||
{
|
||||
|
||||
@@ -88,7 +88,8 @@ static inline void dma_contiguous_set_default(struct cma *cma)
|
||||
void dma_contiguous_reserve(phys_addr_t addr_limit);
|
||||
|
||||
int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base,
|
||||
phys_addr_t limit, struct cma **res_cma);
|
||||
phys_addr_t limit, struct cma **res_cma,
|
||||
bool fixed);
|
||||
|
||||
/**
|
||||
* dma_declare_contiguous() - reserve area for contiguous memory handling
|
||||
@@ -108,7 +109,7 @@ static inline int dma_declare_contiguous(struct device *dev, phys_addr_t size,
|
||||
{
|
||||
struct cma *cma;
|
||||
int ret;
|
||||
ret = dma_contiguous_reserve_area(size, base, limit, &cma);
|
||||
ret = dma_contiguous_reserve_area(size, base, limit, &cma, true);
|
||||
if (ret == 0)
|
||||
dev_set_cma_area(dev, cma);
|
||||
|
||||
@@ -136,7 +137,9 @@ static inline void dma_contiguous_set_default(struct cma *cma) { }
|
||||
static inline void dma_contiguous_reserve(phys_addr_t limit) { }
|
||||
|
||||
static inline int dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base,
|
||||
phys_addr_t limit, struct cma **res_cma) {
|
||||
phys_addr_t limit, struct cma **res_cma,
|
||||
bool fixed)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
#include <linux/dma-direction.h>
|
||||
#include <linux/scatterlist.h>
|
||||
|
||||
/*
|
||||
* A dma_addr_t can hold any valid DMA or bus address for the platform.
|
||||
* It can be given to a device to use as a DMA source or target. A CPU cannot
|
||||
* reference a dma_addr_t directly because there may be translation between
|
||||
* its physical address space and the bus address space.
|
||||
*/
|
||||
struct dma_map_ops {
|
||||
void* (*alloc)(struct device *dev, size_t size,
|
||||
dma_addr_t *dma_handle, gfp_t gfp,
|
||||
@@ -123,6 +129,13 @@ static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask)
|
||||
|
||||
extern u64 dma_get_required_mask(struct device *dev);
|
||||
|
||||
#ifndef set_arch_dma_coherent_ops
|
||||
static inline int set_arch_dma_coherent_ops(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline unsigned int dma_get_max_seg_size(struct device *dev)
|
||||
{
|
||||
return dev->dma_parms ? dev->dma_parms->max_segment_size : 65536;
|
||||
@@ -186,7 +199,7 @@ static inline int dma_get_cache_alignment(void)
|
||||
|
||||
#ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
|
||||
static inline int
|
||||
dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
|
||||
dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
|
||||
dma_addr_t device_addr, size_t size, int flags)
|
||||
{
|
||||
return 0;
|
||||
@@ -217,13 +230,14 @@ extern void *dmam_alloc_noncoherent(struct device *dev, size_t size,
|
||||
extern void dmam_free_noncoherent(struct device *dev, size_t size, void *vaddr,
|
||||
dma_addr_t dma_handle);
|
||||
#ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
|
||||
extern int dmam_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
|
||||
extern int dmam_declare_coherent_memory(struct device *dev,
|
||||
phys_addr_t phys_addr,
|
||||
dma_addr_t device_addr, size_t size,
|
||||
int flags);
|
||||
extern void dmam_release_declared_memory(struct device *dev);
|
||||
#else /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */
|
||||
static inline int dmam_declare_coherent_memory(struct device *dev,
|
||||
dma_addr_t bus_addr, dma_addr_t device_addr,
|
||||
phys_addr_t phys_addr, dma_addr_t device_addr,
|
||||
size_t size, gfp_t gfp)
|
||||
{
|
||||
return 0;
|
||||
|
||||
+22
-2
@@ -575,6 +575,9 @@ typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long si
|
||||
#define EFI_FILE_SYSTEM_GUID \
|
||||
EFI_GUID( 0x964e5b22, 0x6459, 0x11d2, 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b )
|
||||
|
||||
#define DEVICE_TREE_GUID \
|
||||
EFI_GUID( 0xb1b621d5, 0xf19c, 0x41a5, 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 )
|
||||
|
||||
typedef struct {
|
||||
efi_guid_t guid;
|
||||
u64 table;
|
||||
@@ -664,6 +667,14 @@ struct efi_memory_map {
|
||||
unsigned long desc_size;
|
||||
};
|
||||
|
||||
struct efi_fdt_params {
|
||||
u64 system_table;
|
||||
u64 mmap;
|
||||
u32 mmap_size;
|
||||
u32 desc_size;
|
||||
u32 desc_ver;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
u32 revision;
|
||||
u32 parent_handle;
|
||||
@@ -861,8 +872,15 @@ extern void efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
extern void efi_get_time(struct timespec *now);
|
||||
extern int efi_set_rtc_mmss(const struct timespec *now);
|
||||
extern void efi_reserve_boot_services(void);
|
||||
extern int efi_get_fdt_params(struct efi_fdt_params *params, int verbose);
|
||||
extern struct efi_memory_map memmap;
|
||||
|
||||
/* Iterate through an efi_memory_map */
|
||||
#define for_each_efi_memory_desc(m, md) \
|
||||
for ((md) = (m)->map; \
|
||||
(md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); \
|
||||
(md) = (void *)(md) + (m)->desc_size)
|
||||
|
||||
/**
|
||||
* efi_range_is_wc - check the WC bit on an address range
|
||||
* @start: starting kvirt address
|
||||
@@ -1033,8 +1051,10 @@ struct efivars {
|
||||
* and we use a page for reading/writing.
|
||||
*/
|
||||
|
||||
#define EFI_VAR_NAME_LEN 1024
|
||||
|
||||
struct efi_variable {
|
||||
efi_char16_t VariableName[1024/sizeof(efi_char16_t)];
|
||||
efi_char16_t VariableName[EFI_VAR_NAME_LEN/sizeof(efi_char16_t)];
|
||||
efi_guid_t VendorGuid;
|
||||
unsigned long DataSize;
|
||||
__u8 Data[1024];
|
||||
@@ -1116,7 +1136,7 @@ int efivar_entry_iter(int (*func)(struct efivar_entry *, void *),
|
||||
struct efivar_entry *efivar_entry_find(efi_char16_t *name, efi_guid_t guid,
|
||||
struct list_head *head, bool remove);
|
||||
|
||||
bool efivar_validate(struct efi_variable *var, u8 *data, unsigned long len);
|
||||
bool efivar_validate(efi_char16_t *var_name, u8 *data, unsigned long len);
|
||||
|
||||
extern struct work_struct efivar_work;
|
||||
void efivar_run_worker(void);
|
||||
|
||||
@@ -185,8 +185,21 @@ struct extcon_specific_cable_nb {
|
||||
*/
|
||||
extern int extcon_dev_register(struct extcon_dev *edev);
|
||||
extern void extcon_dev_unregister(struct extcon_dev *edev);
|
||||
extern int devm_extcon_dev_register(struct device *dev,
|
||||
struct extcon_dev *edev);
|
||||
extern void devm_extcon_dev_unregister(struct device *dev,
|
||||
struct extcon_dev *edev);
|
||||
extern struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name);
|
||||
|
||||
/*
|
||||
* Following APIs control the memory of extcon device.
|
||||
*/
|
||||
extern struct extcon_dev *extcon_dev_allocate(const char **cables);
|
||||
extern void extcon_dev_free(struct extcon_dev *edev);
|
||||
extern struct extcon_dev *devm_extcon_dev_allocate(struct device *dev,
|
||||
const char **cables);
|
||||
extern void devm_extcon_dev_free(struct device *dev, struct extcon_dev *edev);
|
||||
|
||||
/*
|
||||
* get/set/update_state access the 32b encoded state value, which represents
|
||||
* states of all possible cables of the multistate port. For example, if one
|
||||
@@ -254,6 +267,30 @@ static inline int extcon_dev_register(struct extcon_dev *edev)
|
||||
|
||||
static inline void extcon_dev_unregister(struct extcon_dev *edev) { }
|
||||
|
||||
static inline int devm_extcon_dev_register(struct device *dev,
|
||||
struct extcon_dev *edev)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline void devm_extcon_dev_unregister(struct device *dev,
|
||||
struct extcon_dev *edev) { }
|
||||
|
||||
static inline struct extcon_dev *extcon_dev_allocate(const char **cables)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline void extcon_dev_free(struct extcon_dev *edev) { }
|
||||
|
||||
static inline struct extcon_dev *devm_extcon_dev_allocate(struct device *dev,
|
||||
const char **cables)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline void devm_extcon_dev_free(struct extcon_dev *edev) { }
|
||||
|
||||
static inline u32 extcon_get_state(struct extcon_dev *edev)
|
||||
{
|
||||
return 0;
|
||||
|
||||
+2
-1
@@ -47,6 +47,7 @@ struct device_node;
|
||||
|
||||
#define FB_MISC_PRIM_COLOR 1
|
||||
#define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */
|
||||
#define FB_MISC_HDMI 4
|
||||
struct fb_chroma {
|
||||
__u32 redx; /* in fraction of 1024 */
|
||||
__u32 greenx;
|
||||
@@ -641,7 +642,7 @@ static inline void unlock_fb_info(struct fb_info *info)
|
||||
static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
|
||||
u8 *src, u32 s_pitch, u32 height)
|
||||
{
|
||||
int i, j;
|
||||
u32 i, j;
|
||||
|
||||
d_pitch -= s_pitch;
|
||||
|
||||
|
||||
@@ -367,6 +367,9 @@ static inline int fw_stream_packet_destination_id(int tag, int channel, int sy)
|
||||
return tag << 14 | channel << 8 | sy;
|
||||
}
|
||||
|
||||
void fw_schedule_bus_reset(struct fw_card *card, bool delayed,
|
||||
bool short_reset);
|
||||
|
||||
struct fw_descriptor {
|
||||
struct list_head link;
|
||||
size_t length;
|
||||
|
||||
@@ -2590,6 +2590,7 @@ extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
|
||||
extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos,
|
||||
const void __user *from, size_t count);
|
||||
|
||||
extern int __generic_file_fsync(struct file *, loff_t, loff_t, int);
|
||||
extern int generic_file_fsync(struct file *, loff_t, loff_t, int);
|
||||
|
||||
extern int generic_check_addressable(unsigned, u64);
|
||||
|
||||
+18
-16
@@ -616,25 +616,27 @@ static inline void __ftrace_enabled_restore(int enabled)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef HAVE_ARCH_CALLER_ADDR
|
||||
/* All archs should have this, but we define it for consistency */
|
||||
#ifndef ftrace_return_address0
|
||||
# define ftrace_return_address0 __builtin_return_address(0)
|
||||
#endif
|
||||
|
||||
/* Archs may use other ways for ADDR1 and beyond */
|
||||
#ifndef ftrace_return_address
|
||||
# ifdef CONFIG_FRAME_POINTER
|
||||
# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
|
||||
# define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1))
|
||||
# define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2))
|
||||
# define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3))
|
||||
# define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4))
|
||||
# define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5))
|
||||
# define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6))
|
||||
# define ftrace_return_address(n) __builtin_return_address(n)
|
||||
# else
|
||||
# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
|
||||
# define CALLER_ADDR1 0UL
|
||||
# define CALLER_ADDR2 0UL
|
||||
# define CALLER_ADDR3 0UL
|
||||
# define CALLER_ADDR4 0UL
|
||||
# define CALLER_ADDR5 0UL
|
||||
# define CALLER_ADDR6 0UL
|
||||
# define ftrace_return_address(n) 0UL
|
||||
# endif
|
||||
#endif /* ifndef HAVE_ARCH_CALLER_ADDR */
|
||||
#endif
|
||||
|
||||
#define CALLER_ADDR0 ((unsigned long)ftrace_return_address0)
|
||||
#define CALLER_ADDR1 ((unsigned long)ftrace_return_address(1))
|
||||
#define CALLER_ADDR2 ((unsigned long)ftrace_return_address(2))
|
||||
#define CALLER_ADDR3 ((unsigned long)ftrace_return_address(3))
|
||||
#define CALLER_ADDR4 ((unsigned long)ftrace_return_address(4))
|
||||
#define CALLER_ADDR5 ((unsigned long)ftrace_return_address(5))
|
||||
#define CALLER_ADDR6 ((unsigned long)ftrace_return_address(6))
|
||||
|
||||
#ifdef CONFIG_IRQSOFF_TRACER
|
||||
extern void time_hardirqs_on(unsigned long a0, unsigned long a1);
|
||||
|
||||
@@ -649,7 +649,7 @@ static inline void hd_ref_init(struct hd_struct *part)
|
||||
static inline void hd_struct_get(struct hd_struct *part)
|
||||
{
|
||||
atomic_inc(&part->ref);
|
||||
smp_mb__after_atomic_inc();
|
||||
smp_mb__after_atomic();
|
||||
}
|
||||
|
||||
static inline int hd_struct_try_get(struct hd_struct *part)
|
||||
|
||||
+8
-7
@@ -6,7 +6,6 @@
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/topology.h>
|
||||
#include <linux/mmdebug.h>
|
||||
|
||||
struct vm_area_struct;
|
||||
|
||||
@@ -31,7 +30,6 @@ struct vm_area_struct;
|
||||
#define ___GFP_HARDWALL 0x20000u
|
||||
#define ___GFP_THISNODE 0x40000u
|
||||
#define ___GFP_RECLAIMABLE 0x80000u
|
||||
#define ___GFP_KMEMCG 0x100000u
|
||||
#define ___GFP_NOTRACK 0x200000u
|
||||
#define ___GFP_NO_KSWAPD 0x400000u
|
||||
#define ___GFP_OTHER_NODE 0x800000u
|
||||
@@ -91,7 +89,6 @@ struct vm_area_struct;
|
||||
|
||||
#define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD)
|
||||
#define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */
|
||||
#define __GFP_KMEMCG ((__force gfp_t)___GFP_KMEMCG) /* Allocation comes from a memcg-accounted resource */
|
||||
#define __GFP_WRITE ((__force gfp_t)___GFP_WRITE) /* Allocator intends to dirty page */
|
||||
|
||||
/*
|
||||
@@ -353,6 +350,10 @@ extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order,
|
||||
#define alloc_page_vma_node(gfp_mask, vma, addr, node) \
|
||||
alloc_pages_vma(gfp_mask, 0, vma, addr, node)
|
||||
|
||||
extern struct page *alloc_kmem_pages(gfp_t gfp_mask, unsigned int order);
|
||||
extern struct page *alloc_kmem_pages_node(int nid, gfp_t gfp_mask,
|
||||
unsigned int order);
|
||||
|
||||
extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
|
||||
extern unsigned long get_zeroed_page(gfp_t gfp_mask);
|
||||
|
||||
@@ -369,11 +370,11 @@ void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask);
|
||||
|
||||
extern void __free_pages(struct page *page, unsigned int order);
|
||||
extern void free_pages(unsigned long addr, unsigned int order);
|
||||
extern void free_hot_cold_page(struct page *page, int cold);
|
||||
extern void free_hot_cold_page_list(struct list_head *list, int cold);
|
||||
extern void free_hot_cold_page(struct page *page, bool cold);
|
||||
extern void free_hot_cold_page_list(struct list_head *list, bool cold);
|
||||
|
||||
extern void __free_memcg_kmem_pages(struct page *page, unsigned int order);
|
||||
extern void free_memcg_kmem_pages(unsigned long addr, unsigned int order);
|
||||
extern void __free_kmem_pages(struct page *page, unsigned int order);
|
||||
extern void free_kmem_pages(unsigned long addr, unsigned int order);
|
||||
|
||||
#define __free_page(page) __free_pages((page), 0)
|
||||
#define free_page(addr) free_pages((addr), 0)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef __LINUX_GOLDFISH_H
|
||||
#define __LINUX_GOLDFISH_H
|
||||
|
||||
/* Helpers for Goldfish virtual platform */
|
||||
|
||||
static inline void gf_write64(unsigned long data,
|
||||
void __iomem *portl, void __iomem *porth)
|
||||
{
|
||||
writel((u32)data, portl);
|
||||
#ifdef CONFIG_64BIT
|
||||
writel(data>>32, porth);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* __LINUX_GOLDFISH_H */
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef __LINUX_GPIO_CONSUMER_H
|
||||
#define __LINUX_GPIO_CONSUMER_H
|
||||
|
||||
#include <linux/bug.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
@@ -23,6 +24,12 @@ struct gpio_desc *__must_check gpiod_get(struct device *dev,
|
||||
struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
|
||||
const char *con_id,
|
||||
unsigned int idx);
|
||||
struct gpio_desc *__must_check gpiod_get_optional(struct device *dev,
|
||||
const char *con_id);
|
||||
struct gpio_desc *__must_check gpiod_get_index_optional(struct device *dev,
|
||||
const char *con_id,
|
||||
unsigned int index);
|
||||
|
||||
void gpiod_put(struct gpio_desc *desc);
|
||||
|
||||
struct gpio_desc *__must_check devm_gpiod_get(struct device *dev,
|
||||
@@ -30,6 +37,12 @@ struct gpio_desc *__must_check devm_gpiod_get(struct device *dev,
|
||||
struct gpio_desc *__must_check devm_gpiod_get_index(struct device *dev,
|
||||
const char *con_id,
|
||||
unsigned int idx);
|
||||
struct gpio_desc *__must_check devm_gpiod_get_optional(struct device *dev,
|
||||
const char *con_id);
|
||||
struct gpio_desc *__must_check
|
||||
devm_gpiod_get_index_optional(struct device *dev, const char *con_id,
|
||||
unsigned int index);
|
||||
|
||||
void devm_gpiod_put(struct device *dev, struct gpio_desc *desc);
|
||||
|
||||
int gpiod_get_direction(const struct gpio_desc *desc);
|
||||
@@ -73,6 +86,20 @@ static inline struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline struct gpio_desc *__must_check
|
||||
gpiod_get_optional(struct device *dev, const char *con_id)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline struct gpio_desc *__must_check
|
||||
gpiod_get_index_optional(struct device *dev, const char *con_id,
|
||||
unsigned int index)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline void gpiod_put(struct gpio_desc *desc)
|
||||
{
|
||||
might_sleep();
|
||||
@@ -93,6 +120,20 @@ struct gpio_desc *__must_check devm_gpiod_get_index(struct device *dev,
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline struct gpio_desc *__must_check
|
||||
devm_gpiod_get_optional(struct device *dev, const char *con_id)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline struct gpio_desc *__must_check
|
||||
devm_gpiod_get_index_optional(struct device *dev, const char *con_id,
|
||||
unsigned int index)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline void devm_gpiod_put(struct device *dev, struct gpio_desc *desc)
|
||||
{
|
||||
might_sleep();
|
||||
|
||||
@@ -51,7 +51,10 @@ struct seq_file;
|
||||
* format specifier for an unsigned int. It is substituted by the actual
|
||||
* number of the gpio.
|
||||
* @can_sleep: flag must be set iff get()/set() methods sleep, as they
|
||||
* must while accessing GPIO expander chips over I2C or SPI
|
||||
* must while accessing GPIO expander chips over I2C or SPI. This
|
||||
* implies that if the chip supports IRQs, these IRQs need to be threaded
|
||||
* as the chip access may sleep when e.g. reading out the IRQ status
|
||||
* registers.
|
||||
* @exported: flags if the gpiochip is exported for use from sysfs. Private.
|
||||
*
|
||||
* A gpio_chip can help platforms abstract various sources of GPIOs so
|
||||
|
||||
@@ -189,7 +189,7 @@ struct hid_sensor_common {
|
||||
struct hid_sensor_hub_device *hsdev;
|
||||
struct platform_device *pdev;
|
||||
unsigned usage_id;
|
||||
bool data_ready;
|
||||
atomic_t data_ready;
|
||||
struct iio_trigger *trigger;
|
||||
struct hid_sensor_hub_attribute_info poll;
|
||||
struct hid_sensor_hub_attribute_info report_state;
|
||||
@@ -223,4 +223,10 @@ int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,
|
||||
int hid_sensor_get_usage_index(struct hid_sensor_hub_device *hsdev,
|
||||
u32 report_id, int field_index, u32 usage_id);
|
||||
|
||||
int hid_sensor_format_scale(u32 usage_id,
|
||||
struct hid_sensor_hub_attribute_info *attr_info,
|
||||
int *val0, int *val1);
|
||||
|
||||
s32 hid_sensor_read_poll_value(struct hid_sensor_common *st);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
#define HID_USAGE_SENSOR_ORIENT_TILT_Y 0x200480
|
||||
#define HID_USAGE_SENSOR_ORIENT_TILT_Z 0x200481
|
||||
|
||||
#define HID_USAGE_SENSOR_DEVICE_ORIENTATION 0x20008A
|
||||
#define HID_USAGE_SENSOR_ORIENT_ROTATION_MATRIX 0x200482
|
||||
#define HID_USAGE_SENSOR_ORIENT_QUATERNION 0x200483
|
||||
#define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX 0x200484
|
||||
|
||||
+12
-5
@@ -233,11 +233,6 @@ struct hid_item {
|
||||
#define HID_DG_BARRELSWITCH 0x000d0044
|
||||
#define HID_DG_ERASER 0x000d0045
|
||||
#define HID_DG_TABLETPICK 0x000d0046
|
||||
/*
|
||||
* as of May 20, 2009 the usages below are not yet in the official USB spec
|
||||
* but are being pushed by Microsft as described in their paper "Digitizer
|
||||
* Drivers for Windows Touch and Pen-Based Computers"
|
||||
*/
|
||||
#define HID_DG_CONFIDENCE 0x000d0047
|
||||
#define HID_DG_WIDTH 0x000d0048
|
||||
#define HID_DG_HEIGHT 0x000d0049
|
||||
@@ -246,6 +241,8 @@ struct hid_item {
|
||||
#define HID_DG_DEVICEINDEX 0x000d0053
|
||||
#define HID_DG_CONTACTCOUNT 0x000d0054
|
||||
#define HID_DG_CONTACTMAX 0x000d0055
|
||||
#define HID_DG_BARRELSWITCH2 0x000d005a
|
||||
#define HID_DG_TOOLSERIALNUMBER 0x000d005b
|
||||
|
||||
/*
|
||||
* HID report types --- Ouch! HID spec says 1 2 3!
|
||||
@@ -299,12 +296,20 @@ struct hid_item {
|
||||
|
||||
/*
|
||||
* HID device groups
|
||||
*
|
||||
* Note: HID_GROUP_ANY is declared in linux/mod_devicetable.h
|
||||
* and has a value of 0x0000
|
||||
*/
|
||||
#define HID_GROUP_GENERIC 0x0001
|
||||
#define HID_GROUP_MULTITOUCH 0x0002
|
||||
#define HID_GROUP_SENSOR_HUB 0x0003
|
||||
#define HID_GROUP_MULTITOUCH_WIN_8 0x0004
|
||||
|
||||
/*
|
||||
* Vendor specific HID device groups
|
||||
*/
|
||||
#define HID_GROUP_RMI 0x0100
|
||||
|
||||
/*
|
||||
* This is the global environment of the parser. This information is
|
||||
* persistent for main-items. The global environment can be saved and
|
||||
@@ -570,6 +575,8 @@ struct hid_descriptor {
|
||||
.bus = BUS_USB, .vendor = (ven), .product = (prod)
|
||||
#define HID_BLUETOOTH_DEVICE(ven, prod) \
|
||||
.bus = BUS_BLUETOOTH, .vendor = (ven), .product = (prod)
|
||||
#define HID_I2C_DEVICE(ven, prod) \
|
||||
.bus = BUS_I2C, .vendor = (ven), .product = (prod)
|
||||
|
||||
#define HID_REPORT_ID(rep) \
|
||||
.report_type = (rep)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user