Merge remote-tracking branch 'regmap/topic/drivers' into regmap-next
Resolved simple add/add conflicts: drivers/base/regmap/internal.h drivers/base/regmap/regmap.c
This commit is contained in:
@@ -18,7 +18,7 @@ struct pt_regs;
|
||||
#define BINPRM_BUF_SIZE 128
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/list.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#define CORENAME_MAX_SIZE 128
|
||||
|
||||
@@ -58,6 +58,7 @@ struct linux_binprm {
|
||||
unsigned interp_flags;
|
||||
unsigned interp_data;
|
||||
unsigned long loader, exec;
|
||||
char tcomm[TASK_COMM_LEN];
|
||||
};
|
||||
|
||||
#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0
|
||||
|
@@ -55,6 +55,26 @@ static inline unsigned long hweight_long(unsigned long w)
|
||||
return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
|
||||
}
|
||||
|
||||
/**
|
||||
* rol64 - rotate a 64-bit value left
|
||||
* @word: value to rotate
|
||||
* @shift: bits to roll
|
||||
*/
|
||||
static inline __u64 rol64(__u64 word, unsigned int shift)
|
||||
{
|
||||
return (word << shift) | (word >> (64 - shift));
|
||||
}
|
||||
|
||||
/**
|
||||
* ror64 - rotate a 64-bit value right
|
||||
* @word: value to rotate
|
||||
* @shift: bits to roll
|
||||
*/
|
||||
static inline __u64 ror64(__u64 word, unsigned int shift)
|
||||
{
|
||||
return (word >> shift) | (word << (64 - shift));
|
||||
}
|
||||
|
||||
/**
|
||||
* rol32 - rotate a 32-bit value left
|
||||
* @word: value to rotate
|
||||
|
@@ -399,9 +399,6 @@ struct request_queue {
|
||||
/* Throttle data */
|
||||
struct throtl_data *td;
|
||||
#endif
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
int ioc_release_depth;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */
|
||||
|
@@ -952,7 +952,8 @@ struct cdrom_device_info {
|
||||
char name[20]; /* name of the device type */
|
||||
/* per-device flags */
|
||||
__u8 sanyo_slot : 2; /* Sanyo 3 CD changer support */
|
||||
__u8 reserved : 6; /* not used yet */
|
||||
__u8 keeplocked : 1; /* CDROM_LOCKDOOR status */
|
||||
__u8 reserved : 5; /* not used yet */
|
||||
int cdda_method; /* see flags */
|
||||
__u8 last_sense;
|
||||
__u8 media_written; /* dirty flag, DVD+RW bookkeeping */
|
||||
|
@@ -279,11 +279,11 @@ struct device *driver_find_device(struct device_driver *drv,
|
||||
|
||||
/**
|
||||
* struct subsys_interface - interfaces to device functions
|
||||
* @name name of the device function
|
||||
* @subsystem subsytem of the devices to attach to
|
||||
* @node the list of functions registered at the subsystem
|
||||
* @add device hookup to device function handler
|
||||
* @remove device hookup to device function handler
|
||||
* @name: name of the device function
|
||||
* @subsys: subsytem of the devices to attach to
|
||||
* @node: the list of functions registered at the subsystem
|
||||
* @add_dev: device hookup to device function handler
|
||||
* @remove_dev: device hookup to device function handler
|
||||
*
|
||||
* Simple interfaces attached to a subsystem. Multiple interfaces can
|
||||
* attach to a subsystem and its devices. Unlike drivers, they do not
|
||||
@@ -612,6 +612,7 @@ struct device_dma_parameters {
|
||||
* @archdata: For arch-specific additions.
|
||||
* @of_node: Associated device tree node.
|
||||
* @devt: For creating the sysfs "dev".
|
||||
* @id: device instance
|
||||
* @devres_lock: Spinlock to protect the resource of the device.
|
||||
* @devres_head: The resources list of the device.
|
||||
* @knode_class: The node used to add the device to the class list.
|
||||
@@ -1003,6 +1004,10 @@ extern long sysfs_deprecated;
|
||||
* Each module may only use this macro once, and calling it replaces
|
||||
* module_init() and module_exit().
|
||||
*
|
||||
* @__driver: driver name
|
||||
* @__register: register function for this driver type
|
||||
* @__unregister: unregister function for this driver type
|
||||
*
|
||||
* Use this macro to construct bus specific macros for registering
|
||||
* drivers, and do not use it on its own.
|
||||
*/
|
||||
|
@@ -42,12 +42,6 @@ struct elevator_ops
|
||||
elevator_merged_fn *elevator_merged_fn;
|
||||
elevator_merge_req_fn *elevator_merge_req_fn;
|
||||
elevator_allow_merge_fn *elevator_allow_merge_fn;
|
||||
|
||||
/*
|
||||
* Used for both plugged list and elevator merging and in the
|
||||
* former case called without queue_lock. Read comment on top of
|
||||
* attempt_plug_merge() for details.
|
||||
*/
|
||||
elevator_bio_merged_fn *elevator_bio_merged_fn;
|
||||
|
||||
elevator_dispatch_fn *elevator_dispatch_fn;
|
||||
@@ -122,7 +116,6 @@ extern void elv_dispatch_add_tail(struct request_queue *, struct request *);
|
||||
extern void elv_add_request(struct request_queue *, struct request *, int);
|
||||
extern void __elv_add_request(struct request_queue *, struct request *, int);
|
||||
extern int elv_merge(struct request_queue *, struct request **, struct bio *);
|
||||
extern int elv_try_merge(struct request *, struct bio *);
|
||||
extern void elv_merge_requests(struct request_queue *, struct request *,
|
||||
struct request *);
|
||||
extern void elv_merged_request(struct request_queue *, struct request *, int);
|
||||
@@ -155,7 +148,7 @@ extern ssize_t elv_iosched_store(struct request_queue *, const char *, size_t);
|
||||
extern int elevator_init(struct request_queue *, char *);
|
||||
extern void elevator_exit(struct elevator_queue *);
|
||||
extern int elevator_change(struct request_queue *, const char *);
|
||||
extern int elv_rq_merge_ok(struct request *, struct bio *);
|
||||
extern bool elv_rq_merge_ok(struct request *, struct bio *);
|
||||
|
||||
/*
|
||||
* Helper functions.
|
||||
|
@@ -39,6 +39,7 @@ extern bool __refrigerator(bool check_kthr_stop);
|
||||
extern int freeze_processes(void);
|
||||
extern int freeze_kernel_threads(void);
|
||||
extern void thaw_processes(void);
|
||||
extern void thaw_kernel_threads(void);
|
||||
|
||||
static inline bool try_to_freeze(void)
|
||||
{
|
||||
@@ -174,6 +175,7 @@ static inline bool __refrigerator(bool check_kthr_stop) { return false; }
|
||||
static inline int freeze_processes(void) { return -ENOSYS; }
|
||||
static inline int freeze_kernel_threads(void) { return -ENOSYS; }
|
||||
static inline void thaw_processes(void) {}
|
||||
static inline void thaw_kernel_threads(void) {}
|
||||
|
||||
static inline bool try_to_freeze(void) { return false; }
|
||||
|
||||
|
@@ -396,6 +396,7 @@ struct inodes_stat_t {
|
||||
#include <linux/rculist_bl.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/shrinker.h>
|
||||
#include <linux/migrate_mode.h>
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
@@ -526,7 +527,6 @@ enum positive_aop_returns {
|
||||
struct page;
|
||||
struct address_space;
|
||||
struct writeback_control;
|
||||
enum migrate_mode;
|
||||
|
||||
struct iov_iter {
|
||||
const struct iovec *iov;
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _GPIO_KEYS_H
|
||||
#define _GPIO_KEYS_H
|
||||
|
||||
struct device;
|
||||
|
||||
struct gpio_keys_button {
|
||||
/* Configuration parameters */
|
||||
unsigned int code; /* input event code (KEY_*, SW_*) */
|
||||
|
@@ -35,7 +35,7 @@
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
||||
|
||||
#define MAX_PAGE_BUFFER_COUNT 18
|
||||
#define MAX_PAGE_BUFFER_COUNT 19
|
||||
#define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
@@ -46,6 +46,10 @@ struct team_port {
|
||||
u32 speed;
|
||||
u8 duplex;
|
||||
|
||||
/* Custom gennetlink interface related flags */
|
||||
bool changed;
|
||||
bool removed;
|
||||
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
@@ -72,6 +76,10 @@ struct team_option {
|
||||
enum team_option_type type;
|
||||
int (*getter)(struct team *team, void *arg);
|
||||
int (*setter)(struct team *team, void *arg);
|
||||
|
||||
/* Custom gennetlink interface related flags */
|
||||
bool changed;
|
||||
bool removed;
|
||||
};
|
||||
|
||||
struct team_mode {
|
||||
@@ -207,6 +215,7 @@ enum {
|
||||
TEAM_ATTR_OPTION_CHANGED, /* flag */
|
||||
TEAM_ATTR_OPTION_TYPE, /* u8 */
|
||||
TEAM_ATTR_OPTION_DATA, /* dynamic */
|
||||
TEAM_ATTR_OPTION_REMOVED, /* flag */
|
||||
|
||||
__TEAM_ATTR_OPTION_MAX,
|
||||
TEAM_ATTR_OPTION_MAX = __TEAM_ATTR_OPTION_MAX - 1,
|
||||
@@ -227,6 +236,7 @@ enum {
|
||||
TEAM_ATTR_PORT_LINKUP, /* flag */
|
||||
TEAM_ATTR_PORT_SPEED, /* u32 */
|
||||
TEAM_ATTR_PORT_DUPLEX, /* u8 */
|
||||
TEAM_ATTR_PORT_REMOVED, /* flag */
|
||||
|
||||
__TEAM_ATTR_PORT_MAX,
|
||||
TEAM_ATTR_PORT_MAX = __TEAM_ATTR_PORT_MAX - 1,
|
||||
|
@@ -133,7 +133,7 @@ static inline struct io_context *ioc_task_link(struct io_context *ioc)
|
||||
|
||||
struct task_struct;
|
||||
#ifdef CONFIG_BLOCK
|
||||
void put_io_context(struct io_context *ioc, struct request_queue *locked_q);
|
||||
void put_io_context(struct io_context *ioc);
|
||||
void exit_io_context(struct task_struct *task);
|
||||
struct io_context *get_task_io_context(struct task_struct *task,
|
||||
gfp_t gfp_flags, int node);
|
||||
@@ -141,8 +141,7 @@ void ioc_ioprio_changed(struct io_context *ioc, int ioprio);
|
||||
void ioc_cgroup_changed(struct io_context *ioc);
|
||||
#else
|
||||
struct io_context;
|
||||
static inline void put_io_context(struct io_context *ioc,
|
||||
struct request_queue *locked_q) { }
|
||||
static inline void put_io_context(struct io_context *ioc) { }
|
||||
static inline void exit_io_context(struct task_struct *task) { }
|
||||
#endif
|
||||
|
||||
|
@@ -50,9 +50,11 @@
|
||||
* note header. For kdump, the code in vmcore.c runs in the context
|
||||
* of the second kernel to combine them into one note.
|
||||
*/
|
||||
#ifndef KEXEC_NOTE_BYTES
|
||||
#define KEXEC_NOTE_BYTES ( (KEXEC_NOTE_HEAD_BYTES * 2) + \
|
||||
KEXEC_CORE_NOTE_NAME_BYTES + \
|
||||
KEXEC_CORE_NOTE_DESC_BYTES )
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This structure is used to hold the arguments that are used when loading
|
||||
|
0
include/linux/lp8727.h
Executable file → Normal file
0
include/linux/lp8727.h
Executable file → Normal file
@@ -10,7 +10,6 @@
|
||||
#ifndef MCP_H
|
||||
#define MCP_H
|
||||
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <mach/dma.h>
|
||||
|
||||
struct mcp_ops;
|
||||
@@ -27,7 +26,7 @@ struct mcp {
|
||||
dma_device_t dma_telco_rd;
|
||||
dma_device_t dma_telco_wr;
|
||||
struct device attached_device;
|
||||
const char *codec;
|
||||
int gpio_base;
|
||||
};
|
||||
|
||||
struct mcp_ops {
|
||||
@@ -45,11 +44,10 @@ void mcp_reg_write(struct mcp *, unsigned int, unsigned int);
|
||||
unsigned int mcp_reg_read(struct mcp *, unsigned int);
|
||||
void mcp_enable(struct mcp *);
|
||||
void mcp_disable(struct mcp *);
|
||||
const struct mcp_device_id *mcp_get_device_id(const struct mcp *mcp);
|
||||
#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate)
|
||||
|
||||
struct mcp *mcp_host_alloc(struct device *, size_t);
|
||||
int mcp_host_register(struct mcp *, void *);
|
||||
int mcp_host_register(struct mcp *);
|
||||
void mcp_host_unregister(struct mcp *);
|
||||
|
||||
struct mcp_driver {
|
||||
@@ -58,7 +56,6 @@ struct mcp_driver {
|
||||
void (*remove)(struct mcp *);
|
||||
int (*suspend)(struct mcp *, pm_message_t);
|
||||
int (*resume)(struct mcp *);
|
||||
const struct mcp_device_id *id_table;
|
||||
};
|
||||
|
||||
int mcp_driver_register(struct mcp_driver *);
|
||||
@@ -67,6 +64,9 @@ void mcp_driver_unregister(struct mcp_driver *);
|
||||
#define mcp_get_drvdata(mcp) dev_get_drvdata(&(mcp)->attached_device)
|
||||
#define mcp_set_drvdata(mcp,d) dev_set_drvdata(&(mcp)->attached_device, d)
|
||||
|
||||
#define mcp_priv(mcp) ((void *)((mcp)+1))
|
||||
static inline void *mcp_priv(struct mcp *mcp)
|
||||
{
|
||||
return mcp + 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -187,8 +187,10 @@ struct twl6040 {
|
||||
int rev;
|
||||
u8 vibra_ctrl_cache[2];
|
||||
|
||||
/* PLL configuration */
|
||||
int pll;
|
||||
unsigned int sysclk;
|
||||
unsigned int mclk;
|
||||
|
||||
unsigned int irq;
|
||||
unsigned int irq_base;
|
||||
|
@@ -104,9 +104,6 @@
|
||||
#define UCB_MODE_DYN_VFLAG_ENA (1 << 12)
|
||||
#define UCB_MODE_AUD_OFF_CAN (1 << 13)
|
||||
|
||||
struct ucb1x00_plat_data {
|
||||
int gpio_base;
|
||||
};
|
||||
|
||||
struct ucb1x00_irq {
|
||||
void *devid;
|
||||
@@ -119,7 +116,7 @@ struct ucb1x00 {
|
||||
unsigned int irq;
|
||||
struct semaphore adc_sem;
|
||||
spinlock_t io_lock;
|
||||
const struct mcp_device_id *id;
|
||||
u16 id;
|
||||
u16 io_dir;
|
||||
u16 io_out;
|
||||
u16 adc_cr;
|
||||
|
@@ -3,22 +3,10 @@
|
||||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mempolicy.h>
|
||||
#include <linux/migrate_mode.h>
|
||||
|
||||
typedef struct page *new_page_t(struct page *, unsigned long private, int **);
|
||||
|
||||
/*
|
||||
* MIGRATE_ASYNC means never block
|
||||
* MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking
|
||||
* on most operations but not ->writepage as the potential stall time
|
||||
* is too significant
|
||||
* MIGRATE_SYNC will block when migrating pages
|
||||
*/
|
||||
enum migrate_mode {
|
||||
MIGRATE_ASYNC,
|
||||
MIGRATE_SYNC_LIGHT,
|
||||
MIGRATE_SYNC,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MIGRATION
|
||||
#define PAGE_MIGRATION 1
|
||||
|
||||
|
16
include/linux/migrate_mode.h
Normal file
16
include/linux/migrate_mode.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef MIGRATE_MODE_H_INCLUDED
|
||||
#define MIGRATE_MODE_H_INCLUDED
|
||||
/*
|
||||
* MIGRATE_ASYNC means never block
|
||||
* MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking
|
||||
* on most operations but not ->writepage as the potential stall time
|
||||
* is too significant
|
||||
* MIGRATE_SYNC will block when migrating pages
|
||||
*/
|
||||
enum migrate_mode {
|
||||
MIGRATE_ASYNC,
|
||||
MIGRATE_SYNC_LIGHT,
|
||||
MIGRATE_SYNC,
|
||||
};
|
||||
|
||||
#endif /* MIGRATE_MODE_H_INCLUDED */
|
@@ -621,6 +621,7 @@ void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac);
|
||||
int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac);
|
||||
int mlx4_get_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn);
|
||||
void mlx4_put_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int qpn);
|
||||
void mlx4_set_stats_bitmap(struct mlx4_dev *dev, u64 *stats_bitmap);
|
||||
|
||||
int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx);
|
||||
int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index);
|
||||
|
@@ -217,6 +217,7 @@ struct mmc_card {
|
||||
#define MMC_CARD_SDXC (1<<6) /* card is SDXC */
|
||||
#define MMC_CARD_REMOVED (1<<7) /* card has been removed */
|
||||
#define MMC_STATE_HIGHSPEED_200 (1<<8) /* card is in HS200 mode */
|
||||
#define MMC_STATE_SLEEP (1<<9) /* card is in sleep state */
|
||||
unsigned int quirks; /* card quirks */
|
||||
#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */
|
||||
#define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */
|
||||
@@ -382,6 +383,7 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
|
||||
#define mmc_sd_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
|
||||
#define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC)
|
||||
#define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED))
|
||||
#define mmc_card_is_sleep(c) ((c)->state & MMC_STATE_SLEEP)
|
||||
|
||||
#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
|
||||
#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
|
||||
@@ -393,7 +395,9 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
|
||||
#define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
|
||||
#define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC)
|
||||
#define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED)
|
||||
#define mmc_card_set_sleep(c) ((c)->state |= MMC_STATE_SLEEP)
|
||||
|
||||
#define mmc_card_clr_sleep(c) ((c)->state &= ~MMC_STATE_SLEEP)
|
||||
/*
|
||||
* Quirk add/remove for MMC products.
|
||||
*/
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#ifndef LINUX_MMC_DW_MMC_H
|
||||
#define LINUX_MMC_DW_MMC_H
|
||||
|
||||
#include <linux/scatterlist.h>
|
||||
|
||||
#define MAX_MCI_SLOTS 2
|
||||
|
||||
enum dw_mci_state {
|
||||
@@ -40,7 +42,7 @@ struct mmc_data;
|
||||
* @lock: Spinlock protecting the queue and associated data.
|
||||
* @regs: Pointer to MMIO registers.
|
||||
* @sg: Scatterlist entry currently being processed by PIO code, if any.
|
||||
* @pio_offset: Offset into the current scatterlist entry.
|
||||
* @sg_miter: PIO mapping scatterlist iterator.
|
||||
* @cur_slot: The slot which is currently using the controller.
|
||||
* @mrq: The request currently being processed on @cur_slot,
|
||||
* or NULL if the controller is idle.
|
||||
@@ -115,7 +117,7 @@ struct dw_mci {
|
||||
void __iomem *regs;
|
||||
|
||||
struct scatterlist *sg;
|
||||
unsigned int pio_offset;
|
||||
struct sg_mapping_iter sg_miter;
|
||||
|
||||
struct dw_mci_slot *cur_slot;
|
||||
struct mmc_request *mrq;
|
||||
|
@@ -257,6 +257,7 @@ struct mmc_host {
|
||||
#define MMC_CAP2_HS200_1_2V_SDR (1 << 6) /* can support */
|
||||
#define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \
|
||||
MMC_CAP2_HS200_1_2V_SDR)
|
||||
#define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */
|
||||
|
||||
mmc_pm_flag_t pm_caps; /* supported pm features */
|
||||
unsigned int power_notify_type;
|
||||
@@ -444,4 +445,23 @@ static inline int mmc_boot_partition_access(struct mmc_host *host)
|
||||
return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MMC_CLKGATE
|
||||
void mmc_host_clk_hold(struct mmc_host *host);
|
||||
void mmc_host_clk_release(struct mmc_host *host);
|
||||
unsigned int mmc_host_clk_rate(struct mmc_host *host);
|
||||
|
||||
#else
|
||||
static inline void mmc_host_clk_hold(struct mmc_host *host)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void mmc_host_clk_release(struct mmc_host *host)
|
||||
{
|
||||
}
|
||||
|
||||
static inline unsigned int mmc_host_clk_rate(struct mmc_host *host)
|
||||
{
|
||||
return host->ios.clock;
|
||||
}
|
||||
#endif
|
||||
#endif /* LINUX_MMC_HOST_H */
|
||||
|
@@ -436,17 +436,6 @@ struct spi_device_id {
|
||||
__attribute__((aligned(sizeof(kernel_ulong_t))));
|
||||
};
|
||||
|
||||
/* mcp */
|
||||
|
||||
#define MCP_NAME_SIZE 20
|
||||
#define MCP_MODULE_PREFIX "mcp:"
|
||||
|
||||
struct mcp_device_id {
|
||||
char name[MCP_NAME_SIZE];
|
||||
kernel_ulong_t driver_data /* Data private to the driver */
|
||||
__attribute__((aligned(sizeof(kernel_ulong_t))));
|
||||
};
|
||||
|
||||
/* dmi */
|
||||
enum dmi_field {
|
||||
DMI_NONE,
|
||||
|
@@ -57,8 +57,6 @@ struct gcry_mpi {
|
||||
|
||||
typedef struct gcry_mpi *MPI;
|
||||
|
||||
#define MPI_NULL NULL
|
||||
|
||||
#define mpi_get_nlimbs(a) ((a)->nlimbs)
|
||||
#define mpi_is_neg(a) ((a)->sign)
|
||||
|
||||
|
@@ -427,9 +427,7 @@ static inline int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len)
|
||||
|
||||
static inline int mtd_suspend(struct mtd_info *mtd)
|
||||
{
|
||||
if (!mtd->suspend)
|
||||
return -EOPNOTSUPP;
|
||||
return mtd->suspend(mtd);
|
||||
return mtd->suspend ? mtd->suspend(mtd) : 0;
|
||||
}
|
||||
|
||||
static inline void mtd_resume(struct mtd_info *mtd)
|
||||
@@ -441,7 +439,7 @@ static inline void mtd_resume(struct mtd_info *mtd)
|
||||
static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs)
|
||||
{
|
||||
if (!mtd->block_isbad)
|
||||
return -EOPNOTSUPP;
|
||||
return 0;
|
||||
return mtd->block_isbad(mtd, ofs);
|
||||
}
|
||||
|
||||
|
@@ -587,6 +587,7 @@ struct hw_perf_event {
|
||||
u64 sample_period;
|
||||
u64 last_period;
|
||||
local64_t period_left;
|
||||
u64 interrupts_seq;
|
||||
u64 interrupts;
|
||||
|
||||
u64 freq_time_stamp;
|
||||
|
@@ -110,7 +110,19 @@ static inline void pm_qos_remove_request(struct pm_qos_request *req)
|
||||
{ return; }
|
||||
|
||||
static inline int pm_qos_request(int pm_qos_class)
|
||||
{ return 0; }
|
||||
{
|
||||
switch (pm_qos_class) {
|
||||
case PM_QOS_CPU_DMA_LATENCY:
|
||||
return PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;
|
||||
case PM_QOS_NETWORK_LATENCY:
|
||||
return PM_QOS_NETWORK_LAT_DEFAULT_VALUE;
|
||||
case PM_QOS_NETWORK_THROUGHPUT:
|
||||
return PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE;
|
||||
default:
|
||||
return PM_QOS_DEFAULT_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int pm_qos_add_notifier(int pm_qos_class,
|
||||
struct notifier_block *notifier)
|
||||
{ return 0; }
|
||||
|
@@ -81,7 +81,11 @@ void prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl)
|
||||
* Limit the time part in order to ensure there are some bits left for the
|
||||
* cycle counter and fraction multiply.
|
||||
*/
|
||||
#if BITS_PER_LONG == 32
|
||||
#define PROP_MAX_SHIFT (3*BITS_PER_LONG/4)
|
||||
#else
|
||||
#define PROP_MAX_SHIFT (BITS_PER_LONG/2)
|
||||
#endif
|
||||
|
||||
#define PROP_FRAC_SHIFT (BITS_PER_LONG - PROP_MAX_SHIFT - 1)
|
||||
#define PROP_FRAC_BASE (1UL << PROP_FRAC_SHIFT)
|
||||
|
@@ -230,7 +230,11 @@ struct mem_dqinfo {
|
||||
struct super_block;
|
||||
|
||||
#define DQF_MASK 0xffff /* Mask for format specific flags */
|
||||
#define DQF_INFO_DIRTY_B 16
|
||||
#define DQF_GETINFO_MASK 0x1ffff /* Mask for flags passed to userspace */
|
||||
#define DQF_SETINFO_MASK 0xffff /* Mask for flags modifiable from userspace */
|
||||
#define DQF_SYS_FILE_B 16
|
||||
#define DQF_SYS_FILE (1 << DQF_SYS_FILE_B) /* Quota file stored as system file */
|
||||
#define DQF_INFO_DIRTY_B 31
|
||||
#define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */
|
||||
|
||||
extern void mark_info_dirty(struct super_block *sb, int type);
|
||||
|
@@ -162,6 +162,9 @@ void regcache_cache_only(struct regmap *map, bool enable);
|
||||
void regcache_cache_bypass(struct regmap *map, bool enable);
|
||||
void regcache_mark_dirty(struct regmap *map);
|
||||
|
||||
int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
|
||||
int num_regs);
|
||||
|
||||
/**
|
||||
* Description of an IRQ for the generic regmap irq_chip.
|
||||
*
|
||||
|
@@ -109,12 +109,18 @@ void res_counter_init(struct res_counter *counter, struct res_counter *parent);
|
||||
*
|
||||
* returns 0 on success and <0 if the counter->usage will exceed the
|
||||
* counter->limit _locked call expects the counter->lock to be taken
|
||||
*
|
||||
* charge_nofail works the same, except that it charges the resource
|
||||
* counter unconditionally, and returns < 0 if the after the current
|
||||
* charge we are over limit.
|
||||
*/
|
||||
|
||||
int __must_check res_counter_charge_locked(struct res_counter *counter,
|
||||
unsigned long val);
|
||||
int __must_check res_counter_charge(struct res_counter *counter,
|
||||
unsigned long val, struct res_counter **limit_fail_at);
|
||||
int __must_check res_counter_charge_nofail(struct res_counter *counter,
|
||||
unsigned long val, struct res_counter **limit_fail_at);
|
||||
|
||||
/*
|
||||
* uncharge - tell that some portion of the resource is released
|
||||
@@ -142,7 +148,10 @@ static inline unsigned long long res_counter_margin(struct res_counter *cnt)
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&cnt->lock, flags);
|
||||
margin = cnt->limit - cnt->usage;
|
||||
if (cnt->limit > cnt->usage)
|
||||
margin = cnt->limit - cnt->usage;
|
||||
else
|
||||
margin = 0;
|
||||
spin_unlock_irqrestore(&cnt->lock, flags);
|
||||
return margin;
|
||||
}
|
||||
|
@@ -2088,9 +2088,9 @@ extern int sched_setscheduler_nocheck(struct task_struct *, int,
|
||||
extern struct task_struct *idle_task(int cpu);
|
||||
/**
|
||||
* is_idle_task - is the specified task an idle task?
|
||||
* @tsk: the task in question.
|
||||
* @p: the task in question.
|
||||
*/
|
||||
static inline bool is_idle_task(struct task_struct *p)
|
||||
static inline bool is_idle_task(const struct task_struct *p)
|
||||
{
|
||||
return p->pid == 0;
|
||||
}
|
||||
@@ -2259,6 +2259,12 @@ static inline void mmdrop(struct mm_struct * mm)
|
||||
extern void mmput(struct mm_struct *);
|
||||
/* Grab a reference to a task's mm, if it is not already going away */
|
||||
extern struct mm_struct *get_task_mm(struct task_struct *task);
|
||||
/*
|
||||
* Grab a reference to a task's mm, if it is not already going away
|
||||
* and ptrace_may_access with the mode parameter passed to it
|
||||
* succeeds.
|
||||
*/
|
||||
extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode);
|
||||
/* Remove the current tasks stale references to the old mm_struct */
|
||||
extern void mm_release(struct task_struct *, struct mm_struct *);
|
||||
/* Allocate a new mm structure and copy contents from tsk->mm */
|
||||
|
@@ -70,6 +70,7 @@ struct sh_dmae_pdata {
|
||||
unsigned int needs_tend_set:1;
|
||||
unsigned int no_dmars:1;
|
||||
unsigned int chclr_present:1;
|
||||
unsigned int slave_only:1;
|
||||
};
|
||||
|
||||
/* DMA register */
|
||||
|
@@ -48,6 +48,7 @@ extern struct file *shmem_file_setup(const char *name,
|
||||
loff_t size, unsigned long flags);
|
||||
extern int shmem_zero_setup(struct vm_area_struct *);
|
||||
extern int shmem_lock(struct file *file, int lock, struct user_struct *user);
|
||||
extern void shmem_unlock_mapping(struct address_space *mapping);
|
||||
extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping,
|
||||
pgoff_t index, gfp_t gfp_mask);
|
||||
extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end);
|
||||
|
@@ -192,7 +192,6 @@ enum
|
||||
LINUX_MIB_TCPPARTIALUNDO, /* TCPPartialUndo */
|
||||
LINUX_MIB_TCPDSACKUNDO, /* TCPDSACKUndo */
|
||||
LINUX_MIB_TCPLOSSUNDO, /* TCPLossUndo */
|
||||
LINUX_MIB_TCPLOSS, /* TCPLoss */
|
||||
LINUX_MIB_TCPLOSTRETRANSMIT, /* TCPLostRetransmit */
|
||||
LINUX_MIB_TCPRENOFAILURES, /* TCPRenoFailures */
|
||||
LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */
|
||||
|
@@ -357,14 +357,29 @@ extern bool pm_save_wakeup_count(unsigned int count);
|
||||
|
||||
static inline void lock_system_sleep(void)
|
||||
{
|
||||
freezer_do_not_count();
|
||||
current->flags |= PF_FREEZER_SKIP;
|
||||
mutex_lock(&pm_mutex);
|
||||
}
|
||||
|
||||
static inline void unlock_system_sleep(void)
|
||||
{
|
||||
/*
|
||||
* Don't use freezer_count() because we don't want the call to
|
||||
* try_to_freeze() here.
|
||||
*
|
||||
* Reason:
|
||||
* Fundamentally, we just don't need it, because freezing condition
|
||||
* doesn't come into effect until we release the pm_mutex lock,
|
||||
* since the freezer always works with pm_mutex held.
|
||||
*
|
||||
* More importantly, in the case of hibernation,
|
||||
* unlock_system_sleep() gets called in snapshot_read() and
|
||||
* snapshot_write() when the freezing condition is still in effect.
|
||||
* Which means, if we use try_to_freeze() here, it would make them
|
||||
* enter the refrigerator, thus causing hibernation to lockup.
|
||||
*/
|
||||
current->flags &= ~PF_FREEZER_SKIP;
|
||||
mutex_unlock(&pm_mutex);
|
||||
freezer_count();
|
||||
}
|
||||
|
||||
#else /* !CONFIG_PM_SLEEP */
|
||||
|
@@ -273,7 +273,7 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
|
||||
#endif
|
||||
|
||||
extern int page_evictable(struct page *page, struct vm_area_struct *vma);
|
||||
extern void scan_mapping_unevictable_pages(struct address_space *);
|
||||
extern void check_move_unevictable_pages(struct page **, int nr_pages);
|
||||
|
||||
extern unsigned long scan_unevictable_pages;
|
||||
extern int scan_unevictable_handler(struct ctl_table *, int,
|
||||
|
@@ -1,164 +0,0 @@
|
||||
/**
|
||||
* System devices follow a slightly different driver model.
|
||||
* They don't need to do dynammic driver binding, can't be probed,
|
||||
* and don't reside on any type of peripheral bus.
|
||||
* So, we represent and treat them a little differently.
|
||||
*
|
||||
* We still have a notion of a driver for a system device, because we still
|
||||
* want to perform basic operations on these devices.
|
||||
*
|
||||
* We also support auxiliary drivers binding to devices of a certain class.
|
||||
*
|
||||
* This allows configurable drivers to register themselves for devices of
|
||||
* a certain type. And, it allows class definitions to reside in generic
|
||||
* code while arch-specific code can register specific drivers.
|
||||
*
|
||||
* Auxiliary drivers registered with a NULL cls are registered as drivers
|
||||
* for all system devices, and get notification calls for each device.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _SYSDEV_H_
|
||||
#define _SYSDEV_H_
|
||||
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/pm.h>
|
||||
|
||||
|
||||
struct sys_device;
|
||||
struct sysdev_class_attribute;
|
||||
|
||||
struct sysdev_class {
|
||||
const char *name;
|
||||
struct list_head drivers;
|
||||
struct sysdev_class_attribute **attrs;
|
||||
struct kset kset;
|
||||
};
|
||||
|
||||
struct sysdev_class_attribute {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct sysdev_class *, struct sysdev_class_attribute *,
|
||||
char *);
|
||||
ssize_t (*store)(struct sysdev_class *, struct sysdev_class_attribute *,
|
||||
const char *, size_t);
|
||||
};
|
||||
|
||||
#define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
|
||||
{ \
|
||||
.attr = {.name = __stringify(_name), .mode = _mode }, \
|
||||
.show = _show, \
|
||||
.store = _store, \
|
||||
}
|
||||
|
||||
#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
|
||||
struct sysdev_class_attribute attr_##_name = \
|
||||
_SYSDEV_CLASS_ATTR(_name,_mode,_show,_store)
|
||||
|
||||
|
||||
extern int sysdev_class_register(struct sysdev_class *);
|
||||
extern void sysdev_class_unregister(struct sysdev_class *);
|
||||
|
||||
extern int sysdev_class_create_file(struct sysdev_class *,
|
||||
struct sysdev_class_attribute *);
|
||||
extern void sysdev_class_remove_file(struct sysdev_class *,
|
||||
struct sysdev_class_attribute *);
|
||||
/**
|
||||
* Auxiliary system device drivers.
|
||||
*/
|
||||
|
||||
struct sysdev_driver {
|
||||
struct list_head entry;
|
||||
int (*add)(struct sys_device *);
|
||||
int (*remove)(struct sys_device *);
|
||||
};
|
||||
|
||||
|
||||
extern int sysdev_driver_register(struct sysdev_class *, struct sysdev_driver *);
|
||||
extern void sysdev_driver_unregister(struct sysdev_class *, struct sysdev_driver *);
|
||||
|
||||
|
||||
/**
|
||||
* sys_devices can be simplified a lot from regular devices, because they're
|
||||
* simply not as versatile.
|
||||
*/
|
||||
|
||||
struct sys_device {
|
||||
u32 id;
|
||||
struct sysdev_class * cls;
|
||||
struct kobject kobj;
|
||||
};
|
||||
|
||||
extern int sysdev_register(struct sys_device *);
|
||||
extern void sysdev_unregister(struct sys_device *);
|
||||
|
||||
|
||||
struct sysdev_attribute {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct sys_device *, struct sysdev_attribute *, char *);
|
||||
ssize_t (*store)(struct sys_device *, struct sysdev_attribute *,
|
||||
const char *, size_t);
|
||||
};
|
||||
|
||||
|
||||
#define _SYSDEV_ATTR(_name, _mode, _show, _store) \
|
||||
{ \
|
||||
.attr = { .name = __stringify(_name), .mode = _mode }, \
|
||||
.show = _show, \
|
||||
.store = _store, \
|
||||
}
|
||||
|
||||
#define SYSDEV_ATTR(_name, _mode, _show, _store) \
|
||||
struct sysdev_attribute attr_##_name = \
|
||||
_SYSDEV_ATTR(_name, _mode, _show, _store);
|
||||
|
||||
extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *);
|
||||
extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *);
|
||||
|
||||
/* Create/remove NULL terminated attribute list */
|
||||
static inline int
|
||||
sysdev_create_files(struct sys_device *d, struct sysdev_attribute **a)
|
||||
{
|
||||
return sysfs_create_files(&d->kobj, (const struct attribute **)a);
|
||||
}
|
||||
|
||||
static inline void
|
||||
sysdev_remove_files(struct sys_device *d, struct sysdev_attribute **a)
|
||||
{
|
||||
return sysfs_remove_files(&d->kobj, (const struct attribute **)a);
|
||||
}
|
||||
|
||||
struct sysdev_ext_attribute {
|
||||
struct sysdev_attribute attr;
|
||||
void *var;
|
||||
};
|
||||
|
||||
/*
|
||||
* Support for simple variable sysdev attributes.
|
||||
* The pointer to the variable is stored in a sysdev_ext_attribute
|
||||
*/
|
||||
|
||||
/* Add more types as needed */
|
||||
|
||||
extern ssize_t sysdev_show_ulong(struct sys_device *, struct sysdev_attribute *,
|
||||
char *);
|
||||
extern ssize_t sysdev_store_ulong(struct sys_device *,
|
||||
struct sysdev_attribute *, const char *, size_t);
|
||||
extern ssize_t sysdev_show_int(struct sys_device *, struct sysdev_attribute *,
|
||||
char *);
|
||||
extern ssize_t sysdev_store_int(struct sys_device *,
|
||||
struct sysdev_attribute *, const char *, size_t);
|
||||
|
||||
#define _SYSDEV_ULONG_ATTR(_name, _mode, _var) \
|
||||
{ _SYSDEV_ATTR(_name, _mode, sysdev_show_ulong, sysdev_store_ulong), \
|
||||
&(_var) }
|
||||
#define SYSDEV_ULONG_ATTR(_name, _mode, _var) \
|
||||
struct sysdev_ext_attribute attr_##_name = \
|
||||
_SYSDEV_ULONG_ATTR(_name, _mode, _var);
|
||||
#define _SYSDEV_INT_ATTR(_name, _mode, _var) \
|
||||
{ _SYSDEV_ATTR(_name, _mode, sysdev_show_int, sysdev_store_int), \
|
||||
&(_var) }
|
||||
#define SYSDEV_INT_ATTR(_name, _mode, _var) \
|
||||
struct sysdev_ext_attribute attr_##_name = \
|
||||
_SYSDEV_INT_ATTR(_name, _mode, _var);
|
||||
|
||||
#endif /* _SYSDEV_H_ */
|
@@ -152,9 +152,9 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
|
||||
void thermal_cooling_device_unregister(struct thermal_cooling_device *);
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
extern int generate_netlink_event(u32 orig, enum events event);
|
||||
extern int thermal_generate_netlink_event(u32 orig, enum events event);
|
||||
#else
|
||||
static inline int generate_netlink_event(u32 orig, enum events event)
|
||||
static inline int thermal_generate_netlink_event(u32 orig, enum events event)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1073,6 +1073,7 @@ typedef void (*usb_complete_t)(struct urb *);
|
||||
* which the host controller driver should use in preference to the
|
||||
* transfer_buffer.
|
||||
* @sg: scatter gather buffer list
|
||||
* @num_mapped_sgs: (internal) number of mapped sg entries
|
||||
* @num_sgs: number of entries in the sg list
|
||||
* @transfer_buffer_length: How big is transfer_buffer. The transfer may
|
||||
* be broken up into chunks according to the current maximum packet
|
||||
|
@@ -589,7 +589,7 @@ static inline int usb_endpoint_is_isoc_out(
|
||||
*/
|
||||
static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd)
|
||||
{
|
||||
return le16_to_cpu(epd->wMaxPacketSize);
|
||||
return __le16_to_cpu(epd->wMaxPacketSize);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
@@ -1,139 +0,0 @@
|
||||
/*
|
||||
* Intel Langwell USB OTG transceiver driver
|
||||
* Copyright (C) 2008 - 2010, Intel Corporation.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This program is distributed in the hope 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LANGWELL_OTG_H
|
||||
#define __LANGWELL_OTG_H
|
||||
|
||||
#include <linux/usb/intel_mid_otg.h>
|
||||
|
||||
#define CI_USBCMD 0x30
|
||||
# define USBCMD_RST BIT(1)
|
||||
# define USBCMD_RS BIT(0)
|
||||
#define CI_USBSTS 0x34
|
||||
# define USBSTS_SLI BIT(8)
|
||||
# define USBSTS_URI BIT(6)
|
||||
# define USBSTS_PCI BIT(2)
|
||||
#define CI_PORTSC1 0x74
|
||||
# define PORTSC_PP BIT(12)
|
||||
# define PORTSC_LS (BIT(11) | BIT(10))
|
||||
# define PORTSC_SUSP BIT(7)
|
||||
# define PORTSC_CCS BIT(0)
|
||||
#define CI_HOSTPC1 0xb4
|
||||
# define HOSTPC1_PHCD BIT(22)
|
||||
#define CI_OTGSC 0xf4
|
||||
# define OTGSC_DPIE BIT(30)
|
||||
# define OTGSC_1MSE BIT(29)
|
||||
# define OTGSC_BSEIE BIT(28)
|
||||
# define OTGSC_BSVIE BIT(27)
|
||||
# define OTGSC_ASVIE BIT(26)
|
||||
# define OTGSC_AVVIE BIT(25)
|
||||
# define OTGSC_IDIE BIT(24)
|
||||
# define OTGSC_DPIS BIT(22)
|
||||
# define OTGSC_1MSS BIT(21)
|
||||
# define OTGSC_BSEIS BIT(20)
|
||||
# define OTGSC_BSVIS BIT(19)
|
||||
# define OTGSC_ASVIS BIT(18)
|
||||
# define OTGSC_AVVIS BIT(17)
|
||||
# define OTGSC_IDIS BIT(16)
|
||||
# define OTGSC_DPS BIT(14)
|
||||
# define OTGSC_1MST BIT(13)
|
||||
# define OTGSC_BSE BIT(12)
|
||||
# define OTGSC_BSV BIT(11)
|
||||
# define OTGSC_ASV BIT(10)
|
||||
# define OTGSC_AVV BIT(9)
|
||||
# define OTGSC_ID BIT(8)
|
||||
# define OTGSC_HABA BIT(7)
|
||||
# define OTGSC_HADP BIT(6)
|
||||
# define OTGSC_IDPU BIT(5)
|
||||
# define OTGSC_DP BIT(4)
|
||||
# define OTGSC_OT BIT(3)
|
||||
# define OTGSC_HAAR BIT(2)
|
||||
# define OTGSC_VC BIT(1)
|
||||
# define OTGSC_VD BIT(0)
|
||||
# define OTGSC_INTEN_MASK (0x7f << 24)
|
||||
# define OTGSC_INT_MASK (0x5f << 24)
|
||||
# define OTGSC_INTSTS_MASK (0x7f << 16)
|
||||
#define CI_USBMODE 0xf8
|
||||
# define USBMODE_CM (BIT(1) | BIT(0))
|
||||
# define USBMODE_IDLE 0
|
||||
# define USBMODE_DEVICE 0x2
|
||||
# define USBMODE_HOST 0x3
|
||||
#define USBCFG_ADDR 0xff10801c
|
||||
#define USBCFG_LEN 4
|
||||
# define USBCFG_VBUSVAL BIT(14)
|
||||
# define USBCFG_AVALID BIT(13)
|
||||
# define USBCFG_BVALID BIT(12)
|
||||
# define USBCFG_SESEND BIT(11)
|
||||
|
||||
#define INTR_DUMMY_MASK (USBSTS_SLI | USBSTS_URI | USBSTS_PCI)
|
||||
|
||||
enum langwell_otg_timer_type {
|
||||
TA_WAIT_VRISE_TMR,
|
||||
TA_WAIT_BCON_TMR,
|
||||
TA_AIDL_BDIS_TMR,
|
||||
TB_ASE0_BRST_TMR,
|
||||
TB_SE0_SRP_TMR,
|
||||
TB_SRP_INIT_TMR,
|
||||
TB_SRP_FAIL_TMR,
|
||||
TB_BUS_SUSPEND_TMR
|
||||
};
|
||||
|
||||
#define TA_WAIT_VRISE 100
|
||||
#define TA_WAIT_BCON 30000
|
||||
#define TA_AIDL_BDIS 15000
|
||||
#define TB_ASE0_BRST 5000
|
||||
#define TB_SE0_SRP 2
|
||||
#define TB_SRP_INIT 100
|
||||
#define TB_SRP_FAIL 5500
|
||||
#define TB_BUS_SUSPEND 500
|
||||
|
||||
struct langwell_otg_timer {
|
||||
unsigned long expires; /* Number of count increase to timeout */
|
||||
unsigned long count; /* Tick counter */
|
||||
void (*function)(unsigned long); /* Timeout function */
|
||||
unsigned long data; /* Data passed to function */
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
struct langwell_otg {
|
||||
struct intel_mid_otg_xceiv iotg;
|
||||
struct device *dev;
|
||||
|
||||
void __iomem *usbcfg; /* SCCBUSB config Reg */
|
||||
|
||||
unsigned region;
|
||||
unsigned cfg_region;
|
||||
|
||||
struct work_struct work;
|
||||
struct workqueue_struct *qwork;
|
||||
struct timer_list hsm_timer;
|
||||
|
||||
spinlock_t lock;
|
||||
spinlock_t wq_lock;
|
||||
|
||||
struct notifier_block iotg_notifier;
|
||||
};
|
||||
|
||||
static inline
|
||||
struct langwell_otg *mid_xceiv_to_lnw(struct intel_mid_otg_xceiv *iotg)
|
||||
{
|
||||
return container_of(iotg, struct langwell_otg, iotg);
|
||||
}
|
||||
|
||||
#endif /* __LANGWELL_OTG_H__ */
|
Reference in New Issue
Block a user