Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts: include/net/tcp.h
This commit is contained in:
@@ -214,7 +214,6 @@ unifdef-y += futex.h
|
||||
unifdef-y += fs.h
|
||||
unifdef-y += gameport.h
|
||||
unifdef-y += generic_serial.h
|
||||
unifdef-y += hayesesp.h
|
||||
unifdef-y += hdlcdrv.h
|
||||
unifdef-y += hdlc.h
|
||||
unifdef-y += hdreg.h
|
||||
|
||||
@@ -39,7 +39,7 @@ typedef __u32 DriverVer_type;
|
||||
#ifndef CCISS_CMD_H
|
||||
// This defines are duplicated in cciss_cmd.h in the driver directory
|
||||
|
||||
//general boundary defintions
|
||||
//general boundary definitions
|
||||
#define SENSEINFOBYTES 32//note that this value may vary between host implementations
|
||||
|
||||
//Command Status value
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* query vendor-specific element types
|
||||
*
|
||||
* accessing elements works by specifing type and unit of the element.
|
||||
* for eample, storage elements are addressed with type = CHET_ST and
|
||||
* for example, storage elements are addressed with type = CHET_ST and
|
||||
* unit = 0 .. cp_nslots-1
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -77,10 +77,10 @@ enum clock_event_nofitiers {
|
||||
struct clock_event_device {
|
||||
const char *name;
|
||||
unsigned int features;
|
||||
unsigned long max_delta_ns;
|
||||
unsigned long min_delta_ns;
|
||||
unsigned long mult;
|
||||
int shift;
|
||||
u64 max_delta_ns;
|
||||
u64 min_delta_ns;
|
||||
u32 mult;
|
||||
u32 shift;
|
||||
int rating;
|
||||
int irq;
|
||||
const struct cpumask *cpumask;
|
||||
@@ -116,8 +116,8 @@ static inline unsigned long div_sc(unsigned long ticks, unsigned long nsec,
|
||||
}
|
||||
|
||||
/* Clock event layer functions */
|
||||
extern unsigned long clockevent_delta2ns(unsigned long latch,
|
||||
struct clock_event_device *evt);
|
||||
extern u64 clockevent_delta2ns(unsigned long latch,
|
||||
struct clock_event_device *evt);
|
||||
extern void clockevents_register_device(struct clock_event_device *dev);
|
||||
|
||||
extern void clockevents_exchange_device(struct clock_event_device *old,
|
||||
@@ -130,6 +130,13 @@ extern int clockevents_program_event(struct clock_event_device *dev,
|
||||
|
||||
extern void clockevents_handle_noop(struct clock_event_device *dev);
|
||||
|
||||
static inline void
|
||||
clockevents_calc_mult_shift(struct clock_event_device *ce, u32 freq, u32 minsec)
|
||||
{
|
||||
return clocks_calc_mult_shift(&ce->mult, &ce->shift, NSEC_PER_SEC,
|
||||
freq, minsec);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GENERIC_CLOCKEVENTS
|
||||
extern void clockevents_notify(unsigned long reason, void *arg);
|
||||
#else
|
||||
|
||||
@@ -151,6 +151,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc,
|
||||
* subtraction of non 64 bit counters
|
||||
* @mult: cycle to nanosecond multiplier
|
||||
* @shift: cycle to nanosecond divisor (power of two)
|
||||
* @max_idle_ns: max idle time permitted by the clocksource (nsecs)
|
||||
* @flags: flags describing special properties
|
||||
* @vread: vsyscall based read
|
||||
* @resume: resume function for the clocksource, if necessary
|
||||
@@ -168,6 +169,7 @@ struct clocksource {
|
||||
cycle_t mask;
|
||||
u32 mult;
|
||||
u32 shift;
|
||||
u64 max_idle_ns;
|
||||
unsigned long flags;
|
||||
cycle_t (*vread)(void);
|
||||
void (*resume)(void);
|
||||
@@ -279,11 +281,23 @@ extern void clocksource_resume(void);
|
||||
extern struct clocksource * __init __weak clocksource_default_clock(void);
|
||||
extern void clocksource_mark_unstable(struct clocksource *cs);
|
||||
|
||||
extern void
|
||||
clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
|
||||
|
||||
static inline void
|
||||
clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec)
|
||||
{
|
||||
return clocks_calc_mult_shift(&cs->mult, &cs->shift, freq,
|
||||
NSEC_PER_SEC, minsec);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GENERIC_TIME_VSYSCALL
|
||||
extern void update_vsyscall(struct timespec *ts, struct clocksource *c);
|
||||
extern void
|
||||
update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult);
|
||||
extern void update_vsyscall_tz(void);
|
||||
#else
|
||||
static inline void update_vsyscall(struct timespec *ts, struct clocksource *c)
|
||||
static inline void
|
||||
update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -232,6 +232,7 @@ struct cpufreq_driver {
|
||||
/* optional */
|
||||
unsigned int (*getavg) (struct cpufreq_policy *policy,
|
||||
unsigned int cpu);
|
||||
int (*bios_limit) (int cpu, unsigned int *limit);
|
||||
|
||||
int (*exit) (struct cpufreq_policy *policy);
|
||||
int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg);
|
||||
|
||||
@@ -250,29 +250,6 @@ struct cipher_alg {
|
||||
void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
|
||||
};
|
||||
|
||||
struct digest_alg {
|
||||
unsigned int dia_digestsize;
|
||||
void (*dia_init)(struct crypto_tfm *tfm);
|
||||
void (*dia_update)(struct crypto_tfm *tfm, const u8 *data,
|
||||
unsigned int len);
|
||||
void (*dia_final)(struct crypto_tfm *tfm, u8 *out);
|
||||
int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
};
|
||||
|
||||
struct hash_alg {
|
||||
int (*init)(struct hash_desc *desc);
|
||||
int (*update)(struct hash_desc *desc, struct scatterlist *sg,
|
||||
unsigned int nbytes);
|
||||
int (*final)(struct hash_desc *desc, u8 *out);
|
||||
int (*digest)(struct hash_desc *desc, struct scatterlist *sg,
|
||||
unsigned int nbytes, u8 *out);
|
||||
int (*setkey)(struct crypto_hash *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
|
||||
unsigned int digestsize;
|
||||
};
|
||||
|
||||
struct compress_alg {
|
||||
int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
|
||||
unsigned int slen, u8 *dst, unsigned int *dlen);
|
||||
@@ -293,8 +270,6 @@ struct rng_alg {
|
||||
#define cra_aead cra_u.aead
|
||||
#define cra_blkcipher cra_u.blkcipher
|
||||
#define cra_cipher cra_u.cipher
|
||||
#define cra_digest cra_u.digest
|
||||
#define cra_hash cra_u.hash
|
||||
#define cra_compress cra_u.compress
|
||||
#define cra_rng cra_u.rng
|
||||
|
||||
@@ -320,8 +295,6 @@ struct crypto_alg {
|
||||
struct aead_alg aead;
|
||||
struct blkcipher_alg blkcipher;
|
||||
struct cipher_alg cipher;
|
||||
struct digest_alg digest;
|
||||
struct hash_alg hash;
|
||||
struct compress_alg compress;
|
||||
struct rng_alg rng;
|
||||
} cra_u;
|
||||
|
||||
@@ -558,7 +558,7 @@ extern void wait_for_device_probe(void);
|
||||
#ifdef CONFIG_DEVTMPFS
|
||||
extern int devtmpfs_create_node(struct device *dev);
|
||||
extern int devtmpfs_delete_node(struct device *dev);
|
||||
extern int devtmpfs_mount(const char *mountpoint);
|
||||
extern int devtmpfs_mount(const char *mntdir);
|
||||
#else
|
||||
static inline int devtmpfs_create_node(struct device *dev) { return 0; }
|
||||
static inline int devtmpfs_delete_node(struct device *dev) { return 0; }
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
* various request types above. The remaining 24-bits are currently
|
||||
* set to zero and are reserved for future use and compatibility concerns.
|
||||
*
|
||||
* User-space should always use DM_ULOG_REQUEST_TYPE to aquire the
|
||||
* User-space should always use DM_ULOG_REQUEST_TYPE to acquire the
|
||||
* request type from the 'request_type' field to maintain forward compatibility.
|
||||
*/
|
||||
#define DM_ULOG_REQUEST_MASK 0xFF
|
||||
|
||||
@@ -126,7 +126,9 @@ extern int free_irte(int irq);
|
||||
extern int irq_remapped(int irq);
|
||||
extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev);
|
||||
extern struct intel_iommu *map_ioapic_to_ir(int apic);
|
||||
extern struct intel_iommu *map_hpet_to_ir(u8 id);
|
||||
extern int set_ioapic_sid(struct irte *irte, int apic);
|
||||
extern int set_hpet_sid(struct irte *irte, u8 id);
|
||||
extern int set_msi_sid(struct irte *irte, struct pci_dev *dev);
|
||||
#else
|
||||
static inline int alloc_irte(struct intel_iommu *iommu, int irq, u16 count)
|
||||
@@ -158,10 +160,18 @@ static inline struct intel_iommu *map_ioapic_to_ir(int apic)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline struct intel_iommu *map_hpet_to_ir(unsigned int hpet_id)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline int set_ioapic_sid(struct irte *irte, int apic)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int set_hpet_sid(struct irte *irte, u8 id)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev)
|
||||
{
|
||||
return 0;
|
||||
|
||||
@@ -565,14 +565,14 @@ struct ext2_dir_entry_2 {
|
||||
* other bits are reserved for now.
|
||||
*/
|
||||
enum {
|
||||
EXT2_FT_UNKNOWN,
|
||||
EXT2_FT_REG_FILE,
|
||||
EXT2_FT_DIR,
|
||||
EXT2_FT_CHRDEV,
|
||||
EXT2_FT_BLKDEV,
|
||||
EXT2_FT_FIFO,
|
||||
EXT2_FT_SOCK,
|
||||
EXT2_FT_SYMLINK,
|
||||
EXT2_FT_UNKNOWN = 0,
|
||||
EXT2_FT_REG_FILE = 1,
|
||||
EXT2_FT_DIR = 2,
|
||||
EXT2_FT_CHRDEV = 3,
|
||||
EXT2_FT_BLKDEV = 4,
|
||||
EXT2_FT_FIFO = 5,
|
||||
EXT2_FT_SOCK = 6,
|
||||
EXT2_FT_SYMLINK = 7,
|
||||
EXT2_FT_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -918,6 +918,8 @@ extern void ext3_abort (struct super_block *, const char *, const char *, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
extern void ext3_warning (struct super_block *, const char *, const char *, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
extern void ext3_msg(struct super_block *, const char *, const char *, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
extern void ext3_update_dynamic_rev (struct super_block *sb);
|
||||
|
||||
#define ext3_std_error(sb, errno) \
|
||||
|
||||
@@ -763,6 +763,7 @@ struct fb_tile_ops {
|
||||
* takes over; acceleration engine should be in a quiescent state */
|
||||
|
||||
/* hints */
|
||||
#define FBINFO_VIRTFB 0x0004 /* FB is System RAM, not device. */
|
||||
#define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */
|
||||
#define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/gfp.h>
|
||||
|
||||
#define FW_ACTION_NOHOTPLUG 0
|
||||
#define FW_ACTION_HOTPLUG 1
|
||||
@@ -38,7 +39,7 @@ int request_firmware(const struct firmware **fw, const char *name,
|
||||
struct device *device);
|
||||
int request_firmware_nowait(
|
||||
struct module *module, int uevent,
|
||||
const char *name, struct device *device, void *context,
|
||||
const char *name, struct device *device, gfp_t gfp, void *context,
|
||||
void (*cont)(const struct firmware *fw, void *context));
|
||||
|
||||
void release_firmware(const struct firmware *fw);
|
||||
@@ -51,7 +52,7 @@ static inline int request_firmware(const struct firmware **fw,
|
||||
}
|
||||
static inline int request_firmware_nowait(
|
||||
struct module *module, int uevent,
|
||||
const char *name, struct device *device, void *context,
|
||||
const char *name, struct device *device, gfp_t gfp, void *context,
|
||||
void (*cont)(const struct firmware *fw, void *context))
|
||||
{
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2091,8 +2091,6 @@ extern int filemap_fdatawait_range(struct address_space *, loff_t lstart,
|
||||
extern int filemap_write_and_wait(struct address_space *mapping);
|
||||
extern int filemap_write_and_wait_range(struct address_space *mapping,
|
||||
loff_t lstart, loff_t lend);
|
||||
extern int wait_on_page_writeback_range(struct address_space *mapping,
|
||||
pgoff_t start, pgoff_t end);
|
||||
extern int __filemap_fdatawrite_range(struct address_space *mapping,
|
||||
loff_t start, loff_t end, int sync_mode);
|
||||
extern int filemap_fdatawrite_range(struct address_space *mapping,
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
#ifndef HAYESESP_H
|
||||
#define HAYESESP_H
|
||||
|
||||
struct hayes_esp_config {
|
||||
short flow_on;
|
||||
short flow_off;
|
||||
short rx_trigger;
|
||||
short tx_trigger;
|
||||
short pio_threshold;
|
||||
unsigned char rx_timeout;
|
||||
char dma_channel;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define ESP_DMA_CHANNEL 0
|
||||
#define ESP_RX_TRIGGER 768
|
||||
#define ESP_TX_TRIGGER 768
|
||||
#define ESP_FLOW_OFF 1016
|
||||
#define ESP_FLOW_ON 944
|
||||
#define ESP_RX_TMOUT 128
|
||||
#define ESP_PIO_THRESHOLD 32
|
||||
|
||||
#define ESP_IN_MAJOR 57 /* major dev # for dial in */
|
||||
#define ESP_OUT_MAJOR 58 /* major dev # for dial out */
|
||||
#define ESPC_SCALE 3
|
||||
#define UART_ESI_BASE 0x00
|
||||
#define UART_ESI_SID 0x01
|
||||
#define UART_ESI_RX 0x02
|
||||
#define UART_ESI_TX 0x02
|
||||
#define UART_ESI_CMD1 0x04
|
||||
#define UART_ESI_CMD2 0x05
|
||||
#define UART_ESI_STAT1 0x04
|
||||
#define UART_ESI_STAT2 0x05
|
||||
#define UART_ESI_RWS 0x07
|
||||
|
||||
#define UART_IER_DMA_TMOUT 0x80
|
||||
#define UART_IER_DMA_TC 0x08
|
||||
|
||||
#define ESI_SET_IRQ 0x04
|
||||
#define ESI_SET_DMA_TMOUT 0x05
|
||||
#define ESI_SET_SRV_MASK 0x06
|
||||
#define ESI_SET_ERR_MASK 0x07
|
||||
#define ESI_SET_FLOW_CNTL 0x08
|
||||
#define ESI_SET_FLOW_CHARS 0x09
|
||||
#define ESI_SET_FLOW_LVL 0x0a
|
||||
#define ESI_SET_TRIGGER 0x0b
|
||||
#define ESI_SET_RX_TIMEOUT 0x0c
|
||||
#define ESI_SET_FLOW_TMOUT 0x0d
|
||||
#define ESI_WRITE_UART 0x0e
|
||||
#define ESI_READ_UART 0x0f
|
||||
#define ESI_SET_MODE 0x10
|
||||
#define ESI_GET_ERR_STAT 0x12
|
||||
#define ESI_GET_UART_STAT 0x13
|
||||
#define ESI_GET_RX_AVAIL 0x14
|
||||
#define ESI_GET_TX_AVAIL 0x15
|
||||
#define ESI_START_DMA_RX 0x16
|
||||
#define ESI_START_DMA_TX 0x17
|
||||
#define ESI_ISSUE_BREAK 0x1a
|
||||
#define ESI_FLUSH_RX 0x1b
|
||||
#define ESI_FLUSH_TX 0x1c
|
||||
#define ESI_SET_BAUD 0x1d
|
||||
#define ESI_SET_ENH_IRQ 0x1f
|
||||
#define ESI_SET_REINTR 0x20
|
||||
#define ESI_SET_PRESCALAR 0x23
|
||||
#define ESI_NO_COMMAND 0xff
|
||||
|
||||
#define ESP_STAT_RX_TIMEOUT 0x01
|
||||
#define ESP_STAT_DMA_RX 0x02
|
||||
#define ESP_STAT_DMA_TX 0x04
|
||||
#define ESP_STAT_NEVER_DMA 0x08
|
||||
#define ESP_STAT_USE_PIO 0x10
|
||||
|
||||
#define ESP_MAGIC 0x53ee
|
||||
#define ESP_XMIT_SIZE 4096
|
||||
|
||||
struct esp_struct {
|
||||
int magic;
|
||||
struct tty_port port;
|
||||
spinlock_t lock;
|
||||
int io_port;
|
||||
int irq;
|
||||
int read_status_mask;
|
||||
int ignore_status_mask;
|
||||
int timeout;
|
||||
int stat_flags;
|
||||
int custom_divisor;
|
||||
int close_delay;
|
||||
unsigned short closing_wait;
|
||||
unsigned short closing_wait2;
|
||||
int IER; /* Interrupt Enable Register */
|
||||
int MCR; /* Modem control register */
|
||||
unsigned long last_active;
|
||||
int line;
|
||||
unsigned char *xmit_buf;
|
||||
int xmit_head;
|
||||
int xmit_tail;
|
||||
int xmit_cnt;
|
||||
wait_queue_head_t break_wait;
|
||||
struct async_icount icount; /* kernel counters for the 4 input interrupts */
|
||||
struct hayes_esp_config config; /* port configuration */
|
||||
struct esp_struct *next_port; /* For the linked list */
|
||||
};
|
||||
|
||||
struct esp_pio_buffer {
|
||||
unsigned char data[1024];
|
||||
struct esp_pio_buffer *next;
|
||||
};
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
||||
#endif /* ESP_H */
|
||||
|
||||
@@ -312,6 +312,7 @@ struct hid_item {
|
||||
#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
|
||||
|
||||
/*
|
||||
* This is the global environment of the parser. This information is
|
||||
|
||||
@@ -126,4 +126,6 @@ struct hpet_info {
|
||||
#define HPET_DPI _IO('h', 0x05) /* disable periodic */
|
||||
#define HPET_IRQFREQ _IOW('h', 0x6, unsigned long) /* IRQFREQ usec */
|
||||
|
||||
#define MAX_HPET_TBS 8 /* maximum hpet timer blocks */
|
||||
|
||||
#endif /* !__HPET__ */
|
||||
|
||||
@@ -446,7 +446,7 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
|
||||
|
||||
static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
|
||||
{
|
||||
if (likely(!timer->start_site))
|
||||
if (likely(!timer_stats_active))
|
||||
return;
|
||||
timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
|
||||
timer->function, timer->start_comm, 0);
|
||||
@@ -457,8 +457,6 @@ extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer,
|
||||
|
||||
static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer)
|
||||
{
|
||||
if (likely(!timer_stats_active))
|
||||
return;
|
||||
__timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,10 +22,12 @@
|
||||
* @cleanup: Cleanup callback (can be NULL).
|
||||
* @data_present: Callback to determine if data is available
|
||||
* on the RNG. If NULL, it is assumed that
|
||||
* there is always data available.
|
||||
* there is always data available. *OBSOLETE*
|
||||
* @data_read: Read data from the RNG device.
|
||||
* Returns the number of lower random bytes in "data".
|
||||
* Must not be NULL.
|
||||
* Must not be NULL. *OSOLETE*
|
||||
* @read: New API. drivers can fill up to max bytes of data
|
||||
* into the buffer. The buffer is aligned for any type.
|
||||
* @priv: Private data, for use by the RNG driver.
|
||||
*/
|
||||
struct hwrng {
|
||||
@@ -34,6 +36,7 @@ struct hwrng {
|
||||
void (*cleanup)(struct hwrng *rng);
|
||||
int (*data_present)(struct hwrng *rng, int wait);
|
||||
int (*data_read)(struct hwrng *rng, u32 *data);
|
||||
int (*read)(struct hwrng *rng, void *data, size_t max, bool wait);
|
||||
unsigned long priv;
|
||||
|
||||
/* internal. */
|
||||
|
||||
+2
-2
@@ -125,8 +125,8 @@ struct ide_io_ports {
|
||||
* Timeouts for various operations:
|
||||
*/
|
||||
enum {
|
||||
/* spec allows up to 20ms */
|
||||
WAIT_DRQ = HZ / 10, /* 100ms */
|
||||
/* spec allows up to 20ms, but CF cards and SSD drives need more */
|
||||
WAIT_DRQ = 1 * HZ, /* 1s */
|
||||
/* some laptops are very slow */
|
||||
WAIT_READY = 5 * HZ, /* 5s */
|
||||
/* should be less than 3ms (?), if all ATAPI CD is closed at boot */
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ struct in6_flowlabel_req {
|
||||
#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
|
||||
#define IPV6_FLOWINFO_PRIORITY 0x0ff00000
|
||||
|
||||
/* These defintions are obsolete */
|
||||
/* These definitions are obsolete */
|
||||
#define IPV6_PRIORITY_UNCHARACTERIZED 0x0000
|
||||
#define IPV6_PRIORITY_FILLER 0x0100
|
||||
#define IPV6_PRIORITY_UNATTENDED 0x0200
|
||||
|
||||
@@ -14,12 +14,19 @@
|
||||
|
||||
/**
|
||||
* struct input_polled_dev - simple polled input device
|
||||
* @private: private driver data
|
||||
* @flush: driver-supplied method that flushes device's state upon
|
||||
* opening (optional)
|
||||
* @private: private driver data.
|
||||
* @open: driver-supplied method that prepares device for polling
|
||||
* (enabled the device and maybe flushes device state).
|
||||
* @close: driver-supplied method that is called when device is no
|
||||
* longer being polled. Used to put device into low power mode.
|
||||
* @poll: driver-supplied method that polls the device and posts
|
||||
* input events (mandatory).
|
||||
* @poll_interval: specifies how often the poll() method shoudl be called.
|
||||
* @poll_interval: specifies how often the poll() method should be called.
|
||||
* Defaults to 500 msec unless overriden when registering the device.
|
||||
* @poll_interval_max: specifies upper bound for the poll interval.
|
||||
* Defaults to the initial value of @poll_interval.
|
||||
* @poll_interval_min: specifies lower bound for the poll interval.
|
||||
* Defaults to 0.
|
||||
* @input: input device structire associated with the polled device.
|
||||
* Must be properly initialized by the driver (id, name, phys, bits).
|
||||
*
|
||||
@@ -30,11 +37,16 @@
|
||||
struct input_polled_dev {
|
||||
void *private;
|
||||
|
||||
void (*flush)(struct input_polled_dev *dev);
|
||||
void (*open)(struct input_polled_dev *dev);
|
||||
void (*close)(struct input_polled_dev *dev);
|
||||
void (*poll)(struct input_polled_dev *dev);
|
||||
unsigned int poll_interval; /* msec */
|
||||
unsigned int poll_interval_max; /* msec */
|
||||
unsigned int poll_interval_min; /* msec */
|
||||
|
||||
struct input_dev *input;
|
||||
|
||||
/* private: */
|
||||
struct delayed_work work;
|
||||
};
|
||||
|
||||
|
||||
+10
-3
@@ -895,7 +895,7 @@ struct ff_periodic_effect {
|
||||
struct ff_envelope envelope;
|
||||
|
||||
__u32 custom_len;
|
||||
__s16 *custom_data;
|
||||
__s16 __user *custom_data;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1021,9 +1021,12 @@ struct ff_effect {
|
||||
* @keycodesize: size of elements in keycode table
|
||||
* @keycode: map of scancodes to keycodes for this device
|
||||
* @setkeycode: optional method to alter current keymap, used to implement
|
||||
* sparse keymaps. If not supplied default mechanism will be used
|
||||
* sparse keymaps. If not supplied default mechanism will be used.
|
||||
* The method is being called while holding event_lock and thus must
|
||||
* not sleep
|
||||
* @getkeycode: optional method to retrieve current keymap. If not supplied
|
||||
* default mechanism will be used
|
||||
* default mechanism will be used. The method is being called while
|
||||
* holding event_lock and thus must not sleep
|
||||
* @ff: force feedback structure associated with the device if device
|
||||
* supports force feedback effects
|
||||
* @repeat_key: stores key code of the last key pressed; used to implement
|
||||
@@ -1040,6 +1043,7 @@ struct ff_effect {
|
||||
* @absmin: minimum values for events coming from absolute axes
|
||||
* @absfuzz: describes noisiness for axes
|
||||
* @absflat: size of the center flat position (used by joydev)
|
||||
* @absres: resolution used for events coming form absolute axes
|
||||
* @open: this method is called when the very first user calls
|
||||
* input_open_device(). The driver must prepare the device
|
||||
* to start generating events (start polling thread,
|
||||
@@ -1294,6 +1298,9 @@ void input_unregister_device(struct input_dev *);
|
||||
int __must_check input_register_handler(struct input_handler *);
|
||||
void input_unregister_handler(struct input_handler *);
|
||||
|
||||
int input_handler_for_each_handle(struct input_handler *, void *data,
|
||||
int (*fn)(struct input_handle *, void *));
|
||||
|
||||
int input_register_handle(struct input_handle *);
|
||||
void input_unregister_handle(struct input_handle *);
|
||||
|
||||
|
||||
@@ -41,6 +41,9 @@ struct matrix_keymap_data {
|
||||
* @col_scan_delay_us: delay, measured in microseconds, that is
|
||||
* needed before we can keypad after activating column gpio
|
||||
* @debounce_ms: debounce interval in milliseconds
|
||||
* @active_low: gpio polarity
|
||||
* @wakeup: controls whether the device should be set up as wakeup
|
||||
* source
|
||||
*
|
||||
* This structure represents platform-specific data that use used by
|
||||
* matrix_keypad driver to perform proper initialization.
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef __SH_KEYSC_H__
|
||||
#define __SH_KEYSC_H__
|
||||
|
||||
#define SH_KEYSC_MAXKEYS 30
|
||||
|
||||
struct sh_keysc_info {
|
||||
enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode;
|
||||
int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */
|
||||
int delay;
|
||||
int kycr2_delay;
|
||||
int keycodes[SH_KEYSC_MAXKEYS];
|
||||
};
|
||||
|
||||
#endif /* __SH_KEYSC_H__ */
|
||||
@@ -0,0 +1,62 @@
|
||||
#ifndef _SPARSE_KEYMAP_H
|
||||
#define _SPARSE_KEYMAP_H
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Dmitry Torokhov
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#define KE_END 0 /* Indicates end of keymap */
|
||||
#define KE_KEY 1 /* Ordinary key/button */
|
||||
#define KE_SW 2 /* Switch (predetermined value) */
|
||||
#define KE_VSW 3 /* Switch (value supplied at runtime) */
|
||||
#define KE_IGNORE 4 /* Known entry that should be ignored */
|
||||
#define KE_LAST KE_IGNORE
|
||||
|
||||
/**
|
||||
* struct key_entry - keymap entry for use in sparse keymap
|
||||
* @type: Type of the key entry (KE_KEY, KE_SW, KE_VSW, KE_END);
|
||||
* drivers are allowed to extend the list with their own
|
||||
* private definitions.
|
||||
* @code: Device-specific data identifying the button/switch
|
||||
* @keycode: KEY_* code assigned to a key/button
|
||||
* @sw.code: SW_* code assigned to a switch
|
||||
* @sw.value: Value that should be sent in an input even when KE_SW
|
||||
* switch is toggled. KE_VSW switches ignore this field and
|
||||
* expect driver to supply value for the event.
|
||||
*
|
||||
* This structure defines an entry in a sparse keymap used by some
|
||||
* input devices for which traditional table-based approach is not
|
||||
* suitable.
|
||||
*/
|
||||
struct key_entry {
|
||||
int type; /* See KE_* above */
|
||||
u32 code;
|
||||
union {
|
||||
u16 keycode; /* For KE_KEY */
|
||||
struct { /* For KE_SW, KE_VSW */
|
||||
u8 code;
|
||||
u8 value; /* For KE_SW, ignored by KE_VSW */
|
||||
} sw;
|
||||
};
|
||||
};
|
||||
|
||||
struct key_entry *sparse_keymap_entry_from_scancode(struct input_dev *dev,
|
||||
unsigned int code);
|
||||
struct key_entry *sparse_keymap_entry_from_keycode(struct input_dev *dev,
|
||||
unsigned int code);
|
||||
int sparse_keymap_setup(struct input_dev *dev,
|
||||
const struct key_entry *keymap,
|
||||
int (*setup)(struct input_dev *, struct key_entry *));
|
||||
void sparse_keymap_free(struct input_dev *dev);
|
||||
|
||||
void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *ke,
|
||||
unsigned int value, bool autorelease);
|
||||
|
||||
bool sparse_keymap_report_event(struct input_dev *dev, unsigned int code,
|
||||
unsigned int value, bool autorelease);
|
||||
|
||||
#endif /* _SPARSE_KEYMAP_H */
|
||||
+1
-1
@@ -282,7 +282,7 @@ extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action);
|
||||
|
||||
/*
|
||||
* Built-in IRQ handlers for various IRQ types,
|
||||
* callable via desc->chip->handle_irq()
|
||||
* callable via desc->handle_irq()
|
||||
*/
|
||||
extern void handle_level_irq(unsigned int irq, struct irq_desc *desc);
|
||||
extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc);
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
|
||||
#define FIRMWARE_LOADED 0x0001
|
||||
#define BOARD_ACTIVE 0x0002
|
||||
#define BOARD_INIT 0x0004
|
||||
|
||||
/* isi_port status bitmap */
|
||||
|
||||
|
||||
@@ -1024,7 +1024,7 @@ extern int ata_std_bios_param(struct scsi_device *sdev,
|
||||
extern int ata_scsi_slave_config(struct scsi_device *sdev);
|
||||
extern void ata_scsi_slave_destroy(struct scsi_device *sdev);
|
||||
extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,
|
||||
int queue_depth);
|
||||
int queue_depth, int reason);
|
||||
extern struct ata_device *ata_dev_pair(struct ata_device *adev);
|
||||
extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ void pcap_set_ts_bits(struct pcap_chip *, u32);
|
||||
#define PCAP_CLEAR_INTERRUPT_REGISTER 0x01ffffff
|
||||
#define PCAP_MASK_ALL_INTERRUPT 0x01ffffff
|
||||
|
||||
/* registers acessible by both pcap ports */
|
||||
/* registers accessible by both pcap ports */
|
||||
#define PCAP_REG_ISR 0x0 /* Interrupt Status */
|
||||
#define PCAP_REG_MSR 0x1 /* Interrupt Mask */
|
||||
#define PCAP_REG_PSTAT 0x2 /* Processor Status */
|
||||
@@ -67,7 +67,7 @@ void pcap_set_ts_bits(struct pcap_chip *, u32);
|
||||
#define PCAP_REG_VENDOR_TEST1 0x1e
|
||||
#define PCAP_REG_VENDOR_TEST2 0x1f
|
||||
|
||||
/* registers acessible by pcap port 1 only (a1200, e2 & e6) */
|
||||
/* registers accessible by pcap port 1 only (a1200, e2 & e6) */
|
||||
#define PCAP_REG_INT_SEL 0x3 /* Interrupt Select */
|
||||
#define PCAP_REG_SWCTRL 0x4 /* Switching Regulator Control */
|
||||
#define PCAP_REG_VREG1 0x5 /* Regulator Bank 1 Control */
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef __SH_MOBILE_SDHI_H__
|
||||
#define __SH_MOBILE_SDHI_H__
|
||||
|
||||
struct sh_mobile_sdhi_info {
|
||||
void (*set_pwr)(struct platform_device *pdev, int state);
|
||||
};
|
||||
|
||||
#endif /* __SH_MOBILE_SDHI_H__ */
|
||||
@@ -174,6 +174,8 @@ void ubi_get_volume_info(struct ubi_volume_desc *desc,
|
||||
struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode);
|
||||
struct ubi_volume_desc *ubi_open_volume_nm(int ubi_num, const char *name,
|
||||
int mode);
|
||||
struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode);
|
||||
|
||||
int ubi_register_volume_notifier(struct notifier_block *nb,
|
||||
int ignore_existing);
|
||||
int ubi_unregister_volume_notifier(struct notifier_block *nb);
|
||||
|
||||
@@ -76,7 +76,6 @@ extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
|
||||
extern void release_open_intent(struct nameidata *);
|
||||
|
||||
extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
|
||||
extern struct dentry *lookup_one_noperm(const char *, struct dentry *);
|
||||
|
||||
extern int follow_down(struct path *);
|
||||
extern int follow_up(struct path *);
|
||||
|
||||
@@ -151,6 +151,8 @@ struct nilfs_super_root {
|
||||
#define NILFS_MOUNT_BARRIER 0x1000 /* Use block barriers */
|
||||
#define NILFS_MOUNT_STRICT_ORDER 0x2000 /* Apply strict in-order
|
||||
semantics also for data */
|
||||
#define NILFS_MOUNT_NORECOVERY 0x4000 /* Disable write access during
|
||||
mount-time recovery */
|
||||
|
||||
|
||||
/**
|
||||
@@ -402,6 +404,28 @@ struct nilfs_segment_summary {
|
||||
#define NILFS_SS_SYNDT 0x0008 /* includes data only updates */
|
||||
#define NILFS_SS_GC 0x0010 /* segment written for cleaner operation */
|
||||
|
||||
/**
|
||||
* struct nilfs_btree_node - B-tree node
|
||||
* @bn_flags: flags
|
||||
* @bn_level: level
|
||||
* @bn_nchildren: number of children
|
||||
* @bn_pad: padding
|
||||
*/
|
||||
struct nilfs_btree_node {
|
||||
__u8 bn_flags;
|
||||
__u8 bn_level;
|
||||
__le16 bn_nchildren;
|
||||
__le32 bn_pad;
|
||||
};
|
||||
|
||||
/* flags */
|
||||
#define NILFS_BTREE_NODE_ROOT 0x01
|
||||
|
||||
/* level */
|
||||
#define NILFS_BTREE_LEVEL_DATA 0
|
||||
#define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1)
|
||||
#define NILFS_BTREE_LEVEL_MAX 14
|
||||
|
||||
/**
|
||||
* struct nilfs_palloc_group_desc - block group descriptor
|
||||
* @pg_nfrees: number of free entries in block group
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
/*
|
||||
* File: include/linux/omapfb.h
|
||||
*
|
||||
* Framebuffer driver for TI OMAP boards
|
||||
*
|
||||
* Copyright (C) 2004 Nokia Corporation
|
||||
* Author: Imre Deak <imre.deak@nokia.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* 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_OMAPFB_H__
|
||||
#define __LINUX_OMAPFB_H__
|
||||
|
||||
#include <linux/fb.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* IOCTL commands. */
|
||||
|
||||
#define OMAP_IOW(num, dtype) _IOW('O', num, dtype)
|
||||
#define OMAP_IOR(num, dtype) _IOR('O', num, dtype)
|
||||
#define OMAP_IOWR(num, dtype) _IOWR('O', num, dtype)
|
||||
#define OMAP_IO(num) _IO('O', num)
|
||||
|
||||
#define OMAPFB_MIRROR OMAP_IOW(31, int)
|
||||
#define OMAPFB_SYNC_GFX OMAP_IO(37)
|
||||
#define OMAPFB_VSYNC OMAP_IO(38)
|
||||
#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
|
||||
#define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
|
||||
#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
|
||||
#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
|
||||
#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
|
||||
#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
|
||||
#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
|
||||
#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
|
||||
#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
|
||||
#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
|
||||
#define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
|
||||
#define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info)
|
||||
#define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
|
||||
#define OMAPFB_WAITFORVSYNC OMAP_IO(57)
|
||||
#define OMAPFB_MEMORY_READ OMAP_IOR(58, struct omapfb_memory_read)
|
||||
#define OMAPFB_GET_OVERLAY_COLORMODE OMAP_IOR(59, struct omapfb_ovl_colormode)
|
||||
#define OMAPFB_WAITFORGO OMAP_IO(60)
|
||||
#define OMAPFB_GET_VRAM_INFO OMAP_IOR(61, struct omapfb_vram_info)
|
||||
#define OMAPFB_SET_TEARSYNC OMAP_IOW(62, struct omapfb_tearsync_info)
|
||||
|
||||
#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
|
||||
#define OMAPFB_CAPS_LCDC_MASK 0x00fff000
|
||||
#define OMAPFB_CAPS_PANEL_MASK 0xff000000
|
||||
|
||||
#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000
|
||||
#define OMAPFB_CAPS_TEARSYNC 0x00002000
|
||||
#define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000
|
||||
#define OMAPFB_CAPS_PLANE_SCALE 0x00008000
|
||||
#define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
|
||||
#define OMAPFB_CAPS_WINDOW_SCALE 0x00020000
|
||||
#define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000
|
||||
#define OMAPFB_CAPS_WINDOW_ROTATE 0x00080000
|
||||
#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
|
||||
|
||||
/* Values from DSP must map to lower 16-bits */
|
||||
#define OMAPFB_FORMAT_MASK 0x00ff
|
||||
#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
|
||||
#define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
|
||||
#define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
|
||||
#define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
|
||||
#define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
|
||||
|
||||
#define OMAPFB_MEMTYPE_SDRAM 0
|
||||
#define OMAPFB_MEMTYPE_SRAM 1
|
||||
#define OMAPFB_MEMTYPE_MAX 1
|
||||
|
||||
enum omapfb_color_format {
|
||||
OMAPFB_COLOR_RGB565 = 0,
|
||||
OMAPFB_COLOR_YUV422,
|
||||
OMAPFB_COLOR_YUV420,
|
||||
OMAPFB_COLOR_CLUT_8BPP,
|
||||
OMAPFB_COLOR_CLUT_4BPP,
|
||||
OMAPFB_COLOR_CLUT_2BPP,
|
||||
OMAPFB_COLOR_CLUT_1BPP,
|
||||
OMAPFB_COLOR_RGB444,
|
||||
OMAPFB_COLOR_YUY422,
|
||||
|
||||
OMAPFB_COLOR_ARGB16,
|
||||
OMAPFB_COLOR_RGB24U, /* RGB24, 32-bit container */
|
||||
OMAPFB_COLOR_RGB24P, /* RGB24, 24-bit container */
|
||||
OMAPFB_COLOR_ARGB32,
|
||||
OMAPFB_COLOR_RGBA32,
|
||||
OMAPFB_COLOR_RGBX32,
|
||||
};
|
||||
|
||||
struct omapfb_update_window {
|
||||
__u32 x, y;
|
||||
__u32 width, height;
|
||||
__u32 format;
|
||||
__u32 out_x, out_y;
|
||||
__u32 out_width, out_height;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
struct omapfb_update_window_old {
|
||||
__u32 x, y;
|
||||
__u32 width, height;
|
||||
__u32 format;
|
||||
};
|
||||
|
||||
enum omapfb_plane {
|
||||
OMAPFB_PLANE_GFX = 0,
|
||||
OMAPFB_PLANE_VID1,
|
||||
OMAPFB_PLANE_VID2,
|
||||
};
|
||||
|
||||
enum omapfb_channel_out {
|
||||
OMAPFB_CHANNEL_OUT_LCD = 0,
|
||||
OMAPFB_CHANNEL_OUT_DIGIT,
|
||||
};
|
||||
|
||||
struct omapfb_plane_info {
|
||||
__u32 pos_x;
|
||||
__u32 pos_y;
|
||||
__u8 enabled;
|
||||
__u8 channel_out;
|
||||
__u8 mirror;
|
||||
__u8 reserved1;
|
||||
__u32 out_width;
|
||||
__u32 out_height;
|
||||
__u32 reserved2[12];
|
||||
};
|
||||
|
||||
struct omapfb_mem_info {
|
||||
__u32 size;
|
||||
__u8 type;
|
||||
__u8 reserved[3];
|
||||
};
|
||||
|
||||
struct omapfb_caps {
|
||||
__u32 ctrl;
|
||||
__u32 plane_color;
|
||||
__u32 wnd_color;
|
||||
};
|
||||
|
||||
enum omapfb_color_key_type {
|
||||
OMAPFB_COLOR_KEY_DISABLED = 0,
|
||||
OMAPFB_COLOR_KEY_GFX_DST,
|
||||
OMAPFB_COLOR_KEY_VID_SRC,
|
||||
};
|
||||
|
||||
struct omapfb_color_key {
|
||||
__u8 channel_out;
|
||||
__u32 background;
|
||||
__u32 trans_key;
|
||||
__u8 key_type;
|
||||
};
|
||||
|
||||
enum omapfb_update_mode {
|
||||
OMAPFB_UPDATE_DISABLED = 0,
|
||||
OMAPFB_AUTO_UPDATE,
|
||||
OMAPFB_MANUAL_UPDATE
|
||||
};
|
||||
|
||||
struct omapfb_memory_read {
|
||||
__u16 x;
|
||||
__u16 y;
|
||||
__u16 w;
|
||||
__u16 h;
|
||||
size_t buffer_size;
|
||||
void __user *buffer;
|
||||
};
|
||||
|
||||
struct omapfb_ovl_colormode {
|
||||
__u8 overlay_idx;
|
||||
__u8 mode_idx;
|
||||
__u32 bits_per_pixel;
|
||||
__u32 nonstd;
|
||||
struct fb_bitfield red;
|
||||
struct fb_bitfield green;
|
||||
struct fb_bitfield blue;
|
||||
struct fb_bitfield transp;
|
||||
};
|
||||
|
||||
struct omapfb_vram_info {
|
||||
__u32 total;
|
||||
__u32 free;
|
||||
__u32 largest_free_block;
|
||||
__u32 reserved[5];
|
||||
};
|
||||
|
||||
struct omapfb_tearsync_info {
|
||||
__u8 enabled;
|
||||
__u8 reserved1[3];
|
||||
__u16 line;
|
||||
__u16 reserved2;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <plat/board.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1
|
||||
#define OMAPFB_PLANE_NUM 1
|
||||
#else
|
||||
#define OMAPFB_PLANE_NUM 3
|
||||
#endif
|
||||
|
||||
struct omapfb_mem_region {
|
||||
u32 paddr;
|
||||
void __iomem *vaddr;
|
||||
unsigned long size;
|
||||
u8 type; /* OMAPFB_PLANE_MEM_* */
|
||||
enum omapfb_color_format format;/* OMAPFB_COLOR_* */
|
||||
unsigned format_used:1; /* Must be set when format is set.
|
||||
* Needed b/c of the badly chosen 0
|
||||
* base for OMAPFB_COLOR_* values
|
||||
*/
|
||||
unsigned alloc:1; /* allocated by the driver */
|
||||
unsigned map:1; /* kernel mapped by the driver */
|
||||
};
|
||||
|
||||
struct omapfb_mem_desc {
|
||||
int region_cnt;
|
||||
struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
|
||||
};
|
||||
|
||||
struct omapfb_platform_data {
|
||||
struct omap_lcd_config lcd;
|
||||
struct omapfb_mem_desc mem_desc;
|
||||
void *ctrl_platform_data;
|
||||
};
|
||||
|
||||
/* in arch/arm/plat-omap/fb.c */
|
||||
extern void omapfb_set_platform_data(struct omapfb_platform_data *data);
|
||||
extern void omapfb_set_ctrl_platform_data(void *pdata);
|
||||
extern void omapfb_reserve_sdram(void);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __OMAPFB_H */
|
||||
+41
-1
@@ -218,6 +218,7 @@ struct pci_dev {
|
||||
unsigned int class; /* 3 bytes: (base,sub,prog-if) */
|
||||
u8 revision; /* PCI revision, low byte of class word */
|
||||
u8 hdr_type; /* PCI header type (`multi' flag masked out) */
|
||||
u8 pcie_cap; /* PCI-E capability offset */
|
||||
u8 pcie_type; /* PCI-E device/port type */
|
||||
u8 rom_base_reg; /* which config register controls the ROM */
|
||||
u8 pin; /* which interrupt pin this device uses */
|
||||
@@ -280,6 +281,7 @@ struct pci_dev {
|
||||
unsigned int is_virtfn:1;
|
||||
unsigned int reset_fn:1;
|
||||
unsigned int is_hotplug_bridge:1;
|
||||
unsigned int aer_firmware_first:1;
|
||||
pci_dev_flags_t dev_flags;
|
||||
atomic_t enable_cnt; /* pci_enable_device has been called */
|
||||
|
||||
@@ -635,7 +637,13 @@ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device,
|
||||
unsigned int ss_vendor, unsigned int ss_device,
|
||||
struct pci_dev *from);
|
||||
struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn);
|
||||
struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn);
|
||||
struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus,
|
||||
unsigned int devfn);
|
||||
static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
|
||||
unsigned int devfn)
|
||||
{
|
||||
return pci_get_domain_bus_and_slot(0, bus, devfn);
|
||||
}
|
||||
struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from);
|
||||
int pci_dev_present(const struct pci_device_id *ids);
|
||||
|
||||
@@ -701,6 +709,7 @@ void pci_disable_device(struct pci_dev *dev);
|
||||
void pci_set_master(struct pci_dev *dev);
|
||||
void pci_clear_master(struct pci_dev *dev);
|
||||
int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state);
|
||||
int pci_set_cacheline_size(struct pci_dev *dev);
|
||||
#define HAVE_PCI_SET_MWI
|
||||
int __must_check pci_set_mwi(struct pci_dev *dev);
|
||||
int pci_try_set_mwi(struct pci_dev *dev);
|
||||
@@ -1246,6 +1255,8 @@ extern int pci_pci_problems;
|
||||
|
||||
extern unsigned long pci_cardbus_io_size;
|
||||
extern unsigned long pci_cardbus_mem_size;
|
||||
extern u8 pci_dfl_cache_line_size;
|
||||
extern u8 pci_cache_line_size;
|
||||
|
||||
extern unsigned long pci_hotplug_io_size;
|
||||
extern unsigned long pci_hotplug_mem_size;
|
||||
@@ -1290,5 +1301,34 @@ extern void pci_hp_create_module_link(struct pci_slot *pci_slot);
|
||||
extern void pci_hp_remove_module_link(struct pci_slot *pci_slot);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* pci_pcie_cap - get the saved PCIe capability offset
|
||||
* @dev: PCI device
|
||||
*
|
||||
* PCIe capability offset is calculated at PCI device initialization
|
||||
* time and saved in the data structure. This function returns saved
|
||||
* PCIe capability offset. Using this instead of pci_find_capability()
|
||||
* reduces unnecessary search in the PCI configuration space. If you
|
||||
* need to calculate PCIe capability offset from raw device for some
|
||||
* reasons, please use pci_find_capability() instead.
|
||||
*/
|
||||
static inline int pci_pcie_cap(struct pci_dev *dev)
|
||||
{
|
||||
return dev->pcie_cap;
|
||||
}
|
||||
|
||||
/**
|
||||
* pci_is_pcie - check if the PCI device is PCI Express capable
|
||||
* @dev: PCI device
|
||||
*
|
||||
* Retrun true if the PCI device is PCI Express capable, false otherwise.
|
||||
*/
|
||||
static inline bool pci_is_pcie(struct pci_dev *dev)
|
||||
{
|
||||
return !!pci_pcie_cap(dev);
|
||||
}
|
||||
|
||||
void pci_request_acs(void);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* LINUX_PCI_H */
|
||||
|
||||
@@ -1587,6 +1587,8 @@
|
||||
#define PCI_VENDOR_ID_COMPEX 0x11f6
|
||||
#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112
|
||||
|
||||
#define PCI_VENDOR_ID_PMC_Sierra 0x11f8
|
||||
|
||||
#define PCI_VENDOR_ID_RP 0x11fe
|
||||
#define PCI_DEVICE_ID_RP32INTF 0x0001
|
||||
#define PCI_DEVICE_ID_RP8INTF 0x0002
|
||||
|
||||
@@ -365,6 +365,11 @@
|
||||
#define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */
|
||||
#define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */
|
||||
|
||||
/* PCI Bridge Subsystem ID registers */
|
||||
|
||||
#define PCI_SSVID_VENDOR_ID 4 /* PCI-Bridge subsystem vendor id register */
|
||||
#define PCI_SSVID_DEVICE_ID 6 /* PCI-Bridge subsystem device id register */
|
||||
|
||||
/* PCI Express capability registers */
|
||||
|
||||
#define PCI_EXP_FLAGS 2 /* Capabilities register */
|
||||
@@ -502,6 +507,7 @@
|
||||
#define PCI_EXT_CAP_ID_VC 2
|
||||
#define PCI_EXT_CAP_ID_DSN 3
|
||||
#define PCI_EXT_CAP_ID_PWR 4
|
||||
#define PCI_EXT_CAP_ID_ACS 13
|
||||
#define PCI_EXT_CAP_ID_ARI 14
|
||||
#define PCI_EXT_CAP_ID_ATS 15
|
||||
#define PCI_EXT_CAP_ID_SRIOV 16
|
||||
@@ -662,4 +668,16 @@
|
||||
#define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */
|
||||
#define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */
|
||||
|
||||
/* Access Control Service */
|
||||
#define PCI_ACS_CAP 0x04 /* ACS Capability Register */
|
||||
#define PCI_ACS_SV 0x01 /* Source Validation */
|
||||
#define PCI_ACS_TB 0x02 /* Translation Blocking */
|
||||
#define PCI_ACS_RR 0x04 /* P2P Request Redirect */
|
||||
#define PCI_ACS_CR 0x08 /* P2P Completion Redirect */
|
||||
#define PCI_ACS_UF 0x10 /* Upstream Forwarding */
|
||||
#define PCI_ACS_EC 0x20 /* P2P Egress Control */
|
||||
#define PCI_ACS_DT 0x40 /* Direct Translated P2P */
|
||||
#define PCI_ACS_CTRL 0x06 /* ACS Control Register */
|
||||
#define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */
|
||||
|
||||
#endif /* LINUX_PCI_REGS_H */
|
||||
|
||||
@@ -10,10 +10,7 @@
|
||||
#define _PCIEPORT_IF_H_
|
||||
|
||||
/* Port Type */
|
||||
#define PCIE_RC_PORT 4 /* Root port of RC */
|
||||
#define PCIE_SW_UPSTREAM_PORT 5 /* Upstream port of Switch */
|
||||
#define PCIE_SW_DOWNSTREAM_PORT 6 /* Downstream port of Switch */
|
||||
#define PCIE_ANY_PORT 7
|
||||
#define PCIE_ANY_PORT (~0)
|
||||
|
||||
/* Service Type */
|
||||
#define PCIE_PORT_SERVICE_PME_SHIFT 0 /* Power Management Event */
|
||||
@@ -25,17 +22,6 @@
|
||||
#define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */
|
||||
#define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT)
|
||||
|
||||
/* Root/Upstream/Downstream Port's Interrupt Mode */
|
||||
#define PCIE_PORT_NO_IRQ (-1)
|
||||
#define PCIE_PORT_INTx_MODE 0
|
||||
#define PCIE_PORT_MSI_MODE 1
|
||||
#define PCIE_PORT_MSIX_MODE 2
|
||||
|
||||
struct pcie_port_data {
|
||||
int port_type; /* Type of the port */
|
||||
int port_irq_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */
|
||||
};
|
||||
|
||||
struct pcie_device {
|
||||
int irq; /* Service IRQ/MSI/MSI-X Vector */
|
||||
struct pci_dev *port; /* Root/Upstream/Downstream Port */
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
/*
|
||||
* use drive write caching -- we need deferred error handling to be
|
||||
* able to sucessfully recover with this option (drive will return good
|
||||
* able to successfully recover with this option (drive will return good
|
||||
* status as soon as the cdb is validated).
|
||||
*/
|
||||
#if defined(CONFIG_CDROM_PKTCDVD_WCACHE)
|
||||
|
||||
@@ -83,6 +83,8 @@ struct early_platform_driver {
|
||||
struct platform_driver *pdrv;
|
||||
struct list_head list;
|
||||
int requested_id;
|
||||
char *buffer;
|
||||
int bufsize;
|
||||
};
|
||||
|
||||
#define EARLY_PLATFORM_ID_UNSET -2
|
||||
@@ -102,21 +104,29 @@ extern int early_platform_driver_probe(char *class_str,
|
||||
int nr_probe, int user_only);
|
||||
extern void early_platform_cleanup(void);
|
||||
|
||||
#define early_platform_init(class_string, platdrv) \
|
||||
early_platform_init_buffer(class_string, platdrv, NULL, 0)
|
||||
|
||||
#ifndef MODULE
|
||||
#define early_platform_init(class_string, platform_driver) \
|
||||
#define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \
|
||||
static __initdata struct early_platform_driver early_driver = { \
|
||||
.class_str = class_string, \
|
||||
.pdrv = platform_driver, \
|
||||
.buffer = buf, \
|
||||
.bufsize = bufsiz, \
|
||||
.pdrv = platdrv, \
|
||||
.requested_id = EARLY_PLATFORM_ID_UNSET, \
|
||||
}; \
|
||||
static int __init early_platform_driver_setup_func(char *buf) \
|
||||
static int __init early_platform_driver_setup_func(char *buffer) \
|
||||
{ \
|
||||
return early_platform_driver_register(&early_driver, buf); \
|
||||
return early_platform_driver_register(&early_driver, buffer); \
|
||||
} \
|
||||
early_param(class_string, early_platform_driver_setup_func)
|
||||
#else /* MODULE */
|
||||
#define early_platform_init(class_string, platform_driver)
|
||||
#define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \
|
||||
static inline char *early_platform_driver_setup_func(void) \
|
||||
{ \
|
||||
return bufsiz ? buf : NULL; \
|
||||
}
|
||||
#endif /* MODULE */
|
||||
|
||||
#endif /* _PLATFORM_DEVICE_H_ */
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
/* Quota format type IDs */
|
||||
#define QFMT_VFS_OLD 1
|
||||
#define QFMT_VFS_V0 2
|
||||
#define QFMT_OCFS2 3
|
||||
#define QFMT_VFS_V1 4
|
||||
|
||||
/* Size of block in which space limits are passed through the quota
|
||||
* interface */
|
||||
@@ -334,7 +336,7 @@ struct quotactl_ops {
|
||||
|
||||
struct quota_format_type {
|
||||
int qf_fmt_id; /* Quota format id */
|
||||
struct quota_format_ops *qf_ops; /* Operations of format */
|
||||
const struct quota_format_ops *qf_ops; /* Operations of format */
|
||||
struct module *qf_owner; /* Module implementing quota format */
|
||||
struct quota_format_type *qf_next;
|
||||
};
|
||||
@@ -394,7 +396,7 @@ struct quota_info {
|
||||
struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */
|
||||
struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */
|
||||
struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */
|
||||
struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */
|
||||
const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */
|
||||
};
|
||||
|
||||
int register_quota_format(struct quota_format_type *fmt);
|
||||
|
||||
@@ -52,11 +52,63 @@
|
||||
#define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION
|
||||
#define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION
|
||||
|
||||
/* Locking primitives */
|
||||
/* Right now we are still falling back to (un)lock_kernel, but eventually that
|
||||
would evolve into real per-fs locks */
|
||||
#define reiserfs_write_lock( sb ) lock_kernel()
|
||||
#define reiserfs_write_unlock( sb ) unlock_kernel()
|
||||
/*
|
||||
* Locking primitives. The write lock is a per superblock
|
||||
* special mutex that has properties close to the Big Kernel Lock
|
||||
* which was used in the previous locking scheme.
|
||||
*/
|
||||
void reiserfs_write_lock(struct super_block *s);
|
||||
void reiserfs_write_unlock(struct super_block *s);
|
||||
int reiserfs_write_lock_once(struct super_block *s);
|
||||
void reiserfs_write_unlock_once(struct super_block *s, int lock_depth);
|
||||
|
||||
/*
|
||||
* Several mutexes depend on the write lock.
|
||||
* However sometimes we want to relax the write lock while we hold
|
||||
* these mutexes, according to the release/reacquire on schedule()
|
||||
* properties of the Bkl that were used.
|
||||
* Reiserfs performances and locking were based on this scheme.
|
||||
* Now that the write lock is a mutex and not the bkl anymore, doing so
|
||||
* may result in a deadlock:
|
||||
*
|
||||
* A acquire write_lock
|
||||
* A acquire j_commit_mutex
|
||||
* A release write_lock and wait for something
|
||||
* B acquire write_lock
|
||||
* B can't acquire j_commit_mutex and sleep
|
||||
* A can't acquire write lock anymore
|
||||
* deadlock
|
||||
*
|
||||
* What we do here is avoiding such deadlock by playing the same game
|
||||
* than the Bkl: if we can't acquire a mutex that depends on the write lock,
|
||||
* we release the write lock, wait a bit and then retry.
|
||||
*
|
||||
* The mutexes concerned by this hack are:
|
||||
* - The commit mutex of a journal list
|
||||
* - The flush mutex
|
||||
* - The journal lock
|
||||
* - The inode mutex
|
||||
*/
|
||||
static inline void reiserfs_mutex_lock_safe(struct mutex *m,
|
||||
struct super_block *s)
|
||||
{
|
||||
reiserfs_write_unlock(s);
|
||||
mutex_lock(m);
|
||||
reiserfs_write_lock(s);
|
||||
}
|
||||
|
||||
/*
|
||||
* When we schedule, we usually want to also release the write lock,
|
||||
* according to the previous bkl based locking scheme of reiserfs.
|
||||
*/
|
||||
static inline void reiserfs_cond_resched(struct super_block *s)
|
||||
{
|
||||
if (need_resched()) {
|
||||
reiserfs_write_unlock(s);
|
||||
schedule();
|
||||
reiserfs_write_lock(s);
|
||||
}
|
||||
}
|
||||
|
||||
struct fid;
|
||||
|
||||
@@ -1329,7 +1381,11 @@ static inline loff_t max_reiserfs_offset(struct inode *inode)
|
||||
#define get_generation(s) atomic_read (&fs_generation(s))
|
||||
#define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen)
|
||||
#define __fs_changed(gen,s) (gen != get_generation (s))
|
||||
#define fs_changed(gen,s) ({cond_resched(); __fs_changed(gen, s);})
|
||||
#define fs_changed(gen,s) \
|
||||
({ \
|
||||
reiserfs_cond_resched(s); \
|
||||
__fs_changed(gen, s); \
|
||||
})
|
||||
|
||||
/***************************************************************************/
|
||||
/* FIXATE NODES */
|
||||
@@ -2258,8 +2314,7 @@ __u32 r5_hash(const signed char *msg, int len);
|
||||
#define SPARE_SPACE 500
|
||||
|
||||
/* prototypes from ioctl.c */
|
||||
int reiserfs_ioctl(struct inode *inode, struct file *filp,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
|
||||
long reiserfs_compat_ioctl(struct file *filp,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
int reiserfs_unpack(struct inode *inode, struct file *filp);
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/sched.h>
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
@@ -355,6 +357,13 @@ struct reiserfs_sb_info {
|
||||
struct reiserfs_journal *s_journal; /* pointer to journal information */
|
||||
unsigned short s_mount_state; /* reiserfs state (valid, invalid) */
|
||||
|
||||
/* Serialize writers access, replace the old bkl */
|
||||
struct mutex lock;
|
||||
/* Owner of the lock (can be recursive) */
|
||||
struct task_struct *lock_owner;
|
||||
/* Depth of the lock, start from -1 like the bkl */
|
||||
int lock_depth;
|
||||
|
||||
/* Comment? -Hans */
|
||||
void (*end_io_handler) (struct buffer_head *, int);
|
||||
hashf_t s_hash_function; /* pointer to function which is used
|
||||
@@ -408,6 +417,17 @@ struct reiserfs_sb_info {
|
||||
char *s_qf_names[MAXQUOTAS];
|
||||
int s_jquota_fmt;
|
||||
#endif
|
||||
#ifdef CONFIG_REISERFS_CHECK
|
||||
|
||||
struct tree_balance *cur_tb; /*
|
||||
* Detects whether more than one
|
||||
* copy of tb exists per superblock
|
||||
* as a means of checking whether
|
||||
* do_balance is executing concurrently
|
||||
* against another tree reader/writer
|
||||
* on a same mount point.
|
||||
*/
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Definitions of reiserfs on-disk properties: */
|
||||
|
||||
@@ -14,7 +14,8 @@ struct screen_info {
|
||||
__u16 orig_video_page; /* 0x04 */
|
||||
__u8 orig_video_mode; /* 0x06 */
|
||||
__u8 orig_video_cols; /* 0x07 */
|
||||
__u16 unused2; /* 0x08 */
|
||||
__u8 flags; /* 0x08 */
|
||||
__u8 unused2; /* 0x09 */
|
||||
__u16 orig_video_ega_bx;/* 0x0a */
|
||||
__u16 unused3; /* 0x0c */
|
||||
__u8 orig_video_lines; /* 0x0e */
|
||||
@@ -65,6 +66,8 @@ struct screen_info {
|
||||
|
||||
#define VIDEO_TYPE_EFI 0x70 /* EFI graphic mode */
|
||||
|
||||
#define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
extern struct screen_info screen_info;
|
||||
|
||||
|
||||
@@ -216,10 +216,10 @@
|
||||
|
||||
#define UART_IIR_TOD 0x08 /* Character Timeout Indication Detected */
|
||||
|
||||
#define UART_FCR_PXAR1 0x00 /* receive FIFO treshold = 1 */
|
||||
#define UART_FCR_PXAR8 0x40 /* receive FIFO treshold = 8 */
|
||||
#define UART_FCR_PXAR16 0x80 /* receive FIFO treshold = 16 */
|
||||
#define UART_FCR_PXAR32 0xc0 /* receive FIFO treshold = 32 */
|
||||
#define UART_FCR_PXAR1 0x00 /* receive FIFO threshold = 1 */
|
||||
#define UART_FCR_PXAR8 0x40 /* receive FIFO threshold = 8 */
|
||||
#define UART_FCR_PXAR16 0x80 /* receive FIFO threshold = 16 */
|
||||
#define UART_FCR_PXAR32 0xc0 /* receive FIFO threshold = 32 */
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -215,5 +215,6 @@ static inline void serio_unpin_driver(struct serio *serio)
|
||||
#define SERIO_INEXIO 0x37
|
||||
#define SERIO_TOUCHIT213 0x38
|
||||
#define SERIO_W8001 0x39
|
||||
#define SERIO_DYNAPRO 0x3a
|
||||
|
||||
#endif
|
||||
|
||||
@@ -57,10 +57,8 @@ struct intc_desc {
|
||||
struct intc_sense_reg *sense_regs;
|
||||
unsigned int nr_sense_regs;
|
||||
char *name;
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
struct intc_mask_reg *ack_regs;
|
||||
unsigned int nr_ack_regs;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)
|
||||
@@ -73,7 +71,6 @@ struct intc_desc symbol __initdata = { \
|
||||
chipname, \
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \
|
||||
mask_regs, prio_regs, sense_regs, ack_regs) \
|
||||
struct intc_desc symbol __initdata = { \
|
||||
@@ -83,9 +80,11 @@ struct intc_desc symbol __initdata = { \
|
||||
chipname, \
|
||||
_INTC_ARRAY(ack_regs), \
|
||||
}
|
||||
#endif
|
||||
|
||||
void __init register_intc_controller(struct intc_desc *desc);
|
||||
int intc_set_priority(unsigned int irq, unsigned int prio);
|
||||
|
||||
int reserve_irq_vector(unsigned int irq);
|
||||
void reserve_irq_legacy(void);
|
||||
|
||||
#endif /* __SH_INTC_H */
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* SuperH Pin Function Controller Support
|
||||
*
|
||||
* Copyright (c) 2008 Magnus Damm
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __SH_PFC_H
|
||||
#define __SH_PFC_H
|
||||
|
||||
#include <asm-generic/gpio.h>
|
||||
|
||||
typedef unsigned short pinmux_enum_t;
|
||||
typedef unsigned short pinmux_flag_t;
|
||||
|
||||
#define PINMUX_TYPE_NONE 0
|
||||
#define PINMUX_TYPE_FUNCTION 1
|
||||
#define PINMUX_TYPE_GPIO 2
|
||||
#define PINMUX_TYPE_OUTPUT 3
|
||||
#define PINMUX_TYPE_INPUT 4
|
||||
#define PINMUX_TYPE_INPUT_PULLUP 5
|
||||
#define PINMUX_TYPE_INPUT_PULLDOWN 6
|
||||
|
||||
#define PINMUX_FLAG_TYPE (0x7)
|
||||
#define PINMUX_FLAG_WANT_PULLUP (1 << 3)
|
||||
#define PINMUX_FLAG_WANT_PULLDOWN (1 << 4)
|
||||
|
||||
#define PINMUX_FLAG_DBIT_SHIFT 5
|
||||
#define PINMUX_FLAG_DBIT (0x1f << PINMUX_FLAG_DBIT_SHIFT)
|
||||
#define PINMUX_FLAG_DREG_SHIFT 10
|
||||
#define PINMUX_FLAG_DREG (0x3f << PINMUX_FLAG_DREG_SHIFT)
|
||||
|
||||
struct pinmux_gpio {
|
||||
pinmux_enum_t enum_id;
|
||||
pinmux_flag_t flags;
|
||||
};
|
||||
|
||||
#define PINMUX_GPIO(gpio, data_or_mark) [gpio] = { data_or_mark }
|
||||
#define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0
|
||||
|
||||
struct pinmux_cfg_reg {
|
||||
unsigned long reg, reg_width, field_width;
|
||||
unsigned long *cnt;
|
||||
pinmux_enum_t *enum_ids;
|
||||
};
|
||||
|
||||
#define PINMUX_CFG_REG(name, r, r_width, f_width) \
|
||||
.reg = r, .reg_width = r_width, .field_width = f_width, \
|
||||
.cnt = (unsigned long [r_width / f_width]) {}, \
|
||||
.enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) \
|
||||
|
||||
struct pinmux_data_reg {
|
||||
unsigned long reg, reg_width, reg_shadow;
|
||||
pinmux_enum_t *enum_ids;
|
||||
};
|
||||
|
||||
#define PINMUX_DATA_REG(name, r, r_width) \
|
||||
.reg = r, .reg_width = r_width, \
|
||||
.enum_ids = (pinmux_enum_t [r_width]) \
|
||||
|
||||
struct pinmux_range {
|
||||
pinmux_enum_t begin;
|
||||
pinmux_enum_t end;
|
||||
pinmux_enum_t force;
|
||||
};
|
||||
|
||||
struct pinmux_info {
|
||||
char *name;
|
||||
pinmux_enum_t reserved_id;
|
||||
struct pinmux_range data;
|
||||
struct pinmux_range input;
|
||||
struct pinmux_range input_pd;
|
||||
struct pinmux_range input_pu;
|
||||
struct pinmux_range output;
|
||||
struct pinmux_range mark;
|
||||
struct pinmux_range function;
|
||||
|
||||
unsigned first_gpio, last_gpio;
|
||||
|
||||
struct pinmux_gpio *gpios;
|
||||
struct pinmux_cfg_reg *cfg_regs;
|
||||
struct pinmux_data_reg *data_regs;
|
||||
|
||||
pinmux_enum_t *gpio_data;
|
||||
unsigned int gpio_data_size;
|
||||
|
||||
unsigned long *gpio_in_use;
|
||||
struct gpio_chip chip;
|
||||
};
|
||||
|
||||
int register_pinmux(struct pinmux_info *pip);
|
||||
|
||||
#endif /* __SH_PFC_H */
|
||||
@@ -15,7 +15,7 @@
|
||||
* Some hardware works well with requests at spi_transfer scope:
|
||||
*
|
||||
* - Drivers leveraging smarter hardware, with fifos or DMA; or for half
|
||||
* duplex (MicroWire) controllers. Provide chipslect() and txrx_bufs(),
|
||||
* duplex (MicroWire) controllers. Provide chipselect() and txrx_bufs(),
|
||||
* and custom setup()/cleanup() methods.
|
||||
*/
|
||||
|
||||
|
||||
@@ -834,4 +834,8 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
|
||||
asmlinkage long sys_perf_event_open(
|
||||
struct perf_event_attr __user *attr_uptr,
|
||||
pid_t pid, int cpu, int group_fd, unsigned long flags);
|
||||
|
||||
asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len,
|
||||
unsigned long prot, unsigned long flags,
|
||||
unsigned long fd, unsigned long pgoff);
|
||||
#endif
|
||||
|
||||
@@ -89,8 +89,8 @@ enum
|
||||
KERN_VERSION=4, /* string: compile time info */
|
||||
KERN_SECUREMASK=5, /* struct: maximum rights mask */
|
||||
KERN_PROF=6, /* table: profiling information */
|
||||
KERN_NODENAME=7,
|
||||
KERN_DOMAINNAME=8,
|
||||
KERN_NODENAME=7, /* string: hostname */
|
||||
KERN_DOMAINNAME=8, /* string: domainname */
|
||||
|
||||
KERN_PANIC=15, /* int: panic timeout */
|
||||
KERN_REALROOTDEV=16, /* real root device to mount after initrd */
|
||||
@@ -102,8 +102,8 @@ enum
|
||||
KERN_PPC_HTABRECLAIM=25, /* turn htab reclaimation on/off on PPC */
|
||||
KERN_PPC_ZEROPAGED=26, /* turn idle page zeroing on/off on PPC */
|
||||
KERN_PPC_POWERSAVE_NAP=27, /* use nap mode for power saving */
|
||||
KERN_MODPROBE=28,
|
||||
KERN_SG_BIG_BUFF=29,
|
||||
KERN_MODPROBE=28, /* string: modprobe path */
|
||||
KERN_SG_BIG_BUFF=29, /* int: sg driver reserved buffer size */
|
||||
KERN_ACCT=30, /* BSD process accounting parameters */
|
||||
KERN_PPC_L2CR=31, /* l2cr register on PPC */
|
||||
|
||||
@@ -150,7 +150,7 @@ enum
|
||||
KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */
|
||||
KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
|
||||
KERN_COMPAT_LOG=73, /* int: print compat layer messages */
|
||||
KERN_MAX_LOCK_DEPTH=74,
|
||||
KERN_MAX_LOCK_DEPTH=74, /* int: rtmutex's maximum lock depth */
|
||||
KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */
|
||||
KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
|
||||
};
|
||||
|
||||
@@ -43,6 +43,7 @@ enum tick_nohz_mode {
|
||||
* @idle_exittime: Time when the idle state was left
|
||||
* @idle_sleeptime: Sum of the time slept in idle with sched tick stopped
|
||||
* @sleep_length: Duration of the current idle sleep
|
||||
* @do_timer_lst: CPU was the last one doing do_timer before going idle
|
||||
*/
|
||||
struct tick_sched {
|
||||
struct hrtimer sched_timer;
|
||||
@@ -64,6 +65,7 @@ struct tick_sched {
|
||||
unsigned long last_jiffies;
|
||||
unsigned long next_jiffies;
|
||||
ktime_t idle_expires;
|
||||
int do_timer_last;
|
||||
};
|
||||
|
||||
extern void __init tick_init(void);
|
||||
@@ -98,6 +100,9 @@ extern int tick_check_oneshot_change(int allow_nohz);
|
||||
extern struct tick_sched *tick_get_tick_sched(int cpu);
|
||||
extern void tick_check_idle(int cpu);
|
||||
extern int tick_oneshot_mode_active(void);
|
||||
# ifndef arch_needs_cpu
|
||||
# define arch_needs_cpu(cpu) (0)
|
||||
# endif
|
||||
# else
|
||||
static inline void tick_clock_notify(void) { }
|
||||
static inline int tick_check_oneshot_change(int allow_nohz) { return 0; }
|
||||
|
||||
@@ -148,6 +148,7 @@ extern void monotonic_to_bootbased(struct timespec *ts);
|
||||
|
||||
extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
|
||||
extern int timekeeping_valid_for_hres(void);
|
||||
extern u64 timekeeping_max_deferment(void);
|
||||
extern void update_wall_time(void);
|
||||
extern void update_xtime_cache(u64 nsec);
|
||||
extern void timekeeping_leap_insert(int leapsecond);
|
||||
|
||||
@@ -115,13 +115,16 @@ struct timex {
|
||||
#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */
|
||||
#endif
|
||||
|
||||
/* xntp 3.4 compatibility names */
|
||||
/* NTP userland likes the MOD_ prefix better */
|
||||
#define MOD_OFFSET ADJ_OFFSET
|
||||
#define MOD_FREQUENCY ADJ_FREQUENCY
|
||||
#define MOD_MAXERROR ADJ_MAXERROR
|
||||
#define MOD_ESTERROR ADJ_ESTERROR
|
||||
#define MOD_STATUS ADJ_STATUS
|
||||
#define MOD_TIMECONST ADJ_TIMECONST
|
||||
#define MOD_TAI ADJ_TAI
|
||||
#define MOD_MICRO ADJ_MICRO
|
||||
#define MOD_NANO ADJ_NANO
|
||||
|
||||
|
||||
/*
|
||||
@@ -261,11 +264,7 @@ static inline int ntp_synced(void)
|
||||
|
||||
#define NTP_SCALE_SHIFT 32
|
||||
|
||||
#ifdef CONFIG_NO_HZ
|
||||
#define NTP_INTERVAL_FREQ (2)
|
||||
#else
|
||||
#define NTP_INTERVAL_FREQ (HZ)
|
||||
#endif
|
||||
#define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ)
|
||||
|
||||
/* Returns how long ticks are at present, in ns / 2^NTP_SCALE_SHIFT. */
|
||||
|
||||
+23
-2
@@ -190,9 +190,17 @@ struct tty_port_operations {
|
||||
/* Control the DTR line */
|
||||
void (*dtr_rts)(struct tty_port *port, int raise);
|
||||
/* Called when the last close completes or a hangup finishes
|
||||
IFF the port was initialized. Do not use to free resources */
|
||||
IFF the port was initialized. Do not use to free resources. Called
|
||||
under the port mutex to serialize against activate/shutdowns */
|
||||
void (*shutdown)(struct tty_port *port);
|
||||
void (*drop)(struct tty_port *port);
|
||||
/* Called under the port mutex from tty_port_open, serialized using
|
||||
the port mutex */
|
||||
/* FIXME: long term getting the tty argument *out* of this would be
|
||||
good for consoles */
|
||||
int (*activate)(struct tty_port *port, struct tty_struct *tty);
|
||||
/* Called on the final put of a port */
|
||||
void (*destruct)(struct tty_port *port);
|
||||
};
|
||||
|
||||
struct tty_port {
|
||||
@@ -206,12 +214,14 @@ struct tty_port {
|
||||
wait_queue_head_t delta_msr_wait; /* Modem status change */
|
||||
unsigned long flags; /* TTY flags ASY_*/
|
||||
struct mutex mutex; /* Locking */
|
||||
struct mutex buf_mutex; /* Buffer alloc lock */
|
||||
unsigned char *xmit_buf; /* Optional buffer */
|
||||
unsigned int close_delay; /* Close port delay */
|
||||
unsigned int closing_wait; /* Delay for output */
|
||||
int drain_delay; /* Set to zero if no pure time
|
||||
based drain is needed else
|
||||
set to size of fifo */
|
||||
struct kref kref; /* Ref counter */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -439,7 +449,7 @@ extern void initialize_tty_struct(struct tty_struct *tty,
|
||||
struct tty_driver *driver, int idx);
|
||||
extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx,
|
||||
int first_ok);
|
||||
extern void tty_release_dev(struct file *filp);
|
||||
extern int tty_release(struct inode *inode, struct file *filp);
|
||||
extern int tty_init_termios(struct tty_struct *tty);
|
||||
|
||||
extern struct tty_struct *tty_pair_get_tty(struct tty_struct *tty);
|
||||
@@ -454,6 +464,15 @@ extern int tty_write_lock(struct tty_struct *tty, int ndelay);
|
||||
extern void tty_port_init(struct tty_port *port);
|
||||
extern int tty_port_alloc_xmit_buf(struct tty_port *port);
|
||||
extern void tty_port_free_xmit_buf(struct tty_port *port);
|
||||
extern void tty_port_put(struct tty_port *port);
|
||||
|
||||
extern inline struct tty_port *tty_port_get(struct tty_port *port)
|
||||
{
|
||||
if (port)
|
||||
kref_get(&port->kref);
|
||||
return port;
|
||||
}
|
||||
|
||||
extern struct tty_struct *tty_port_tty_get(struct tty_port *port);
|
||||
extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty);
|
||||
extern int tty_port_carrier_raised(struct tty_port *port);
|
||||
@@ -467,6 +486,8 @@ extern int tty_port_close_start(struct tty_port *port,
|
||||
extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty);
|
||||
extern void tty_port_close(struct tty_port *port,
|
||||
struct tty_struct *tty, struct file *filp);
|
||||
extern int tty_port_open(struct tty_port *port,
|
||||
struct tty_struct *tty, struct file *filp);
|
||||
extern inline int tty_port_users(struct tty_port *port)
|
||||
{
|
||||
return port->count + port->blocked_open;
|
||||
|
||||
@@ -110,6 +110,10 @@ struct ucb1400 {
|
||||
struct platform_device *ucb1400_gpio;
|
||||
};
|
||||
|
||||
struct ucb1400_pdata {
|
||||
int irq;
|
||||
};
|
||||
|
||||
static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg)
|
||||
{
|
||||
return ac97->bus->ops->read(ac97, reg);
|
||||
|
||||
+15
-18
@@ -331,6 +331,7 @@ struct usb_bus {
|
||||
u8 otg_port; /* 0, or number of OTG/HNP port */
|
||||
unsigned is_b_host:1; /* true during some HNP roleswitches */
|
||||
unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */
|
||||
unsigned sg_tablesize; /* 0 or largest number of sg list entries */
|
||||
|
||||
int devnum_next; /* Next open device number in
|
||||
* round-robin allocation */
|
||||
@@ -428,11 +429,9 @@ struct usb_tt;
|
||||
* @last_busy: time of last use
|
||||
* @autosuspend_delay: in jiffies
|
||||
* @connect_time: time device was first connected
|
||||
* @auto_pm: autosuspend/resume in progress
|
||||
* @do_remote_wakeup: remote wakeup should be enabled
|
||||
* @reset_resume: needs reset instead of resume
|
||||
* @autosuspend_disabled: autosuspend disabled by the user
|
||||
* @autoresume_disabled: autoresume disabled by the user
|
||||
* @skip_sys_resume: skip the next system resume
|
||||
* @wusb_dev: if this is a Wireless USB device, link to the WUSB
|
||||
* specific data for the device.
|
||||
@@ -513,11 +512,9 @@ struct usb_device {
|
||||
int autosuspend_delay;
|
||||
unsigned long connect_time;
|
||||
|
||||
unsigned auto_pm:1;
|
||||
unsigned do_remote_wakeup:1;
|
||||
unsigned reset_resume:1;
|
||||
unsigned autosuspend_disabled:1;
|
||||
unsigned autoresume_disabled:1;
|
||||
unsigned skip_sys_resume:1;
|
||||
#endif
|
||||
struct wusb_dev *wusb_dev;
|
||||
@@ -543,22 +540,20 @@ extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
|
||||
|
||||
/* USB autosuspend and autoresume */
|
||||
#ifdef CONFIG_USB_SUSPEND
|
||||
extern int usb_autopm_set_interface(struct usb_interface *intf);
|
||||
extern int usb_autopm_get_interface(struct usb_interface *intf);
|
||||
extern void usb_autopm_put_interface(struct usb_interface *intf);
|
||||
extern int usb_autopm_get_interface_async(struct usb_interface *intf);
|
||||
extern void usb_autopm_put_interface_async(struct usb_interface *intf);
|
||||
|
||||
static inline void usb_autopm_enable(struct usb_interface *intf)
|
||||
static inline void usb_autopm_get_interface_no_resume(
|
||||
struct usb_interface *intf)
|
||||
{
|
||||
atomic_set(&intf->pm_usage_cnt, 0);
|
||||
usb_autopm_set_interface(intf);
|
||||
atomic_inc(&intf->pm_usage_cnt);
|
||||
}
|
||||
|
||||
static inline void usb_autopm_disable(struct usb_interface *intf)
|
||||
static inline void usb_autopm_put_interface_no_suspend(
|
||||
struct usb_interface *intf)
|
||||
{
|
||||
atomic_set(&intf->pm_usage_cnt, 1);
|
||||
usb_autopm_set_interface(intf);
|
||||
atomic_dec(&intf->pm_usage_cnt);
|
||||
}
|
||||
|
||||
static inline void usb_mark_last_busy(struct usb_device *udev)
|
||||
@@ -568,12 +563,8 @@ static inline void usb_mark_last_busy(struct usb_device *udev)
|
||||
|
||||
#else
|
||||
|
||||
static inline int usb_autopm_set_interface(struct usb_interface *intf)
|
||||
{ return 0; }
|
||||
|
||||
static inline int usb_autopm_get_interface(struct usb_interface *intf)
|
||||
{ return 0; }
|
||||
|
||||
static inline int usb_autopm_get_interface_async(struct usb_interface *intf)
|
||||
{ return 0; }
|
||||
|
||||
@@ -581,9 +572,11 @@ static inline void usb_autopm_put_interface(struct usb_interface *intf)
|
||||
{ }
|
||||
static inline void usb_autopm_put_interface_async(struct usb_interface *intf)
|
||||
{ }
|
||||
static inline void usb_autopm_enable(struct usb_interface *intf)
|
||||
static inline void usb_autopm_get_interface_no_resume(
|
||||
struct usb_interface *intf)
|
||||
{ }
|
||||
static inline void usb_autopm_disable(struct usb_interface *intf)
|
||||
static inline void usb_autopm_put_interface_no_suspend(
|
||||
struct usb_interface *intf)
|
||||
{ }
|
||||
static inline void usb_mark_last_busy(struct usb_device *udev)
|
||||
{ }
|
||||
@@ -626,6 +619,10 @@ extern struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev,
|
||||
unsigned ifnum);
|
||||
extern struct usb_host_interface *usb_altnum_to_altsetting(
|
||||
const struct usb_interface *intf, unsigned int altnum);
|
||||
extern struct usb_host_interface *usb_find_alt_setting(
|
||||
struct usb_host_config *config,
|
||||
unsigned int iface_num,
|
||||
unsigned int alt_num);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -127,6 +127,7 @@ struct usb_function {
|
||||
/* private: */
|
||||
/* internals */
|
||||
struct list_head list;
|
||||
DECLARE_BITMAP(endpoints, 32);
|
||||
};
|
||||
|
||||
int usb_add_function(struct usb_configuration *, struct usb_function *);
|
||||
|
||||
+67
-1
@@ -33,6 +33,23 @@ enum usb_otg_state {
|
||||
OTG_STATE_A_VBUS_ERR,
|
||||
};
|
||||
|
||||
#define USB_OTG_PULLUP_ID (1 << 0)
|
||||
#define USB_OTG_PULLDOWN_DP (1 << 1)
|
||||
#define USB_OTG_PULLDOWN_DM (1 << 2)
|
||||
#define USB_OTG_EXT_VBUS_INDICATOR (1 << 3)
|
||||
#define USB_OTG_DRV_VBUS (1 << 4)
|
||||
#define USB_OTG_DRV_VBUS_EXT (1 << 5)
|
||||
|
||||
struct otg_transceiver;
|
||||
|
||||
/* for transceivers connected thru an ULPI interface, the user must
|
||||
* provide access ops
|
||||
*/
|
||||
struct otg_io_access_ops {
|
||||
int (*read)(struct otg_transceiver *otg, u32 reg);
|
||||
int (*write)(struct otg_transceiver *otg, u32 val, u32 reg);
|
||||
};
|
||||
|
||||
/*
|
||||
* the otg driver needs to interact with both device side and host side
|
||||
* usb controllers. it decides which controller is active at a given
|
||||
@@ -42,6 +59,7 @@ enum usb_otg_state {
|
||||
struct otg_transceiver {
|
||||
struct device *dev;
|
||||
const char *label;
|
||||
unsigned int flags;
|
||||
|
||||
u8 default_a;
|
||||
enum usb_otg_state state;
|
||||
@@ -49,10 +67,17 @@ struct otg_transceiver {
|
||||
struct usb_bus *host;
|
||||
struct usb_gadget *gadget;
|
||||
|
||||
struct otg_io_access_ops *io_ops;
|
||||
void __iomem *io_priv;
|
||||
|
||||
/* to pass extra port status to the root hub */
|
||||
u16 port_status;
|
||||
u16 port_change;
|
||||
|
||||
/* initialize/shutdown the OTG controller */
|
||||
int (*init)(struct otg_transceiver *otg);
|
||||
void (*shutdown)(struct otg_transceiver *otg);
|
||||
|
||||
/* bind/unbind the host controller */
|
||||
int (*set_host)(struct otg_transceiver *otg,
|
||||
struct usb_bus *host);
|
||||
@@ -65,6 +90,10 @@ struct otg_transceiver {
|
||||
int (*set_power)(struct otg_transceiver *otg,
|
||||
unsigned mA);
|
||||
|
||||
/* effective for A-peripheral, ignored for B devices */
|
||||
int (*set_vbus)(struct otg_transceiver *otg,
|
||||
bool enabled);
|
||||
|
||||
/* for non-OTG B devices: set transceiver into suspend mode */
|
||||
int (*set_suspend)(struct otg_transceiver *otg,
|
||||
int suspend);
|
||||
@@ -85,6 +114,38 @@ extern int otg_set_transceiver(struct otg_transceiver *);
|
||||
extern void usb_nop_xceiv_register(void);
|
||||
extern void usb_nop_xceiv_unregister(void);
|
||||
|
||||
/* helpers for direct access thru low-level io interface */
|
||||
static inline int otg_io_read(struct otg_transceiver *otg, u32 reg)
|
||||
{
|
||||
if (otg->io_ops && otg->io_ops->read)
|
||||
return otg->io_ops->read(otg, reg);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int otg_io_write(struct otg_transceiver *otg, u32 reg, u32 val)
|
||||
{
|
||||
if (otg->io_ops && otg->io_ops->write)
|
||||
return otg->io_ops->write(otg, reg, val);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int
|
||||
otg_init(struct otg_transceiver *otg)
|
||||
{
|
||||
if (otg->init)
|
||||
return otg->init(otg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
otg_shutdown(struct otg_transceiver *otg)
|
||||
{
|
||||
if (otg->shutdown)
|
||||
otg->shutdown(otg);
|
||||
}
|
||||
|
||||
/* for usb host and peripheral controller drivers */
|
||||
extern struct otg_transceiver *otg_get_transceiver(void);
|
||||
@@ -97,6 +158,12 @@ otg_start_hnp(struct otg_transceiver *otg)
|
||||
return otg->start_hnp(otg);
|
||||
}
|
||||
|
||||
/* Context: can sleep */
|
||||
static inline int
|
||||
otg_set_vbus(struct otg_transceiver *otg, bool enabled)
|
||||
{
|
||||
return otg->set_vbus(otg, enabled);
|
||||
}
|
||||
|
||||
/* for HCDs */
|
||||
static inline int
|
||||
@@ -105,7 +172,6 @@ otg_set_host(struct otg_transceiver *otg, struct usb_bus *host)
|
||||
return otg->set_host(otg, host);
|
||||
}
|
||||
|
||||
|
||||
/* for usb peripheral controller drivers */
|
||||
|
||||
/* Context: can sleep */
|
||||
|
||||
@@ -39,8 +39,6 @@ enum port_dev_state {
|
||||
* @serial: pointer back to the struct usb_serial owner of this port.
|
||||
* @port: pointer to the corresponding tty_port for this port.
|
||||
* @lock: spinlock to grab when updating portions of this structure.
|
||||
* @mutex: mutex used to synchronize serial_open() and serial_close()
|
||||
* access for this port.
|
||||
* @number: the number of the port (the minor number).
|
||||
* @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
|
||||
* @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
|
||||
@@ -77,7 +75,6 @@ struct usb_serial_port {
|
||||
struct usb_serial *serial;
|
||||
struct tty_port port;
|
||||
spinlock_t lock;
|
||||
struct mutex mutex;
|
||||
unsigned char number;
|
||||
|
||||
unsigned char *interrupt_in_buffer;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef __LINUX_USB_ULPI_H
|
||||
#define __LINUX_USB_ULPI_H
|
||||
|
||||
struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops,
|
||||
unsigned int flags);
|
||||
|
||||
#endif /* __LINUX_USB_ULPI_H */
|
||||
@@ -74,7 +74,7 @@ enum {
|
||||
* WUSB defines that CHIDs, CDIDs and CKs are a 16 byte string of
|
||||
* data. In order to avoid confusion and enforce types, we wrap it.
|
||||
*
|
||||
* Make it packed, as we use it in some hw defintions.
|
||||
* Make it packed, as we use it in some hw definitions.
|
||||
*/
|
||||
struct wusb_ckhdid {
|
||||
u8 data[16];
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
US_FLAG(SANE_SENSE, 0x00008000) \
|
||||
/* Sane Sense (> 18 bytes) */ \
|
||||
US_FLAG(CAPACITY_OK, 0x00010000) \
|
||||
/* READ CAPACITY response is correct */
|
||||
/* READ CAPACITY response is correct */ \
|
||||
US_FLAG(BAD_SENSE, 0x00020000) \
|
||||
/* Bad Sense (never more than 18 bytes) */
|
||||
|
||||
#define US_FLAG(name, value) US_FL_##name = value ,
|
||||
enum { US_DO_ALL_FLAGS };
|
||||
|
||||
@@ -361,6 +361,7 @@ struct v4l2_pix_format {
|
||||
#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
|
||||
#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
|
||||
#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
|
||||
#define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */
|
||||
|
||||
/*
|
||||
* F O R M A T E N U M E R A T I O N
|
||||
@@ -490,7 +491,7 @@ struct v4l2_jpegcompression {
|
||||
* you do, leave them untouched.
|
||||
* Inluding less markers will make the
|
||||
* resulting code smaller, but there will
|
||||
* be fewer aplications which can read it.
|
||||
* be fewer applications which can read it.
|
||||
* The presence of the APP and COM marker
|
||||
* is influenced by APP_len and COM_len
|
||||
* ONLY, not by this property! */
|
||||
@@ -563,6 +564,7 @@ struct v4l2_framebuffer {
|
||||
#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010
|
||||
#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020
|
||||
#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040
|
||||
#define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080
|
||||
/* Flags for the 'flags' field. */
|
||||
#define V4L2_FBUF_FLAG_PRIMARY 0x0001
|
||||
#define V4L2_FBUF_FLAG_OVERLAY 0x0002
|
||||
@@ -570,6 +572,7 @@ struct v4l2_framebuffer {
|
||||
#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008
|
||||
#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010
|
||||
#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020
|
||||
#define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040
|
||||
|
||||
struct v4l2_clip {
|
||||
struct v4l2_rect c;
|
||||
@@ -912,8 +915,10 @@ enum v4l2_colorfx {
|
||||
#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
|
||||
#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
|
||||
|
||||
#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
|
||||
#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
|
||||
/* last CID + 1 */
|
||||
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+34)
|
||||
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+36)
|
||||
|
||||
/* MPEG-class control IDs defined by V4L2 */
|
||||
#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
|
||||
|
||||
@@ -110,6 +110,7 @@ extern char con_buf[CON_BUF_SIZE];
|
||||
extern struct mutex con_buf_mtx;
|
||||
extern char vt_dont_switch;
|
||||
extern int default_utf8;
|
||||
extern int global_cursor_default;
|
||||
|
||||
struct vt_spawn_console {
|
||||
spinlock_t lock;
|
||||
@@ -130,4 +131,6 @@ struct vt_notifier_param {
|
||||
extern int register_vt_notifier(struct notifier_block *nb);
|
||||
extern int unregister_vt_notifier(struct notifier_block *nb);
|
||||
|
||||
extern void hide_boot_cursor(bool hide);
|
||||
|
||||
#endif /* _VT_KERN_H */
|
||||
|
||||
+27
-11
@@ -25,6 +25,7 @@ typedef void (*work_func_t)(struct work_struct *work);
|
||||
struct work_struct {
|
||||
atomic_long_t data;
|
||||
#define WORK_STRUCT_PENDING 0 /* T if work item pending execution */
|
||||
#define WORK_STRUCT_STATIC 1 /* static initializer (debugobjects) */
|
||||
#define WORK_STRUCT_FLAG_MASK (3UL)
|
||||
#define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK)
|
||||
struct list_head entry;
|
||||
@@ -35,6 +36,7 @@ struct work_struct {
|
||||
};
|
||||
|
||||
#define WORK_DATA_INIT() ATOMIC_LONG_INIT(0)
|
||||
#define WORK_DATA_STATIC_INIT() ATOMIC_LONG_INIT(2)
|
||||
|
||||
struct delayed_work {
|
||||
struct work_struct work;
|
||||
@@ -63,7 +65,7 @@ struct execute_work {
|
||||
#endif
|
||||
|
||||
#define __WORK_INITIALIZER(n, f) { \
|
||||
.data = WORK_DATA_INIT(), \
|
||||
.data = WORK_DATA_STATIC_INIT(), \
|
||||
.entry = { &(n).entry, &(n).entry }, \
|
||||
.func = (f), \
|
||||
__WORK_INIT_LOCKDEP_MAP(#n, &(n)) \
|
||||
@@ -91,6 +93,14 @@ struct execute_work {
|
||||
#define PREPARE_DELAYED_WORK(_work, _func) \
|
||||
PREPARE_WORK(&(_work)->work, (_func))
|
||||
|
||||
#ifdef CONFIG_DEBUG_OBJECTS_WORK
|
||||
extern void __init_work(struct work_struct *work, int onstack);
|
||||
extern void destroy_work_on_stack(struct work_struct *work);
|
||||
#else
|
||||
static inline void __init_work(struct work_struct *work, int onstack) { }
|
||||
static inline void destroy_work_on_stack(struct work_struct *work) { }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* initialize all of a work item in one go
|
||||
*
|
||||
@@ -99,24 +109,36 @@ struct execute_work {
|
||||
* to generate better code.
|
||||
*/
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
#define INIT_WORK(_work, _func) \
|
||||
#define __INIT_WORK(_work, _func, _onstack) \
|
||||
do { \
|
||||
static struct lock_class_key __key; \
|
||||
\
|
||||
__init_work((_work), _onstack); \
|
||||
(_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
|
||||
lockdep_init_map(&(_work)->lockdep_map, #_work, &__key, 0);\
|
||||
INIT_LIST_HEAD(&(_work)->entry); \
|
||||
PREPARE_WORK((_work), (_func)); \
|
||||
} while (0)
|
||||
#else
|
||||
#define INIT_WORK(_work, _func) \
|
||||
#define __INIT_WORK(_work, _func, _onstack) \
|
||||
do { \
|
||||
__init_work((_work), _onstack); \
|
||||
(_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
|
||||
INIT_LIST_HEAD(&(_work)->entry); \
|
||||
PREPARE_WORK((_work), (_func)); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define INIT_WORK(_work, _func) \
|
||||
do { \
|
||||
__INIT_WORK((_work), (_func), 0); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_WORK_ON_STACK(_work, _func) \
|
||||
do { \
|
||||
__INIT_WORK((_work), (_func), 1); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_DELAYED_WORK(_work, _func) \
|
||||
do { \
|
||||
INIT_WORK(&(_work)->work, (_func)); \
|
||||
@@ -125,22 +147,16 @@ struct execute_work {
|
||||
|
||||
#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
|
||||
do { \
|
||||
INIT_WORK(&(_work)->work, (_func)); \
|
||||
INIT_WORK_ON_STACK(&(_work)->work, (_func)); \
|
||||
init_timer_on_stack(&(_work)->timer); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
|
||||
#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
|
||||
do { \
|
||||
INIT_WORK(&(_work)->work, (_func)); \
|
||||
init_timer_deferrable(&(_work)->timer); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
|
||||
do { \
|
||||
INIT_WORK(&(_work)->work, (_func)); \
|
||||
init_timer_on_stack(&(_work)->timer); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* work_pending - Find out whether a work item is currently pending
|
||||
* @work: The work item in question
|
||||
|
||||
Reference in New Issue
Block a user