Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
commit
dd48dc34fe
451 changed files with 3369 additions and 6960 deletions
|
|
@ -39,6 +39,7 @@ extern bool __refrigerator(bool check_kthr_stop);
|
|||
extern int freeze_processes(void);
|
||||
extern int freeze_kernel_threads(void);
|
||||
extern void thaw_processes(void);
|
||||
extern void thaw_kernel_threads(void);
|
||||
|
||||
static inline bool try_to_freeze(void)
|
||||
{
|
||||
|
|
@ -174,6 +175,7 @@ static inline bool __refrigerator(bool check_kthr_stop) { return false; }
|
|||
static inline int freeze_processes(void) { return -ENOSYS; }
|
||||
static inline int freeze_kernel_threads(void) { return -ENOSYS; }
|
||||
static inline void thaw_processes(void) {}
|
||||
static inline void thaw_kernel_threads(void) {}
|
||||
|
||||
static inline bool try_to_freeze(void) { return false; }
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include <linux/mod_devicetable.h>
|
||||
|
||||
|
||||
#define MAX_PAGE_BUFFER_COUNT 18
|
||||
#define MAX_PAGE_BUFFER_COUNT 19
|
||||
#define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#ifndef MCP_H
|
||||
#define MCP_H
|
||||
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <mach/dma.h>
|
||||
|
||||
struct mcp_ops;
|
||||
|
|
@ -27,7 +26,7 @@ struct mcp {
|
|||
dma_device_t dma_telco_rd;
|
||||
dma_device_t dma_telco_wr;
|
||||
struct device attached_device;
|
||||
const char *codec;
|
||||
int gpio_base;
|
||||
};
|
||||
|
||||
struct mcp_ops {
|
||||
|
|
@ -45,11 +44,10 @@ void mcp_reg_write(struct mcp *, unsigned int, unsigned int);
|
|||
unsigned int mcp_reg_read(struct mcp *, unsigned int);
|
||||
void mcp_enable(struct mcp *);
|
||||
void mcp_disable(struct mcp *);
|
||||
const struct mcp_device_id *mcp_get_device_id(const struct mcp *mcp);
|
||||
#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate)
|
||||
|
||||
struct mcp *mcp_host_alloc(struct device *, size_t);
|
||||
int mcp_host_register(struct mcp *, void *);
|
||||
int mcp_host_register(struct mcp *);
|
||||
void mcp_host_unregister(struct mcp *);
|
||||
|
||||
struct mcp_driver {
|
||||
|
|
@ -58,7 +56,6 @@ struct mcp_driver {
|
|||
void (*remove)(struct mcp *);
|
||||
int (*suspend)(struct mcp *, pm_message_t);
|
||||
int (*resume)(struct mcp *);
|
||||
const struct mcp_device_id *id_table;
|
||||
};
|
||||
|
||||
int mcp_driver_register(struct mcp_driver *);
|
||||
|
|
@ -67,6 +64,9 @@ void mcp_driver_unregister(struct mcp_driver *);
|
|||
#define mcp_get_drvdata(mcp) dev_get_drvdata(&(mcp)->attached_device)
|
||||
#define mcp_set_drvdata(mcp,d) dev_set_drvdata(&(mcp)->attached_device, d)
|
||||
|
||||
#define mcp_priv(mcp) ((void *)((mcp)+1))
|
||||
static inline void *mcp_priv(struct mcp *mcp)
|
||||
{
|
||||
return mcp + 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -104,9 +104,6 @@
|
|||
#define UCB_MODE_DYN_VFLAG_ENA (1 << 12)
|
||||
#define UCB_MODE_AUD_OFF_CAN (1 << 13)
|
||||
|
||||
struct ucb1x00_plat_data {
|
||||
int gpio_base;
|
||||
};
|
||||
|
||||
struct ucb1x00_irq {
|
||||
void *devid;
|
||||
|
|
@ -119,7 +116,7 @@ struct ucb1x00 {
|
|||
unsigned int irq;
|
||||
struct semaphore adc_sem;
|
||||
spinlock_t io_lock;
|
||||
const struct mcp_device_id *id;
|
||||
u16 id;
|
||||
u16 io_dir;
|
||||
u16 io_out;
|
||||
u16 adc_cr;
|
||||
|
|
|
|||
|
|
@ -436,17 +436,6 @@ struct spi_device_id {
|
|||
__attribute__((aligned(sizeof(kernel_ulong_t))));
|
||||
};
|
||||
|
||||
/* mcp */
|
||||
|
||||
#define MCP_NAME_SIZE 20
|
||||
#define MCP_MODULE_PREFIX "mcp:"
|
||||
|
||||
struct mcp_device_id {
|
||||
char name[MCP_NAME_SIZE];
|
||||
kernel_ulong_t driver_data /* Data private to the driver */
|
||||
__attribute__((aligned(sizeof(kernel_ulong_t))));
|
||||
};
|
||||
|
||||
/* dmi */
|
||||
enum dmi_field {
|
||||
DMI_NONE,
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ static inline void mtd_resume(struct mtd_info *mtd)
|
|||
static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs)
|
||||
{
|
||||
if (!mtd->block_isbad)
|
||||
return -EOPNOTSUPP;
|
||||
return 0;
|
||||
return mtd->block_isbad(mtd, ofs);
|
||||
}
|
||||
|
||||
|
|
@ -489,7 +489,7 @@ static inline int mtd_has_oob(const struct mtd_info *mtd)
|
|||
|
||||
static inline int mtd_can_have_bb(const struct mtd_info *mtd)
|
||||
{
|
||||
return !!mtd->block_isbad;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Kernel-side ioctl definitions */
|
||||
|
|
|
|||
|
|
@ -2090,7 +2090,7 @@ extern struct task_struct *idle_task(int cpu);
|
|||
* is_idle_task - is the specified task an idle task?
|
||||
* @p: the task in question.
|
||||
*/
|
||||
static inline bool is_idle_task(struct task_struct *p)
|
||||
static inline bool is_idle_task(const struct task_struct *p)
|
||||
{
|
||||
return p->pid == 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,164 +0,0 @@
|
|||
/**
|
||||
* System devices follow a slightly different driver model.
|
||||
* They don't need to do dynammic driver binding, can't be probed,
|
||||
* and don't reside on any type of peripheral bus.
|
||||
* So, we represent and treat them a little differently.
|
||||
*
|
||||
* We still have a notion of a driver for a system device, because we still
|
||||
* want to perform basic operations on these devices.
|
||||
*
|
||||
* We also support auxiliary drivers binding to devices of a certain class.
|
||||
*
|
||||
* This allows configurable drivers to register themselves for devices of
|
||||
* a certain type. And, it allows class definitions to reside in generic
|
||||
* code while arch-specific code can register specific drivers.
|
||||
*
|
||||
* Auxiliary drivers registered with a NULL cls are registered as drivers
|
||||
* for all system devices, and get notification calls for each device.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _SYSDEV_H_
|
||||
#define _SYSDEV_H_
|
||||
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/pm.h>
|
||||
|
||||
|
||||
struct sys_device;
|
||||
struct sysdev_class_attribute;
|
||||
|
||||
struct sysdev_class {
|
||||
const char *name;
|
||||
struct list_head drivers;
|
||||
struct sysdev_class_attribute **attrs;
|
||||
struct kset kset;
|
||||
};
|
||||
|
||||
struct sysdev_class_attribute {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct sysdev_class *, struct sysdev_class_attribute *,
|
||||
char *);
|
||||
ssize_t (*store)(struct sysdev_class *, struct sysdev_class_attribute *,
|
||||
const char *, size_t);
|
||||
};
|
||||
|
||||
#define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
|
||||
{ \
|
||||
.attr = {.name = __stringify(_name), .mode = _mode }, \
|
||||
.show = _show, \
|
||||
.store = _store, \
|
||||
}
|
||||
|
||||
#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
|
||||
struct sysdev_class_attribute attr_##_name = \
|
||||
_SYSDEV_CLASS_ATTR(_name,_mode,_show,_store)
|
||||
|
||||
|
||||
extern int sysdev_class_register(struct sysdev_class *);
|
||||
extern void sysdev_class_unregister(struct sysdev_class *);
|
||||
|
||||
extern int sysdev_class_create_file(struct sysdev_class *,
|
||||
struct sysdev_class_attribute *);
|
||||
extern void sysdev_class_remove_file(struct sysdev_class *,
|
||||
struct sysdev_class_attribute *);
|
||||
/**
|
||||
* Auxiliary system device drivers.
|
||||
*/
|
||||
|
||||
struct sysdev_driver {
|
||||
struct list_head entry;
|
||||
int (*add)(struct sys_device *);
|
||||
int (*remove)(struct sys_device *);
|
||||
};
|
||||
|
||||
|
||||
extern int sysdev_driver_register(struct sysdev_class *, struct sysdev_driver *);
|
||||
extern void sysdev_driver_unregister(struct sysdev_class *, struct sysdev_driver *);
|
||||
|
||||
|
||||
/**
|
||||
* sys_devices can be simplified a lot from regular devices, because they're
|
||||
* simply not as versatile.
|
||||
*/
|
||||
|
||||
struct sys_device {
|
||||
u32 id;
|
||||
struct sysdev_class * cls;
|
||||
struct kobject kobj;
|
||||
};
|
||||
|
||||
extern int sysdev_register(struct sys_device *);
|
||||
extern void sysdev_unregister(struct sys_device *);
|
||||
|
||||
|
||||
struct sysdev_attribute {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct sys_device *, struct sysdev_attribute *, char *);
|
||||
ssize_t (*store)(struct sys_device *, struct sysdev_attribute *,
|
||||
const char *, size_t);
|
||||
};
|
||||
|
||||
|
||||
#define _SYSDEV_ATTR(_name, _mode, _show, _store) \
|
||||
{ \
|
||||
.attr = { .name = __stringify(_name), .mode = _mode }, \
|
||||
.show = _show, \
|
||||
.store = _store, \
|
||||
}
|
||||
|
||||
#define SYSDEV_ATTR(_name, _mode, _show, _store) \
|
||||
struct sysdev_attribute attr_##_name = \
|
||||
_SYSDEV_ATTR(_name, _mode, _show, _store);
|
||||
|
||||
extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *);
|
||||
extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *);
|
||||
|
||||
/* Create/remove NULL terminated attribute list */
|
||||
static inline int
|
||||
sysdev_create_files(struct sys_device *d, struct sysdev_attribute **a)
|
||||
{
|
||||
return sysfs_create_files(&d->kobj, (const struct attribute **)a);
|
||||
}
|
||||
|
||||
static inline void
|
||||
sysdev_remove_files(struct sys_device *d, struct sysdev_attribute **a)
|
||||
{
|
||||
return sysfs_remove_files(&d->kobj, (const struct attribute **)a);
|
||||
}
|
||||
|
||||
struct sysdev_ext_attribute {
|
||||
struct sysdev_attribute attr;
|
||||
void *var;
|
||||
};
|
||||
|
||||
/*
|
||||
* Support for simple variable sysdev attributes.
|
||||
* The pointer to the variable is stored in a sysdev_ext_attribute
|
||||
*/
|
||||
|
||||
/* Add more types as needed */
|
||||
|
||||
extern ssize_t sysdev_show_ulong(struct sys_device *, struct sysdev_attribute *,
|
||||
char *);
|
||||
extern ssize_t sysdev_store_ulong(struct sys_device *,
|
||||
struct sysdev_attribute *, const char *, size_t);
|
||||
extern ssize_t sysdev_show_int(struct sys_device *, struct sysdev_attribute *,
|
||||
char *);
|
||||
extern ssize_t sysdev_store_int(struct sys_device *,
|
||||
struct sysdev_attribute *, const char *, size_t);
|
||||
|
||||
#define _SYSDEV_ULONG_ATTR(_name, _mode, _var) \
|
||||
{ _SYSDEV_ATTR(_name, _mode, sysdev_show_ulong, sysdev_store_ulong), \
|
||||
&(_var) }
|
||||
#define SYSDEV_ULONG_ATTR(_name, _mode, _var) \
|
||||
struct sysdev_ext_attribute attr_##_name = \
|
||||
_SYSDEV_ULONG_ATTR(_name, _mode, _var);
|
||||
#define _SYSDEV_INT_ATTR(_name, _mode, _var) \
|
||||
{ _SYSDEV_ATTR(_name, _mode, sysdev_show_int, sysdev_store_int), \
|
||||
&(_var) }
|
||||
#define SYSDEV_INT_ATTR(_name, _mode, _var) \
|
||||
struct sysdev_ext_attribute attr_##_name = \
|
||||
_SYSDEV_INT_ATTR(_name, _mode, _var);
|
||||
|
||||
#endif /* _SYSDEV_H_ */
|
||||
|
|
@ -152,9 +152,9 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
|
|||
void thermal_cooling_device_unregister(struct thermal_cooling_device *);
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
extern int generate_netlink_event(u32 orig, enum events event);
|
||||
extern int thermal_generate_netlink_event(u32 orig, enum events event);
|
||||
#else
|
||||
static inline int generate_netlink_event(u32 orig, enum events event)
|
||||
static inline int thermal_generate_netlink_event(u32 orig, enum events event)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,139 +0,0 @@
|
|||
/*
|
||||
* Intel Langwell USB OTG transceiver driver
|
||||
* Copyright (C) 2008 - 2010, Intel Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LANGWELL_OTG_H
|
||||
#define __LANGWELL_OTG_H
|
||||
|
||||
#include <linux/usb/intel_mid_otg.h>
|
||||
|
||||
#define CI_USBCMD 0x30
|
||||
# define USBCMD_RST BIT(1)
|
||||
# define USBCMD_RS BIT(0)
|
||||
#define CI_USBSTS 0x34
|
||||
# define USBSTS_SLI BIT(8)
|
||||
# define USBSTS_URI BIT(6)
|
||||
# define USBSTS_PCI BIT(2)
|
||||
#define CI_PORTSC1 0x74
|
||||
# define PORTSC_PP BIT(12)
|
||||
# define PORTSC_LS (BIT(11) | BIT(10))
|
||||
# define PORTSC_SUSP BIT(7)
|
||||
# define PORTSC_CCS BIT(0)
|
||||
#define CI_HOSTPC1 0xb4
|
||||
# define HOSTPC1_PHCD BIT(22)
|
||||
#define CI_OTGSC 0xf4
|
||||
# define OTGSC_DPIE BIT(30)
|
||||
# define OTGSC_1MSE BIT(29)
|
||||
# define OTGSC_BSEIE BIT(28)
|
||||
# define OTGSC_BSVIE BIT(27)
|
||||
# define OTGSC_ASVIE BIT(26)
|
||||
# define OTGSC_AVVIE BIT(25)
|
||||
# define OTGSC_IDIE BIT(24)
|
||||
# define OTGSC_DPIS BIT(22)
|
||||
# define OTGSC_1MSS BIT(21)
|
||||
# define OTGSC_BSEIS BIT(20)
|
||||
# define OTGSC_BSVIS BIT(19)
|
||||
# define OTGSC_ASVIS BIT(18)
|
||||
# define OTGSC_AVVIS BIT(17)
|
||||
# define OTGSC_IDIS BIT(16)
|
||||
# define OTGSC_DPS BIT(14)
|
||||
# define OTGSC_1MST BIT(13)
|
||||
# define OTGSC_BSE BIT(12)
|
||||
# define OTGSC_BSV BIT(11)
|
||||
# define OTGSC_ASV BIT(10)
|
||||
# define OTGSC_AVV BIT(9)
|
||||
# define OTGSC_ID BIT(8)
|
||||
# define OTGSC_HABA BIT(7)
|
||||
# define OTGSC_HADP BIT(6)
|
||||
# define OTGSC_IDPU BIT(5)
|
||||
# define OTGSC_DP BIT(4)
|
||||
# define OTGSC_OT BIT(3)
|
||||
# define OTGSC_HAAR BIT(2)
|
||||
# define OTGSC_VC BIT(1)
|
||||
# define OTGSC_VD BIT(0)
|
||||
# define OTGSC_INTEN_MASK (0x7f << 24)
|
||||
# define OTGSC_INT_MASK (0x5f << 24)
|
||||
# define OTGSC_INTSTS_MASK (0x7f << 16)
|
||||
#define CI_USBMODE 0xf8
|
||||
# define USBMODE_CM (BIT(1) | BIT(0))
|
||||
# define USBMODE_IDLE 0
|
||||
# define USBMODE_DEVICE 0x2
|
||||
# define USBMODE_HOST 0x3
|
||||
#define USBCFG_ADDR 0xff10801c
|
||||
#define USBCFG_LEN 4
|
||||
# define USBCFG_VBUSVAL BIT(14)
|
||||
# define USBCFG_AVALID BIT(13)
|
||||
# define USBCFG_BVALID BIT(12)
|
||||
# define USBCFG_SESEND BIT(11)
|
||||
|
||||
#define INTR_DUMMY_MASK (USBSTS_SLI | USBSTS_URI | USBSTS_PCI)
|
||||
|
||||
enum langwell_otg_timer_type {
|
||||
TA_WAIT_VRISE_TMR,
|
||||
TA_WAIT_BCON_TMR,
|
||||
TA_AIDL_BDIS_TMR,
|
||||
TB_ASE0_BRST_TMR,
|
||||
TB_SE0_SRP_TMR,
|
||||
TB_SRP_INIT_TMR,
|
||||
TB_SRP_FAIL_TMR,
|
||||
TB_BUS_SUSPEND_TMR
|
||||
};
|
||||
|
||||
#define TA_WAIT_VRISE 100
|
||||
#define TA_WAIT_BCON 30000
|
||||
#define TA_AIDL_BDIS 15000
|
||||
#define TB_ASE0_BRST 5000
|
||||
#define TB_SE0_SRP 2
|
||||
#define TB_SRP_INIT 100
|
||||
#define TB_SRP_FAIL 5500
|
||||
#define TB_BUS_SUSPEND 500
|
||||
|
||||
struct langwell_otg_timer {
|
||||
unsigned long expires; /* Number of count increase to timeout */
|
||||
unsigned long count; /* Tick counter */
|
||||
void (*function)(unsigned long); /* Timeout function */
|
||||
unsigned long data; /* Data passed to function */
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
struct langwell_otg {
|
||||
struct intel_mid_otg_xceiv iotg;
|
||||
struct device *dev;
|
||||
|
||||
void __iomem *usbcfg; /* SCCBUSB config Reg */
|
||||
|
||||
unsigned region;
|
||||
unsigned cfg_region;
|
||||
|
||||
struct work_struct work;
|
||||
struct workqueue_struct *qwork;
|
||||
struct timer_list hsm_timer;
|
||||
|
||||
spinlock_t lock;
|
||||
spinlock_t wq_lock;
|
||||
|
||||
struct notifier_block iotg_notifier;
|
||||
};
|
||||
|
||||
static inline
|
||||
struct langwell_otg *mid_xceiv_to_lnw(struct intel_mid_otg_xceiv *iotg)
|
||||
{
|
||||
return container_of(iotg, struct langwell_otg, iotg);
|
||||
}
|
||||
|
||||
#endif /* __LANGWELL_OTG_H__ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue