diff options
author | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-04-11 10:41:07 +0300 |
---|---|---|
committer | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-04-13 08:17:18 +0300 |
commit | e09b41010ba33a20a87472ee821fa407a5b8da36 (patch) | |
tree | d10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/hsi | |
parent | f93b97fd65072de626c074dbe099a1fff05ce060 (diff) |
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page.
During the rebasing, the following patch collided:
Force tick interrupt and get rid of softirq magic(I70131fb85).
Collisions have been removed because its logic was found on the
source already.
Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769
Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/hsi')
-rw-r--r-- | kernel/drivers/hsi/clients/cmt_speech.c | 11 | ||||
-rw-r--r-- | kernel/drivers/hsi/clients/nokia-modem.c | 11 | ||||
-rw-r--r-- | kernel/drivers/hsi/clients/ssi_protocol.c | 2 | ||||
-rw-r--r-- | kernel/drivers/hsi/controllers/omap_ssi.c | 21 | ||||
-rw-r--r-- | kernel/drivers/hsi/controllers/omap_ssi.h | 1 | ||||
-rw-r--r-- | kernel/drivers/hsi/controllers/omap_ssi_port.c | 2 | ||||
-rw-r--r-- | kernel/drivers/hsi/hsi.c | 13 |
7 files changed, 30 insertions, 31 deletions
diff --git a/kernel/drivers/hsi/clients/cmt_speech.c b/kernel/drivers/hsi/clients/cmt_speech.c index 4983529a9..95638df73 100644 --- a/kernel/drivers/hsi/clients/cmt_speech.c +++ b/kernel/drivers/hsi/clients/cmt_speech.c @@ -451,9 +451,14 @@ static void cs_hsi_read_on_control_complete(struct hsi_msg *msg) dev_dbg(&hi->cl->device, "Read on control: %08X\n", cmd); cs_release_cmd(msg); if (hi->flags & CS_FEAT_TSTAMP_RX_CTRL) { - struct timespec *tstamp = + struct timespec tspec; + struct cs_timestamp *tstamp = &hi->mmap_cfg->tstamp_rx_ctrl; - do_posix_clock_monotonic_gettime(tstamp); + + ktime_get_ts(&tspec); + + tstamp->tv_sec = (__u32) tspec.tv_sec; + tstamp->tv_nsec = (__u32) tspec.tv_nsec; } spin_unlock(&hi->lock); @@ -1105,7 +1110,7 @@ static int cs_char_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) return 0; } -static struct vm_operations_struct cs_char_vm_ops = { +static const struct vm_operations_struct cs_char_vm_ops = { .fault = cs_char_vma_fault, }; diff --git a/kernel/drivers/hsi/clients/nokia-modem.c b/kernel/drivers/hsi/clients/nokia-modem.c index bbb19231f..7f82c911a 100644 --- a/kernel/drivers/hsi/clients/nokia-modem.c +++ b/kernel/drivers/hsi/clients/nokia-modem.c @@ -112,7 +112,8 @@ static int nokia_modem_gpio_probe(struct device *dev) modem->gpio_amount = gpio_count; for (i = 0; i < gpio_count; i++) { - modem->gpios[i].gpio = devm_gpiod_get_index(dev, NULL, i); + modem->gpios[i].gpio = devm_gpiod_get_index(dev, NULL, i, + GPIOD_OUT_LOW); if (IS_ERR(modem->gpios[i].gpio)) { dev_err(dev, "Could not get gpio %d\n", i); return PTR_ERR(modem->gpios[i].gpio); @@ -125,10 +126,6 @@ static int nokia_modem_gpio_probe(struct device *dev) return err; } - err = gpiod_direction_output(modem->gpios[i].gpio, 0); - if (err) - return err; - err = gpiod_export(modem->gpios[i].gpio, 0); if (err) return err; @@ -208,7 +205,7 @@ static int nokia_modem_probe(struct device *dev) err = device_attach(&modem->ssi_protocol->device); if (err == 0) { - dev_err(dev, "Missing ssi-protocol driver\n"); + dev_dbg(dev, "Missing ssi-protocol driver\n"); err = -EPROBE_DEFER; goto error3; } else if (err < 0) { @@ -231,7 +228,7 @@ static int nokia_modem_probe(struct device *dev) err = device_attach(&modem->cmt_speech->device); if (err == 0) { - dev_err(dev, "Missing cmt-speech driver\n"); + dev_dbg(dev, "Missing cmt-speech driver\n"); err = -EPROBE_DEFER; goto error4; } else if (err < 0) { diff --git a/kernel/drivers/hsi/clients/ssi_protocol.c b/kernel/drivers/hsi/clients/ssi_protocol.c index e5c7a969f..a38af68cf 100644 --- a/kernel/drivers/hsi/clients/ssi_protocol.c +++ b/kernel/drivers/hsi/clients/ssi_protocol.c @@ -783,7 +783,7 @@ static void ssip_rx_strans(struct hsi_client *cl, u32 cmd) } ssip_set_rxstate(ssi, RECEIVING); if (unlikely(SSIP_MSG_ID(cmd) != ssi->rxid)) { - dev_err(&cl->device, "START TRANS id %d expeceted %d\n", + dev_err(&cl->device, "START TRANS id %d expected %d\n", SSIP_MSG_ID(cmd), ssi->rxid); spin_unlock(&ssi->lock); goto out1; diff --git a/kernel/drivers/hsi/controllers/omap_ssi.c b/kernel/drivers/hsi/controllers/omap_ssi.c index 089c6c3fe..f6d3100b7 100644 --- a/kernel/drivers/hsi/controllers/omap_ssi.c +++ b/kernel/drivers/hsi/controllers/omap_ssi.c @@ -295,27 +295,14 @@ static int __init ssi_get_iomem(struct platform_device *pd, const char *name, void __iomem **pbase, dma_addr_t *phy) { struct resource *mem; - struct resource *ioarea; void __iomem *base; struct hsi_controller *ssi = platform_get_drvdata(pd); mem = platform_get_resource_byname(pd, IORESOURCE_MEM, name); - if (!mem) { - dev_err(&pd->dev, "IO memory region missing (%s)\n", name); - return -ENXIO; - } - ioarea = devm_request_mem_region(&ssi->device, mem->start, - resource_size(mem), dev_name(&pd->dev)); - if (!ioarea) { - dev_err(&pd->dev, "%s IO memory region request failed\n", - mem->name); - return -ENXIO; - } - base = devm_ioremap(&ssi->device, mem->start, resource_size(mem)); - if (!base) { - dev_err(&pd->dev, "%s IO remap failed\n", mem->name); - return -ENXIO; - } + base = devm_ioremap_resource(&ssi->device, mem); + if (IS_ERR(base)) + return PTR_ERR(base); + *pbase = base; if (phy) diff --git a/kernel/drivers/hsi/controllers/omap_ssi.h b/kernel/drivers/hsi/controllers/omap_ssi.h index 9d056417d..f9aaf3726 100644 --- a/kernel/drivers/hsi/controllers/omap_ssi.h +++ b/kernel/drivers/hsi/controllers/omap_ssi.h @@ -24,6 +24,7 @@ #define __LINUX_HSI_OMAP_SSI_H__ #include <linux/device.h> +#include <linux/module.h> #include <linux/platform_device.h> #include <linux/hsi/hsi.h> #include <linux/gpio.h> diff --git a/kernel/drivers/hsi/controllers/omap_ssi_port.c b/kernel/drivers/hsi/controllers/omap_ssi_port.c index 1f8652b3d..02e66032a 100644 --- a/kernel/drivers/hsi/controllers/omap_ssi_port.c +++ b/kernel/drivers/hsi/controllers/omap_ssi_port.c @@ -1111,7 +1111,7 @@ static int __init ssi_port_probe(struct platform_device *pd) struct omap_ssi_port *omap_port; struct hsi_controller *ssi = dev_get_drvdata(pd->dev.parent); struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); - u32 cawake_gpio = 0; + int cawake_gpio = 0; u32 port_id; int err; diff --git a/kernel/drivers/hsi/hsi.c b/kernel/drivers/hsi/hsi.c index fe9371271..df380d55c 100644 --- a/kernel/drivers/hsi/hsi.c +++ b/kernel/drivers/hsi/hsi.c @@ -85,12 +85,14 @@ struct hsi_client *hsi_new_client(struct hsi_port *port, cl = kzalloc(sizeof(*cl), GFP_KERNEL); if (!cl) - return NULL; + goto err; cl->tx_cfg = info->tx_cfg; if (cl->tx_cfg.channels) { size = cl->tx_cfg.num_channels * sizeof(*cl->tx_cfg.channels); cl->tx_cfg.channels = kzalloc(size , GFP_KERNEL); + if (!cl->tx_cfg.channels) + goto err_tx; memcpy(cl->tx_cfg.channels, info->tx_cfg.channels, size); } @@ -98,6 +100,8 @@ struct hsi_client *hsi_new_client(struct hsi_port *port, if (cl->rx_cfg.channels) { size = cl->rx_cfg.num_channels * sizeof(*cl->rx_cfg.channels); cl->rx_cfg.channels = kzalloc(size , GFP_KERNEL); + if (!cl->rx_cfg.channels) + goto err_rx; memcpy(cl->rx_cfg.channels, info->rx_cfg.channels, size); } @@ -114,6 +118,12 @@ struct hsi_client *hsi_new_client(struct hsi_port *port, } return cl; +err_rx: + kfree(cl->tx_cfg.channels); +err_tx: + kfree(cl); +err: + return NULL; } EXPORT_SYMBOL_GPL(hsi_new_client); @@ -300,7 +310,6 @@ static void hsi_add_client_from_dt(struct hsi_port *port, if (device_register(&cl->device) < 0) { pr_err("hsi: failed to register client: %s\n", name); put_device(&cl->device); - goto err3; } return; |