Merge branch 'master' into upstream
This commit is contained in:
@@ -200,6 +200,7 @@ extern int class_device_create_file(struct class_device *,
|
||||
* @node: for internal use by the driver core only.
|
||||
* @kobj: for internal use by the driver core only.
|
||||
* @devt_attr: for internal use by the driver core only.
|
||||
* @groups: optional additional groups to be created
|
||||
* @dev: if set, a symlink to the struct device is created in the sysfs
|
||||
* directory for this struct class device.
|
||||
* @class_data: pointer to whatever you want to store here for this struct
|
||||
@@ -228,6 +229,7 @@ struct class_device {
|
||||
struct device * dev; /* not necessary, but nice to have */
|
||||
void * class_data; /* class-specific data */
|
||||
struct class_device *parent; /* parent of this child device, if there is one */
|
||||
struct attribute_group ** groups; /* optional groups */
|
||||
|
||||
void (*release)(struct class_device *dev);
|
||||
int (*uevent)(struct class_device *dev, char **envp,
|
||||
|
||||
@@ -14,6 +14,7 @@ enum dma_data_direction {
|
||||
};
|
||||
|
||||
#define DMA_64BIT_MASK 0xffffffffffffffffULL
|
||||
#define DMA_48BIT_MASK 0x0000ffffffffffffULL
|
||||
#define DMA_40BIT_MASK 0x000000ffffffffffULL
|
||||
#define DMA_39BIT_MASK 0x0000007fffffffffULL
|
||||
#define DMA_32BIT_MASK 0x00000000ffffffffULL
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Platform information definitions for the CPM Uart driver.
|
||||
*
|
||||
* 2006 (c) MontaVista Software, Inc.
|
||||
* Vitaly Bordug <vbordug@ru.mvista.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 FS_UART_PD_H
|
||||
#define FS_UART_PD_H
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
enum fs_uart_id {
|
||||
fsid_smc1_uart,
|
||||
fsid_smc2_uart,
|
||||
fsid_scc1_uart,
|
||||
fsid_scc2_uart,
|
||||
fsid_scc3_uart,
|
||||
fsid_scc4_uart,
|
||||
fs_uart_nr,
|
||||
};
|
||||
|
||||
static inline int fs_uart_id_scc2fsid(int id)
|
||||
{
|
||||
return fsid_scc1_uart + id - 1;
|
||||
}
|
||||
|
||||
static inline int fs_uart_id_fsid2scc(int id)
|
||||
{
|
||||
return id - fsid_scc1_uart + 1;
|
||||
}
|
||||
|
||||
static inline int fs_uart_id_smc2fsid(int id)
|
||||
{
|
||||
return fsid_smc1_uart + id - 1;
|
||||
}
|
||||
|
||||
static inline int fs_uart_id_fsid2smc(int id)
|
||||
{
|
||||
return id - fsid_smc1_uart + 1;
|
||||
}
|
||||
|
||||
struct fs_uart_platform_info {
|
||||
void(*init_ioports)(void);
|
||||
/* device specific information */
|
||||
int fs_no; /* controller index */
|
||||
u32 uart_clk;
|
||||
u8 tx_num_fifo;
|
||||
u8 tx_buf_size;
|
||||
u8 rx_num_fifo;
|
||||
u8 rx_buf_size;
|
||||
u8 brg;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -124,6 +124,7 @@ extern int get_option(char **str, int *pint);
|
||||
extern char *get_options(const char *str, int nints, int *ints);
|
||||
extern unsigned long long memparse(char *ptr, char **retptr);
|
||||
|
||||
extern int core_kernel_text(unsigned long addr);
|
||||
extern int __kernel_text_address(unsigned long addr);
|
||||
extern int kernel_text_address(unsigned long addr);
|
||||
extern int session_of_pgrp(int pgrp);
|
||||
|
||||
@@ -28,6 +28,7 @@ struct mmc_csd {
|
||||
unsigned short cmdclass;
|
||||
unsigned short tacc_clks;
|
||||
unsigned int tacc_ns;
|
||||
unsigned int r2w_factor;
|
||||
unsigned int max_dtr;
|
||||
unsigned int read_blkbits;
|
||||
unsigned int write_blkbits;
|
||||
|
||||
@@ -69,6 +69,7 @@ struct mmc_data {
|
||||
unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */
|
||||
unsigned int timeout_clks; /* data timeout (in clocks) */
|
||||
unsigned int blksz_bits; /* data block size */
|
||||
unsigned int blksz; /* data block size */
|
||||
unsigned int blocks; /* number of blocks */
|
||||
unsigned int error; /* data error */
|
||||
unsigned int flags;
|
||||
|
||||
+11
-12
@@ -433,8 +433,7 @@ struct net_device
|
||||
|
||||
/* register/unregister state machine */
|
||||
enum { NETREG_UNINITIALIZED=0,
|
||||
NETREG_REGISTERING, /* called register_netdevice */
|
||||
NETREG_REGISTERED, /* completed register todo */
|
||||
NETREG_REGISTERED, /* completed register_netdevice */
|
||||
NETREG_UNREGISTERING, /* called unregister_netdevice */
|
||||
NETREG_UNREGISTERED, /* completed unregister todo */
|
||||
NETREG_RELEASED, /* called free_netdev */
|
||||
@@ -506,6 +505,8 @@ struct net_device
|
||||
|
||||
/* class/net/name entry */
|
||||
struct class_device class_dev;
|
||||
/* space for optional statistics and wireless sysfs groups */
|
||||
struct attribute_group *sysfs_groups[3];
|
||||
};
|
||||
|
||||
#define NETDEV_ALIGN 32
|
||||
@@ -829,21 +830,19 @@ static inline void netif_rx_schedule(struct net_device *dev)
|
||||
__netif_rx_schedule(dev);
|
||||
}
|
||||
|
||||
|
||||
static inline void __netif_rx_reschedule(struct net_device *dev, int undo)
|
||||
{
|
||||
dev->quota += undo;
|
||||
list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
|
||||
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
|
||||
}
|
||||
|
||||
/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */
|
||||
/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete().
|
||||
* Do not inline this?
|
||||
*/
|
||||
static inline int netif_rx_reschedule(struct net_device *dev, int undo)
|
||||
{
|
||||
if (netif_rx_schedule_prep(dev)) {
|
||||
unsigned long flags;
|
||||
|
||||
dev->quota += undo;
|
||||
|
||||
local_irq_save(flags);
|
||||
__netif_rx_reschedule(dev, undo);
|
||||
list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
|
||||
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
|
||||
local_irq_restore(flags);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323
|
||||
* conntrack/NAT module.
|
||||
*
|
||||
* Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@hotmail.com>
|
||||
* Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net>
|
||||
*
|
||||
* This source code is licensed under General Public License version 2.
|
||||
*
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
#define PIPE_BUFFERS (16)
|
||||
|
||||
#define PIPE_BUF_FLAG_ATOMIC 0x01 /* was atomically mapped */
|
||||
#define PIPE_BUF_FLAG_GIFT 0x02 /* page is a gift */
|
||||
#define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */
|
||||
#define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */
|
||||
#define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */
|
||||
|
||||
struct pipe_buffer {
|
||||
struct page *page;
|
||||
|
||||
@@ -132,6 +132,7 @@ static inline void rcu_bh_qsctr_inc(int cpu)
|
||||
}
|
||||
|
||||
extern int rcu_pending(int cpu);
|
||||
extern int rcu_needs_cpu(int cpu);
|
||||
|
||||
/**
|
||||
* rcu_read_lock - mark the beginning of an RCU read-side critical section.
|
||||
|
||||
@@ -254,6 +254,7 @@ struct uart_port {
|
||||
#define UPF_CONS_FLOW ((__force upf_t) (1 << 23))
|
||||
#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24))
|
||||
#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28))
|
||||
#define UPF_DEAD ((__force upf_t) (1 << 30))
|
||||
#define UPF_IOREMAP ((__force upf_t) (1 << 31))
|
||||
|
||||
#define UPF_CHANGE_MASK ((__force upf_t) (0x17fff))
|
||||
|
||||
@@ -150,6 +150,7 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
|
||||
|
||||
extern void kfree(const void *);
|
||||
extern unsigned int ksize(const void *);
|
||||
extern int slab_is_available(void);
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node);
|
||||
|
||||
+28
-17
@@ -31,18 +31,23 @@ extern struct bus_type spi_bus_type;
|
||||
* @master: SPI controller used with the device.
|
||||
* @max_speed_hz: Maximum clock rate to be used with this chip
|
||||
* (on this board); may be changed by the device's driver.
|
||||
* The spi_transfer.speed_hz can override this for each transfer.
|
||||
* @chip-select: Chipselect, distinguishing chips handled by "master".
|
||||
* @mode: The spi mode defines how data is clocked out and in.
|
||||
* This may be changed by the device's driver.
|
||||
* The "active low" default for chipselect mode can be overridden,
|
||||
* as can the "MSB first" default for each word in a transfer.
|
||||
* @bits_per_word: Data transfers involve one or more words; word sizes
|
||||
* like eight or 12 bits are common. In-memory wordsizes are
|
||||
* like eight or 12 bits are common. In-memory wordsizes are
|
||||
* powers of two bytes (e.g. 20 bit samples use 32 bits).
|
||||
* This may be changed by the device's driver.
|
||||
* This may be changed by the device's driver, or left at the
|
||||
* default (0) indicating protocol words are eight bit bytes.
|
||||
* The spi_transfer.bits_per_word can override this for each transfer.
|
||||
* @irq: Negative, or the number passed to request_irq() to receive
|
||||
* interrupts from this device.
|
||||
* interrupts from this device.
|
||||
* @controller_state: Controller's runtime state
|
||||
* @controller_data: Board-specific definitions for controller, such as
|
||||
* FIFO initialization parameters; from board_info.controller_data
|
||||
* FIFO initialization parameters; from board_info.controller_data
|
||||
*
|
||||
* An spi_device is used to interchange data between an SPI slave
|
||||
* (usually a discrete chip) and CPU memory.
|
||||
@@ -65,6 +70,7 @@ struct spi_device {
|
||||
#define SPI_MODE_2 (SPI_CPOL|0)
|
||||
#define SPI_MODE_3 (SPI_CPOL|SPI_CPHA)
|
||||
#define SPI_CS_HIGH 0x04 /* chipselect active high? */
|
||||
#define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */
|
||||
u8 bits_per_word;
|
||||
int irq;
|
||||
void *controller_state;
|
||||
@@ -73,7 +79,6 @@ struct spi_device {
|
||||
|
||||
// likely need more hooks for more protocol options affecting how
|
||||
// the controller talks to each chip, like:
|
||||
// - bit order (default is wordwise msb-first)
|
||||
// - memory packing (12 bit samples into low bits, others zeroed)
|
||||
// - priority
|
||||
// - drop chipselect after each word
|
||||
@@ -143,13 +148,13 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
|
||||
* struct spi_master - interface to SPI master controller
|
||||
* @cdev: class interface to this driver
|
||||
* @bus_num: board-specific (and often SOC-specific) identifier for a
|
||||
* given SPI controller.
|
||||
* given SPI controller.
|
||||
* @num_chipselect: chipselects are used to distinguish individual
|
||||
* SPI slaves, and are numbered from zero to num_chipselects.
|
||||
* each slave has a chipselect signal, but it's common that not
|
||||
* every chipselect is connected to a slave.
|
||||
* SPI slaves, and are numbered from zero to num_chipselects.
|
||||
* each slave has a chipselect signal, but it's common that not
|
||||
* every chipselect is connected to a slave.
|
||||
* @setup: updates the device mode and clocking records used by a
|
||||
* device's SPI controller; protocol code may call this.
|
||||
* device's SPI controller; protocol code may call this.
|
||||
* @transfer: adds a message to the controller's transfer queue.
|
||||
* @cleanup: frees controller-specific state
|
||||
*
|
||||
@@ -167,13 +172,13 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
|
||||
struct spi_master {
|
||||
struct class_device cdev;
|
||||
|
||||
/* other than zero (== assign one dynamically), bus_num is fully
|
||||
/* other than negative (== assign one dynamically), bus_num is fully
|
||||
* board-specific. usually that simplifies to being SOC-specific.
|
||||
* example: one SOC has three SPI controllers, numbered 1..3,
|
||||
* example: one SOC has three SPI controllers, numbered 0..2,
|
||||
* and one board's schematics might show it using SPI-2. software
|
||||
* would normally use bus_num=2 for that controller.
|
||||
*/
|
||||
u16 bus_num;
|
||||
s16 bus_num;
|
||||
|
||||
/* chipselects will be integral to many controllers; some others
|
||||
* might use board-specific GPIOs.
|
||||
@@ -268,10 +273,14 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum);
|
||||
* @tx_dma: DMA address of tx_buf, if spi_message.is_dma_mapped
|
||||
* @rx_dma: DMA address of rx_buf, if spi_message.is_dma_mapped
|
||||
* @len: size of rx and tx buffers (in bytes)
|
||||
* @speed_hz: Select a speed other then the device default for this
|
||||
* transfer. If 0 the default (from spi_device) is used.
|
||||
* @bits_per_word: select a bits_per_word other then the device default
|
||||
* for this transfer. If 0 the default (from spi_device) is used.
|
||||
* @cs_change: affects chipselect after this transfer completes
|
||||
* @delay_usecs: microseconds to delay after this transfer before
|
||||
* (optionally) changing the chipselect status, then starting
|
||||
* the next transfer or completing this spi_message.
|
||||
* (optionally) changing the chipselect status, then starting
|
||||
* the next transfer or completing this spi_message.
|
||||
* @transfer_list: transfers are sequenced through spi_message.transfers
|
||||
*
|
||||
* SPI transfers always write the same number of bytes as they read.
|
||||
@@ -322,7 +331,9 @@ struct spi_transfer {
|
||||
dma_addr_t rx_dma;
|
||||
|
||||
unsigned cs_change:1;
|
||||
u8 bits_per_word;
|
||||
u16 delay_usecs;
|
||||
u32 speed_hz;
|
||||
|
||||
struct list_head transfer_list;
|
||||
};
|
||||
@@ -356,7 +367,7 @@ struct spi_transfer {
|
||||
* and its transfers, ignore them until its completion callback.
|
||||
*/
|
||||
struct spi_message {
|
||||
struct list_head transfers;
|
||||
struct list_head transfers;
|
||||
|
||||
struct spi_device *spi;
|
||||
|
||||
@@ -374,7 +385,7 @@ struct spi_message {
|
||||
*/
|
||||
|
||||
/* completion is reported through a callback */
|
||||
void (*complete)(void *context);
|
||||
void (*complete)(void *context);
|
||||
void *context;
|
||||
unsigned actual_length;
|
||||
int status;
|
||||
|
||||
@@ -30,6 +30,12 @@ struct spi_bitbang {
|
||||
|
||||
struct spi_master *master;
|
||||
|
||||
/* setup_transfer() changes clock and/or wordsize to match settings
|
||||
* for this transfer; zeroes restore defaults from spi_device.
|
||||
*/
|
||||
int (*setup_transfer)(struct spi_device *spi,
|
||||
struct spi_transfer *t);
|
||||
|
||||
void (*chipselect)(struct spi_device *spi, int is_on);
|
||||
#define BITBANG_CS_ACTIVE 1 /* normally nCS, active low */
|
||||
#define BITBANG_CS_INACTIVE 0
|
||||
@@ -51,6 +57,8 @@ struct spi_bitbang {
|
||||
extern int spi_bitbang_setup(struct spi_device *spi);
|
||||
extern void spi_bitbang_cleanup(const struct spi_device *spi);
|
||||
extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m);
|
||||
extern int spi_bitbang_setup_transfer(struct spi_device *spi,
|
||||
struct spi_transfer *t);
|
||||
|
||||
/* start or stop queue processing */
|
||||
extern int spi_bitbang_start(struct spi_bitbang *spi);
|
||||
|
||||
@@ -296,7 +296,7 @@ static inline void disable_swap_token(void)
|
||||
#define read_swap_cache_async(swp,vma,addr) NULL
|
||||
#define lookup_swap_cache(swp) NULL
|
||||
#define valid_swaphandles(swp, off) 0
|
||||
#define can_share_swap_page(p) 0
|
||||
#define can_share_swap_page(p) (page_mapcount(p) == 1)
|
||||
#define move_to_swap_cache(p, swp) 1
|
||||
#define move_from_swap_cache(p, i, m) 1
|
||||
#define __delete_from_swap_cache(p) /*NOTHING*/
|
||||
|
||||
Reference in New Issue
Block a user