123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- From 31d0f8f19246c9a2fbecb5ca0a03ef6bb70eee2d Mon Sep 17 00:00:00 2001
- From: Biwen Li <[email protected]>
- Date: Fri, 9 Nov 2018 19:32:53 +0800
- Subject: [PATCH] flexspi: support layerscape
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- This is an integrated patch of flexspi for layerscape
- Signed-off-by: Alistair Strachan <[email protected]>
- Signed-off-by: Ariel Elior <[email protected]>
- Signed-off-by: Brandon Maier <[email protected]>
- Signed-off-by: David S. Miller <[email protected]>
- Signed-off-by: Geert Uytterhoeven <[email protected]>
- Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Signed-off-by: Joe Thornber <[email protected]>
- Signed-off-by: Kirill Kapranov <[email protected]>
- Signed-off-by: Liam Girdwood <[email protected]>
- Signed-off-by: Marcel Ziswiler <[email protected]>
- Signed-off-by: Mark Brown <[email protected]>
- Signed-off-by: Mike Snitzer <[email protected]>
- Signed-off-by: Peng Li <[email protected]>
- Signed-off-by: Reinette Chatre <[email protected]>
- Signed-off-by: Sasha Levin <[email protected]>
- Signed-off-by: Thomas Gleixner <[email protected]>
- Signed-off-by: Tomer Tayar <[email protected]>
- Signed-off-by: Uwe Kleine-König <[email protected]>
- Signed-off-by: Biwen Li <[email protected]>
- ---
- drivers/md/dm-thin.c | 13 +++++++++++++
- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 7 +++++++
- drivers/net/phy/xilinx_gmii2rgmii.c | 5 +++++
- drivers/spi/spi-tegra20-slink.c | 18 ++++++++++++++++++
- drivers/staging/android/ashmem.c | 6 ++++++
- drivers/tty/serial/imx.c | 8 ++++++++
- kernel/events/core.c | 6 ++++++
- sound/soc/soc-dapm.c | 7 +++++++
- 8 files changed, 70 insertions(+)
- --- a/drivers/md/dm-thin.c
- +++ b/drivers/md/dm-thin.c
- @@ -3697,6 +3697,19 @@ static int process_create_thin_mesg(unsi
- return r;
- }
-
- + r = dm_pool_get_free_metadata_block_count(pool->pmd, &free_blocks);
- + if (r) {
- + metadata_operation_failed(pool, "dm_pool_get_free_metadata_block_count", r);
- + return r;
- + }
- +
- + if (!free_blocks) {
- + /* Let's commit before we use up the metadata reserve. */
- + r = commit(pool);
- + if (r)
- + return r;
- + }
- +
- return 0;
- }
-
- --- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
- +++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
- @@ -616,6 +616,13 @@ static int qed_mcp_cmd_and_union(struct
- return -EBUSY;
- }
-
- + if (p_hwfn->mcp_info->b_block_cmd) {
- + DP_NOTICE(p_hwfn,
- + "The MFW is not responsive. Avoid sending mailbox command 0x%08x [param 0x%08x].\n",
- + p_mb_params->cmd, p_mb_params->param);
- + return -EBUSY;
- + }
- +
- if (p_mb_params->data_src_size > union_data_size ||
- p_mb_params->data_dst_size > union_data_size) {
- DP_ERR(p_hwfn,
- --- a/drivers/net/phy/xilinx_gmii2rgmii.c
- +++ b/drivers/net/phy/xilinx_gmii2rgmii.c
- @@ -92,6 +92,11 @@ static int xgmiitorgmii_probe(struct mdi
- return -EPROBE_DEFER;
- }
-
- + if (!priv->phy_dev->drv) {
- + dev_info(dev, "Attached phy not ready\n");
- + return -EPROBE_DEFER;
- + }
- +
- priv->addr = mdiodev->addr;
- priv->phy_drv = priv->phy_dev->drv;
- memcpy(&priv->conv_phy_drv, priv->phy_dev->drv,
- --- a/drivers/spi/spi-tegra20-slink.c
- +++ b/drivers/spi/spi-tegra20-slink.c
- @@ -1081,6 +1081,24 @@ static int tegra_slink_probe(struct plat
- goto exit_free_master;
- }
-
- + /* disabled clock may cause interrupt storm upon request */
- + tspi->clk = devm_clk_get(&pdev->dev, NULL);
- + if (IS_ERR(tspi->clk)) {
- + ret = PTR_ERR(tspi->clk);
- + dev_err(&pdev->dev, "Can not get clock %d\n", ret);
- + goto exit_free_master;
- + }
- + ret = clk_prepare(tspi->clk);
- + if (ret < 0) {
- + dev_err(&pdev->dev, "Clock prepare failed %d\n", ret);
- + goto exit_free_master;
- + }
- + ret = clk_enable(tspi->clk);
- + if (ret < 0) {
- + dev_err(&pdev->dev, "Clock enable failed %d\n", ret);
- + goto exit_free_master;
- + }
- +
- spi_irq = platform_get_irq(pdev, 0);
- tspi->irq = spi_irq;
- ret = request_threaded_irq(tspi->irq, tegra_slink_isr,
- --- a/drivers/staging/android/ashmem.c
- +++ b/drivers/staging/android/ashmem.c
- @@ -380,6 +380,12 @@ static int ashmem_mmap(struct file *file
- goto out;
- }
-
- + /* requested mapping size larger than object size */
- + if (vma->vm_end - vma->vm_start > PAGE_ALIGN(asma->size)) {
- + ret = -EINVAL;
- + goto out;
- + }
- +
- /* requested protection bits must match our allowed protection mask */
- if (unlikely((vma->vm_flags & ~calc_vm_prot_bits(asma->prot_mask, 0)) &
- calc_vm_prot_bits(PROT_MASK, 0))) {
- --- a/drivers/tty/serial/imx.c
- +++ b/drivers/tty/serial/imx.c
- @@ -2221,6 +2221,14 @@ static int serial_imx_probe(struct platf
- ret);
- return ret;
- }
- +
- + ret = devm_request_irq(&pdev->dev, rtsirq, imx_rtsint, 0,
- + dev_name(&pdev->dev), sport);
- + if (ret) {
- + dev_err(&pdev->dev, "failed to request rts irq: %d\n",
- + ret);
- + return ret;
- + }
- } else {
- ret = devm_request_irq(&pdev->dev, rxirq, imx_int, 0,
- dev_name(&pdev->dev), sport);
- --- a/kernel/events/core.c
- +++ b/kernel/events/core.c
- @@ -3763,6 +3763,12 @@ int perf_event_read_local(struct perf_ev
- goto out;
- }
-
- + /* If this is a pinned event it must be running on this CPU */
- + if (event->attr.pinned && event->oncpu != smp_processor_id()) {
- + ret = -EBUSY;
- + goto out;
- + }
- +
- /*
- * If the event is currently on this CPU, its either a per-task event,
- * or local to this CPU. Furthermore it means its ACTIVE (otherwise
- --- a/sound/soc/soc-dapm.c
- +++ b/sound/soc/soc-dapm.c
- @@ -4036,6 +4036,13 @@ int snd_soc_dapm_link_dai_widgets(struct
- continue;
- }
-
- + /* let users know there is no DAI to link */
- + if (!dai_w->priv) {
- + dev_dbg(card->dev, "dai widget %s has no DAI\n",
- + dai_w->name);
- + continue;
- + }
- +
- dai = dai_w->priv;
-
- /* ...find all widgets with the same stream and link them */
|