mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
This commit is contained in:
commit
64960848ab
3919 changed files with 289274 additions and 121577 deletions
|
|
@ -248,11 +248,12 @@ int acpi_check_region(resource_size_t start, resource_size_t n,
|
|||
int acpi_check_mem_region(resource_size_t start, resource_size_t n,
|
||||
const char *name);
|
||||
|
||||
int acpi_resources_are_enforced(void);
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
void __init acpi_no_s4_hw_signature(void);
|
||||
void __init acpi_old_suspend_ordering(void);
|
||||
void __init acpi_s4_no_nvs(void);
|
||||
void __init acpi_set_sci_en_on_resume(void);
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
|
||||
struct acpi_osc_context {
|
||||
|
|
|
|||
|
|
@ -212,6 +212,8 @@ extern void kick_iocb(struct kiocb *iocb);
|
|||
extern int aio_complete(struct kiocb *iocb, long res, long res2);
|
||||
struct mm_struct;
|
||||
extern void exit_aio(struct mm_struct *mm);
|
||||
extern long do_io_submit(aio_context_t ctx_id, long nr,
|
||||
struct iocb __user *__user *iocbpp, bool compat);
|
||||
#else
|
||||
static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; }
|
||||
static inline int aio_put_req(struct kiocb *iocb) { return 0; }
|
||||
|
|
@ -219,6 +221,9 @@ static inline void kick_iocb(struct kiocb *iocb) { }
|
|||
static inline int aio_complete(struct kiocb *iocb, long res, long res2) { return 0; }
|
||||
struct mm_struct;
|
||||
static inline void exit_aio(struct mm_struct *mm) { }
|
||||
static inline long do_io_submit(aio_context_t ctx_id, long nr,
|
||||
struct iocb __user * __user *iocbpp,
|
||||
bool compat) { return 0; }
|
||||
#endif /* CONFIG_AIO */
|
||||
|
||||
static inline struct kiocb *list_kiocb(struct list_head *h)
|
||||
|
|
|
|||
16
include/linux/altera_jtaguart.h
Normal file
16
include/linux/altera_jtaguart.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* altera_jtaguart.h -- Altera JTAG UART driver defines.
|
||||
*/
|
||||
|
||||
#ifndef __ALTJUART_H
|
||||
#define __ALTJUART_H
|
||||
|
||||
#define ALTERA_JTAGUART_MAJOR 204
|
||||
#define ALTERA_JTAGUART_MINOR 186
|
||||
|
||||
struct altera_jtaguart_platform_uart {
|
||||
unsigned long mapbase; /* Physical address base */
|
||||
unsigned int irq; /* Interrupt vector */
|
||||
};
|
||||
|
||||
#endif /* __ALTJUART_H */
|
||||
14
include/linux/altera_uart.h
Normal file
14
include/linux/altera_uart.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* altera_uart.h -- Altera UART driver defines.
|
||||
*/
|
||||
|
||||
#ifndef __ALTUART_H
|
||||
#define __ALTUART_H
|
||||
|
||||
struct altera_uart_platform_uart {
|
||||
unsigned long mapbase; /* Physical address base */
|
||||
unsigned int irq; /* Interrupt vector */
|
||||
unsigned int uartclk; /* UART clock rate */
|
||||
};
|
||||
|
||||
#endif /* __ALTUART_H */
|
||||
|
|
@ -71,6 +71,7 @@ struct ssp_clock_params {
|
|||
|
||||
/**
|
||||
* enum ssp_rx_endian - endianess of Rx FIFO Data
|
||||
* this feature is only available in ST versionf of PL022
|
||||
*/
|
||||
enum ssp_rx_endian {
|
||||
SSP_RX_MSB,
|
||||
|
|
@ -181,7 +182,8 @@ enum ssp_microwire_wait_state {
|
|||
};
|
||||
|
||||
/**
|
||||
* enum Microwire - whether Full/Half Duplex
|
||||
* enum ssp_duplex - whether Full/Half Duplex on microwire, only
|
||||
* available in the ST Micro variant.
|
||||
* @SSP_MICROWIRE_CHANNEL_FULL_DUPLEX: SSPTXD becomes bi-directional,
|
||||
* SSPRXD not used
|
||||
* @SSP_MICROWIRE_CHANNEL_HALF_DUPLEX: SSPTXD is an output, SSPRXD is
|
||||
|
|
@ -192,6 +194,31 @@ enum ssp_duplex {
|
|||
SSP_MICROWIRE_CHANNEL_HALF_DUPLEX
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ssp_clkdelay - an optional clock delay on the feedback clock
|
||||
* only available in the ST Micro PL023 variant.
|
||||
* @SSP_FEEDBACK_CLK_DELAY_NONE: no delay, the data coming in from the
|
||||
* slave is sampled directly
|
||||
* @SSP_FEEDBACK_CLK_DELAY_1T: the incoming slave data is sampled with
|
||||
* a delay of T-dt
|
||||
* @SSP_FEEDBACK_CLK_DELAY_2T: dito with a delay if 2T-dt
|
||||
* @SSP_FEEDBACK_CLK_DELAY_3T: dito with a delay if 3T-dt
|
||||
* @SSP_FEEDBACK_CLK_DELAY_4T: dito with a delay if 4T-dt
|
||||
* @SSP_FEEDBACK_CLK_DELAY_5T: dito with a delay if 5T-dt
|
||||
* @SSP_FEEDBACK_CLK_DELAY_6T: dito with a delay if 6T-dt
|
||||
* @SSP_FEEDBACK_CLK_DELAY_7T: dito with a delay if 7T-dt
|
||||
*/
|
||||
enum ssp_clkdelay {
|
||||
SSP_FEEDBACK_CLK_DELAY_NONE,
|
||||
SSP_FEEDBACK_CLK_DELAY_1T,
|
||||
SSP_FEEDBACK_CLK_DELAY_2T,
|
||||
SSP_FEEDBACK_CLK_DELAY_3T,
|
||||
SSP_FEEDBACK_CLK_DELAY_4T,
|
||||
SSP_FEEDBACK_CLK_DELAY_5T,
|
||||
SSP_FEEDBACK_CLK_DELAY_6T,
|
||||
SSP_FEEDBACK_CLK_DELAY_7T
|
||||
};
|
||||
|
||||
/**
|
||||
* CHIP select/deselect commands
|
||||
*/
|
||||
|
|
@ -235,6 +262,8 @@ struct pl022_ssp_controller {
|
|||
* @ctrl_len: Microwire interface: Control length
|
||||
* @wait_state: Microwire interface: Wait state
|
||||
* @duplex: Microwire interface: Full/Half duplex
|
||||
* @clkdelay: on the PL023 variant, the delay in feeback clock cycles
|
||||
* before sampling the incoming line
|
||||
* @cs_control: function pointer to board-specific function to
|
||||
* assert/deassert I/O port to control HW generation of devices chip-select.
|
||||
* @dma_xfer_type: Type of DMA xfer (Mem-to-periph or Periph-to-Periph)
|
||||
|
|
@ -258,6 +287,7 @@ struct pl022_config_chip {
|
|||
enum ssp_microwire_ctrl_len ctrl_len;
|
||||
enum ssp_microwire_wait_state wait_state;
|
||||
enum ssp_duplex duplex;
|
||||
enum ssp_clkdelay clkdelay;
|
||||
void (*cs_control) (u32 control);
|
||||
};
|
||||
|
||||
|
|
|
|||
45
include/linux/amba/pl330.h
Normal file
45
include/linux/amba/pl330.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/* linux/include/linux/amba/pl330.h
|
||||
*
|
||||
* Copyright (C) 2010 Samsung Electronics Co. Ltd.
|
||||
* Jaswinder Singh <jassi.brar@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef __AMBA_PL330_H_
|
||||
#define __AMBA_PL330_H_
|
||||
|
||||
#include <asm/hardware/pl330.h>
|
||||
|
||||
struct dma_pl330_peri {
|
||||
/*
|
||||
* Peri_Req i/f of the DMAC that is
|
||||
* peripheral could be reached from.
|
||||
*/
|
||||
u8 peri_id; /* {0, 31} */
|
||||
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 {
|
||||
/*
|
||||
* Number of valid peripherals connected to DMAC.
|
||||
* This may be different from the value read from
|
||||
* CR0, as the PL330 implementation might have 'holes'
|
||||
* in the peri list or the peri could also be reached
|
||||
* from another DMAC which the platform prefers.
|
||||
*/
|
||||
u8 nr_valid_peri;
|
||||
/* Array of valid peripherals */
|
||||
struct dma_pl330_peri *peri;
|
||||
/* Bytes to allocate for MC buffer */
|
||||
unsigned mcbuf_sz;
|
||||
};
|
||||
|
||||
#endif /* __AMBA_PL330_H_ */
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/writeback.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
|
|
@ -88,6 +89,8 @@ struct backing_dev_info {
|
|||
|
||||
struct device *dev;
|
||||
|
||||
struct timer_list laptop_mode_wb_timer;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct dentry *debug_dir;
|
||||
struct dentry *debug_stats;
|
||||
|
|
@ -103,9 +106,10 @@ 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, struct super_block *sb,
|
||||
long nr_pages);
|
||||
long nr_pages, int sb_locked);
|
||||
int bdi_writeback_task(struct bdi_writeback *wb);
|
||||
int bdi_has_dirty_io(struct backing_dev_info *bdi);
|
||||
void bdi_arm_supers_timer(void);
|
||||
|
||||
extern spinlock_t bdi_lock;
|
||||
extern struct list_head bdi_list;
|
||||
|
|
|
|||
|
|
@ -186,15 +186,19 @@ struct request {
|
|||
};
|
||||
|
||||
/*
|
||||
* two pointers are available for the IO schedulers, if they need
|
||||
* Three pointers are available for the IO schedulers, if they need
|
||||
* more they have to dynamically allocate it.
|
||||
*/
|
||||
void *elevator_private;
|
||||
void *elevator_private2;
|
||||
void *elevator_private3;
|
||||
|
||||
struct gendisk *rq_disk;
|
||||
unsigned long start_time;
|
||||
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
unsigned long long start_time_ns;
|
||||
unsigned long long io_start_time_ns; /* when passed to hardware */
|
||||
#endif
|
||||
/* Number of scatter-gather DMA addr+len pairs after
|
||||
* physical address coalescing is performed.
|
||||
*/
|
||||
|
|
@ -917,7 +921,12 @@ extern void blk_abort_queue(struct request_queue *);
|
|||
*/
|
||||
extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn,
|
||||
spinlock_t *lock, int node_id);
|
||||
extern struct request_queue *blk_init_allocated_queue_node(struct request_queue *,
|
||||
request_fn_proc *,
|
||||
spinlock_t *, int node_id);
|
||||
extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *);
|
||||
extern struct request_queue *blk_init_allocated_queue(struct request_queue *,
|
||||
request_fn_proc *, spinlock_t *);
|
||||
extern void blk_cleanup_queue(struct request_queue *);
|
||||
extern void blk_queue_make_request(struct request_queue *, make_request_fn *);
|
||||
extern void blk_queue_bounce_limit(struct request_queue *, u64);
|
||||
|
|
@ -994,20 +1003,25 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt,
|
|||
return NULL;
|
||||
return bqt->tag_index[tag];
|
||||
}
|
||||
|
||||
extern int blkdev_issue_flush(struct block_device *, sector_t *);
|
||||
#define DISCARD_FL_WAIT 0x01 /* wait for completion */
|
||||
#define DISCARD_FL_BARRIER 0x02 /* issue DISCARD_BARRIER request */
|
||||
extern int blkdev_issue_discard(struct block_device *, sector_t sector,
|
||||
sector_t nr_sects, gfp_t, int flags);
|
||||
|
||||
enum{
|
||||
BLKDEV_WAIT, /* wait for completion */
|
||||
BLKDEV_BARRIER, /*issue request with barrier */
|
||||
};
|
||||
#define BLKDEV_IFL_WAIT (1 << BLKDEV_WAIT)
|
||||
#define BLKDEV_IFL_BARRIER (1 << BLKDEV_BARRIER)
|
||||
extern int blkdev_issue_flush(struct block_device *, gfp_t, sector_t *,
|
||||
unsigned long);
|
||||
extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
|
||||
sector_t nr_sects, gfp_t gfp_mask, unsigned long flags);
|
||||
extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
|
||||
sector_t nr_sects, gfp_t gfp_mask, unsigned long flags);
|
||||
static inline int sb_issue_discard(struct super_block *sb,
|
||||
sector_t block, sector_t nr_blocks)
|
||||
{
|
||||
block <<= (sb->s_blocksize_bits - 9);
|
||||
nr_blocks <<= (sb->s_blocksize_bits - 9);
|
||||
return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL,
|
||||
DISCARD_FL_BARRIER);
|
||||
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
|
||||
}
|
||||
|
||||
extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
|
||||
|
|
@ -1196,6 +1210,39 @@ static inline void put_dev_sector(Sector p)
|
|||
struct work_struct;
|
||||
int kblockd_schedule_work(struct request_queue *q, struct work_struct *work);
|
||||
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
static inline void set_start_time_ns(struct request *req)
|
||||
{
|
||||
req->start_time_ns = sched_clock();
|
||||
}
|
||||
|
||||
static inline void set_io_start_time_ns(struct request *req)
|
||||
{
|
||||
req->io_start_time_ns = sched_clock();
|
||||
}
|
||||
|
||||
static inline uint64_t rq_start_time_ns(struct request *req)
|
||||
{
|
||||
return req->start_time_ns;
|
||||
}
|
||||
|
||||
static inline uint64_t rq_io_start_time_ns(struct request *req)
|
||||
{
|
||||
return req->io_start_time_ns;
|
||||
}
|
||||
#else
|
||||
static inline void set_start_time_ns(struct request *req) {}
|
||||
static inline void set_io_start_time_ns(struct request *req) {}
|
||||
static inline uint64_t rq_start_time_ns(struct request *req)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline uint64_t rq_io_start_time_ns(struct request *req)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MODULE_ALIAS_BLOCKDEV(major,minor) \
|
||||
MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
|
||||
#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \
|
||||
|
|
@ -1283,10 +1330,11 @@ struct block_device_operations {
|
|||
int (*direct_access) (struct block_device *, sector_t,
|
||||
void **, unsigned long *);
|
||||
int (*media_changed) (struct gendisk *);
|
||||
unsigned long long (*set_capacity) (struct gendisk *,
|
||||
unsigned long long);
|
||||
void (*unlock_native_capacity) (struct gendisk *);
|
||||
int (*revalidate_disk) (struct gendisk *);
|
||||
int (*getgeo)(struct block_device *, struct hd_geometry *);
|
||||
/* this callback is with swap_lock and sometimes page table lock held */
|
||||
void (*swap_slot_free_notify) (struct block_device *, unsigned long);
|
||||
struct module *owner;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -203,6 +203,9 @@ int block_write_full_page_endio(struct page *page, get_block_t *get_block,
|
|||
int block_read_full_page(struct page*, get_block_t*);
|
||||
int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc,
|
||||
unsigned long from);
|
||||
int block_write_begin_newtrunc(struct file *, struct address_space *,
|
||||
loff_t, unsigned, unsigned,
|
||||
struct page **, void **, get_block_t*);
|
||||
int block_write_begin(struct file *, struct address_space *,
|
||||
loff_t, unsigned, unsigned,
|
||||
struct page **, void **, get_block_t*);
|
||||
|
|
@ -214,6 +217,9 @@ int generic_write_end(struct file *, struct address_space *,
|
|||
struct page *, void *);
|
||||
void page_zero_new_buffers(struct page *page, unsigned from, unsigned to);
|
||||
int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*);
|
||||
int cont_write_begin_newtrunc(struct file *, struct address_space *, loff_t,
|
||||
unsigned, unsigned, struct page **, void **,
|
||||
get_block_t *, loff_t *);
|
||||
int cont_write_begin(struct file *, struct address_space *, loff_t,
|
||||
unsigned, unsigned, struct page **, void **,
|
||||
get_block_t *, loff_t *);
|
||||
|
|
@ -224,7 +230,10 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
|
|||
void block_sync_page(struct page *);
|
||||
sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
|
||||
int block_truncate_page(struct address_space *, loff_t, get_block_t *);
|
||||
int file_fsync(struct file *, struct dentry *, int);
|
||||
int file_fsync(struct file *, int);
|
||||
int nobh_write_begin_newtrunc(struct file *, struct address_space *,
|
||||
loff_t, unsigned, unsigned,
|
||||
struct page **, void **, get_block_t*);
|
||||
int nobh_write_begin(struct file *, struct address_space *,
|
||||
loff_t, unsigned, unsigned,
|
||||
struct page **, void **, get_block_t*);
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ struct cftype {
|
|||
* This callback must be implemented, if you want provide
|
||||
* notification functionality.
|
||||
*/
|
||||
int (*unregister_event)(struct cgroup *cgrp, struct cftype *cft,
|
||||
void (*unregister_event)(struct cgroup *cgrp, struct cftype *cft,
|
||||
struct eventfd_ctx *eventfd);
|
||||
};
|
||||
|
||||
|
|
|
|||
89
include/linux/compaction.h
Normal file
89
include/linux/compaction.h
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
#ifndef _LINUX_COMPACTION_H
|
||||
#define _LINUX_COMPACTION_H
|
||||
|
||||
/* Return values for compact_zone() and try_to_compact_pages() */
|
||||
/* compaction didn't start as it was not possible or direct reclaim was more suitable */
|
||||
#define COMPACT_SKIPPED 0
|
||||
/* compaction should continue to another pageblock */
|
||||
#define COMPACT_CONTINUE 1
|
||||
/* direct compaction partially compacted a zone and there are suitable pages */
|
||||
#define COMPACT_PARTIAL 2
|
||||
/* The full zone was compacted */
|
||||
#define COMPACT_COMPLETE 3
|
||||
|
||||
#ifdef CONFIG_COMPACTION
|
||||
extern int sysctl_compact_memory;
|
||||
extern int sysctl_compaction_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *length, loff_t *ppos);
|
||||
extern int sysctl_extfrag_threshold;
|
||||
extern int sysctl_extfrag_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *length, loff_t *ppos);
|
||||
|
||||
extern int fragmentation_index(struct zone *zone, unsigned int order);
|
||||
extern unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *mask);
|
||||
|
||||
/* Do not skip compaction more than 64 times */
|
||||
#define COMPACT_MAX_DEFER_SHIFT 6
|
||||
|
||||
/*
|
||||
* Compaction is deferred when compaction fails to result in a page
|
||||
* allocation success. 1 << compact_defer_limit compactions are skipped up
|
||||
* to a limit of 1 << COMPACT_MAX_DEFER_SHIFT
|
||||
*/
|
||||
static inline void defer_compaction(struct zone *zone)
|
||||
{
|
||||
zone->compact_considered = 0;
|
||||
zone->compact_defer_shift++;
|
||||
|
||||
if (zone->compact_defer_shift > COMPACT_MAX_DEFER_SHIFT)
|
||||
zone->compact_defer_shift = COMPACT_MAX_DEFER_SHIFT;
|
||||
}
|
||||
|
||||
/* Returns true if compaction should be skipped this time */
|
||||
static inline bool compaction_deferred(struct zone *zone)
|
||||
{
|
||||
unsigned long defer_limit = 1UL << zone->compact_defer_shift;
|
||||
|
||||
/* Avoid possible overflow */
|
||||
if (++zone->compact_considered > defer_limit)
|
||||
zone->compact_considered = defer_limit;
|
||||
|
||||
return zone->compact_considered < (1UL << zone->compact_defer_shift);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *nodemask)
|
||||
{
|
||||
return COMPACT_CONTINUE;
|
||||
}
|
||||
|
||||
static inline void defer_compaction(struct zone *zone)
|
||||
{
|
||||
}
|
||||
|
||||
static inline bool compaction_deferred(struct zone *zone)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_COMPACTION */
|
||||
|
||||
#if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
|
||||
extern int compaction_register_node(struct node *node);
|
||||
extern void compaction_unregister_node(struct node *node);
|
||||
|
||||
#else
|
||||
|
||||
static inline int compaction_register_node(struct node *node)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void compaction_unregister_node(struct node *node)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_COMPACTION && CONFIG_SYSFS && CONFIG_NUMA */
|
||||
|
||||
#endif /* _LINUX_COMPACTION_H */
|
||||
|
|
@ -356,5 +356,9 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,
|
|||
asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
|
||||
int flags, int mode);
|
||||
|
||||
extern ssize_t compat_rw_copy_check_uvector(int type,
|
||||
const struct compat_iovec __user *uvector, unsigned long nr_segs,
|
||||
unsigned long fast_segs, struct iovec *fast_pointer,
|
||||
struct iovec **ret_pointer);
|
||||
#endif /* CONFIG_COMPAT */
|
||||
#endif /* _LINUX_COMPAT_H */
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ extern unsigned long wait_for_completion_timeout(struct completion *x,
|
|||
unsigned long timeout);
|
||||
extern unsigned long wait_for_completion_interruptible_timeout(
|
||||
struct completion *x, unsigned long timeout);
|
||||
extern unsigned long wait_for_completion_killable_timeout(
|
||||
struct completion *x, unsigned long timeout);
|
||||
extern bool try_wait_for_completion(struct completion *x);
|
||||
extern bool completion_done(struct completion *x);
|
||||
|
||||
|
|
|
|||
314
include/linux/cper.h
Normal file
314
include/linux/cper.h
Normal file
|
|
@ -0,0 +1,314 @@
|
|||
/*
|
||||
* UEFI Common Platform Error Record
|
||||
*
|
||||
* Copyright (C) 2010, Intel Corp.
|
||||
* Author: Huang Ying <ying.huang@intel.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version
|
||||
* 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef LINUX_CPER_H
|
||||
#define LINUX_CPER_H
|
||||
|
||||
#include <linux/uuid.h>
|
||||
|
||||
/* CPER record signature and the size */
|
||||
#define CPER_SIG_RECORD "CPER"
|
||||
#define CPER_SIG_SIZE 4
|
||||
/* Used in signature_end field in struct cper_record_header */
|
||||
#define CPER_SIG_END 0xffffffff
|
||||
|
||||
/*
|
||||
* CPER record header revision, used in revision field in struct
|
||||
* cper_record_header
|
||||
*/
|
||||
#define CPER_RECORD_REV 0x0100
|
||||
|
||||
/*
|
||||
* Severity difinition for error_severity in struct cper_record_header
|
||||
* and section_severity in struct cper_section_descriptor
|
||||
*/
|
||||
#define CPER_SER_RECOVERABLE 0x0
|
||||
#define CPER_SER_FATAL 0x1
|
||||
#define CPER_SER_CORRECTED 0x2
|
||||
#define CPER_SER_INFORMATIONAL 0x3
|
||||
|
||||
/*
|
||||
* Validation bits difinition for validation_bits in struct
|
||||
* cper_record_header. If set, corresponding fields in struct
|
||||
* cper_record_header contain valid information.
|
||||
*
|
||||
* corresponds platform_id
|
||||
*/
|
||||
#define CPER_VALID_PLATFORM_ID 0x0001
|
||||
/* corresponds timestamp */
|
||||
#define CPER_VALID_TIMESTAMP 0x0002
|
||||
/* corresponds partition_id */
|
||||
#define CPER_VALID_PARTITION_ID 0x0004
|
||||
|
||||
/*
|
||||
* Notification type used to generate error record, used in
|
||||
* notification_type in struct cper_record_header
|
||||
*
|
||||
* Corrected Machine Check
|
||||
*/
|
||||
#define CPER_NOTIFY_CMC \
|
||||
UUID_LE(0x2DCE8BB1, 0xBDD7, 0x450e, 0xB9, 0xAD, 0x9C, 0xF4, \
|
||||
0xEB, 0xD4, 0xF8, 0x90)
|
||||
/* Corrected Platform Error */
|
||||
#define CPER_NOTIFY_CPE \
|
||||
UUID_LE(0x4E292F96, 0xD843, 0x4a55, 0xA8, 0xC2, 0xD4, 0x81, \
|
||||
0xF2, 0x7E, 0xBE, 0xEE)
|
||||
/* Machine Check Exception */
|
||||
#define CPER_NOTIFY_MCE \
|
||||
UUID_LE(0xE8F56FFE, 0x919C, 0x4cc5, 0xBA, 0x88, 0x65, 0xAB, \
|
||||
0xE1, 0x49, 0x13, 0xBB)
|
||||
/* PCI Express Error */
|
||||
#define CPER_NOTIFY_PCIE \
|
||||
UUID_LE(0xCF93C01F, 0x1A16, 0x4dfc, 0xB8, 0xBC, 0x9C, 0x4D, \
|
||||
0xAF, 0x67, 0xC1, 0x04)
|
||||
/* INIT Record (for IPF) */
|
||||
#define CPER_NOTIFY_INIT \
|
||||
UUID_LE(0xCC5263E8, 0x9308, 0x454a, 0x89, 0xD0, 0x34, 0x0B, \
|
||||
0xD3, 0x9B, 0xC9, 0x8E)
|
||||
/* Non-Maskable Interrupt */
|
||||
#define CPER_NOTIFY_NMI \
|
||||
UUID_LE(0x5BAD89FF, 0xB7E6, 0x42c9, 0x81, 0x4A, 0xCF, 0x24, \
|
||||
0x85, 0xD6, 0xE9, 0x8A)
|
||||
/* BOOT Error Record */
|
||||
#define CPER_NOTIFY_BOOT \
|
||||
UUID_LE(0x3D61A466, 0xAB40, 0x409a, 0xA6, 0x98, 0xF3, 0x62, \
|
||||
0xD4, 0x64, 0xB3, 0x8F)
|
||||
/* DMA Remapping Error */
|
||||
#define CPER_NOTIFY_DMAR \
|
||||
UUID_LE(0x667DD791, 0xC6B3, 0x4c27, 0x8A, 0x6B, 0x0F, 0x8E, \
|
||||
0x72, 0x2D, 0xEB, 0x41)
|
||||
|
||||
/*
|
||||
* Flags bits definitions for flags in struct cper_record_header
|
||||
* If set, the error has been recovered
|
||||
*/
|
||||
#define CPER_HW_ERROR_FLAGS_RECOVERED 0x1
|
||||
/* If set, the error is for previous boot */
|
||||
#define CPER_HW_ERROR_FLAGS_PREVERR 0x2
|
||||
/* If set, the error is injected for testing */
|
||||
#define CPER_HW_ERROR_FLAGS_SIMULATED 0x4
|
||||
|
||||
/*
|
||||
* CPER section header revision, used in revision field in struct
|
||||
* cper_section_descriptor
|
||||
*/
|
||||
#define CPER_SEC_REV 0x0100
|
||||
|
||||
/*
|
||||
* Validation bits difinition for validation_bits in struct
|
||||
* cper_section_descriptor. If set, corresponding fields in struct
|
||||
* cper_section_descriptor contain valid information.
|
||||
*
|
||||
* corresponds fru_id
|
||||
*/
|
||||
#define CPER_SEC_VALID_FRU_ID 0x1
|
||||
/* corresponds fru_text */
|
||||
#define CPER_SEC_VALID_FRU_TEXT 0x2
|
||||
|
||||
/*
|
||||
* Flags bits definitions for flags in struct cper_section_descriptor
|
||||
*
|
||||
* If set, the section is associated with the error condition
|
||||
* directly, and should be focused on
|
||||
*/
|
||||
#define CPER_SEC_PRIMARY 0x0001
|
||||
/*
|
||||
* If set, the error was not contained within the processor or memory
|
||||
* hierarchy and the error may have propagated to persistent storage
|
||||
* or network
|
||||
*/
|
||||
#define CPER_SEC_CONTAINMENT_WARNING 0x0002
|
||||
/* If set, the component must be re-initialized or re-enabled prior to use */
|
||||
#define CPER_SEC_RESET 0x0004
|
||||
/* If set, Linux may choose to discontinue use of the resource */
|
||||
#define CPER_SEC_ERROR_THRESHOLD_EXCEEDED 0x0008
|
||||
/*
|
||||
* If set, resource could not be queried for error information due to
|
||||
* conflicts with other system software or resources. Some fields of
|
||||
* the section will be invalid
|
||||
*/
|
||||
#define CPER_SEC_RESOURCE_NOT_ACCESSIBLE 0x0010
|
||||
/*
|
||||
* If set, action has been taken to ensure error containment (such as
|
||||
* poisoning data), but the error has not been fully corrected and the
|
||||
* data has not been consumed. Linux may choose to take further
|
||||
* corrective action before the data is consumed
|
||||
*/
|
||||
#define CPER_SEC_LATENT_ERROR 0x0020
|
||||
|
||||
/*
|
||||
* Section type definitions, used in section_type field in struct
|
||||
* cper_section_descriptor
|
||||
*
|
||||
* Processor Generic
|
||||
*/
|
||||
#define CPER_SEC_PROC_GENERIC \
|
||||
UUID_LE(0x9876CCAD, 0x47B4, 0x4bdb, 0xB6, 0x5E, 0x16, 0xF1, \
|
||||
0x93, 0xC4, 0xF3, 0xDB)
|
||||
/* Processor Specific: X86/X86_64 */
|
||||
#define CPER_SEC_PROC_IA \
|
||||
UUID_LE(0xDC3EA0B0, 0xA144, 0x4797, 0xB9, 0x5B, 0x53, 0xFA, \
|
||||
0x24, 0x2B, 0x6E, 0x1D)
|
||||
/* Processor Specific: IA64 */
|
||||
#define CPER_SEC_PROC_IPF \
|
||||
UUID_LE(0xE429FAF1, 0x3CB7, 0x11D4, 0x0B, 0xCA, 0x07, 0x00, \
|
||||
0x80, 0xC7, 0x3C, 0x88, 0x81)
|
||||
/* Platform Memory */
|
||||
#define CPER_SEC_PLATFORM_MEM \
|
||||
UUID_LE(0xA5BC1114, 0x6F64, 0x4EDE, 0xB8, 0x63, 0x3E, 0x83, \
|
||||
0xED, 0x7C, 0x83, 0xB1)
|
||||
#define CPER_SEC_PCIE \
|
||||
UUID_LE(0xD995E954, 0xBBC1, 0x430F, 0xAD, 0x91, 0xB4, 0x4D, \
|
||||
0xCB, 0x3C, 0x6F, 0x35)
|
||||
/* Firmware Error Record Reference */
|
||||
#define CPER_SEC_FW_ERR_REC_REF \
|
||||
UUID_LE(0x81212A96, 0x09ED, 0x4996, 0x94, 0x71, 0x8D, 0x72, \
|
||||
0x9C, 0x8E, 0x69, 0xED)
|
||||
/* PCI/PCI-X Bus */
|
||||
#define CPER_SEC_PCI_X_BUS \
|
||||
UUID_LE(0xC5753963, 0x3B84, 0x4095, 0xBF, 0x78, 0xED, 0xDA, \
|
||||
0xD3, 0xF9, 0xC9, 0xDD)
|
||||
/* PCI Component/Device */
|
||||
#define CPER_SEC_PCI_DEV \
|
||||
UUID_LE(0xEB5E4685, 0xCA66, 0x4769, 0xB6, 0xA2, 0x26, 0x06, \
|
||||
0x8B, 0x00, 0x13, 0x26)
|
||||
#define CPER_SEC_DMAR_GENERIC \
|
||||
UUID_LE(0x5B51FEF7, 0xC79D, 0x4434, 0x8F, 0x1B, 0xAA, 0x62, \
|
||||
0xDE, 0x3E, 0x2C, 0x64)
|
||||
/* Intel VT for Directed I/O specific DMAr */
|
||||
#define CPER_SEC_DMAR_VT \
|
||||
UUID_LE(0x71761D37, 0x32B2, 0x45cd, 0xA7, 0xD0, 0xB0, 0xFE, \
|
||||
0xDD, 0x93, 0xE8, 0xCF)
|
||||
/* IOMMU specific DMAr */
|
||||
#define CPER_SEC_DMAR_IOMMU \
|
||||
UUID_LE(0x036F84E1, 0x7F37, 0x428c, 0xA7, 0x9E, 0x57, 0x5F, \
|
||||
0xDF, 0xAA, 0x84, 0xEC)
|
||||
|
||||
/*
|
||||
* All tables and structs must be byte-packed to match CPER
|
||||
* specification, since the tables are provided by the system BIOS
|
||||
*/
|
||||
#pragma pack(1)
|
||||
|
||||
struct cper_record_header {
|
||||
char signature[CPER_SIG_SIZE]; /* must be CPER_SIG_RECORD */
|
||||
__u16 revision; /* must be CPER_RECORD_REV */
|
||||
__u32 signature_end; /* must be CPER_SIG_END */
|
||||
__u16 section_count;
|
||||
__u32 error_severity;
|
||||
__u32 validation_bits;
|
||||
__u32 record_length;
|
||||
__u64 timestamp;
|
||||
uuid_le platform_id;
|
||||
uuid_le partition_id;
|
||||
uuid_le creator_id;
|
||||
uuid_le notification_type;
|
||||
__u64 record_id;
|
||||
__u32 flags;
|
||||
__u64 persistence_information;
|
||||
__u8 reserved[12]; /* must be zero */
|
||||
};
|
||||
|
||||
struct cper_section_descriptor {
|
||||
__u32 section_offset; /* Offset in bytes of the
|
||||
* section body from the base
|
||||
* of the record header */
|
||||
__u32 section_length;
|
||||
__u16 revision; /* must be CPER_RECORD_REV */
|
||||
__u8 validation_bits;
|
||||
__u8 reserved; /* must be zero */
|
||||
__u32 flags;
|
||||
uuid_le section_type;
|
||||
uuid_le fru_id;
|
||||
__u32 section_severity;
|
||||
__u8 fru_text[20];
|
||||
};
|
||||
|
||||
/* Generic Processor Error Section */
|
||||
struct cper_sec_proc_generic {
|
||||
__u64 validation_bits;
|
||||
__u8 proc_type;
|
||||
__u8 proc_isa;
|
||||
__u8 proc_error_type;
|
||||
__u8 operation;
|
||||
__u8 flags;
|
||||
__u8 level;
|
||||
__u16 reserved;
|
||||
__u64 cpu_version;
|
||||
char cpu_brand[128];
|
||||
__u64 proc_id;
|
||||
__u64 target_addr;
|
||||
__u64 requestor_id;
|
||||
__u64 responder_id;
|
||||
__u64 ip;
|
||||
};
|
||||
|
||||
/* IA32/X64 Processor Error Section */
|
||||
struct cper_sec_proc_ia {
|
||||
__u64 validation_bits;
|
||||
__u8 lapic_id;
|
||||
__u8 cpuid[48];
|
||||
};
|
||||
|
||||
/* IA32/X64 Processor Error Infomation Structure */
|
||||
struct cper_ia_err_info {
|
||||
uuid_le err_type;
|
||||
__u64 validation_bits;
|
||||
__u64 check_info;
|
||||
__u64 target_id;
|
||||
__u64 requestor_id;
|
||||
__u64 responder_id;
|
||||
__u64 ip;
|
||||
};
|
||||
|
||||
/* IA32/X64 Processor Context Information Structure */
|
||||
struct cper_ia_proc_ctx {
|
||||
__u16 reg_ctx_type;
|
||||
__u16 reg_arr_size;
|
||||
__u32 msr_addr;
|
||||
__u64 mm_reg_addr;
|
||||
};
|
||||
|
||||
/* Memory Error Section */
|
||||
struct cper_sec_mem_err {
|
||||
__u64 validation_bits;
|
||||
__u64 error_status;
|
||||
__u64 physical_addr;
|
||||
__u64 physical_addr_mask;
|
||||
__u16 node;
|
||||
__u16 card;
|
||||
__u16 module;
|
||||
__u16 bank;
|
||||
__u16 device;
|
||||
__u16 row;
|
||||
__u16 column;
|
||||
__u16 bit_pos;
|
||||
__u64 requestor_id;
|
||||
__u64 responder_id;
|
||||
__u64 target_id;
|
||||
__u8 error_type;
|
||||
};
|
||||
|
||||
/* Reset to default packing */
|
||||
#pragma pack()
|
||||
|
||||
u64 cper_next_record_id(void);
|
||||
|
||||
#endif
|
||||
|
|
@ -125,6 +125,7 @@ struct cpuidle_driver {
|
|||
#ifdef CONFIG_CPU_IDLE
|
||||
|
||||
extern int cpuidle_register_driver(struct cpuidle_driver *drv);
|
||||
struct cpuidle_driver *cpuidle_get_driver(void);
|
||||
extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
|
||||
extern int cpuidle_register_device(struct cpuidle_device *dev);
|
||||
extern void cpuidle_unregister_device(struct cpuidle_device *dev);
|
||||
|
|
@ -137,16 +138,17 @@ extern void cpuidle_disable_device(struct cpuidle_device *dev);
|
|||
#else
|
||||
|
||||
static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
|
||||
{return 0;}
|
||||
{return -ENODEV; }
|
||||
static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
|
||||
static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
|
||||
static inline int cpuidle_register_device(struct cpuidle_device *dev)
|
||||
{return 0;}
|
||||
{return -ENODEV; }
|
||||
static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { }
|
||||
|
||||
static inline void cpuidle_pause_and_lock(void) { }
|
||||
static inline void cpuidle_resume_and_unlock(void) { }
|
||||
static inline int cpuidle_enable_device(struct cpuidle_device *dev)
|
||||
{return 0;}
|
||||
{return -ENODEV; }
|
||||
static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ extern void cpuset_task_status_allowed(struct seq_file *m,
|
|||
struct task_struct *task);
|
||||
|
||||
extern int cpuset_mem_spread_node(void);
|
||||
extern int cpuset_slab_spread_node(void);
|
||||
|
||||
static inline int cpuset_do_page_mem_spread(void)
|
||||
{
|
||||
|
|
@ -86,9 +87,44 @@ extern void rebuild_sched_domains(void);
|
|||
|
||||
extern void cpuset_print_task_mems_allowed(struct task_struct *p);
|
||||
|
||||
/*
|
||||
* reading current mems_allowed and mempolicy in the fastpath must protected
|
||||
* by get_mems_allowed()
|
||||
*/
|
||||
static inline void get_mems_allowed(void)
|
||||
{
|
||||
current->mems_allowed_change_disable++;
|
||||
|
||||
/*
|
||||
* ensure that reading mems_allowed and mempolicy happens after the
|
||||
* update of ->mems_allowed_change_disable.
|
||||
*
|
||||
* the write-side task finds ->mems_allowed_change_disable is not 0,
|
||||
* and knows the read-side task is reading mems_allowed or mempolicy,
|
||||
* so it will clear old bits lazily.
|
||||
*/
|
||||
smp_mb();
|
||||
}
|
||||
|
||||
static inline void put_mems_allowed(void)
|
||||
{
|
||||
/*
|
||||
* ensure that reading mems_allowed and mempolicy before reducing
|
||||
* mems_allowed_change_disable.
|
||||
*
|
||||
* the write-side task will know that the read-side task is still
|
||||
* reading mems_allowed or mempolicy, don't clears old bits in the
|
||||
* nodemask.
|
||||
*/
|
||||
smp_mb();
|
||||
--ACCESS_ONCE(current->mems_allowed_change_disable);
|
||||
}
|
||||
|
||||
static inline void set_mems_allowed(nodemask_t nodemask)
|
||||
{
|
||||
task_lock(current);
|
||||
current->mems_allowed = nodemask;
|
||||
task_unlock(current);
|
||||
}
|
||||
|
||||
#else /* !CONFIG_CPUSETS */
|
||||
|
|
@ -159,6 +195,11 @@ static inline int cpuset_mem_spread_node(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int cpuset_slab_spread_node(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int cpuset_do_page_mem_spread(void)
|
||||
{
|
||||
return 0;
|
||||
|
|
@ -187,6 +228,14 @@ static inline void set_mems_allowed(nodemask_t nodemask)
|
|||
{
|
||||
}
|
||||
|
||||
static inline void get_mems_allowed(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void put_mems_allowed(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_CPUSETS */
|
||||
|
||||
#endif /* _LINUX_CPUSET_H */
|
||||
|
|
|
|||
|
|
@ -156,7 +156,6 @@ extern int copy_creds(struct task_struct *, unsigned long);
|
|||
extern struct cred *cred_alloc_blank(void);
|
||||
extern struct cred *prepare_creds(void);
|
||||
extern struct cred *prepare_exec_creds(void);
|
||||
extern struct cred *prepare_usermodehelper_creds(void);
|
||||
extern int commit_creds(struct cred *);
|
||||
extern void abort_creds(struct cred *);
|
||||
extern const struct cred *override_creds(const struct cred *);
|
||||
|
|
|
|||
|
|
@ -99,13 +99,7 @@
|
|||
* as arm where pointers are 32-bit aligned but there are data types such as
|
||||
* u64 which require 64-bit alignment.
|
||||
*/
|
||||
#if defined(ARCH_KMALLOC_MINALIGN)
|
||||
#define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN
|
||||
#elif defined(ARCH_SLAB_MINALIGN)
|
||||
#define CRYPTO_MINALIGN ARCH_SLAB_MINALIGN
|
||||
#else
|
||||
#define CRYPTO_MINALIGN __alignof__(unsigned long long)
|
||||
#endif
|
||||
|
||||
#define CRYPTO_MINALIGN_ATTR __attribute__ ((__aligned__(CRYPTO_MINALIGN)))
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ struct dentry *debugfs_create_x16(const char *name, mode_t mode,
|
|||
struct dentry *parent, u16 *value);
|
||||
struct dentry *debugfs_create_x32(const char *name, mode_t mode,
|
||||
struct dentry *parent, u32 *value);
|
||||
struct dentry *debugfs_create_x64(const char *name, mode_t mode,
|
||||
struct dentry *parent, u64 *value);
|
||||
struct dentry *debugfs_create_size_t(const char *name, mode_t mode,
|
||||
struct dentry *parent, size_t *value);
|
||||
struct dentry *debugfs_create_bool(const char *name, mode_t mode,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/device.h>
|
||||
|
||||
|
|
@ -34,6 +33,7 @@ struct class;
|
|||
struct class_private;
|
||||
struct bus_type;
|
||||
struct bus_type_private;
|
||||
struct device_node;
|
||||
|
||||
struct bus_attribute {
|
||||
struct attribute attr;
|
||||
|
|
@ -128,6 +128,10 @@ struct device_driver {
|
|||
|
||||
bool suppress_bind_attrs; /* disables bind/unbind via sysfs */
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
const struct of_device_id *of_match_table;
|
||||
#endif
|
||||
|
||||
int (*probe) (struct device *dev);
|
||||
int (*remove) (struct device *dev);
|
||||
void (*shutdown) (struct device *dev);
|
||||
|
|
@ -203,6 +207,9 @@ struct class {
|
|||
int (*suspend)(struct device *dev, pm_message_t state);
|
||||
int (*resume)(struct device *dev);
|
||||
|
||||
const struct kobj_ns_type_operations *ns_type;
|
||||
const void *(*namespace)(struct device *dev);
|
||||
|
||||
const struct dev_pm_ops *pm;
|
||||
|
||||
struct class_private *p;
|
||||
|
|
@ -404,7 +411,7 @@ struct device {
|
|||
const char *init_name; /* initial name of the device */
|
||||
struct device_type *type;
|
||||
|
||||
struct semaphore sem; /* semaphore to synchronize calls to
|
||||
struct mutex mutex; /* mutex to synchronize calls to
|
||||
* its driver.
|
||||
*/
|
||||
|
||||
|
|
@ -433,6 +440,9 @@ struct device {
|
|||
override */
|
||||
/* arch specific additions */
|
||||
struct dev_archdata archdata;
|
||||
#ifdef CONFIG_OF
|
||||
struct device_node *of_node;
|
||||
#endif
|
||||
|
||||
dev_t devt; /* dev_t, creates the sysfs "dev" */
|
||||
|
||||
|
|
@ -514,17 +524,17 @@ static inline bool device_async_suspend_enabled(struct device *dev)
|
|||
|
||||
static inline void device_lock(struct device *dev)
|
||||
{
|
||||
down(&dev->sem);
|
||||
mutex_lock(&dev->mutex);
|
||||
}
|
||||
|
||||
static inline int device_trylock(struct device *dev)
|
||||
{
|
||||
return down_trylock(&dev->sem);
|
||||
return mutex_trylock(&dev->mutex);
|
||||
}
|
||||
|
||||
static inline void device_unlock(struct device *dev)
|
||||
{
|
||||
up(&dev->sem);
|
||||
mutex_unlock(&dev->mutex);
|
||||
}
|
||||
|
||||
void driver_init(void);
|
||||
|
|
|
|||
|
|
@ -40,16 +40,6 @@ struct dma_map_ops {
|
|||
void (*sync_single_for_device)(struct device *dev,
|
||||
dma_addr_t dma_handle, size_t size,
|
||||
enum dma_data_direction dir);
|
||||
void (*sync_single_range_for_cpu)(struct device *dev,
|
||||
dma_addr_t dma_handle,
|
||||
unsigned long offset,
|
||||
size_t size,
|
||||
enum dma_data_direction dir);
|
||||
void (*sync_single_range_for_device)(struct device *dev,
|
||||
dma_addr_t dma_handle,
|
||||
unsigned long offset,
|
||||
size_t size,
|
||||
enum dma_data_direction dir);
|
||||
void (*sync_sg_for_cpu)(struct device *dev,
|
||||
struct scatterlist *sg, int nents,
|
||||
enum dma_data_direction dir);
|
||||
|
|
@ -105,21 +95,6 @@ static inline int is_device_dma_capable(struct device *dev)
|
|||
#include <asm-generic/dma-mapping-broken.h>
|
||||
#endif
|
||||
|
||||
/* for backwards compatibility, removed soon */
|
||||
static inline void __deprecated dma_sync_single(struct device *dev,
|
||||
dma_addr_t addr, size_t size,
|
||||
enum dma_data_direction dir)
|
||||
{
|
||||
dma_sync_single_for_cpu(dev, addr, size, dir);
|
||||
}
|
||||
|
||||
static inline void __deprecated dma_sync_sg(struct device *dev,
|
||||
struct scatterlist *sg, int nelems,
|
||||
enum dma_data_direction dir)
|
||||
{
|
||||
dma_sync_sg_for_cpu(dev, sg, nelems, dir);
|
||||
}
|
||||
|
||||
static inline u64 dma_get_mask(struct device *dev)
|
||||
{
|
||||
if (dev && dev->dma_mask && *dev->dma_mask)
|
||||
|
|
|
|||
|
|
@ -40,11 +40,13 @@ typedef s32 dma_cookie_t;
|
|||
* enum dma_status - DMA transaction status
|
||||
* @DMA_SUCCESS: transaction completed successfully
|
||||
* @DMA_IN_PROGRESS: transaction not yet processed
|
||||
* @DMA_PAUSED: transaction is paused
|
||||
* @DMA_ERROR: transaction failed
|
||||
*/
|
||||
enum dma_status {
|
||||
DMA_SUCCESS,
|
||||
DMA_IN_PROGRESS,
|
||||
DMA_PAUSED,
|
||||
DMA_ERROR,
|
||||
};
|
||||
|
||||
|
|
@ -106,6 +108,19 @@ enum dma_ctrl_flags {
|
|||
DMA_PREP_FENCE = (1 << 9),
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dma_ctrl_cmd - DMA operations that can optionally be exercised
|
||||
* on a running channel.
|
||||
* @DMA_TERMINATE_ALL: terminate all ongoing transfers
|
||||
* @DMA_PAUSE: pause ongoing transfers
|
||||
* @DMA_RESUME: resume paused transfer
|
||||
*/
|
||||
enum dma_ctrl_cmd {
|
||||
DMA_TERMINATE_ALL,
|
||||
DMA_PAUSE,
|
||||
DMA_RESUME,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum sum_check_bits - bit position of pq_check_flags
|
||||
*/
|
||||
|
|
@ -230,9 +245,84 @@ struct dma_async_tx_descriptor {
|
|||
dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
|
||||
dma_async_tx_callback callback;
|
||||
void *callback_param;
|
||||
#ifndef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH
|
||||
struct dma_async_tx_descriptor *next;
|
||||
struct dma_async_tx_descriptor *parent;
|
||||
spinlock_t lock;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH
|
||||
static inline void txd_lock(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
}
|
||||
static inline void txd_unlock(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
}
|
||||
static inline void txd_chain(struct dma_async_tx_descriptor *txd, struct dma_async_tx_descriptor *next)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
static inline void txd_clear_parent(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
}
|
||||
static inline void txd_clear_next(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
}
|
||||
static inline struct dma_async_tx_descriptor *txd_next(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline struct dma_async_tx_descriptor *txd_parent(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void txd_lock(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
spin_lock_bh(&txd->lock);
|
||||
}
|
||||
static inline void txd_unlock(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
spin_unlock_bh(&txd->lock);
|
||||
}
|
||||
static inline void txd_chain(struct dma_async_tx_descriptor *txd, struct dma_async_tx_descriptor *next)
|
||||
{
|
||||
txd->next = next;
|
||||
next->parent = txd;
|
||||
}
|
||||
static inline void txd_clear_parent(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
txd->parent = NULL;
|
||||
}
|
||||
static inline void txd_clear_next(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
txd->next = NULL;
|
||||
}
|
||||
static inline struct dma_async_tx_descriptor *txd_parent(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
return txd->parent;
|
||||
}
|
||||
static inline struct dma_async_tx_descriptor *txd_next(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
return txd->next;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct dma_tx_state - filled in to report the status of
|
||||
* a transfer.
|
||||
* @last: last completed DMA cookie
|
||||
* @used: last issued DMA cookie (i.e. the one in progress)
|
||||
* @residue: the remaining number of bytes left to transmit
|
||||
* on the selected transfer for states DMA_IN_PROGRESS and
|
||||
* DMA_PAUSED if this is implemented in the driver, else 0
|
||||
*/
|
||||
struct dma_tx_state {
|
||||
dma_cookie_t last;
|
||||
dma_cookie_t used;
|
||||
u32 residue;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -261,8 +351,12 @@ struct dma_async_tx_descriptor {
|
|||
* @device_prep_dma_memset: prepares a memset operation
|
||||
* @device_prep_dma_interrupt: prepares an end of chain interrupt operation
|
||||
* @device_prep_slave_sg: prepares a slave dma operation
|
||||
* @device_terminate_all: terminate all pending operations
|
||||
* @device_is_tx_complete: poll for transaction completion
|
||||
* @device_control: manipulate all pending operations on a channel, returns
|
||||
* zero or error code
|
||||
* @device_tx_status: poll for transaction completion, the optional
|
||||
* txstate parameter can be supplied with a pointer to get a
|
||||
* struct with auxilary transfer status information, otherwise the call
|
||||
* will just return a simple status code
|
||||
* @device_issue_pending: push pending transactions to hardware
|
||||
*/
|
||||
struct dma_device {
|
||||
|
|
@ -313,11 +407,12 @@ struct dma_device {
|
|||
struct dma_chan *chan, struct scatterlist *sgl,
|
||||
unsigned int sg_len, enum dma_data_direction direction,
|
||||
unsigned long flags);
|
||||
void (*device_terminate_all)(struct dma_chan *chan);
|
||||
int (*device_control)(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
|
||||
unsigned long arg);
|
||||
|
||||
enum dma_status (*device_is_tx_complete)(struct dma_chan *chan,
|
||||
dma_cookie_t cookie, dma_cookie_t *last,
|
||||
dma_cookie_t *used);
|
||||
enum dma_status (*device_tx_status)(struct dma_chan *chan,
|
||||
dma_cookie_t cookie,
|
||||
struct dma_tx_state *txstate);
|
||||
void (*device_issue_pending)(struct dma_chan *chan);
|
||||
};
|
||||
|
||||
|
|
@ -558,7 +653,15 @@ static inline void dma_async_issue_pending(struct dma_chan *chan)
|
|||
static inline enum dma_status dma_async_is_tx_complete(struct dma_chan *chan,
|
||||
dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used)
|
||||
{
|
||||
return chan->device->device_is_tx_complete(chan, cookie, last, used);
|
||||
struct dma_tx_state state;
|
||||
enum dma_status status;
|
||||
|
||||
status = chan->device->device_tx_status(chan, cookie, &state);
|
||||
if (last)
|
||||
*last = state.last;
|
||||
if (used)
|
||||
*used = state.used;
|
||||
return status;
|
||||
}
|
||||
|
||||
#define dma_async_memcpy_complete(chan, cookie, last, used)\
|
||||
|
|
@ -586,6 +689,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
|
|||
return DMA_IN_PROGRESS;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used, u32 residue)
|
||||
{
|
||||
if (st) {
|
||||
st->last = last;
|
||||
st->used = used;
|
||||
st->residue = residue;
|
||||
}
|
||||
}
|
||||
|
||||
enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
|
||||
#ifdef CONFIG_DMA_ENGINE
|
||||
enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
|
||||
|
|
|
|||
|
|
@ -109,6 +109,15 @@ typedef struct fs_disk_quota {
|
|||
#define FS_DQ_RTBWARNS (1<<11)
|
||||
#define FS_DQ_WARNS_MASK (FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS)
|
||||
|
||||
/*
|
||||
* Accounting values. These can only be set for filesystem with
|
||||
* non-transactional quotas that require quotacheck(8) in userspace.
|
||||
*/
|
||||
#define FS_DQ_BCOUNT (1<<12)
|
||||
#define FS_DQ_ICOUNT (1<<13)
|
||||
#define FS_DQ_RTBCOUNT (1<<14)
|
||||
#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)
|
||||
|
||||
/*
|
||||
* Various flags related to quotactl(2). Only relevant to XFS filesystems.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@
|
|||
|
||||
|
||||
extern const char *drbd_buildtag(void);
|
||||
#define REL_VERSION "8.3.7"
|
||||
#define REL_VERSION "8.3.8rc1"
|
||||
#define API_VERSION 88
|
||||
#define PRO_VERSION_MIN 86
|
||||
#define PRO_VERSION_MAX 92
|
||||
#define PRO_VERSION_MAX 94
|
||||
|
||||
|
||||
enum drbd_io_error_p {
|
||||
|
|
@ -139,6 +139,7 @@ enum drbd_ret_codes {
|
|||
ERR_DATA_NOT_CURRENT = 150,
|
||||
ERR_CONNECTED = 151, /* DRBD 8.3 only */
|
||||
ERR_PERM = 152,
|
||||
ERR_NEED_APV_93 = 153,
|
||||
|
||||
/* insert new ones above this line */
|
||||
AFTER_LAST_ERR_CODE
|
||||
|
|
|
|||
|
|
@ -133,5 +133,21 @@
|
|||
#define DRBD_MAX_BIO_BVECS_MAX 128
|
||||
#define DRBD_MAX_BIO_BVECS_DEF 0
|
||||
|
||||
#define DRBD_DP_VOLUME_MIN 4
|
||||
#define DRBD_DP_VOLUME_MAX 1048576
|
||||
#define DRBD_DP_VOLUME_DEF 16384
|
||||
|
||||
#define DRBD_DP_INTERVAL_MIN 1
|
||||
#define DRBD_DP_INTERVAL_MAX 600
|
||||
#define DRBD_DP_INTERVAL_DEF 5
|
||||
|
||||
#define DRBD_RS_THROTTLE_TH_MIN 1
|
||||
#define DRBD_RS_THROTTLE_TH_MAX 600
|
||||
#define DRBD_RS_THROTTLE_TH_DEF 20
|
||||
|
||||
#define DRBD_RS_HOLD_OFF_TH_MIN 1
|
||||
#define DRBD_RS_HOLD_OFF_TH_MAX 6000
|
||||
#define DRBD_RS_HOLD_OFF_TH_DEF 100
|
||||
|
||||
#undef RANGE
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -71,12 +71,17 @@ NL_PACKET(disconnect, 6, )
|
|||
NL_PACKET(resize, 7,
|
||||
NL_INT64( 29, T_MAY_IGNORE, resize_size)
|
||||
NL_BIT( 68, T_MAY_IGNORE, resize_force)
|
||||
NL_BIT( 69, T_MANDATORY, no_resync)
|
||||
)
|
||||
|
||||
NL_PACKET(syncer_conf, 8,
|
||||
NL_INTEGER( 30, T_MAY_IGNORE, rate)
|
||||
NL_INTEGER( 31, T_MAY_IGNORE, after)
|
||||
NL_INTEGER( 32, T_MAY_IGNORE, al_extents)
|
||||
NL_INTEGER( 71, T_MAY_IGNORE, dp_volume)
|
||||
NL_INTEGER( 72, T_MAY_IGNORE, dp_interval)
|
||||
NL_INTEGER( 73, T_MAY_IGNORE, throttle_th)
|
||||
NL_INTEGER( 74, T_MAY_IGNORE, hold_off_th)
|
||||
NL_STRING( 52, T_MAY_IGNORE, verify_alg, SHARED_SECRET_MAX)
|
||||
NL_STRING( 51, T_MAY_IGNORE, cpu_mask, 32)
|
||||
NL_STRING( 64, T_MAY_IGNORE, csums_alg, SHARED_SECRET_MAX)
|
||||
|
|
|
|||
8
include/linux/ds2782_battery.h
Normal file
8
include/linux/ds2782_battery.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef __LINUX_DS2782_BATTERY_H
|
||||
#define __LINUX_DS2782_BATTERY_H
|
||||
|
||||
struct ds278x_platform_data {
|
||||
int rsns;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -28,7 +28,7 @@ struct _ddebug {
|
|||
/*
|
||||
* The flags field controls the behaviour at the callsite.
|
||||
* The bits here are changed dynamically when the user
|
||||
* writes commands to <debugfs>/dynamic_debug/ddebug
|
||||
* writes commands to <debugfs>/dynamic_debug/control
|
||||
*/
|
||||
#define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */
|
||||
#define _DPRINTK_FLAGS_DEFAULT 0
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ typedef void (elevator_merged_fn) (struct request_queue *, struct request *, int
|
|||
|
||||
typedef int (elevator_allow_merge_fn) (struct request_queue *, struct request *, struct bio *);
|
||||
|
||||
typedef void (elevator_bio_merged_fn) (struct request_queue *,
|
||||
struct request *, struct bio *);
|
||||
|
||||
typedef int (elevator_dispatch_fn) (struct request_queue *, int);
|
||||
|
||||
typedef void (elevator_add_req_fn) (struct request_queue *, struct request *);
|
||||
|
|
@ -36,6 +39,7 @@ 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;
|
||||
elevator_bio_merged_fn *elevator_bio_merged_fn;
|
||||
|
||||
elevator_dispatch_fn *elevator_dispatch_fn;
|
||||
elevator_add_req_fn *elevator_add_req_fn;
|
||||
|
|
@ -103,6 +107,8 @@ extern int elv_merge(struct request_queue *, 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);
|
||||
extern void elv_bio_merged(struct request_queue *q, struct request *,
|
||||
struct bio *);
|
||||
extern void elv_requeue_request(struct request_queue *, struct request *);
|
||||
extern int elv_queue_empty(struct request_queue *);
|
||||
extern struct request *elv_former_request(struct request_queue *, struct request *);
|
||||
|
|
|
|||
|
|
@ -150,8 +150,6 @@ static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregse
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/*
|
||||
* These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
|
||||
* extra segments containing the gate DSO contents. Dumping its
|
||||
|
|
@ -168,4 +166,6 @@ extern int
|
|||
elf_core_write_extra_data(struct file *file, size_t *size, unsigned long limit);
|
||||
extern size_t elf_core_extra_data_size(void);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_ELFCORE_H */
|
||||
|
|
|
|||
|
|
@ -19,22 +19,22 @@
|
|||
|
||||
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
|
||||
|
||||
static inline void *ERR_PTR(long error)
|
||||
static inline void * __must_check ERR_PTR(long error)
|
||||
{
|
||||
return (void *) error;
|
||||
}
|
||||
|
||||
static inline long PTR_ERR(const void *ptr)
|
||||
static inline long __must_check PTR_ERR(const void *ptr)
|
||||
{
|
||||
return (long) ptr;
|
||||
}
|
||||
|
||||
static inline long IS_ERR(const void *ptr)
|
||||
static inline long __must_check IS_ERR(const void *ptr)
|
||||
{
|
||||
return IS_ERR_VALUE((unsigned long)ptr);
|
||||
}
|
||||
|
||||
static inline long IS_ERR_OR_NULL(const void *ptr)
|
||||
static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
|
||||
{
|
||||
return !ptr || IS_ERR_VALUE((unsigned long)ptr);
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ static inline long IS_ERR_OR_NULL(const void *ptr)
|
|||
* Explicitly cast an error-valued pointer to another pointer type in such a
|
||||
* way as to make it clear that's what's going on.
|
||||
*/
|
||||
static inline void *ERR_CAST(const void *ptr)
|
||||
static inline void * __must_check ERR_CAST(const void *ptr)
|
||||
{
|
||||
/* cast away the const */
|
||||
return (void *) ptr;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,15 @@ struct ext2_sb_info {
|
|||
spinlock_t s_rsv_window_lock;
|
||||
struct rb_root s_rsv_window_root;
|
||||
struct ext2_reserve_window_node s_rsv_window_head;
|
||||
/*
|
||||
* s_lock protects against concurrent modifications of s_mount_state,
|
||||
* s_blocks_last, s_overhead_last and the content of superblock's
|
||||
* buffer pointed to by sbi->s_es.
|
||||
*
|
||||
* Note: It is used in ext2_show_options() to provide a consistent view
|
||||
* of the mount options.
|
||||
*/
|
||||
spinlock_t s_lock;
|
||||
};
|
||||
|
||||
static inline spinlock_t *
|
||||
|
|
|
|||
|
|
@ -868,7 +868,7 @@ extern int ext3_htree_store_dirent(struct file *dir_file, __u32 hash,
|
|||
extern void ext3_htree_free_dir_info(struct dir_private_info *p);
|
||||
|
||||
/* fsync.c */
|
||||
extern int ext3_sync_file (struct file *, struct dentry *, int);
|
||||
extern int ext3_sync_file(struct file *, int);
|
||||
|
||||
/* hash.c */
|
||||
extern int ext3fs_dirhash(const char *name, int len, struct
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/i2c.h>
|
||||
|
||||
struct dentry;
|
||||
|
||||
/* Definitions of frame buffers */
|
||||
|
||||
#define FB_MAX 32 /* sufficient for now */
|
||||
|
|
@ -37,7 +35,7 @@ struct dentry;
|
|||
#define FBIOGET_HWCINFO 0x4616
|
||||
#define FBIOPUT_MODEINFO 0x4617
|
||||
#define FBIOGET_DISPINFO 0x4618
|
||||
|
||||
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
|
||||
|
||||
#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
|
||||
#define FB_TYPE_PLANES 1 /* Non interleaved planes */
|
||||
|
|
@ -403,6 +401,7 @@ struct fb_cursor {
|
|||
#include <linux/notifier.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/backlight.h>
|
||||
#include <linux/slab.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
struct vm_area_struct;
|
||||
|
|
@ -862,10 +861,22 @@ struct fb_info {
|
|||
/* we need the PCI or similiar aperture base/size not
|
||||
smem_start/size as smem_start may just be an object
|
||||
allocated inside the aperture so may not actually overlap */
|
||||
resource_size_t aperture_base;
|
||||
resource_size_t aperture_size;
|
||||
struct apertures_struct {
|
||||
unsigned int count;
|
||||
struct aperture {
|
||||
resource_size_t base;
|
||||
resource_size_t size;
|
||||
} ranges[0];
|
||||
} *apertures;
|
||||
};
|
||||
|
||||
static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
|
||||
struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct)
|
||||
+ max_num * sizeof(struct aperture), GFP_KERNEL);
|
||||
a->count = max_num;
|
||||
return a;
|
||||
}
|
||||
|
||||
#ifdef MODULE
|
||||
#define FBINFO_DEFAULT FBINFO_MODULE
|
||||
#else
|
||||
|
|
@ -958,6 +969,8 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
|
|||
/* drivers/video/fbmem.c */
|
||||
extern int register_framebuffer(struct fb_info *fb_info);
|
||||
extern int unregister_framebuffer(struct fb_info *fb_info);
|
||||
extern void remove_conflicting_framebuffers(struct apertures_struct *a,
|
||||
const char *name, bool primary);
|
||||
extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);
|
||||
extern int fb_show_logo(struct fb_info *fb_info, int rotate);
|
||||
extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size);
|
||||
|
|
@ -1002,8 +1015,7 @@ extern void fb_deferred_io_open(struct fb_info *info,
|
|||
struct inode *inode,
|
||||
struct file *file);
|
||||
extern void fb_deferred_io_cleanup(struct fb_info *info);
|
||||
extern int fb_deferred_io_fsync(struct file *file, struct dentry *dentry,
|
||||
int datasync);
|
||||
extern int fb_deferred_io_fsync(struct file *file, int datasync);
|
||||
|
||||
static inline bool fb_be_math(struct fb_info *info)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,12 @@
|
|||
*/
|
||||
#define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2)
|
||||
|
||||
/*
|
||||
* Set and get of pipe page size array
|
||||
*/
|
||||
#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
|
||||
#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
|
||||
|
||||
/*
|
||||
* Types of directory notifications that may be requested.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
struct file;
|
||||
|
||||
extern void __fput(struct file *);
|
||||
extern void fput(struct file *);
|
||||
extern void drop_file_write_access(struct file *file);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,13 +55,11 @@
|
|||
#define CSR_DESCRIPTOR 0x01
|
||||
#define CSR_VENDOR 0x03
|
||||
#define CSR_HARDWARE_VERSION 0x04
|
||||
#define CSR_NODE_CAPABILITIES 0x0c
|
||||
#define CSR_UNIT 0x11
|
||||
#define CSR_SPECIFIER_ID 0x12
|
||||
#define CSR_VERSION 0x13
|
||||
#define CSR_DEPENDENT_INFO 0x14
|
||||
#define CSR_MODEL 0x17
|
||||
#define CSR_INSTANCE 0x18
|
||||
#define CSR_DIRECTORY_ID 0x20
|
||||
|
||||
struct fw_csr_iterator {
|
||||
|
|
@ -89,7 +87,6 @@ struct fw_card {
|
|||
int current_tlabel;
|
||||
u64 tlabel_mask;
|
||||
struct list_head transaction_list;
|
||||
struct timer_list flush_timer;
|
||||
unsigned long reset_jiffies;
|
||||
|
||||
unsigned long long guid;
|
||||
|
|
@ -290,6 +287,8 @@ struct fw_transaction {
|
|||
int tlabel;
|
||||
int timestamp;
|
||||
struct list_head link;
|
||||
struct fw_card *card;
|
||||
struct timer_list split_timeout_timer;
|
||||
|
||||
struct fw_packet packet;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
struct firmware {
|
||||
size_t size;
|
||||
const u8 *data;
|
||||
struct page **pages;
|
||||
};
|
||||
|
||||
struct device;
|
||||
|
|
|
|||
|
|
@ -651,6 +651,7 @@ struct block_device {
|
|||
int bd_openers;
|
||||
struct mutex bd_mutex; /* open/close mutex */
|
||||
struct list_head bd_inodes;
|
||||
void * bd_claiming;
|
||||
void * bd_holder;
|
||||
int bd_holders;
|
||||
#ifdef CONFIG_SYSFS
|
||||
|
|
@ -953,6 +954,7 @@ extern spinlock_t files_lock;
|
|||
#define file_list_unlock() spin_unlock(&files_lock);
|
||||
|
||||
#define get_file(x) atomic_long_inc(&(x)->f_count)
|
||||
#define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1)
|
||||
#define file_count(x) atomic_long_read(&(x)->f_count)
|
||||
|
||||
#ifdef CONFIG_DEBUG_WRITECOUNT
|
||||
|
|
@ -1314,8 +1316,6 @@ extern int send_sigurg(struct fown_struct *fown);
|
|||
extern struct list_head super_blocks;
|
||||
extern spinlock_t sb_lock;
|
||||
|
||||
#define sb_entry(list) list_entry((list), struct super_block, s_list)
|
||||
#define S_BIAS (1<<30)
|
||||
struct super_block {
|
||||
struct list_head s_list; /* Keep this first */
|
||||
dev_t s_dev; /* search index; _not_ kdev_t */
|
||||
|
|
@ -1334,12 +1334,11 @@ struct super_block {
|
|||
struct rw_semaphore s_umount;
|
||||
struct mutex s_lock;
|
||||
int s_count;
|
||||
int s_need_sync;
|
||||
atomic_t s_active;
|
||||
#ifdef CONFIG_SECURITY
|
||||
void *s_security;
|
||||
#endif
|
||||
struct xattr_handler **s_xattr;
|
||||
const struct xattr_handler **s_xattr;
|
||||
|
||||
struct list_head s_inodes; /* all inodes */
|
||||
struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */
|
||||
|
|
@ -1431,7 +1430,8 @@ extern void dentry_unhash(struct dentry *dentry);
|
|||
* VFS file helper functions.
|
||||
*/
|
||||
extern int file_permission(struct file *, int);
|
||||
|
||||
extern void inode_init_owner(struct inode *inode, const struct inode *dir,
|
||||
mode_t mode);
|
||||
/*
|
||||
* VFS FS_IOC_FIEMAP helper definitions.
|
||||
*/
|
||||
|
|
@ -1498,7 +1498,7 @@ struct file_operations {
|
|||
int (*open) (struct inode *, struct file *);
|
||||
int (*flush) (struct file *, fl_owner_t id);
|
||||
int (*release) (struct inode *, struct file *);
|
||||
int (*fsync) (struct file *, struct dentry *, int datasync);
|
||||
int (*fsync) (struct file *, int datasync);
|
||||
int (*aio_fsync) (struct kiocb *, int datasync);
|
||||
int (*fasync) (int, struct file *, int);
|
||||
int (*lock) (struct file *, int, struct file_lock *);
|
||||
|
|
@ -1744,6 +1744,7 @@ struct file_system_type {
|
|||
|
||||
struct lock_class_key s_lock_key;
|
||||
struct lock_class_key s_umount_key;
|
||||
struct lock_class_key s_vfs_rename_key;
|
||||
|
||||
struct lock_class_key i_lock_key;
|
||||
struct lock_class_key i_mutex_key;
|
||||
|
|
@ -1781,8 +1782,6 @@ extern int get_sb_pseudo(struct file_system_type *, char *,
|
|||
const struct super_operations *ops, unsigned long,
|
||||
struct vfsmount *mnt);
|
||||
extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
|
||||
int __put_super_and_need_restart(struct super_block *sb);
|
||||
void put_super(struct super_block *sb);
|
||||
|
||||
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
|
||||
#define fops_get(fops) \
|
||||
|
|
@ -1802,6 +1801,8 @@ extern void drop_collected_mounts(struct vfsmount *);
|
|||
extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
|
||||
struct vfsmount *);
|
||||
extern int vfs_statfs(struct dentry *, struct kstatfs *);
|
||||
extern int freeze_super(struct super_block *super);
|
||||
extern int thaw_super(struct super_block *super);
|
||||
|
||||
extern int current_umask(void);
|
||||
|
||||
|
|
@ -2087,9 +2088,9 @@ extern int __filemap_fdatawrite_range(struct address_space *mapping,
|
|||
extern int filemap_fdatawrite_range(struct address_space *mapping,
|
||||
loff_t start, loff_t end);
|
||||
|
||||
extern int vfs_fsync_range(struct file *file, struct dentry *dentry,
|
||||
loff_t start, loff_t end, int datasync);
|
||||
extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync);
|
||||
extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end,
|
||||
int datasync);
|
||||
extern int vfs_fsync(struct file *file, int datasync);
|
||||
extern int generic_write_sync(struct file *file, loff_t pos, loff_t count);
|
||||
extern void sync_supers(void);
|
||||
extern void emergency_sync(void);
|
||||
|
|
@ -2212,7 +2213,7 @@ extern int generic_segment_checks(const struct iovec *iov,
|
|||
/* fs/block_dev.c */
|
||||
extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
unsigned long nr_segs, loff_t pos);
|
||||
extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync);
|
||||
extern int blkdev_fsync(struct file *filp, int datasync);
|
||||
|
||||
/* fs/splice.c */
|
||||
extern ssize_t generic_file_splice_read(struct file *, loff_t *,
|
||||
|
|
@ -2228,6 +2229,7 @@ extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
|
|||
|
||||
extern void
|
||||
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
|
||||
extern loff_t noop_llseek(struct file *file, loff_t offset, int origin);
|
||||
extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
|
||||
extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
|
||||
extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset,
|
||||
|
|
@ -2250,10 +2252,19 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_BLOCK
|
||||
struct bio;
|
||||
typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode,
|
||||
loff_t file_offset);
|
||||
void dio_end_io(struct bio *bio, int error);
|
||||
|
||||
ssize_t __blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb, struct inode *inode,
|
||||
struct block_device *bdev, const struct iovec *iov, loff_t offset,
|
||||
unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
|
||||
dio_submit_t submit_io, int lock_type);
|
||||
ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
|
||||
struct block_device *bdev, const struct iovec *iov, loff_t offset,
|
||||
unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
|
||||
int lock_type);
|
||||
dio_submit_t submit_io, int lock_type);
|
||||
|
||||
enum {
|
||||
/* need locking between buffered and direct access */
|
||||
|
|
@ -2263,13 +2274,31 @@ enum {
|
|||
DIO_SKIP_HOLES = 0x02,
|
||||
};
|
||||
|
||||
static inline ssize_t blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb,
|
||||
struct inode *inode, struct block_device *bdev, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs, get_block_t get_block,
|
||||
dio_iodone_t end_io)
|
||||
{
|
||||
return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset,
|
||||
nr_segs, get_block, end_io, NULL,
|
||||
DIO_LOCKING | DIO_SKIP_HOLES);
|
||||
}
|
||||
|
||||
static inline ssize_t blockdev_direct_IO_no_locking_newtrunc(int rw, struct kiocb *iocb,
|
||||
struct inode *inode, struct block_device *bdev, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs, get_block_t get_block,
|
||||
dio_iodone_t end_io)
|
||||
{
|
||||
return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset,
|
||||
nr_segs, get_block, end_io, NULL, 0);
|
||||
}
|
||||
static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct inode *inode, struct block_device *bdev, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs, get_block_t get_block,
|
||||
dio_iodone_t end_io)
|
||||
{
|
||||
return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
|
||||
nr_segs, get_block, end_io,
|
||||
nr_segs, get_block, end_io, NULL,
|
||||
DIO_LOCKING | DIO_SKIP_HOLES);
|
||||
}
|
||||
|
||||
|
|
@ -2279,7 +2308,7 @@ static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb,
|
|||
dio_iodone_t end_io)
|
||||
{
|
||||
return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
|
||||
nr_segs, get_block, end_io, 0);
|
||||
nr_segs, get_block, end_io, NULL, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -2329,18 +2358,21 @@ extern struct super_block *get_super(struct block_device *);
|
|||
extern struct super_block *get_active_super(struct block_device *bdev);
|
||||
extern struct super_block *user_get_super(dev_t);
|
||||
extern void drop_super(struct super_block *sb);
|
||||
extern void iterate_supers(void (*)(struct super_block *, void *), void *);
|
||||
|
||||
extern int dcache_dir_open(struct inode *, struct file *);
|
||||
extern int dcache_dir_close(struct inode *, struct file *);
|
||||
extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
|
||||
extern int dcache_readdir(struct file *, void *, filldir_t);
|
||||
extern int simple_setattr(struct dentry *, struct iattr *);
|
||||
extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
|
||||
extern int simple_statfs(struct dentry *, struct kstatfs *);
|
||||
extern int simple_link(struct dentry *, struct inode *, struct dentry *);
|
||||
extern int simple_unlink(struct inode *, struct dentry *);
|
||||
extern int simple_rmdir(struct inode *, struct dentry *);
|
||||
extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
|
||||
extern int simple_sync_file(struct file *, struct dentry *, int);
|
||||
extern int simple_setsize(struct inode *, loff_t);
|
||||
extern int noop_fsync(struct file *, int);
|
||||
extern int simple_empty(struct dentry *);
|
||||
extern int simple_readpage(struct file *file, struct page *page);
|
||||
extern int simple_write_begin(struct file *file, struct address_space *mapping,
|
||||
|
|
@ -2365,7 +2397,7 @@ extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
|
|||
extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos,
|
||||
const void __user *from, size_t count);
|
||||
|
||||
extern int simple_fsync(struct file *, struct dentry *, int);
|
||||
extern int generic_file_fsync(struct file *, int);
|
||||
|
||||
#ifdef CONFIG_MIGRATION
|
||||
extern int buffer_migrate_page(struct address_space *,
|
||||
|
|
@ -2376,7 +2408,8 @@ extern int buffer_migrate_page(struct address_space *,
|
|||
|
||||
extern int inode_change_ok(const struct inode *, struct iattr *);
|
||||
extern int inode_newsize_ok(const struct inode *, loff_t offset);
|
||||
extern int __must_check inode_setattr(struct inode *, struct iattr *);
|
||||
extern int __must_check inode_setattr(struct inode *, const struct iattr *);
|
||||
extern void generic_setattr(struct inode *inode, const struct iattr *attr);
|
||||
|
||||
extern void file_update_time(struct file *file);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ const char *ftrace_print_flags_seq(struct trace_seq *p, const char *delim,
|
|||
const char *ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val,
|
||||
const struct trace_print_flags *symbol_array);
|
||||
|
||||
const char *ftrace_print_hex_seq(struct trace_seq *p,
|
||||
const unsigned char *buf, int len);
|
||||
|
||||
/*
|
||||
* The trace entry - the most basic unit of tracing. This is what
|
||||
* is printed in the end as a single line in the trace output, such as:
|
||||
|
|
@ -70,18 +73,25 @@ struct trace_iterator {
|
|||
};
|
||||
|
||||
|
||||
struct trace_event;
|
||||
|
||||
typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter,
|
||||
int flags);
|
||||
struct trace_event {
|
||||
struct hlist_node node;
|
||||
struct list_head list;
|
||||
int type;
|
||||
int flags, struct trace_event *event);
|
||||
|
||||
struct trace_event_functions {
|
||||
trace_print_func trace;
|
||||
trace_print_func raw;
|
||||
trace_print_func hex;
|
||||
trace_print_func binary;
|
||||
};
|
||||
|
||||
struct trace_event {
|
||||
struct hlist_node node;
|
||||
struct list_head list;
|
||||
int type;
|
||||
struct trace_event_functions *funcs;
|
||||
};
|
||||
|
||||
extern int register_ftrace_event(struct trace_event *event);
|
||||
extern int unregister_ftrace_event(struct trace_event *event);
|
||||
|
||||
|
|
@ -113,28 +123,70 @@ void tracing_record_cmdline(struct task_struct *tsk);
|
|||
|
||||
struct event_filter;
|
||||
|
||||
enum trace_reg {
|
||||
TRACE_REG_REGISTER,
|
||||
TRACE_REG_UNREGISTER,
|
||||
TRACE_REG_PERF_REGISTER,
|
||||
TRACE_REG_PERF_UNREGISTER,
|
||||
};
|
||||
|
||||
struct ftrace_event_call;
|
||||
|
||||
struct ftrace_event_class {
|
||||
char *system;
|
||||
void *probe;
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
void *perf_probe;
|
||||
#endif
|
||||
int (*reg)(struct ftrace_event_call *event,
|
||||
enum trace_reg type);
|
||||
int (*define_fields)(struct ftrace_event_call *);
|
||||
struct list_head *(*get_fields)(struct ftrace_event_call *);
|
||||
struct list_head fields;
|
||||
int (*raw_init)(struct ftrace_event_call *);
|
||||
};
|
||||
|
||||
enum {
|
||||
TRACE_EVENT_FL_ENABLED_BIT,
|
||||
TRACE_EVENT_FL_FILTERED_BIT,
|
||||
};
|
||||
|
||||
enum {
|
||||
TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT),
|
||||
TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT),
|
||||
};
|
||||
|
||||
struct ftrace_event_call {
|
||||
struct list_head list;
|
||||
struct ftrace_event_class *class;
|
||||
char *name;
|
||||
char *system;
|
||||
struct dentry *dir;
|
||||
struct trace_event *event;
|
||||
int enabled;
|
||||
int (*regfunc)(struct ftrace_event_call *);
|
||||
void (*unregfunc)(struct ftrace_event_call *);
|
||||
int id;
|
||||
struct trace_event event;
|
||||
const char *print_fmt;
|
||||
int (*raw_init)(struct ftrace_event_call *);
|
||||
int (*define_fields)(struct ftrace_event_call *);
|
||||
struct list_head fields;
|
||||
int filter_active;
|
||||
struct event_filter *filter;
|
||||
void *mod;
|
||||
void *data;
|
||||
|
||||
/*
|
||||
* 32 bit flags:
|
||||
* bit 1: enabled
|
||||
* bit 2: filter_active
|
||||
*
|
||||
* Changes to flags must hold the event_mutex.
|
||||
*
|
||||
* Note: Reads of flags do not hold the event_mutex since
|
||||
* they occur in critical sections. But the way flags
|
||||
* is currently used, these changes do no affect the code
|
||||
* except that when a change is made, it may have a slight
|
||||
* delay in propagating the changes to other CPUs due to
|
||||
* caching and such.
|
||||
*/
|
||||
unsigned int flags;
|
||||
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
int perf_refcount;
|
||||
int (*perf_event_enable)(struct ftrace_event_call *);
|
||||
void (*perf_event_disable)(struct ftrace_event_call *);
|
||||
struct hlist_head *perf_events;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define PERF_MAX_TRACE_SIZE 2048
|
||||
|
|
@ -191,24 +243,22 @@ struct perf_event;
|
|||
|
||||
DECLARE_PER_CPU(struct pt_regs, perf_trace_regs);
|
||||
|
||||
extern int perf_trace_enable(int event_id);
|
||||
extern void perf_trace_disable(int event_id);
|
||||
extern int ftrace_profile_set_filter(struct perf_event *event, int event_id,
|
||||
extern int perf_trace_init(struct perf_event *event);
|
||||
extern void perf_trace_destroy(struct perf_event *event);
|
||||
extern int perf_trace_enable(struct perf_event *event);
|
||||
extern void perf_trace_disable(struct perf_event *event);
|
||||
extern int ftrace_profile_set_filter(struct perf_event *event, int event_id,
|
||||
char *filter_str);
|
||||
extern void ftrace_profile_free_filter(struct perf_event *event);
|
||||
extern void *
|
||||
perf_trace_buf_prepare(int size, unsigned short type, int *rctxp,
|
||||
unsigned long *irq_flags);
|
||||
extern void *perf_trace_buf_prepare(int size, unsigned short type,
|
||||
struct pt_regs *regs, int *rctxp);
|
||||
|
||||
static inline void
|
||||
perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr,
|
||||
u64 count, unsigned long irq_flags, struct pt_regs *regs)
|
||||
u64 count, struct pt_regs *regs, void *head)
|
||||
{
|
||||
struct trace_entry *entry = raw_data;
|
||||
|
||||
perf_tp_event(entry->type, addr, count, raw_data, size, regs);
|
||||
perf_tp_event(addr, count, raw_data, size, regs, head);
|
||||
perf_swevent_put_recursion_context(rctx);
|
||||
local_irq_restore(irq_flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@
|
|||
* 7.13
|
||||
* - make max number of background requests and congestion threshold
|
||||
* tunables
|
||||
*
|
||||
* 7.14
|
||||
* - add splice support to fuse device
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_FUSE_H
|
||||
|
|
@ -65,7 +68,7 @@
|
|||
#define FUSE_KERNEL_VERSION 7
|
||||
|
||||
/** Minor version number of this interface */
|
||||
#define FUSE_KERNEL_MINOR_VERSION 13
|
||||
#define FUSE_KERNEL_MINOR_VERSION 14
|
||||
|
||||
/** The node ID of the root inode */
|
||||
#define FUSE_ROOT_ID 1
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
struct inode;
|
||||
|
||||
extern struct xattr_handler generic_acl_access_handler;
|
||||
extern struct xattr_handler generic_acl_default_handler;
|
||||
extern const struct xattr_handler generic_acl_access_handler;
|
||||
extern const struct xattr_handler generic_acl_default_handler;
|
||||
|
||||
int generic_acl_init(struct inode *, struct inode *);
|
||||
int generic_acl_chmod(struct inode *);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ struct vm_area_struct;
|
|||
* Zone modifiers (see linux/mmzone.h - low three bits)
|
||||
*
|
||||
* Do not put any conditional on these. If necessary modify the definitions
|
||||
* without the underscores and use the consistently. The definitions here may
|
||||
* without the underscores and use them consistently. The definitions here may
|
||||
* be used in bit comparisons.
|
||||
*/
|
||||
#define __GFP_DMA ((__force gfp_t)0x01u)
|
||||
|
|
@ -101,7 +101,7 @@ struct vm_area_struct;
|
|||
__GFP_NORETRY|__GFP_NOMEMALLOC)
|
||||
|
||||
/* Control slab gfp mask during early boot */
|
||||
#define GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS)
|
||||
#define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS))
|
||||
|
||||
/* Control allocation constraints */
|
||||
#define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE)
|
||||
|
|
@ -152,12 +152,12 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags)
|
|||
* GFP_ZONE_TABLE is a word size bitstring that is used for looking up the
|
||||
* zone to use given the lowest 4 bits of gfp_t. Entries are ZONE_SHIFT long
|
||||
* and there are 16 of them to cover all possible combinations of
|
||||
* __GFP_DMA, __GFP_DMA32, __GFP_MOVABLE and __GFP_HIGHMEM
|
||||
* __GFP_DMA, __GFP_DMA32, __GFP_MOVABLE and __GFP_HIGHMEM.
|
||||
*
|
||||
* The zone fallback order is MOVABLE=>HIGHMEM=>NORMAL=>DMA32=>DMA.
|
||||
* But GFP_MOVABLE is not only a zone specifier but also an allocation
|
||||
* policy. Therefore __GFP_MOVABLE plus another zone selector is valid.
|
||||
* Only 1bit of the lowest 3 bit (DMA,DMA32,HIGHMEM) can be set to "1".
|
||||
* Only 1 bit of the lowest 3 bits (DMA,DMA32,HIGHMEM) can be set to "1".
|
||||
*
|
||||
* bit result
|
||||
* =================
|
||||
|
|
@ -187,7 +187,7 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags)
|
|||
|
||||
#define GFP_ZONE_TABLE ( \
|
||||
(ZONE_NORMAL << 0 * ZONES_SHIFT) \
|
||||
| (OPT_ZONE_DMA << __GFP_DMA * ZONES_SHIFT) \
|
||||
| (OPT_ZONE_DMA << __GFP_DMA * ZONES_SHIFT) \
|
||||
| (OPT_ZONE_HIGHMEM << __GFP_HIGHMEM * ZONES_SHIFT) \
|
||||
| (OPT_ZONE_DMA32 << __GFP_DMA32 * ZONES_SHIFT) \
|
||||
| (ZONE_NORMAL << __GFP_MOVABLE * ZONES_SHIFT) \
|
||||
|
|
@ -197,7 +197,7 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags)
|
|||
)
|
||||
|
||||
/*
|
||||
* GFP_ZONE_BAD is a bitmap for all combination of __GFP_DMA, __GFP_DMA32
|
||||
* GFP_ZONE_BAD is a bitmap for all combinations of __GFP_DMA, __GFP_DMA32
|
||||
* __GFP_HIGHMEM and __GFP_MOVABLE that are not permitted. One flag per
|
||||
* entry starting with bit 0. Bit is set if the combination is not
|
||||
* allowed.
|
||||
|
|
@ -320,17 +320,17 @@ void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
|
|||
void free_pages_exact(void *virt, size_t size);
|
||||
|
||||
#define __get_free_page(gfp_mask) \
|
||||
__get_free_pages((gfp_mask),0)
|
||||
__get_free_pages((gfp_mask), 0)
|
||||
|
||||
#define __get_dma_pages(gfp_mask, order) \
|
||||
__get_free_pages((gfp_mask) | GFP_DMA,(order))
|
||||
__get_free_pages((gfp_mask) | GFP_DMA, (order))
|
||||
|
||||
extern void __free_pages(struct page *page, unsigned int order);
|
||||
extern void free_pages(unsigned long addr, unsigned int order);
|
||||
extern void free_hot_cold_page(struct page *page, int cold);
|
||||
|
||||
#define __free_page(page) __free_pages((page), 0)
|
||||
#define free_page(addr) free_pages((addr),0)
|
||||
#define free_page(addr) free_pages((addr), 0)
|
||||
|
||||
void page_alloc_init(void);
|
||||
void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ static inline int gpio_direction_output(unsigned gpio, int value)
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int gpio_set_debounce(unsigned gpio, unsigned debounce)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int gpio_get_value(unsigned gpio)
|
||||
{
|
||||
/* GPIO can never have been requested or set as {in,out}put */
|
||||
|
|
|
|||
25
include/linux/gsmmux.h
Normal file
25
include/linux/gsmmux.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef _LINUX_GSMMUX_H
|
||||
#define _LINUX_GSMMUX_H
|
||||
|
||||
struct gsm_config
|
||||
{
|
||||
unsigned int adaption;
|
||||
unsigned int encapsulation;
|
||||
unsigned int initiator;
|
||||
unsigned int t1;
|
||||
unsigned int t2;
|
||||
unsigned int t3;
|
||||
unsigned int n2;
|
||||
unsigned int mru;
|
||||
unsigned int mtu;
|
||||
unsigned int k;
|
||||
unsigned int i;
|
||||
unsigned int unused[8]; /* Padding for expansion without
|
||||
breaking stuff */
|
||||
};
|
||||
|
||||
#define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config)
|
||||
#define GSMIOC_SETCONF _IOW('G', 1, struct gsm_config)
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#include <linux/spinlock.h>
|
||||
|
||||
struct cpustate_t {
|
||||
spinlock_t lock;
|
||||
int excl;
|
||||
int open_count;
|
||||
unsigned char cached_val;
|
||||
int inited;
|
||||
unsigned long *set_addr;
|
||||
unsigned long *clr_addr;
|
||||
};
|
||||
|
||||
|
||||
#define HDPU_CPUSTATE_NAME "hdpu cpustate"
|
||||
#define HDPU_NEXUS_NAME "hdpu nexus"
|
||||
|
||||
#define CPUSTATE_KERNEL_MAJOR 0x10
|
||||
|
||||
#define CPUSTATE_KERNEL_INIT_DRV 0 /* CPU State Driver Initialized */
|
||||
#define CPUSTATE_KERNEL_INIT_PCI 1 /* 64360 PCI Busses Init */
|
||||
#define CPUSTATE_KERNEL_INIT_REG 2 /* 64360 Bridge Init */
|
||||
#define CPUSTATE_KERNEL_CPU1_KICK 3 /* Boot cpu 1 */
|
||||
#define CPUSTATE_KERNEL_CPU1_OK 4 /* Cpu 1 has checked in */
|
||||
#define CPUSTATE_KERNEL_OK 5 /* Terminal state */
|
||||
#define CPUSTATE_KERNEL_RESET 14 /* Board reset via SW*/
|
||||
#define CPUSTATE_KERNEL_HALT 15 /* Board halted via SW*/
|
||||
|
|
@ -308,11 +308,13 @@ struct hid_item {
|
|||
#define HID_QUIRK_NOTOUCH 0x00000002
|
||||
#define HID_QUIRK_IGNORE 0x00000004
|
||||
#define HID_QUIRK_NOGET 0x00000008
|
||||
#define HID_QUIRK_HIDDEV_FORCE 0x00000010
|
||||
#define HID_QUIRK_BADPAD 0x00000020
|
||||
#define HID_QUIRK_MULTI_INPUT 0x00000040
|
||||
#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
|
||||
#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
|
||||
#define HID_QUIRK_NO_INIT_REPORTS 0x20000000
|
||||
#define HID_QUIRK_NO_IGNORE 0x40000000
|
||||
|
||||
/*
|
||||
* This is the global environment of the parser. This information is
|
||||
|
|
@ -589,6 +591,9 @@ struct hid_usage_id {
|
|||
* @report_fixup: called before report descriptor parsing (NULL means nop)
|
||||
* @input_mapping: invoked on input registering before mapping an usage
|
||||
* @input_mapped: invoked on input registering after mapping an usage
|
||||
* @suspend: invoked on suspend (NULL means nop)
|
||||
* @resume: invoked on resume if device was not reset (NULL means nop)
|
||||
* @reset_resume: invoked on resume if device was reset (NULL means nop)
|
||||
*
|
||||
* raw_event and event should return 0 on no action performed, 1 when no
|
||||
* further processing should be done and negative on error
|
||||
|
|
@ -629,6 +634,11 @@ struct hid_driver {
|
|||
int (*input_mapped)(struct hid_device *hdev,
|
||||
struct hid_input *hidinput, struct hid_field *field,
|
||||
struct hid_usage *usage, unsigned long **bit, int *max);
|
||||
#ifdef CONFIG_PM
|
||||
int (*suspend)(struct hid_device *hdev, pm_message_t message);
|
||||
int (*resume)(struct hid_device *hdev);
|
||||
int (*reset_resume)(struct hid_device *hdev);
|
||||
#endif
|
||||
/* private: */
|
||||
struct device_driver driver;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ static inline void invalidate_kernel_vmap_range(void *vaddr, int size)
|
|||
|
||||
#include <asm/kmap_types.h>
|
||||
|
||||
#if defined(CONFIG_DEBUG_HIGHMEM) && defined(CONFIG_TRACE_IRQFLAGS_SUPPORT)
|
||||
#ifdef CONFIG_DEBUG_HIGHMEM
|
||||
|
||||
void debug_kmap_atomic(enum km_type type);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include <linux/device.h> /* for struct device */
|
||||
#include <linux/sched.h> /* for completion */
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/of.h> /* for struct device_node */
|
||||
|
||||
extern struct bus_type i2c_bus_type;
|
||||
|
||||
|
|
@ -251,6 +252,9 @@ struct i2c_board_info {
|
|||
unsigned short addr;
|
||||
void *platform_data;
|
||||
struct dev_archdata *archdata;
|
||||
#ifdef CONFIG_OF
|
||||
struct device_node *of_node;
|
||||
#endif
|
||||
int irq;
|
||||
};
|
||||
|
||||
|
|
|
|||
154
include/linux/i2c/adp8860.h
Normal file
154
include/linux/i2c/adp8860.h
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* Definitions and platform data for Analog Devices
|
||||
* Backlight drivers ADP8860
|
||||
*
|
||||
* Copyright 2009-2010 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2 or later.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_I2C_ADP8860_H
|
||||
#define __LINUX_I2C_ADP8860_H
|
||||
|
||||
#include <linux/leds.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define ID_ADP8860 8860
|
||||
|
||||
#define ADP8860_MAX_BRIGHTNESS 0x7F
|
||||
#define FLAG_OFFT_SHIFT 8
|
||||
|
||||
/*
|
||||
* LEDs subdevice platform data
|
||||
*/
|
||||
|
||||
#define ADP8860_LED_DIS_BLINK (0 << FLAG_OFFT_SHIFT)
|
||||
#define ADP8860_LED_OFFT_600ms (1 << FLAG_OFFT_SHIFT)
|
||||
#define ADP8860_LED_OFFT_1200ms (2 << FLAG_OFFT_SHIFT)
|
||||
#define ADP8860_LED_OFFT_1800ms (3 << FLAG_OFFT_SHIFT)
|
||||
|
||||
#define ADP8860_LED_ONT_200ms 0
|
||||
#define ADP8860_LED_ONT_600ms 1
|
||||
#define ADP8860_LED_ONT_800ms 2
|
||||
#define ADP8860_LED_ONT_1200ms 3
|
||||
|
||||
#define ADP8860_LED_D7 (7)
|
||||
#define ADP8860_LED_D6 (6)
|
||||
#define ADP8860_LED_D5 (5)
|
||||
#define ADP8860_LED_D4 (4)
|
||||
#define ADP8860_LED_D3 (3)
|
||||
#define ADP8860_LED_D2 (2)
|
||||
#define ADP8860_LED_D1 (1)
|
||||
|
||||
/*
|
||||
* Backlight subdevice platform data
|
||||
*/
|
||||
|
||||
#define ADP8860_BL_D7 (1 << 6)
|
||||
#define ADP8860_BL_D6 (1 << 5)
|
||||
#define ADP8860_BL_D5 (1 << 4)
|
||||
#define ADP8860_BL_D4 (1 << 3)
|
||||
#define ADP8860_BL_D3 (1 << 2)
|
||||
#define ADP8860_BL_D2 (1 << 1)
|
||||
#define ADP8860_BL_D1 (1 << 0)
|
||||
|
||||
#define ADP8860_FADE_T_DIS 0 /* Fade Timer Disabled */
|
||||
#define ADP8860_FADE_T_300ms 1 /* 0.3 Sec */
|
||||
#define ADP8860_FADE_T_600ms 2
|
||||
#define ADP8860_FADE_T_900ms 3
|
||||
#define ADP8860_FADE_T_1200ms 4
|
||||
#define ADP8860_FADE_T_1500ms 5
|
||||
#define ADP8860_FADE_T_1800ms 6
|
||||
#define ADP8860_FADE_T_2100ms 7
|
||||
#define ADP8860_FADE_T_2400ms 8
|
||||
#define ADP8860_FADE_T_2700ms 9
|
||||
#define ADP8860_FADE_T_3000ms 10
|
||||
#define ADP8860_FADE_T_3500ms 11
|
||||
#define ADP8860_FADE_T_4000ms 12
|
||||
#define ADP8860_FADE_T_4500ms 13
|
||||
#define ADP8860_FADE_T_5000ms 14
|
||||
#define ADP8860_FADE_T_5500ms 15 /* 5.5 Sec */
|
||||
|
||||
#define ADP8860_FADE_LAW_LINEAR 0
|
||||
#define ADP8860_FADE_LAW_SQUARE 1
|
||||
#define ADP8860_FADE_LAW_CUBIC1 2
|
||||
#define ADP8860_FADE_LAW_CUBIC2 3
|
||||
|
||||
#define ADP8860_BL_AMBL_FILT_80ms 0 /* Light sensor filter time */
|
||||
#define ADP8860_BL_AMBL_FILT_160ms 1
|
||||
#define ADP8860_BL_AMBL_FILT_320ms 2
|
||||
#define ADP8860_BL_AMBL_FILT_640ms 3
|
||||
#define ADP8860_BL_AMBL_FILT_1280ms 4
|
||||
#define ADP8860_BL_AMBL_FILT_2560ms 5
|
||||
#define ADP8860_BL_AMBL_FILT_5120ms 6
|
||||
#define ADP8860_BL_AMBL_FILT_10240ms 7 /* 10.24 sec */
|
||||
|
||||
/*
|
||||
* Blacklight current 0..30mA
|
||||
*/
|
||||
#define ADP8860_BL_CUR_mA(I) ((I * 127) / 30)
|
||||
|
||||
/*
|
||||
* L2 comparator current 0..1106uA
|
||||
*/
|
||||
#define ADP8860_L2_COMP_CURR_uA(I) ((I * 255) / 1106)
|
||||
|
||||
/*
|
||||
* L3 comparator current 0..138uA
|
||||
*/
|
||||
#define ADP8860_L3_COMP_CURR_uA(I) ((I * 255) / 138)
|
||||
|
||||
struct adp8860_backlight_platform_data {
|
||||
u8 bl_led_assign; /* 1 = Backlight 0 = Individual LED */
|
||||
|
||||
u8 bl_fade_in; /* Backlight Fade-In Timer */
|
||||
u8 bl_fade_out; /* Backlight Fade-Out Timer */
|
||||
u8 bl_fade_law; /* fade-on/fade-off transfer characteristic */
|
||||
|
||||
u8 en_ambl_sens; /* 1 = enable ambient light sensor */
|
||||
u8 abml_filt; /* Light sensor filter time */
|
||||
|
||||
u8 l1_daylight_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
|
||||
u8 l1_daylight_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
|
||||
u8 l2_office_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
|
||||
u8 l2_office_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
|
||||
u8 l3_dark_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
|
||||
u8 l3_dark_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
|
||||
|
||||
u8 l2_trip; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
|
||||
u8 l2_hyst; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
|
||||
u8 l3_trip; /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */
|
||||
u8 l3_hyst; /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */
|
||||
|
||||
/**
|
||||
* Independent Current Sinks / LEDS
|
||||
* Sinks not assigned to the Backlight can be exposed to
|
||||
* user space using the LEDS CLASS interface
|
||||
*/
|
||||
|
||||
int num_leds;
|
||||
struct led_info *leds;
|
||||
u8 led_fade_in; /* LED Fade-In Timer */
|
||||
u8 led_fade_out; /* LED Fade-Out Timer */
|
||||
u8 led_fade_law; /* fade-on/fade-off transfer characteristic */
|
||||
u8 led_on_time;
|
||||
|
||||
/**
|
||||
* Gain down disable. Setting this option does not allow the
|
||||
* charge pump to switch to lower gains. NOT AVAILABLE on ADP8860
|
||||
* 1 = the charge pump doesn't switch down in gain until all LEDs are 0.
|
||||
* The charge pump switches up in gain as needed. This feature is
|
||||
* useful if the ADP8863 charge pump is used to drive an external load.
|
||||
* This feature must be used when utilizing small fly capacitors
|
||||
* (0402 or smaller).
|
||||
* 0 = the charge pump automatically switches up and down in gain.
|
||||
* This provides optimal efficiency, but is not suitable for driving
|
||||
* loads that are not connected through the ADP8863 diode drivers.
|
||||
* Additionally, the charge pump fly capacitors should be low ESR
|
||||
* and sized 0603 or greater.
|
||||
*/
|
||||
|
||||
u8 gdwn_dis;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_I2C_ADP8860_H */
|
||||
|
|
@ -7,6 +7,9 @@ struct max732x_platform_data {
|
|||
/* number of the first GPIO */
|
||||
unsigned gpio_base;
|
||||
|
||||
/* interrupt base */
|
||||
int irq_base;
|
||||
|
||||
void *context; /* param to setup/teardown */
|
||||
|
||||
int (*setup)(struct i2c_client *client,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ struct pca953x_platform_data {
|
|||
int (*teardown)(struct i2c_client *client,
|
||||
unsigned gpio, unsigned ngpio,
|
||||
void *context);
|
||||
char **names;
|
||||
const char *const *names;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_PCA953X_H */
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ struct ide_drive_s;
|
|||
struct ide_disk_ops {
|
||||
int (*check)(struct ide_drive_s *, const char *);
|
||||
int (*get_capacity)(struct ide_drive_s *);
|
||||
u64 (*set_capacity)(struct ide_drive_s *, u64);
|
||||
void (*unlock_native_capacity)(struct ide_drive_s *);
|
||||
void (*setup)(struct ide_drive_s *);
|
||||
void (*flush)(struct ide_drive_s *);
|
||||
int (*init_media)(struct ide_drive_s *, struct gendisk *);
|
||||
|
|
@ -516,8 +516,8 @@ struct ide_drive_s {
|
|||
u8 current_speed; /* current transfer rate set */
|
||||
u8 desired_speed; /* desired transfer rate set */
|
||||
u8 pio_mode; /* for ->set_pio_mode _only_ */
|
||||
u8 dma_mode; /* for ->dma_pio_mode _only_ */
|
||||
u8 dn; /* now wide spread use */
|
||||
u8 dma_mode; /* for ->set_dma_mode _only_ */
|
||||
u8 dn; /* now wide spread use */
|
||||
u8 acoustic; /* acoustic management */
|
||||
u8 media; /* disk, cdrom, tape, floppy, ... */
|
||||
u8 ready_stat; /* min status value for drive ready */
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ extern struct files_struct init_files;
|
|||
extern struct fs_struct init_fs;
|
||||
|
||||
#define INIT_SIGNALS(sig) { \
|
||||
.count = ATOMIC_INIT(1), \
|
||||
.nr_threads = 1, \
|
||||
.wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\
|
||||
.shared_pending = { \
|
||||
.list = LIST_HEAD_INIT(sig.shared_pending.list), \
|
||||
|
|
@ -35,7 +35,7 @@ extern struct nsproxy init_nsproxy;
|
|||
|
||||
#define INIT_SIGHAND(sighand) { \
|
||||
.count = ATOMIC_INIT(1), \
|
||||
.action = { { { .sa_handler = NULL, } }, }, \
|
||||
.action = { { { .sa_handler = SIG_DFL, } }, }, \
|
||||
.siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \
|
||||
.signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(sighand.signalfd_wqh), \
|
||||
}
|
||||
|
|
@ -45,9 +45,9 @@ extern struct group_info init_groups;
|
|||
#define INIT_STRUCT_PID { \
|
||||
.count = ATOMIC_INIT(1), \
|
||||
.tasks = { \
|
||||
{ .first = &init_task.pids[PIDTYPE_PID].node }, \
|
||||
{ .first = &init_task.pids[PIDTYPE_PGID].node }, \
|
||||
{ .first = &init_task.pids[PIDTYPE_SID].node }, \
|
||||
{ .first = NULL }, \
|
||||
{ .first = NULL }, \
|
||||
{ .first = NULL }, \
|
||||
}, \
|
||||
.level = 0, \
|
||||
.numbers = { { \
|
||||
|
|
@ -61,7 +61,7 @@ extern struct group_info init_groups;
|
|||
{ \
|
||||
.node = { \
|
||||
.next = NULL, \
|
||||
.pprev = &init_struct_pid.tasks[type].first, \
|
||||
.pprev = NULL, \
|
||||
}, \
|
||||
.pid = &init_struct_pid, \
|
||||
}
|
||||
|
|
@ -163,6 +163,7 @@ extern struct cred init_cred;
|
|||
[PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \
|
||||
[PIDTYPE_SID] = INIT_PID_LINK(PIDTYPE_SID), \
|
||||
}, \
|
||||
.thread_group = LIST_HEAD_INIT(tsk.thread_group), \
|
||||
.dirties = INIT_PROP_LOCAL_SINGLE(dirties), \
|
||||
INIT_IDS \
|
||||
INIT_PERF_EVENTS(tsk) \
|
||||
|
|
|
|||
|
|
@ -1155,7 +1155,7 @@ struct input_dev {
|
|||
|
||||
int sync;
|
||||
|
||||
int abs[ABS_MAX + 1];
|
||||
int abs[ABS_CNT];
|
||||
int rep[REP_MAX + 1];
|
||||
|
||||
unsigned long key[BITS_TO_LONGS(KEY_CNT)];
|
||||
|
|
@ -1163,11 +1163,11 @@ struct input_dev {
|
|||
unsigned long snd[BITS_TO_LONGS(SND_CNT)];
|
||||
unsigned long sw[BITS_TO_LONGS(SW_CNT)];
|
||||
|
||||
int absmax[ABS_MAX + 1];
|
||||
int absmin[ABS_MAX + 1];
|
||||
int absfuzz[ABS_MAX + 1];
|
||||
int absflat[ABS_MAX + 1];
|
||||
int absres[ABS_MAX + 1];
|
||||
int absmax[ABS_CNT];
|
||||
int absmin[ABS_CNT];
|
||||
int absfuzz[ABS_CNT];
|
||||
int absflat[ABS_CNT];
|
||||
int absres[ABS_CNT];
|
||||
|
||||
int (*open)(struct input_dev *dev);
|
||||
void (*close)(struct input_dev *dev);
|
||||
|
|
|
|||
24
include/linux/input/tps6507x-ts.h
Normal file
24
include/linux/input/tps6507x-ts.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* linux/i2c/tps6507x-ts.h
|
||||
*
|
||||
* Functions to access TPS65070 touch screen chip.
|
||||
*
|
||||
* Copyright (c) 2009 RidgeRun (todd.fischer@ridgerun.com)
|
||||
*
|
||||
*
|
||||
* For licencing details see kernel-base/COPYING
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_I2C_TPS6507X_TS_H
|
||||
#define __LINUX_I2C_TPS6507X_TS_H
|
||||
|
||||
/* Board specific touch screen initial values */
|
||||
struct touchscreen_init_data {
|
||||
int poll_period; /* ms */
|
||||
int vref; /* non-zero to leave vref on */
|
||||
__u16 min_pressure; /* min reading to be treated as a touch */
|
||||
__u16 vendor;
|
||||
__u16 product;
|
||||
__u16 version;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_I2C_TPS6507X_TS_H */
|
||||
|
|
@ -78,7 +78,7 @@ enum {
|
|||
IRQTF_AFFINITY,
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
* These values can be returned by request_any_context_irq() and
|
||||
* describe the context the interrupt will be run in.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ struct resource_list {
|
|||
|
||||
#define IORESOURCE_MEM_64 0x00100000
|
||||
#define IORESOURCE_WINDOW 0x00200000 /* forwarded by bridge */
|
||||
#define IORESOURCE_MUXED 0x00400000 /* Resource is software muxed */
|
||||
|
||||
#define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
|
||||
#define IORESOURCE_DISABLED 0x10000000
|
||||
|
|
@ -143,7 +144,8 @@ static inline unsigned long resource_type(const struct resource *res)
|
|||
}
|
||||
|
||||
/* Convenience shorthand with allocation */
|
||||
#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), 0)
|
||||
#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), 0)
|
||||
#define request_muxed_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), IORESOURCE_MUXED)
|
||||
#define __request_mem_region(start,n,name, excl) __request_region(&iomem_resource, (start), (n), (name), excl)
|
||||
#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name), 0)
|
||||
#define request_mem_region_exclusive(start,n,name) \
|
||||
|
|
|
|||
|
|
@ -43,10 +43,10 @@
|
|||
*/
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
||||
#define DEVICE_COUNT_COMPATIBLE 4
|
||||
|
||||
#define ISAPNP_ANY_ID 0xffff
|
||||
#define ISAPNP_CARD_DEVS 8
|
||||
|
||||
#define ISAPNP_CARD_ID(_va, _vb, _vc, _device) \
|
||||
|
|
@ -74,12 +74,6 @@ struct isapnp_card_id {
|
|||
#define ISAPNP_DEVICE_SINGLE_END \
|
||||
.card_vendor = 0, .card_device = 0
|
||||
|
||||
struct isapnp_device_id {
|
||||
unsigned short card_vendor, card_device;
|
||||
unsigned short vendor, function;
|
||||
unsigned long driver_data; /* data private to the driver */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
|
||||
|
||||
#define __ISAPNP__
|
||||
|
|
|
|||
|
|
@ -33,6 +33,5 @@ struct ivtvfb_dma_frame {
|
|||
};
|
||||
|
||||
#define IVTVFB_IOC_DMA_FRAME _IOW('V', BASE_VIDIOC_PRIVATE+0, struct ivtvfb_dma_frame)
|
||||
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -427,9 +427,9 @@ struct transaction_s
|
|||
enum {
|
||||
T_RUNNING,
|
||||
T_LOCKED,
|
||||
T_RUNDOWN,
|
||||
T_FLUSH,
|
||||
T_COMMIT,
|
||||
T_COMMIT_RECORD,
|
||||
T_FINISHED
|
||||
} t_state;
|
||||
|
||||
|
|
@ -991,6 +991,7 @@ int journal_start_commit(journal_t *journal, tid_t *tid);
|
|||
int journal_force_commit_nested(journal_t *journal);
|
||||
int log_wait_commit(journal_t *journal, tid_t tid);
|
||||
int log_do_checkpoint(journal_t *journal);
|
||||
int journal_trans_will_send_data_barrier(journal_t *journal, tid_t tid);
|
||||
|
||||
void __log_wait_for_space(journal_t *journal);
|
||||
extern void __journal_drop_transaction(journal_t *, transaction_t *);
|
||||
|
|
|
|||
|
|
@ -215,8 +215,8 @@ union jffs2_node_union
|
|||
|
||||
/* Data payload for device nodes. */
|
||||
union jffs2_device_node {
|
||||
jint16_t old;
|
||||
jint32_t new;
|
||||
jint16_t old_id;
|
||||
jint32_t new_id;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_JFFS2_H__ */
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ struct js_event {
|
|||
#define JSIOCSCORR _IOW('j', 0x21, struct js_corr) /* set correction values */
|
||||
#define JSIOCGCORR _IOR('j', 0x22, struct js_corr) /* get correction values */
|
||||
|
||||
#define JSIOCSAXMAP _IOW('j', 0x31, __u8[ABS_MAX + 1]) /* set axis mapping */
|
||||
#define JSIOCGAXMAP _IOR('j', 0x32, __u8[ABS_MAX + 1]) /* get axis mapping */
|
||||
#define JSIOCSAXMAP _IOW('j', 0x31, __u8[ABS_CNT]) /* set axis mapping */
|
||||
#define JSIOCGAXMAP _IOR('j', 0x32, __u8[ABS_CNT]) /* get axis mapping */
|
||||
#define JSIOCSBTNMAP _IOW('j', 0x33, __u16[KEY_MAX - BTN_MISC + 1]) /* set button mapping */
|
||||
#define JSIOCGBTNMAP _IOR('j', 0x34, __u16[KEY_MAX - BTN_MISC + 1]) /* get button mapping */
|
||||
|
||||
|
|
|
|||
117
include/linux/kdb.h
Normal file
117
include/linux/kdb.h
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
#ifndef _KDB_H
|
||||
#define _KDB_H
|
||||
|
||||
/*
|
||||
* Kernel Debugger Architecture Independent Global Headers
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved.
|
||||
* Copyright (C) 2000 Stephane Eranian <eranian@hpl.hp.com>
|
||||
* Copyright (C) 2009 Jason Wessel <jason.wessel@windriver.com>
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_KGDB_KDB
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
#define KDB_POLL_FUNC_MAX 5
|
||||
extern int kdb_poll_idx;
|
||||
|
||||
/*
|
||||
* kdb_initial_cpu is initialized to -1, and is set to the cpu
|
||||
* number whenever the kernel debugger is entered.
|
||||
*/
|
||||
extern int kdb_initial_cpu;
|
||||
extern atomic_t kdb_event;
|
||||
|
||||
/*
|
||||
* kdb_diemsg
|
||||
*
|
||||
* Contains a pointer to the last string supplied to the
|
||||
* kernel 'die' panic function.
|
||||
*/
|
||||
extern const char *kdb_diemsg;
|
||||
|
||||
#define KDB_FLAG_EARLYKDB (1 << 0) /* set from boot parameter kdb=early */
|
||||
#define KDB_FLAG_CATASTROPHIC (1 << 1) /* A catastrophic event has occurred */
|
||||
#define KDB_FLAG_CMD_INTERRUPT (1 << 2) /* Previous command was interrupted */
|
||||
#define KDB_FLAG_NOIPI (1 << 3) /* Do not send IPIs */
|
||||
#define KDB_FLAG_ONLY_DO_DUMP (1 << 4) /* Only do a dump, used when
|
||||
* kdb is off */
|
||||
#define KDB_FLAG_NO_CONSOLE (1 << 5) /* No console is available,
|
||||
* kdb is disabled */
|
||||
#define KDB_FLAG_NO_VT_CONSOLE (1 << 6) /* No VT console is available, do
|
||||
* not use keyboard */
|
||||
#define KDB_FLAG_NO_I8042 (1 << 7) /* No i8042 chip is available, do
|
||||
* not use keyboard */
|
||||
|
||||
extern int kdb_flags; /* Global flags, see kdb_state for per cpu state */
|
||||
|
||||
extern void kdb_save_flags(void);
|
||||
extern void kdb_restore_flags(void);
|
||||
|
||||
#define KDB_FLAG(flag) (kdb_flags & KDB_FLAG_##flag)
|
||||
#define KDB_FLAG_SET(flag) ((void)(kdb_flags |= KDB_FLAG_##flag))
|
||||
#define KDB_FLAG_CLEAR(flag) ((void)(kdb_flags &= ~KDB_FLAG_##flag))
|
||||
|
||||
/*
|
||||
* External entry point for the kernel debugger. The pt_regs
|
||||
* at the time of entry are supplied along with the reason for
|
||||
* entry to the kernel debugger.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
KDB_REASON_ENTER = 1, /* KDB_ENTER() trap/fault - regs valid */
|
||||
KDB_REASON_ENTER_SLAVE, /* KDB_ENTER_SLAVE() trap/fault - regs valid */
|
||||
KDB_REASON_BREAK, /* Breakpoint inst. - regs valid */
|
||||
KDB_REASON_DEBUG, /* Debug Fault - regs valid */
|
||||
KDB_REASON_OOPS, /* Kernel Oops - regs valid */
|
||||
KDB_REASON_SWITCH, /* CPU switch - regs valid*/
|
||||
KDB_REASON_KEYBOARD, /* Keyboard entry - regs valid */
|
||||
KDB_REASON_NMI, /* Non-maskable interrupt; regs valid */
|
||||
KDB_REASON_RECURSE, /* Recursive entry to kdb;
|
||||
* regs probably valid */
|
||||
KDB_REASON_SSTEP, /* Single Step trap. - regs valid */
|
||||
} kdb_reason_t;
|
||||
|
||||
extern int kdb_trap_printk;
|
||||
extern int vkdb_printf(const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
extern int kdb_printf(const char *, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
typedef int (*kdb_printf_t)(const char *, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
extern void kdb_init(int level);
|
||||
|
||||
/* Access to kdb specific polling devices */
|
||||
typedef int (*get_char_func)(void);
|
||||
extern get_char_func kdb_poll_funcs[];
|
||||
extern int kdb_get_kbd_char(void);
|
||||
|
||||
static inline
|
||||
int kdb_process_cpu(const struct task_struct *p)
|
||||
{
|
||||
unsigned int cpu = task_thread_info(p)->cpu;
|
||||
if (cpu > num_possible_cpus())
|
||||
cpu = 0;
|
||||
return cpu;
|
||||
}
|
||||
|
||||
/* kdb access to register set for stack dumping */
|
||||
extern struct pt_regs *kdb_current_regs;
|
||||
|
||||
#else /* ! CONFIG_KGDB_KDB */
|
||||
#define kdb_printf(...)
|
||||
#define kdb_init(x)
|
||||
#endif /* CONFIG_KGDB_KDB */
|
||||
enum {
|
||||
KDB_NOT_INITIALIZED,
|
||||
KDB_INIT_EARLY,
|
||||
KDB_INIT_FULL,
|
||||
};
|
||||
#endif /* !_KDB_H */
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
extern const char linux_banner[];
|
||||
extern const char linux_proc_banner[];
|
||||
|
||||
#define USHORT_MAX ((u16)(~0U))
|
||||
#define SHORT_MAX ((s16)(USHORT_MAX>>1))
|
||||
#define SHORT_MIN (-SHORT_MAX - 1)
|
||||
#define USHRT_MAX ((u16)(~0U))
|
||||
#define SHRT_MAX ((s16)(USHRT_MAX>>1))
|
||||
#define SHRT_MIN ((s16)(-SHRT_MAX - 1))
|
||||
#define INT_MAX ((int)(~0U>>1))
|
||||
#define INT_MIN (-INT_MAX - 1)
|
||||
#define UINT_MAX (~0U)
|
||||
|
|
@ -346,6 +346,7 @@ extern enum system_states {
|
|||
#define TAINT_OVERRIDDEN_ACPI_TABLE 8
|
||||
#define TAINT_WARN 9
|
||||
#define TAINT_CRAP 10
|
||||
#define TAINT_FIRMWARE_WORKAROUND 11
|
||||
|
||||
extern void dump_stack(void) __cold;
|
||||
|
||||
|
|
@ -374,6 +375,8 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
|||
return buf;
|
||||
}
|
||||
|
||||
extern int hex_to_bin(char ch);
|
||||
|
||||
#ifndef pr_fmt
|
||||
#define pr_fmt(fmt) fmt
|
||||
#endif
|
||||
|
|
@ -388,6 +391,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
|||
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warning(fmt, ...) \
|
||||
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warn pr_warning
|
||||
#define pr_notice(fmt, ...) \
|
||||
printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_info(fmt, ...) \
|
||||
|
|
@ -422,14 +426,13 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
|||
* no local ratelimit_state used in the !PRINTK case
|
||||
*/
|
||||
#ifdef CONFIG_PRINTK
|
||||
#define printk_ratelimited(fmt, ...) ({ \
|
||||
static struct ratelimit_state _rs = { \
|
||||
.interval = DEFAULT_RATELIMIT_INTERVAL, \
|
||||
.burst = DEFAULT_RATELIMIT_BURST, \
|
||||
}; \
|
||||
\
|
||||
if (__ratelimit(&_rs)) \
|
||||
printk(fmt, ##__VA_ARGS__); \
|
||||
#define printk_ratelimited(fmt, ...) ({ \
|
||||
static DEFINE_RATELIMIT_STATE(_rs, \
|
||||
DEFAULT_RATELIMIT_INTERVAL, \
|
||||
DEFAULT_RATELIMIT_BURST); \
|
||||
\
|
||||
if (__ratelimit(&_rs)) \
|
||||
printk(fmt, ##__VA_ARGS__); \
|
||||
})
|
||||
#else
|
||||
/* No effect, but we still get type checking even in the !PRINTK case: */
|
||||
|
|
@ -446,6 +449,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
|||
printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warning_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warn_ratelimited pr_warning_ratelimited
|
||||
#define pr_notice_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_info_ratelimited(fmt, ...) \
|
||||
|
|
|
|||
|
|
@ -16,10 +16,12 @@
|
|||
#include <linux/serial_8250.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
#ifdef CONFIG_HAVE_ARCH_KGDB
|
||||
#include <asm/kgdb.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KGDB
|
||||
struct pt_regs;
|
||||
|
||||
/**
|
||||
|
|
@ -33,20 +35,6 @@ struct pt_regs;
|
|||
*/
|
||||
extern int kgdb_skipexception(int exception, struct pt_regs *regs);
|
||||
|
||||
/**
|
||||
* kgdb_post_primary_code - (optional) Save error vector/code numbers.
|
||||
* @regs: Original pt_regs.
|
||||
* @e_vector: Original error vector.
|
||||
* @err_code: Original error code.
|
||||
*
|
||||
* This is usually needed on architectures which support SMP and
|
||||
* KGDB. This function is called after all the secondary cpus have
|
||||
* been put to a know spin state and the primary CPU has control over
|
||||
* KGDB.
|
||||
*/
|
||||
extern void kgdb_post_primary_code(struct pt_regs *regs, int e_vector,
|
||||
int err_code);
|
||||
|
||||
/**
|
||||
* kgdb_disable_hw_debug - (optional) Disable hardware debugging hook
|
||||
* @regs: Current &struct pt_regs.
|
||||
|
|
@ -72,6 +60,7 @@ struct uart_port;
|
|||
void kgdb_breakpoint(void);
|
||||
|
||||
extern int kgdb_connected;
|
||||
extern int kgdb_io_module_registered;
|
||||
|
||||
extern atomic_t kgdb_setting_breakpoint;
|
||||
extern atomic_t kgdb_cpu_doing_single_step;
|
||||
|
|
@ -202,11 +191,33 @@ kgdb_arch_handle_exception(int vector, int signo, int err_code,
|
|||
*/
|
||||
extern void kgdb_roundup_cpus(unsigned long flags);
|
||||
|
||||
/**
|
||||
* kgdb_arch_set_pc - Generic call back to the program counter
|
||||
* @regs: Current &struct pt_regs.
|
||||
* @pc: The new value for the program counter
|
||||
*
|
||||
* This function handles updating the program counter and requires an
|
||||
* architecture specific implementation.
|
||||
*/
|
||||
extern void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc);
|
||||
|
||||
|
||||
/* Optional functions. */
|
||||
extern int kgdb_validate_break_address(unsigned long addr);
|
||||
extern int kgdb_arch_set_breakpoint(unsigned long addr, char *saved_instr);
|
||||
extern int kgdb_arch_remove_breakpoint(unsigned long addr, char *bundle);
|
||||
|
||||
/**
|
||||
* kgdb_arch_late - Perform any architecture specific initalization.
|
||||
*
|
||||
* This function will handle the late initalization of any
|
||||
* architecture specific callbacks. This is an optional function for
|
||||
* handling things like late initialization of hw breakpoints. The
|
||||
* default implementation does nothing.
|
||||
*/
|
||||
extern void kgdb_arch_late(void);
|
||||
|
||||
|
||||
/**
|
||||
* struct kgdb_arch - Describe architecture specific values.
|
||||
* @gdb_bpt_instr: The instruction to trigger a breakpoint.
|
||||
|
|
@ -247,6 +258,8 @@ struct kgdb_arch {
|
|||
* the I/O driver.
|
||||
* @post_exception: Pointer to a function that will do any cleanup work
|
||||
* for the I/O driver.
|
||||
* @is_console: 1 if the end device is a console 0 if the I/O device is
|
||||
* not a console
|
||||
*/
|
||||
struct kgdb_io {
|
||||
const char *name;
|
||||
|
|
@ -256,6 +269,7 @@ struct kgdb_io {
|
|||
int (*init) (void);
|
||||
void (*pre_exception) (void);
|
||||
void (*post_exception) (void);
|
||||
int is_console;
|
||||
};
|
||||
|
||||
extern struct kgdb_arch arch_kgdb_ops;
|
||||
|
|
@ -264,12 +278,14 @@ extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs);
|
|||
|
||||
extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
|
||||
extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops);
|
||||
extern struct kgdb_io *dbg_io_ops;
|
||||
|
||||
extern int kgdb_hex2long(char **ptr, unsigned long *long_val);
|
||||
extern int kgdb_mem2hex(char *mem, char *buf, int count);
|
||||
extern int kgdb_hex2mem(char *buf, char *mem, int count);
|
||||
|
||||
extern int kgdb_isremovedbreak(unsigned long addr);
|
||||
extern void kgdb_schedule_breakpoint(void);
|
||||
|
||||
extern int
|
||||
kgdb_handle_exception(int ex_vector, int signo, int err_code,
|
||||
|
|
@ -278,5 +294,12 @@ extern int kgdb_nmicallback(int cpu, void *regs);
|
|||
|
||||
extern int kgdb_single_step;
|
||||
extern atomic_t kgdb_active;
|
||||
|
||||
#define in_dbg_master() \
|
||||
(raw_smp_processor_id() == atomic_read(&kgdb_active))
|
||||
extern bool dbg_is_early;
|
||||
extern void __init dbg_late_init(void);
|
||||
#else /* ! CONFIG_KGDB */
|
||||
#define in_dbg_master() (0)
|
||||
#define dbg_late_init()
|
||||
#endif /* ! CONFIG_KGDB */
|
||||
#endif /* _KGDB_H_ */
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/stddef.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#define KMOD_PATH_LEN 256
|
||||
|
||||
|
|
@ -45,19 +46,6 @@ static inline int request_module_nowait(const char *name, ...) { return -ENOSYS;
|
|||
|
||||
struct key;
|
||||
struct file;
|
||||
struct subprocess_info;
|
||||
|
||||
/* Allocate a subprocess_info structure */
|
||||
struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
|
||||
char **envp, gfp_t gfp_mask);
|
||||
|
||||
/* Set various pieces of state into the subprocess_info structure */
|
||||
void call_usermodehelper_setkeys(struct subprocess_info *info,
|
||||
struct key *session_keyring);
|
||||
int call_usermodehelper_stdinpipe(struct subprocess_info *sub_info,
|
||||
struct file **filp);
|
||||
void call_usermodehelper_setcleanup(struct subprocess_info *info,
|
||||
void (*cleanup)(char **argv, char **envp));
|
||||
|
||||
enum umh_wait {
|
||||
UMH_NO_WAIT = -1, /* don't wait at all */
|
||||
|
|
@ -65,6 +53,29 @@ enum umh_wait {
|
|||
UMH_WAIT_PROC = 1, /* wait for the process to complete */
|
||||
};
|
||||
|
||||
struct subprocess_info {
|
||||
struct work_struct work;
|
||||
struct completion *complete;
|
||||
char *path;
|
||||
char **argv;
|
||||
char **envp;
|
||||
enum umh_wait wait;
|
||||
int retval;
|
||||
int (*init)(struct subprocess_info *info);
|
||||
void (*cleanup)(struct subprocess_info *info);
|
||||
void *data;
|
||||
};
|
||||
|
||||
/* Allocate a subprocess_info structure */
|
||||
struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
|
||||
char **envp, gfp_t gfp_mask);
|
||||
|
||||
/* Set various pieces of state into the subprocess_info structure */
|
||||
void call_usermodehelper_setfns(struct subprocess_info *info,
|
||||
int (*init)(struct subprocess_info *info),
|
||||
void (*cleanup)(struct subprocess_info *info),
|
||||
void *data);
|
||||
|
||||
/* Actually execute the sub-process */
|
||||
int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait);
|
||||
|
||||
|
|
@ -73,38 +84,33 @@ int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait);
|
|||
void call_usermodehelper_freeinfo(struct subprocess_info *info);
|
||||
|
||||
static inline int
|
||||
call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait)
|
||||
call_usermodehelper_fns(char *path, char **argv, char **envp,
|
||||
enum umh_wait wait,
|
||||
int (*init)(struct subprocess_info *info),
|
||||
void (*cleanup)(struct subprocess_info *), void *data)
|
||||
{
|
||||
struct subprocess_info *info;
|
||||
gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL;
|
||||
|
||||
info = call_usermodehelper_setup(path, argv, envp, gfp_mask);
|
||||
|
||||
if (info == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
call_usermodehelper_setfns(info, init, cleanup, data);
|
||||
|
||||
return call_usermodehelper_exec(info, wait);
|
||||
}
|
||||
|
||||
static inline int
|
||||
call_usermodehelper_keys(char *path, char **argv, char **envp,
|
||||
struct key *session_keyring, enum umh_wait wait)
|
||||
call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait)
|
||||
{
|
||||
struct subprocess_info *info;
|
||||
gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL;
|
||||
|
||||
info = call_usermodehelper_setup(path, argv, envp, gfp_mask);
|
||||
if (info == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
call_usermodehelper_setkeys(info, session_keyring);
|
||||
return call_usermodehelper_exec(info, wait);
|
||||
return call_usermodehelper_fns(path, argv, envp, wait,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
extern void usermodehelper_init(void);
|
||||
|
||||
struct file;
|
||||
extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[],
|
||||
struct file **filp);
|
||||
|
||||
extern int usermodehelper_disable(void);
|
||||
extern void usermodehelper_enable(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ struct kobj_type {
|
|||
void (*release)(struct kobject *kobj);
|
||||
const struct sysfs_ops *sysfs_ops;
|
||||
struct attribute **default_attrs;
|
||||
const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj);
|
||||
const void *(*namespace)(struct kobject *kobj);
|
||||
};
|
||||
|
||||
struct kobj_uevent_env {
|
||||
|
|
@ -134,6 +136,42 @@ struct kobj_attribute {
|
|||
|
||||
extern const struct sysfs_ops kobj_sysfs_ops;
|
||||
|
||||
/*
|
||||
* Namespace types which are used to tag kobjects and sysfs entries.
|
||||
* Network namespace will likely be the first.
|
||||
*/
|
||||
enum kobj_ns_type {
|
||||
KOBJ_NS_TYPE_NONE = 0,
|
||||
KOBJ_NS_TYPE_NET,
|
||||
KOBJ_NS_TYPES
|
||||
};
|
||||
|
||||
struct sock;
|
||||
|
||||
/*
|
||||
* Callbacks so sysfs can determine namespaces
|
||||
* @current_ns: return calling task's namespace
|
||||
* @netlink_ns: return namespace to which a sock belongs (right?)
|
||||
* @initial_ns: return the initial namespace (i.e. init_net_ns)
|
||||
*/
|
||||
struct kobj_ns_type_operations {
|
||||
enum kobj_ns_type type;
|
||||
const void *(*current_ns)(void);
|
||||
const void *(*netlink_ns)(struct sock *sk);
|
||||
const void *(*initial_ns)(void);
|
||||
};
|
||||
|
||||
int kobj_ns_type_register(const struct kobj_ns_type_operations *ops);
|
||||
int kobj_ns_type_registered(enum kobj_ns_type type);
|
||||
const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent);
|
||||
const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj);
|
||||
|
||||
const void *kobj_ns_current(enum kobj_ns_type type);
|
||||
const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk);
|
||||
const void *kobj_ns_initial(enum kobj_ns_type type);
|
||||
void kobj_ns_exit(enum kobj_ns_type type, const void *ns);
|
||||
|
||||
|
||||
/**
|
||||
* struct kset - a set of kobjects of a specific type, belonging to a specific subsystem.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ struct kref {
|
|||
atomic_t refcount;
|
||||
};
|
||||
|
||||
void kref_set(struct kref *kref, int num);
|
||||
void kref_init(struct kref *kref);
|
||||
void kref_get(struct kref *kref);
|
||||
int kref_put(struct kref *kref, void (*release) (struct kref *kref));
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ struct kvm_pit_config {
|
|||
#define KVM_EXIT_DCR 15
|
||||
#define KVM_EXIT_NMI 16
|
||||
#define KVM_EXIT_INTERNAL_ERROR 17
|
||||
#define KVM_EXIT_OSI 18
|
||||
|
||||
/* For KVM_EXIT_INTERNAL_ERROR */
|
||||
#define KVM_INTERNAL_ERROR_EMULATION 1
|
||||
|
|
@ -259,6 +260,10 @@ struct kvm_run {
|
|||
__u32 ndata;
|
||||
__u64 data[16];
|
||||
} internal;
|
||||
/* KVM_EXIT_OSI */
|
||||
struct {
|
||||
__u64 gprs[32];
|
||||
} osi;
|
||||
/* Fix the size of the union. */
|
||||
char padding[256];
|
||||
};
|
||||
|
|
@ -400,6 +405,15 @@ struct kvm_ioeventfd {
|
|||
__u8 pad[36];
|
||||
};
|
||||
|
||||
/* for KVM_ENABLE_CAP */
|
||||
struct kvm_enable_cap {
|
||||
/* in */
|
||||
__u32 cap;
|
||||
__u32 flags;
|
||||
__u64 args[4];
|
||||
__u8 pad[64];
|
||||
};
|
||||
|
||||
#define KVMIO 0xAE
|
||||
|
||||
/*
|
||||
|
|
@ -501,7 +515,15 @@ struct kvm_ioeventfd {
|
|||
#define KVM_CAP_HYPERV_VAPIC 45
|
||||
#define KVM_CAP_HYPERV_SPIN 46
|
||||
#define KVM_CAP_PCI_SEGMENT 47
|
||||
#define KVM_CAP_PPC_PAIRED_SINGLES 48
|
||||
#define KVM_CAP_INTR_SHADOW 49
|
||||
#ifdef __KVM_HAVE_DEBUGREGS
|
||||
#define KVM_CAP_DEBUGREGS 50
|
||||
#endif
|
||||
#define KVM_CAP_X86_ROBUST_SINGLESTEP 51
|
||||
#define KVM_CAP_PPC_OSI 52
|
||||
#define KVM_CAP_PPC_UNSET_IRQ 53
|
||||
#define KVM_CAP_ENABLE_CAP 54
|
||||
|
||||
#ifdef KVM_CAP_IRQ_ROUTING
|
||||
|
||||
|
|
@ -688,6 +710,10 @@ struct kvm_clock_data {
|
|||
/* Available with KVM_CAP_VCPU_EVENTS */
|
||||
#define KVM_GET_VCPU_EVENTS _IOR(KVMIO, 0x9f, struct kvm_vcpu_events)
|
||||
#define KVM_SET_VCPU_EVENTS _IOW(KVMIO, 0xa0, struct kvm_vcpu_events)
|
||||
/* Available with KVM_CAP_DEBUGREGS */
|
||||
#define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs)
|
||||
#define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs)
|
||||
#define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap)
|
||||
|
||||
#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,12 @@ struct kvm_vcpu {
|
|||
struct kvm_vcpu_arch arch;
|
||||
};
|
||||
|
||||
/*
|
||||
* Some of the bitops functions do not support too long bitmaps.
|
||||
* This number must be determined not to exceed such limits.
|
||||
*/
|
||||
#define KVM_MEM_MAX_NR_PAGES ((1UL << 31) - 1)
|
||||
|
||||
struct kvm_memory_slot {
|
||||
gfn_t base_gfn;
|
||||
unsigned long npages;
|
||||
|
|
@ -237,17 +243,23 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
|
|||
void vcpu_load(struct kvm_vcpu *vcpu);
|
||||
void vcpu_put(struct kvm_vcpu *vcpu);
|
||||
|
||||
int kvm_init(void *opaque, unsigned int vcpu_size,
|
||||
int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
|
||||
struct module *module);
|
||||
void kvm_exit(void);
|
||||
|
||||
void kvm_get_kvm(struct kvm *kvm);
|
||||
void kvm_put_kvm(struct kvm *kvm);
|
||||
|
||||
static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm)
|
||||
{
|
||||
return rcu_dereference_check(kvm->memslots,
|
||||
srcu_read_lock_held(&kvm->srcu)
|
||||
|| lockdep_is_held(&kvm->slots_lock));
|
||||
}
|
||||
|
||||
#define HPA_MSB ((sizeof(hpa_t) * 8) - 1)
|
||||
#define HPA_ERR_MASK ((hpa_t)1 << HPA_MSB)
|
||||
static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; }
|
||||
struct page *gva_to_page(struct kvm_vcpu *vcpu, gva_t gva);
|
||||
|
||||
extern struct page *bad_page;
|
||||
extern pfn_t bad_pfn;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,29 @@ struct lcd_device {
|
|||
struct device dev;
|
||||
};
|
||||
|
||||
struct lcd_platform_data {
|
||||
/* reset lcd panel device. */
|
||||
int (*reset)(struct lcd_device *ld);
|
||||
/* on or off to lcd panel. if 'enable' is 0 then
|
||||
lcd power off and 1, lcd power on. */
|
||||
int (*power_on)(struct lcd_device *ld, int enable);
|
||||
|
||||
/* it indicates whether lcd panel was enabled
|
||||
from bootloader or not. */
|
||||
int lcd_enabled;
|
||||
/* it means delay for stable time when it becomes low to high
|
||||
or high to low that is dependent on whether reset gpio is
|
||||
low active or high active. */
|
||||
unsigned int reset_delay;
|
||||
/* stable time needing to become lcd power on. */
|
||||
unsigned int power_on_delay;
|
||||
/* stable time needing to become lcd power off. */
|
||||
unsigned int power_off_delay;
|
||||
|
||||
/* it could be used for any purpose. */
|
||||
void *pdata;
|
||||
};
|
||||
|
||||
static inline void lcd_set_power(struct lcd_device *ld, int power)
|
||||
{
|
||||
mutex_lock(&ld->update_lock);
|
||||
|
|
|
|||
|
|
@ -149,14 +149,18 @@ struct gpio_led {
|
|||
unsigned default_state : 2;
|
||||
/* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */
|
||||
};
|
||||
#define LEDS_GPIO_DEFSTATE_OFF 0
|
||||
#define LEDS_GPIO_DEFSTATE_ON 1
|
||||
#define LEDS_GPIO_DEFSTATE_KEEP 2
|
||||
#define LEDS_GPIO_DEFSTATE_OFF 0
|
||||
#define LEDS_GPIO_DEFSTATE_ON 1
|
||||
#define LEDS_GPIO_DEFSTATE_KEEP 2
|
||||
|
||||
struct gpio_led_platform_data {
|
||||
int num_leds;
|
||||
struct gpio_led *leds;
|
||||
int (*gpio_blink_set)(unsigned gpio,
|
||||
|
||||
#define GPIO_LED_NO_BLINK_LOW 0 /* No blink GPIO state low */
|
||||
#define GPIO_LED_NO_BLINK_HIGH 1 /* No blink GPIO state high */
|
||||
#define GPIO_LED_BLINK 2 /* Plase, blink */
|
||||
int (*gpio_blink_set)(unsigned gpio, int state,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -386,6 +386,7 @@ enum {
|
|||
ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */
|
||||
ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */
|
||||
ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */
|
||||
ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */
|
||||
|
||||
/* DMA mask for user DMA control: User visible values; DO NOT
|
||||
renumber */
|
||||
|
|
@ -513,7 +514,9 @@ struct ata_ioports {
|
|||
void __iomem *command_addr;
|
||||
void __iomem *altstatus_addr;
|
||||
void __iomem *ctl_addr;
|
||||
#ifdef CONFIG_ATA_BMDMA
|
||||
void __iomem *bmdma_addr;
|
||||
#endif /* CONFIG_ATA_BMDMA */
|
||||
void __iomem *scr_addr;
|
||||
};
|
||||
#endif /* CONFIG_ATA_SFF */
|
||||
|
|
@ -721,8 +724,10 @@ struct ata_port {
|
|||
u8 ctl; /* cache of ATA control register */
|
||||
u8 last_ctl; /* Cache last written value */
|
||||
struct delayed_work sff_pio_task;
|
||||
#ifdef CONFIG_ATA_BMDMA
|
||||
struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */
|
||||
dma_addr_t bmdma_prd_dma; /* and its DMA mapping */
|
||||
#endif /* CONFIG_ATA_BMDMA */
|
||||
#endif /* CONFIG_ATA_SFF */
|
||||
|
||||
unsigned int pio_mask;
|
||||
|
|
@ -856,10 +861,12 @@ struct ata_port_operations {
|
|||
void (*sff_irq_clear)(struct ata_port *);
|
||||
void (*sff_drain_fifo)(struct ata_queued_cmd *qc);
|
||||
|
||||
#ifdef CONFIG_ATA_BMDMA
|
||||
void (*bmdma_setup)(struct ata_queued_cmd *qc);
|
||||
void (*bmdma_start)(struct ata_queued_cmd *qc);
|
||||
void (*bmdma_stop)(struct ata_queued_cmd *qc);
|
||||
u8 (*bmdma_status)(struct ata_port *ap);
|
||||
#endif /* CONFIG_ATA_BMDMA */
|
||||
#endif /* CONFIG_ATA_SFF */
|
||||
|
||||
ssize_t (*em_show)(struct ata_port *ap, char *buf);
|
||||
|
|
@ -1555,7 +1562,6 @@ extern void sata_pmp_error_handler(struct ata_port *ap);
|
|||
#ifdef CONFIG_ATA_SFF
|
||||
|
||||
extern const struct ata_port_operations ata_sff_port_ops;
|
||||
extern const struct ata_port_operations ata_bmdma_port_ops;
|
||||
extern const struct ata_port_operations ata_bmdma32_port_ops;
|
||||
|
||||
/* PIO only, sg_tablesize and dma_boundary limits can be removed */
|
||||
|
|
@ -1564,11 +1570,6 @@ extern const struct ata_port_operations ata_bmdma32_port_ops;
|
|||
.sg_tablesize = LIBATA_MAX_PRD, \
|
||||
.dma_boundary = ATA_DMA_BOUNDARY
|
||||
|
||||
#define ATA_BMDMA_SHT(drv_name) \
|
||||
ATA_BASE_SHT(drv_name), \
|
||||
.sg_tablesize = LIBATA_MAX_PRD, \
|
||||
.dma_boundary = ATA_DMA_BOUNDARY
|
||||
|
||||
extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device);
|
||||
extern u8 ata_sff_check_status(struct ata_port *ap);
|
||||
extern void ata_sff_pause(struct ata_port *ap);
|
||||
|
|
@ -1593,7 +1594,7 @@ extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
|
|||
extern void ata_sff_queue_pio_task(struct ata_port *ap, unsigned long delay);
|
||||
extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc);
|
||||
extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc);
|
||||
extern unsigned int ata_sff_host_intr(struct ata_port *ap,
|
||||
extern unsigned int ata_sff_port_intr(struct ata_port *ap,
|
||||
struct ata_queued_cmd *qc);
|
||||
extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance);
|
||||
extern void ata_sff_lost_interrupt(struct ata_port *ap);
|
||||
|
|
@ -1625,11 +1626,24 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev,
|
|||
struct scsi_host_template *sht, void *host_priv, int hflags);
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
#ifdef CONFIG_ATA_BMDMA
|
||||
|
||||
extern const struct ata_port_operations ata_bmdma_port_ops;
|
||||
|
||||
#define ATA_BMDMA_SHT(drv_name) \
|
||||
ATA_BASE_SHT(drv_name), \
|
||||
.sg_tablesize = LIBATA_MAX_PRD, \
|
||||
.dma_boundary = ATA_DMA_BOUNDARY
|
||||
|
||||
extern void ata_bmdma_qc_prep(struct ata_queued_cmd *qc);
|
||||
extern unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc);
|
||||
extern unsigned int ata_bmdma_port_intr(struct ata_port *ap,
|
||||
struct ata_queued_cmd *qc);
|
||||
extern irqreturn_t ata_bmdma_interrupt(int irq, void *dev_instance);
|
||||
extern void ata_bmdma_error_handler(struct ata_port *ap);
|
||||
extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_irq_clear(struct ata_port *ap);
|
||||
extern void ata_bmdma_setup(struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_start(struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
|
||||
|
|
@ -1640,7 +1654,15 @@ extern int ata_bmdma_port_start32(struct ata_port *ap);
|
|||
#ifdef CONFIG_PCI
|
||||
extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev);
|
||||
extern void ata_pci_bmdma_init(struct ata_host *host);
|
||||
extern int ata_pci_bmdma_prepare_host(struct pci_dev *pdev,
|
||||
const struct ata_port_info * const * ppi,
|
||||
struct ata_host **r_host);
|
||||
extern int ata_pci_bmdma_init_one(struct pci_dev *pdev,
|
||||
const struct ata_port_info * const * ppi,
|
||||
struct scsi_host_template *sht,
|
||||
void *host_priv, int hflags);
|
||||
#endif /* CONFIG_PCI */
|
||||
#endif /* CONFIG_ATA_BMDMA */
|
||||
|
||||
/**
|
||||
* ata_sff_busy_wait - Wait for a port status register
|
||||
|
|
|
|||
|
|
@ -25,12 +25,14 @@ struct lis3lv02d_platform_data {
|
|||
#define LIS3_IRQ1_FF_WU_12 (3 << 0)
|
||||
#define LIS3_IRQ1_DATA_READY (4 << 0)
|
||||
#define LIS3_IRQ1_CLICK (7 << 0)
|
||||
#define LIS3_IRQ1_MASK (7 << 0)
|
||||
#define LIS3_IRQ2_DISABLE (0 << 3)
|
||||
#define LIS3_IRQ2_FF_WU_1 (1 << 3)
|
||||
#define LIS3_IRQ2_FF_WU_2 (2 << 3)
|
||||
#define LIS3_IRQ2_FF_WU_12 (3 << 3)
|
||||
#define LIS3_IRQ2_DATA_READY (4 << 3)
|
||||
#define LIS3_IRQ2_CLICK (7 << 3)
|
||||
#define LIS3_IRQ2_MASK (7 << 3)
|
||||
#define LIS3_IRQ_OPEN_DRAIN (1 << 6)
|
||||
#define LIS3_IRQ_ACTIVE_LOW (1 << 7)
|
||||
unsigned char irq_cfg;
|
||||
|
|
@ -43,6 +45,15 @@ struct lis3lv02d_platform_data {
|
|||
#define LIS3_WAKEUP_Z_HI (1 << 5)
|
||||
unsigned char wakeup_flags;
|
||||
unsigned char wakeup_thresh;
|
||||
unsigned char wakeup_flags2;
|
||||
unsigned char wakeup_thresh2;
|
||||
#define LIS3_HIPASS_CUTFF_8HZ 0
|
||||
#define LIS3_HIPASS_CUTFF_4HZ 1
|
||||
#define LIS3_HIPASS_CUTFF_2HZ 2
|
||||
#define LIS3_HIPASS_CUTFF_1HZ 3
|
||||
#define LIS3_HIPASS1_DISABLE (1 << 2)
|
||||
#define LIS3_HIPASS2_DISABLE (1 << 3)
|
||||
unsigned char hipass_ctrl;
|
||||
#define LIS3_NO_MAP 0
|
||||
#define LIS3_DEV_X 1
|
||||
#define LIS3_DEV_Y 2
|
||||
|
|
@ -58,6 +69,7 @@ struct lis3lv02d_platform_data {
|
|||
/* Limits for selftest are specified in chip data sheet */
|
||||
s16 st_min_limits[3]; /* min pass limit x, y, z */
|
||||
s16 st_max_limits[3]; /* max pass limit x, y, z */
|
||||
int irq2;
|
||||
};
|
||||
|
||||
#endif /* __LIS3LV02D_H_ */
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ struct lock_class_key {
|
|||
struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
|
||||
};
|
||||
|
||||
extern struct lock_class_key __lockdep_no_validate__;
|
||||
|
||||
#define LOCKSTAT_POINTS 4
|
||||
|
||||
/*
|
||||
|
|
@ -270,6 +272,9 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
|
|||
#define lockdep_set_subclass(lock, sub) \
|
||||
lockdep_init_map(&(lock)->dep_map, #lock, \
|
||||
(lock)->dep_map.key, sub)
|
||||
|
||||
#define lockdep_set_novalidate_class(lock) \
|
||||
lockdep_set_class(lock, &__lockdep_no_validate__)
|
||||
/*
|
||||
* Compare locking classes
|
||||
*/
|
||||
|
|
@ -354,6 +359,9 @@ static inline void lockdep_on(void)
|
|||
#define lockdep_set_class_and_subclass(lock, key, sub) \
|
||||
do { (void)(key); } while (0)
|
||||
#define lockdep_set_subclass(lock, sub) do { } while (0)
|
||||
|
||||
#define lockdep_set_novalidate_class(lock) do { } while (0)
|
||||
|
||||
/*
|
||||
* We don't define lockdep_match_class() and lockdep_match_key() for !LOCKDEP
|
||||
* case since the result is not well defined and the caller should rather
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include <asm/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <linux/fb.h>
|
||||
|
||||
struct matroxioc_output_mode {
|
||||
__u32 output; /* which output */
|
||||
|
|
@ -37,7 +38,5 @@ enum matroxfb_ctrl_id {
|
|||
MATROXFB_CID_LAST
|
||||
};
|
||||
|
||||
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@ struct page_cgroup;
|
|||
struct page;
|
||||
struct mm_struct;
|
||||
|
||||
extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
|
||||
struct list_head *dst,
|
||||
unsigned long *scanned, int order,
|
||||
int mode, struct zone *z,
|
||||
struct mem_cgroup *mem_cont,
|
||||
int active, int file);
|
||||
|
||||
#ifdef CONFIG_CGROUP_MEM_RES_CTLR
|
||||
/*
|
||||
* All "charge" functions with gfp_mask should use GFP_KERNEL or
|
||||
|
|
@ -64,12 +71,6 @@ extern void mem_cgroup_uncharge_cache_page(struct page *page);
|
|||
extern int mem_cgroup_shmem_charge_fallback(struct page *page,
|
||||
struct mm_struct *mm, gfp_t gfp_mask);
|
||||
|
||||
extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
|
||||
struct list_head *dst,
|
||||
unsigned long *scanned, int order,
|
||||
int mode, struct zone *z,
|
||||
struct mem_cgroup *mem_cont,
|
||||
int active, int file);
|
||||
extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask);
|
||||
int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem);
|
||||
|
||||
|
|
@ -89,7 +90,8 @@ int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup)
|
|||
extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem);
|
||||
|
||||
extern int
|
||||
mem_cgroup_prepare_migration(struct page *page, struct mem_cgroup **ptr);
|
||||
mem_cgroup_prepare_migration(struct page *page,
|
||||
struct page *newpage, struct mem_cgroup **ptr);
|
||||
extern void mem_cgroup_end_migration(struct mem_cgroup *mem,
|
||||
struct page *oldpage, struct page *newpage);
|
||||
|
||||
|
|
@ -226,7 +228,8 @@ static inline struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem)
|
|||
}
|
||||
|
||||
static inline int
|
||||
mem_cgroup_prepare_migration(struct page *page, struct mem_cgroup **ptr)
|
||||
mem_cgroup_prepare_migration(struct page *page, struct page *newpage,
|
||||
struct mem_cgroup **ptr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ static inline int is_mem_section_removable(unsigned long pfn,
|
|||
}
|
||||
#endif /* CONFIG_MEMORY_HOTREMOVE */
|
||||
|
||||
extern int mem_online_node(int nid);
|
||||
extern int add_memory(int nid, u64 start, u64 size);
|
||||
extern int arch_add_memory(int nid, u64 start, u64 size);
|
||||
extern int remove_memory(u64 start, u64 size);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,13 @@ enum {
|
|||
MPOL_MAX, /* always last member of enum */
|
||||
};
|
||||
|
||||
enum mpol_rebind_step {
|
||||
MPOL_REBIND_ONCE, /* do rebind work at once(not by two step) */
|
||||
MPOL_REBIND_STEP1, /* first step(set all the newly nodes) */
|
||||
MPOL_REBIND_STEP2, /* second step(clean all the disallowed nodes)*/
|
||||
MPOL_REBIND_NSTEP,
|
||||
};
|
||||
|
||||
/* Flags for set_mempolicy */
|
||||
#define MPOL_F_STATIC_NODES (1 << 15)
|
||||
#define MPOL_F_RELATIVE_NODES (1 << 14)
|
||||
|
|
@ -51,6 +58,7 @@ enum {
|
|||
*/
|
||||
#define MPOL_F_SHARED (1 << 0) /* identify shared policies */
|
||||
#define MPOL_F_LOCAL (1 << 1) /* preferred local allocation */
|
||||
#define MPOL_F_REBINDING (1 << 2) /* identify policies in rebinding */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
|
|
@ -193,8 +201,8 @@ struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp,
|
|||
|
||||
extern void numa_default_policy(void);
|
||||
extern void numa_policy_init(void);
|
||||
extern void mpol_rebind_task(struct task_struct *tsk,
|
||||
const nodemask_t *new);
|
||||
extern void mpol_rebind_task(struct task_struct *tsk, const nodemask_t *new,
|
||||
enum mpol_rebind_step step);
|
||||
extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new);
|
||||
extern void mpol_fix_fork_child_flag(struct task_struct *p);
|
||||
|
||||
|
|
@ -308,7 +316,8 @@ static inline void numa_default_policy(void)
|
|||
}
|
||||
|
||||
static inline void mpol_rebind_task(struct task_struct *tsk,
|
||||
const nodemask_t *new)
|
||||
const nodemask_t *new,
|
||||
enum mpol_rebind_step step)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ enum {
|
|||
PM8607_ID_LDO9,
|
||||
PM8607_ID_LDO10,
|
||||
PM8607_ID_LDO12,
|
||||
PM8607_ID_LDO13,
|
||||
PM8607_ID_LDO14,
|
||||
|
||||
PM8607_ID_RG_MAX,
|
||||
|
|
@ -309,7 +310,7 @@ struct pm860x_chip {
|
|||
|
||||
};
|
||||
|
||||
#define PM8607_MAX_REGULATOR 15 /* 3 Bucks, 12 LDOs */
|
||||
#define PM8607_MAX_REGULATOR PM8607_ID_RG_MAX /* 3 Bucks, 13 LDOs */
|
||||
|
||||
enum {
|
||||
GI2C_PORT = 0,
|
||||
|
|
@ -369,7 +370,7 @@ extern int pm860x_set_bits(struct i2c_client *, int, unsigned char,
|
|||
unsigned char);
|
||||
|
||||
extern int pm860x_device_init(struct pm860x_chip *chip,
|
||||
struct pm860x_platform_data *pdata);
|
||||
extern void pm860x_device_exit(struct pm860x_chip *chip);
|
||||
struct pm860x_platform_data *pdata) __devinit ;
|
||||
extern void pm860x_device_exit(struct pm860x_chip *chip) __devexit ;
|
||||
|
||||
#endif /* __LINUX_MFD_88PM860X_H */
|
||||
|
|
|
|||
|
|
@ -1,262 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2009 ST-Ericsson
|
||||
*
|
||||
* Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* AB4500 device core funtions, for client access
|
||||
*/
|
||||
#ifndef MFD_AB4500_H
|
||||
#define MFD_AB4500_H
|
||||
|
||||
#include <linux/device.h>
|
||||
|
||||
/*
|
||||
* AB4500 bank addresses
|
||||
*/
|
||||
#define AB4500_SYS_CTRL1_BLOCK 0x1
|
||||
#define AB4500_SYS_CTRL2_BLOCK 0x2
|
||||
#define AB4500_REGU_CTRL1 0x3
|
||||
#define AB4500_REGU_CTRL2 0x4
|
||||
#define AB4500_USB 0x5
|
||||
#define AB4500_TVOUT 0x6
|
||||
#define AB4500_DBI 0x7
|
||||
#define AB4500_ECI_AV_ACC 0x8
|
||||
#define AB4500_RESERVED 0x9
|
||||
#define AB4500_GPADC 0xA
|
||||
#define AB4500_CHARGER 0xB
|
||||
#define AB4500_GAS_GAUGE 0xC
|
||||
#define AB4500_AUDIO 0xD
|
||||
#define AB4500_INTERRUPT 0xE
|
||||
#define AB4500_RTC 0xF
|
||||
#define AB4500_MISC 0x10
|
||||
#define AB4500_DEBUG 0x12
|
||||
#define AB4500_PROD_TEST 0x13
|
||||
#define AB4500_OTP_EMUL 0x15
|
||||
|
||||
/*
|
||||
* System control 1 register offsets.
|
||||
* Bank = 0x01
|
||||
*/
|
||||
#define AB4500_TURNON_STAT_REG 0x0100
|
||||
#define AB4500_RESET_STAT_REG 0x0101
|
||||
#define AB4500_PONKEY1_PRESS_STAT_REG 0x0102
|
||||
|
||||
#define AB4500_FSM_STAT1_REG 0x0140
|
||||
#define AB4500_FSM_STAT2_REG 0x0141
|
||||
#define AB4500_SYSCLK_REQ_STAT_REG 0x0142
|
||||
#define AB4500_USB_STAT1_REG 0x0143
|
||||
#define AB4500_USB_STAT2_REG 0x0144
|
||||
#define AB4500_STATUS_SPARE1_REG 0x0145
|
||||
#define AB4500_STATUS_SPARE2_REG 0x0146
|
||||
|
||||
#define AB4500_CTRL1_REG 0x0180
|
||||
#define AB4500_CTRL2_REG 0x0181
|
||||
|
||||
/*
|
||||
* System control 2 register offsets.
|
||||
* bank = 0x02
|
||||
*/
|
||||
#define AB4500_CTRL3_REG 0x0200
|
||||
#define AB4500_MAIN_WDOG_CTRL_REG 0x0201
|
||||
#define AB4500_MAIN_WDOG_TIMER_REG 0x0202
|
||||
#define AB4500_LOW_BAT_REG 0x0203
|
||||
#define AB4500_BATT_OK_REG 0x0204
|
||||
#define AB4500_SYSCLK_TIMER_REG 0x0205
|
||||
#define AB4500_SMPSCLK_CTRL_REG 0x0206
|
||||
#define AB4500_SMPSCLK_SEL1_REG 0x0207
|
||||
#define AB4500_SMPSCLK_SEL2_REG 0x0208
|
||||
#define AB4500_SMPSCLK_SEL3_REG 0x0209
|
||||
#define AB4500_SYSULPCLK_CONF_REG 0x020A
|
||||
#define AB4500_SYSULPCLK_CTRL1_REG 0x020B
|
||||
#define AB4500_SYSCLK_CTRL_REG 0x020C
|
||||
#define AB4500_SYSCLK_REQ1_VALID_REG 0x020D
|
||||
#define AB4500_SYSCLK_REQ_VALID_REG 0x020E
|
||||
#define AB4500_SYSCTRL_SPARE_REG 0x020F
|
||||
#define AB4500_PAD_CONF_REG 0x0210
|
||||
|
||||
/*
|
||||
* Regu control1 register offsets
|
||||
* Bank = 0x03
|
||||
*/
|
||||
#define AB4500_REGU_SERIAL_CTRL1_REG 0x0300
|
||||
#define AB4500_REGU_SERIAL_CTRL2_REG 0x0301
|
||||
#define AB4500_REGU_SERIAL_CTRL3_REG 0x0302
|
||||
#define AB4500_REGU_REQ_CTRL1_REG 0x0303
|
||||
#define AB4500_REGU_REQ_CTRL2_REG 0x0304
|
||||
#define AB4500_REGU_REQ_CTRL3_REG 0x0305
|
||||
#define AB4500_REGU_REQ_CTRL4_REG 0x0306
|
||||
#define AB4500_REGU_MISC1_REG 0x0380
|
||||
#define AB4500_REGU_OTGSUPPLY_CTRL_REG 0x0381
|
||||
#define AB4500_REGU_VUSB_CTRL_REG 0x0382
|
||||
#define AB4500_REGU_VAUDIO_SUPPLY_REG 0x0383
|
||||
#define AB4500_REGU_CTRL1_SPARE_REG 0x0384
|
||||
|
||||
/*
|
||||
* Regu control2 Vmod register offsets
|
||||
*/
|
||||
#define AB4500_REGU_VMOD_REGU_REG 0x0440
|
||||
#define AB4500_REGU_VMOD_SEL1_REG 0x0441
|
||||
#define AB4500_REGU_VMOD_SEL2_REG 0x0442
|
||||
#define AB4500_REGU_CTRL_DISCH_REG 0x0443
|
||||
#define AB4500_REGU_CTRL_DISCH2_REG 0x0444
|
||||
|
||||
/*
|
||||
* USB/ULPI register offsets
|
||||
* Bank : 0x5
|
||||
*/
|
||||
#define AB4500_USB_LINE_STAT_REG 0x0580
|
||||
#define AB4500_USB_LINE_CTRL1_REG 0x0581
|
||||
#define AB4500_USB_LINE_CTRL2_REG 0x0582
|
||||
#define AB4500_USB_LINE_CTRL3_REG 0x0583
|
||||
#define AB4500_USB_LINE_CTRL4_REG 0x0584
|
||||
#define AB4500_USB_LINE_CTRL5_REG 0x0585
|
||||
#define AB4500_USB_OTG_CTRL_REG 0x0587
|
||||
#define AB4500_USB_OTG_STAT_REG 0x0588
|
||||
#define AB4500_USB_OTG_STAT_REG 0x0588
|
||||
#define AB4500_USB_CTRL_SPARE_REG 0x0589
|
||||
#define AB4500_USB_PHY_CTRL_REG 0x058A
|
||||
|
||||
/*
|
||||
* TVOUT / CTRL register offsets
|
||||
* Bank : 0x06
|
||||
*/
|
||||
#define AB4500_TVOUT_CTRL_REG 0x0680
|
||||
|
||||
/*
|
||||
* DBI register offsets
|
||||
* Bank : 0x07
|
||||
*/
|
||||
#define AB4500_DBI_REG1_REG 0x0700
|
||||
#define AB4500_DBI_REG2_REG 0x0701
|
||||
|
||||
/*
|
||||
* ECI regsiter offsets
|
||||
* Bank : 0x08
|
||||
*/
|
||||
#define AB4500_ECI_CTRL_REG 0x0800
|
||||
#define AB4500_ECI_HOOKLEVEL_REG 0x0801
|
||||
#define AB4500_ECI_DATAOUT_REG 0x0802
|
||||
#define AB4500_ECI_DATAIN_REG 0x0803
|
||||
|
||||
/*
|
||||
* AV Connector register offsets
|
||||
* Bank : 0x08
|
||||
*/
|
||||
#define AB4500_AV_CONN_REG 0x0840
|
||||
|
||||
/*
|
||||
* Accessory detection register offsets
|
||||
* Bank : 0x08
|
||||
*/
|
||||
#define AB4500_ACC_DET_DB1_REG 0x0880
|
||||
#define AB4500_ACC_DET_DB2_REG 0x0881
|
||||
|
||||
/*
|
||||
* GPADC register offsets
|
||||
* Bank : 0x0A
|
||||
*/
|
||||
#define AB4500_GPADC_CTRL1_REG 0x0A00
|
||||
#define AB4500_GPADC_CTRL2_REG 0x0A01
|
||||
#define AB4500_GPADC_CTRL3_REG 0x0A02
|
||||
#define AB4500_GPADC_AUTO_TIMER_REG 0x0A03
|
||||
#define AB4500_GPADC_STAT_REG 0x0A04
|
||||
#define AB4500_GPADC_MANDATAL_REG 0x0A05
|
||||
#define AB4500_GPADC_MANDATAH_REG 0x0A06
|
||||
#define AB4500_GPADC_AUTODATAL_REG 0x0A07
|
||||
#define AB4500_GPADC_AUTODATAH_REG 0x0A08
|
||||
#define AB4500_GPADC_MUX_CTRL_REG 0x0A09
|
||||
|
||||
/*
|
||||
* Charger / status register offfsets
|
||||
* Bank : 0x0B
|
||||
*/
|
||||
#define AB4500_CH_STATUS1_REG 0x0B00
|
||||
#define AB4500_CH_STATUS2_REG 0x0B01
|
||||
#define AB4500_CH_USBCH_STAT1_REG 0x0B02
|
||||
#define AB4500_CH_USBCH_STAT2_REG 0x0B03
|
||||
#define AB4500_CH_FSM_STAT_REG 0x0B04
|
||||
#define AB4500_CH_STAT_REG 0x0B05
|
||||
|
||||
/*
|
||||
* Charger / control register offfsets
|
||||
* Bank : 0x0B
|
||||
*/
|
||||
#define AB4500_CH_VOLT_LVL_REG 0x0B40
|
||||
|
||||
/*
|
||||
* Charger / main control register offfsets
|
||||
* Bank : 0x0B
|
||||
*/
|
||||
#define AB4500_MCH_CTRL1 0x0B80
|
||||
#define AB4500_MCH_CTRL2 0x0B81
|
||||
#define AB4500_MCH_IPT_CURLVL_REG 0x0B82
|
||||
#define AB4500_CH_WD_REG 0x0B83
|
||||
|
||||
/*
|
||||
* Charger / USB control register offsets
|
||||
* Bank : 0x0B
|
||||
*/
|
||||
#define AB4500_USBCH_CTRL1_REG 0x0BC0
|
||||
#define AB4500_USBCH_CTRL2_REG 0x0BC1
|
||||
#define AB4500_USBCH_IPT_CRNTLVL_REG 0x0BC2
|
||||
|
||||
/*
|
||||
* RTC bank register offsets
|
||||
* Bank : 0xF
|
||||
*/
|
||||
#define AB4500_RTC_SOFF_STAT_REG 0x0F00
|
||||
#define AB4500_RTC_CC_CONF_REG 0x0F01
|
||||
#define AB4500_RTC_READ_REQ_REG 0x0F02
|
||||
#define AB4500_RTC_WATCH_TSECMID_REG 0x0F03
|
||||
#define AB4500_RTC_WATCH_TSECHI_REG 0x0F04
|
||||
#define AB4500_RTC_WATCH_TMIN_LOW_REG 0x0F05
|
||||
#define AB4500_RTC_WATCH_TMIN_MID_REG 0x0F06
|
||||
#define AB4500_RTC_WATCH_TMIN_HI_REG 0x0F07
|
||||
#define AB4500_RTC_ALRM_MIN_LOW_REG 0x0F08
|
||||
#define AB4500_RTC_ALRM_MIN_MID_REG 0x0F09
|
||||
#define AB4500_RTC_ALRM_MIN_HI_REG 0x0F0A
|
||||
#define AB4500_RTC_STAT_REG 0x0F0B
|
||||
#define AB4500_RTC_BKUP_CHG_REG 0x0F0C
|
||||
#define AB4500_RTC_FORCE_BKUP_REG 0x0F0D
|
||||
#define AB4500_RTC_CALIB_REG 0x0F0E
|
||||
#define AB4500_RTC_SWITCH_STAT_REG 0x0F0F
|
||||
|
||||
/*
|
||||
* PWM Out generators
|
||||
* Bank: 0x10
|
||||
*/
|
||||
#define AB4500_PWM_OUT_CTRL1_REG 0x1060
|
||||
#define AB4500_PWM_OUT_CTRL2_REG 0x1061
|
||||
#define AB4500_PWM_OUT_CTRL3_REG 0x1062
|
||||
#define AB4500_PWM_OUT_CTRL4_REG 0x1063
|
||||
#define AB4500_PWM_OUT_CTRL5_REG 0x1064
|
||||
#define AB4500_PWM_OUT_CTRL6_REG 0x1065
|
||||
#define AB4500_PWM_OUT_CTRL7_REG 0x1066
|
||||
|
||||
#define AB4500_I2C_PAD_CTRL_REG 0x1067
|
||||
#define AB4500_REV_REG 0x1080
|
||||
|
||||
/**
|
||||
* struct ab4500
|
||||
* @spi: spi device structure
|
||||
* @tx_buf: transmit buffer
|
||||
* @rx_buf: receive buffer
|
||||
* @lock: sync primitive
|
||||
*/
|
||||
struct ab4500 {
|
||||
struct spi_device *spi;
|
||||
unsigned long tx_buf[4];
|
||||
unsigned long rx_buf[4];
|
||||
struct mutex lock;
|
||||
};
|
||||
|
||||
int ab4500_write(struct ab4500 *ab4500, unsigned char block,
|
||||
unsigned long addr, unsigned char data);
|
||||
int ab4500_read(struct ab4500 *ab4500, unsigned char block,
|
||||
unsigned long addr);
|
||||
|
||||
#endif /* MFD_AB4500_H */
|
||||
128
include/linux/mfd/ab8500.h
Normal file
128
include/linux/mfd/ab8500.h
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* Copyright (C) ST-Ericsson SA 2010
|
||||
*
|
||||
* License Terms: GNU General Public License v2
|
||||
* Author: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
|
||||
*/
|
||||
#ifndef MFD_AB8500_H
|
||||
#define MFD_AB8500_H
|
||||
|
||||
#include <linux/device.h>
|
||||
|
||||
/*
|
||||
* Interrupts
|
||||
*/
|
||||
|
||||
#define AB8500_INT_MAIN_EXT_CH_NOT_OK 0
|
||||
#define AB8500_INT_UN_PLUG_TV_DET 1
|
||||
#define AB8500_INT_PLUG_TV_DET 2
|
||||
#define AB8500_INT_TEMP_WARM 3
|
||||
#define AB8500_INT_PON_KEY2DB_F 4
|
||||
#define AB8500_INT_PON_KEY2DB_R 5
|
||||
#define AB8500_INT_PON_KEY1DB_F 6
|
||||
#define AB8500_INT_PON_KEY1DB_R 7
|
||||
#define AB8500_INT_BATT_OVV 8
|
||||
#define AB8500_INT_MAIN_CH_UNPLUG_DET 10
|
||||
#define AB8500_INT_MAIN_CH_PLUG_DET 11
|
||||
#define AB8500_INT_USB_ID_DET_F 12
|
||||
#define AB8500_INT_USB_ID_DET_R 13
|
||||
#define AB8500_INT_VBUS_DET_F 14
|
||||
#define AB8500_INT_VBUS_DET_R 15
|
||||
#define AB8500_INT_VBUS_CH_DROP_END 16
|
||||
#define AB8500_INT_RTC_60S 17
|
||||
#define AB8500_INT_RTC_ALARM 18
|
||||
#define AB8500_INT_BAT_CTRL_INDB 20
|
||||
#define AB8500_INT_CH_WD_EXP 21
|
||||
#define AB8500_INT_VBUS_OVV 22
|
||||
#define AB8500_INT_MAIN_CH_DROP_END 23
|
||||
#define AB8500_INT_CCN_CONV_ACC 24
|
||||
#define AB8500_INT_INT_AUD 25
|
||||
#define AB8500_INT_CCEOC 26
|
||||
#define AB8500_INT_CC_INT_CALIB 27
|
||||
#define AB8500_INT_LOW_BAT_F 28
|
||||
#define AB8500_INT_LOW_BAT_R 29
|
||||
#define AB8500_INT_BUP_CHG_NOT_OK 30
|
||||
#define AB8500_INT_BUP_CHG_OK 31
|
||||
#define AB8500_INT_GP_HW_ADC_CONV_END 32
|
||||
#define AB8500_INT_ACC_DETECT_1DB_F 33
|
||||
#define AB8500_INT_ACC_DETECT_1DB_R 34
|
||||
#define AB8500_INT_ACC_DETECT_22DB_F 35
|
||||
#define AB8500_INT_ACC_DETECT_22DB_R 36
|
||||
#define AB8500_INT_ACC_DETECT_21DB_F 37
|
||||
#define AB8500_INT_ACC_DETECT_21DB_R 38
|
||||
#define AB8500_INT_GP_SW_ADC_CONV_END 39
|
||||
#define AB8500_INT_BTEMP_LOW 72
|
||||
#define AB8500_INT_BTEMP_LOW_MEDIUM 73
|
||||
#define AB8500_INT_BTEMP_MEDIUM_HIGH 74
|
||||
#define AB8500_INT_BTEMP_HIGH 75
|
||||
#define AB8500_INT_USB_CHARGER_NOT_OK 81
|
||||
#define AB8500_INT_ID_WAKEUP_R 82
|
||||
#define AB8500_INT_ID_DET_R1R 84
|
||||
#define AB8500_INT_ID_DET_R2R 85
|
||||
#define AB8500_INT_ID_DET_R3R 86
|
||||
#define AB8500_INT_ID_DET_R4R 87
|
||||
#define AB8500_INT_ID_WAKEUP_F 88
|
||||
#define AB8500_INT_ID_DET_R1F 90
|
||||
#define AB8500_INT_ID_DET_R2F 91
|
||||
#define AB8500_INT_ID_DET_R3F 92
|
||||
#define AB8500_INT_ID_DET_R4F 93
|
||||
#define AB8500_INT_USB_CHG_DET_DONE 94
|
||||
#define AB8500_INT_USB_CH_TH_PROT_F 96
|
||||
#define AB8500_INT_USB_CH_TH_PROP_R 97
|
||||
#define AB8500_INT_MAIN_CH_TH_PROP_F 98
|
||||
#define AB8500_INT_MAIN_CH_TH_PROT_R 99
|
||||
#define AB8500_INT_USB_CHARGER_NOT_OKF 103
|
||||
|
||||
#define AB8500_NR_IRQS 104
|
||||
#define AB8500_NUM_IRQ_REGS 13
|
||||
|
||||
/**
|
||||
* struct ab8500 - ab8500 internal structure
|
||||
* @dev: parent device
|
||||
* @lock: read/write operations lock
|
||||
* @irq_lock: genirq bus lock
|
||||
* @revision: chip revision
|
||||
* @irq: irq line
|
||||
* @write: register write
|
||||
* @read: register read
|
||||
* @rx_buf: rx buf for SPI
|
||||
* @tx_buf: tx buf for SPI
|
||||
* @mask: cache of IRQ regs for bus lock
|
||||
* @oldmask: cache of previous IRQ regs for bus lock
|
||||
*/
|
||||
struct ab8500 {
|
||||
struct device *dev;
|
||||
struct mutex lock;
|
||||
struct mutex irq_lock;
|
||||
int revision;
|
||||
int irq_base;
|
||||
int irq;
|
||||
|
||||
int (*write) (struct ab8500 *a8500, u16 addr, u8 data);
|
||||
int (*read) (struct ab8500 *a8500, u16 addr);
|
||||
|
||||
unsigned long tx_buf[4];
|
||||
unsigned long rx_buf[4];
|
||||
|
||||
u8 mask[AB8500_NUM_IRQ_REGS];
|
||||
u8 oldmask[AB8500_NUM_IRQ_REGS];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ab8500_platform_data - AB8500 platform data
|
||||
* @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used
|
||||
* @init: board-specific initialization after detection of ab8500
|
||||
*/
|
||||
struct ab8500_platform_data {
|
||||
int irq_base;
|
||||
void (*init) (struct ab8500 *);
|
||||
};
|
||||
|
||||
extern int ab8500_write(struct ab8500 *a8500, u16 addr, u8 data);
|
||||
extern int ab8500_read(struct ab8500 *a8500, u16 addr);
|
||||
extern int ab8500_set_bits(struct ab8500 *a8500, u16 addr, u8 mask, u8 data);
|
||||
|
||||
extern int __devinit ab8500_init(struct ab8500 *ab8500);
|
||||
extern int __devexit ab8500_exit(struct ab8500 *ab8500);
|
||||
|
||||
#endif /* MFD_AB8500_H */
|
||||
|
|
@ -3,17 +3,37 @@
|
|||
* License terms: GNU General Public License (GPL) version 2
|
||||
* AB3100 core access functions
|
||||
* Author: Linus Walleij <linus.walleij@stericsson.com>
|
||||
*
|
||||
* ABX500 core access functions.
|
||||
* The abx500 interface is used for the Analog Baseband chip
|
||||
* ab3100, ab3550, ab5500 and possibly comming. It is not used for
|
||||
* ab4500 and ab8500 since they are another family of chip.
|
||||
*
|
||||
* Author: Mattias Wallin <mattias.wallin@stericsson.com>
|
||||
* Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
|
||||
* Author: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
|
||||
* Author: Rickard Andersson <rickard.andersson@stericsson.com>
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
|
||||
#ifndef MFD_AB3100_H
|
||||
#define MFD_AB3100_H
|
||||
#ifndef MFD_ABX500_H
|
||||
#define MFD_ABX500_H
|
||||
|
||||
#define ABUNKNOWN 0
|
||||
#define AB3000 1
|
||||
#define AB3100 2
|
||||
#define AB3100_P1A 0xc0
|
||||
#define AB3100_P1B 0xc1
|
||||
#define AB3100_P1C 0xc2
|
||||
#define AB3100_P1D 0xc3
|
||||
#define AB3100_P1E 0xc4
|
||||
#define AB3100_P1F 0xc5
|
||||
#define AB3100_P1G 0xc6
|
||||
#define AB3100_R2A 0xc7
|
||||
#define AB3100_R2B 0xc8
|
||||
#define AB3550_P1A 0x10
|
||||
#define AB5500_1_0 0x20
|
||||
#define AB5500_2_0 0x21
|
||||
#define AB5500_2_1 0x22
|
||||
|
||||
/*
|
||||
* AB3100, EVENTA1, A2 and A3 event register flags
|
||||
|
|
@ -89,7 +109,7 @@ struct ab3100 {
|
|||
char chip_name[32];
|
||||
u8 chip_id;
|
||||
struct blocking_notifier_head event_subscribers;
|
||||
u32 startup_events;
|
||||
u8 startup_events[3];
|
||||
bool startup_events_read;
|
||||
};
|
||||
|
||||
|
|
@ -112,18 +132,102 @@ struct ab3100_platform_data {
|
|||
int external_voltage;
|
||||
};
|
||||
|
||||
int ab3100_set_register_interruptible(struct ab3100 *ab3100, u8 reg, u8 regval);
|
||||
int ab3100_get_register_interruptible(struct ab3100 *ab3100, u8 reg, u8 *regval);
|
||||
int ab3100_get_register_page_interruptible(struct ab3100 *ab3100,
|
||||
u8 first_reg, u8 *regvals, u8 numregs);
|
||||
int ab3100_mask_and_set_register_interruptible(struct ab3100 *ab3100,
|
||||
u8 reg, u8 andmask, u8 ormask);
|
||||
u8 ab3100_get_chip_type(struct ab3100 *ab3100);
|
||||
int ab3100_event_register(struct ab3100 *ab3100,
|
||||
struct notifier_block *nb);
|
||||
int ab3100_event_unregister(struct ab3100 *ab3100,
|
||||
struct notifier_block *nb);
|
||||
int ab3100_event_registers_startup_state_get(struct ab3100 *ab3100,
|
||||
u32 *fatevent);
|
||||
|
||||
/* AB3550, STR register flags */
|
||||
#define AB3550_STR_ONSWA (0x01)
|
||||
#define AB3550_STR_ONSWB (0x02)
|
||||
#define AB3550_STR_ONSWC (0x04)
|
||||
#define AB3550_STR_DCIO (0x08)
|
||||
#define AB3550_STR_BOOT_MODE (0x10)
|
||||
#define AB3550_STR_SIM_OFF (0x20)
|
||||
#define AB3550_STR_BATT_REMOVAL (0x40)
|
||||
#define AB3550_STR_VBUS (0x80)
|
||||
|
||||
/* Interrupt mask registers */
|
||||
#define AB3550_IMR1 0x29
|
||||
#define AB3550_IMR2 0x2a
|
||||
#define AB3550_IMR3 0x2b
|
||||
#define AB3550_IMR4 0x2c
|
||||
#define AB3550_IMR5 0x2d
|
||||
|
||||
enum ab3550_devid {
|
||||
AB3550_DEVID_ADC,
|
||||
AB3550_DEVID_DAC,
|
||||
AB3550_DEVID_LEDS,
|
||||
AB3550_DEVID_POWER,
|
||||
AB3550_DEVID_REGULATORS,
|
||||
AB3550_DEVID_SIM,
|
||||
AB3550_DEVID_UART,
|
||||
AB3550_DEVID_RTC,
|
||||
AB3550_DEVID_CHARGER,
|
||||
AB3550_DEVID_FUELGAUGE,
|
||||
AB3550_DEVID_VIBRATOR,
|
||||
AB3550_DEVID_CODEC,
|
||||
AB3550_NUM_DEVICES,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct abx500_init_setting
|
||||
* Initial value of the registers for driver to use during setup.
|
||||
*/
|
||||
struct abx500_init_settings {
|
||||
u8 bank;
|
||||
u8 reg;
|
||||
u8 setting;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ab3550_platform_data
|
||||
* Data supplied to initialize board connections to the AB3550
|
||||
*/
|
||||
struct ab3550_platform_data {
|
||||
struct {unsigned int base; unsigned int count; } irq;
|
||||
void *dev_data[AB3550_NUM_DEVICES];
|
||||
size_t dev_data_sz[AB3550_NUM_DEVICES];
|
||||
struct abx500_init_settings *init_settings;
|
||||
unsigned int init_settings_sz;
|
||||
};
|
||||
|
||||
int abx500_set_register_interruptible(struct device *dev, u8 bank, u8 reg,
|
||||
u8 value);
|
||||
int abx500_get_register_interruptible(struct device *dev, u8 bank, u8 reg,
|
||||
u8 *value);
|
||||
int abx500_get_register_page_interruptible(struct device *dev, u8 bank,
|
||||
u8 first_reg, u8 *regvals, u8 numregs);
|
||||
int abx500_set_register_page_interruptible(struct device *dev, u8 bank,
|
||||
u8 first_reg, u8 *regvals, u8 numregs);
|
||||
/**
|
||||
* abx500_mask_and_set_register_inerruptible() - Modifies selected bits of a
|
||||
* target register
|
||||
*
|
||||
* @dev: The AB sub device.
|
||||
* @bank: The i2c bank number.
|
||||
* @bitmask: The bit mask to use.
|
||||
* @bitvalues: The new bit values.
|
||||
*
|
||||
* Updates the value of an AB register:
|
||||
* value -> ((value & ~bitmask) | (bitvalues & bitmask))
|
||||
*/
|
||||
int abx500_mask_and_set_register_interruptible(struct device *dev, u8 bank,
|
||||
u8 reg, u8 bitmask, u8 bitvalues);
|
||||
int abx500_get_chip_id(struct device *dev);
|
||||
int abx500_event_registers_startup_state_get(struct device *dev, u8 *event);
|
||||
int abx500_startup_irq_enabled(struct device *dev, unsigned int irq);
|
||||
|
||||
struct abx500_ops {
|
||||
int (*get_chip_id) (struct device *);
|
||||
int (*get_register) (struct device *, u8, u8, u8 *);
|
||||
int (*set_register) (struct device *, u8, u8, u8);
|
||||
int (*get_register_page) (struct device *, u8, u8, u8 *, u8);
|
||||
int (*set_register_page) (struct device *, u8, u8, u8 *, u8);
|
||||
int (*mask_and_set_register) (struct device *, u8, u8, u8, u8);
|
||||
int (*event_registers_startup_state_get) (struct device *, u8 *);
|
||||
int (*startup_irq_enabled) (struct device *, unsigned int);
|
||||
};
|
||||
|
||||
int abx500_register_ops(struct device *core_dev, struct abx500_ops *ops);
|
||||
#endif
|
||||
54
include/linux/mfd/janz.h
Normal file
54
include/linux/mfd/janz.h
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Common Definitions for Janz MODULbus devices
|
||||
*
|
||||
* Copyright (c) 2010 Ira W. Snyder <iws@ovro.caltech.edu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef JANZ_H
|
||||
#define JANZ_H
|
||||
|
||||
struct janz_platform_data {
|
||||
/* MODULbus Module Number */
|
||||
unsigned int modno;
|
||||
};
|
||||
|
||||
/* PLX bridge chip onboard registers */
|
||||
struct janz_cmodio_onboard_regs {
|
||||
u8 unused1;
|
||||
|
||||
/*
|
||||
* Read access: interrupt status
|
||||
* Write access: interrupt disable
|
||||
*/
|
||||
u8 int_disable;
|
||||
u8 unused2;
|
||||
|
||||
/*
|
||||
* Read access: MODULbus number (hex switch)
|
||||
* Write access: interrupt enable
|
||||
*/
|
||||
u8 int_enable;
|
||||
u8 unused3;
|
||||
|
||||
/* write-only */
|
||||
u8 reset_assert;
|
||||
u8 unused4;
|
||||
|
||||
/* write-only */
|
||||
u8 reset_deassert;
|
||||
u8 unused5;
|
||||
|
||||
/* read-write access to serial EEPROM */
|
||||
u8 eep;
|
||||
u8 unused6;
|
||||
|
||||
/* write-only access to EEPROM chip select */
|
||||
u8 enid;
|
||||
};
|
||||
|
||||
#endif /* JANZ_H */
|
||||
|
|
@ -64,6 +64,70 @@ static inline int mc13783_ackirq(struct mc13783 *mc13783, int irq)
|
|||
MC13783_ADC0_TSMOD1 | \
|
||||
MC13783_ADC0_TSMOD2)
|
||||
|
||||
struct mc13783_led_platform_data {
|
||||
#define MC13783_LED_MD 0
|
||||
#define MC13783_LED_AD 1
|
||||
#define MC13783_LED_KP 2
|
||||
#define MC13783_LED_R1 3
|
||||
#define MC13783_LED_G1 4
|
||||
#define MC13783_LED_B1 5
|
||||
#define MC13783_LED_R2 6
|
||||
#define MC13783_LED_G2 7
|
||||
#define MC13783_LED_B2 8
|
||||
#define MC13783_LED_R3 9
|
||||
#define MC13783_LED_G3 10
|
||||
#define MC13783_LED_B3 11
|
||||
#define MC13783_LED_MAX MC13783_LED_B3
|
||||
int id;
|
||||
const char *name;
|
||||
const char *default_trigger;
|
||||
|
||||
/* Three or two bits current selection depending on the led */
|
||||
char max_current;
|
||||
};
|
||||
|
||||
struct mc13783_leds_platform_data {
|
||||
int num_leds;
|
||||
struct mc13783_led_platform_data *led;
|
||||
|
||||
#define MC13783_LED_TRIODE_MD (1 << 0)
|
||||
#define MC13783_LED_TRIODE_AD (1 << 1)
|
||||
#define MC13783_LED_TRIODE_KP (1 << 2)
|
||||
#define MC13783_LED_BOOST_EN (1 << 3)
|
||||
#define MC13783_LED_TC1HALF (1 << 4)
|
||||
#define MC13783_LED_SLEWLIMTC (1 << 5)
|
||||
#define MC13783_LED_SLEWLIMBL (1 << 6)
|
||||
#define MC13783_LED_TRIODE_TC1 (1 << 7)
|
||||
#define MC13783_LED_TRIODE_TC2 (1 << 8)
|
||||
#define MC13783_LED_TRIODE_TC3 (1 << 9)
|
||||
int flags;
|
||||
|
||||
#define MC13783_LED_AB_DISABLED 0
|
||||
#define MC13783_LED_AB_MD1 1
|
||||
#define MC13783_LED_AB_MD12 2
|
||||
#define MC13783_LED_AB_MD123 3
|
||||
#define MC13783_LED_AB_MD1234 4
|
||||
#define MC13783_LED_AB_MD1234_AD1 5
|
||||
#define MC13783_LED_AB_MD1234_AD12 6
|
||||
#define MC13783_LED_AB_MD1_AD 7
|
||||
char abmode;
|
||||
|
||||
#define MC13783_LED_ABREF_200MV 0
|
||||
#define MC13783_LED_ABREF_400MV 1
|
||||
#define MC13783_LED_ABREF_600MV 2
|
||||
#define MC13783_LED_ABREF_800MV 3
|
||||
char abref;
|
||||
|
||||
#define MC13783_LED_PERIOD_10MS 0
|
||||
#define MC13783_LED_PERIOD_100MS 1
|
||||
#define MC13783_LED_PERIOD_500MS 2
|
||||
#define MC13783_LED_PERIOD_2S 3
|
||||
char bl_period;
|
||||
char tc1_period;
|
||||
char tc2_period;
|
||||
char tc3_period;
|
||||
};
|
||||
|
||||
/* to be cleaned up */
|
||||
struct regulator_init_data;
|
||||
|
||||
|
|
@ -80,12 +144,14 @@ struct mc13783_regulator_platform_data {
|
|||
struct mc13783_platform_data {
|
||||
int num_regulators;
|
||||
struct mc13783_regulator_init_data *regulators;
|
||||
struct mc13783_leds_platform_data *leds;
|
||||
|
||||
#define MC13783_USE_TOUCHSCREEN (1 << 0)
|
||||
#define MC13783_USE_CODEC (1 << 1)
|
||||
#define MC13783_USE_ADC (1 << 2)
|
||||
#define MC13783_USE_RTC (1 << 3)
|
||||
#define MC13783_USE_REGULATOR (1 << 4)
|
||||
#define MC13783_USE_LED (1 << 5)
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
|
|
|
|||
51
include/linux/mfd/pcf50633/backlight.h
Normal file
51
include/linux/mfd/pcf50633/backlight.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de>
|
||||
* PCF50633 backlight device driver
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_MFD_PCF50633_BACKLIGHT
|
||||
#define __LINUX_MFD_PCF50633_BACKLIGHT
|
||||
|
||||
/*
|
||||
* @default_brightness: Backlight brightness is initialized to this value
|
||||
*
|
||||
* Brightness to be used after the driver has been probed.
|
||||
* Valid range 0-63.
|
||||
*
|
||||
* @default_brightness_limit: The actual brightness is limited by this value
|
||||
*
|
||||
* Brightness limit to be used after the driver has been probed. This is useful
|
||||
* when it is not known how much power is available for the backlight during
|
||||
* probe.
|
||||
* Valid range 0-63. Can be changed later with pcf50633_bl_set_brightness_limit.
|
||||
*
|
||||
* @ramp_time: Display ramp time when changing brightness
|
||||
*
|
||||
* When changing the backlights brightness the change is not instant, instead
|
||||
* it fades smooth from one state to another. This value specifies how long
|
||||
* the fade should take. The lower the value the higher the fade time.
|
||||
* Valid range 0-255
|
||||
*/
|
||||
struct pcf50633_bl_platform_data {
|
||||
unsigned int default_brightness;
|
||||
unsigned int default_brightness_limit;
|
||||
uint8_t ramp_time;
|
||||
};
|
||||
|
||||
|
||||
struct pcf50633;
|
||||
|
||||
int pcf50633_bl_set_brightness_limit(struct pcf50633 *pcf, unsigned int limit);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
#include <linux/regulator/driver.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/mfd/pcf50633/backlight.h>
|
||||
|
||||
struct pcf50633;
|
||||
|
||||
|
|
@ -43,6 +44,8 @@ struct pcf50633_platform_data {
|
|||
void (*force_shutdown)(struct pcf50633 *);
|
||||
|
||||
u8 resumers[5];
|
||||
|
||||
struct pcf50633_bl_platform_data *backlight_data;
|
||||
};
|
||||
|
||||
struct pcf50633_irq {
|
||||
|
|
@ -152,6 +155,7 @@ struct pcf50633 {
|
|||
struct platform_device *mbc_pdev;
|
||||
struct platform_device *adc_pdev;
|
||||
struct platform_device *input_pdev;
|
||||
struct platform_device *bl_pdev;
|
||||
struct platform_device *regulator_pdev[PCF50633_NUM_REGULATORS];
|
||||
};
|
||||
|
||||
|
|
|
|||
26
include/linux/mfd/rdc321x.h
Normal file
26
include/linux/mfd/rdc321x.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#ifndef __RDC321X_MFD_H
|
||||
#define __RDC321X_MFD_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/pci.h>
|
||||
|
||||
/* Offsets to be accessed in the southbridge PCI
|
||||
* device configuration register */
|
||||
#define RDC321X_WDT_CTRL 0x44
|
||||
#define RDC321X_GPIO_CTRL_REG1 0x48
|
||||
#define RDC321X_GPIO_DATA_REG1 0x4c
|
||||
#define RDC321X_GPIO_CTRL_REG2 0x84
|
||||
#define RDC321X_GPIO_DATA_REG2 0x88
|
||||
|
||||
#define RDC321X_MAX_GPIO 58
|
||||
|
||||
struct rdc321x_gpio_pdata {
|
||||
struct pci_dev *sb_pdev;
|
||||
unsigned max_gpios;
|
||||
};
|
||||
|
||||
struct rdc321x_wdt_pdata {
|
||||
struct pci_dev *sb_pdev;
|
||||
};
|
||||
|
||||
#endif /* __RDC321X_MFD_H */
|
||||
|
|
@ -1,7 +1,13 @@
|
|||
#ifndef __SH_MOBILE_SDHI_H__
|
||||
#define __SH_MOBILE_SDHI_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct sh_mobile_sdhi_info {
|
||||
int dma_slave_tx;
|
||||
int dma_slave_rx;
|
||||
unsigned long tmio_flags;
|
||||
u32 tmio_ocr_mask; /* available MMC voltages */
|
||||
void (*set_pwr)(struct platform_device *pdev, int state);
|
||||
};
|
||||
|
||||
|
|
|
|||
132
include/linux/mfd/tc35892.h
Normal file
132
include/linux/mfd/tc35892.h
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* Copyright (C) ST-Ericsson SA 2010
|
||||
*
|
||||
* License Terms: GNU General Public License, version 2
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_MFD_TC35892_H
|
||||
#define __LINUX_MFD_TC35892_H
|
||||
|
||||
#include <linux/device.h>
|
||||
|
||||
#define TC35892_RSTCTRL_IRQRST (1 << 4)
|
||||
#define TC35892_RSTCTRL_TIMRST (1 << 3)
|
||||
#define TC35892_RSTCTRL_ROTRST (1 << 2)
|
||||
#define TC35892_RSTCTRL_KBDRST (1 << 1)
|
||||
#define TC35892_RSTCTRL_GPIRST (1 << 0)
|
||||
|
||||
#define TC35892_IRQST 0x91
|
||||
|
||||
#define TC35892_MANFCODE_MAGIC 0x03
|
||||
#define TC35892_MANFCODE 0x80
|
||||
#define TC35892_VERSION 0x81
|
||||
#define TC35892_IOCFG 0xA7
|
||||
|
||||
#define TC35892_CLKMODE 0x88
|
||||
#define TC35892_CLKCFG 0x89
|
||||
#define TC35892_CLKEN 0x8A
|
||||
|
||||
#define TC35892_RSTCTRL 0x82
|
||||
#define TC35892_EXTRSTN 0x83
|
||||
#define TC35892_RSTINTCLR 0x84
|
||||
|
||||
#define TC35892_GPIOIS0 0xC9
|
||||
#define TC35892_GPIOIS1 0xCA
|
||||
#define TC35892_GPIOIS2 0xCB
|
||||
#define TC35892_GPIOIBE0 0xCC
|
||||
#define TC35892_GPIOIBE1 0xCD
|
||||
#define TC35892_GPIOIBE2 0xCE
|
||||
#define TC35892_GPIOIEV0 0xCF
|
||||
#define TC35892_GPIOIEV1 0xD0
|
||||
#define TC35892_GPIOIEV2 0xD1
|
||||
#define TC35892_GPIOIE0 0xD2
|
||||
#define TC35892_GPIOIE1 0xD3
|
||||
#define TC35892_GPIOIE2 0xD4
|
||||
#define TC35892_GPIORIS0 0xD6
|
||||
#define TC35892_GPIORIS1 0xD7
|
||||
#define TC35892_GPIORIS2 0xD8
|
||||
#define TC35892_GPIOMIS0 0xD9
|
||||
#define TC35892_GPIOMIS1 0xDA
|
||||
#define TC35892_GPIOMIS2 0xDB
|
||||
#define TC35892_GPIOIC0 0xDC
|
||||
#define TC35892_GPIOIC1 0xDD
|
||||
#define TC35892_GPIOIC2 0xDE
|
||||
|
||||
#define TC35892_GPIODATA0 0xC0
|
||||
#define TC35892_GPIOMASK0 0xc1
|
||||
#define TC35892_GPIODATA1 0xC2
|
||||
#define TC35892_GPIOMASK1 0xc3
|
||||
#define TC35892_GPIODATA2 0xC4
|
||||
#define TC35892_GPIOMASK2 0xC5
|
||||
|
||||
#define TC35892_GPIODIR0 0xC6
|
||||
#define TC35892_GPIODIR1 0xC7
|
||||
#define TC35892_GPIODIR2 0xC8
|
||||
|
||||
#define TC35892_GPIOSYNC0 0xE6
|
||||
#define TC35892_GPIOSYNC1 0xE7
|
||||
#define TC35892_GPIOSYNC2 0xE8
|
||||
|
||||
#define TC35892_GPIOWAKE0 0xE9
|
||||
#define TC35892_GPIOWAKE1 0xEA
|
||||
#define TC35892_GPIOWAKE2 0xEB
|
||||
|
||||
#define TC35892_GPIOODM0 0xE0
|
||||
#define TC35892_GPIOODE0 0xE1
|
||||
#define TC35892_GPIOODM1 0xE2
|
||||
#define TC35892_GPIOODE1 0xE3
|
||||
#define TC35892_GPIOODM2 0xE4
|
||||
#define TC35892_GPIOODE2 0xE5
|
||||
|
||||
#define TC35892_INT_GPIIRQ 0
|
||||
#define TC35892_INT_TI0IRQ 1
|
||||
#define TC35892_INT_TI1IRQ 2
|
||||
#define TC35892_INT_TI2IRQ 3
|
||||
#define TC35892_INT_ROTIRQ 5
|
||||
#define TC35892_INT_KBDIRQ 6
|
||||
#define TC35892_INT_PORIRQ 7
|
||||
|
||||
#define TC35892_NR_INTERNAL_IRQS 8
|
||||
#define TC35892_INT_GPIO(x) (TC35892_NR_INTERNAL_IRQS + (x))
|
||||
|
||||
struct tc35892 {
|
||||
struct mutex lock;
|
||||
struct device *dev;
|
||||
struct i2c_client *i2c;
|
||||
|
||||
int irq_base;
|
||||
int num_gpio;
|
||||
struct tc35892_platform_data *pdata;
|
||||
};
|
||||
|
||||
extern int tc35892_reg_write(struct tc35892 *tc35892, u8 reg, u8 data);
|
||||
extern int tc35892_reg_read(struct tc35892 *tc35892, u8 reg);
|
||||
extern int tc35892_block_read(struct tc35892 *tc35892, u8 reg, u8 length,
|
||||
u8 *values);
|
||||
extern int tc35892_block_write(struct tc35892 *tc35892, u8 reg, u8 length,
|
||||
const u8 *values);
|
||||
extern int tc35892_set_bits(struct tc35892 *tc35892, u8 reg, u8 mask, u8 val);
|
||||
|
||||
/**
|
||||
* struct tc35892_gpio_platform_data - TC35892 GPIO platform data
|
||||
* @gpio_base: first gpio number assigned to TC35892. A maximum of
|
||||
* %TC35892_NR_GPIOS GPIOs will be allocated.
|
||||
*/
|
||||
struct tc35892_gpio_platform_data {
|
||||
int gpio_base;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct tc35892_platform_data - TC35892 platform data
|
||||
* @irq_base: base IRQ number. %TC35892_NR_IRQS irqs will be used.
|
||||
* @gpio: GPIO-specific platform data
|
||||
*/
|
||||
struct tc35892_platform_data {
|
||||
int irq_base;
|
||||
struct tc35892_gpio_platform_data *gpio;
|
||||
};
|
||||
|
||||
#define TC35892_NR_GPIOS 24
|
||||
#define TC35892_NR_IRQS TC35892_INT_GPIO(TC35892_NR_GPIOS)
|
||||
|
||||
#endif
|
||||
|
|
@ -50,17 +50,28 @@
|
|||
tmio_iowrite16((val) >> 16, (base) + ((reg + 2) << (shift))); \
|
||||
} while (0)
|
||||
|
||||
/* tmio MMC platform flags */
|
||||
#define TMIO_MMC_WRPROTECT_DISABLE (1 << 0)
|
||||
|
||||
int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
|
||||
int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base);
|
||||
void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state);
|
||||
void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state);
|
||||
|
||||
struct tmio_mmc_dma {
|
||||
void *chan_priv_tx;
|
||||
void *chan_priv_rx;
|
||||
};
|
||||
|
||||
/*
|
||||
* data for the MMC controller
|
||||
*/
|
||||
struct tmio_mmc_data {
|
||||
unsigned int hclk;
|
||||
unsigned long capabilities;
|
||||
unsigned long flags;
|
||||
u32 ocr_mask; /* available voltages */
|
||||
struct tmio_mmc_dma *dma;
|
||||
void (*set_pwr)(struct platform_device *host, int state);
|
||||
void (*set_clk_div)(struct platform_device *host, int state);
|
||||
};
|
||||
|
|
|
|||
169
include/linux/mfd/tps6507x.h
Normal file
169
include/linux/mfd/tps6507x.h
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
/* linux/mfd/tps6507x.h
|
||||
*
|
||||
* Functions to access TPS65070 power management chip.
|
||||
*
|
||||
* Copyright (c) 2009 RidgeRun (todd.fischer@ridgerun.com)
|
||||
*
|
||||
*
|
||||
* For licencing details see kernel-base/COPYING
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_MFD_TPS6507X_H
|
||||
#define __LINUX_MFD_TPS6507X_H
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* Registers, all 8 bits
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/* Register definitions */
|
||||
#define TPS6507X_REG_PPATH1 0X01
|
||||
#define TPS6507X_CHG_USB BIT(7)
|
||||
#define TPS6507X_CHG_AC BIT(6)
|
||||
#define TPS6507X_CHG_USB_PW_ENABLE BIT(5)
|
||||
#define TPS6507X_CHG_AC_PW_ENABLE BIT(4)
|
||||
#define TPS6507X_CHG_AC_CURRENT BIT(2)
|
||||
#define TPS6507X_CHG_USB_CURRENT BIT(0)
|
||||
|
||||
#define TPS6507X_REG_INT 0X02
|
||||
#define TPS6507X_REG_MASK_AC_USB BIT(7)
|
||||
#define TPS6507X_REG_MASK_TSC BIT(6)
|
||||
#define TPS6507X_REG_MASK_PB_IN BIT(5)
|
||||
#define TPS6507X_REG_TSC_INT BIT(3)
|
||||
#define TPS6507X_REG_PB_IN_INT BIT(2)
|
||||
#define TPS6507X_REG_AC_USB_APPLIED BIT(1)
|
||||
#define TPS6507X_REG_AC_USB_REMOVED BIT(0)
|
||||
|
||||
#define TPS6507X_REG_CHGCONFIG0 0X03
|
||||
|
||||
#define TPS6507X_REG_CHGCONFIG1 0X04
|
||||
#define TPS6507X_CON_CTRL1_DCDC1_ENABLE BIT(4)
|
||||
#define TPS6507X_CON_CTRL1_DCDC2_ENABLE BIT(3)
|
||||
#define TPS6507X_CON_CTRL1_DCDC3_ENABLE BIT(2)
|
||||
#define TPS6507X_CON_CTRL1_LDO1_ENABLE BIT(1)
|
||||
#define TPS6507X_CON_CTRL1_LDO2_ENABLE BIT(0)
|
||||
|
||||
#define TPS6507X_REG_CHGCONFIG2 0X05
|
||||
|
||||
#define TPS6507X_REG_CHGCONFIG3 0X06
|
||||
|
||||
#define TPS6507X_REG_ADCONFIG 0X07
|
||||
#define TPS6507X_ADCONFIG_AD_ENABLE BIT(7)
|
||||
#define TPS6507X_ADCONFIG_START_CONVERSION BIT(6)
|
||||
#define TPS6507X_ADCONFIG_CONVERSION_DONE BIT(5)
|
||||
#define TPS6507X_ADCONFIG_VREF_ENABLE BIT(4)
|
||||
#define TPS6507X_ADCONFIG_INPUT_AD_IN1 0
|
||||
#define TPS6507X_ADCONFIG_INPUT_AD_IN2 1
|
||||
#define TPS6507X_ADCONFIG_INPUT_AD_IN3 2
|
||||
#define TPS6507X_ADCONFIG_INPUT_AD_IN4 3
|
||||
#define TPS6507X_ADCONFIG_INPUT_TS_PIN 4
|
||||
#define TPS6507X_ADCONFIG_INPUT_BAT_CURRENT 5
|
||||
#define TPS6507X_ADCONFIG_INPUT_AC_VOLTAGE 6
|
||||
#define TPS6507X_ADCONFIG_INPUT_SYS_VOLTAGE 7
|
||||
#define TPS6507X_ADCONFIG_INPUT_CHARGER_VOLTAGE 8
|
||||
#define TPS6507X_ADCONFIG_INPUT_BAT_VOLTAGE 9
|
||||
#define TPS6507X_ADCONFIG_INPUT_THRESHOLD_VOLTAGE 10
|
||||
#define TPS6507X_ADCONFIG_INPUT_ISET1_VOLTAGE 11
|
||||
#define TPS6507X_ADCONFIG_INPUT_ISET2_VOLTAGE 12
|
||||
#define TPS6507X_ADCONFIG_INPUT_REAL_TSC 14
|
||||
#define TPS6507X_ADCONFIG_INPUT_TSC 15
|
||||
|
||||
#define TPS6507X_REG_TSCMODE 0X08
|
||||
#define TPS6507X_TSCMODE_X_POSITION 0
|
||||
#define TPS6507X_TSCMODE_Y_POSITION 1
|
||||
#define TPS6507X_TSCMODE_PRESSURE 2
|
||||
#define TPS6507X_TSCMODE_X_PLATE 3
|
||||
#define TPS6507X_TSCMODE_Y_PLATE 4
|
||||
#define TPS6507X_TSCMODE_STANDBY 5
|
||||
#define TPS6507X_TSCMODE_ADC_INPUT 6
|
||||
#define TPS6507X_TSCMODE_DISABLE 7
|
||||
|
||||
#define TPS6507X_REG_ADRESULT_1 0X09
|
||||
|
||||
#define TPS6507X_REG_ADRESULT_2 0X0A
|
||||
#define TPS6507X_REG_ADRESULT_2_MASK (BIT(1) | BIT(0))
|
||||
|
||||
#define TPS6507X_REG_PGOOD 0X0B
|
||||
|
||||
#define TPS6507X_REG_PGOODMASK 0X0C
|
||||
|
||||
#define TPS6507X_REG_CON_CTRL1 0X0D
|
||||
#define TPS6507X_CON_CTRL1_DCDC1_ENABLE BIT(4)
|
||||
#define TPS6507X_CON_CTRL1_DCDC2_ENABLE BIT(3)
|
||||
#define TPS6507X_CON_CTRL1_DCDC3_ENABLE BIT(2)
|
||||
#define TPS6507X_CON_CTRL1_LDO1_ENABLE BIT(1)
|
||||
#define TPS6507X_CON_CTRL1_LDO2_ENABLE BIT(0)
|
||||
|
||||
#define TPS6507X_REG_CON_CTRL2 0X0E
|
||||
|
||||
#define TPS6507X_REG_CON_CTRL3 0X0F
|
||||
|
||||
#define TPS6507X_REG_DEFDCDC1 0X10
|
||||
#define TPS6507X_DEFDCDC1_DCDC1_EXT_ADJ_EN BIT(7)
|
||||
#define TPS6507X_DEFDCDC1_DCDC1_MASK 0X3F
|
||||
|
||||
#define TPS6507X_REG_DEFDCDC2_LOW 0X11
|
||||
#define TPS6507X_DEFDCDC2_LOW_DCDC2_MASK 0X3F
|
||||
|
||||
#define TPS6507X_REG_DEFDCDC2_HIGH 0X12
|
||||
#define TPS6507X_DEFDCDC2_HIGH_DCDC2_MASK 0X3F
|
||||
|
||||
#define TPS6507X_REG_DEFDCDC3_LOW 0X13
|
||||
#define TPS6507X_DEFDCDC3_LOW_DCDC3_MASK 0X3F
|
||||
|
||||
#define TPS6507X_REG_DEFDCDC3_HIGH 0X14
|
||||
#define TPS6507X_DEFDCDC3_HIGH_DCDC3_MASK 0X3F
|
||||
|
||||
#define TPS6507X_REG_DEFSLEW 0X15
|
||||
|
||||
#define TPS6507X_REG_LDO_CTRL1 0X16
|
||||
#define TPS6507X_REG_LDO_CTRL1_LDO1_MASK 0X0F
|
||||
|
||||
#define TPS6507X_REG_DEFLDO2 0X17
|
||||
#define TPS6507X_REG_DEFLDO2_LDO2_MASK 0X3F
|
||||
|
||||
#define TPS6507X_REG_WLED_CTRL1 0X18
|
||||
|
||||
#define TPS6507X_REG_WLED_CTRL2 0X19
|
||||
|
||||
/* VDCDC MASK */
|
||||
#define TPS6507X_DEFDCDCX_DCDC_MASK 0X3F
|
||||
|
||||
#define TPS6507X_MAX_REGISTER 0X19
|
||||
|
||||
/**
|
||||
* struct tps6507x_board - packages regulator and touchscreen init data
|
||||
* @tps6507x_regulator_data: regulator initialization values
|
||||
*
|
||||
* Board data may be used to initialize regulator and touchscreen.
|
||||
*/
|
||||
|
||||
struct tps6507x_board {
|
||||
struct regulator_init_data *tps6507x_pmic_init_data;
|
||||
struct touchscreen_init_data *tps6507x_ts_init_data;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct tps6507x_dev - tps6507x sub-driver chip access routines
|
||||
* @read_dev() - I2C register read function
|
||||
* @write_dev() - I2C register write function
|
||||
*
|
||||
* Device data may be used to access the TPS6507x chip
|
||||
*/
|
||||
|
||||
struct tps6507x_dev {
|
||||
struct device *dev;
|
||||
struct i2c_client *i2c_client;
|
||||
int (*read_dev)(struct tps6507x_dev *tps6507x, char reg, int size,
|
||||
void *dest);
|
||||
int (*write_dev)(struct tps6507x_dev *tps6507x, char reg, int size,
|
||||
void *src);
|
||||
|
||||
/* Client devices */
|
||||
struct tps6507x_pmic *pmic;
|
||||
struct tps6507x_ts *ts;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_MFD_TPS6507X_H */
|
||||
|
|
@ -256,8 +256,9 @@ struct wm831x {
|
|||
int irq_masks_cache[WM831X_NUM_IRQ_REGS]; /* Cached hardware value */
|
||||
|
||||
/* Chip revision based flags */
|
||||
unsigned has_gpio_ena:1; /* Has GPIO enable bit */
|
||||
unsigned has_cs_sts:1; /* Has current sink status bit */
|
||||
unsigned has_gpio_ena:1; /* Has GPIO enable bit */
|
||||
unsigned has_cs_sts:1; /* Has current sink status bit */
|
||||
unsigned charger_irq_wake:1; /* Are charger IRQs a wake source? */
|
||||
|
||||
int num_gpio;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ typedef struct page *new_page_t(struct page *, unsigned long private, int **);
|
|||
#ifdef CONFIG_MIGRATION
|
||||
#define PAGE_MIGRATION 1
|
||||
|
||||
extern int putback_lru_pages(struct list_head *l);
|
||||
extern void putback_lru_pages(struct list_head *l);
|
||||
extern int migrate_page(struct address_space *,
|
||||
struct page *, struct page *);
|
||||
extern int migrate_pages(struct list_head *l, new_page_t x,
|
||||
|
|
@ -19,17 +19,19 @@ extern int fail_migrate_page(struct address_space *,
|
|||
struct page *, struct page *);
|
||||
|
||||
extern int migrate_prep(void);
|
||||
extern int migrate_prep_local(void);
|
||||
extern int migrate_vmas(struct mm_struct *mm,
|
||||
const nodemask_t *from, const nodemask_t *to,
|
||||
unsigned long flags);
|
||||
#else
|
||||
#define PAGE_MIGRATION 0
|
||||
|
||||
static inline int putback_lru_pages(struct list_head *l) { return 0; }
|
||||
static inline void putback_lru_pages(struct list_head *l) {}
|
||||
static inline int migrate_pages(struct list_head *l, new_page_t x,
|
||||
unsigned long private, int offlining) { return -ENOSYS; }
|
||||
|
||||
static inline int migrate_prep(void) { return -ENOSYS; }
|
||||
static inline int migrate_prep_local(void) { return -ENOSYS; }
|
||||
|
||||
static inline int migrate_vmas(struct mm_struct *mm,
|
||||
const nodemask_t *from, const nodemask_t *to,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
#define FUSE_MINOR 229
|
||||
#define KVM_MINOR 232
|
||||
#define VHOST_NET_MINOR 233
|
||||
#define BTRFS_MINOR 234
|
||||
#define AUTOFS_MINOR 235
|
||||
#define MISC_DYNAMIC_MINOR 255
|
||||
|
||||
struct device;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/debug_locks.h>
|
||||
#include <linux/mm_types.h>
|
||||
#include <linux/range.h>
|
||||
#include <linux/pfn.h>
|
||||
|
||||
struct mempolicy;
|
||||
struct anon_vma;
|
||||
|
|
@ -106,6 +107,9 @@ extern unsigned int kobjsize(const void *objp);
|
|||
#define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */
|
||||
#define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */
|
||||
|
||||
/* Bits set in the VMA until the stack is in its final location */
|
||||
#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ)
|
||||
|
||||
#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
|
||||
#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
|
||||
#endif
|
||||
|
|
@ -334,6 +338,7 @@ void put_page(struct page *page);
|
|||
void put_pages_list(struct list_head *pages);
|
||||
|
||||
void split_page(struct page *page, unsigned int order);
|
||||
int split_free_page(struct page *page);
|
||||
|
||||
/*
|
||||
* Compound pages have a destructor function. Provide a
|
||||
|
|
@ -591,7 +596,7 @@ static inline void set_page_links(struct page *page, enum zone_type zone,
|
|||
|
||||
static __always_inline void *lowmem_page_address(struct page *page)
|
||||
{
|
||||
return __va(page_to_pfn(page) << PAGE_SHIFT);
|
||||
return __va(PFN_PHYS(page_to_pfn(page)));
|
||||
}
|
||||
|
||||
#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@ struct mmc_host_ops {
|
|||
int (*get_cd)(struct mmc_host *host);
|
||||
|
||||
void (*enable_sdio_irq)(struct mmc_host *host, int enable);
|
||||
|
||||
/* optional callback for HC quirks */
|
||||
void (*init_card)(struct mmc_host *host, struct mmc_card *card);
|
||||
};
|
||||
|
||||
struct mmc_card;
|
||||
|
|
@ -227,7 +230,7 @@ static inline void *mmc_priv(struct mmc_host *host)
|
|||
#define mmc_classdev(x) (&(x)->class_dev)
|
||||
#define mmc_hostname(x) (dev_name(&(x)->class_dev))
|
||||
|
||||
extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
|
||||
extern int mmc_suspend_host(struct mmc_host *);
|
||||
extern int mmc_resume_host(struct mmc_host *);
|
||||
|
||||
extern void mmc_power_save_host(struct mmc_host *host);
|
||||
|
|
|
|||
42
include/linux/mmc/sdhci-spear.h
Normal file
42
include/linux/mmc/sdhci-spear.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* include/linux/mmc/sdhci-spear.h
|
||||
*
|
||||
* SDHCI declarations specific to ST SPEAr platform
|
||||
*
|
||||
* Copyright (C) 2010 ST Microelectronics
|
||||
* Viresh Kumar<viresh.kumar@st.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef MMC_SDHCI_SPEAR_H
|
||||
#define MMC_SDHCI_SPEAR_H
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
/*
|
||||
* struct sdhci_plat_data: spear sdhci platform data structure
|
||||
*
|
||||
* @card_power_gpio: gpio pin for enabling/disabling power to sdhci socket
|
||||
* @power_active_high: if set, enable power to sdhci socket by setting
|
||||
* card_power_gpio
|
||||
* @power_always_enb: If set, then enable power on probe, otherwise enable only
|
||||
* on card insertion and disable on card removal.
|
||||
* card_int_gpio: gpio pin used for card detection
|
||||
*/
|
||||
struct sdhci_plat_data {
|
||||
int card_power_gpio;
|
||||
int power_active_high;
|
||||
int power_always_enb;
|
||||
int card_int_gpio;
|
||||
};
|
||||
|
||||
/* This function is used to set platform_data field of pdev->dev */
|
||||
static inline void
|
||||
sdhci_set_plat_data(struct platform_device *pdev, struct sdhci_plat_data *data)
|
||||
{
|
||||
pdev->dev.platform_data = data;
|
||||
}
|
||||
|
||||
#endif /* MMC_SDHCI_SPEAR_H */
|
||||
|
|
@ -145,6 +145,9 @@ extern void sdio_writew(struct sdio_func *func, u16 b,
|
|||
extern void sdio_writel(struct sdio_func *func, u32 b,
|
||||
unsigned int addr, int *err_ret);
|
||||
|
||||
extern u8 sdio_writeb_readb(struct sdio_func *func, u8 write_byte,
|
||||
unsigned int addr, int *err_ret);
|
||||
|
||||
extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr,
|
||||
void *src, int count);
|
||||
extern int sdio_writesb(struct sdio_func *func, unsigned int addr,
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue