forked from Minki/linux
Merge commit 'pm-fixes-for-3.3-rc3' into pm-qos
New material in the pm-qos branch depends on recent power management fixes.
This commit is contained in:
commit
654b0c9627
@ -857,42 +857,41 @@ case), we define a mapping like this:
|
||||
|
||||
...
|
||||
{
|
||||
.name "2bit"
|
||||
.name = "2bit"
|
||||
.ctrl_dev_name = "pinctrl-foo",
|
||||
.function = "mmc0",
|
||||
.group = "mmc0_1_grp",
|
||||
.dev_name = "foo-mmc.0",
|
||||
},
|
||||
{
|
||||
.name "4bit"
|
||||
.name = "4bit"
|
||||
.ctrl_dev_name = "pinctrl-foo",
|
||||
.function = "mmc0",
|
||||
.group = "mmc0_1_grp",
|
||||
.dev_name = "foo-mmc.0",
|
||||
},
|
||||
{
|
||||
.name "4bit"
|
||||
.name = "4bit"
|
||||
.ctrl_dev_name = "pinctrl-foo",
|
||||
.function = "mmc0",
|
||||
.group = "mmc0_2_grp",
|
||||
.dev_name = "foo-mmc.0",
|
||||
},
|
||||
{
|
||||
.name "8bit"
|
||||
.name = "8bit"
|
||||
.ctrl_dev_name = "pinctrl-foo",
|
||||
.function = "mmc0",
|
||||
.group = "mmc0_1_grp",
|
||||
.dev_name = "foo-mmc.0",
|
||||
},
|
||||
{
|
||||
.name "8bit"
|
||||
.name = "8bit"
|
||||
.ctrl_dev_name = "pinctrl-foo",
|
||||
.function = "mmc0",
|
||||
.group = "mmc0_2_grp",
|
||||
.dev_name = "foo-mmc.0",
|
||||
},
|
||||
{
|
||||
.name "8bit"
|
||||
.name = "8bit"
|
||||
.ctrl_dev_name = "pinctrl-foo",
|
||||
.function = "mmc0",
|
||||
.group = "mmc0_3_grp",
|
||||
@ -995,7 +994,7 @@ This is enabled by simply setting the .hog_on_boot field in the map to true,
|
||||
like this:
|
||||
|
||||
{
|
||||
.name "POWERMAP"
|
||||
.name = "POWERMAP"
|
||||
.ctrl_dev_name = "pinctrl-foo",
|
||||
.function = "power_func",
|
||||
.hog_on_boot = true,
|
||||
@ -1025,7 +1024,7 @@ it, disables and releases it, and muxes it in on the pins defined by group B:
|
||||
|
||||
foo_switch()
|
||||
{
|
||||
struct pinmux pmx;
|
||||
struct pinmux *pmx;
|
||||
|
||||
/* Enable on position A */
|
||||
pmx = pinmux_get(&device, "spi0-pos-A");
|
||||
|
11
MAINTAINERS
11
MAINTAINERS
@ -4140,6 +4140,7 @@ F: fs/partitions/ldm.*
|
||||
|
||||
LogFS
|
||||
M: Joern Engel <joern@logfs.org>
|
||||
M: Prasad Joshi <prasadjoshi.linux@gmail.com>
|
||||
L: logfs@logfs.org
|
||||
W: logfs.org
|
||||
S: Maintained
|
||||
@ -4281,13 +4282,6 @@ S: Orphan
|
||||
F: drivers/video/matrox/matroxfb_*
|
||||
F: include/linux/matroxfb.h
|
||||
|
||||
MAX1668 TEMPERATURE SENSOR DRIVER
|
||||
M: "David George" <david.george@ska.ac.za>
|
||||
L: lm-sensors@lm-sensors.org
|
||||
S: Maintained
|
||||
F: Documentation/hwmon/max1668
|
||||
F: drivers/hwmon/max1668.c
|
||||
|
||||
MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
|
||||
M: "Hans J. Koch" <hjk@hansjkoch.de>
|
||||
L: lm-sensors@lm-sensors.org
|
||||
@ -6678,7 +6672,7 @@ TTY LAYER
|
||||
M: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6.git
|
||||
F: drivers/tty/*
|
||||
F: drivers/tty/
|
||||
F: drivers/tty/serial/serial_core.c
|
||||
F: include/linux/serial_core.h
|
||||
F: include/linux/serial.h
|
||||
@ -7371,6 +7365,7 @@ S: Supported
|
||||
F: Documentation/hwmon/wm83??
|
||||
F: arch/arm/mach-s3c64xx/mach-crag6410*
|
||||
F: drivers/leds/leds-wm83*.c
|
||||
F: drivers/hwmon/wm83??-hwmon.c
|
||||
F: drivers/input/misc/wm831x-on.c
|
||||
F: drivers/input/touchscreen/wm831x-ts.c
|
||||
F: drivers/input/touchscreen/wm97*.c
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 3
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION = -rc2
|
||||
NAME = Saber-toothed Squirrel
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -19,6 +19,7 @@ config MICROBLAZE
|
||||
select GENERIC_IRQ_SHOW
|
||||
select GENERIC_PCI_IOMAP
|
||||
select GENERIC_CPU_DEVICES
|
||||
select GENERIC_ATOMIC64
|
||||
|
||||
config SWAP
|
||||
def_bool n
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define _ASM_MICROBLAZE_ATOMIC_H
|
||||
|
||||
#include <asm-generic/atomic.h>
|
||||
#include <asm-generic/atomic64.h>
|
||||
|
||||
/*
|
||||
* Atomically test *v and decrement if it is greater than 0.
|
||||
|
@ -88,7 +88,6 @@ KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
|
||||
KBUILD_AFLAGS += $(aflags-y)
|
||||
|
||||
OBJCOPYFLAGS := -O binary
|
||||
LDFLAGS_vmlinux := -e start
|
||||
|
||||
head-y := arch/s390/kernel/head.o
|
||||
head-y += arch/s390/kernel/$(if $(CONFIG_64BIT),head64.o,head31.o)
|
||||
|
@ -9,12 +9,12 @@
|
||||
#ifndef CONFIG_64BIT
|
||||
OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
|
||||
OUTPUT_ARCH(s390)
|
||||
ENTRY(_start)
|
||||
ENTRY(startup)
|
||||
jiffies = jiffies_64 + 4;
|
||||
#else
|
||||
OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
|
||||
OUTPUT_ARCH(s390:64-bit)
|
||||
ENTRY(_start)
|
||||
ENTRY(startup)
|
||||
jiffies = jiffies_64;
|
||||
#endif
|
||||
|
||||
|
@ -140,7 +140,7 @@ int drm_gem_object_init(struct drm_device *dev,
|
||||
obj->dev = dev;
|
||||
obj->filp = shmem_file_setup("drm mm object", size, VM_NORESERVE);
|
||||
if (IS_ERR(obj->filp))
|
||||
return -ENOMEM;
|
||||
return PTR_ERR(obj->filp);
|
||||
|
||||
kref_init(&obj->refcount);
|
||||
atomic_set(&obj->handle_count, 0);
|
||||
|
@ -886,7 +886,7 @@ static int i810_flush_queue(struct drm_device *dev)
|
||||
}
|
||||
|
||||
/* Must be called with the lock held */
|
||||
void i810_driver_reclaim_buffers(struct drm_device *dev,
|
||||
static void i810_reclaim_buffers(struct drm_device *dev,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
struct drm_device_dma *dma = dev->dma;
|
||||
@ -1223,17 +1223,12 @@ void i810_driver_preclose(struct drm_device *dev, struct drm_file *file_priv)
|
||||
if (dev_priv->page_flipping)
|
||||
i810_do_cleanup_pageflip(dev);
|
||||
}
|
||||
}
|
||||
|
||||
if (file_priv->master && file_priv->master->lock.hw_lock) {
|
||||
drm_idlelock_take(&file_priv->master->lock);
|
||||
i810_driver_reclaim_buffers(dev, file_priv);
|
||||
drm_idlelock_release(&file_priv->master->lock);
|
||||
} else {
|
||||
/* master disappeared, clean up stuff anyway and hope nothing
|
||||
* goes wrong */
|
||||
i810_driver_reclaim_buffers(dev, file_priv);
|
||||
}
|
||||
|
||||
void i810_driver_reclaim_buffers_locked(struct drm_device *dev,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
i810_reclaim_buffers(dev, file_priv);
|
||||
}
|
||||
|
||||
int i810_driver_dma_quiescent(struct drm_device *dev)
|
||||
|
@ -63,6 +63,7 @@ static struct drm_driver driver = {
|
||||
.lastclose = i810_driver_lastclose,
|
||||
.preclose = i810_driver_preclose,
|
||||
.device_is_agp = i810_driver_device_is_agp,
|
||||
.reclaim_buffers_locked = i810_driver_reclaim_buffers_locked,
|
||||
.dma_quiescent = i810_driver_dma_quiescent,
|
||||
.ioctls = i810_ioctls,
|
||||
.fops = &i810_driver_fops,
|
||||
|
@ -116,12 +116,14 @@ typedef struct drm_i810_private {
|
||||
|
||||
/* i810_dma.c */
|
||||
extern int i810_driver_dma_quiescent(struct drm_device *dev);
|
||||
void i810_driver_reclaim_buffers(struct drm_device *dev,
|
||||
struct drm_file *file_priv);
|
||||
extern void i810_driver_reclaim_buffers_locked(struct drm_device *dev,
|
||||
struct drm_file *file_priv);
|
||||
extern int i810_driver_load(struct drm_device *, unsigned long flags);
|
||||
extern void i810_driver_lastclose(struct drm_device *dev);
|
||||
extern void i810_driver_preclose(struct drm_device *dev,
|
||||
struct drm_file *file_priv);
|
||||
extern void i810_driver_reclaim_buffers_locked(struct drm_device *dev,
|
||||
struct drm_file *file_priv);
|
||||
extern int i810_driver_device_is_agp(struct drm_device *dev);
|
||||
|
||||
extern long i810_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
||||
|
@ -897,6 +897,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
|
||||
i2c->rec = *rec;
|
||||
i2c->adapter.owner = THIS_MODULE;
|
||||
i2c->adapter.class = I2C_CLASS_DDC;
|
||||
i2c->adapter.dev.parent = &dev->pdev->dev;
|
||||
i2c->dev = dev;
|
||||
i2c_set_adapdata(&i2c->adapter, i2c);
|
||||
if (rec->mm_i2c ||
|
||||
|
@ -378,7 +378,7 @@ int vmw_framebuffer_create_handle(struct drm_framebuffer *fb,
|
||||
unsigned int *handle)
|
||||
{
|
||||
if (handle)
|
||||
handle = 0;
|
||||
*handle = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -283,11 +283,11 @@ static inline long temp_from_reg(u8 reg)
|
||||
|
||||
static inline u8 temp_to_reg(long val)
|
||||
{
|
||||
if (val < 0)
|
||||
val = 0;
|
||||
else if (val > 1000 * 0xff)
|
||||
val = 0xff;
|
||||
return ((val + 500) / 1000);
|
||||
if (val <= 0)
|
||||
return 0;
|
||||
if (val >= 1000 * 0xff)
|
||||
return 0xff;
|
||||
return (val + 500) / 1000;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -883,7 +883,7 @@ static int sht15_invalidate_voltage(struct notifier_block *nb,
|
||||
|
||||
static int __devinit sht15_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret;
|
||||
struct sht15_data *data = kzalloc(sizeof(*data), GFP_KERNEL);
|
||||
u8 status = 0;
|
||||
|
||||
@ -901,6 +901,7 @@ static int __devinit sht15_probe(struct platform_device *pdev)
|
||||
init_waitqueue_head(&data->wait_queue);
|
||||
|
||||
if (pdev->dev.platform_data == NULL) {
|
||||
ret = -EINVAL;
|
||||
dev_err(&pdev->dev, "no platform data supplied\n");
|
||||
goto err_free_data;
|
||||
}
|
||||
|
@ -1319,6 +1319,7 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,
|
||||
{
|
||||
struct w83627ehf_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
|
||||
struct w83627ehf_sio_data *sio_data = dev->platform_data;
|
||||
int nr = sensor_attr->index;
|
||||
unsigned long val;
|
||||
int err;
|
||||
@ -1330,6 +1331,11 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,
|
||||
|
||||
if (val > 1)
|
||||
return -EINVAL;
|
||||
|
||||
/* On NCT67766F, DC mode is only supported for pwm1 */
|
||||
if (sio_data->kind == nct6776 && nr && val != 1)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
reg = w83627ehf_read_value(data, W83627EHF_REG_PWM_ENABLE[nr]);
|
||||
data->pwm_mode[nr] = val;
|
||||
|
@ -972,11 +972,11 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
|
||||
}
|
||||
#endif
|
||||
|
||||
spin_unlock_irqrestore(&trans->shrd->lock, flags);
|
||||
|
||||
/* saved interrupt in inta variable now we can reset trans_pcie->inta */
|
||||
trans_pcie->inta = 0;
|
||||
|
||||
spin_unlock_irqrestore(&trans->shrd->lock, flags);
|
||||
|
||||
/* Now service all interrupt bits discovered above. */
|
||||
if (inta & CSR_INT_BIT_HW_ERR) {
|
||||
IWL_ERR(trans, "Hardware error detected. Restarting.\n");
|
||||
|
@ -68,7 +68,7 @@ struct netfront_cb {
|
||||
|
||||
#define NET_TX_RING_SIZE __CONST_RING_SIZE(xen_netif_tx, PAGE_SIZE)
|
||||
#define NET_RX_RING_SIZE __CONST_RING_SIZE(xen_netif_rx, PAGE_SIZE)
|
||||
#define TX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
|
||||
#define TX_MAX_TARGET min_t(int, NET_TX_RING_SIZE, 256)
|
||||
|
||||
struct netfront_stats {
|
||||
u64 rx_packets;
|
||||
|
@ -510,10 +510,12 @@ static struct dentry *debugfs_root;
|
||||
|
||||
static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
static struct dentry *device_root;
|
||||
struct dentry *device_root;
|
||||
|
||||
device_root = debugfs_create_dir(dev_name(pctldev->dev),
|
||||
debugfs_root);
|
||||
pctldev->device_root = device_root;
|
||||
|
||||
if (IS_ERR(device_root) || !device_root) {
|
||||
pr_warn("failed to create debugfs directory for %s\n",
|
||||
dev_name(pctldev->dev));
|
||||
@ -529,6 +531,11 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev)
|
||||
pinconf_init_device_debugfs(device_root, pctldev);
|
||||
}
|
||||
|
||||
static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
debugfs_remove_recursive(pctldev->device_root);
|
||||
}
|
||||
|
||||
static void pinctrl_init_debugfs(void)
|
||||
{
|
||||
debugfs_root = debugfs_create_dir("pinctrl", NULL);
|
||||
@ -553,6 +560,10 @@ static void pinctrl_init_debugfs(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -572,26 +583,6 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
|
||||
if (pctldesc->name == NULL)
|
||||
return NULL;
|
||||
|
||||
/* If we're implementing pinmuxing, check the ops for sanity */
|
||||
if (pctldesc->pmxops) {
|
||||
ret = pinmux_check_ops(pctldesc->pmxops);
|
||||
if (ret) {
|
||||
pr_err("%s pinmux ops lacks necessary functions\n",
|
||||
pctldesc->name);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we're implementing pinconfig, check the ops for sanity */
|
||||
if (pctldesc->confops) {
|
||||
ret = pinconf_check_ops(pctldesc->confops);
|
||||
if (ret) {
|
||||
pr_err("%s pin config ops lacks necessary functions\n",
|
||||
pctldesc->name);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
pctldev = kzalloc(sizeof(struct pinctrl_dev), GFP_KERNEL);
|
||||
if (pctldev == NULL)
|
||||
return NULL;
|
||||
@ -606,6 +597,26 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
|
||||
mutex_init(&pctldev->gpio_ranges_lock);
|
||||
pctldev->dev = dev;
|
||||
|
||||
/* If we're implementing pinmuxing, check the ops for sanity */
|
||||
if (pctldesc->pmxops) {
|
||||
ret = pinmux_check_ops(pctldev);
|
||||
if (ret) {
|
||||
pr_err("%s pinmux ops lacks necessary functions\n",
|
||||
pctldesc->name);
|
||||
goto out_err;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we're implementing pinconfig, check the ops for sanity */
|
||||
if (pctldesc->confops) {
|
||||
ret = pinconf_check_ops(pctldev);
|
||||
if (ret) {
|
||||
pr_err("%s pin config ops lacks necessary functions\n",
|
||||
pctldesc->name);
|
||||
goto out_err;
|
||||
}
|
||||
}
|
||||
|
||||
/* Register all the pins */
|
||||
pr_debug("try to register %d pins on %s...\n",
|
||||
pctldesc->npins, pctldesc->name);
|
||||
@ -641,6 +652,7 @@ void pinctrl_unregister(struct pinctrl_dev *pctldev)
|
||||
if (pctldev == NULL)
|
||||
return;
|
||||
|
||||
pinctrl_remove_device_debugfs(pctldev);
|
||||
pinmux_unhog_maps(pctldev);
|
||||
/* TODO: check that no pinmuxes are still active? */
|
||||
mutex_lock(&pinctrldev_list_mutex);
|
||||
|
@ -41,6 +41,9 @@ struct pinctrl_dev {
|
||||
struct device *dev;
|
||||
struct module *owner;
|
||||
void *driver_data;
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct dentry *device_root;
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX
|
||||
struct mutex pinmux_hogs_lock;
|
||||
struct list_head pinmux_hogs;
|
||||
|
@ -205,8 +205,10 @@ int pin_config_group_set(const char *dev_name, const char *pin_group,
|
||||
}
|
||||
EXPORT_SYMBOL(pin_config_group_set);
|
||||
|
||||
int pinconf_check_ops(const struct pinconf_ops *ops)
|
||||
int pinconf_check_ops(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
const struct pinconf_ops *ops = pctldev->desc->confops;
|
||||
|
||||
/* We must be able to read out pin status */
|
||||
if (!ops->pin_config_get && !ops->pin_config_group_get)
|
||||
return -EINVAL;
|
||||
@ -236,7 +238,7 @@ static int pinconf_pins_show(struct seq_file *s, void *what)
|
||||
seq_puts(s, "Format: pin (name): pinmux setting array\n");
|
||||
|
||||
/* The pin number can be retrived from the pin controller descriptor */
|
||||
for (i = 0; pin < pctldev->desc->npins; i++) {
|
||||
for (i = 0; i < pctldev->desc->npins; i++) {
|
||||
struct pin_desc *desc;
|
||||
|
||||
pin = pctldev->desc->pins[i].number;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#ifdef CONFIG_PINCONF
|
||||
|
||||
int pinconf_check_ops(const struct pinconf_ops *ops);
|
||||
int pinconf_check_ops(struct pinctrl_dev *pctldev);
|
||||
void pinconf_init_device_debugfs(struct dentry *devroot,
|
||||
struct pinctrl_dev *pctldev);
|
||||
int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin,
|
||||
@ -23,7 +23,7 @@ int pin_config_set_for_pin(struct pinctrl_dev *pctldev, unsigned pin,
|
||||
|
||||
#else
|
||||
|
||||
static inline int pinconf_check_ops(const struct pinconf_ops *ops)
|
||||
static inline int pinconf_check_ops(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -53,11 +53,6 @@ struct pinmux_group {
|
||||
* @dev: the device using this pinmux
|
||||
* @usecount: the number of active users of this mux setting, used to keep
|
||||
* track of nested use cases
|
||||
* @pins: an array of discrete physical pins used in this mapping, taken
|
||||
* from the global pin enumeration space (copied from pinmux map)
|
||||
* @num_pins: the number of pins in this mapping array, i.e. the number of
|
||||
* elements in .pins so we can iterate over that array (copied from
|
||||
* pinmux map)
|
||||
* @pctldev: pin control device handling this pinmux
|
||||
* @func_selector: the function selector for the pinmux device handling
|
||||
* this pinmux
|
||||
@ -152,8 +147,7 @@ static int pin_request(struct pinctrl_dev *pctldev,
|
||||
status = 0;
|
||||
|
||||
if (status)
|
||||
dev_err(pctldev->dev, "->request on device %s failed "
|
||||
"for pin %d\n",
|
||||
dev_err(pctldev->dev, "->request on device %s failed for pin %d\n",
|
||||
pctldev->desc->name, pin);
|
||||
out_free_pin:
|
||||
if (status) {
|
||||
@ -355,21 +349,20 @@ int __init pinmux_register_mappings(struct pinmux_map const *maps,
|
||||
/* First sanity check the new mapping */
|
||||
for (i = 0; i < num_maps; i++) {
|
||||
if (!maps[i].name) {
|
||||
pr_err("failed to register map %d: "
|
||||
"no map name given\n", i);
|
||||
pr_err("failed to register map %d: no map name given\n",
|
||||
i);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!maps[i].ctrl_dev && !maps[i].ctrl_dev_name) {
|
||||
pr_err("failed to register map %s (%d): "
|
||||
"no pin control device given\n",
|
||||
pr_err("failed to register map %s (%d): no pin control device given\n",
|
||||
maps[i].name, i);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!maps[i].function) {
|
||||
pr_err("failed to register map %s (%d): "
|
||||
"no function ID given\n", maps[i].name, i);
|
||||
pr_err("failed to register map %s (%d): no function ID given\n",
|
||||
maps[i].name, i);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -411,7 +404,7 @@ int __init pinmux_register_mappings(struct pinmux_map const *maps,
|
||||
}
|
||||
|
||||
/**
|
||||
* acquire_pins() - acquire all the pins for a certain funcion on a pinmux
|
||||
* acquire_pins() - acquire all the pins for a certain function on a pinmux
|
||||
* @pctldev: the device to take the pins on
|
||||
* @func_selector: the function selector to acquire the pins for
|
||||
* @group_selector: the group selector containing the pins to acquire
|
||||
@ -442,8 +435,7 @@ static int acquire_pins(struct pinctrl_dev *pctldev,
|
||||
ret = pin_request(pctldev, pins[i], func, NULL);
|
||||
if (ret) {
|
||||
dev_err(pctldev->dev,
|
||||
"could not get pin %d for function %s "
|
||||
"on device %s - conflicting mux mappings?\n",
|
||||
"could not get pin %d for function %s on device %s - conflicting mux mappings?\n",
|
||||
pins[i], func ? : "(undefined)",
|
||||
pinctrl_dev_get_name(pctldev));
|
||||
/* On error release all taken pins */
|
||||
@ -458,7 +450,7 @@ static int acquire_pins(struct pinctrl_dev *pctldev,
|
||||
|
||||
/**
|
||||
* release_pins() - release pins taken by earlier acquirement
|
||||
* @pctldev: the device to free the pinx on
|
||||
* @pctldev: the device to free the pins on
|
||||
* @group_selector: the group selector containing the pins to free
|
||||
*/
|
||||
static void release_pins(struct pinctrl_dev *pctldev,
|
||||
@ -473,8 +465,7 @@ static void release_pins(struct pinctrl_dev *pctldev,
|
||||
ret = pctlops->get_group_pins(pctldev, group_selector,
|
||||
&pins, &num_pins);
|
||||
if (ret) {
|
||||
dev_err(pctldev->dev, "could not get pins to release for "
|
||||
"group selector %d\n",
|
||||
dev_err(pctldev->dev, "could not get pins to release for group selector %d\n",
|
||||
group_selector);
|
||||
return;
|
||||
}
|
||||
@ -526,8 +517,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev,
|
||||
ret = pinctrl_get_group_selector(pctldev, groups[0]);
|
||||
if (ret < 0) {
|
||||
dev_err(pctldev->dev,
|
||||
"function %s wants group %s but the pin "
|
||||
"controller does not seem to have that group\n",
|
||||
"function %s wants group %s but the pin controller does not seem to have that group\n",
|
||||
pmxops->get_function_name(pctldev, func_selector),
|
||||
groups[0]);
|
||||
return ret;
|
||||
@ -535,8 +525,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev,
|
||||
|
||||
if (num_groups > 1)
|
||||
dev_dbg(pctldev->dev,
|
||||
"function %s support more than one group, "
|
||||
"default-selecting first group %s (%d)\n",
|
||||
"function %s support more than one group, default-selecting first group %s (%d)\n",
|
||||
pmxops->get_function_name(pctldev, func_selector),
|
||||
groups[0],
|
||||
ret);
|
||||
@ -628,10 +617,8 @@ static int pinmux_enable_muxmap(struct pinctrl_dev *pctldev,
|
||||
|
||||
if (pmx->pctldev && pmx->pctldev != pctldev) {
|
||||
dev_err(pctldev->dev,
|
||||
"different pin control devices given for device %s, "
|
||||
"function %s\n",
|
||||
devname,
|
||||
map->function);
|
||||
"different pin control devices given for device %s, function %s\n",
|
||||
devname, map->function);
|
||||
return -EINVAL;
|
||||
}
|
||||
pmx->dev = dev;
|
||||
@ -695,7 +682,6 @@ static void pinmux_free_groups(struct pinmux *pmx)
|
||||
*/
|
||||
struct pinmux *pinmux_get(struct device *dev, const char *name)
|
||||
{
|
||||
|
||||
struct pinmux_map const *map = NULL;
|
||||
struct pinctrl_dev *pctldev = NULL;
|
||||
const char *devname = NULL;
|
||||
@ -745,8 +731,7 @@ struct pinmux *pinmux_get(struct device *dev, const char *name)
|
||||
else if (map->ctrl_dev_name)
|
||||
devname = map->ctrl_dev_name;
|
||||
|
||||
pr_warning("could not find a pinctrl device for pinmux "
|
||||
"function %s, fishy, they shall all have one\n",
|
||||
pr_warning("could not find a pinctrl device for pinmux function %s, fishy, they shall all have one\n",
|
||||
map->function);
|
||||
pr_warning("given pinctrl device name: %s",
|
||||
devname ? devname : "UNDEFINED");
|
||||
@ -904,8 +889,11 @@ void pinmux_disable(struct pinmux *pmx)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pinmux_disable);
|
||||
|
||||
int pinmux_check_ops(const struct pinmux_ops *ops)
|
||||
int pinmux_check_ops(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
const struct pinmux_ops *ops = pctldev->desc->pmxops;
|
||||
unsigned selector = 0;
|
||||
|
||||
/* Check that we implement required operations */
|
||||
if (!ops->list_functions ||
|
||||
!ops->get_function_name ||
|
||||
@ -914,6 +902,18 @@ int pinmux_check_ops(const struct pinmux_ops *ops)
|
||||
!ops->disable)
|
||||
return -EINVAL;
|
||||
|
||||
/* Check that all functions registered have names */
|
||||
while (ops->list_functions(pctldev, selector) >= 0) {
|
||||
const char *fname = ops->get_function_name(pctldev,
|
||||
selector);
|
||||
if (!fname) {
|
||||
pr_err("pinmux ops has no name for function%u\n",
|
||||
selector);
|
||||
return -EINVAL;
|
||||
}
|
||||
selector++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -932,8 +932,8 @@ static int pinmux_hog_map(struct pinctrl_dev *pctldev,
|
||||
* without any problems, so then we can hog pinmuxes for
|
||||
* all devices that just want a static pin mux at this point.
|
||||
*/
|
||||
dev_err(pctldev->dev, "map %s wants to hog a non-system "
|
||||
"pinmux, this is not going to work\n", map->name);
|
||||
dev_err(pctldev->dev, "map %s wants to hog a non-system pinmux, this is not going to work\n",
|
||||
map->name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -993,9 +993,12 @@ int pinmux_hog_maps(struct pinctrl_dev *pctldev)
|
||||
for (i = 0; i < pinmux_maps_num; i++) {
|
||||
struct pinmux_map const *map = &pinmux_maps[i];
|
||||
|
||||
if (((map->ctrl_dev == dev) ||
|
||||
!strcmp(map->ctrl_dev_name, devname)) &&
|
||||
map->hog_on_boot) {
|
||||
if (!map->hog_on_boot)
|
||||
continue;
|
||||
|
||||
if ((map->ctrl_dev == dev) ||
|
||||
(map->ctrl_dev_name &&
|
||||
!strcmp(map->ctrl_dev_name, devname))) {
|
||||
/* OK time to hog! */
|
||||
ret = pinmux_hog_map(pctldev, map);
|
||||
if (ret)
|
||||
@ -1122,13 +1125,15 @@ static int pinmux_show(struct seq_file *s, void *what)
|
||||
|
||||
seq_printf(s, "device: %s function: %s (%u),",
|
||||
pinctrl_dev_get_name(pmx->pctldev),
|
||||
pmxops->get_function_name(pctldev, pmx->func_selector),
|
||||
pmxops->get_function_name(pctldev,
|
||||
pmx->func_selector),
|
||||
pmx->func_selector);
|
||||
|
||||
seq_printf(s, " groups: [");
|
||||
list_for_each_entry(grp, &pmx->groups, node) {
|
||||
seq_printf(s, " %s (%u)",
|
||||
pctlops->get_group_name(pctldev, grp->group_selector),
|
||||
pctlops->get_group_name(pctldev,
|
||||
grp->group_selector),
|
||||
grp->group_selector);
|
||||
}
|
||||
seq_printf(s, " ]");
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
#ifdef CONFIG_PINMUX
|
||||
|
||||
int pinmux_check_ops(const struct pinmux_ops *ops);
|
||||
int pinmux_check_ops(struct pinctrl_dev *pctldev);
|
||||
void pinmux_init_device_debugfs(struct dentry *devroot,
|
||||
struct pinctrl_dev *pctldev);
|
||||
void pinmux_init_debugfs(struct dentry *subsys_root);
|
||||
@ -21,7 +21,7 @@ void pinmux_unhog_maps(struct pinctrl_dev *pctldev);
|
||||
|
||||
#else
|
||||
|
||||
static inline int pinmux_check_ops(const struct pinmux_ops *ops)
|
||||
static inline int pinmux_check_ops(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ static void of_get_regulation_constraints(struct device_node *np,
|
||||
if (constraints->min_uV != constraints->max_uV)
|
||||
constraints->valid_ops_mask |= REGULATOR_CHANGE_VOLTAGE;
|
||||
/* Only one voltage? Then make sure it's set. */
|
||||
if (constraints->min_uV == constraints->max_uV)
|
||||
if (min_uV && max_uV && constraints->min_uV == constraints->max_uV)
|
||||
constraints->apply_uV = true;
|
||||
|
||||
uV_offset = of_get_property(np, "regulator-microvolt-offset", NULL);
|
||||
|
@ -3261,6 +3261,12 @@ void dasd_generic_path_event(struct ccw_device *cdev, int *path_event)
|
||||
device->path_data.tbvpm |= eventlpm;
|
||||
dasd_schedule_device_bh(device);
|
||||
}
|
||||
if (path_event[chp] & PE_PATHGROUP_ESTABLISHED) {
|
||||
DBF_DEV_EVENT(DBF_WARNING, device, "%s",
|
||||
"Pathgroup re-established\n");
|
||||
if (device->discipline->kick_validate)
|
||||
device->discipline->kick_validate(device);
|
||||
}
|
||||
}
|
||||
dasd_put_device(device);
|
||||
}
|
||||
|
@ -189,14 +189,12 @@ int dasd_alias_make_device_known_to_lcu(struct dasd_device *device)
|
||||
unsigned long flags;
|
||||
struct alias_server *server, *newserver;
|
||||
struct alias_lcu *lcu, *newlcu;
|
||||
int is_lcu_known;
|
||||
struct dasd_uid uid;
|
||||
|
||||
private = (struct dasd_eckd_private *) device->private;
|
||||
|
||||
device->discipline->get_uid(device, &uid);
|
||||
spin_lock_irqsave(&aliastree.lock, flags);
|
||||
is_lcu_known = 1;
|
||||
server = _find_server(&uid);
|
||||
if (!server) {
|
||||
spin_unlock_irqrestore(&aliastree.lock, flags);
|
||||
@ -208,7 +206,6 @@ int dasd_alias_make_device_known_to_lcu(struct dasd_device *device)
|
||||
if (!server) {
|
||||
list_add(&newserver->server, &aliastree.serverlist);
|
||||
server = newserver;
|
||||
is_lcu_known = 0;
|
||||
} else {
|
||||
/* someone was faster */
|
||||
_free_server(newserver);
|
||||
@ -226,12 +223,10 @@ int dasd_alias_make_device_known_to_lcu(struct dasd_device *device)
|
||||
if (!lcu) {
|
||||
list_add(&newlcu->lcu, &server->lculist);
|
||||
lcu = newlcu;
|
||||
is_lcu_known = 0;
|
||||
} else {
|
||||
/* someone was faster */
|
||||
_free_lcu(newlcu);
|
||||
}
|
||||
is_lcu_known = 0;
|
||||
}
|
||||
spin_lock(&lcu->lock);
|
||||
list_add(&device->alias_list, &lcu->inactive_devices);
|
||||
@ -239,64 +234,7 @@ int dasd_alias_make_device_known_to_lcu(struct dasd_device *device)
|
||||
spin_unlock(&lcu->lock);
|
||||
spin_unlock_irqrestore(&aliastree.lock, flags);
|
||||
|
||||
return is_lcu_known;
|
||||
}
|
||||
|
||||
/*
|
||||
* The first device to be registered on an LCU will have to do
|
||||
* some additional setup steps to configure that LCU on the
|
||||
* storage server. All further devices should wait with their
|
||||
* initialization until the first device is done.
|
||||
* To synchronize this work, the first device will call
|
||||
* dasd_alias_lcu_setup_complete when it is done, and all
|
||||
* other devices will wait for it with dasd_alias_wait_for_lcu_setup.
|
||||
*/
|
||||
void dasd_alias_lcu_setup_complete(struct dasd_device *device)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct alias_server *server;
|
||||
struct alias_lcu *lcu;
|
||||
struct dasd_uid uid;
|
||||
|
||||
device->discipline->get_uid(device, &uid);
|
||||
lcu = NULL;
|
||||
spin_lock_irqsave(&aliastree.lock, flags);
|
||||
server = _find_server(&uid);
|
||||
if (server)
|
||||
lcu = _find_lcu(server, &uid);
|
||||
spin_unlock_irqrestore(&aliastree.lock, flags);
|
||||
if (!lcu) {
|
||||
DBF_EVENT_DEVID(DBF_ERR, device->cdev,
|
||||
"could not find lcu for %04x %02x",
|
||||
uid.ssid, uid.real_unit_addr);
|
||||
WARN_ON(1);
|
||||
return;
|
||||
}
|
||||
complete_all(&lcu->lcu_setup);
|
||||
}
|
||||
|
||||
void dasd_alias_wait_for_lcu_setup(struct dasd_device *device)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct alias_server *server;
|
||||
struct alias_lcu *lcu;
|
||||
struct dasd_uid uid;
|
||||
|
||||
device->discipline->get_uid(device, &uid);
|
||||
lcu = NULL;
|
||||
spin_lock_irqsave(&aliastree.lock, flags);
|
||||
server = _find_server(&uid);
|
||||
if (server)
|
||||
lcu = _find_lcu(server, &uid);
|
||||
spin_unlock_irqrestore(&aliastree.lock, flags);
|
||||
if (!lcu) {
|
||||
DBF_EVENT_DEVID(DBF_ERR, device->cdev,
|
||||
"could not find lcu for %04x %02x",
|
||||
uid.ssid, uid.real_unit_addr);
|
||||
WARN_ON(1);
|
||||
return;
|
||||
}
|
||||
wait_for_completion(&lcu->lcu_setup);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1534,6 +1534,10 @@ static void dasd_eckd_validate_server(struct dasd_device *device)
|
||||
struct dasd_eckd_private *private;
|
||||
int enable_pav;
|
||||
|
||||
private = (struct dasd_eckd_private *) device->private;
|
||||
if (private->uid.type == UA_BASE_PAV_ALIAS ||
|
||||
private->uid.type == UA_HYPER_PAV_ALIAS)
|
||||
return;
|
||||
if (dasd_nopav || MACHINE_IS_VM)
|
||||
enable_pav = 0;
|
||||
else
|
||||
@ -1542,11 +1546,28 @@ static void dasd_eckd_validate_server(struct dasd_device *device)
|
||||
|
||||
/* may be requested feature is not available on server,
|
||||
* therefore just report error and go ahead */
|
||||
private = (struct dasd_eckd_private *) device->private;
|
||||
DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "PSF-SSC for SSID %04x "
|
||||
"returned rc=%d", private->uid.ssid, rc);
|
||||
}
|
||||
|
||||
/*
|
||||
* worker to do a validate server in case of a lost pathgroup
|
||||
*/
|
||||
static void dasd_eckd_do_validate_server(struct work_struct *work)
|
||||
{
|
||||
struct dasd_device *device = container_of(work, struct dasd_device,
|
||||
kick_validate);
|
||||
dasd_eckd_validate_server(device);
|
||||
dasd_put_device(device);
|
||||
}
|
||||
|
||||
static void dasd_eckd_kick_validate_server(struct dasd_device *device)
|
||||
{
|
||||
dasd_get_device(device);
|
||||
/* queue call to do_validate_server to the kernel event daemon. */
|
||||
schedule_work(&device->kick_validate);
|
||||
}
|
||||
|
||||
static u32 get_fcx_max_data(struct dasd_device *device)
|
||||
{
|
||||
#if defined(CONFIG_64BIT)
|
||||
@ -1588,10 +1609,13 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
|
||||
struct dasd_eckd_private *private;
|
||||
struct dasd_block *block;
|
||||
struct dasd_uid temp_uid;
|
||||
int is_known, rc, i;
|
||||
int rc, i;
|
||||
int readonly;
|
||||
unsigned long value;
|
||||
|
||||
/* setup work queue for validate server*/
|
||||
INIT_WORK(&device->kick_validate, dasd_eckd_do_validate_server);
|
||||
|
||||
if (!ccw_device_is_pathgroup(device->cdev)) {
|
||||
dev_warn(&device->cdev->dev,
|
||||
"A channel path group could not be established\n");
|
||||
@ -1651,22 +1675,12 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
|
||||
block->base = device;
|
||||
}
|
||||
|
||||
/* register lcu with alias handling, enable PAV if this is a new lcu */
|
||||
is_known = dasd_alias_make_device_known_to_lcu(device);
|
||||
if (is_known < 0) {
|
||||
rc = is_known;
|
||||
/* register lcu with alias handling, enable PAV */
|
||||
rc = dasd_alias_make_device_known_to_lcu(device);
|
||||
if (rc)
|
||||
goto out_err2;
|
||||
}
|
||||
/*
|
||||
* dasd_eckd_validate_server is done on the first device that
|
||||
* is found for an LCU. All later other devices have to wait
|
||||
* for it, so they will read the correct feature codes.
|
||||
*/
|
||||
if (!is_known) {
|
||||
dasd_eckd_validate_server(device);
|
||||
dasd_alias_lcu_setup_complete(device);
|
||||
} else
|
||||
dasd_alias_wait_for_lcu_setup(device);
|
||||
|
||||
dasd_eckd_validate_server(device);
|
||||
|
||||
/* device may report different configuration data after LCU setup */
|
||||
rc = dasd_eckd_read_conf(device);
|
||||
@ -4098,7 +4112,7 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
|
||||
{
|
||||
struct dasd_eckd_private *private;
|
||||
struct dasd_eckd_characteristics temp_rdc_data;
|
||||
int is_known, rc;
|
||||
int rc;
|
||||
struct dasd_uid temp_uid;
|
||||
unsigned long flags;
|
||||
|
||||
@ -4121,14 +4135,10 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
|
||||
goto out_err;
|
||||
|
||||
/* register lcu with alias handling, enable PAV if this is a new lcu */
|
||||
is_known = dasd_alias_make_device_known_to_lcu(device);
|
||||
if (is_known < 0)
|
||||
return is_known;
|
||||
if (!is_known) {
|
||||
dasd_eckd_validate_server(device);
|
||||
dasd_alias_lcu_setup_complete(device);
|
||||
} else
|
||||
dasd_alias_wait_for_lcu_setup(device);
|
||||
rc = dasd_alias_make_device_known_to_lcu(device);
|
||||
if (rc)
|
||||
return rc;
|
||||
dasd_eckd_validate_server(device);
|
||||
|
||||
/* RE-Read Configuration Data */
|
||||
rc = dasd_eckd_read_conf(device);
|
||||
@ -4270,6 +4280,7 @@ static struct dasd_discipline dasd_eckd_discipline = {
|
||||
.restore = dasd_eckd_restore_device,
|
||||
.reload = dasd_eckd_reload_device,
|
||||
.get_uid = dasd_eckd_get_uid,
|
||||
.kick_validate = dasd_eckd_kick_validate_server,
|
||||
};
|
||||
|
||||
static int __init
|
||||
|
@ -355,6 +355,7 @@ struct dasd_discipline {
|
||||
int (*reload) (struct dasd_device *);
|
||||
|
||||
int (*get_uid) (struct dasd_device *, struct dasd_uid *);
|
||||
void (*kick_validate) (struct dasd_device *);
|
||||
};
|
||||
|
||||
extern struct dasd_discipline *dasd_diag_discipline_pointer;
|
||||
@ -455,6 +456,7 @@ struct dasd_device {
|
||||
struct work_struct kick_work;
|
||||
struct work_struct restore_device;
|
||||
struct work_struct reload_device;
|
||||
struct work_struct kick_validate;
|
||||
struct timer_list timer;
|
||||
|
||||
debug_info_t *debug_area;
|
||||
|
280
drivers/tty/serial/8250/Kconfig
Normal file
280
drivers/tty/serial/8250/Kconfig
Normal file
@ -0,0 +1,280 @@
|
||||
#
|
||||
# The 8250/16550 serial drivers. You shouldn't be in this list unless
|
||||
# you somehow have an implicit or explicit dependency on SERIAL_8250.
|
||||
#
|
||||
|
||||
config SERIAL_8250
|
||||
tristate "8250/16550 and compatible serial support"
|
||||
select SERIAL_CORE
|
||||
---help---
|
||||
This selects whether you want to include the driver for the standard
|
||||
serial ports. The standard answer is Y. People who might say N
|
||||
here are those that are setting up dedicated Ethernet WWW/FTP
|
||||
servers, or users that have one of the various bus mice instead of a
|
||||
serial mouse and don't intend to use their machine's standard serial
|
||||
port for anything. (Note that the Cyclades and Stallion multi
|
||||
serial port drivers do not need this driver built in for them to
|
||||
work.)
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called 8250.
|
||||
[WARNING: Do not compile this driver as a module if you are using
|
||||
non-standard serial ports, since the configuration information will
|
||||
be lost when the driver is unloaded. This limitation may be lifted
|
||||
in the future.]
|
||||
|
||||
BTW1: If you have a mouseman serial mouse which is not recognized by
|
||||
the X window system, try running gpm first.
|
||||
|
||||
BTW2: If you intend to use a software modem (also called Winmodem)
|
||||
under Linux, forget it. These modems are crippled and require
|
||||
proprietary drivers which are only available under Windows.
|
||||
|
||||
Most people will say Y or M here, so that they can use serial mice,
|
||||
modems and similar devices connecting to the standard serial ports.
|
||||
|
||||
config SERIAL_8250_CONSOLE
|
||||
bool "Console on 8250/16550 and compatible serial port"
|
||||
depends on SERIAL_8250=y
|
||||
select SERIAL_CORE_CONSOLE
|
||||
---help---
|
||||
If you say Y here, it will be possible to use a serial port as the
|
||||
system console (the system console is the device which receives all
|
||||
kernel messages and warnings and which allows logins in single user
|
||||
mode). This could be useful if some terminal or printer is connected
|
||||
to that serial port.
|
||||
|
||||
Even if you say Y here, the currently visible virtual console
|
||||
(/dev/tty0) will still be used as the system console by default, but
|
||||
you can alter that using a kernel command line option such as
|
||||
"console=ttyS1". (Try "man bootparam" or see the documentation of
|
||||
your boot loader (grub or lilo or loadlin) about how to pass options
|
||||
to the kernel at boot time.)
|
||||
|
||||
If you don't have a VGA card installed and you say Y here, the
|
||||
kernel will automatically use the first serial line, /dev/ttyS0, as
|
||||
system console.
|
||||
|
||||
You can set that using a kernel command line option such as
|
||||
"console=uart8250,io,0x3f8,9600n8"
|
||||
"console=uart8250,mmio,0xff5e0000,115200n8".
|
||||
and it will switch to normal serial console when the corresponding
|
||||
port is ready.
|
||||
"earlycon=uart8250,io,0x3f8,9600n8"
|
||||
"earlycon=uart8250,mmio,0xff5e0000,115200n8".
|
||||
it will not only setup early console.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config FIX_EARLYCON_MEM
|
||||
bool
|
||||
depends on X86
|
||||
default y
|
||||
|
||||
config SERIAL_8250_GSC
|
||||
tristate
|
||||
depends on SERIAL_8250 && GSC
|
||||
default SERIAL_8250
|
||||
|
||||
config SERIAL_8250_PCI
|
||||
tristate "8250/16550 PCI device support" if EXPERT
|
||||
depends on SERIAL_8250 && PCI
|
||||
default SERIAL_8250
|
||||
help
|
||||
This builds standard PCI serial support. You may be able to
|
||||
disable this feature if you only need legacy serial support.
|
||||
Saves about 9K.
|
||||
|
||||
config SERIAL_8250_PNP
|
||||
tristate "8250/16550 PNP device support" if EXPERT
|
||||
depends on SERIAL_8250 && PNP
|
||||
default SERIAL_8250
|
||||
help
|
||||
This builds standard PNP serial support. You may be able to
|
||||
disable this feature if you only need legacy serial support.
|
||||
|
||||
config SERIAL_8250_HP300
|
||||
tristate
|
||||
depends on SERIAL_8250 && HP300
|
||||
default SERIAL_8250
|
||||
|
||||
config SERIAL_8250_CS
|
||||
tristate "8250/16550 PCMCIA device support"
|
||||
depends on PCMCIA && SERIAL_8250
|
||||
---help---
|
||||
Say Y here to enable support for 16-bit PCMCIA serial devices,
|
||||
including serial port cards, modems, and the modem functions of
|
||||
multi-function Ethernet/modem cards. (PCMCIA- or PC-cards are
|
||||
credit-card size devices often used with laptops.)
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called serial_cs.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config SERIAL_8250_NR_UARTS
|
||||
int "Maximum number of 8250/16550 serial ports"
|
||||
depends on SERIAL_8250
|
||||
default "4"
|
||||
help
|
||||
Set this to the number of serial ports you want the driver
|
||||
to support. This includes any ports discovered via ACPI or
|
||||
PCI enumeration and any ports that may be added at run-time
|
||||
via hot-plug, or any ISA multi-port serial cards.
|
||||
|
||||
config SERIAL_8250_RUNTIME_UARTS
|
||||
int "Number of 8250/16550 serial ports to register at runtime"
|
||||
depends on SERIAL_8250
|
||||
range 0 SERIAL_8250_NR_UARTS
|
||||
default "4"
|
||||
help
|
||||
Set this to the maximum number of serial ports you want
|
||||
the kernel to register at boot time. This can be overridden
|
||||
with the module parameter "nr_uarts", or boot-time parameter
|
||||
8250.nr_uarts
|
||||
|
||||
config SERIAL_8250_EXTENDED
|
||||
bool "Extended 8250/16550 serial driver options"
|
||||
depends on SERIAL_8250
|
||||
help
|
||||
If you wish to use any non-standard features of the standard "dumb"
|
||||
driver, say Y here. This includes HUB6 support, shared serial
|
||||
interrupts, special multiport support, support for more than the
|
||||
four COM 1/2/3/4 boards, etc.
|
||||
|
||||
Note that the answer to this question won't directly affect the
|
||||
kernel: saying N will just cause the configurator to skip all
|
||||
the questions about serial driver options. If unsure, say N.
|
||||
|
||||
config SERIAL_8250_MANY_PORTS
|
||||
bool "Support more than 4 legacy serial ports"
|
||||
depends on SERIAL_8250_EXTENDED && !IA64
|
||||
help
|
||||
Say Y here if you have dumb serial boards other than the four
|
||||
standard COM 1/2/3/4 ports. This may happen if you have an AST
|
||||
FourPort, Accent Async, Boca (read the Boca mini-HOWTO, available
|
||||
from <http://www.tldp.org/docs.html#howto>), or other custom
|
||||
serial port hardware which acts similar to standard serial port
|
||||
hardware. If you only use the standard COM 1/2/3/4 ports, you can
|
||||
say N here to save some memory. You can also say Y if you have an
|
||||
"intelligent" multiport card such as Cyclades, Digiboards, etc.
|
||||
|
||||
#
|
||||
# Multi-port serial cards
|
||||
#
|
||||
|
||||
config SERIAL_8250_FOURPORT
|
||||
tristate "Support Fourport cards"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
Say Y here if you have an AST FourPort serial board.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_fourport.
|
||||
|
||||
config SERIAL_8250_ACCENT
|
||||
tristate "Support Accent cards"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
Say Y here if you have an Accent Async serial board.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_accent.
|
||||
|
||||
config SERIAL_8250_BOCA
|
||||
tristate "Support Boca cards"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
Say Y here if you have a Boca serial board. Please read the Boca
|
||||
mini-HOWTO, available from <http://www.tldp.org/docs.html#howto>
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_boca.
|
||||
|
||||
config SERIAL_8250_EXAR_ST16C554
|
||||
tristate "Support Exar ST16C554/554D Quad UART"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
The Uplogix Envoy TU301 uses this Exar Quad UART. If you are
|
||||
tinkering with your Envoy TU301, or have a machine with this UART,
|
||||
say Y here.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_exar_st16c554.
|
||||
|
||||
config SERIAL_8250_HUB6
|
||||
tristate "Support Hub6 cards"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
Say Y here if you have a HUB6 serial board.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_hub6.
|
||||
|
||||
#
|
||||
# Misc. options/drivers.
|
||||
#
|
||||
|
||||
config SERIAL_8250_SHARE_IRQ
|
||||
bool "Support for sharing serial interrupts"
|
||||
depends on SERIAL_8250_EXTENDED
|
||||
help
|
||||
Some serial boards have hardware support which allows multiple dumb
|
||||
serial ports on the same board to share a single IRQ. To enable
|
||||
support for this in the serial driver, say Y here.
|
||||
|
||||
config SERIAL_8250_DETECT_IRQ
|
||||
bool "Autodetect IRQ on standard ports (unsafe)"
|
||||
depends on SERIAL_8250_EXTENDED
|
||||
help
|
||||
Say Y here if you want the kernel to try to guess which IRQ
|
||||
to use for your serial port.
|
||||
|
||||
This is considered unsafe; it is far better to configure the IRQ in
|
||||
a boot script using the setserial command.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config SERIAL_8250_RSA
|
||||
bool "Support RSA serial ports"
|
||||
depends on SERIAL_8250_EXTENDED
|
||||
help
|
||||
::: To be written :::
|
||||
|
||||
config SERIAL_8250_MCA
|
||||
tristate "Support 8250-type ports on MCA buses"
|
||||
depends on SERIAL_8250 != n && MCA
|
||||
help
|
||||
Say Y here if you have a MCA serial ports.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_mca.
|
||||
|
||||
config SERIAL_8250_ACORN
|
||||
tristate "Acorn expansion card serial port support"
|
||||
depends on ARCH_ACORN && SERIAL_8250
|
||||
help
|
||||
If you have an Atomwide Serial card or Serial Port card for an Acorn
|
||||
system, say Y to this option. The driver can handle 1, 2, or 3 port
|
||||
cards. If unsure, say N.
|
||||
|
||||
config SERIAL_8250_RM9K
|
||||
bool "Support for MIPS RM9xxx integrated serial port"
|
||||
depends on SERIAL_8250 != n && SERIAL_RM9000
|
||||
select SERIAL_8250_SHARE_IRQ
|
||||
help
|
||||
Selecting this option will add support for the integrated serial
|
||||
port hardware found on MIPS RM9122 and similar processors.
|
||||
If unsure, say N.
|
||||
|
||||
config SERIAL_8250_FSL
|
||||
bool
|
||||
depends on SERIAL_8250_CONSOLE && PPC_UDBG_16550
|
||||
default PPC
|
||||
|
||||
config SERIAL_8250_DW
|
||||
tristate "Support for Synopsys DesignWare 8250 quirks"
|
||||
depends on SERIAL_8250 && OF
|
||||
help
|
||||
Selecting this option will enable handling of the extra features
|
||||
present in the Synopsys DesignWare APB UART.
|
20
drivers/tty/serial/8250/Makefile
Normal file
20
drivers/tty/serial/8250/Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
#
|
||||
# Makefile for the 8250 serial device drivers.
|
||||
#
|
||||
|
||||
obj-$(CONFIG_SERIAL_8250) += 8250.o
|
||||
obj-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o
|
||||
obj-$(CONFIG_SERIAL_8250_GSC) += 8250_gsc.o
|
||||
obj-$(CONFIG_SERIAL_8250_PCI) += 8250_pci.o
|
||||
obj-$(CONFIG_SERIAL_8250_HP300) += 8250_hp300.o
|
||||
obj-$(CONFIG_SERIAL_8250_CS) += serial_cs.o
|
||||
obj-$(CONFIG_SERIAL_8250_ACORN) += 8250_acorn.o
|
||||
obj-$(CONFIG_SERIAL_8250_CONSOLE) += 8250_early.o
|
||||
obj-$(CONFIG_SERIAL_8250_FOURPORT) += 8250_fourport.o
|
||||
obj-$(CONFIG_SERIAL_8250_ACCENT) += 8250_accent.o
|
||||
obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o
|
||||
obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) += 8250_exar_st16c554.o
|
||||
obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
|
||||
obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
|
||||
obj-$(CONFIG_SERIAL_8250_FSL) += 8250_fsl.o
|
||||
obj-$(CONFIG_SERIAL_8250_DW) += 8250_dw.o
|
@ -5,279 +5,7 @@
|
||||
menu "Serial drivers"
|
||||
depends on HAS_IOMEM
|
||||
|
||||
#
|
||||
# The new 8250/16550 serial drivers
|
||||
config SERIAL_8250
|
||||
tristate "8250/16550 and compatible serial support"
|
||||
select SERIAL_CORE
|
||||
---help---
|
||||
This selects whether you want to include the driver for the standard
|
||||
serial ports. The standard answer is Y. People who might say N
|
||||
here are those that are setting up dedicated Ethernet WWW/FTP
|
||||
servers, or users that have one of the various bus mice instead of a
|
||||
serial mouse and don't intend to use their machine's standard serial
|
||||
port for anything. (Note that the Cyclades and Stallion multi
|
||||
serial port drivers do not need this driver built in for them to
|
||||
work.)
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called 8250.
|
||||
[WARNING: Do not compile this driver as a module if you are using
|
||||
non-standard serial ports, since the configuration information will
|
||||
be lost when the driver is unloaded. This limitation may be lifted
|
||||
in the future.]
|
||||
|
||||
BTW1: If you have a mouseman serial mouse which is not recognized by
|
||||
the X window system, try running gpm first.
|
||||
|
||||
BTW2: If you intend to use a software modem (also called Winmodem)
|
||||
under Linux, forget it. These modems are crippled and require
|
||||
proprietary drivers which are only available under Windows.
|
||||
|
||||
Most people will say Y or M here, so that they can use serial mice,
|
||||
modems and similar devices connecting to the standard serial ports.
|
||||
|
||||
config SERIAL_8250_CONSOLE
|
||||
bool "Console on 8250/16550 and compatible serial port"
|
||||
depends on SERIAL_8250=y
|
||||
select SERIAL_CORE_CONSOLE
|
||||
---help---
|
||||
If you say Y here, it will be possible to use a serial port as the
|
||||
system console (the system console is the device which receives all
|
||||
kernel messages and warnings and which allows logins in single user
|
||||
mode). This could be useful if some terminal or printer is connected
|
||||
to that serial port.
|
||||
|
||||
Even if you say Y here, the currently visible virtual console
|
||||
(/dev/tty0) will still be used as the system console by default, but
|
||||
you can alter that using a kernel command line option such as
|
||||
"console=ttyS1". (Try "man bootparam" or see the documentation of
|
||||
your boot loader (grub or lilo or loadlin) about how to pass options
|
||||
to the kernel at boot time.)
|
||||
|
||||
If you don't have a VGA card installed and you say Y here, the
|
||||
kernel will automatically use the first serial line, /dev/ttyS0, as
|
||||
system console.
|
||||
|
||||
You can set that using a kernel command line option such as
|
||||
"console=uart8250,io,0x3f8,9600n8"
|
||||
"console=uart8250,mmio,0xff5e0000,115200n8".
|
||||
and it will switch to normal serial console when the corresponding
|
||||
port is ready.
|
||||
"earlycon=uart8250,io,0x3f8,9600n8"
|
||||
"earlycon=uart8250,mmio,0xff5e0000,115200n8".
|
||||
it will not only setup early console.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config FIX_EARLYCON_MEM
|
||||
bool
|
||||
depends on X86
|
||||
default y
|
||||
|
||||
config SERIAL_8250_GSC
|
||||
tristate
|
||||
depends on SERIAL_8250 && GSC
|
||||
default SERIAL_8250
|
||||
|
||||
config SERIAL_8250_PCI
|
||||
tristate "8250/16550 PCI device support" if EXPERT
|
||||
depends on SERIAL_8250 && PCI
|
||||
default SERIAL_8250
|
||||
help
|
||||
This builds standard PCI serial support. You may be able to
|
||||
disable this feature if you only need legacy serial support.
|
||||
Saves about 9K.
|
||||
|
||||
config SERIAL_8250_PNP
|
||||
tristate "8250/16550 PNP device support" if EXPERT
|
||||
depends on SERIAL_8250 && PNP
|
||||
default SERIAL_8250
|
||||
help
|
||||
This builds standard PNP serial support. You may be able to
|
||||
disable this feature if you only need legacy serial support.
|
||||
|
||||
config SERIAL_8250_FSL
|
||||
bool
|
||||
depends on SERIAL_8250_CONSOLE && PPC_UDBG_16550
|
||||
default PPC
|
||||
|
||||
config SERIAL_8250_HP300
|
||||
tristate
|
||||
depends on SERIAL_8250 && HP300
|
||||
default SERIAL_8250
|
||||
|
||||
config SERIAL_8250_CS
|
||||
tristate "8250/16550 PCMCIA device support"
|
||||
depends on PCMCIA && SERIAL_8250
|
||||
---help---
|
||||
Say Y here to enable support for 16-bit PCMCIA serial devices,
|
||||
including serial port cards, modems, and the modem functions of
|
||||
multi-function Ethernet/modem cards. (PCMCIA- or PC-cards are
|
||||
credit-card size devices often used with laptops.)
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called serial_cs.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config SERIAL_8250_NR_UARTS
|
||||
int "Maximum number of 8250/16550 serial ports"
|
||||
depends on SERIAL_8250
|
||||
default "4"
|
||||
help
|
||||
Set this to the number of serial ports you want the driver
|
||||
to support. This includes any ports discovered via ACPI or
|
||||
PCI enumeration and any ports that may be added at run-time
|
||||
via hot-plug, or any ISA multi-port serial cards.
|
||||
|
||||
config SERIAL_8250_RUNTIME_UARTS
|
||||
int "Number of 8250/16550 serial ports to register at runtime"
|
||||
depends on SERIAL_8250
|
||||
range 0 SERIAL_8250_NR_UARTS
|
||||
default "4"
|
||||
help
|
||||
Set this to the maximum number of serial ports you want
|
||||
the kernel to register at boot time. This can be overridden
|
||||
with the module parameter "nr_uarts", or boot-time parameter
|
||||
8250.nr_uarts
|
||||
|
||||
config SERIAL_8250_EXTENDED
|
||||
bool "Extended 8250/16550 serial driver options"
|
||||
depends on SERIAL_8250
|
||||
help
|
||||
If you wish to use any non-standard features of the standard "dumb"
|
||||
driver, say Y here. This includes HUB6 support, shared serial
|
||||
interrupts, special multiport support, support for more than the
|
||||
four COM 1/2/3/4 boards, etc.
|
||||
|
||||
Note that the answer to this question won't directly affect the
|
||||
kernel: saying N will just cause the configurator to skip all
|
||||
the questions about serial driver options. If unsure, say N.
|
||||
|
||||
config SERIAL_8250_MANY_PORTS
|
||||
bool "Support more than 4 legacy serial ports"
|
||||
depends on SERIAL_8250_EXTENDED && !IA64
|
||||
help
|
||||
Say Y here if you have dumb serial boards other than the four
|
||||
standard COM 1/2/3/4 ports. This may happen if you have an AST
|
||||
FourPort, Accent Async, Boca (read the Boca mini-HOWTO, available
|
||||
from <http://www.tldp.org/docs.html#howto>), or other custom
|
||||
serial port hardware which acts similar to standard serial port
|
||||
hardware. If you only use the standard COM 1/2/3/4 ports, you can
|
||||
say N here to save some memory. You can also say Y if you have an
|
||||
"intelligent" multiport card such as Cyclades, Digiboards, etc.
|
||||
|
||||
#
|
||||
# Multi-port serial cards
|
||||
#
|
||||
|
||||
config SERIAL_8250_FOURPORT
|
||||
tristate "Support Fourport cards"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
Say Y here if you have an AST FourPort serial board.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_fourport.
|
||||
|
||||
config SERIAL_8250_ACCENT
|
||||
tristate "Support Accent cards"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
Say Y here if you have an Accent Async serial board.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_accent.
|
||||
|
||||
config SERIAL_8250_BOCA
|
||||
tristate "Support Boca cards"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
Say Y here if you have a Boca serial board. Please read the Boca
|
||||
mini-HOWTO, available from <http://www.tldp.org/docs.html#howto>
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_boca.
|
||||
|
||||
config SERIAL_8250_EXAR_ST16C554
|
||||
tristate "Support Exar ST16C554/554D Quad UART"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
The Uplogix Envoy TU301 uses this Exar Quad UART. If you are
|
||||
tinkering with your Envoy TU301, or have a machine with this UART,
|
||||
say Y here.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_exar_st16c554.
|
||||
|
||||
config SERIAL_8250_HUB6
|
||||
tristate "Support Hub6 cards"
|
||||
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
|
||||
help
|
||||
Say Y here if you have a HUB6 serial board.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_hub6.
|
||||
|
||||
config SERIAL_8250_SHARE_IRQ
|
||||
bool "Support for sharing serial interrupts"
|
||||
depends on SERIAL_8250_EXTENDED
|
||||
help
|
||||
Some serial boards have hardware support which allows multiple dumb
|
||||
serial ports on the same board to share a single IRQ. To enable
|
||||
support for this in the serial driver, say Y here.
|
||||
|
||||
config SERIAL_8250_DETECT_IRQ
|
||||
bool "Autodetect IRQ on standard ports (unsafe)"
|
||||
depends on SERIAL_8250_EXTENDED
|
||||
help
|
||||
Say Y here if you want the kernel to try to guess which IRQ
|
||||
to use for your serial port.
|
||||
|
||||
This is considered unsafe; it is far better to configure the IRQ in
|
||||
a boot script using the setserial command.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config SERIAL_8250_RSA
|
||||
bool "Support RSA serial ports"
|
||||
depends on SERIAL_8250_EXTENDED
|
||||
help
|
||||
::: To be written :::
|
||||
|
||||
config SERIAL_8250_MCA
|
||||
tristate "Support 8250-type ports on MCA buses"
|
||||
depends on SERIAL_8250 != n && MCA
|
||||
help
|
||||
Say Y here if you have a MCA serial ports.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 8250_mca.
|
||||
|
||||
config SERIAL_8250_ACORN
|
||||
tristate "Acorn expansion card serial port support"
|
||||
depends on ARCH_ACORN && SERIAL_8250
|
||||
help
|
||||
If you have an Atomwide Serial card or Serial Port card for an Acorn
|
||||
system, say Y to this option. The driver can handle 1, 2, or 3 port
|
||||
cards. If unsure, say N.
|
||||
|
||||
config SERIAL_8250_RM9K
|
||||
bool "Support for MIPS RM9xxx integrated serial port"
|
||||
depends on SERIAL_8250 != n && SERIAL_RM9000
|
||||
select SERIAL_8250_SHARE_IRQ
|
||||
help
|
||||
Selecting this option will add support for the integrated serial
|
||||
port hardware found on MIPS RM9122 and similar processors.
|
||||
If unsure, say N.
|
||||
|
||||
config SERIAL_8250_DW
|
||||
tristate "Support for Synopsys DesignWare 8250 quirks"
|
||||
depends on SERIAL_8250 && OF
|
||||
help
|
||||
Selecting this option will enable handling of the extra features
|
||||
present in the Synopsys DesignWare APB UART.
|
||||
source "drivers/tty/serial/8250/Kconfig"
|
||||
|
||||
comment "Non-8250 serial port support"
|
||||
|
||||
@ -536,15 +264,6 @@ config SERIAL_MAX3107
|
||||
help
|
||||
MAX3107 chip support
|
||||
|
||||
config SERIAL_MAX3107_AAVA
|
||||
tristate "MAX3107 AAVA platform support"
|
||||
depends on X86_MRST && SERIAL_MAX3107 && GPIOLIB
|
||||
select SERIAL_CORE
|
||||
help
|
||||
Support for the MAX3107 chip configuration found on the AAVA
|
||||
platform. Includes the extra initialisation and GPIO support
|
||||
neded for this device.
|
||||
|
||||
config SERIAL_DZ
|
||||
bool "DECstation DZ serial driver"
|
||||
depends on MACH_DECSTATION && 32BIT
|
||||
|
@ -14,22 +14,9 @@ obj-$(CONFIG_SERIAL_SUNZILOG) += sunzilog.o
|
||||
obj-$(CONFIG_SERIAL_SUNSU) += sunsu.o
|
||||
obj-$(CONFIG_SERIAL_SUNSAB) += sunsab.o
|
||||
|
||||
obj-$(CONFIG_SERIAL_8250) += 8250.o
|
||||
obj-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o
|
||||
obj-$(CONFIG_SERIAL_8250_GSC) += 8250_gsc.o
|
||||
obj-$(CONFIG_SERIAL_8250_PCI) += 8250_pci.o
|
||||
obj-$(CONFIG_SERIAL_8250_HP300) += 8250_hp300.o
|
||||
obj-$(CONFIG_SERIAL_8250_CS) += serial_cs.o
|
||||
obj-$(CONFIG_SERIAL_8250_ACORN) += 8250_acorn.o
|
||||
obj-$(CONFIG_SERIAL_8250_CONSOLE) += 8250_early.o
|
||||
obj-$(CONFIG_SERIAL_8250_FOURPORT) += 8250_fourport.o
|
||||
obj-$(CONFIG_SERIAL_8250_ACCENT) += 8250_accent.o
|
||||
obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o
|
||||
obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) += 8250_exar_st16c554.o
|
||||
obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
|
||||
obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
|
||||
obj-$(CONFIG_SERIAL_8250_FSL) += 8250_fsl.o
|
||||
obj-$(CONFIG_SERIAL_8250_DW) += 8250_dw.o
|
||||
# Now bring in any enabled 8250/16450/16550 type drivers.
|
||||
obj-$(CONFIG_SERIAL_8250) += 8250/
|
||||
|
||||
obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
|
||||
obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
|
||||
obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
|
||||
@ -42,7 +29,6 @@ obj-$(CONFIG_SERIAL_BFIN_SPORT) += bfin_sport_uart.o
|
||||
obj-$(CONFIG_SERIAL_SAMSUNG) += samsung.o
|
||||
obj-$(CONFIG_SERIAL_MAX3100) += max3100.o
|
||||
obj-$(CONFIG_SERIAL_MAX3107) += max3107.o
|
||||
obj-$(CONFIG_SERIAL_MAX3107_AAVA) += max3107-aava.o
|
||||
obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o
|
||||
obj-$(CONFIG_SERIAL_MUX) += mux.o
|
||||
obj-$(CONFIG_SERIAL_68328) += 68328serial.o
|
||||
|
@ -159,6 +159,7 @@ struct uart_amba_port {
|
||||
unsigned int fifosize; /* vendor-specific */
|
||||
unsigned int lcrh_tx; /* vendor-specific */
|
||||
unsigned int lcrh_rx; /* vendor-specific */
|
||||
unsigned int old_cr; /* state during shutdown */
|
||||
bool autorts;
|
||||
char type[12];
|
||||
bool interrupt_may_hang; /* vendor-specific */
|
||||
@ -1411,7 +1412,9 @@ static int pl011_startup(struct uart_port *port)
|
||||
while (readw(uap->port.membase + UART01x_FR) & UART01x_FR_BUSY)
|
||||
barrier();
|
||||
|
||||
cr = UART01x_CR_UARTEN | UART011_CR_RXE | UART011_CR_TXE;
|
||||
/* restore RTS and DTR */
|
||||
cr = uap->old_cr & (UART011_CR_RTS | UART011_CR_DTR);
|
||||
cr |= UART01x_CR_UARTEN | UART011_CR_RXE | UART011_CR_TXE;
|
||||
writew(cr, uap->port.membase + UART011_CR);
|
||||
|
||||
/* Clear pending error interrupts */
|
||||
@ -1469,6 +1472,7 @@ static void pl011_shutdown_channel(struct uart_amba_port *uap,
|
||||
static void pl011_shutdown(struct uart_port *port)
|
||||
{
|
||||
struct uart_amba_port *uap = (struct uart_amba_port *)port;
|
||||
unsigned int cr;
|
||||
|
||||
/*
|
||||
* disable all interrupts
|
||||
@ -1488,9 +1492,16 @@ static void pl011_shutdown(struct uart_port *port)
|
||||
|
||||
/*
|
||||
* disable the port
|
||||
* disable the port. It should not disable RTS and DTR.
|
||||
* Also RTS and DTR state should be preserved to restore
|
||||
* it during startup().
|
||||
*/
|
||||
uap->autorts = false;
|
||||
writew(UART01x_CR_UARTEN | UART011_CR_TXE, uap->port.membase + UART011_CR);
|
||||
cr = readw(uap->port.membase + UART011_CR);
|
||||
uap->old_cr = cr;
|
||||
cr &= UART011_CR_RTS | UART011_CR_DTR;
|
||||
cr |= UART01x_CR_UARTEN | UART011_CR_TXE;
|
||||
writew(cr, uap->port.membase + UART011_CR);
|
||||
|
||||
/*
|
||||
* disable break condition and fifos
|
||||
@ -1740,9 +1751,19 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
|
||||
{
|
||||
struct uart_amba_port *uap = amba_ports[co->index];
|
||||
unsigned int status, old_cr, new_cr;
|
||||
unsigned long flags;
|
||||
int locked = 1;
|
||||
|
||||
clk_enable(uap->clk);
|
||||
|
||||
local_irq_save(flags);
|
||||
if (uap->port.sysrq)
|
||||
locked = 0;
|
||||
else if (oops_in_progress)
|
||||
locked = spin_trylock(&uap->port.lock);
|
||||
else
|
||||
spin_lock(&uap->port.lock);
|
||||
|
||||
/*
|
||||
* First save the CR then disable the interrupts
|
||||
*/
|
||||
@ -1762,6 +1783,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
|
||||
} while (status & UART01x_FR_BUSY);
|
||||
writew(old_cr, uap->port.membase + UART011_CR);
|
||||
|
||||
if (locked)
|
||||
spin_unlock(&uap->port.lock);
|
||||
local_irq_restore(flags);
|
||||
|
||||
clk_disable(uap->clk);
|
||||
}
|
||||
|
||||
@ -1905,6 +1930,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
|
||||
uap->vendor = vendor;
|
||||
uap->lcrh_rx = vendor->lcrh_rx;
|
||||
uap->lcrh_tx = vendor->lcrh_tx;
|
||||
uap->old_cr = 0;
|
||||
uap->fifosize = vendor->fifosize;
|
||||
uap->interrupt_may_hang = vendor->interrupt_may_hang;
|
||||
uap->port.dev = &dev->dev;
|
||||
|
@ -251,6 +251,7 @@ static void jsm_io_resume(struct pci_dev *pdev)
|
||||
struct jsm_board *brd = pci_get_drvdata(pdev);
|
||||
|
||||
pci_restore_state(pdev);
|
||||
pci_save_state(pdev);
|
||||
|
||||
jsm_uart_port_init(brd);
|
||||
}
|
||||
|
@ -1,344 +0,0 @@
|
||||
/*
|
||||
* max3107.c - spi uart protocol driver for Maxim 3107
|
||||
* Based on max3100.c
|
||||
* by Christian Pellegrin <chripell@evolware.org>
|
||||
* and max3110.c
|
||||
* by Feng Tang <feng.tang@intel.com>
|
||||
*
|
||||
* Copyright (C) Aavamobile 2009
|
||||
*
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/freezer.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/sfi.h>
|
||||
#include <linux/module.h>
|
||||
#include <asm/mrst.h>
|
||||
#include "max3107.h"
|
||||
|
||||
/* GPIO direction to input function */
|
||||
static int max3107_gpio_direction_in(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct max3107_port *s = container_of(chip, struct max3107_port, chip);
|
||||
u16 buf[1]; /* Buffer for SPI transfer */
|
||||
|
||||
if (offset >= MAX3107_GPIO_COUNT) {
|
||||
dev_err(&s->spi->dev, "Invalid GPIO\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Read current GPIO configuration register */
|
||||
buf[0] = MAX3107_GPIOCFG_REG;
|
||||
/* Perform SPI transfer */
|
||||
if (max3107_rw(s, (u8 *)buf, (u8 *)buf, 2)) {
|
||||
dev_err(&s->spi->dev, "SPI transfer GPIO read failed\n");
|
||||
return -EIO;
|
||||
}
|
||||
buf[0] &= MAX3107_SPI_RX_DATA_MASK;
|
||||
|
||||
/* Set GPIO to input */
|
||||
buf[0] &= ~(0x0001 << offset);
|
||||
|
||||
/* Write new GPIO configuration register value */
|
||||
buf[0] |= (MAX3107_WRITE_BIT | MAX3107_GPIOCFG_REG);
|
||||
/* Perform SPI transfer */
|
||||
if (max3107_rw(s, (u8 *)buf, NULL, 2)) {
|
||||
dev_err(&s->spi->dev, "SPI transfer GPIO write failed\n");
|
||||
return -EIO;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* GPIO direction to output function */
|
||||
static int max3107_gpio_direction_out(struct gpio_chip *chip, unsigned offset,
|
||||
int value)
|
||||
{
|
||||
struct max3107_port *s = container_of(chip, struct max3107_port, chip);
|
||||
u16 buf[2]; /* Buffer for SPI transfers */
|
||||
|
||||
if (offset >= MAX3107_GPIO_COUNT) {
|
||||
dev_err(&s->spi->dev, "Invalid GPIO\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Read current GPIO configuration and data registers */
|
||||
buf[0] = MAX3107_GPIOCFG_REG;
|
||||
buf[1] = MAX3107_GPIODATA_REG;
|
||||
/* Perform SPI transfer */
|
||||
if (max3107_rw(s, (u8 *)buf, (u8 *)buf, 4)) {
|
||||
dev_err(&s->spi->dev, "SPI transfer gpio failed\n");
|
||||
return -EIO;
|
||||
}
|
||||
buf[0] &= MAX3107_SPI_RX_DATA_MASK;
|
||||
buf[1] &= MAX3107_SPI_RX_DATA_MASK;
|
||||
|
||||
/* Set GPIO to output */
|
||||
buf[0] |= (0x0001 << offset);
|
||||
/* Set value */
|
||||
if (value)
|
||||
buf[1] |= (0x0001 << offset);
|
||||
else
|
||||
buf[1] &= ~(0x0001 << offset);
|
||||
|
||||
/* Write new GPIO configuration and data register values */
|
||||
buf[0] |= (MAX3107_WRITE_BIT | MAX3107_GPIOCFG_REG);
|
||||
buf[1] |= (MAX3107_WRITE_BIT | MAX3107_GPIODATA_REG);
|
||||
/* Perform SPI transfer */
|
||||
if (max3107_rw(s, (u8 *)buf, NULL, 4)) {
|
||||
dev_err(&s->spi->dev,
|
||||
"SPI transfer for GPIO conf data w failed\n");
|
||||
return -EIO;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* GPIO value query function */
|
||||
static int max3107_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct max3107_port *s = container_of(chip, struct max3107_port, chip);
|
||||
u16 buf[1]; /* Buffer for SPI transfer */
|
||||
|
||||
if (offset >= MAX3107_GPIO_COUNT) {
|
||||
dev_err(&s->spi->dev, "Invalid GPIO\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Read current GPIO data register */
|
||||
buf[0] = MAX3107_GPIODATA_REG;
|
||||
/* Perform SPI transfer */
|
||||
if (max3107_rw(s, (u8 *)buf, (u8 *)buf, 2)) {
|
||||
dev_err(&s->spi->dev, "SPI transfer GPIO data r failed\n");
|
||||
return -EIO;
|
||||
}
|
||||
buf[0] &= MAX3107_SPI_RX_DATA_MASK;
|
||||
|
||||
/* Return value */
|
||||
return buf[0] & (0x0001 << offset);
|
||||
}
|
||||
|
||||
/* GPIO value set function */
|
||||
static void max3107_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
||||
{
|
||||
struct max3107_port *s = container_of(chip, struct max3107_port, chip);
|
||||
u16 buf[2]; /* Buffer for SPI transfers */
|
||||
|
||||
if (offset >= MAX3107_GPIO_COUNT) {
|
||||
dev_err(&s->spi->dev, "Invalid GPIO\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Read current GPIO configuration registers*/
|
||||
buf[0] = MAX3107_GPIODATA_REG;
|
||||
buf[1] = MAX3107_GPIOCFG_REG;
|
||||
/* Perform SPI transfer */
|
||||
if (max3107_rw(s, (u8 *)buf, (u8 *)buf, 4)) {
|
||||
dev_err(&s->spi->dev,
|
||||
"SPI transfer for GPIO data and config read failed\n");
|
||||
return;
|
||||
}
|
||||
buf[0] &= MAX3107_SPI_RX_DATA_MASK;
|
||||
buf[1] &= MAX3107_SPI_RX_DATA_MASK;
|
||||
|
||||
if (!(buf[1] & (0x0001 << offset))) {
|
||||
/* Configured as input, can't set value */
|
||||
dev_warn(&s->spi->dev,
|
||||
"Trying to set value for input GPIO\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Set value */
|
||||
if (value)
|
||||
buf[0] |= (0x0001 << offset);
|
||||
else
|
||||
buf[0] &= ~(0x0001 << offset);
|
||||
|
||||
/* Write new GPIO data register value */
|
||||
buf[0] |= (MAX3107_WRITE_BIT | MAX3107_GPIODATA_REG);
|
||||
/* Perform SPI transfer */
|
||||
if (max3107_rw(s, (u8 *)buf, NULL, 2))
|
||||
dev_err(&s->spi->dev, "SPI transfer GPIO data w failed\n");
|
||||
}
|
||||
|
||||
/* GPIO chip data */
|
||||
static struct gpio_chip max3107_gpio_chip = {
|
||||
.owner = THIS_MODULE,
|
||||
.direction_input = max3107_gpio_direction_in,
|
||||
.direction_output = max3107_gpio_direction_out,
|
||||
.get = max3107_gpio_get,
|
||||
.set = max3107_gpio_set,
|
||||
.can_sleep = 1,
|
||||
.base = MAX3107_GPIO_BASE,
|
||||
.ngpio = MAX3107_GPIO_COUNT,
|
||||
};
|
||||
|
||||
/**
|
||||
* max3107_aava_reset - reset on AAVA systems
|
||||
* @spi: The SPI device we are probing
|
||||
*
|
||||
* Reset the device ready for probing.
|
||||
*/
|
||||
|
||||
static int max3107_aava_reset(struct spi_device *spi)
|
||||
{
|
||||
/* Reset the chip */
|
||||
if (gpio_request(MAX3107_RESET_GPIO, "max3107")) {
|
||||
pr_err("Requesting RESET GPIO failed\n");
|
||||
return -EIO;
|
||||
}
|
||||
if (gpio_direction_output(MAX3107_RESET_GPIO, 0)) {
|
||||
pr_err("Setting RESET GPIO to 0 failed\n");
|
||||
gpio_free(MAX3107_RESET_GPIO);
|
||||
return -EIO;
|
||||
}
|
||||
msleep(MAX3107_RESET_DELAY);
|
||||
if (gpio_direction_output(MAX3107_RESET_GPIO, 1)) {
|
||||
pr_err("Setting RESET GPIO to 1 failed\n");
|
||||
gpio_free(MAX3107_RESET_GPIO);
|
||||
return -EIO;
|
||||
}
|
||||
gpio_free(MAX3107_RESET_GPIO);
|
||||
msleep(MAX3107_WAKEUP_DELAY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int max3107_aava_configure(struct max3107_port *s)
|
||||
{
|
||||
int retval;
|
||||
|
||||
/* Initialize GPIO chip data */
|
||||
s->chip = max3107_gpio_chip;
|
||||
s->chip.label = s->spi->modalias;
|
||||
s->chip.dev = &s->spi->dev;
|
||||
|
||||
/* Add GPIO chip */
|
||||
retval = gpiochip_add(&s->chip);
|
||||
if (retval) {
|
||||
dev_err(&s->spi->dev, "Adding GPIO chip failed\n");
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Temporary fix for EV2 boot problems, set modem reset to 0 */
|
||||
max3107_gpio_direction_out(&s->chip, 3, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* This will get enabled once we have the board stuff merged for this
|
||||
specific case */
|
||||
|
||||
static const struct baud_table brg13_ext[] = {
|
||||
{ 300, MAX3107_BRG13_B300 },
|
||||
{ 600, MAX3107_BRG13_B600 },
|
||||
{ 1200, MAX3107_BRG13_B1200 },
|
||||
{ 2400, MAX3107_BRG13_B2400 },
|
||||
{ 4800, MAX3107_BRG13_B4800 },
|
||||
{ 9600, MAX3107_BRG13_B9600 },
|
||||
{ 19200, MAX3107_BRG13_B19200 },
|
||||
{ 57600, MAX3107_BRG13_B57600 },
|
||||
{ 115200, MAX3107_BRG13_B115200 },
|
||||
{ 230400, MAX3107_BRG13_B230400 },
|
||||
{ 460800, MAX3107_BRG13_B460800 },
|
||||
{ 921600, MAX3107_BRG13_B921600 },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static void max3107_aava_init(struct max3107_port *s)
|
||||
{
|
||||
/*override for AAVA SC specific*/
|
||||
if (mrst_platform_id() == MRST_PLATFORM_AAVA_SC) {
|
||||
if (get_koski_build_id() <= KOSKI_EV2)
|
||||
if (s->ext_clk) {
|
||||
s->brg_cfg = MAX3107_BRG13_B9600;
|
||||
s->baud_tbl = (struct baud_table *)brg13_ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int __devexit max3107_aava_remove(struct spi_device *spi)
|
||||
{
|
||||
struct max3107_port *s = dev_get_drvdata(&spi->dev);
|
||||
|
||||
/* Remove GPIO chip */
|
||||
if (gpiochip_remove(&s->chip))
|
||||
dev_warn(&spi->dev, "Removing GPIO chip failed\n");
|
||||
|
||||
/* Then do the default remove */
|
||||
return max3107_remove(spi);
|
||||
}
|
||||
|
||||
/* Platform data */
|
||||
static struct max3107_plat aava_plat_data = {
|
||||
.loopback = 0,
|
||||
.ext_clk = 1,
|
||||
/* .init = max3107_aava_init, */
|
||||
.configure = max3107_aava_configure,
|
||||
.hw_suspend = max3107_hw_susp,
|
||||
.polled_mode = 0,
|
||||
.poll_time = 0,
|
||||
};
|
||||
|
||||
|
||||
static int __devinit max3107_probe_aava(struct spi_device *spi)
|
||||
{
|
||||
int err = max3107_aava_reset(spi);
|
||||
if (err < 0)
|
||||
return err;
|
||||
return max3107_probe(spi, &aava_plat_data);
|
||||
}
|
||||
|
||||
/* Spi driver data */
|
||||
static struct spi_driver max3107_driver = {
|
||||
.driver = {
|
||||
.name = "aava-max3107",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = max3107_probe_aava,
|
||||
.remove = __devexit_p(max3107_aava_remove),
|
||||
.suspend = max3107_suspend,
|
||||
.resume = max3107_resume,
|
||||
};
|
||||
|
||||
/* Driver init function */
|
||||
static int __init max3107_init(void)
|
||||
{
|
||||
return spi_register_driver(&max3107_driver);
|
||||
}
|
||||
|
||||
/* Driver exit function */
|
||||
static void __exit max3107_exit(void)
|
||||
{
|
||||
spi_unregister_driver(&max3107_driver);
|
||||
}
|
||||
|
||||
module_init(max3107_init);
|
||||
module_exit(max3107_exit);
|
||||
|
||||
MODULE_DESCRIPTION("MAX3107 driver");
|
||||
MODULE_AUTHOR("Aavamobile");
|
||||
MODULE_ALIAS("spi:aava-max3107");
|
||||
MODULE_LICENSE("GPL v2");
|
@ -1160,7 +1160,7 @@ static struct uart_driver serial_omap_reg = {
|
||||
.cons = OMAP_CONSOLE,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int serial_omap_suspend(struct device *dev)
|
||||
{
|
||||
struct uart_omap_port *up = dev_get_drvdata(dev);
|
||||
@ -1521,6 +1521,7 @@ static void serial_omap_mdr1_errataset(struct uart_omap_port *up, u8 mdr1)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
static void serial_omap_restore_context(struct uart_omap_port *up)
|
||||
{
|
||||
if (up->errata & UART_ERRATA_i202_MDR1_ACCESS)
|
||||
@ -1550,7 +1551,6 @@ static void serial_omap_restore_context(struct uart_omap_port *up)
|
||||
serial_out(up, UART_OMAP_MDR1, up->mdr1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
static int serial_omap_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct uart_omap_port *up = dev_get_drvdata(dev);
|
||||
|
@ -2348,11 +2348,11 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
|
||||
*/
|
||||
tty_dev = tty_register_device(drv->tty_driver, uport->line, uport->dev);
|
||||
if (likely(!IS_ERR(tty_dev))) {
|
||||
device_init_wakeup(tty_dev, 1);
|
||||
device_set_wakeup_enable(tty_dev, 0);
|
||||
} else
|
||||
device_set_wakeup_capable(tty_dev, 1);
|
||||
} else {
|
||||
printk(KERN_ERR "Cannot register tty device on line %d\n",
|
||||
uport->line);
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure UPF_DEAD is not set.
|
||||
|
@ -227,7 +227,6 @@ int tty_port_block_til_ready(struct tty_port *port,
|
||||
int do_clocal = 0, retval;
|
||||
unsigned long flags;
|
||||
DEFINE_WAIT(wait);
|
||||
int cd;
|
||||
|
||||
/* block if port is in the process of being closed */
|
||||
if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
|
||||
@ -284,11 +283,14 @@ int tty_port_block_til_ready(struct tty_port *port,
|
||||
retval = -ERESTARTSYS;
|
||||
break;
|
||||
}
|
||||
/* Probe the carrier. For devices with no carrier detect this
|
||||
will always return true */
|
||||
cd = tty_port_carrier_raised(port);
|
||||
/*
|
||||
* Probe the carrier. For devices with no carrier detect
|
||||
* tty_port_carrier_raised will always return true.
|
||||
* Never ask drivers if CLOCAL is set, this causes troubles
|
||||
* on some hardware.
|
||||
*/
|
||||
if (!(port->flags & ASYNC_CLOSING) &&
|
||||
(do_clocal || cd))
|
||||
(do_clocal || tty_port_carrier_raised(port)))
|
||||
break;
|
||||
if (signal_pending(current)) {
|
||||
retval = -ERESTARTSYS;
|
||||
|
@ -57,6 +57,8 @@ MODULE_DEVICE_TABLE (usb, wdm_ids);
|
||||
|
||||
#define WDM_MAX 16
|
||||
|
||||
/* CDC-WMC r1.1 requires wMaxCommand to be "at least 256 decimal (0x100)" */
|
||||
#define WDM_DEFAULT_BUFSIZE 256
|
||||
|
||||
static DEFINE_MUTEX(wdm_mutex);
|
||||
|
||||
@ -88,7 +90,8 @@ struct wdm_device {
|
||||
int count;
|
||||
dma_addr_t shandle;
|
||||
dma_addr_t ihandle;
|
||||
struct mutex lock;
|
||||
struct mutex wlock;
|
||||
struct mutex rlock;
|
||||
wait_queue_head_t wait;
|
||||
struct work_struct rxwork;
|
||||
int werr;
|
||||
@ -323,7 +326,7 @@ static ssize_t wdm_write
|
||||
}
|
||||
|
||||
/* concurrent writes and disconnect */
|
||||
r = mutex_lock_interruptible(&desc->lock);
|
||||
r = mutex_lock_interruptible(&desc->wlock);
|
||||
rv = -ERESTARTSYS;
|
||||
if (r) {
|
||||
kfree(buf);
|
||||
@ -386,7 +389,7 @@ static ssize_t wdm_write
|
||||
out:
|
||||
usb_autopm_put_interface(desc->intf);
|
||||
outnp:
|
||||
mutex_unlock(&desc->lock);
|
||||
mutex_unlock(&desc->wlock);
|
||||
outnl:
|
||||
return rv < 0 ? rv : count;
|
||||
}
|
||||
@ -399,7 +402,7 @@ static ssize_t wdm_read
|
||||
struct wdm_device *desc = file->private_data;
|
||||
|
||||
|
||||
rv = mutex_lock_interruptible(&desc->lock); /*concurrent reads */
|
||||
rv = mutex_lock_interruptible(&desc->rlock); /*concurrent reads */
|
||||
if (rv < 0)
|
||||
return -ERESTARTSYS;
|
||||
|
||||
@ -467,14 +470,16 @@ retry:
|
||||
for (i = 0; i < desc->length - cntr; i++)
|
||||
desc->ubuf[i] = desc->ubuf[i + cntr];
|
||||
|
||||
spin_lock_irq(&desc->iuspin);
|
||||
desc->length -= cntr;
|
||||
spin_unlock_irq(&desc->iuspin);
|
||||
/* in case we had outstanding data */
|
||||
if (!desc->length)
|
||||
clear_bit(WDM_READ, &desc->flags);
|
||||
rv = cntr;
|
||||
|
||||
err:
|
||||
mutex_unlock(&desc->lock);
|
||||
mutex_unlock(&desc->rlock);
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -540,7 +545,8 @@ static int wdm_open(struct inode *inode, struct file *file)
|
||||
}
|
||||
intf->needs_remote_wakeup = 1;
|
||||
|
||||
mutex_lock(&desc->lock);
|
||||
/* using write lock to protect desc->count */
|
||||
mutex_lock(&desc->wlock);
|
||||
if (!desc->count++) {
|
||||
desc->werr = 0;
|
||||
desc->rerr = 0;
|
||||
@ -553,7 +559,7 @@ static int wdm_open(struct inode *inode, struct file *file)
|
||||
} else {
|
||||
rv = 0;
|
||||
}
|
||||
mutex_unlock(&desc->lock);
|
||||
mutex_unlock(&desc->wlock);
|
||||
usb_autopm_put_interface(desc->intf);
|
||||
out:
|
||||
mutex_unlock(&wdm_mutex);
|
||||
@ -565,9 +571,11 @@ static int wdm_release(struct inode *inode, struct file *file)
|
||||
struct wdm_device *desc = file->private_data;
|
||||
|
||||
mutex_lock(&wdm_mutex);
|
||||
mutex_lock(&desc->lock);
|
||||
|
||||
/* using write lock to protect desc->count */
|
||||
mutex_lock(&desc->wlock);
|
||||
desc->count--;
|
||||
mutex_unlock(&desc->lock);
|
||||
mutex_unlock(&desc->wlock);
|
||||
|
||||
if (!desc->count) {
|
||||
dev_dbg(&desc->intf->dev, "wdm_release: cleanup");
|
||||
@ -630,7 +638,7 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||
struct usb_cdc_dmm_desc *dmhd;
|
||||
u8 *buffer = intf->altsetting->extra;
|
||||
int buflen = intf->altsetting->extralen;
|
||||
u16 maxcom = 0;
|
||||
u16 maxcom = WDM_DEFAULT_BUFSIZE;
|
||||
|
||||
if (!buffer)
|
||||
goto out;
|
||||
@ -665,7 +673,8 @@ next_desc:
|
||||
desc = kzalloc(sizeof(struct wdm_device), GFP_KERNEL);
|
||||
if (!desc)
|
||||
goto out;
|
||||
mutex_init(&desc->lock);
|
||||
mutex_init(&desc->rlock);
|
||||
mutex_init(&desc->wlock);
|
||||
spin_lock_init(&desc->iuspin);
|
||||
init_waitqueue_head(&desc->wait);
|
||||
desc->wMaxCommand = maxcom;
|
||||
@ -716,7 +725,7 @@ next_desc:
|
||||
goto err;
|
||||
|
||||
desc->inbuf = usb_alloc_coherent(interface_to_usbdev(intf),
|
||||
desc->bMaxPacketSize0,
|
||||
desc->wMaxCommand,
|
||||
GFP_KERNEL,
|
||||
&desc->response->transfer_dma);
|
||||
if (!desc->inbuf)
|
||||
@ -779,11 +788,13 @@ static void wdm_disconnect(struct usb_interface *intf)
|
||||
/* to terminate pending flushes */
|
||||
clear_bit(WDM_IN_USE, &desc->flags);
|
||||
spin_unlock_irqrestore(&desc->iuspin, flags);
|
||||
mutex_lock(&desc->lock);
|
||||
wake_up_all(&desc->wait);
|
||||
mutex_lock(&desc->rlock);
|
||||
mutex_lock(&desc->wlock);
|
||||
kill_urbs(desc);
|
||||
cancel_work_sync(&desc->rxwork);
|
||||
mutex_unlock(&desc->lock);
|
||||
wake_up_all(&desc->wait);
|
||||
mutex_unlock(&desc->wlock);
|
||||
mutex_unlock(&desc->rlock);
|
||||
if (!desc->count)
|
||||
cleanup(desc);
|
||||
mutex_unlock(&wdm_mutex);
|
||||
@ -798,8 +809,10 @@ static int wdm_suspend(struct usb_interface *intf, pm_message_t message)
|
||||
dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor);
|
||||
|
||||
/* if this is an autosuspend the caller does the locking */
|
||||
if (!PMSG_IS_AUTO(message))
|
||||
mutex_lock(&desc->lock);
|
||||
if (!PMSG_IS_AUTO(message)) {
|
||||
mutex_lock(&desc->rlock);
|
||||
mutex_lock(&desc->wlock);
|
||||
}
|
||||
spin_lock_irq(&desc->iuspin);
|
||||
|
||||
if (PMSG_IS_AUTO(message) &&
|
||||
@ -815,8 +828,10 @@ static int wdm_suspend(struct usb_interface *intf, pm_message_t message)
|
||||
kill_urbs(desc);
|
||||
cancel_work_sync(&desc->rxwork);
|
||||
}
|
||||
if (!PMSG_IS_AUTO(message))
|
||||
mutex_unlock(&desc->lock);
|
||||
if (!PMSG_IS_AUTO(message)) {
|
||||
mutex_unlock(&desc->wlock);
|
||||
mutex_unlock(&desc->rlock);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
@ -854,7 +869,8 @@ static int wdm_pre_reset(struct usb_interface *intf)
|
||||
{
|
||||
struct wdm_device *desc = usb_get_intfdata(intf);
|
||||
|
||||
mutex_lock(&desc->lock);
|
||||
mutex_lock(&desc->rlock);
|
||||
mutex_lock(&desc->wlock);
|
||||
kill_urbs(desc);
|
||||
|
||||
/*
|
||||
@ -876,7 +892,8 @@ static int wdm_post_reset(struct usb_interface *intf)
|
||||
int rv;
|
||||
|
||||
rv = recover_from_urb_loss(desc);
|
||||
mutex_unlock(&desc->lock);
|
||||
mutex_unlock(&desc->wlock);
|
||||
mutex_unlock(&desc->rlock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,6 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,
|
||||
struct dwc3_request *req)
|
||||
{
|
||||
struct dwc3 *dwc = dep->dwc;
|
||||
u32 type;
|
||||
int ret = 0;
|
||||
|
||||
req->request.actual = 0;
|
||||
@ -149,20 +148,14 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,
|
||||
|
||||
direction = !!(dep->flags & DWC3_EP0_DIR_IN);
|
||||
|
||||
if (dwc->ep0state == EP0_STATUS_PHASE) {
|
||||
type = dwc->three_stage_setup
|
||||
? DWC3_TRBCTL_CONTROL_STATUS3
|
||||
: DWC3_TRBCTL_CONTROL_STATUS2;
|
||||
} else if (dwc->ep0state == EP0_DATA_PHASE) {
|
||||
type = DWC3_TRBCTL_CONTROL_DATA;
|
||||
} else {
|
||||
/* should never happen */
|
||||
WARN_ON(1);
|
||||
if (dwc->ep0state != EP0_DATA_PHASE) {
|
||||
dev_WARN(dwc->dev, "Unexpected pending request\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = dwc3_ep0_start_trans(dwc, direction,
|
||||
req->request.dma, req->request.length, type);
|
||||
req->request.dma, req->request.length,
|
||||
DWC3_TRBCTL_CONTROL_DATA);
|
||||
dep->flags &= ~(DWC3_EP_PENDING_REQUEST |
|
||||
DWC3_EP0_DIR_IN);
|
||||
} else if (dwc->delayed_status) {
|
||||
|
@ -101,7 +101,7 @@ void dwc3_unmap_buffer_from_dma(struct dwc3_request *req)
|
||||
if (req->request.num_mapped_sgs) {
|
||||
req->request.dma = DMA_ADDR_INVALID;
|
||||
dma_unmap_sg(dwc->dev, req->request.sg,
|
||||
req->request.num_sgs,
|
||||
req->request.num_mapped_sgs,
|
||||
req->direction ? DMA_TO_DEVICE
|
||||
: DMA_FROM_DEVICE);
|
||||
|
||||
|
@ -175,13 +175,12 @@ ep_found:
|
||||
_ep->comp_desc = comp_desc;
|
||||
if (g->speed == USB_SPEED_SUPER) {
|
||||
switch (usb_endpoint_type(_ep->desc)) {
|
||||
case USB_ENDPOINT_XFER_BULK:
|
||||
case USB_ENDPOINT_XFER_INT:
|
||||
_ep->maxburst = comp_desc->bMaxBurst;
|
||||
break;
|
||||
case USB_ENDPOINT_XFER_ISOC:
|
||||
/* mult: bits 1:0 of bmAttributes */
|
||||
_ep->mult = comp_desc->bmAttributes & 0x3;
|
||||
case USB_ENDPOINT_XFER_BULK:
|
||||
case USB_ENDPOINT_XFER_INT:
|
||||
_ep->maxburst = comp_desc->bMaxBurst;
|
||||
break;
|
||||
default:
|
||||
/* Do nothing for control endpoints */
|
||||
|
@ -126,7 +126,7 @@ ep_matches (
|
||||
* descriptor and see if the EP matches it
|
||||
*/
|
||||
if (usb_endpoint_xfer_bulk(desc)) {
|
||||
if (ep_comp) {
|
||||
if (ep_comp && gadget->max_speed >= USB_SPEED_SUPER) {
|
||||
num_req_streams = ep_comp->bmAttributes & 0x1f;
|
||||
if (num_req_streams > ep->max_streams)
|
||||
return 0;
|
||||
|
@ -3123,15 +3123,15 @@ fsg_add(struct usb_composite_dev *cdev, struct usb_configuration *c,
|
||||
|
||||
struct fsg_module_parameters {
|
||||
char *file[FSG_MAX_LUNS];
|
||||
int ro[FSG_MAX_LUNS];
|
||||
int removable[FSG_MAX_LUNS];
|
||||
int cdrom[FSG_MAX_LUNS];
|
||||
int nofua[FSG_MAX_LUNS];
|
||||
bool ro[FSG_MAX_LUNS];
|
||||
bool removable[FSG_MAX_LUNS];
|
||||
bool cdrom[FSG_MAX_LUNS];
|
||||
bool nofua[FSG_MAX_LUNS];
|
||||
|
||||
unsigned int file_count, ro_count, removable_count, cdrom_count;
|
||||
unsigned int nofua_count;
|
||||
unsigned int luns; /* nluns */
|
||||
int stall; /* can_stall */
|
||||
bool stall; /* can_stall */
|
||||
};
|
||||
|
||||
#define _FSG_MODULE_PARAM_ARRAY(prefix, params, name, type, desc) \
|
||||
|
@ -1430,7 +1430,7 @@ static void setup_received_irq(struct fsl_udc *udc,
|
||||
int pipe = get_pipe_by_windex(wIndex);
|
||||
struct fsl_ep *ep;
|
||||
|
||||
if (wValue != 0 || wLength != 0 || pipe > udc->max_ep)
|
||||
if (wValue != 0 || wLength != 0 || pipe >= udc->max_ep)
|
||||
break;
|
||||
ep = get_ep_by_pipe(udc, pipe);
|
||||
|
||||
@ -1673,7 +1673,7 @@ static void dtd_complete_irq(struct fsl_udc *udc)
|
||||
if (!bit_pos)
|
||||
return;
|
||||
|
||||
for (i = 0; i < udc->max_ep * 2; i++) {
|
||||
for (i = 0; i < udc->max_ep; i++) {
|
||||
ep_num = i >> 1;
|
||||
direction = i % 2;
|
||||
|
||||
|
@ -11,11 +11,6 @@
|
||||
/* #undef DEBUG */
|
||||
/* #undef VERBOSE_DEBUG */
|
||||
|
||||
#if defined(CONFIG_USB_LANGWELL_OTG)
|
||||
#define OTG_TRANSCEIVER
|
||||
#endif
|
||||
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
@ -1522,8 +1517,7 @@ static void langwell_udc_stop(struct langwell_udc *dev)
|
||||
|
||||
|
||||
/* stop all USB activities */
|
||||
static void stop_activity(struct langwell_udc *dev,
|
||||
struct usb_gadget_driver *driver)
|
||||
static void stop_activity(struct langwell_udc *dev)
|
||||
{
|
||||
struct langwell_ep *ep;
|
||||
dev_dbg(&dev->pdev->dev, "---> %s()\n", __func__);
|
||||
@ -1535,9 +1529,9 @@ static void stop_activity(struct langwell_udc *dev,
|
||||
}
|
||||
|
||||
/* report disconnect; the driver is already quiesced */
|
||||
if (driver) {
|
||||
if (dev->driver) {
|
||||
spin_unlock(&dev->lock);
|
||||
driver->disconnect(&dev->gadget);
|
||||
dev->driver->disconnect(&dev->gadget);
|
||||
spin_lock(&dev->lock);
|
||||
}
|
||||
|
||||
@ -1925,11 +1919,10 @@ static int langwell_stop(struct usb_gadget *g,
|
||||
|
||||
/* stop all usb activities */
|
||||
dev->gadget.speed = USB_SPEED_UNKNOWN;
|
||||
stop_activity(dev, driver);
|
||||
spin_unlock_irqrestore(&dev->lock, flags);
|
||||
|
||||
dev->gadget.dev.driver = NULL;
|
||||
dev->driver = NULL;
|
||||
stop_activity(dev);
|
||||
spin_unlock_irqrestore(&dev->lock, flags);
|
||||
|
||||
device_remove_file(&dev->pdev->dev, &dev_attr_function);
|
||||
|
||||
@ -2315,13 +2308,9 @@ static void handle_setup_packet(struct langwell_udc *dev,
|
||||
|
||||
if (!gadget_is_otg(&dev->gadget))
|
||||
break;
|
||||
else if (setup->bRequest == USB_DEVICE_B_HNP_ENABLE) {
|
||||
else if (setup->bRequest == USB_DEVICE_B_HNP_ENABLE)
|
||||
dev->gadget.b_hnp_enable = 1;
|
||||
#ifdef OTG_TRANSCEIVER
|
||||
if (!dev->lotg->otg.default_a)
|
||||
dev->lotg->hsm.b_hnp_enable = 1;
|
||||
#endif
|
||||
} else if (setup->bRequest == USB_DEVICE_A_HNP_SUPPORT)
|
||||
else if (setup->bRequest == USB_DEVICE_A_HNP_SUPPORT)
|
||||
dev->gadget.a_hnp_support = 1;
|
||||
else if (setup->bRequest ==
|
||||
USB_DEVICE_A_ALT_HNP_SUPPORT)
|
||||
@ -2733,7 +2722,7 @@ static void handle_usb_reset(struct langwell_udc *dev)
|
||||
dev->bus_reset = 1;
|
||||
|
||||
/* reset all the queues, stop all USB activities */
|
||||
stop_activity(dev, dev->driver);
|
||||
stop_activity(dev);
|
||||
dev->usb_state = USB_STATE_DEFAULT;
|
||||
} else {
|
||||
dev_vdbg(&dev->pdev->dev, "device controller reset\n");
|
||||
@ -2741,7 +2730,7 @@ static void handle_usb_reset(struct langwell_udc *dev)
|
||||
langwell_udc_reset(dev);
|
||||
|
||||
/* reset all the queues, stop all USB activities */
|
||||
stop_activity(dev, dev->driver);
|
||||
stop_activity(dev);
|
||||
|
||||
/* reset ep0 dQH and endptctrl */
|
||||
ep0_reset(dev);
|
||||
@ -2752,12 +2741,6 @@ static void handle_usb_reset(struct langwell_udc *dev)
|
||||
dev->usb_state = USB_STATE_ATTACHED;
|
||||
}
|
||||
|
||||
#ifdef OTG_TRANSCEIVER
|
||||
/* refer to USB OTG 6.6.2.3 b_hnp_en is cleared */
|
||||
if (!dev->lotg->otg.default_a)
|
||||
dev->lotg->hsm.b_hnp_enable = 0;
|
||||
#endif
|
||||
|
||||
dev_vdbg(&dev->pdev->dev, "<--- %s()\n", __func__);
|
||||
}
|
||||
|
||||
@ -2770,29 +2753,6 @@ static void handle_bus_suspend(struct langwell_udc *dev)
|
||||
dev->resume_state = dev->usb_state;
|
||||
dev->usb_state = USB_STATE_SUSPENDED;
|
||||
|
||||
#ifdef OTG_TRANSCEIVER
|
||||
if (dev->lotg->otg.default_a) {
|
||||
if (dev->lotg->hsm.b_bus_suspend_vld == 1) {
|
||||
dev->lotg->hsm.b_bus_suspend = 1;
|
||||
/* notify transceiver the state changes */
|
||||
if (spin_trylock(&dev->lotg->wq_lock)) {
|
||||
langwell_update_transceiver();
|
||||
spin_unlock(&dev->lotg->wq_lock);
|
||||
}
|
||||
}
|
||||
dev->lotg->hsm.b_bus_suspend_vld++;
|
||||
} else {
|
||||
if (!dev->lotg->hsm.a_bus_suspend) {
|
||||
dev->lotg->hsm.a_bus_suspend = 1;
|
||||
/* notify transceiver the state changes */
|
||||
if (spin_trylock(&dev->lotg->wq_lock)) {
|
||||
langwell_update_transceiver();
|
||||
spin_unlock(&dev->lotg->wq_lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* report suspend to the driver */
|
||||
if (dev->driver) {
|
||||
if (dev->driver->suspend) {
|
||||
@ -2823,11 +2783,6 @@ static void handle_bus_resume(struct langwell_udc *dev)
|
||||
if (dev->pdev->device != 0x0829)
|
||||
langwell_phy_low_power(dev, 0);
|
||||
|
||||
#ifdef OTG_TRANSCEIVER
|
||||
if (dev->lotg->otg.default_a == 0)
|
||||
dev->lotg->hsm.a_bus_suspend = 0;
|
||||
#endif
|
||||
|
||||
/* report resume to the driver */
|
||||
if (dev->driver) {
|
||||
if (dev->driver->resume) {
|
||||
@ -3020,7 +2975,6 @@ static void langwell_udc_remove(struct pci_dev *pdev)
|
||||
|
||||
dev->done = &done;
|
||||
|
||||
#ifndef OTG_TRANSCEIVER
|
||||
/* free dTD dma_pool and dQH */
|
||||
if (dev->dtd_pool)
|
||||
dma_pool_destroy(dev->dtd_pool);
|
||||
@ -3032,7 +2986,6 @@ static void langwell_udc_remove(struct pci_dev *pdev)
|
||||
/* release SRAM caching */
|
||||
if (dev->has_sram && dev->got_sram)
|
||||
sram_deinit(dev);
|
||||
#endif
|
||||
|
||||
if (dev->status_req) {
|
||||
kfree(dev->status_req->req.buf);
|
||||
@ -3045,7 +2998,6 @@ static void langwell_udc_remove(struct pci_dev *pdev)
|
||||
if (dev->got_irq)
|
||||
free_irq(pdev->irq, dev);
|
||||
|
||||
#ifndef OTG_TRANSCEIVER
|
||||
if (dev->cap_regs)
|
||||
iounmap(dev->cap_regs);
|
||||
|
||||
@ -3055,13 +3007,6 @@ static void langwell_udc_remove(struct pci_dev *pdev)
|
||||
|
||||
if (dev->enabled)
|
||||
pci_disable_device(pdev);
|
||||
#else
|
||||
if (dev->transceiver) {
|
||||
otg_put_transceiver(dev->transceiver);
|
||||
dev->transceiver = NULL;
|
||||
dev->lotg = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
dev->cap_regs = NULL;
|
||||
|
||||
@ -3072,9 +3017,7 @@ static void langwell_udc_remove(struct pci_dev *pdev)
|
||||
device_remove_file(&pdev->dev, &dev_attr_langwell_udc);
|
||||
device_remove_file(&pdev->dev, &dev_attr_remote_wakeup);
|
||||
|
||||
#ifndef OTG_TRANSCEIVER
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
#endif
|
||||
|
||||
/* free dev, wait for the release() finished */
|
||||
wait_for_completion(&done);
|
||||
@ -3089,9 +3032,7 @@ static int langwell_udc_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
struct langwell_udc *dev;
|
||||
#ifndef OTG_TRANSCEIVER
|
||||
unsigned long resource, len;
|
||||
#endif
|
||||
void __iomem *base = NULL;
|
||||
size_t size;
|
||||
int retval;
|
||||
@ -3109,16 +3050,6 @@ static int langwell_udc_probe(struct pci_dev *pdev,
|
||||
dev->pdev = pdev;
|
||||
dev_dbg(&dev->pdev->dev, "---> %s()\n", __func__);
|
||||
|
||||
#ifdef OTG_TRANSCEIVER
|
||||
/* PCI device is already enabled by otg_transceiver driver */
|
||||
dev->enabled = 1;
|
||||
|
||||
/* mem region and register base */
|
||||
dev->region = 1;
|
||||
dev->transceiver = otg_get_transceiver();
|
||||
dev->lotg = otg_to_langwell(dev->transceiver);
|
||||
base = dev->lotg->regs;
|
||||
#else
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
/* now all the pci goodies ... */
|
||||
@ -3139,7 +3070,6 @@ static int langwell_udc_probe(struct pci_dev *pdev,
|
||||
dev->region = 1;
|
||||
|
||||
base = ioremap_nocache(resource, len);
|
||||
#endif
|
||||
if (base == NULL) {
|
||||
dev_err(&dev->pdev->dev, "can't map memory\n");
|
||||
retval = -EFAULT;
|
||||
@ -3163,7 +3093,6 @@ static int langwell_udc_probe(struct pci_dev *pdev,
|
||||
dev->got_sram = 0;
|
||||
dev_vdbg(&dev->pdev->dev, "dev->has_sram: %d\n", dev->has_sram);
|
||||
|
||||
#ifndef OTG_TRANSCEIVER
|
||||
/* enable SRAM caching if detected */
|
||||
if (dev->has_sram && !dev->got_sram)
|
||||
sram_init(dev);
|
||||
@ -3182,7 +3111,6 @@ static int langwell_udc_probe(struct pci_dev *pdev,
|
||||
goto error;
|
||||
}
|
||||
dev->got_irq = 1;
|
||||
#endif
|
||||
|
||||
/* set stopped bit */
|
||||
dev->stopped = 1;
|
||||
@ -3257,10 +3185,8 @@ static int langwell_udc_probe(struct pci_dev *pdev,
|
||||
dev->remote_wakeup = 0;
|
||||
dev->dev_status = 1 << USB_DEVICE_SELF_POWERED;
|
||||
|
||||
#ifndef OTG_TRANSCEIVER
|
||||
/* reset device controller */
|
||||
langwell_udc_reset(dev);
|
||||
#endif
|
||||
|
||||
/* initialize gadget structure */
|
||||
dev->gadget.ops = &langwell_ops; /* usb_gadget_ops */
|
||||
@ -3268,9 +3194,6 @@ static int langwell_udc_probe(struct pci_dev *pdev,
|
||||
INIT_LIST_HEAD(&dev->gadget.ep_list); /* ep_list */
|
||||
dev->gadget.speed = USB_SPEED_UNKNOWN; /* speed */
|
||||
dev->gadget.max_speed = USB_SPEED_HIGH; /* support dual speed */
|
||||
#ifdef OTG_TRANSCEIVER
|
||||
dev->gadget.is_otg = 1; /* support otg mode */
|
||||
#endif
|
||||
|
||||
/* the "gadget" abstracts/virtualizes the controller */
|
||||
dev_set_name(&dev->gadget.dev, "gadget");
|
||||
@ -3282,10 +3205,8 @@ static int langwell_udc_probe(struct pci_dev *pdev,
|
||||
/* controller endpoints reinit */
|
||||
eps_reinit(dev);
|
||||
|
||||
#ifndef OTG_TRANSCEIVER
|
||||
/* reset ep0 dQH and endptctrl */
|
||||
ep0_reset(dev);
|
||||
#endif
|
||||
|
||||
/* create dTD dma_pool resource */
|
||||
dev->dtd_pool = dma_pool_create("langwell_dtd",
|
||||
@ -3367,7 +3288,7 @@ static int langwell_udc_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
|
||||
spin_lock_irq(&dev->lock);
|
||||
/* stop all usb activities */
|
||||
stop_activity(dev, dev->driver);
|
||||
stop_activity(dev);
|
||||
spin_unlock_irq(&dev->lock);
|
||||
|
||||
/* free dTD dma_pool and dQH */
|
||||
@ -3525,22 +3446,14 @@ static struct pci_driver langwell_pci_driver = {
|
||||
|
||||
static int __init init(void)
|
||||
{
|
||||
#ifdef OTG_TRANSCEIVER
|
||||
return langwell_register_peripheral(&langwell_pci_driver);
|
||||
#else
|
||||
return pci_register_driver(&langwell_pci_driver);
|
||||
#endif
|
||||
}
|
||||
module_init(init);
|
||||
|
||||
|
||||
static void __exit cleanup(void)
|
||||
{
|
||||
#ifdef OTG_TRANSCEIVER
|
||||
return langwell_unregister_peripheral(&langwell_pci_driver);
|
||||
#else
|
||||
pci_unregister_driver(&langwell_pci_driver);
|
||||
#endif
|
||||
}
|
||||
module_exit(cleanup);
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
#include <linux/usb/langwell_udc.h>
|
||||
#include <linux/usb/langwell_otg.h>
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -598,16 +598,16 @@ static __maybe_unused struct usb_ss_cap_descriptor fsg_ss_cap_desc = {
|
||||
| USB_5GBPS_OPERATION),
|
||||
.bFunctionalitySupport = USB_LOW_SPEED_OPERATION,
|
||||
.bU1devExitLat = USB_DEFAULT_U1_DEV_EXIT_LAT,
|
||||
.bU2DevExitLat = USB_DEFAULT_U2_DEV_EXIT_LAT,
|
||||
.bU2DevExitLat = cpu_to_le16(USB_DEFAULT_U2_DEV_EXIT_LAT),
|
||||
};
|
||||
|
||||
static __maybe_unused struct usb_bos_descriptor fsg_bos_desc = {
|
||||
.bLength = USB_DT_BOS_SIZE,
|
||||
.bDescriptorType = USB_DT_BOS,
|
||||
|
||||
.wTotalLength = USB_DT_BOS_SIZE
|
||||
.wTotalLength = cpu_to_le16(USB_DT_BOS_SIZE
|
||||
+ USB_DT_USB_EXT_CAP_SIZE
|
||||
+ USB_DT_USB_SS_CAP_SIZE,
|
||||
+ USB_DT_USB_SS_CAP_SIZE),
|
||||
|
||||
.bNumDeviceCaps = 2,
|
||||
};
|
||||
|
@ -125,7 +125,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
|
||||
*/
|
||||
if (pdata->init && pdata->init(pdev)) {
|
||||
retval = -ENODEV;
|
||||
goto err3;
|
||||
goto err4;
|
||||
}
|
||||
|
||||
/* Enable USB controller, 83xx or 8536 */
|
||||
|
@ -276,6 +276,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
|
||||
|
||||
/* Serial Bus Release Number is at PCI 0x60 offset */
|
||||
pci_read_config_byte(pdev, 0x60, &ehci->sbrn);
|
||||
if (pdev->vendor == PCI_VENDOR_ID_STMICRO
|
||||
&& pdev->device == PCI_DEVICE_ID_STMICRO_USB_HOST)
|
||||
ehci->sbrn = 0x20; /* ConneXT has no sbrn register */
|
||||
|
||||
/* Keep this around for a while just in case some EHCI
|
||||
* implementation uses legacy PCI PM support. This test
|
||||
@ -526,6 +529,9 @@ static const struct pci_device_id pci_ids [] = { {
|
||||
/* handle any USB 2.0 EHCI controller */
|
||||
PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_EHCI, ~0),
|
||||
.driver_data = (unsigned long) &ehci_pci_hc_driver,
|
||||
}, {
|
||||
PCI_VDEVICE(STMICRO, PCI_DEVICE_ID_STMICRO_USB_HOST),
|
||||
.driver_data = (unsigned long) &ehci_pci_hc_driver,
|
||||
},
|
||||
{ /* end: all zeroes */ }
|
||||
};
|
||||
|
@ -82,6 +82,14 @@ urb_print(struct urb * urb, char * str, int small, int status)
|
||||
ohci_dbg(ohci,format, ## arg ); \
|
||||
} while (0);
|
||||
|
||||
/* Version for use where "next" is the address of a local variable */
|
||||
#define ohci_dbg_nosw(ohci, next, size, format, arg...) \
|
||||
do { \
|
||||
unsigned s_len; \
|
||||
s_len = scnprintf(*next, *size, format, ## arg); \
|
||||
*size -= s_len; *next += s_len; \
|
||||
} while (0);
|
||||
|
||||
|
||||
static void ohci_dump_intr_mask (
|
||||
struct ohci_hcd *ohci,
|
||||
@ -653,7 +661,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
|
||||
|
||||
/* dump driver info, then registers in spec order */
|
||||
|
||||
ohci_dbg_sw (ohci, &next, &size,
|
||||
ohci_dbg_nosw(ohci, &next, &size,
|
||||
"bus %s, device %s\n"
|
||||
"%s\n"
|
||||
"%s\n",
|
||||
@ -672,7 +680,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
|
||||
|
||||
/* hcca */
|
||||
if (ohci->hcca)
|
||||
ohci_dbg_sw (ohci, &next, &size,
|
||||
ohci_dbg_nosw(ohci, &next, &size,
|
||||
"hcca frame 0x%04x\n", ohci_frame_no(ohci));
|
||||
|
||||
/* other registers mostly affect frame timings */
|
||||
|
@ -397,6 +397,10 @@ static const struct pci_device_id pci_ids [] = { {
|
||||
/* handle any USB OHCI controller */
|
||||
PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_OHCI, ~0),
|
||||
.driver_data = (unsigned long) &ohci_pci_hc_driver,
|
||||
}, {
|
||||
/* The device in the ConneXT I/O hub has no class reg */
|
||||
PCI_VDEVICE(STMICRO, PCI_DEVICE_ID_STMICRO_USB_OHCI),
|
||||
.driver_data = (unsigned long) &ohci_pci_hc_driver,
|
||||
}, { /* end: all zeroes */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE (pci, pci_ids);
|
||||
|
@ -1204,6 +1204,7 @@ static void handle_vendor_event(struct xhci_hcd *xhci,
|
||||
*
|
||||
* Returns a zero-based port number, which is suitable for indexing into each of
|
||||
* the split roothubs' port arrays and bus state arrays.
|
||||
* Add one to it in order to call xhci_find_slot_id_by_port.
|
||||
*/
|
||||
static unsigned int find_faked_portnum_from_hw_portnum(struct usb_hcd *hcd,
|
||||
struct xhci_hcd *xhci, u32 port_id)
|
||||
@ -1324,7 +1325,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
|
||||
xhci_set_link_state(xhci, port_array, faked_port_index,
|
||||
XDEV_U0);
|
||||
slot_id = xhci_find_slot_id_by_port(hcd, xhci,
|
||||
faked_port_index);
|
||||
faked_port_index + 1);
|
||||
if (!slot_id) {
|
||||
xhci_dbg(xhci, "slot_id is zero\n");
|
||||
goto cleanup;
|
||||
@ -3323,7 +3324,8 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
|
||||
/* Check TD length */
|
||||
if (running_total != td_len) {
|
||||
xhci_err(xhci, "ISOC TD length unmatch\n");
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,9 +37,6 @@ static int emi26_set_reset(struct usb_device *dev, unsigned char reset_bit);
|
||||
static int emi26_load_firmware (struct usb_device *dev);
|
||||
static int emi26_probe(struct usb_interface *intf, const struct usb_device_id *id);
|
||||
static void emi26_disconnect(struct usb_interface *intf);
|
||||
static int __init emi26_init (void);
|
||||
static void __exit emi26_exit (void);
|
||||
|
||||
|
||||
/* thanks to drivers/usb/serial/keyspan_pda.c code */
|
||||
static int emi26_writememory (struct usb_device *dev, int address,
|
||||
|
@ -46,9 +46,6 @@ static int emi62_set_reset(struct usb_device *dev, unsigned char reset_bit);
|
||||
static int emi62_load_firmware (struct usb_device *dev);
|
||||
static int emi62_probe(struct usb_interface *intf, const struct usb_device_id *id);
|
||||
static void emi62_disconnect(struct usb_interface *intf);
|
||||
static int __init emi62_init (void);
|
||||
static void __exit emi62_exit (void);
|
||||
|
||||
|
||||
/* thanks to drivers/usb/serial/keyspan_pda.c code */
|
||||
static int emi62_writememory(struct usb_device *dev, int address,
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#define VENDOR_ID 0x0fc5
|
||||
#define PRODUCT_ID 0x1227
|
||||
#define MAXLEN 6
|
||||
#define MAXLEN 8
|
||||
|
||||
/* table of devices that work with this driver */
|
||||
static const struct usb_device_id id_table[] = {
|
||||
|
@ -33,9 +33,6 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/memory.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <mach/cputype.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -981,6 +981,9 @@ static void musb_shutdown(struct platform_device *pdev)
|
||||
unsigned long flags;
|
||||
|
||||
pm_runtime_get_sync(musb->controller);
|
||||
|
||||
musb_gadget_cleanup(musb);
|
||||
|
||||
spin_lock_irqsave(&musb->lock, flags);
|
||||
musb_platform_disable(musb);
|
||||
musb_generic_disable(musb);
|
||||
@ -1827,8 +1830,6 @@ static void musb_free(struct musb *musb)
|
||||
sysfs_remove_group(&musb->controller->kobj, &musb_attr_group);
|
||||
#endif
|
||||
|
||||
musb_gadget_cleanup(musb);
|
||||
|
||||
if (musb->nIrq >= 0) {
|
||||
if (musb->irq_wake)
|
||||
disable_irq_wake(musb->nIrq);
|
||||
|
@ -222,7 +222,6 @@ static inline void omap2430_low_level_init(struct musb *musb)
|
||||
musb_writel(musb->mregs, OTG_FORCESTDBY, l);
|
||||
}
|
||||
|
||||
/* blocking notifier support */
|
||||
static int musb_otg_notifications(struct notifier_block *nb,
|
||||
unsigned long event, void *unused)
|
||||
{
|
||||
@ -231,7 +230,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
|
||||
musb->xceiv_event = event;
|
||||
schedule_work(&musb->otg_notifier_work);
|
||||
|
||||
return 0;
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
|
||||
@ -386,6 +385,7 @@ static void omap2430_musb_disable(struct musb *musb)
|
||||
static int omap2430_musb_exit(struct musb *musb)
|
||||
{
|
||||
del_timer_sync(&musb_idle_timer);
|
||||
cancel_work_sync(&musb->otg_notifier_work);
|
||||
|
||||
omap2430_low_level_exit(musb);
|
||||
otg_put_transceiver(musb->xceiv);
|
||||
|
@ -86,20 +86,6 @@ config NOP_USB_XCEIV
|
||||
built-in with usb ip or which are autonomous and doesn't require any
|
||||
phy programming such as ISP1x04 etc.
|
||||
|
||||
config USB_LANGWELL_OTG
|
||||
tristate "Intel Langwell USB OTG dual-role support"
|
||||
depends on USB && PCI && INTEL_SCU_IPC
|
||||
select USB_OTG
|
||||
select USB_OTG_UTILS
|
||||
help
|
||||
Say Y here if you want to build Intel Langwell USB OTG
|
||||
transciever driver in kernel. This driver implements role
|
||||
switch between EHCI host driver and Langwell USB OTG
|
||||
client driver.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called langwell_otg.
|
||||
|
||||
config USB_MSM_OTG
|
||||
tristate "OTG support for Qualcomm on-chip USB controller"
|
||||
depends on (USB || USB_GADGET) && ARCH_MSM
|
||||
@ -124,7 +110,7 @@ config AB8500_USB
|
||||
|
||||
config FSL_USB2_OTG
|
||||
bool "Freescale USB OTG Transceiver Driver"
|
||||
depends on USB_EHCI_FSL && USB_GADGET_FSL_USB2
|
||||
depends on USB_EHCI_FSL && USB_GADGET_FSL_USB2 && USB_SUSPEND
|
||||
select USB_OTG
|
||||
select USB_OTG_UTILS
|
||||
help
|
||||
@ -132,7 +118,7 @@ config FSL_USB2_OTG
|
||||
|
||||
config USB_MV_OTG
|
||||
tristate "Marvell USB OTG support"
|
||||
depends on USB_MV_UDC
|
||||
depends on USB_MV_UDC && USB_SUSPEND
|
||||
select USB_OTG
|
||||
select USB_OTG_UTILS
|
||||
help
|
||||
|
@ -13,7 +13,6 @@ obj-$(CONFIG_USB_GPIO_VBUS) += gpio_vbus.o
|
||||
obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
|
||||
obj-$(CONFIG_TWL4030_USB) += twl4030-usb.o
|
||||
obj-$(CONFIG_TWL6030_USB) += twl6030-usb.o
|
||||
obj-$(CONFIG_USB_LANGWELL_OTG) += langwell_otg.o
|
||||
obj-$(CONFIG_NOP_USB_XCEIV) += nop-usb-xceiv.o
|
||||
obj-$(CONFIG_USB_ULPI) += ulpi.o
|
||||
obj-$(CONFIG_USB_ULPI_VIEWPORT) += ulpi_viewport.o
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -202,6 +202,7 @@ static void mv_otg_init_irq(struct mv_otg *mvotg)
|
||||
|
||||
static void mv_otg_start_host(struct mv_otg *mvotg, int on)
|
||||
{
|
||||
#ifdef CONFIG_USB
|
||||
struct otg_transceiver *otg = &mvotg->otg;
|
||||
struct usb_hcd *hcd;
|
||||
|
||||
@ -216,6 +217,7 @@ static void mv_otg_start_host(struct mv_otg *mvotg, int on)
|
||||
usb_add_hcd(hcd, hcd->irq, IRQF_SHARED);
|
||||
else
|
||||
usb_remove_hcd(hcd);
|
||||
#endif /* CONFIG_USB */
|
||||
}
|
||||
|
||||
static void mv_otg_start_periphrals(struct mv_otg *mvotg, int on)
|
||||
|
@ -425,7 +425,7 @@ static int usbhsg_recip_run_handle(struct usbhs_priv *priv,
|
||||
struct usbhs_pipe *pipe;
|
||||
int recip = ctrl->bRequestType & USB_RECIP_MASK;
|
||||
int nth = le16_to_cpu(ctrl->wIndex) & USB_ENDPOINT_NUMBER_MASK;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
int (*func)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
|
||||
struct usb_ctrlrequest *ctrl);
|
||||
char *msg;
|
||||
|
@ -39,6 +39,8 @@ static void cp210x_get_termios(struct tty_struct *,
|
||||
struct usb_serial_port *port);
|
||||
static void cp210x_get_termios_port(struct usb_serial_port *port,
|
||||
unsigned int *cflagp, unsigned int *baudp);
|
||||
static void cp210x_change_speed(struct tty_struct *, struct usb_serial_port *,
|
||||
struct ktermios *);
|
||||
static void cp210x_set_termios(struct tty_struct *, struct usb_serial_port *,
|
||||
struct ktermios*);
|
||||
static int cp210x_tiocmget(struct tty_struct *);
|
||||
@ -138,6 +140,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
|
||||
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
|
||||
{ USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
|
||||
{ USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */
|
||||
{ USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
|
||||
{ } /* Terminating Entry */
|
||||
};
|
||||
@ -201,6 +204,8 @@ static struct usb_serial_driver cp210x_device = {
|
||||
#define CP210X_EMBED_EVENTS 0x15
|
||||
#define CP210X_GET_EVENTSTATE 0x16
|
||||
#define CP210X_SET_CHARS 0x19
|
||||
#define CP210X_GET_BAUDRATE 0x1D
|
||||
#define CP210X_SET_BAUDRATE 0x1E
|
||||
|
||||
/* CP210X_IFC_ENABLE */
|
||||
#define UART_ENABLE 0x0001
|
||||
@ -360,8 +365,8 @@ static inline int cp210x_set_config_single(struct usb_serial_port *port,
|
||||
* Quantises the baud rate as per AN205 Table 1
|
||||
*/
|
||||
static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
|
||||
if (baud <= 56) baud = 0;
|
||||
else if (baud <= 300) baud = 300;
|
||||
if (baud <= 300)
|
||||
baud = 300;
|
||||
else if (baud <= 600) baud = 600;
|
||||
else if (baud <= 1200) baud = 1200;
|
||||
else if (baud <= 1800) baud = 1800;
|
||||
@ -389,10 +394,10 @@ static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
|
||||
else if (baud <= 491520) baud = 460800;
|
||||
else if (baud <= 567138) baud = 500000;
|
||||
else if (baud <= 670254) baud = 576000;
|
||||
else if (baud <= 1053257) baud = 921600;
|
||||
else if (baud <= 1474560) baud = 1228800;
|
||||
else if (baud <= 2457600) baud = 1843200;
|
||||
else baud = 3686400;
|
||||
else if (baud < 1000000)
|
||||
baud = 921600;
|
||||
else if (baud > 2000000)
|
||||
baud = 2000000;
|
||||
return baud;
|
||||
}
|
||||
|
||||
@ -409,13 +414,14 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
return result;
|
||||
}
|
||||
|
||||
result = usb_serial_generic_open(tty, port);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
/* Configure the termios structure */
|
||||
cp210x_get_termios(tty, port);
|
||||
return 0;
|
||||
|
||||
/* The baud rate must be initialised on cp2104 */
|
||||
if (tty)
|
||||
cp210x_change_speed(tty, port, NULL);
|
||||
|
||||
return usb_serial_generic_open(tty, port);
|
||||
}
|
||||
|
||||
static void cp210x_close(struct usb_serial_port *port)
|
||||
@ -467,10 +473,7 @@ static void cp210x_get_termios_port(struct usb_serial_port *port,
|
||||
|
||||
dbg("%s - port %d", __func__, port->number);
|
||||
|
||||
cp210x_get_config(port, CP210X_GET_BAUDDIV, &baud, 2);
|
||||
/* Convert to baudrate */
|
||||
if (baud)
|
||||
baud = cp210x_quantise_baudrate((BAUD_RATE_GEN_FREQ + baud/2)/ baud);
|
||||
cp210x_get_config(port, CP210X_GET_BAUDRATE, &baud, 4);
|
||||
|
||||
dbg("%s - baud rate = %d", __func__, baud);
|
||||
*baudp = baud;
|
||||
@ -579,11 +582,64 @@ static void cp210x_get_termios_port(struct usb_serial_port *port,
|
||||
*cflagp = cflag;
|
||||
}
|
||||
|
||||
/*
|
||||
* CP2101 supports the following baud rates:
|
||||
*
|
||||
* 300, 600, 1200, 1800, 2400, 4800, 7200, 9600, 14400, 19200, 28800,
|
||||
* 38400, 56000, 57600, 115200, 128000, 230400, 460800, 921600
|
||||
*
|
||||
* CP2102 and CP2103 support the following additional rates:
|
||||
*
|
||||
* 4000, 16000, 51200, 64000, 76800, 153600, 250000, 256000, 500000,
|
||||
* 576000
|
||||
*
|
||||
* The device will map a requested rate to a supported one, but the result
|
||||
* of requests for rates greater than 1053257 is undefined (see AN205).
|
||||
*
|
||||
* CP2104, CP2105 and CP2110 support most rates up to 2M, 921k and 1M baud,
|
||||
* respectively, with an error less than 1%. The actual rates are determined
|
||||
* by
|
||||
*
|
||||
* div = round(freq / (2 x prescale x request))
|
||||
* actual = freq / (2 x prescale x div)
|
||||
*
|
||||
* For CP2104 and CP2105 freq is 48Mhz and prescale is 4 for request <= 365bps
|
||||
* or 1 otherwise.
|
||||
* For CP2110 freq is 24Mhz and prescale is 4 for request <= 300bps or 1
|
||||
* otherwise.
|
||||
*/
|
||||
static void cp210x_change_speed(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
{
|
||||
u32 baud;
|
||||
|
||||
baud = tty->termios->c_ospeed;
|
||||
|
||||
/* This maps the requested rate to a rate valid on cp2102 or cp2103,
|
||||
* or to an arbitrary rate in [1M,2M].
|
||||
*
|
||||
* NOTE: B0 is not implemented.
|
||||
*/
|
||||
baud = cp210x_quantise_baudrate(baud);
|
||||
|
||||
dbg("%s - setting baud rate to %u", __func__, baud);
|
||||
if (cp210x_set_config(port, CP210X_SET_BAUDRATE, &baud,
|
||||
sizeof(baud))) {
|
||||
dev_warn(&port->dev, "failed to set baud rate to %u\n", baud);
|
||||
if (old_termios)
|
||||
baud = old_termios->c_ospeed;
|
||||
else
|
||||
baud = 9600;
|
||||
}
|
||||
|
||||
tty_encode_baud_rate(tty, baud, baud);
|
||||
}
|
||||
|
||||
static void cp210x_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
{
|
||||
unsigned int cflag, old_cflag;
|
||||
unsigned int baud = 0, bits;
|
||||
unsigned int bits;
|
||||
unsigned int modem_ctl[4];
|
||||
|
||||
dbg("%s - port %d", __func__, port->number);
|
||||
@ -593,20 +649,9 @@ static void cp210x_set_termios(struct tty_struct *tty,
|
||||
|
||||
cflag = tty->termios->c_cflag;
|
||||
old_cflag = old_termios->c_cflag;
|
||||
baud = cp210x_quantise_baudrate(tty_get_baud_rate(tty));
|
||||
|
||||
/* If the baud rate is to be updated*/
|
||||
if (baud != tty_termios_baud_rate(old_termios) && baud != 0) {
|
||||
dbg("%s - Setting baud rate to %d baud", __func__,
|
||||
baud);
|
||||
if (cp210x_set_config_single(port, CP210X_SET_BAUDDIV,
|
||||
((BAUD_RATE_GEN_FREQ + baud/2) / baud))) {
|
||||
dbg("Baud rate requested not supported by device");
|
||||
baud = tty_termios_baud_rate(old_termios);
|
||||
}
|
||||
}
|
||||
/* Report back the resulting baud rate */
|
||||
tty_encode_baud_rate(tty, baud, baud);
|
||||
if (tty->termios->c_ospeed != old_termios->c_ospeed)
|
||||
cp210x_change_speed(tty, port, old_termios);
|
||||
|
||||
/* If the number of data bits is to be updated */
|
||||
if ((cflag & CSIZE) != (old_cflag & CSIZE)) {
|
||||
|
@ -797,6 +797,7 @@ static struct usb_device_id id_table_combined [] = {
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(HORNBY_VID, HORNBY_ELITE_PID) },
|
||||
{ USB_DEVICE(JETI_VID, JETI_SPC1201_PID) },
|
||||
{ USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
@ -805,6 +806,8 @@ static struct usb_device_id id_table_combined [] = {
|
||||
{ USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, TI_XDS100V2_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, HAMEG_HO820_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, HAMEG_HO720_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, HAMEG_HO730_PID) },
|
||||
@ -841,6 +844,7 @@ static struct usb_device_id id_table_combined [] = {
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(ST_VID, ST_STMCLT1030_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_RF_R106) },
|
||||
{ }, /* Optional parameter entry */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
@ -1333,8 +1337,7 @@ static int set_serial_info(struct tty_struct *tty,
|
||||
goto check_and_exit;
|
||||
}
|
||||
|
||||
if ((new_serial.baud_base != priv->baud_base) &&
|
||||
(new_serial.baud_base < 9600)) {
|
||||
if (new_serial.baud_base != priv->baud_base) {
|
||||
mutex_unlock(&priv->cfg_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -1824,6 +1827,7 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port)
|
||||
|
||||
static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
{
|
||||
struct ktermios dummy;
|
||||
struct usb_device *dev = port->serial->dev;
|
||||
struct ftdi_private *priv = usb_get_serial_port_data(port);
|
||||
int result;
|
||||
@ -1842,8 +1846,10 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
This is same behaviour as serial.c/rs_open() - Kuba */
|
||||
|
||||
/* ftdi_set_termios will send usb control messages */
|
||||
if (tty)
|
||||
ftdi_set_termios(tty, port, tty->termios);
|
||||
if (tty) {
|
||||
memset(&dummy, 0, sizeof(dummy));
|
||||
ftdi_set_termios(tty, port, &dummy);
|
||||
}
|
||||
|
||||
/* Start reading from the device */
|
||||
result = usb_serial_generic_open(tty, port);
|
||||
|
@ -39,6 +39,13 @@
|
||||
/* www.candapter.com Ewert Energy Systems CANdapter device */
|
||||
#define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
|
||||
|
||||
/*
|
||||
* Texas Instruments XDS100v2 JTAG / BeagleBone A3
|
||||
* http://processors.wiki.ti.com/index.php/XDS100
|
||||
* http://beagleboard.org/bone
|
||||
*/
|
||||
#define TI_XDS100V2_PID 0xa6d0
|
||||
|
||||
#define FTDI_NXTCAM_PID 0xABB8 /* NXTCam for Mindstorms NXT */
|
||||
|
||||
/* US Interface Navigator (http://www.usinterface.com/) */
|
||||
@ -524,6 +531,12 @@
|
||||
#define ADI_GNICE_PID 0xF000
|
||||
#define ADI_GNICEPLUS_PID 0xF001
|
||||
|
||||
/*
|
||||
* Hornby Elite
|
||||
*/
|
||||
#define HORNBY_VID 0x04D8
|
||||
#define HORNBY_ELITE_PID 0x000A
|
||||
|
||||
/*
|
||||
* RATOC REX-USB60F
|
||||
*/
|
||||
@ -1168,3 +1181,9 @@
|
||||
*/
|
||||
/* TagTracer MIFARE*/
|
||||
#define FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID 0xF7C0
|
||||
|
||||
/*
|
||||
* Rainforest Automation
|
||||
*/
|
||||
/* ZigBee controller */
|
||||
#define FTDI_RF_R106 0x8A28
|
||||
|
@ -2657,15 +2657,7 @@ cleanup:
|
||||
|
||||
static void edge_disconnect(struct usb_serial *serial)
|
||||
{
|
||||
int i;
|
||||
struct edgeport_port *edge_port;
|
||||
|
||||
dbg("%s", __func__);
|
||||
|
||||
for (i = 0; i < serial->num_ports; ++i) {
|
||||
edge_port = usb_get_serial_port_data(serial->port[i]);
|
||||
edge_remove_sysfs_attrs(edge_port->port);
|
||||
}
|
||||
}
|
||||
|
||||
static void edge_release(struct usb_serial *serial)
|
||||
@ -2744,6 +2736,7 @@ static struct usb_serial_driver edgeport_1port_device = {
|
||||
.disconnect = edge_disconnect,
|
||||
.release = edge_release,
|
||||
.port_probe = edge_create_sysfs_attrs,
|
||||
.port_remove = edge_remove_sysfs_attrs,
|
||||
.ioctl = edge_ioctl,
|
||||
.set_termios = edge_set_termios,
|
||||
.tiocmget = edge_tiocmget,
|
||||
@ -2775,6 +2768,7 @@ static struct usb_serial_driver edgeport_2port_device = {
|
||||
.disconnect = edge_disconnect,
|
||||
.release = edge_release,
|
||||
.port_probe = edge_create_sysfs_attrs,
|
||||
.port_remove = edge_remove_sysfs_attrs,
|
||||
.ioctl = edge_ioctl,
|
||||
.set_termios = edge_set_termios,
|
||||
.tiocmget = edge_tiocmget,
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <linux/ioctl.h>
|
||||
#include "kobil_sct.h"
|
||||
|
||||
static int debug;
|
||||
static bool debug;
|
||||
|
||||
/* Version Information */
|
||||
#define DRIVER_VERSION "21/05/2004"
|
||||
|
@ -480,6 +480,10 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define ZD_VENDOR_ID 0x0685
|
||||
#define ZD_PRODUCT_7000 0x7000
|
||||
|
||||
/* LG products */
|
||||
#define LG_VENDOR_ID 0x1004
|
||||
#define LG_PRODUCT_L02C 0x618f
|
||||
|
||||
/* some devices interfaces need special handling due to a number of reasons */
|
||||
enum option_blacklist_reason {
|
||||
OPTION_BLACKLIST_NONE = 0,
|
||||
@ -1183,6 +1187,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, option_ids);
|
||||
|
@ -36,6 +36,7 @@
|
||||
#define UTSTARCOM_PRODUCT_UM175_V1 0x3712
|
||||
#define UTSTARCOM_PRODUCT_UM175_V2 0x3714
|
||||
#define UTSTARCOM_PRODUCT_UM175_ALLTEL 0x3715
|
||||
#define PANTECH_PRODUCT_UML190_VZW 0x3716
|
||||
#define PANTECH_PRODUCT_UML290_VZW 0x3718
|
||||
|
||||
/* CMOTECH devices */
|
||||
@ -67,7 +68,11 @@ static struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(LG_VENDOR_ID, LG_PRODUCT_VX4400_6000, 0xff, 0xff, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SANYO_VENDOR_ID, SANYO_PRODUCT_KATANA_LX, 0xff, 0xff, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_U520, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML190_VZW, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML190_VZW, 0xff, 0xfe, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xfd, 0xff) }, /* NMEA */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xfe, 0xff) }, /* WMC */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xff, 0xff) }, /* DIAG */
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, id_table);
|
||||
|
@ -789,7 +789,7 @@ static void rts51x_suspend_timer_fn(unsigned long data)
|
||||
rts51x_set_stat(chip, RTS51X_STAT_SS);
|
||||
/* ignore mass storage interface's children */
|
||||
pm_suspend_ignore_children(&us->pusb_intf->dev, true);
|
||||
usb_autopm_put_interface(us->pusb_intf);
|
||||
usb_autopm_put_interface_async(us->pusb_intf);
|
||||
US_DEBUGP("%s: RTS51X_STAT_SS 01,"
|
||||
"intf->pm_usage_cnt:%d, power.usage:%d\n",
|
||||
__func__,
|
||||
|
@ -27,8 +27,6 @@
|
||||
#define USB_SKEL_VENDOR_ID 0xfff0
|
||||
#define USB_SKEL_PRODUCT_ID 0xfff0
|
||||
|
||||
static DEFINE_MUTEX(skel_mutex);
|
||||
|
||||
/* table of devices that work with this driver */
|
||||
static const struct usb_device_id skel_table[] = {
|
||||
{ USB_DEVICE(USB_SKEL_VENDOR_ID, USB_SKEL_PRODUCT_ID) },
|
||||
@ -101,25 +99,18 @@ static int skel_open(struct inode *inode, struct file *file)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
mutex_lock(&skel_mutex);
|
||||
dev = usb_get_intfdata(interface);
|
||||
if (!dev) {
|
||||
mutex_unlock(&skel_mutex);
|
||||
retval = -ENODEV;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* increment our usage count for the device */
|
||||
kref_get(&dev->kref);
|
||||
mutex_unlock(&skel_mutex);
|
||||
|
||||
/* lock the device to allow correctly handling errors
|
||||
* in resumption */
|
||||
mutex_lock(&dev->io_mutex);
|
||||
if (!dev->interface) {
|
||||
retval = -ENODEV;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
retval = usb_autopm_get_interface(interface);
|
||||
if (retval)
|
||||
@ -127,11 +118,7 @@ static int skel_open(struct inode *inode, struct file *file)
|
||||
|
||||
/* save our object in the file's private structure */
|
||||
file->private_data = dev;
|
||||
|
||||
out_err:
|
||||
mutex_unlock(&dev->io_mutex);
|
||||
if (retval)
|
||||
kref_put(&dev->kref, skel_delete);
|
||||
|
||||
exit:
|
||||
return retval;
|
||||
@ -611,6 +598,7 @@ static void skel_disconnect(struct usb_interface *interface)
|
||||
int minor = interface->minor;
|
||||
|
||||
dev = usb_get_intfdata(interface);
|
||||
usb_set_intfdata(interface, NULL);
|
||||
|
||||
/* give back our minor */
|
||||
usb_deregister_dev(interface, &skel_class);
|
||||
@ -622,12 +610,8 @@ static void skel_disconnect(struct usb_interface *interface)
|
||||
|
||||
usb_kill_anchored_urbs(&dev->submitted);
|
||||
|
||||
mutex_lock(&skel_mutex);
|
||||
usb_set_intfdata(interface, NULL);
|
||||
|
||||
/* decrement our usage count */
|
||||
kref_put(&dev->kref, skel_delete);
|
||||
mutex_unlock(&skel_mutex);
|
||||
|
||||
dev_info(&interface->dev, "USB Skeleton #%d now disconnected", minor);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ config USB_WUSB
|
||||
depends on EXPERIMENTAL
|
||||
depends on USB
|
||||
depends on PCI
|
||||
select UWB
|
||||
depends on UWB
|
||||
select CRYPTO
|
||||
select CRYPTO_BLKCIPHER
|
||||
select CRYPTO_CBC
|
||||
|
@ -71,7 +71,7 @@ static int write_dir(struct inode *dir, struct logfs_disk_dentry *dd,
|
||||
|
||||
static int write_inode(struct inode *inode)
|
||||
{
|
||||
return __logfs_write_inode(inode, WF_LOCK);
|
||||
return __logfs_write_inode(inode, NULL, WF_LOCK);
|
||||
}
|
||||
|
||||
static s64 dir_seek_data(struct inode *inode, s64 pos)
|
||||
|
@ -230,7 +230,9 @@ int logfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
||||
return ret;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
logfs_get_wblocks(sb, NULL, WF_LOCK);
|
||||
logfs_write_anchor(sb);
|
||||
logfs_put_wblocks(sb, NULL, WF_LOCK);
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
|
||||
return 0;
|
||||
|
@ -367,7 +367,7 @@ static struct gc_candidate *get_candidate(struct super_block *sb)
|
||||
int i, max_dist;
|
||||
struct gc_candidate *cand = NULL, *this;
|
||||
|
||||
max_dist = min(no_free_segments(sb), LOGFS_NO_AREAS);
|
||||
max_dist = min(no_free_segments(sb), LOGFS_NO_AREAS - 1);
|
||||
|
||||
for (i = max_dist; i >= 0; i--) {
|
||||
this = first_in_list(&super->s_low_list[i]);
|
||||
|
@ -286,7 +286,7 @@ static int logfs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
if (logfs_inode(inode)->li_flags & LOGFS_IF_STILLBORN)
|
||||
return 0;
|
||||
|
||||
ret = __logfs_write_inode(inode, flags);
|
||||
ret = __logfs_write_inode(inode, NULL, flags);
|
||||
LOGFS_BUG_ON(ret, inode->i_sb);
|
||||
return ret;
|
||||
}
|
||||
@ -363,7 +363,9 @@ static void logfs_init_once(void *_li)
|
||||
|
||||
static int logfs_sync_fs(struct super_block *sb, int wait)
|
||||
{
|
||||
logfs_get_wblocks(sb, NULL, WF_LOCK);
|
||||
logfs_write_anchor(sb);
|
||||
logfs_put_wblocks(sb, NULL, WF_LOCK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,6 @@ static size_t __logfs_write_je(struct super_block *sb, void *buf, u16 type,
|
||||
if (len == 0)
|
||||
return logfs_write_header(super, header, 0, type);
|
||||
|
||||
BUG_ON(len > sb->s_blocksize);
|
||||
compr_len = logfs_compress(buf, data, len, sb->s_blocksize);
|
||||
if (compr_len < 0 || type == JE_ANCHOR) {
|
||||
memcpy(data, buf, len);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user