mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
Merge branches 'sh/pm-runtime' and 'common/clkfwk' into sh-fixes-for-linus
This commit is contained in:
commit
37bef8f989
3472 changed files with 65364 additions and 35672 deletions
|
|
@ -47,6 +47,9 @@ enum {
|
|||
* @muxval: a number usually used to poke into some mux regiser to
|
||||
* mux in the signal to this channel
|
||||
* @cctl_opt: default options for the channel control register
|
||||
* @device_fc: Flow Controller Settings for ccfg register. Only valid for slave
|
||||
* channels. Fill with 'true' if peripheral should be flow controller. Direction
|
||||
* will be selected at Runtime.
|
||||
* @addr: source/target address in physical memory for this DMA channel,
|
||||
* can be the address of a FIFO register for burst requests for example.
|
||||
* This can be left undefined if the PrimeCell API is used for configuring
|
||||
|
|
@ -65,6 +68,7 @@ struct pl08x_channel_data {
|
|||
int max_signal;
|
||||
u32 muxval;
|
||||
u32 cctl;
|
||||
bool device_fc;
|
||||
dma_addr_t addr;
|
||||
bool circular_buffer;
|
||||
bool single;
|
||||
|
|
@ -77,13 +81,11 @@ struct pl08x_channel_data {
|
|||
* @addr: current address
|
||||
* @maxwidth: the maximum width of a transfer on this bus
|
||||
* @buswidth: the width of this bus in bytes: 1, 2 or 4
|
||||
* @fill_bytes: bytes required to fill to the next bus memory boundary
|
||||
*/
|
||||
struct pl08x_bus_data {
|
||||
dma_addr_t addr;
|
||||
u8 maxwidth;
|
||||
u8 buswidth;
|
||||
size_t fill_bytes;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -103,18 +105,36 @@ struct pl08x_phy_chan {
|
|||
struct pl08x_dma_chan *serving;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pl08x_sg - structure containing data per sg
|
||||
* @src_addr: src address of sg
|
||||
* @dst_addr: dst address of sg
|
||||
* @len: transfer len in bytes
|
||||
* @node: node for txd's dsg_list
|
||||
*/
|
||||
struct pl08x_sg {
|
||||
dma_addr_t src_addr;
|
||||
dma_addr_t dst_addr;
|
||||
size_t len;
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pl08x_txd - wrapper for struct dma_async_tx_descriptor
|
||||
* @tx: async tx descriptor
|
||||
* @node: node for txd list for channels
|
||||
* @dsg_list: list of children sg's
|
||||
* @direction: direction of transfer
|
||||
* @llis_bus: DMA memory address (physical) start for the LLIs
|
||||
* @llis_va: virtual memory address start for the LLIs
|
||||
* @cctl: control reg values for current txd
|
||||
* @ccfg: config reg values for current txd
|
||||
*/
|
||||
struct pl08x_txd {
|
||||
struct dma_async_tx_descriptor tx;
|
||||
struct list_head node;
|
||||
struct list_head dsg_list;
|
||||
enum dma_data_direction direction;
|
||||
dma_addr_t src_addr;
|
||||
dma_addr_t dst_addr;
|
||||
size_t len;
|
||||
dma_addr_t llis_bus;
|
||||
struct pl08x_lli *llis_va;
|
||||
/* Default cctl value for LLIs */
|
||||
|
|
|
|||
|
|
@ -19,12 +19,8 @@ struct dma_pl330_peri {
|
|||
* Peri_Req i/f of the DMAC that is
|
||||
* peripheral could be reached from.
|
||||
*/
|
||||
u8 peri_id; /* {0, 31} */
|
||||
u8 peri_id; /* specific dma id */
|
||||
enum pl330_reqtype rqtype;
|
||||
|
||||
/* For M->D and D->M Channels */
|
||||
int burst_sz; /* in power of 2 */
|
||||
dma_addr_t fifo_addr;
|
||||
};
|
||||
|
||||
struct dma_pl330_platdata {
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ typedef int (congested_fn)(void *, int);
|
|||
enum bdi_stat_item {
|
||||
BDI_RECLAIMABLE,
|
||||
BDI_WRITEBACK,
|
||||
BDI_DIRTIED,
|
||||
BDI_WRITTEN,
|
||||
NR_BDI_STAT_ITEMS
|
||||
};
|
||||
|
|
@ -74,10 +75,20 @@ struct backing_dev_info {
|
|||
struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS];
|
||||
|
||||
unsigned long bw_time_stamp; /* last time write bw is updated */
|
||||
unsigned long dirtied_stamp;
|
||||
unsigned long written_stamp; /* pages written at bw_time_stamp */
|
||||
unsigned long write_bandwidth; /* the estimated write bandwidth */
|
||||
unsigned long avg_write_bandwidth; /* further smoothed write bw */
|
||||
|
||||
/*
|
||||
* The base dirty throttle rate, re-calculated on every 200ms.
|
||||
* All the bdi tasks' dirty rate will be curbed under it.
|
||||
* @dirty_ratelimit tracks the estimated @balanced_dirty_ratelimit
|
||||
* in small steps and is much more smooth/stable than the latter.
|
||||
*/
|
||||
unsigned long dirty_ratelimit;
|
||||
unsigned long balanced_dirty_ratelimit;
|
||||
|
||||
struct prop_local_percpu completions;
|
||||
int dirty_exceeded;
|
||||
|
||||
|
|
@ -107,7 +118,8 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
|
|||
int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);
|
||||
void bdi_unregister(struct backing_dev_info *bdi);
|
||||
int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int);
|
||||
void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages);
|
||||
void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages,
|
||||
enum wb_reason reason);
|
||||
void bdi_start_background_writeback(struct backing_dev_info *bdi);
|
||||
int bdi_writeback_thread(void *data);
|
||||
int bdi_has_dirty_io(struct backing_dev_info *bdi);
|
||||
|
|
|
|||
|
|
@ -170,10 +170,9 @@ struct bcma_driver {
|
|||
};
|
||||
extern
|
||||
int __bcma_driver_register(struct bcma_driver *drv, struct module *owner);
|
||||
static inline int bcma_driver_register(struct bcma_driver *drv)
|
||||
{
|
||||
return __bcma_driver_register(drv, THIS_MODULE);
|
||||
}
|
||||
#define bcma_driver_register(drv) \
|
||||
__bcma_driver_register(drv, THIS_MODULE)
|
||||
|
||||
extern void bcma_driver_unregister(struct bcma_driver *drv);
|
||||
|
||||
struct bcma_bus {
|
||||
|
|
|
|||
|
|
@ -268,14 +268,6 @@ extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set
|
|||
extern void bvec_free_bs(struct bio_set *, struct bio_vec *, unsigned int);
|
||||
extern unsigned int bvec_nr_vecs(unsigned short idx);
|
||||
|
||||
/*
|
||||
* Allow queuer to specify a completion CPU for this bio
|
||||
*/
|
||||
static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu)
|
||||
{
|
||||
bio->bi_comp_cpu = cpu;
|
||||
}
|
||||
|
||||
/*
|
||||
* bio_set is used to allow other portions of the IO system to
|
||||
* allocate their own private memory pools for bio and iovec structures.
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ struct bio {
|
|||
|
||||
unsigned int bi_max_vecs; /* max bvl_vecs we can hold */
|
||||
|
||||
unsigned int bi_comp_cpu; /* completion CPU */
|
||||
|
||||
atomic_t bi_cnt; /* pin count */
|
||||
|
||||
struct bio_vec *bi_io_vec; /* the actual vec list */
|
||||
|
|
@ -93,11 +91,10 @@ struct bio {
|
|||
#define BIO_BOUNCED 5 /* bio is a bounce bio */
|
||||
#define BIO_USER_MAPPED 6 /* contains user pages */
|
||||
#define BIO_EOPNOTSUPP 7 /* not supported */
|
||||
#define BIO_CPU_AFFINE 8 /* complete bio on same CPU as submitted */
|
||||
#define BIO_NULL_MAPPED 9 /* contains invalid user pages */
|
||||
#define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */
|
||||
#define BIO_QUIET 11 /* Make BIO Quiet */
|
||||
#define BIO_MAPPED_INTEGRITY 12/* integrity metadata has been remapped */
|
||||
#define BIO_NULL_MAPPED 8 /* contains invalid user pages */
|
||||
#define BIO_FS_INTEGRITY 9 /* fs owns integrity data, not block layer */
|
||||
#define BIO_QUIET 10 /* Make BIO Quiet */
|
||||
#define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */
|
||||
#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include <linux/wait.h>
|
||||
#include <linux/mempool.h>
|
||||
#include <linux/bio.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/bsg.h>
|
||||
|
|
@ -22,6 +21,7 @@
|
|||
|
||||
#include <asm/scatterlist.h>
|
||||
|
||||
struct module;
|
||||
struct scsi_ioctl_command;
|
||||
|
||||
struct request_queue;
|
||||
|
|
@ -195,7 +195,7 @@ struct request_pm_state
|
|||
#include <linux/elevator.h>
|
||||
|
||||
typedef void (request_fn_proc) (struct request_queue *q);
|
||||
typedef int (make_request_fn) (struct request_queue *q, struct bio *bio);
|
||||
typedef void (make_request_fn) (struct request_queue *q, struct bio *bio);
|
||||
typedef int (prep_rq_fn) (struct request_queue *, struct request *);
|
||||
typedef void (unprep_rq_fn) (struct request_queue *, struct request *);
|
||||
|
||||
|
|
@ -680,6 +680,8 @@ extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t,
|
|||
extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t,
|
||||
struct scsi_ioctl_command __user *);
|
||||
|
||||
extern void blk_queue_bio(struct request_queue *q, struct bio *bio);
|
||||
|
||||
/*
|
||||
* A queue has just exitted congestion. Note this in the global counter of
|
||||
* congested queues, and wake up anyone who was waiting for requests to be
|
||||
|
|
@ -863,16 +865,22 @@ struct request_queue *blk_alloc_queue_node(gfp_t, int);
|
|||
extern void blk_put_queue(struct request_queue *);
|
||||
|
||||
/*
|
||||
* Note: Code in between changing the blk_plug list/cb_list or element of such
|
||||
* lists is preemptable, but such code can't do sleep (or be very careful),
|
||||
* otherwise data is corrupted. For details, please check schedule() where
|
||||
* blk_schedule_flush_plug() is called.
|
||||
* blk_plug permits building a queue of related requests by holding the I/O
|
||||
* fragments for a short period. This allows merging of sequential requests
|
||||
* into single larger request. As the requests are moved from a per-task list to
|
||||
* the device's request_queue in a batch, this results in improved scalability
|
||||
* as the lock contention for request_queue lock is reduced.
|
||||
*
|
||||
* It is ok not to disable preemption when adding the request to the plug list
|
||||
* or when attempting a merge, because blk_schedule_flush_list() will only flush
|
||||
* the plug list when the task sleeps by itself. For details, please see
|
||||
* schedule() where blk_schedule_flush_plug() is called.
|
||||
*/
|
||||
struct blk_plug {
|
||||
unsigned long magic;
|
||||
struct list_head list;
|
||||
struct list_head cb_list;
|
||||
unsigned int should_sort;
|
||||
unsigned long magic; /* detect uninitialized use-cases */
|
||||
struct list_head list; /* requests */
|
||||
struct list_head cb_list; /* md requires an unplug callback */
|
||||
unsigned int should_sort; /* list to be sorted before flushing? */
|
||||
};
|
||||
#define BLK_MAX_REQUEST_COUNT 16
|
||||
|
||||
|
|
@ -1189,20 +1197,6 @@ static inline uint64_t rq_io_start_time_ns(struct request *req)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_THROTTLING
|
||||
extern int blk_throtl_init(struct request_queue *q);
|
||||
extern void blk_throtl_exit(struct request_queue *q);
|
||||
extern int blk_throtl_bio(struct request_queue *q, struct bio **bio);
|
||||
#else /* CONFIG_BLK_DEV_THROTTLING */
|
||||
static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int blk_throtl_init(struct request_queue *q) { return 0; }
|
||||
static inline int blk_throtl_exit(struct request_queue *q) { return 0; }
|
||||
#endif /* CONFIG_BLK_DEV_THROTTLING */
|
||||
|
||||
#define MODULE_ALIAS_BLOCKDEV(major,minor) \
|
||||
MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
|
||||
#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \
|
||||
|
|
|
|||
|
|
@ -196,13 +196,9 @@ static inline void cpu_hotplug_driver_unlock(void)
|
|||
#endif /* CONFIG_HOTPLUG_CPU */
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP_SMP
|
||||
extern int suspend_cpu_hotplug;
|
||||
|
||||
extern int disable_nonboot_cpus(void);
|
||||
extern void enable_nonboot_cpus(void);
|
||||
#else /* !CONFIG_PM_SLEEP_SMP */
|
||||
#define suspend_cpu_hotplug 0
|
||||
|
||||
static inline int disable_nonboot_cpus(void) { return 0; }
|
||||
static inline void enable_nonboot_cpus(void) {}
|
||||
#endif /* !CONFIG_PM_SLEEP_SMP */
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/completion.h>
|
||||
|
||||
|
|
@ -21,58 +20,65 @@
|
|||
#define CPUIDLE_NAME_LEN 16
|
||||
#define CPUIDLE_DESC_LEN 32
|
||||
|
||||
struct module;
|
||||
|
||||
struct cpuidle_device;
|
||||
struct cpuidle_driver;
|
||||
|
||||
|
||||
/****************************
|
||||
* CPUIDLE DEVICE INTERFACE *
|
||||
****************************/
|
||||
|
||||
struct cpuidle_state_usage {
|
||||
void *driver_data;
|
||||
|
||||
unsigned long long usage;
|
||||
unsigned long long time; /* in US */
|
||||
};
|
||||
|
||||
struct cpuidle_state {
|
||||
char name[CPUIDLE_NAME_LEN];
|
||||
char desc[CPUIDLE_DESC_LEN];
|
||||
void *driver_data;
|
||||
|
||||
unsigned int flags;
|
||||
unsigned int exit_latency; /* in US */
|
||||
unsigned int power_usage; /* in mW */
|
||||
unsigned int target_residency; /* in US */
|
||||
|
||||
unsigned long long usage;
|
||||
unsigned long long time; /* in US */
|
||||
|
||||
int (*enter) (struct cpuidle_device *dev,
|
||||
struct cpuidle_state *state);
|
||||
struct cpuidle_driver *drv,
|
||||
int index);
|
||||
};
|
||||
|
||||
/* Idle State Flags */
|
||||
#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
|
||||
#define CPUIDLE_FLAG_IGNORE (0x100) /* ignore during this idle period */
|
||||
|
||||
#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
|
||||
|
||||
/**
|
||||
* cpuidle_get_statedata - retrieves private driver state data
|
||||
* @state: the state
|
||||
* @st_usage: the state usage statistics
|
||||
*/
|
||||
static inline void * cpuidle_get_statedata(struct cpuidle_state *state)
|
||||
static inline void *cpuidle_get_statedata(struct cpuidle_state_usage *st_usage)
|
||||
{
|
||||
return state->driver_data;
|
||||
return st_usage->driver_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* cpuidle_set_statedata - stores private driver state data
|
||||
* @state: the state
|
||||
* @st_usage: the state usage statistics
|
||||
* @data: the private data
|
||||
*/
|
||||
static inline void
|
||||
cpuidle_set_statedata(struct cpuidle_state *state, void *data)
|
||||
cpuidle_set_statedata(struct cpuidle_state_usage *st_usage, void *data)
|
||||
{
|
||||
state->driver_data = data;
|
||||
st_usage->driver_data = data;
|
||||
}
|
||||
|
||||
struct cpuidle_state_kobj {
|
||||
struct cpuidle_state *state;
|
||||
struct cpuidle_state_usage *state_usage;
|
||||
struct completion kobj_unregister;
|
||||
struct kobject kobj;
|
||||
};
|
||||
|
|
@ -80,22 +86,17 @@ struct cpuidle_state_kobj {
|
|||
struct cpuidle_device {
|
||||
unsigned int registered:1;
|
||||
unsigned int enabled:1;
|
||||
unsigned int power_specified:1;
|
||||
unsigned int cpu;
|
||||
|
||||
int last_residency;
|
||||
int state_count;
|
||||
struct cpuidle_state states[CPUIDLE_STATE_MAX];
|
||||
struct cpuidle_state_usage states_usage[CPUIDLE_STATE_MAX];
|
||||
struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX];
|
||||
struct cpuidle_state *last_state;
|
||||
|
||||
struct list_head device_list;
|
||||
struct kobject kobj;
|
||||
struct completion kobj_unregister;
|
||||
void *governor_data;
|
||||
struct cpuidle_state *safe_state;
|
||||
|
||||
int (*prepare) (struct cpuidle_device *dev);
|
||||
};
|
||||
|
||||
DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
|
||||
|
|
@ -119,6 +120,11 @@ static inline int cpuidle_get_last_residency(struct cpuidle_device *dev)
|
|||
struct cpuidle_driver {
|
||||
char name[CPUIDLE_NAME_LEN];
|
||||
struct module *owner;
|
||||
|
||||
unsigned int power_specified:1;
|
||||
struct cpuidle_state states[CPUIDLE_STATE_MAX];
|
||||
int state_count;
|
||||
int safe_state_index;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_CPU_IDLE
|
||||
|
|
@ -165,11 +171,14 @@ struct cpuidle_governor {
|
|||
struct list_head governor_list;
|
||||
unsigned int rating;
|
||||
|
||||
int (*enable) (struct cpuidle_device *dev);
|
||||
void (*disable) (struct cpuidle_device *dev);
|
||||
int (*enable) (struct cpuidle_driver *drv,
|
||||
struct cpuidle_device *dev);
|
||||
void (*disable) (struct cpuidle_driver *drv,
|
||||
struct cpuidle_device *dev);
|
||||
|
||||
int (*select) (struct cpuidle_device *dev);
|
||||
void (*reflect) (struct cpuidle_device *dev);
|
||||
int (*select) (struct cpuidle_driver *drv,
|
||||
struct cpuidle_device *dev);
|
||||
void (*reflect) (struct cpuidle_device *dev, int index);
|
||||
|
||||
struct module *owner;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#define _LINUX_CRYPTO_H
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
@ -510,11 +509,6 @@ static inline int crypto_tfm_alg_priority(struct crypto_tfm *tfm)
|
|||
return tfm->__crt_alg->cra_priority;
|
||||
}
|
||||
|
||||
static inline const char *crypto_tfm_alg_modname(struct crypto_tfm *tfm)
|
||||
{
|
||||
return module_name(tfm->__crt_alg->cra_module);
|
||||
}
|
||||
|
||||
static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm)
|
||||
{
|
||||
return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ struct devfreq_dev_status {
|
|||
unsigned long total_time;
|
||||
unsigned long busy_time;
|
||||
unsigned long current_frequency;
|
||||
void *private_date;
|
||||
void *private_data;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <linux/lockdep.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/device.h>
|
||||
|
|
@ -29,6 +29,7 @@ struct device;
|
|||
struct device_private;
|
||||
struct device_driver;
|
||||
struct driver_private;
|
||||
struct module;
|
||||
struct class;
|
||||
struct subsys_private;
|
||||
struct bus_type;
|
||||
|
|
@ -723,10 +724,14 @@ extern int dev_set_drvdata(struct device *dev, void *data);
|
|||
*/
|
||||
extern struct device *__root_device_register(const char *name,
|
||||
struct module *owner);
|
||||
static inline struct device *root_device_register(const char *name)
|
||||
{
|
||||
return __root_device_register(name, THIS_MODULE);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a macro to avoid include problems with THIS_MODULE,
|
||||
* just as per what is done for device_schedule_callback() above.
|
||||
*/
|
||||
#define root_device_register(name) \
|
||||
__root_device_register(name, THIS_MODULE)
|
||||
|
||||
extern void root_device_unregister(struct device *root);
|
||||
|
||||
static inline void *dev_get_platdata(const struct device *dev)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
#ifdef CONFIG_CGROUP_DEVICE
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ struct dma_map_ops {
|
|||
int (*mapping_error)(struct device *dev, dma_addr_t dma_addr);
|
||||
int (*dma_supported)(struct device *dev, u64 mask);
|
||||
int (*set_dma_mask)(struct device *dev, u64 mask);
|
||||
#ifdef ARCH_HAS_DMA_GET_REQUIRED_MASK
|
||||
u64 (*get_required_mask)(struct device *dev);
|
||||
#endif
|
||||
int is_phys;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,9 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/dma-direction.h>
|
||||
|
||||
struct scatterlist;
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/bitmap.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
/**
|
||||
* typedef dma_cookie_t - an opaque DMA cookie
|
||||
|
|
@ -519,6 +520,16 @@ static inline int dmaengine_slave_config(struct dma_chan *chan,
|
|||
(unsigned long)config);
|
||||
}
|
||||
|
||||
static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(
|
||||
struct dma_chan *chan, void *buf, size_t len,
|
||||
enum dma_data_direction dir, unsigned long flags)
|
||||
{
|
||||
struct scatterlist sg;
|
||||
sg_init_one(&sg, buf, len);
|
||||
|
||||
return chan->device->device_prep_slave_sg(chan, &sg, 1, dir, flags);
|
||||
}
|
||||
|
||||
static inline int dmaengine_terminate_all(struct dma_chan *chan)
|
||||
{
|
||||
return dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,12 @@ 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;
|
||||
|
|
|
|||
|
|
@ -1097,10 +1097,12 @@ struct ethtool_ops {
|
|||
#define SPEED_1000 1000
|
||||
#define SPEED_2500 2500
|
||||
#define SPEED_10000 10000
|
||||
#define SPEED_UNKNOWN -1
|
||||
|
||||
/* Duplex, half or full. */
|
||||
#define DUPLEX_HALF 0x00
|
||||
#define DUPLEX_FULL 0x01
|
||||
#define DUPLEX_UNKNOWN 0xff
|
||||
|
||||
/* Which connector port. */
|
||||
#define PORT_TP 0x00
|
||||
|
|
|
|||
89
include/linux/export.h
Normal file
89
include/linux/export.h
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
#ifndef _LINUX_EXPORT_H
|
||||
#define _LINUX_EXPORT_H
|
||||
/*
|
||||
* Export symbols from the kernel to modules. Forked from module.h
|
||||
* to reduce the amount of pointless cruft we feed to gcc when only
|
||||
* exporting a simple symbol or two.
|
||||
*
|
||||
* If you feel the need to add #include <linux/foo.h> to this file
|
||||
* then you are doing something wrong and should go away silently.
|
||||
*/
|
||||
|
||||
/* Some toolchains use a `_' prefix for all user symbols. */
|
||||
#ifdef CONFIG_SYMBOL_PREFIX
|
||||
#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
|
||||
#else
|
||||
#define MODULE_SYMBOL_PREFIX ""
|
||||
#endif
|
||||
|
||||
struct kernel_symbol
|
||||
{
|
||||
unsigned long value;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
#ifdef MODULE
|
||||
extern struct module __this_module;
|
||||
#define THIS_MODULE (&__this_module)
|
||||
#else
|
||||
#define THIS_MODULE ((struct module *)0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MODULES
|
||||
|
||||
#ifndef __GENKSYMS__
|
||||
#ifdef CONFIG_MODVERSIONS
|
||||
/* Mark the CRC weak since genksyms apparently decides not to
|
||||
* generate a checksums for some symbols */
|
||||
#define __CRC_SYMBOL(sym, sec) \
|
||||
extern void *__crc_##sym __attribute__((weak)); \
|
||||
static const unsigned long __kcrctab_##sym \
|
||||
__used \
|
||||
__attribute__((section("___kcrctab" sec "+" #sym), unused)) \
|
||||
= (unsigned long) &__crc_##sym;
|
||||
#else
|
||||
#define __CRC_SYMBOL(sym, sec)
|
||||
#endif
|
||||
|
||||
/* For every exported symbol, place a struct in the __ksymtab section */
|
||||
#define __EXPORT_SYMBOL(sym, sec) \
|
||||
extern typeof(sym) sym; \
|
||||
__CRC_SYMBOL(sym, sec) \
|
||||
static const char __kstrtab_##sym[] \
|
||||
__attribute__((section("__ksymtab_strings"), aligned(1))) \
|
||||
= MODULE_SYMBOL_PREFIX #sym; \
|
||||
static const struct kernel_symbol __ksymtab_##sym \
|
||||
__used \
|
||||
__attribute__((section("___ksymtab" sec "+" #sym), unused)) \
|
||||
= { (unsigned long)&sym, __kstrtab_##sym }
|
||||
|
||||
#define EXPORT_SYMBOL(sym) \
|
||||
__EXPORT_SYMBOL(sym, "")
|
||||
|
||||
#define EXPORT_SYMBOL_GPL(sym) \
|
||||
__EXPORT_SYMBOL(sym, "_gpl")
|
||||
|
||||
#define EXPORT_SYMBOL_GPL_FUTURE(sym) \
|
||||
__EXPORT_SYMBOL(sym, "_gpl_future")
|
||||
|
||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||
#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
|
||||
#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
|
||||
#else
|
||||
#define EXPORT_UNUSED_SYMBOL(sym)
|
||||
#define EXPORT_UNUSED_SYMBOL_GPL(sym)
|
||||
#endif
|
||||
|
||||
#endif /* __GENKSYMS__ */
|
||||
|
||||
#else /* !CONFIG_MODULES... */
|
||||
|
||||
#define EXPORT_SYMBOL(sym)
|
||||
#define EXPORT_SYMBOL_GPL(sym)
|
||||
#define EXPORT_SYMBOL_GPL_FUTURE(sym)
|
||||
#define EXPORT_UNUSED_SYMBOL(sym)
|
||||
#define EXPORT_UNUSED_SYMBOL_GPL(sym)
|
||||
|
||||
#endif /* CONFIG_MODULES */
|
||||
|
||||
#endif /* _LINUX_EXPORT_H */
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef _LINUX_FIRMWARE_H
|
||||
#define _LINUX_FIRMWARE_H
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/gfp.h>
|
||||
|
|
@ -15,6 +14,7 @@ struct firmware {
|
|||
struct page **pages;
|
||||
};
|
||||
|
||||
struct module;
|
||||
struct device;
|
||||
|
||||
struct builtin_fw {
|
||||
|
|
|
|||
|
|
@ -143,14 +143,9 @@ static inline void set_freezable_with_signal(void)
|
|||
#define wait_event_freezekillable(wq, condition) \
|
||||
({ \
|
||||
int __retval; \
|
||||
do { \
|
||||
__retval = wait_event_killable(wq, \
|
||||
(condition) || freezing(current)); \
|
||||
if (__retval && !freezing(current)) \
|
||||
break; \
|
||||
else if (!(condition)) \
|
||||
__retval = -ERESTARTSYS; \
|
||||
} while (try_to_freeze()); \
|
||||
freezer_do_not_count(); \
|
||||
__retval = wait_event_killable(wq, (condition)); \
|
||||
freezer_count(); \
|
||||
__retval; \
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include <linux/kallsyms.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/types.h>
|
||||
|
|
@ -19,6 +18,7 @@
|
|||
|
||||
#include <asm/ftrace.h>
|
||||
|
||||
struct module;
|
||||
struct ftrace_hash;
|
||||
|
||||
#ifdef CONFIG_FUNCTION_TRACER
|
||||
|
|
|
|||
|
|
@ -71,10 +71,9 @@ void gameport_close(struct gameport *gameport);
|
|||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
|
||||
void __gameport_register_port(struct gameport *gameport, struct module *owner);
|
||||
static inline void gameport_register_port(struct gameport *gameport)
|
||||
{
|
||||
__gameport_register_port(gameport, THIS_MODULE);
|
||||
}
|
||||
/* use a define to avoid include chaining to get THIS_MODULE */
|
||||
#define gameport_register_port(gameport) \
|
||||
__gameport_register_port(gameport, THIS_MODULE)
|
||||
|
||||
void gameport_unregister_port(struct gameport *gameport);
|
||||
|
||||
|
|
@ -145,12 +144,12 @@ static inline void gameport_unpin_driver(struct gameport *gameport)
|
|||
mutex_unlock(&gameport->drv_mutex);
|
||||
}
|
||||
|
||||
int __gameport_register_driver(struct gameport_driver *drv,
|
||||
int __must_check __gameport_register_driver(struct gameport_driver *drv,
|
||||
struct module *owner, const char *mod_name);
|
||||
static inline int __must_check gameport_register_driver(struct gameport_driver *drv)
|
||||
{
|
||||
return __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME);
|
||||
}
|
||||
|
||||
/* use a define to avoid include chaining to get THIS_MODULE & friends */
|
||||
#define gameport_register_driver(drv) \
|
||||
__gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME)
|
||||
|
||||
void gameport_unregister_driver(struct gameport_driver *drv);
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ struct hd_struct {
|
|||
#define GENHD_FL_EXT_DEVT 64 /* allow extended devt */
|
||||
#define GENHD_FL_NATIVE_CAPACITY 128
|
||||
#define GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE 256
|
||||
#define GENHD_FL_NO_PART_SCAN 512
|
||||
|
||||
enum {
|
||||
DISK_EVENT_MEDIA_CHANGE = 1 << 0, /* media changed */
|
||||
|
|
@ -238,9 +239,10 @@ static inline int disk_max_parts(struct gendisk *disk)
|
|||
return disk->minors;
|
||||
}
|
||||
|
||||
static inline bool disk_partitionable(struct gendisk *disk)
|
||||
static inline bool disk_part_scan_enabled(struct gendisk *disk)
|
||||
{
|
||||
return disk_max_parts(disk) > 1;
|
||||
return disk_max_parts(disk) > 1 &&
|
||||
!(disk->flags & GENHD_FL_NO_PART_SCAN);
|
||||
}
|
||||
|
||||
static inline dev_t disk_devt(struct gendisk *disk)
|
||||
|
|
|
|||
|
|
@ -697,10 +697,11 @@ extern void hid_destroy_device(struct hid_device *);
|
|||
|
||||
extern int __must_check __hid_register_driver(struct hid_driver *,
|
||||
struct module *, const char *mod_name);
|
||||
static inline int __must_check hid_register_driver(struct hid_driver *driver)
|
||||
{
|
||||
return __hid_register_driver(driver, THIS_MODULE, KBUILD_MODNAME);
|
||||
}
|
||||
|
||||
/* use a define to avoid include chaining to get THIS_MODULE & friends */
|
||||
#define hid_register_driver(driver) \
|
||||
__hid_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
|
||||
|
||||
extern void hid_unregister_driver(struct hid_driver *);
|
||||
|
||||
extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@ int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags)
|
|||
static inline
|
||||
void __hwspin_unlock(struct hwspinlock *hwlock, int mode, unsigned long *flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int hwspin_lock_get_id(struct hwspinlock *hwlock)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device.h> /* for struct device */
|
||||
#include <linux/sched.h> /* for completion */
|
||||
|
|
@ -49,6 +48,8 @@ struct i2c_driver;
|
|||
union i2c_smbus_data;
|
||||
struct i2c_board_info;
|
||||
|
||||
struct module;
|
||||
|
||||
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||
/*
|
||||
* The master routines are the ones normally used to transmit data to devices
|
||||
|
|
@ -451,10 +452,9 @@ extern int i2c_add_numbered_adapter(struct i2c_adapter *);
|
|||
extern int i2c_register_driver(struct module *, struct i2c_driver *);
|
||||
extern void i2c_del_driver(struct i2c_driver *);
|
||||
|
||||
static inline int i2c_add_driver(struct i2c_driver *driver)
|
||||
{
|
||||
return i2c_register_driver(THIS_MODULE, driver);
|
||||
}
|
||||
/* use a define to avoid include chaining to get THIS_MODULE */
|
||||
#define i2c_add_driver(driver) \
|
||||
i2c_register_driver(THIS_MODULE, driver)
|
||||
|
||||
extern struct i2c_client *i2c_use_client(struct i2c_client *client);
|
||||
extern void i2c_release_client(struct i2c_client *client);
|
||||
|
|
|
|||
|
|
@ -220,10 +220,11 @@ struct kernel_ipmi_msg {
|
|||
* The in-kernel interface.
|
||||
*/
|
||||
#include <linux/list.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
struct module;
|
||||
|
||||
/* Opaque type for a IPMI message user. One of these is needed to
|
||||
send and receive messages. */
|
||||
typedef struct ipmi_user *ipmi_user_t;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
#include <linux/ipmi_msgdefs.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ipmi.h>
|
||||
|
|
|
|||
|
|
@ -23,13 +23,13 @@
|
|||
#include <linux/errno.h>
|
||||
#include <linux/topology.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/irq_regs.h>
|
||||
|
||||
struct seq_file;
|
||||
struct module;
|
||||
struct irq_desc;
|
||||
struct irq_data;
|
||||
typedef void (*irq_flow_handler_t)(unsigned int irq,
|
||||
|
|
@ -567,30 +567,22 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d)
|
|||
int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,
|
||||
struct module *owner);
|
||||
|
||||
static inline int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt,
|
||||
int node)
|
||||
{
|
||||
return __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE);
|
||||
}
|
||||
/* use macros to avoid needing export.h for THIS_MODULE */
|
||||
#define irq_alloc_descs(irq, from, cnt, node) \
|
||||
__irq_alloc_descs(irq, from, cnt, node, THIS_MODULE)
|
||||
|
||||
#define irq_alloc_desc(node) \
|
||||
irq_alloc_descs(-1, 0, 1, node)
|
||||
|
||||
#define irq_alloc_desc_at(at, node) \
|
||||
irq_alloc_descs(at, at, 1, node)
|
||||
|
||||
#define irq_alloc_desc_from(from, node) \
|
||||
irq_alloc_descs(-1, from, 1, node)
|
||||
|
||||
void irq_free_descs(unsigned int irq, unsigned int cnt);
|
||||
int irq_reserve_irqs(unsigned int from, unsigned int cnt);
|
||||
|
||||
static inline int irq_alloc_desc(int node)
|
||||
{
|
||||
return irq_alloc_descs(-1, 0, 1, node);
|
||||
}
|
||||
|
||||
static inline int irq_alloc_desc_at(unsigned int at, int node)
|
||||
{
|
||||
return irq_alloc_descs(at, at, 1, node);
|
||||
}
|
||||
|
||||
static inline int irq_alloc_desc_from(unsigned int from, int node)
|
||||
{
|
||||
return irq_alloc_descs(-1, from, 1, node);
|
||||
}
|
||||
|
||||
static inline void irq_free_desc(unsigned int irq)
|
||||
{
|
||||
irq_free_descs(irq, 1);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
struct irq_affinity_notify;
|
||||
struct proc_dir_entry;
|
||||
struct timer_rand_state;
|
||||
struct module;
|
||||
/**
|
||||
* struct irq_desc - interrupt descriptor
|
||||
* @irq_data: per irq and chip data passed down to chip functions
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ struct jump_label_key {
|
|||
|
||||
# include <asm/jump_label.h>
|
||||
# define HAVE_JUMP_LABEL
|
||||
#endif
|
||||
#endif /* CC_HAVE_ASM_GOTO && CONFIG_JUMP_LABEL */
|
||||
|
||||
enum jump_label_type {
|
||||
JUMP_LABEL_DISABLE = 0,
|
||||
|
|
@ -28,9 +28,9 @@ struct module;
|
|||
#ifdef HAVE_JUMP_LABEL
|
||||
|
||||
#ifdef CONFIG_MODULES
|
||||
#define JUMP_LABEL_INIT {{ 0 }, NULL, NULL}
|
||||
#define JUMP_LABEL_INIT {ATOMIC_INIT(0), NULL, NULL}
|
||||
#else
|
||||
#define JUMP_LABEL_INIT {{ 0 }, NULL}
|
||||
#define JUMP_LABEL_INIT {ATOMIC_INIT(0), NULL}
|
||||
#endif
|
||||
|
||||
static __always_inline bool static_branch(struct jump_label_key *key)
|
||||
|
|
@ -41,18 +41,20 @@ static __always_inline bool static_branch(struct jump_label_key *key)
|
|||
extern struct jump_entry __start___jump_table[];
|
||||
extern struct jump_entry __stop___jump_table[];
|
||||
|
||||
extern void jump_label_init(void);
|
||||
extern void jump_label_lock(void);
|
||||
extern void jump_label_unlock(void);
|
||||
extern void arch_jump_label_transform(struct jump_entry *entry,
|
||||
enum jump_label_type type);
|
||||
extern void arch_jump_label_text_poke_early(jump_label_t addr);
|
||||
enum jump_label_type type);
|
||||
extern void arch_jump_label_transform_static(struct jump_entry *entry,
|
||||
enum jump_label_type type);
|
||||
extern int jump_label_text_reserved(void *start, void *end);
|
||||
extern void jump_label_inc(struct jump_label_key *key);
|
||||
extern void jump_label_dec(struct jump_label_key *key);
|
||||
extern bool jump_label_enabled(struct jump_label_key *key);
|
||||
extern void jump_label_apply_nops(struct module *mod);
|
||||
|
||||
#else
|
||||
#else /* !HAVE_JUMP_LABEL */
|
||||
|
||||
#include <linux/atomic.h>
|
||||
|
||||
|
|
@ -62,6 +64,10 @@ struct jump_label_key {
|
|||
atomic_t enabled;
|
||||
};
|
||||
|
||||
static __always_inline void jump_label_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
static __always_inline bool static_branch(struct jump_label_key *key)
|
||||
{
|
||||
if (unlikely(atomic_read(&key->enabled)))
|
||||
|
|
@ -96,7 +102,6 @@ static inline int jump_label_apply_nops(struct module *mod)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_JUMP_LABEL */
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* _LINUX_JUMP_LABEL_H */
|
||||
|
|
|
|||
|
|
@ -371,6 +371,7 @@ extern enum system_states {
|
|||
#define TAINT_WARN 9
|
||||
#define TAINT_CRAP 10
|
||||
#define TAINT_FIRMWARE_WORKAROUND 11
|
||||
#define TAINT_OOT_MODULE 12
|
||||
|
||||
extern const char hex_asc[];
|
||||
#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ struct loop_device {
|
|||
*/
|
||||
enum {
|
||||
LO_FLAGS_READ_ONLY = 1,
|
||||
LO_FLAGS_USE_AOPS = 2,
|
||||
LO_FLAGS_AUTOCLEAR = 4,
|
||||
LO_FLAGS_PARTSCAN = 8,
|
||||
};
|
||||
|
||||
#include <asm/posix_types.h> /* for __kernel_old_dev_t */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
#define __LINUX_MDIO_BITBANG_H
|
||||
|
||||
#include <linux/phy.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
struct module;
|
||||
|
||||
struct mdiobb_ctrl;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#ifndef _LINUX_MISCDEVICE_H
|
||||
#define _LINUX_MISCDEVICE_H
|
||||
#include <linux/module.h>
|
||||
#include <linux/major.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* These allocations are managed by device@lanana.org. If you use an
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include <linux/kobject.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/tracepoint.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
#include <linux/percpu.h>
|
||||
#include <asm/module.h>
|
||||
|
|
@ -25,21 +26,8 @@
|
|||
/* Not Yet Implemented */
|
||||
#define MODULE_SUPPORTED_DEVICE(name)
|
||||
|
||||
/* Some toolchains use a `_' prefix for all user symbols. */
|
||||
#ifdef CONFIG_SYMBOL_PREFIX
|
||||
#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
|
||||
#else
|
||||
#define MODULE_SYMBOL_PREFIX ""
|
||||
#endif
|
||||
|
||||
#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
|
||||
|
||||
struct kernel_symbol
|
||||
{
|
||||
unsigned long value;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
struct modversion_info
|
||||
{
|
||||
unsigned long crc;
|
||||
|
|
@ -98,11 +86,8 @@ void trim_init_extable(struct module *m);
|
|||
extern const struct gtype##_id __mod_##gtype##_table \
|
||||
__attribute__ ((unused, alias(__stringify(name))))
|
||||
|
||||
extern struct module __this_module;
|
||||
#define THIS_MODULE (&__this_module)
|
||||
#else /* !MODULE */
|
||||
#define MODULE_GENERIC_TABLE(gtype,name)
|
||||
#define THIS_MODULE ((struct module *)0)
|
||||
#endif
|
||||
|
||||
/* Generic info of form tag = "info" */
|
||||
|
|
@ -150,11 +135,6 @@ extern struct module __this_module;
|
|||
/* What your module does. */
|
||||
#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
|
||||
|
||||
/* One for each parameter, describing how to use it. Some files do
|
||||
multiple of these per line, so can't just use MODULE_INFO. */
|
||||
#define MODULE_PARM_DESC(_parm, desc) \
|
||||
__MODULE_INFO(parm, _parm, #_parm ":" desc)
|
||||
|
||||
#define MODULE_DEVICE_TABLE(type,name) \
|
||||
MODULE_GENERIC_TABLE(type##_device,name)
|
||||
|
||||
|
|
@ -218,52 +198,6 @@ struct module_use {
|
|||
struct module *source, *target;
|
||||
};
|
||||
|
||||
#ifndef __GENKSYMS__
|
||||
#ifdef CONFIG_MODVERSIONS
|
||||
/* Mark the CRC weak since genksyms apparently decides not to
|
||||
* generate a checksums for some symbols */
|
||||
#define __CRC_SYMBOL(sym, sec) \
|
||||
extern void *__crc_##sym __attribute__((weak)); \
|
||||
static const unsigned long __kcrctab_##sym \
|
||||
__used \
|
||||
__attribute__((section("___kcrctab" sec "+" #sym), unused)) \
|
||||
= (unsigned long) &__crc_##sym;
|
||||
#else
|
||||
#define __CRC_SYMBOL(sym, sec)
|
||||
#endif
|
||||
|
||||
/* For every exported symbol, place a struct in the __ksymtab section */
|
||||
#define __EXPORT_SYMBOL(sym, sec) \
|
||||
extern typeof(sym) sym; \
|
||||
__CRC_SYMBOL(sym, sec) \
|
||||
static const char __kstrtab_##sym[] \
|
||||
__attribute__((section("__ksymtab_strings"), aligned(1))) \
|
||||
= MODULE_SYMBOL_PREFIX #sym; \
|
||||
static const struct kernel_symbol __ksymtab_##sym \
|
||||
__used \
|
||||
__attribute__((section("___ksymtab" sec "+" #sym), unused)) \
|
||||
= { (unsigned long)&sym, __kstrtab_##sym }
|
||||
|
||||
#define EXPORT_SYMBOL(sym) \
|
||||
__EXPORT_SYMBOL(sym, "")
|
||||
|
||||
#define EXPORT_SYMBOL_GPL(sym) \
|
||||
__EXPORT_SYMBOL(sym, "_gpl")
|
||||
|
||||
#define EXPORT_SYMBOL_GPL_FUTURE(sym) \
|
||||
__EXPORT_SYMBOL(sym, "_gpl_future")
|
||||
|
||||
|
||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||
#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
|
||||
#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
|
||||
#else
|
||||
#define EXPORT_UNUSED_SYMBOL(sym)
|
||||
#define EXPORT_UNUSED_SYMBOL_GPL(sym)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
enum module_state
|
||||
{
|
||||
MODULE_STATE_LIVE,
|
||||
|
|
@ -581,11 +515,6 @@ int unregister_module_notifier(struct notifier_block * nb);
|
|||
extern void print_modules(void);
|
||||
|
||||
#else /* !CONFIG_MODULES... */
|
||||
#define EXPORT_SYMBOL(sym)
|
||||
#define EXPORT_SYMBOL_GPL(sym)
|
||||
#define EXPORT_SYMBOL_GPL_FUTURE(sym)
|
||||
#define EXPORT_UNUSED_SYMBOL(sym)
|
||||
#define EXPORT_UNUSED_SYMBOL_GPL(sym)
|
||||
|
||||
/* Given an address, look for it in the exception tables. */
|
||||
static inline const struct exception_table_entry *
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@ static const char __module_cat(name,__LINE__)[] \
|
|||
#define __MODULE_PARM_TYPE(name, _type) \
|
||||
__MODULE_INFO(parmtype, name##type, #name ":" _type)
|
||||
|
||||
/* One for each parameter, describing how to use it. Some files do
|
||||
multiple of these per line, so can't just use MODULE_INFO. */
|
||||
#define MODULE_PARM_DESC(_parm, desc) \
|
||||
__MODULE_INFO(parm, _parm, #_parm ":" desc)
|
||||
|
||||
struct kernel_param;
|
||||
|
||||
struct kernel_param_ops {
|
||||
|
|
|
|||
|
|
@ -86,24 +86,39 @@ struct nand_bbt_descr {
|
|||
#define NAND_BBT_VERSION 0x00000100
|
||||
/* Create a bbt if none exists */
|
||||
#define NAND_BBT_CREATE 0x00000200
|
||||
/*
|
||||
* Create an empty BBT with no vendor information. Vendor's information may be
|
||||
* unavailable, for example, if the NAND controller has a different data and OOB
|
||||
* layout or if this information is already purged. Must be used in conjunction
|
||||
* with NAND_BBT_CREATE.
|
||||
*/
|
||||
#define NAND_BBT_CREATE_EMPTY 0x00000400
|
||||
/* Search good / bad pattern through all pages of a block */
|
||||
#define NAND_BBT_SCANALLPAGES 0x00000400
|
||||
#define NAND_BBT_SCANALLPAGES 0x00000800
|
||||
/* Scan block empty during good / bad block scan */
|
||||
#define NAND_BBT_SCANEMPTY 0x00000800
|
||||
#define NAND_BBT_SCANEMPTY 0x00001000
|
||||
/* Write bbt if neccecary */
|
||||
#define NAND_BBT_WRITE 0x00001000
|
||||
#define NAND_BBT_WRITE 0x00002000
|
||||
/* Read and write back block contents when writing bbt */
|
||||
#define NAND_BBT_SAVECONTENT 0x00002000
|
||||
#define NAND_BBT_SAVECONTENT 0x00004000
|
||||
/* Search good / bad pattern on the first and the second page */
|
||||
#define NAND_BBT_SCAN2NDPAGE 0x00004000
|
||||
#define NAND_BBT_SCAN2NDPAGE 0x00008000
|
||||
/* Search good / bad pattern on the last page of the eraseblock */
|
||||
#define NAND_BBT_SCANLASTPAGE 0x00008000
|
||||
/* Chip stores bad block marker on BOTH 1st and 6th bytes of OOB */
|
||||
#define NAND_BBT_SCANBYTE1AND6 0x00100000
|
||||
/* The nand_bbt_descr was created dynamicaly and must be freed */
|
||||
#define NAND_BBT_DYNAMICSTRUCT 0x00200000
|
||||
/* The bad block table does not OOB for marker */
|
||||
#define NAND_BBT_NO_OOB 0x00400000
|
||||
#define NAND_BBT_SCANLASTPAGE 0x00010000
|
||||
/*
|
||||
* Use a flash based bad block table. By default, OOB identifier is saved in
|
||||
* OOB area. This option is passed to the default bad block table function.
|
||||
*/
|
||||
#define NAND_BBT_USE_FLASH 0x00020000
|
||||
/* Do not store flash based bad block table in OOB area; store it in-band */
|
||||
#define NAND_BBT_NO_OOB 0x00040000
|
||||
|
||||
/*
|
||||
* Flag set by nand_create_default_bbt_descr(), marking that the nand_bbt_descr
|
||||
* was allocated dynamicaly and must be freed in nand_release(). Has no meaning
|
||||
* in nand_chip.bbt_options.
|
||||
*/
|
||||
#define NAND_BBT_DYNAMICSTRUCT 0x80000000
|
||||
|
||||
/* The maximum number of blocks to scan for a bbt */
|
||||
#define NAND_BBT_SCAN_MAXBLOCKS 4
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
#define __MTD_MTD_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/device.h>
|
||||
|
|
@ -33,17 +32,19 @@
|
|||
#define MTD_CHAR_MAJOR 90
|
||||
#define MTD_BLOCK_MAJOR 31
|
||||
|
||||
#define MTD_ERASE_PENDING 0x01
|
||||
#define MTD_ERASE_PENDING 0x01
|
||||
#define MTD_ERASING 0x02
|
||||
#define MTD_ERASE_SUSPEND 0x04
|
||||
#define MTD_ERASE_DONE 0x08
|
||||
#define MTD_ERASE_FAILED 0x10
|
||||
#define MTD_ERASE_DONE 0x08
|
||||
#define MTD_ERASE_FAILED 0x10
|
||||
|
||||
#define MTD_FAIL_ADDR_UNKNOWN -1LL
|
||||
|
||||
/* If the erase fails, fail_addr might indicate exactly which block failed. If
|
||||
fail_addr = MTD_FAIL_ADDR_UNKNOWN, the failure was not at the device level or was not
|
||||
specific to any particular block. */
|
||||
/*
|
||||
* If the erase fails, fail_addr might indicate exactly which block failed. If
|
||||
* fail_addr = MTD_FAIL_ADDR_UNKNOWN, the failure was not at the device level
|
||||
* or was not specific to any particular block.
|
||||
*/
|
||||
struct erase_info {
|
||||
struct mtd_info *mtd;
|
||||
uint64_t addr;
|
||||
|
|
@ -60,26 +61,12 @@ struct erase_info {
|
|||
};
|
||||
|
||||
struct mtd_erase_region_info {
|
||||
uint64_t offset; /* At which this region starts, from the beginning of the MTD */
|
||||
uint64_t offset; /* At which this region starts, from the beginning of the MTD */
|
||||
uint32_t erasesize; /* For this region */
|
||||
uint32_t numblocks; /* Number of blocks of erasesize in this region */
|
||||
unsigned long *lockmap; /* If keeping bitmap of locks */
|
||||
};
|
||||
|
||||
/*
|
||||
* oob operation modes
|
||||
*
|
||||
* MTD_OOB_PLACE: oob data are placed at the given offset
|
||||
* MTD_OOB_AUTO: oob data are automatically placed at the free areas
|
||||
* which are defined by the ecclayout
|
||||
* MTD_OOB_RAW: mode to read oob and data without doing ECC checking
|
||||
*/
|
||||
typedef enum {
|
||||
MTD_OOB_PLACE,
|
||||
MTD_OOB_AUTO,
|
||||
MTD_OOB_RAW,
|
||||
} mtd_oob_mode_t;
|
||||
|
||||
/**
|
||||
* struct mtd_oob_ops - oob operation operands
|
||||
* @mode: operation mode
|
||||
|
|
@ -91,7 +78,7 @@ typedef enum {
|
|||
* @ooblen: number of oob bytes to write/read
|
||||
* @oobretlen: number of oob bytes written/read
|
||||
* @ooboffs: offset of oob data in the oob area (only relevant when
|
||||
* mode = MTD_OOB_PLACE)
|
||||
* mode = MTD_OPS_PLACE_OOB or MTD_OPS_RAW)
|
||||
* @datbuf: data buffer - if NULL only oob data are read/written
|
||||
* @oobbuf: oob data buffer
|
||||
*
|
||||
|
|
@ -100,7 +87,7 @@ typedef enum {
|
|||
* OOB area.
|
||||
*/
|
||||
struct mtd_oob_ops {
|
||||
mtd_oob_mode_t mode;
|
||||
unsigned int mode;
|
||||
size_t len;
|
||||
size_t retlen;
|
||||
size_t ooblen;
|
||||
|
|
@ -125,6 +112,8 @@ struct nand_ecclayout {
|
|||
struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES_LARGE];
|
||||
};
|
||||
|
||||
struct module; /* only needed for owner field in mtd_info */
|
||||
|
||||
struct mtd_info {
|
||||
u_char type;
|
||||
uint32_t flags;
|
||||
|
|
@ -172,7 +161,7 @@ struct mtd_info {
|
|||
const char *name;
|
||||
int index;
|
||||
|
||||
/* ecc layout structure pointer - read only ! */
|
||||
/* ECC layout structure pointer - read only! */
|
||||
struct nand_ecclayout *ecclayout;
|
||||
|
||||
/* Data for variable erase regions. If numeraseregions is zero,
|
||||
|
|
@ -323,10 +312,15 @@ static inline uint32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd)
|
|||
/* Kernel-side ioctl definitions */
|
||||
|
||||
struct mtd_partition;
|
||||
struct mtd_part_parser_data;
|
||||
|
||||
extern int mtd_device_register(struct mtd_info *master,
|
||||
const struct mtd_partition *parts,
|
||||
int nr_parts);
|
||||
extern int mtd_device_parse_register(struct mtd_info *mtd,
|
||||
const char **part_probe_types,
|
||||
struct mtd_part_parser_data *parser_data,
|
||||
const struct mtd_partition *defparts,
|
||||
int defnr_parts);
|
||||
#define mtd_device_register(master, parts, nr_parts) \
|
||||
mtd_device_parse_register(master, NULL, NULL, parts, nr_parts)
|
||||
extern int mtd_device_unregister(struct mtd_info *master);
|
||||
extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num);
|
||||
extern int __get_mtd_device(struct mtd_info *mtd);
|
||||
|
|
@ -355,27 +349,16 @@ void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size);
|
|||
|
||||
void mtd_erase_callback(struct erase_info *instr);
|
||||
|
||||
/*
|
||||
* Debugging macro and defines
|
||||
*/
|
||||
#define MTD_DEBUG_LEVEL0 (0) /* Quiet */
|
||||
#define MTD_DEBUG_LEVEL1 (1) /* Audible */
|
||||
#define MTD_DEBUG_LEVEL2 (2) /* Loud */
|
||||
#define MTD_DEBUG_LEVEL3 (3) /* Noisy */
|
||||
static inline int mtd_is_bitflip(int err) {
|
||||
return err == -EUCLEAN;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MTD_DEBUG
|
||||
#define DEBUG(n, args...) \
|
||||
do { \
|
||||
if (n <= CONFIG_MTD_DEBUG_VERBOSE) \
|
||||
printk(KERN_INFO args); \
|
||||
} while(0)
|
||||
#else /* CONFIG_MTD_DEBUG */
|
||||
#define DEBUG(n, args...) \
|
||||
do { \
|
||||
if (0) \
|
||||
printk(KERN_INFO args); \
|
||||
} while(0)
|
||||
static inline int mtd_is_eccerr(int err) {
|
||||
return err == -EBADMSG;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MTD_DEBUG */
|
||||
static inline int mtd_is_bitflip_or_eccerr(int err) {
|
||||
return mtd_is_bitflip(err) || mtd_is_eccerr(err);
|
||||
}
|
||||
|
||||
#endif /* __MTD_MTD_H__ */
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ extern void nand_release(struct mtd_info *mtd);
|
|||
/* Internal helper for board drivers which need to override command function */
|
||||
extern void nand_wait_ready(struct mtd_info *mtd);
|
||||
|
||||
/* locks all blockes present in the device */
|
||||
/* locks all blocks present in the device */
|
||||
extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
|
||||
|
||||
/* unlocks specified locked blockes */
|
||||
/* unlocks specified locked blocks */
|
||||
extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
|
||||
|
||||
/* The maximum number of NAND chips in an array */
|
||||
|
|
@ -150,7 +150,7 @@ typedef enum {
|
|||
#define NAND_ECC_READ 0
|
||||
/* Reset Hardware ECC for write */
|
||||
#define NAND_ECC_WRITE 1
|
||||
/* Enable Hardware ECC before syndrom is read back from flash */
|
||||
/* Enable Hardware ECC before syndrome is read back from flash */
|
||||
#define NAND_ECC_READSYN 2
|
||||
|
||||
/* Bit mask for flags passed to do_nand_read_ecc */
|
||||
|
|
@ -163,7 +163,7 @@ typedef enum {
|
|||
*/
|
||||
/* Chip can not auto increment pages */
|
||||
#define NAND_NO_AUTOINCR 0x00000001
|
||||
/* Buswitdh is 16 bit */
|
||||
/* Buswidth is 16 bit */
|
||||
#define NAND_BUSWIDTH_16 0x00000002
|
||||
/* Device supports partial programming without padding */
|
||||
#define NAND_NO_PADDING 0x00000004
|
||||
|
|
@ -219,27 +219,15 @@ typedef enum {
|
|||
#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR)
|
||||
|
||||
/* Non chip related options */
|
||||
/*
|
||||
* Use a flash based bad block table. OOB identifier is saved in OOB area.
|
||||
* This option is passed to the default bad block table function.
|
||||
*/
|
||||
#define NAND_USE_FLASH_BBT 0x00010000
|
||||
/* This option skips the bbt scan during initialization. */
|
||||
#define NAND_SKIP_BBTSCAN 0x00020000
|
||||
#define NAND_SKIP_BBTSCAN 0x00010000
|
||||
/*
|
||||
* This option is defined if the board driver allocates its own buffers
|
||||
* (e.g. because it needs them DMA-coherent).
|
||||
*/
|
||||
#define NAND_OWN_BUFFERS 0x00040000
|
||||
#define NAND_OWN_BUFFERS 0x00020000
|
||||
/* Chip may not exist, so silence any errors in scan */
|
||||
#define NAND_SCAN_SILENT_NODEV 0x00080000
|
||||
/*
|
||||
* If passed additionally to NAND_USE_FLASH_BBT then BBT code will not touch
|
||||
* the OOB area.
|
||||
*/
|
||||
#define NAND_USE_FLASH_BBT_NO_OOB 0x00800000
|
||||
/* Create an empty BBT with no vendor information if the BBT is available */
|
||||
#define NAND_CREATE_EMPTY_BBT 0x01000000
|
||||
#define NAND_SCAN_SILENT_NODEV 0x00040000
|
||||
|
||||
/* Options set by nand scan */
|
||||
/* Nand scan has allocated controller struct */
|
||||
|
|
@ -331,27 +319,29 @@ struct nand_hw_control {
|
|||
};
|
||||
|
||||
/**
|
||||
* struct nand_ecc_ctrl - Control structure for ecc
|
||||
* @mode: ecc mode
|
||||
* @steps: number of ecc steps per page
|
||||
* @size: data bytes per ecc step
|
||||
* @bytes: ecc bytes per step
|
||||
* @total: total number of ecc bytes per page
|
||||
* @prepad: padding information for syndrome based ecc generators
|
||||
* @postpad: padding information for syndrome based ecc generators
|
||||
* struct nand_ecc_ctrl - Control structure for ECC
|
||||
* @mode: ECC mode
|
||||
* @steps: number of ECC steps per page
|
||||
* @size: data bytes per ECC step
|
||||
* @bytes: ECC bytes per step
|
||||
* @total: total number of ECC bytes per page
|
||||
* @prepad: padding information for syndrome based ECC generators
|
||||
* @postpad: padding information for syndrome based ECC generators
|
||||
* @layout: ECC layout control struct pointer
|
||||
* @priv: pointer to private ecc control data
|
||||
* @hwctl: function to control hardware ecc generator. Must only
|
||||
* @priv: pointer to private ECC control data
|
||||
* @hwctl: function to control hardware ECC generator. Must only
|
||||
* be provided if an hardware ECC is available
|
||||
* @calculate: function for ecc calculation or readback from ecc hardware
|
||||
* @correct: function for ecc correction, matching to ecc generator (sw/hw)
|
||||
* @calculate: function for ECC calculation or readback from ECC hardware
|
||||
* @correct: function for ECC correction, matching to ECC generator (sw/hw)
|
||||
* @read_page_raw: function to read a raw page without ECC
|
||||
* @write_page_raw: function to write a raw page without ECC
|
||||
* @read_page: function to read a page according to the ecc generator
|
||||
* @read_page: function to read a page according to the ECC generator
|
||||
* requirements.
|
||||
* @read_subpage: function to read parts of the page covered by ECC.
|
||||
* @write_page: function to write a page according to the ecc generator
|
||||
* @write_page: function to write a page according to the ECC generator
|
||||
* requirements.
|
||||
* @write_oob_raw: function to write chip OOB data without ECC
|
||||
* @read_oob_raw: function to read chip OOB data without ECC
|
||||
* @read_oob: function to read chip OOB data
|
||||
* @write_oob: function to write chip OOB data
|
||||
*/
|
||||
|
|
@ -380,6 +370,10 @@ struct nand_ecc_ctrl {
|
|||
uint32_t offs, uint32_t len, uint8_t *buf);
|
||||
void (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
const uint8_t *buf);
|
||||
int (*write_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
int page);
|
||||
int (*read_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
int page, int sndcmd);
|
||||
int (*read_oob)(struct mtd_info *mtd, struct nand_chip *chip, int page,
|
||||
int sndcmd);
|
||||
int (*write_oob)(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
|
|
@ -388,8 +382,8 @@ struct nand_ecc_ctrl {
|
|||
|
||||
/**
|
||||
* struct nand_buffers - buffer structure for read/write
|
||||
* @ecccalc: buffer for calculated ecc
|
||||
* @ecccode: buffer for ecc read from flash
|
||||
* @ecccalc: buffer for calculated ECC
|
||||
* @ecccode: buffer for ECC read from flash
|
||||
* @databuf: buffer for data - dynamically sized
|
||||
*
|
||||
* Do not change the order of buffers. databuf and oobrbuf must be in
|
||||
|
|
@ -422,7 +416,7 @@ struct nand_buffers {
|
|||
* mtd->oobsize, mtd->writesize and so on.
|
||||
* @id_data contains the 8 bytes values of NAND_CMD_READID.
|
||||
* Return with the bus width.
|
||||
* @dev_ready: [BOARDSPECIFIC] hardwarespecific function for accesing
|
||||
* @dev_ready: [BOARDSPECIFIC] hardwarespecific function for accessing
|
||||
* device ready/busy line. If set to NULL no access to
|
||||
* ready/busy is available and the ready/busy information
|
||||
* is read from the chip status register.
|
||||
|
|
@ -430,17 +424,17 @@ struct nand_buffers {
|
|||
* commands to the chip.
|
||||
* @waitfunc: [REPLACEABLE] hardwarespecific function for wait on
|
||||
* ready.
|
||||
* @ecc: [BOARDSPECIFIC] ecc control ctructure
|
||||
* @ecc: [BOARDSPECIFIC] ECC control structure
|
||||
* @buffers: buffer structure for read/write
|
||||
* @hwcontrol: platform-specific hardware control structure
|
||||
* @ops: oob operation operands
|
||||
* @erase_cmd: [INTERN] erase command write function, selectable due
|
||||
* to AND support.
|
||||
* @scan_bbt: [REPLACEABLE] function to scan bad block table
|
||||
* @chip_delay: [BOARDSPECIFIC] chip dependent delay for transferring
|
||||
* data from array to read regs (tR).
|
||||
* @state: [INTERN] the current state of the NAND device
|
||||
* @oob_poi: poison value buffer
|
||||
* @oob_poi: "poison value buffer," used for laying out OOB data
|
||||
* before writing
|
||||
* @page_shift: [INTERN] number of address bits in a page (column
|
||||
* address bits).
|
||||
* @phys_erase_shift: [INTERN] number of address bits in a physical eraseblock
|
||||
|
|
@ -449,6 +443,9 @@ struct nand_buffers {
|
|||
* @options: [BOARDSPECIFIC] various chip options. They can partly
|
||||
* be set to inform nand_scan about special functionality.
|
||||
* See the defines for further explanation.
|
||||
* @bbt_options: [INTERN] bad block specific options. All options used
|
||||
* here must come from bbm.h. By default, these options
|
||||
* will be copied to the appropriate nand_bbt_descr's.
|
||||
* @badblockpos: [INTERN] position of the bad block marker in the oob
|
||||
* area.
|
||||
* @badblockbits: [INTERN] number of bits to left-shift the bad block
|
||||
|
|
@ -464,7 +461,7 @@ struct nand_buffers {
|
|||
* non 0 if ONFI supported.
|
||||
* @onfi_params: [INTERN] holds the ONFI page parameter when ONFI is
|
||||
* supported, 0 otherwise.
|
||||
* @ecclayout: [REPLACEABLE] the default ecc placement scheme
|
||||
* @ecclayout: [REPLACEABLE] the default ECC placement scheme
|
||||
* @bbt: [INTERN] bad block table pointer
|
||||
* @bbt_td: [REPLACEABLE] bad block table descriptor for flash
|
||||
* lookup.
|
||||
|
|
@ -472,9 +469,9 @@ struct nand_buffers {
|
|||
* @badblock_pattern: [REPLACEABLE] bad block scan pattern used for initial
|
||||
* bad block scan.
|
||||
* @controller: [REPLACEABLE] a pointer to a hardware controller
|
||||
* structure which is shared among multiple independend
|
||||
* structure which is shared among multiple independent
|
||||
* devices.
|
||||
* @priv: [OPTIONAL] pointer to private chip date
|
||||
* @priv: [OPTIONAL] pointer to private chip data
|
||||
* @errstat: [OPTIONAL] hardware specific function to perform
|
||||
* additional error status checks (determine if errors are
|
||||
* correctable).
|
||||
|
|
@ -509,6 +506,7 @@ struct nand_chip {
|
|||
|
||||
int chip_delay;
|
||||
unsigned int options;
|
||||
unsigned int bbt_options;
|
||||
|
||||
int page_shift;
|
||||
int phys_erase_shift;
|
||||
|
|
@ -536,8 +534,6 @@ struct nand_chip {
|
|||
struct nand_buffers *buffers;
|
||||
struct nand_hw_control hwcontrol;
|
||||
|
||||
struct mtd_oob_ops ops;
|
||||
|
||||
uint8_t *bbt;
|
||||
struct nand_bbt_descr *bbt_td;
|
||||
struct nand_bbt_descr *bbt_md;
|
||||
|
|
@ -611,10 +607,9 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len,
|
|||
* @partitions: mtd partition list
|
||||
* @chip_delay: R/B delay value in us
|
||||
* @options: Option flags, e.g. 16bit buswidth
|
||||
* @ecclayout: ecc layout info structure
|
||||
* @bbt_options: BBT option flags, e.g. NAND_BBT_USE_FLASH
|
||||
* @ecclayout: ECC layout info structure
|
||||
* @part_probe_types: NULL-terminated array of probe types
|
||||
* @set_parts: platform specific function to set partitions
|
||||
* @priv: hardware controller specific settings
|
||||
*/
|
||||
struct platform_nand_chip {
|
||||
int nr_chips;
|
||||
|
|
@ -624,9 +619,8 @@ struct platform_nand_chip {
|
|||
struct nand_ecclayout *ecclayout;
|
||||
int chip_delay;
|
||||
unsigned int options;
|
||||
unsigned int bbt_options;
|
||||
const char **part_probe_types;
|
||||
void (*set_parts)(uint64_t size, struct platform_nand_chip *chip);
|
||||
void *priv;
|
||||
};
|
||||
|
||||
/* Keep gcc happy */
|
||||
|
|
|
|||
|
|
@ -184,6 +184,9 @@ struct onenand_chip {
|
|||
#define ONENAND_IS_CACHE_PROGRAM(this) \
|
||||
(this->options & ONENAND_HAS_CACHE_PROGRAM)
|
||||
|
||||
#define ONENAND_IS_NOP_1(this) \
|
||||
(this->options & ONENAND_HAS_NOP_1)
|
||||
|
||||
/* Check byte access in OneNAND */
|
||||
#define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1)
|
||||
|
||||
|
|
@ -195,6 +198,7 @@ struct onenand_chip {
|
|||
#define ONENAND_HAS_2PLANE (0x0004)
|
||||
#define ONENAND_HAS_4KB_PAGE (0x0008)
|
||||
#define ONENAND_HAS_CACHE_PROGRAM (0x0010)
|
||||
#define ONENAND_HAS_NOP_1 (0x0020)
|
||||
#define ONENAND_SKIP_UNLOCK_CHECK (0x0100)
|
||||
#define ONENAND_PAGEBUF_ALLOC (0x1000)
|
||||
#define ONENAND_OOBBUF_ALLOC (0x2000)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@
|
|||
* will extend to the end of the master MTD device.
|
||||
* offset: absolute starting position within the master MTD device; if
|
||||
* defined as MTDPART_OFS_APPEND, the partition will start where the
|
||||
* previous one ended; if MTDPART_OFS_NXTBLK, at the next erase block.
|
||||
* previous one ended; if MTDPART_OFS_NXTBLK, at the next erase block;
|
||||
* if MTDPART_OFS_RETAIN, consume as much as possible, leaving size
|
||||
* after the end of partition.
|
||||
* mask_flags: contains flags that have to be masked (removed) from the
|
||||
* master MTD flag set for the corresponding MTD partition.
|
||||
* For example, to force a read-only partition, simply adding
|
||||
|
|
@ -42,12 +44,25 @@ struct mtd_partition {
|
|||
struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only) */
|
||||
};
|
||||
|
||||
#define MTDPART_OFS_RETAIN (-3)
|
||||
#define MTDPART_OFS_NXTBLK (-2)
|
||||
#define MTDPART_OFS_APPEND (-1)
|
||||
#define MTDPART_SIZ_FULL (0)
|
||||
|
||||
|
||||
struct mtd_info;
|
||||
struct device_node;
|
||||
|
||||
/**
|
||||
* struct mtd_part_parser_data - used to pass data to MTD partition parsers.
|
||||
* @origin: for RedBoot, start address of MTD device
|
||||
* @of_node: for OF parsers, device node containing partitioning information
|
||||
*/
|
||||
struct mtd_part_parser_data {
|
||||
unsigned long origin;
|
||||
struct device_node *of_node;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Functions dealing with the various ways of partitioning the space
|
||||
|
|
@ -57,37 +72,12 @@ struct mtd_part_parser {
|
|||
struct list_head list;
|
||||
struct module *owner;
|
||||
const char *name;
|
||||
int (*parse_fn)(struct mtd_info *, struct mtd_partition **, unsigned long);
|
||||
int (*parse_fn)(struct mtd_info *, struct mtd_partition **,
|
||||
struct mtd_part_parser_data *);
|
||||
};
|
||||
|
||||
extern int register_mtd_parser(struct mtd_part_parser *parser);
|
||||
extern int deregister_mtd_parser(struct mtd_part_parser *parser);
|
||||
extern int parse_mtd_partitions(struct mtd_info *master, const char **types,
|
||||
struct mtd_partition **pparts, unsigned long origin);
|
||||
|
||||
#define put_partition_parser(p) do { module_put((p)->owner); } while(0)
|
||||
|
||||
struct device;
|
||||
struct device_node;
|
||||
|
||||
#ifdef CONFIG_MTD_OF_PARTS
|
||||
int __devinit of_mtd_parse_partitions(struct device *dev,
|
||||
struct device_node *node,
|
||||
struct mtd_partition **pparts);
|
||||
#else
|
||||
static inline int of_mtd_parse_partitions(struct device *dev,
|
||||
struct device_node *node,
|
||||
struct mtd_partition **pparts)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MTD_CMDLINE_PARTS
|
||||
static inline int mtd_has_cmdlinepart(void) { return 1; }
|
||||
#else
|
||||
static inline int mtd_has_cmdlinepart(void) { return 0; }
|
||||
#endif
|
||||
|
||||
int mtd_is_partition(struct mtd_info *mtd);
|
||||
int mtd_add_partition(struct mtd_info *master, char *name,
|
||||
|
|
|
|||
|
|
@ -32,21 +32,4 @@ struct physmap_flash_data {
|
|||
struct mtd_partition *parts;
|
||||
};
|
||||
|
||||
/*
|
||||
* Board needs to specify the exact mapping during their setup time.
|
||||
*/
|
||||
void physmap_configure(unsigned long addr, unsigned long size,
|
||||
int bankwidth, void (*set_vpp)(struct map_info *, int) );
|
||||
|
||||
/*
|
||||
* Machines that wish to do flash partition may want to call this function in
|
||||
* their setup routine.
|
||||
*
|
||||
* physmap_set_partitions(mypartitions, num_parts);
|
||||
*
|
||||
* Note that one can always override this hard-coded partition with
|
||||
* command line partition (you need to enable CONFIG_MTD_CMDLINE_PARTS).
|
||||
*/
|
||||
void physmap_set_partitions(struct mtd_partition *parts, int num_parts);
|
||||
|
||||
#endif /* __LINUX_MTD_PHYSMAP__ */
|
||||
|
|
|
|||
|
|
@ -229,6 +229,7 @@ struct nfs_inode {
|
|||
#define NFS_INO_COMMIT (7) /* inode is committing unstable writes */
|
||||
#define NFS_INO_PNFS_COMMIT (8) /* use pnfs code for commit */
|
||||
#define NFS_INO_LAYOUTCOMMIT (9) /* layoutcommit required */
|
||||
#define NFS_INO_LAYOUTCOMMITTING (10) /* layoutcommit inflight */
|
||||
|
||||
static inline struct nfs_inode *NFS_I(const struct inode *inode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/spinlock.h>
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/errno.h>
|
||||
|
||||
typedef u32 phandle;
|
||||
typedef u32 ihandle;
|
||||
|
|
@ -321,6 +322,16 @@ static inline struct device_node *of_parse_phandle(struct device_node *np,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline int of_alias_get_id(struct device_node *np, const char *stem)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int of_machine_is_compatible(const char *compat)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define of_match_ptr(_ptr) NULL
|
||||
#define of_match_node(_matches, _node) NULL
|
||||
#endif /* CONFIG_OF */
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
*/
|
||||
|
||||
#ifdef CONFIG_OF_DEVICE
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/pm.h>
|
||||
|
|
|
|||
|
|
@ -97,11 +97,11 @@ static inline int opp_disable(struct device *dev, unsigned long freq)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct srcu_notifier_head *opp_get_notifier(struct device *dev)
|
||||
static inline struct srcu_notifier_head *opp_get_notifier(struct device *dev)
|
||||
{
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
#endif /* CONFIG_PM_OPP */
|
||||
|
||||
#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP)
|
||||
int opp_init_cpufreq_table(struct device *dev,
|
||||
|
|
|
|||
|
|
@ -132,13 +132,9 @@ extern int pci_hp_deregister(struct hotplug_slot *slot);
|
|||
extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot,
|
||||
struct hotplug_slot_info *info);
|
||||
|
||||
static inline int pci_hp_register(struct hotplug_slot *slot,
|
||||
struct pci_bus *pbus,
|
||||
int devnr, const char *name)
|
||||
{
|
||||
return __pci_hp_register(slot, pbus, devnr, name,
|
||||
THIS_MODULE, KBUILD_MODNAME);
|
||||
}
|
||||
/* use a define to avoid include chaining to get THIS_MODULE & friends */
|
||||
#define pci_hp_register(slot, pbus, devnr, name) \
|
||||
__pci_hp_register(slot, pbus, devnr, name, THIS_MODULE, KBUILD_MODNAME)
|
||||
|
||||
/* PCI Setting Record (Type 0) */
|
||||
struct hpp_type0 {
|
||||
|
|
|
|||
|
|
@ -2873,3 +2873,5 @@
|
|||
|
||||
#define PCI_VENDOR_ID_XEN 0x5853
|
||||
#define PCI_DEVICE_ID_XEN_PLATFORM 0x0001
|
||||
|
||||
#define PCI_VENDOR_ID_OCZ 0x1b85
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#define _LINUX_PM_RUNTIME_H
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/pm.h>
|
||||
|
||||
#include <linux/jiffies.h>
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
#include <linux/device.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
struct module;
|
||||
struct i2c_client;
|
||||
struct spi_device;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#define __LINUX_REGULATOR_DRIVER_H_
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
struct regulator_dev;
|
||||
|
|
|
|||
|
|
@ -1522,6 +1522,13 @@ struct task_struct {
|
|||
int make_it_fail;
|
||||
#endif
|
||||
struct prop_local_single dirties;
|
||||
/*
|
||||
* when (nr_dirtied >= nr_dirtied_pause), it's time to call
|
||||
* balance_dirty_pages() for some dirty throttling pause
|
||||
*/
|
||||
int nr_dirtied;
|
||||
int nr_dirtied_pause;
|
||||
|
||||
#ifdef CONFIG_LATENCYTOP
|
||||
int latency_record_count;
|
||||
struct latency_record latency_record[LT_SAVECOUNT];
|
||||
|
|
|
|||
|
|
@ -132,8 +132,6 @@ struct plat_sci_port {
|
|||
|
||||
struct plat_sci_port_ops *ops;
|
||||
|
||||
struct device *dma_dev;
|
||||
|
||||
unsigned int dma_slave_tx;
|
||||
unsigned int dma_slave_rx;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -79,19 +79,21 @@ void serio_reconnect(struct serio *serio);
|
|||
irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags);
|
||||
|
||||
void __serio_register_port(struct serio *serio, struct module *owner);
|
||||
static inline void serio_register_port(struct serio *serio)
|
||||
{
|
||||
__serio_register_port(serio, THIS_MODULE);
|
||||
}
|
||||
|
||||
/* use a define to avoid include chaining to get THIS_MODULE */
|
||||
#define serio_register_port(serio) \
|
||||
__serio_register_port(serio, THIS_MODULE)
|
||||
|
||||
void serio_unregister_port(struct serio *serio);
|
||||
void serio_unregister_child_port(struct serio *serio);
|
||||
|
||||
int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name);
|
||||
static inline int __must_check serio_register_driver(struct serio_driver *drv)
|
||||
{
|
||||
return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME);
|
||||
}
|
||||
int __must_check __serio_register_driver(struct serio_driver *drv,
|
||||
struct module *owner, const char *mod_name);
|
||||
|
||||
/* use a define to avoid include chaining to get THIS_MODULE & friends */
|
||||
#define serio_register_driver(drv) \
|
||||
__serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME)
|
||||
|
||||
void serio_unregister_driver(struct serio_driver *drv);
|
||||
|
||||
static inline int serio_write(struct serio *serio, unsigned char data)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ struct clk {
|
|||
|
||||
unsigned long arch_flags;
|
||||
void *priv;
|
||||
struct dentry *dentry;
|
||||
struct clk_mapping *mapping;
|
||||
struct cpufreq_frequency_table *freq_table;
|
||||
unsigned int nr_freqs;
|
||||
|
|
@ -94,6 +93,9 @@ int clk_rate_table_find(struct clk *clk,
|
|||
long clk_rate_div_range_round(struct clk *clk, unsigned int div_min,
|
||||
unsigned int div_max, unsigned long rate);
|
||||
|
||||
long clk_rate_mult_range_round(struct clk *clk, unsigned int mult_min,
|
||||
unsigned int mult_max, unsigned long rate);
|
||||
|
||||
long clk_round_parent(struct clk *clk, unsigned long target,
|
||||
unsigned long *best_freq, unsigned long *parent_freq,
|
||||
unsigned int div_min, unsigned int div_max);
|
||||
|
|
|
|||
|
|
@ -231,10 +231,9 @@ struct ssb_driver {
|
|||
#define drv_to_ssb_drv(_drv) container_of(_drv, struct ssb_driver, drv)
|
||||
|
||||
extern int __ssb_driver_register(struct ssb_driver *drv, struct module *owner);
|
||||
static inline int ssb_driver_register(struct ssb_driver *drv)
|
||||
{
|
||||
return __ssb_driver_register(drv, THIS_MODULE);
|
||||
}
|
||||
#define ssb_driver_register(drv) \
|
||||
__ssb_driver_register(drv, THIS_MODULE)
|
||||
|
||||
extern void ssb_driver_unregister(struct ssb_driver *drv);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/list.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -136,6 +136,8 @@ void rpc_shutdown_client(struct rpc_clnt *);
|
|||
void rpc_release_client(struct rpc_clnt *);
|
||||
void rpc_task_release_client(struct rpc_task *);
|
||||
|
||||
int rpcb_create_local(void);
|
||||
void rpcb_put_local(void);
|
||||
int rpcb_register(u32, u32, int, unsigned short);
|
||||
int rpcb_v4_register(const u32 program, const u32 version,
|
||||
const struct sockaddr *address,
|
||||
|
|
|
|||
|
|
@ -413,6 +413,7 @@ struct svc_procedure {
|
|||
/*
|
||||
* Function prototypes.
|
||||
*/
|
||||
void svc_rpcb_cleanup(struct svc_serv *serv);
|
||||
struct svc_serv *svc_create(struct svc_program *, unsigned int,
|
||||
void (*shutdown)(struct svc_serv *));
|
||||
struct svc_rqst *svc_prepare_thread(struct svc_serv *serv,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
#define SUNRPC_SVC_XPRT_H
|
||||
|
||||
#include <linux/sunrpc/svc.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
struct module;
|
||||
|
||||
struct svc_xprt_ops {
|
||||
struct svc_xprt *(*xpo_create)(struct svc_serv *,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#define _SYSDEV_H_
|
||||
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pm.h>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
struct module;
|
||||
|
||||
struct ts_config;
|
||||
|
||||
#define TS_AUTOLOAD 1 /* Automatically load textsearch modules when needed */
|
||||
|
|
|
|||
|
|
@ -201,6 +201,10 @@ int arch_update_cpu_topology(void);
|
|||
.balance_interval = 64, \
|
||||
}
|
||||
|
||||
#ifndef SD_NODES_PER_DOMAIN
|
||||
#define SD_NODES_PER_DOMAIN 16
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCHED_BOOK
|
||||
#ifndef SD_BOOK_INIT
|
||||
#error Please define an appropriate SD_BOOK_INIT in include/asm/topology.h!!!
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@
|
|||
#ifndef _UIO_DRIVER_H_
|
||||
#define _UIO_DRIVER_H_
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
struct module;
|
||||
struct uio_map;
|
||||
|
||||
/**
|
||||
|
|
@ -101,11 +101,11 @@ extern int __must_check
|
|||
__uio_register_device(struct module *owner,
|
||||
struct device *parent,
|
||||
struct uio_info *info);
|
||||
static inline int __must_check
|
||||
uio_register_device(struct device *parent, struct uio_info *info)
|
||||
{
|
||||
return __uio_register_device(THIS_MODULE, parent, info);
|
||||
}
|
||||
|
||||
/* use a define to avoid include chaining to get THIS_MODULE */
|
||||
#define uio_register_device(parent, info) \
|
||||
__uio_register_device(THIS_MODULE, parent, info)
|
||||
|
||||
extern void uio_unregister_device(struct uio_info *info);
|
||||
extern void uio_event_notify(struct uio_info *info);
|
||||
|
||||
|
|
|
|||
|
|
@ -946,10 +946,11 @@ struct usb_class_driver {
|
|||
*/
|
||||
extern int usb_register_driver(struct usb_driver *, struct module *,
|
||||
const char *);
|
||||
static inline int usb_register(struct usb_driver *driver)
|
||||
{
|
||||
return usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME);
|
||||
}
|
||||
|
||||
/* use a define to avoid include chaining to get THIS_MODULE & friends */
|
||||
#define usb_register(driver) \
|
||||
usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
|
||||
|
||||
extern void usb_deregister(struct usb_driver *);
|
||||
|
||||
extern int usb_register_device_driver(struct usb_device_driver *,
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <linux/wait.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/uwb/spec.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
struct uwb_dev;
|
||||
struct uwb_beca_e;
|
||||
|
|
|
|||
|
|
@ -111,10 +111,9 @@ int __must_check __umc_driver_register(struct umc_driver *umc_drv,
|
|||
* umc_driver_register - register a UMC capabiltity driver.
|
||||
* @umc_drv: pointer to the driver.
|
||||
*/
|
||||
static inline int __must_check umc_driver_register(struct umc_driver *umc_drv)
|
||||
{
|
||||
return __umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME);
|
||||
}
|
||||
#define umc_driver_register(umc_drv) \
|
||||
__umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME)
|
||||
|
||||
void umc_driver_unregister(struct umc_driver *umc_drv);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#include <generated/utsrelease.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
/* Simply sanity version stamp for modules. */
|
||||
#ifdef CONFIG_SMP
|
||||
|
|
|
|||
|
|
@ -653,6 +653,10 @@ struct v4l2_buffer {
|
|||
#define V4L2_BUF_FLAG_ERROR 0x0040
|
||||
#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */
|
||||
#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */
|
||||
#define V4L2_BUF_FLAG_PREPARED 0x0400 /* Buffer is prepared for queuing */
|
||||
/* Cache handling flags */
|
||||
#define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800
|
||||
#define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x1000
|
||||
|
||||
/*
|
||||
* O V E R L A Y P R E V I E W
|
||||
|
|
@ -1165,6 +1169,7 @@ enum v4l2_power_line_frequency {
|
|||
V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0,
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1,
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2,
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3,
|
||||
};
|
||||
#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25)
|
||||
#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
|
||||
|
|
@ -2138,6 +2143,23 @@ struct v4l2_dbg_chip_ident {
|
|||
__u32 revision; /* chip revision, chip specific */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/**
|
||||
* struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument
|
||||
* @index: on return, index of the first created buffer
|
||||
* @count: entry: number of requested buffers,
|
||||
* return: number of created buffers
|
||||
* @memory: buffer memory type
|
||||
* @format: frame format, for which buffers are requested
|
||||
* @reserved: future extensions
|
||||
*/
|
||||
struct v4l2_create_buffers {
|
||||
__u32 index;
|
||||
__u32 count;
|
||||
enum v4l2_memory memory;
|
||||
struct v4l2_format format;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
/*
|
||||
* I O C T L C O D E S F O R V I D E O D E V I C E S
|
||||
*
|
||||
|
|
@ -2228,6 +2250,11 @@ struct v4l2_dbg_chip_ident {
|
|||
#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription)
|
||||
#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
|
||||
|
||||
/* Experimental, the below two ioctls may change over the next couple of kernel
|
||||
versions */
|
||||
#define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers)
|
||||
#define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer)
|
||||
|
||||
/* Reminder: when adding new ioctls please add support for them to
|
||||
drivers/media/video/v4l2-compat-ioctl32.c as well! */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,10 @@
|
|||
#define __VLYNQ_H__
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct module;
|
||||
|
||||
#define VLYNQ_NUM_IRQS 32
|
||||
|
||||
struct vlynq_mapping {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,23 @@ enum writeback_sync_modes {
|
|||
WB_SYNC_ALL, /* Wait on every mapping */
|
||||
};
|
||||
|
||||
/*
|
||||
* why some writeback work was initiated
|
||||
*/
|
||||
enum wb_reason {
|
||||
WB_REASON_BACKGROUND,
|
||||
WB_REASON_TRY_TO_FREE_PAGES,
|
||||
WB_REASON_SYNC,
|
||||
WB_REASON_PERIODIC,
|
||||
WB_REASON_LAPTOP_TIMER,
|
||||
WB_REASON_FREE_MORE_MEM,
|
||||
WB_REASON_FS_FREE_SPACE,
|
||||
WB_REASON_FORKER_THREAD,
|
||||
|
||||
WB_REASON_MAX,
|
||||
};
|
||||
extern const char *wb_reason_name[];
|
||||
|
||||
/*
|
||||
* A control structure which tells the writeback code what to do. These are
|
||||
* always on the stack, and hence need no locking. They are always initialised
|
||||
|
|
@ -69,14 +86,17 @@ struct writeback_control {
|
|||
*/
|
||||
struct bdi_writeback;
|
||||
int inode_wait(void *);
|
||||
void writeback_inodes_sb(struct super_block *);
|
||||
void writeback_inodes_sb_nr(struct super_block *, unsigned long nr);
|
||||
int writeback_inodes_sb_if_idle(struct super_block *);
|
||||
int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr);
|
||||
void writeback_inodes_sb(struct super_block *, enum wb_reason reason);
|
||||
void writeback_inodes_sb_nr(struct super_block *, unsigned long nr,
|
||||
enum wb_reason reason);
|
||||
int writeback_inodes_sb_if_idle(struct super_block *, enum wb_reason reason);
|
||||
int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr,
|
||||
enum wb_reason reason);
|
||||
void sync_inodes_sb(struct super_block *);
|
||||
long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages);
|
||||
long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages,
|
||||
enum wb_reason reason);
|
||||
long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
|
||||
void wakeup_flusher_threads(long nr_pages);
|
||||
void wakeup_flusher_threads(long nr_pages, enum wb_reason reason);
|
||||
|
||||
/* writeback.h requires fs.h; it, too, is not included from here. */
|
||||
static inline void wait_on_inode(struct inode *inode)
|
||||
|
|
@ -143,6 +163,7 @@ unsigned long bdi_dirty_limit(struct backing_dev_info *bdi,
|
|||
|
||||
void __bdi_update_bandwidth(struct backing_dev_info *bdi,
|
||||
unsigned long thresh,
|
||||
unsigned long bg_thresh,
|
||||
unsigned long dirty,
|
||||
unsigned long bdi_thresh,
|
||||
unsigned long bdi_dirty,
|
||||
|
|
|
|||
Loading…
Reference in a new issue