* Re: [PATCH 0/2] Microchip mcp2517fd can controller driver
From: Wolfgang Grandegger @ 2017-11-26 19:05 UTC (permalink / raw)
To: kernel
Cc: Oliver Hartkopp, Marc Kleine-Budde, Rob Herring, Mark Rutland,
linux-can, devicetree
In-Reply-To: <CEE8AB99-2B26-44C0-A8D1-DD339DC9FEF7@martin.sperl.org>
Am 26.11.2017 um 19:29 schrieb kernel@martin.sperl.org:
>
>> On 26.11.2017, at 17:18, Wolfgang Grandegger <wg@grandegger.com> wrote:
>>
>> Hello Martin,
>>
>> Am 25.11.2017 um 15:47 schrieb kernel@martin.sperl.org:
>>
>> ...snip...
>>> I see the following counters:
>>> 7: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
>>> link/can promiscuity 0
>>> can <ONE-SHOT,BERR-REPORTING> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
>>
>> Why do you use "ONE_SHOT" in all your test cases?
> I did test oneshot and non-oneshot - I just did not document them
> here, I am just mentioning the issue of dropped frames when the driver
> is submitting them correctly.
>
> Also - for what it is worse - the RX case would not be impacted by one-shot
> enabled or not.
>
>
>> Did you also check for out-of-order issues, e.g. by using "canfdtest”?
>
> As for out of order: yes I have taken extreme care that we do not
> get out of order packets for all possible cases testing with cangen - there
> may be one error case where there could be an out of order case in the
> tx path (unless we want to drop that frame - it would be a MAB case)
>
> But until now I did not know about canfdtest, but for all practical
> purposes it can not test for out-of-order delivery on a 100% saturated
> bus the way it is working - latencies are too big for that!
>
> Still for completeness a quick test from beagleboneblack to a
> RPI CM3 with a mcp2517fd gives:
> root@beaglebone:~/can-utils# ./canfdtest -g -vvv can0 -l 32
> interface = can0, family = 29, type = 3, proto = 1
> 0078: [8] 01 02 03 04 05 06 07 08
> 0078: [8] 02 03 04 05 06 07 08 09
> 0078: [8] 03 04 05 06 07 08 09 0a
> 0078: [8] 04 05 06 07 08 09 0a 0b
> 0078: [8] 05 06 07 08 09 0a 0b 0c
> 0078: [8] 06 07 08 09 0a 0b 0c 0d
> 0078: [8] 07 08 09 0a 0b 0c 0d 0e
> 0078: [8] 08 09 0a 0b 0c 0d 0e 0f
> 0078: [8] 09 0a 0b 0c 0d 0e 0f 10
> 0078: [8] 0a 0b 0c 0d 0e 0f 10 11
> 0078: [8] 0b 0c 0d 0e 0f 10 11 12
> 0078: [8] 0c 0d 0e 0f 10 11 12 13
> 0078: [8] 0d 0e 0f 10 11 12 13 14
> 0078: [8] 0e 0f 10 11 12 13 14 15
> 0078: [8] 0f 10 11 12 13 14 15 16
> 0078: [8] 10 11 12 13 14 15 16 17
> 0078: [8] 11 12 13 14 15 16 17 18
> 0078: [8] 12 13 14 15 16 17 18 19
> 0078: [8] 13 14 15 16 17 18 19 1a
> 0078: [8] 14 15 16 17 18 19 1a 1b
> 0078: [8] 15 16 17 18 19 1a 1b 1c
> 0078: [8] 16 17 18 19 1a 1b 1c 1d
> 0078: [8] 17 18 19 1a 1b 1c 1d 1e
> 0078: [8] 18 19 1a 1b 1c 1d 1e 1f
> 0078: [8] 19 1a 1b 1c 1d 1e 1f 20
> 0078: [8] 1a 1b 1c 1d 1e 1f 20 21
> 0078: [8] 1b 1c 1d 1e 1f 20 21 22
> 0078: [8] 1c 1d 1e 1f 20 21 22 23
> 0078: [8] 1d 1e 1f 20 21 22 23 24
> 0078: [8] 1e 1f 20 21 22 23 24 25
> 0078: [8] 1f 20 21 22 23 24 25 26
> 0078: [8] 20 21 22 23 24 25 26 27
>
> Test messages sent and received: 32
>
> (I can not go to longer tests because I may hit a bug I am just
> now trying to fix in the current code level).
This test does not load the bus a lot but uses burst of message to
trigger out-of-order issues. Please run the test without "-v" and much
longer.
> If you are interested in any more specific tests that I should
> be running, then please list those and I can report them
> when submitting V2 of the patch set.
Other useful test are about bus error reporting and error state changes.
Can bus errors been disabled via interrupt? I do not see that
CAN_CTRLMODE_BERR_REPORTING is handled. This means that bus error
reporting is always on which may put heavy load on the system. e.g if no
cable is connected and a message sent (at 1MB/s).
Concerning the error state changes, have a look to [1].
> Just to put everything into perspective:
> The equipment available to me is:
> * beagle bone black with c_can
> * raspberry pi 3 with mcp2515
> * raspberry pi CM3 with mcp2517fd
> * raspberry pi 2 with mcp2517fd
> * saleae logic analyzer
[1] https://marc.info/?l=linux-can&m=151147114323582&w=2
The driver has more than 3000 lines... a review will take some time.
Thanks for your contribution.
Wolfgang.
>
> Thanks,
> Martin--
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply
* Re: [PATCH 3/8] ASoC: uniphier: add DT bindings documentation for UniPhier AIO
From: Rob Herring @ 2017-11-26 19:04 UTC (permalink / raw)
To: Katsuhiro Suzuki
Cc: Mark Brown, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
devicetree-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
Masami Hiramatsu, Jassi Brar,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20171122114321.29196-4-suzuki.katsuhiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
On Wed, Nov 22, 2017 at 08:43:16PM +0900, Katsuhiro Suzuki wrote:
> This patch adds DT binding documentation for UniPhier
> AIO audio subsystem.
>
> Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> ---
> .../devicetree/bindings/sound/uniphier,aio.txt | 36 ++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/uniphier,aio.txt
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 2/8] ASoC: uniphier: add DT bindings documentation for UniPhier EVEA
From: Rob Herring @ 2017-11-26 19:02 UTC (permalink / raw)
To: Katsuhiro Suzuki
Cc: Mark Brown, alsa-devel, devicetree, Masahiro Yamada,
Masami Hiramatsu, Jassi Brar, linux-arm-kernel, linux-kernel
In-Reply-To: <20171122114321.29196-3-suzuki.katsuhiro@socionext.com>
On Wed, Nov 22, 2017 at 08:43:15PM +0900, Katsuhiro Suzuki wrote:
> This patch adds DT binding documentation for UniPhier EVEA
> that is SoC inner sound codec of UniPhier series.
>
> Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
> ---
> .../devicetree/bindings/sound/uniphier,evea.txt | 26 ++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/uniphier,evea.txt
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH v2 3/6] devicetree/bindings: display: Add bindings for SGD GKTW70SDAE4SE Panel
From: Rob Herring @ 2017-11-26 19:00 UTC (permalink / raw)
To: Neil Armstrong
Cc: shawnguo-DgEjT+Ai2ygdnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
fabio.estevam-3arQi8VN3Tc, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <1511348560-28505-4-git-send-email-narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
On Wed, Nov 22, 2017 at 12:02:37PM +0100, Neil Armstrong wrote:
> The GKTW70SDAE4SE is an LVDS display panel.
> Their bindings are modelled on the the LVDS panel bindings.
Be consistent with your subjects. "dt-bindings: "
>
> Signed-off-by: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
> ---
> .../bindings/display/panel/sgd,gktw70sdae4se.txt | 41 ++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.txt
With that,
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v2 2/6] dt-bindings: Add vendor prefix for Solomon Goldentek Display Corporation
From: Rob Herring @ 2017-11-26 18:58 UTC (permalink / raw)
To: Neil Armstrong
Cc: shawnguo-DgEjT+Ai2ygdnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
fabio.estevam-3arQi8VN3Tc,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1511348560-28505-3-git-send-email-narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
On Wed, Nov 22, 2017 at 12:02:36PM +0100, Neil Armstrong wrote:
> Solomon Goldentek Display Corporation is a Taiwanese LCD/LCM manufacturer.
> Company Site: http://www.goldentek.com.tw
>
> Signed-off-by: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
> ---
> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 0/2] Microchip mcp2517fd can controller driver
From: kernel @ 2017-11-26 18:29 UTC (permalink / raw)
To: Wolfgang Grandegger
Cc: Oliver Hartkopp, Marc Kleine-Budde, Rob Herring, Mark Rutland,
linux-can, devicetree
In-Reply-To: <0c2f4a35-3b86-7ae6-ccc6-2751fa92f497@grandegger.com>
> On 26.11.2017, at 17:18, Wolfgang Grandegger <wg@grandegger.com> wrote:
>
> Hello Martin,
>
> Am 25.11.2017 um 15:47 schrieb kernel@martin.sperl.org:
>
> ...snip...
>> I see the following counters:
>> 7: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
>> link/can promiscuity 0
>> can <ONE-SHOT,BERR-REPORTING> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
>
> Why do you use "ONE_SHOT" in all your test cases?
I did test oneshot and non-oneshot - I just did not document them
here, I am just mentioning the issue of dropped frames when the driver
is submitting them correctly.
Also - for what it is worse - the RX case would not be impacted by one-shot
enabled or not.
> Did you also check for out-of-order issues, e.g. by using "canfdtest”?
As for out of order: yes I have taken extreme care that we do not
get out of order packets for all possible cases testing with cangen - there
may be one error case where there could be an out of order case in the
tx path (unless we want to drop that frame - it would be a MAB case)
But until now I did not know about canfdtest, but for all practical
purposes it can not test for out-of-order delivery on a 100% saturated
bus the way it is working - latencies are too big for that!
Still for completeness a quick test from beagleboneblack to a
RPI CM3 with a mcp2517fd gives:
root@beaglebone:~/can-utils# ./canfdtest -g -vvv can0 -l 32
interface = can0, family = 29, type = 3, proto = 1
0078: [8] 01 02 03 04 05 06 07 08
0078: [8] 02 03 04 05 06 07 08 09
0078: [8] 03 04 05 06 07 08 09 0a
0078: [8] 04 05 06 07 08 09 0a 0b
0078: [8] 05 06 07 08 09 0a 0b 0c
0078: [8] 06 07 08 09 0a 0b 0c 0d
0078: [8] 07 08 09 0a 0b 0c 0d 0e
0078: [8] 08 09 0a 0b 0c 0d 0e 0f
0078: [8] 09 0a 0b 0c 0d 0e 0f 10
0078: [8] 0a 0b 0c 0d 0e 0f 10 11
0078: [8] 0b 0c 0d 0e 0f 10 11 12
0078: [8] 0c 0d 0e 0f 10 11 12 13
0078: [8] 0d 0e 0f 10 11 12 13 14
0078: [8] 0e 0f 10 11 12 13 14 15
0078: [8] 0f 10 11 12 13 14 15 16
0078: [8] 10 11 12 13 14 15 16 17
0078: [8] 11 12 13 14 15 16 17 18
0078: [8] 12 13 14 15 16 17 18 19
0078: [8] 13 14 15 16 17 18 19 1a
0078: [8] 14 15 16 17 18 19 1a 1b
0078: [8] 15 16 17 18 19 1a 1b 1c
0078: [8] 16 17 18 19 1a 1b 1c 1d
0078: [8] 17 18 19 1a 1b 1c 1d 1e
0078: [8] 18 19 1a 1b 1c 1d 1e 1f
0078: [8] 19 1a 1b 1c 1d 1e 1f 20
0078: [8] 1a 1b 1c 1d 1e 1f 20 21
0078: [8] 1b 1c 1d 1e 1f 20 21 22
0078: [8] 1c 1d 1e 1f 20 21 22 23
0078: [8] 1d 1e 1f 20 21 22 23 24
0078: [8] 1e 1f 20 21 22 23 24 25
0078: [8] 1f 20 21 22 23 24 25 26
0078: [8] 20 21 22 23 24 25 26 27
Test messages sent and received: 32
(I can not go to longer tests because I may hit a bug I am just
now trying to fix in the current code level).
If you are interested in any more specific tests that I should
be running, then please list those and I can report them
when submitting V2 of the patch set.
Just to put everything into perspective:
The equipment available to me is:
* beagle bone black with c_can
* raspberry pi 3 with mcp2515
* raspberry pi CM3 with mcp2517fd
* raspberry pi 2 with mcp2517fd
* saleae logic analyzer
Thanks,
Martin
^ permalink raw reply
* Re: [PATCH v2 04/11] media: rkisp1: add Rockchip MIPI Synopsys DPHY driver
From: kbuild test robot @ 2017-11-26 18:13 UTC (permalink / raw)
To: Jacob Chen
Cc: kbuild-all, linux-rockchip, linux-kernel, linux-arm-kernel,
mchehab, linux-media, sakari.ailus, hans.verkuil, tfiga, zhengsq,
laurent.pinchart, zyc, eddie.cai.linux, jeffy.chen, allon.huang,
devicetree, heiko, robh+dt, Jacob Chen
In-Reply-To: <20171124023706.5702-5-jacob-chen@iotwrt.com>
[-- Attachment #1: Type: text/plain, Size: 5530 bytes --]
Hi Jacob,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on next-20171124]
[cannot apply to rockchip/for-next v4.14]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Jacob-Chen/Rockchip-ISP1-Driver/20171126-224713
base: git://linuxtv.org/media_tree.git master
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=mips
All errors (new ones prefixed by >>):
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:634:66: error: expected identifier or '(' before '=' token
struct v4l2_async_notifier_operationsrockchip_mipidphy_async_ops = {
^
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c: In function 'rockchip_mipidphy_media_init':
>> drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:707:24: error: 'rockchip_mipidphy_async_ops' undeclared (first use in this function); did you mean 'rockchip_mipidphy_match_id'?
priv->notifier.ops = &rockchip_mipidphy_async_ops;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
rockchip_mipidphy_match_id
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:707:24: note: each undeclared identifier is reported only once for each function it appears in
At top level:
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:593:1: warning: 'rockchip_mipidphy_notifier_complete' defined but not used [-Wunused-function]
rockchip_mipidphy_notifier_complete(struct v4l2_async_notifier *notifier)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:579:1: warning: 'rockchip_mipidphy_notifier_unbind' defined but not used [-Wunused-function]
rockchip_mipidphy_notifier_unbind(struct v4l2_async_notifier *notifier,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:555:1: warning: 'rockchip_mipidphy_notifier_bound' defined but not used [-Wunused-function]
rockchip_mipidphy_notifier_bound(struct v4l2_async_notifier *notifier,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +707 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c
632
633 static const
> 634 struct v4l2_async_notifier_operationsrockchip_mipidphy_async_ops = {
635 .bound = rockchip_mipidphy_notifier_bound,
636 .unbind = rockchip_mipidphy_notifier_unbind,
637 .complete = rockchip_mipidphy_notifier_complete,
638 };
639
640 static int rockchip_mipidphy_fwnode_parse(struct device *dev,
641 struct v4l2_fwnode_endpoint *vep,
642 struct v4l2_async_subdev *asd)
643 {
644 struct sensor_async_subdev *s_asd =
645 container_of(asd, struct sensor_async_subdev, asd);
646 struct v4l2_mbus_config *config = &s_asd->mbus;
647
648 if (vep->bus_type != V4L2_MBUS_CSI2) {
649 dev_err(dev, "Only CSI2 bus type is currently supported\n");
650 return -EINVAL;
651 }
652
653 if (vep->base.port != 0) {
654 dev_err(dev, "The PHY has only port 0\n");
655 return -EINVAL;
656 }
657
658 config->type = V4L2_MBUS_CSI2;
659 config->flags = vep->bus.mipi_csi2.flags;
660 s_asd->lanes = vep->bus.mipi_csi2.num_data_lanes;
661
662 switch (vep->bus.mipi_csi2.num_data_lanes) {
663 case 1:
664 config->flags |= V4L2_MBUS_CSI2_1_LANE;
665 break;
666 case 2:
667 config->flags |= V4L2_MBUS_CSI2_2_LANE;
668 break;
669 case 3:
670 config->flags |= V4L2_MBUS_CSI2_3_LANE;
671 break;
672 case 4:
673 config->flags |= V4L2_MBUS_CSI2_4_LANE;
674 break;
675 default:
676 return -EINVAL;
677 }
678
679 return 0;
680 }
681
682 static int rockchip_mipidphy_media_init(struct mipidphy_priv *priv)
683 {
684 int ret;
685
686 priv->pads[MIPI_DPHY_SY_PAD_SOURCE].flags =
687 MEDIA_PAD_FL_SOURCE | MEDIA_PAD_FL_MUST_CONNECT;
688 priv->pads[MIPI_DPHY_SY_PAD_SINK].flags =
689 MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_MUST_CONNECT;
690
691 ret = media_entity_pads_init(&priv->sd.entity,
692 MIPI_DPHY_SY_PADS_NUM, priv->pads);
693 if (ret < 0)
694 return ret;
695
696 ret = v4l2_async_notifier_parse_fwnode_endpoints_by_port(
697 priv->dev, &priv->notifier,
698 sizeof(struct sensor_async_subdev), 0,
699 rockchip_mipidphy_fwnode_parse);
700 if (ret < 0)
701 return ret;
702
703 if (!priv->notifier.num_subdevs)
704 return -ENODEV; /* no endpoint */
705
706 priv->sd.subdev_notifier = &priv->notifier;
> 707 priv->notifier.ops = &rockchip_mipidphy_async_ops;
708 ret = v4l2_async_subdev_notifier_register(&priv->sd, &priv->notifier);
709 if (ret) {
710 dev_err(priv->dev,
711 "failed to register async notifier : %d\n", ret);
712 v4l2_async_notifier_cleanup(&priv->notifier);
713 return ret;
714 }
715
716 return v4l2_async_register_subdev(&priv->sd);
717 }
718
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 47597 bytes --]
^ permalink raw reply
* Re: [PATCH v6 14/17] ASoC: madera: Add common support for Cirrus Logic Madera codecs
From: kbuild test robot @ 2017-11-26 17:40 UTC (permalink / raw)
Cc: gnurou, alsa-devel, jason, devicetree, Richard Fitzgerald,
linus.walleij, patches, Ajit Pandey, linux-kernel, robh+dt,
Nariman Poushin, linux-gpio, broonie, kbuild-all,
Piotr Stankiewicz, tglx, lee.jones, Charles Keepax, Nikesh Oswal
In-Reply-To: <e30c2ed9-de46-4f2e-a70f-e857d44c28e1@EX17.ad.cirrus.com>
[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]
Hi Richard,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on next-20171124]
[cannot apply to ljones-mfd/for-mfd-next asoc/for-next v4.14]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L35-L85-L90-L91-codecs/20171126-145824
config: alpha-allmodconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=alpha
All errors (new ones prefixed by >>):
drivers/mfd/madera-i2c.o: In function `madera_i2c_probe':
>> (.text+0x1ac): undefined reference to `__devm_regmap_init_i2c'
(.text+0x1c4): undefined reference to `__devm_regmap_init_i2c'
(.text+0x210): undefined reference to `__devm_regmap_init_i2c'
(.text+0x224): undefined reference to `__devm_regmap_init_i2c'
drivers/mfd/madera-i2c.o: In function `madera_i2c_driver_init':
>> (.init.text+0x10): undefined reference to `i2c_register_driver'
(.init.text+0x20): undefined reference to `i2c_register_driver'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52542 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply
* Re: [PATCH v2 03/11] media: rkisp1: add rockchip isp1 driver
From: kbuild test robot @ 2017-11-26 17:32 UTC (permalink / raw)
To: Jacob Chen
Cc: kbuild-all, linux-rockchip, linux-kernel, linux-arm-kernel,
mchehab, linux-media, sakari.ailus, hans.verkuil, tfiga, zhengsq,
laurent.pinchart, zyc, eddie.cai.linux, jeffy.chen, allon.huang,
devicetree, heiko, robh+dt, Jacob Chen, Jacob Chen
In-Reply-To: <20171124023706.5702-4-jacob-chen@iotwrt.com>
[-- Attachment #1: Type: text/plain, Size: 7063 bytes --]
Hi Jacob,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on next-20171124]
[cannot apply to rockchip/for-next v4.14]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Jacob-Chen/Rockchip-ISP1-Driver/20171126-224713
base: git://linuxtv.org/media_tree.git master
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=mips
All error/warnings (new ones prefixed by >>):
drivers/media//platform/rockchip/isp1/rkisp1.c: In function 'rkisp1_isp_sd_s_stream':
>> drivers/media//platform/rockchip/isp1/rkisp1.c:136:6: warning: 'isp_ctrl' may be used uninitialized in this function [-Wmaybe-uninitialized]
u32 isp_ctrl;
^~~~~~~~
>> drivers/media//platform/rockchip/isp1/rkisp1.c:209:2: warning: 'acq_mult' may be used uninitialized in this function [-Wmaybe-uninitialized]
writel(acq_mult * in_frm->width, base + CIF_ISP_ACQ_H_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media//platform/rockchip/isp1/rkisp1.c:139:6: note: 'acq_mult' was declared here
u32 acq_mult;
^~~~~~~~
--
drivers/media//platform/rockchip/isp1/dev.c: In function 'rkisp1_runtime_suspend':
drivers/media//platform/rockchip/isp1/dev.c:597:9: error: implicit declaration of function 'pinctrl_pm_select_sleep_state' [-Werror=implicit-function-declaration]
return pinctrl_pm_select_sleep_state(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media//platform/rockchip/isp1/dev.c: In function 'rkisp1_runtime_resume':
>> drivers/media//platform/rockchip/isp1/dev.c:605:8: error: implicit declaration of function 'pinctrl_pm_select_default_state'; did you mean 'irq_set_default_host'? [-Werror=implicit-function-declaration]
ret = pinctrl_pm_select_default_state(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
irq_set_default_host
cc1: some warnings being treated as errors
--
>> drivers/media//platform/rockchip/isp1/isp_params.c:1350:3: error: 'const struct v4l2_ioctl_ops' has no member named 'vidioc_enum_fmt_meta_out'; did you mean 'vidioc_enum_fmt_meta_cap'?
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~~
vidioc_enum_fmt_meta_cap
drivers/media//platform/rockchip/isp1/isp_params.c:1350:30: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media//platform/rockchip/isp1/isp_params.c:1350:30: note: (near initialization for 'rkisp1_params_ioctl.vidioc_g_std')
>> drivers/media//platform/rockchip/isp1/isp_params.c:1351:3: error: 'const struct v4l2_ioctl_ops' has no member named 'vidioc_g_fmt_meta_out'; did you mean 'vidioc_g_fmt_meta_cap'?
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_g_fmt_meta_cap
drivers/media//platform/rockchip/isp1/isp_params.c:1351:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media//platform/rockchip/isp1/isp_params.c:1351:27: note: (near initialization for 'rkisp1_params_ioctl.vidioc_s_std')
>> drivers/media//platform/rockchip/isp1/isp_params.c:1352:3: error: 'const struct v4l2_ioctl_ops' has no member named 'vidioc_s_fmt_meta_out'; did you mean 'vidioc_s_fmt_meta_cap'?
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_s_fmt_meta_cap
drivers/media//platform/rockchip/isp1/isp_params.c:1352:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media//platform/rockchip/isp1/isp_params.c:1352:27: note: (near initialization for 'rkisp1_params_ioctl.vidioc_querystd')
>> drivers/media//platform/rockchip/isp1/isp_params.c:1353:3: error: 'const struct v4l2_ioctl_ops' has no member named 'vidioc_try_fmt_meta_out'; did you mean 'vidioc_try_fmt_meta_cap'?
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~
vidioc_try_fmt_meta_cap
drivers/media//platform/rockchip/isp1/isp_params.c:1353:29: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media//platform/rockchip/isp1/isp_params.c:1353:29: note: (near initialization for 'rkisp1_params_ioctl.vidioc_enum_input')
drivers/media//platform/rockchip/isp1/isp_params.c: In function 'rkisp1_params_init_vb2_queue':
>> drivers/media//platform/rockchip/isp1/isp_params.c:1478:12: error: 'V4L2_BUF_TYPE_META_OUTPUT' undeclared (first use in this function); did you mean 'V4L2_BUF_TYPE_SDR_OUTPUT'?
q->type = V4L2_BUF_TYPE_META_OUTPUT;
^~~~~~~~~~~~~~~~~~~~~~~~~
V4L2_BUF_TYPE_SDR_OUTPUT
drivers/media//platform/rockchip/isp1/isp_params.c:1478:12: note: each undeclared identifier is reported only once for each function it appears in
drivers/media//platform/rockchip/isp1/isp_params.c: In function 'rkisp1_register_params_vdev':
>> drivers/media//platform/rockchip/isp1/isp_params.c:1523:43: error: 'V4L2_CAP_META_OUTPUT' undeclared (first use in this function); did you mean 'V4L2_CAP_RDS_OUTPUT'?
vdev->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_META_OUTPUT;
^~~~~~~~~~~~~~~~~~~~
V4L2_CAP_RDS_OUTPUT
cc1: some warnings being treated as errors
vim +605 drivers/media//platform/rockchip/isp1/dev.c
591
592 static int __maybe_unused rkisp1_runtime_suspend(struct device *dev)
593 {
594 struct rkisp1_device *isp_dev = dev_get_drvdata(dev);
595
596 rkisp1_disable_sys_clk(isp_dev);
> 597 return pinctrl_pm_select_sleep_state(dev);
598 }
599
600 static int __maybe_unused rkisp1_runtime_resume(struct device *dev)
601 {
602 struct rkisp1_device *isp_dev = dev_get_drvdata(dev);
603 int ret;
604
> 605 ret = pinctrl_pm_select_default_state(dev);
606 if (ret < 0)
607 return ret;
608 rkisp1_enable_sys_clk(isp_dev);
609
610 return 0;
611 }
612
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 47597 bytes --]
^ permalink raw reply
* Re: [PATCH v2 04/11] media: rkisp1: add Rockchip MIPI Synopsys DPHY driver
From: kbuild test robot @ 2017-11-26 17:04 UTC (permalink / raw)
To: Jacob Chen
Cc: kbuild-all-JC7UmRfGjtg,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
mchehab-DgEjT+Ai2ygdnm+yROfE0A,
linux-media-u79uwXL29TY76Z2rM5mHXA,
sakari.ailus-VuQAYsv1563Yd54FQh9/CA,
hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w, tfiga-F7+t8E8rja9g9hUCZPvPmw,
zhengsq-TNX95d0MmH7DzftRWevZcw,
laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw,
zyc-TNX95d0MmH7DzftRWevZcw,
eddie.cai.linux-Re5JQEeQqe8AvxtiuMwx3w,
jeffy.chen-TNX95d0MmH7DzftRWevZcw,
allon.huang-TNX95d0MmH7DzftRWevZcw,
devicetree-u79uwXL29TY76Z2rM5mHXA, heiko-4mtYJXux2i+zQB+pC5nmwQ,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, Jacob Chen
In-Reply-To: <20171124023706.5702-5-jacob-chen-fyOeoxGR3m/QT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 5426 bytes --]
Hi Jacob,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on next-20171124]
[cannot apply to rockchip/for-next v4.14]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Jacob-Chen/Rockchip-ISP1-Driver/20171126-224713
base: git://linuxtv.org/media_tree.git master
config: blackfin-allmodconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=blackfin
All errors (new ones prefixed by >>):
>> drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:634:66: error: expected identifier or '(' before '=' token
struct v4l2_async_notifier_operationsrockchip_mipidphy_async_ops = {
^
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c: In function 'rockchip_mipidphy_media_init':
>> drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:707:24: error: 'rockchip_mipidphy_async_ops' undeclared (first use in this function)
priv->notifier.ops = &rockchip_mipidphy_async_ops;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:707:24: note: each undeclared identifier is reported only once for each function it appears in
At top level:
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:593:1: warning: 'rockchip_mipidphy_notifier_complete' defined but not used [-Wunused-function]
rockchip_mipidphy_notifier_complete(struct v4l2_async_notifier *notifier)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:579:1: warning: 'rockchip_mipidphy_notifier_unbind' defined but not used [-Wunused-function]
rockchip_mipidphy_notifier_unbind(struct v4l2_async_notifier *notifier,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c:555:1: warning: 'rockchip_mipidphy_notifier_bound' defined but not used [-Wunused-function]
rockchip_mipidphy_notifier_bound(struct v4l2_async_notifier *notifier,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +634 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c
632
633 static const
> 634 struct v4l2_async_notifier_operationsrockchip_mipidphy_async_ops = {
635 .bound = rockchip_mipidphy_notifier_bound,
636 .unbind = rockchip_mipidphy_notifier_unbind,
637 .complete = rockchip_mipidphy_notifier_complete,
638 };
639
640 static int rockchip_mipidphy_fwnode_parse(struct device *dev,
641 struct v4l2_fwnode_endpoint *vep,
642 struct v4l2_async_subdev *asd)
643 {
644 struct sensor_async_subdev *s_asd =
645 container_of(asd, struct sensor_async_subdev, asd);
646 struct v4l2_mbus_config *config = &s_asd->mbus;
647
648 if (vep->bus_type != V4L2_MBUS_CSI2) {
649 dev_err(dev, "Only CSI2 bus type is currently supported\n");
650 return -EINVAL;
651 }
652
653 if (vep->base.port != 0) {
654 dev_err(dev, "The PHY has only port 0\n");
655 return -EINVAL;
656 }
657
658 config->type = V4L2_MBUS_CSI2;
659 config->flags = vep->bus.mipi_csi2.flags;
660 s_asd->lanes = vep->bus.mipi_csi2.num_data_lanes;
661
662 switch (vep->bus.mipi_csi2.num_data_lanes) {
663 case 1:
664 config->flags |= V4L2_MBUS_CSI2_1_LANE;
665 break;
666 case 2:
667 config->flags |= V4L2_MBUS_CSI2_2_LANE;
668 break;
669 case 3:
670 config->flags |= V4L2_MBUS_CSI2_3_LANE;
671 break;
672 case 4:
673 config->flags |= V4L2_MBUS_CSI2_4_LANE;
674 break;
675 default:
676 return -EINVAL;
677 }
678
679 return 0;
680 }
681
682 static int rockchip_mipidphy_media_init(struct mipidphy_priv *priv)
683 {
684 int ret;
685
686 priv->pads[MIPI_DPHY_SY_PAD_SOURCE].flags =
687 MEDIA_PAD_FL_SOURCE | MEDIA_PAD_FL_MUST_CONNECT;
688 priv->pads[MIPI_DPHY_SY_PAD_SINK].flags =
689 MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_MUST_CONNECT;
690
691 ret = media_entity_pads_init(&priv->sd.entity,
692 MIPI_DPHY_SY_PADS_NUM, priv->pads);
693 if (ret < 0)
694 return ret;
695
696 ret = v4l2_async_notifier_parse_fwnode_endpoints_by_port(
697 priv->dev, &priv->notifier,
698 sizeof(struct sensor_async_subdev), 0,
699 rockchip_mipidphy_fwnode_parse);
700 if (ret < 0)
701 return ret;
702
703 if (!priv->notifier.num_subdevs)
704 return -ENODEV; /* no endpoint */
705
706 priv->sd.subdev_notifier = &priv->notifier;
> 707 priv->notifier.ops = &rockchip_mipidphy_async_ops;
708 ret = v4l2_async_subdev_notifier_register(&priv->sd, &priv->notifier);
709 if (ret) {
710 dev_err(priv->dev,
711 "failed to register async notifier : %d\n", ret);
712 v4l2_async_notifier_cleanup(&priv->notifier);
713 return ret;
714 }
715
716 return v4l2_async_register_subdev(&priv->sd);
717 }
718
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45924 bytes --]
^ permalink raw reply
* Re: [PATCH 0/2] Microchip mcp2517fd can controller driver
From: Wolfgang Grandegger @ 2017-11-26 16:18 UTC (permalink / raw)
To: kernel, Oliver Hartkopp
Cc: Marc Kleine-Budde, Rob Herring, Mark Rutland, linux-can,
devicetree
In-Reply-To: <263BAF25-3F9A-4BE8-8E19-757B3C22A037@martin.sperl.org>
Hello Martin,
Am 25.11.2017 um 15:47 schrieb kernel@martin.sperl.org:
...snip...
> I see the following counters:
> 7: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
> link/can promiscuity 0
> can <ONE-SHOT,BERR-REPORTING> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
Why do you use "ONE_SHOT" in all your test cases?
Did you also check for out-of-order issues, e.g. by using "canfdtest"?
Wolfgang.
^ permalink raw reply
* Re: [PATCH v6 09/17] irqchip: Add driver for Cirrus Logic Madera codecs
From: kbuild test robot @ 2017-11-26 13:47 UTC (permalink / raw)
Cc: kbuild-all-JC7UmRfGjtg, lee.jones-QSEj5FYQhm4dnm+yROfE0A,
broonie-DgEjT+Ai2ygdnm+yROfE0A,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
gnurou-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
tglx-hfZtesqFncYOwBW4kG4KsQ, jason-NLaQJdtUoK4Be96aLqz0jA,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
linux-gpio-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Richard Fitzgerald,
Charles Keepax
In-Reply-To: <20171123171316.10868-10-rf-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2336 bytes --]
Hi Richard,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.14 next-20171124]
[cannot apply to ljones-mfd/for-mfd-next asoc/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L35-L85-L90-L91-codecs/20171126-145824
config: i386-randconfig-a1-201748 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
Note: the linux-review/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L35-L85-L90-L91-codecs/20171126-145824 HEAD 7f8a24863888ec8cffb97f9849b2d22564f564fb builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from include/linux/mfd/madera/core.h:17:0,
from drivers/regulator/arizona-ldo1.c:34:
>> include/linux/mfd/madera/pdata.h:19:32: fatal error: sound/madera-pdata.h: No such file or directory
#include <sound/madera-pdata.h>
^
compilation terminated.
vim +19 include/linux/mfd/madera/pdata.h
0d9fb60e Richard Fitzgerald 2017-11-23 13
0d9fb60e Richard Fitzgerald 2017-11-23 14 #include <linux/irqchip/irq-madera-pdata.h>
0d9fb60e Richard Fitzgerald 2017-11-23 15 #include <linux/kernel.h>
0d9fb60e Richard Fitzgerald 2017-11-23 16 #include <linux/regulator/arizona-ldo1.h>
0d9fb60e Richard Fitzgerald 2017-11-23 17 #include <linux/regulator/arizona-micsupp.h>
0d9fb60e Richard Fitzgerald 2017-11-23 18 #include <linux/regulator/machine.h>
0d9fb60e Richard Fitzgerald 2017-11-23 @19 #include <sound/madera-pdata.h>
0d9fb60e Richard Fitzgerald 2017-11-23 20
:::::: The code at line 19 was first introduced by commit
:::::: 0d9fb60e7fd7381d8adc6c16ea0b78ee9668a565 mfd: madera: Add common support for Cirrus Logic Madera codecs
:::::: TO: Richard Fitzgerald <rf-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
:::::: CC: 0day robot <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32075 bytes --]
^ permalink raw reply
* [RFC 2/2] drivers: dma-mapping: parse per device reserved mem at probe time
From: Peng Fan @ 2017-11-26 13:13 UTC (permalink / raw)
To: hch-jcswGhMUV9g, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
robin.murphy-5wv7dgnIgG8, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
frowand.list-Re5JQEeQqe8AvxtiuMwx3w
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
van.freenix-Re5JQEeQqe8AvxtiuMwx3w, Peng Fan
In-Reply-To: <20171126131346.12532-1-peng.fan-3arQi8VN3Tc@public.gmane.org>
Invoke of_reserved_mem_device_init at dma_configure, then
there is no need to call of_reserved_mem_device_init in device
specific probe function.
Signed-off-by: Peng Fan <peng.fan-3arQi8VN3Tc@public.gmane.org>
---
drivers/base/dma-mapping.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c
index e584eddef0a7..55dca06a7b55 100644
--- a/drivers/base/dma-mapping.c
+++ b/drivers/base/dma-mapping.c
@@ -12,6 +12,7 @@
#include <linux/export.h>
#include <linux/gfp.h>
#include <linux/of_device.h>
+#include <linux/of_reserved_mem.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
@@ -351,7 +352,9 @@ int dma_configure(struct device *dev)
}
if (dma_dev->of_node) {
- ret = of_dma_configure(dev, dma_dev->of_node);
+ ret = of_reserved_mem_device_init(dev);
+ if (ret)
+ ret = of_dma_configure(dev, dma_dev->of_node);
} else if (has_acpi_companion(dma_dev)) {
attr = acpi_get_dma_attr(to_acpi_device_node(dma_dev->fwnode));
if (attr != DEV_DMA_NOT_SUPPORTED)
@@ -367,5 +370,6 @@ int dma_configure(struct device *dev)
void dma_deconfigure(struct device *dev)
{
of_dma_deconfigure(dev);
+ of_reserved_mem_device_release(dev);
acpi_dma_deconfigure(dev);
}
--
2.14.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [RFC 1/2] of: reserved_mem: check return value of_dma_configure
From: Peng Fan @ 2017-11-26 13:13 UTC (permalink / raw)
To: hch-jcswGhMUV9g, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
robin.murphy-5wv7dgnIgG8, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
frowand.list-Re5JQEeQqe8AvxtiuMwx3w
Cc: van.freenix-Re5JQEeQqe8AvxtiuMwx3w,
devicetree-u79uwXL29TY76Z2rM5mHXA,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Peng Fan,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In commit <7b07cbefb6>("iommu: of: Handle IOMMU lookup failure
with deferred probing or error"), there is possibility that
of_dma_configure may fail. So in of_reserved_mem_device_init_by_idx,
also need to propagate the return value of_dma_configure to caller,
when need to use reserved memory for a device which needs iommu.
Signed-off-by: Peng Fan <peng.fan-3arQi8VN3Tc@public.gmane.org>
---
drivers/of/of_reserved_mem.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 22b75c82e377..61523819b50e 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -357,9 +357,12 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
/* ensure that dma_ops is set for virtual devices
* using reserved memory
*/
- of_dma_configure(dev, np);
-
- dev_info(dev, "assigned reserved memory node %s\n", rmem->name);
+ ret = of_dma_configure(dev, np);
+ if (ret)
+ of_reserved_mem_device_release(dev);
+ else
+ dev_info(dev, "assigned reserved memory node %s\n",
+ rmem->name);
} else {
kfree(rd);
}
--
2.14.1
^ permalink raw reply related
* Re: [PATCH v6 14/17] ASoC: madera: Add common support for Cirrus Logic Madera codecs
From: kbuild test robot @ 2017-11-26 12:13 UTC (permalink / raw)
Cc: kbuild-all-JC7UmRfGjtg, lee.jones-QSEj5FYQhm4dnm+yROfE0A,
broonie-DgEjT+Ai2ygdnm+yROfE0A,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
gnurou-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
tglx-hfZtesqFncYOwBW4kG4KsQ, jason-NLaQJdtUoK4Be96aLqz0jA,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
linux-gpio-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Richard Fitzgerald,
Charles Keepax, Nariman Poushin, Nikesh Oswal, Piotr Stankiewicz,
Ajit Pandey
In-Reply-To: <e30c2ed9-de46-4f2e-a70f-e857d44c28e1-MRjWshV2NDGMZzV0eMwobdBPR1lH4CV8@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]
Hi Richard,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to ljones-mfd/for-mfd-next asoc/for-next v4.14]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L35-L85-L90-L91-codecs/20171126-145824
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64
All errors (new ones prefixed by >>):
drivers/mfd/madera-i2c.o: In function `madera_i2c_probe':
>> madera-i2c.c:(.text+0x208): undefined reference to `__devm_regmap_init_i2c'
madera-i2c.c:(.text+0x24c): undefined reference to `__devm_regmap_init_i2c'
drivers/mfd/madera-i2c.o: In function `madera_i2c_driver_init':
>> madera-i2c.c:(.init.text+0x20): undefined reference to `i2c_register_driver'
drivers/mfd/madera-i2c.o: In function `madera_i2c_driver_exit':
>> madera-i2c.c:(.exit.text+0x14): undefined reference to `i2c_del_driver'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58565 bytes --]
^ permalink raw reply
* RE: [PATCH v4 1/6] can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers.
From: Pankaj Bansal @ 2017-11-26 2:20 UTC (permalink / raw)
To: Marc Kleine-Budde, wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org,
linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Varun Sethi, Poonam Aggrwal, Bhupesh Sharma, Sakar Arora
In-Reply-To: <44f37aef-7f45-a7c7-7320-01a62e23fbde-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> -----Original Message-----
> From: Marc Kleine-Budde [mailto:mkl@pengutronix.de]
> Sent: Friday, November 24, 2017 8:33 PM
> To: Pankaj Bansal <pankaj.bansal@nxp.com>; wg@grandegger.com; linux-
> can@vger.kernel.org; robh+dt@kernel.org; mark.rutland@arm.com;
> devicetree@vger.kernel.org
> Cc: Varun Sethi <V.Sethi@nxp.com>; Poonam Aggrwal
> <poonam.aggrwal@nxp.com>; Bhupesh Sharma
> <bhupesh.sharma@freescale.com>; Sakar Arora
> <Sakar.Arora@freescale.com>
> Subject: Re: [PATCH v4 1/6] can: flexcan: Remodel FlexCAN register r/w APIs
> for big endian FlexCAN controllers.
>
> On 11/24/2017 02:22 PM, Pankaj Bansal wrote:
> > The FlexCAN driver assumed that FlexCAN controller is big endian for
> > powerpc architecture and little endian for other architectures.
> >
> > But this may not be the case. FlexCAN controller can be little or big
> > endian on any architecture. For e.g. NXP LS1021A ARM based SOC has big
> > endian FlexCAN controller.
> >
> > Therefore, the driver has been modified to add a provision for both
> > types of controllers using an additional device tree property. On a
> > "fsl,p1010-flexcan" device BE is default, on all other devices LE is.
> >
> > Big Endian controllers should have "big-endian" set in the device tree.
> > check "Documentation/devicetree/bindings/net/can/fsl-flexcan.txt" for
> > usage.
> >
> > This is the standard practice followed in linux. for more info check:
> > Documentation/devicetree/bindings/common-properties.txt
> >
> > Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
> > Signed-off-by: Sakar Arora <Sakar.Arora@freescale.com>
> > Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
> > Reviewed-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
> > ---
> > Changes in v4:
> > - Merged device tree changes and driver changes in one series
> > Changes in v3:
> > - Added fsl,imx25-flexcan, fsl,imx35-flexcan and fsl,imx53-flexcan
> > support to the driver.
> > - Modified patch deciption to state default endianness followed and
> > to include fsl-flexcan.txt referance.
> > Changes in v2:
> > - Modified patch deciption to include common-properties.txt reference.
> > - Reorder the LE/BE read/write APIs for better readability of code
> > - Added an exception to force BE API selection, for powerpc based
> platform
> > P1010. This ensures that new linux kernel works with old P1010
> > device-tree, while future powerpc platforms that use big endian
> > FlexCAN controller need to specify big-endian in device tree in
> > FlexCAN node.
> > - Tested on P1010 after backporting to freescale sdk 1.4 linux, without
> > any change in device-tree.
> > - Tested on NXP LS1021A arm based platform.
> >
> > drivers/net/can/flexcan.c | 233 ++++++++++++++++++++----------------
> > 1 file changed, 131 insertions(+), 102 deletions(-)
> >
> > diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> > index a13a489..4c873fb 100644
> > --- a/drivers/net/can/flexcan.c
> > +++ b/drivers/net/can/flexcan.c
>
> [...]
> I think this will select LE for non DT devices, right?
>
Yes. As per below code snippet:
static struct property *__of_find_property(const struct device_node *np,
const char *name, int *lenp)
{
struct property *pp;
if (!np)
return NULL;
....
}
If no device node is present null is returned.
So we select le as default.
> > + if (of_property_read_bool(pdev->dev.of_node, "big-endian")) {
> > + priv->read = flexcan_read_be;
> > + priv->write = flexcan_write_be;
> > + } else {
> > + if (of_device_is_compatible(pdev->dev.of_node,
> > + "fsl,p1010-flexcan")) {
> > + priv->read = flexcan_read_be;
> > + priv->write = flexcan_write_be;
> > + } else {
> > + priv->read = flexcan_read_le;
> > + priv->write = flexcan_write_le;
> > + }
> > + }
> > +
> > priv->can.clock.freq = clock_freq;
> > priv->can.bittiming_const = &flexcan_bittiming_const;
> > priv->can.do_set_mode = flexcan_set_mode;
> >
>
> Marc
>
> --
> Pengutronix e.K. | Marc Kleine-Budde |
> Industrial Linux Solutions | Phone: +49-231-2826-924 |
> Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
> Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
^ permalink raw reply
* Re: [PATCH 03/10] PM / QoS: Fix device resume latency for non PM QoS devices
From: Manikanta Maddireddy @ 2017-11-25 19:46 UTC (permalink / raw)
To: Rafael J. Wysocki, Thierry Reding
Cc: Jon Hunter, Rob Herring, Frank Rowand, Bjorn Helgaas,
Rafael J. Wysocki, Thomas Gleixner, vidyas-DDmLM1+adcrQT0dZR+AlfA,
kthota-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux PCI,
Linux PM
In-Reply-To: <CAJZ5v0h1EdMV5u-5noMv_1_OpS13nH2NW_6Aua9+LMoWH0tL2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 25-Nov-17 5:32 AM, Rafael J. Wysocki wrote:
> On Fri, Nov 24, 2017 at 9:39 PM, Thierry Reding
> <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On Fri, Nov 24, 2017 at 05:50:42PM +0100, Rafael J. Wysocki wrote:
>>> On Fri, Nov 24, 2017 at 4:53 PM, Manikanta Maddireddy
>>> <mmaddireddy-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>>>> In 'commit 0cc2b4e5a020 ("PM / QoS: Fix device resume latency PM QoS")'
>>>> PM QoS resume latency modified 0 as "no latency at all". However
>>>> dev_pm_qos_raw_read_value() returns 0 for devices which doesn't have
>>>> PM QoS constraints. This is blocking runtime suspend for these devices
>>>> in rpm_check_suspend_allowed(). Return PM_QOS_RESUME_LATENCY_NO_CONSTRAINT
>>>> when PM QoS constraints are not available for a particular device.
>>>>
>>>> Fixes: 0cc2b4e5a020 ("PM / QoS: Fix device resume latency PM QoS")
>>>
>>> That commit has been reverted, so this patch is not applicable and
>>> therefore the whole series isn't.
>>>
>>> What kernel is it based off?
>>
>> It looks like this might have crept in via commit 0759e80b84e3 ("PM /
>> QoS: Fix device resume latency framework"). But checking more closely,
>> that commit actually incorporates this change already.
>>
>> According to the git log the correct commit for this showed up in
>> linux-next only today, which is probably why Manikanta missed it.
>
> Well, it's been in the Linus' tree for a week, though.
>
> Thanks,
> Rafael
>
I dropped this patch in V2.
Thanks,
Manikanta
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 01/10] genirq: Export irq_set_msi_desc()
From: Manikanta Maddireddy @ 2017-11-25 19:41 UTC (permalink / raw)
To: Thomas Gleixner
Cc: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
jonathanh-DDmLM1+adcrQT0dZR+AlfA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, rjw-LthD3rsA81gm4RdzfppkhA,
vidyas-DDmLM1+adcrQT0dZR+AlfA, kthota-DDmLM1+adcrQT0dZR+AlfA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA,
Marc Zyngier
In-Reply-To: <alpine.DEB.2.20.1711250050520.2316@nanos>
On 25-Nov-17 5:25 AM, Thomas Gleixner wrote:
> On Fri, 24 Nov 2017, Manikanta Maddireddy wrote:
>
> Please CC the proper mailing list for irq related changes.
>
>> PCI bus support MSI interrupts, allow PCI host driver to set MSI descriptor
>> data for an irq.
>
> This is not really an explanation why this export is needed.
>
> Thanks,
>
> tglx
>
Updated the commit log with why Tegra PCIe driver is using this function in V2.
Please review.
>>
>> Signed-off-by: Manikanta Maddireddy <mmaddireddy-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>> ---
>> kernel/irq/chip.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
>> index 5a2ef92c2782..bfbd17386bc4 100644
>> --- a/kernel/irq/chip.c
>> +++ b/kernel/irq/chip.c
>> @@ -136,6 +136,7 @@ int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry)
>> {
>> return irq_set_msi_desc_off(irq, 0, entry);
>> }
>> +EXPORT_SYMBOL(irq_set_msi_desc);
>>
>> /**
>> * irq_set_chip_data - set irq chip data for an irq
>> --
>> 2.1.4
>>
>>
^ permalink raw reply
* [PATCH V2 9/9] PCI: tegra: Add power management support
From: Manikanta Maddireddy @ 2017-11-25 19:32 UTC (permalink / raw)
To: thierry.reding, jonathanh, robh+dt, frowand.list, bhelgaas, rjw,
tglx
Cc: vidyas, kthota, linux-tegra, devicetree, linux-pci, linux-pm,
Manikanta Maddireddy
In-Reply-To: <1511638333-22951-1-git-send-email-mmaddireddy@nvidia.com>
Tegra186 powergate driver is implemented as power domain driver, power
partition ungate/gate are registered as power_on/power_off callback
functions. There are no direct functions to power gate/ungate host
controller in Tegra186. Host controller driver should add "power-domains"
property in device tree and implement runtime suspend and resume
callback functons. Power gate and ungate is taken care by power domain
driver when host controller driver calls pm_runtime_put_sync and
pm_runtime_get_sync respectively.
Register suspend_noirq & resume_noirq callback functions to allow PCIe to
come up after resume from RAM. Both runtime and noirq pm ops share same
callback functions.
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
---
V2:
* no change in this patch
drivers/pci/host/pci-tegra.c | 174 ++++++++++++++++++++++++++-----------------
1 file changed, 106 insertions(+), 68 deletions(-)
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index b380958a3deb..1bfdfcc8d2c1 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -1424,31 +1424,25 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie)
}
}
- err = tegra_pcie_power_on(pcie);
- if (err) {
- dev_err(dev, "failed to power up: %d\n", err);
- goto phys_put;
- }
-
pads = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pads");
pcie->pads = devm_ioremap_resource(dev, pads);
if (IS_ERR(pcie->pads)) {
err = PTR_ERR(pcie->pads);
- goto poweroff;
+ goto phys_put;
}
afi = platform_get_resource_byname(pdev, IORESOURCE_MEM, "afi");
pcie->afi = devm_ioremap_resource(dev, afi);
if (IS_ERR(pcie->afi)) {
err = PTR_ERR(pcie->afi);
- goto poweroff;
+ goto phys_put;
}
/* request configuration space, but remap later, on demand */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cs");
if (!res) {
err = -EADDRNOTAVAIL;
- goto poweroff;
+ goto phys_put;
}
axi_addr = pcie->soc->use_4k_conf_space ?
@@ -1456,21 +1450,21 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie)
pcie->cs = devm_request_mem_region(dev, axi_addr, SZ_4K, res->name);
if (!pcie->cs) {
err = -EADDRNOTAVAIL;
- goto poweroff;
+ goto phys_put;
}
pcie->cfg_va_base = devm_ioremap(dev, pcie->cs->start, SZ_4K);
if (!pcie->cfg_va_base) {
dev_err(pcie->dev, "failed to ioremap config space\n");
err = -EADDRNOTAVAIL;
- goto poweroff;
+ goto phys_put;
}
/* request interrupt */
err = platform_get_irq_byname(pdev, "intr");
if (err < 0) {
dev_err(dev, "failed to get IRQ: %d\n", err);
- goto poweroff;
+ goto phys_put;
}
pcie->irq = err;
@@ -1478,13 +1472,11 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie)
err = request_irq(pcie->irq, tegra_pcie_isr, IRQF_SHARED, "PCIE", pcie);
if (err) {
dev_err(dev, "failed to register IRQ: %d\n", err);
- goto poweroff;
+ goto phys_put;
}
return 0;
-poweroff:
- tegra_pcie_power_off(pcie);
phys_put:
if (soc->program_uphy)
tegra_pcie_phys_put(pcie);
@@ -1498,8 +1490,6 @@ static int tegra_pcie_put_resources(struct tegra_pcie *pcie)
if (pcie->irq > 0)
free_irq(pcie->irq, pcie);
- tegra_pcie_power_off(pcie);
-
if (soc->program_uphy)
tegra_pcie_phys_put(pcie);
@@ -1722,37 +1712,41 @@ static int tegra_pcie_enable_msi(struct tegra_pcie *pcie)
int err;
u32 reg;
- mutex_init(&msi->lock);
+ if (!msi->phys) {
+ mutex_init(&msi->lock);
- msi->chip.dev = dev;
- msi->chip.setup_irq = tegra_msi_setup_irq;
- msi->chip.teardown_irq = tegra_msi_teardown_irq;
+ msi->chip.dev = dev;
+ msi->chip.setup_irq = tegra_msi_setup_irq;
+ msi->chip.teardown_irq = tegra_msi_teardown_irq;
- msi->domain = irq_domain_add_linear(dev->of_node, INT_PCI_MSI_NR,
- &msi_domain_ops, &msi->chip);
- if (!msi->domain) {
- dev_err(dev, "failed to create IRQ domain\n");
- return -ENOMEM;
- }
+ msi->domain = irq_domain_add_linear(dev->of_node,
+ INT_PCI_MSI_NR,
+ &msi_domain_ops,
+ &msi->chip);
+ if (!msi->domain) {
+ dev_err(dev, "failed to create IRQ domain\n");
+ return -ENOMEM;
+ }
- err = platform_get_irq_byname(pdev, "msi");
- if (err < 0) {
- dev_err(dev, "failed to get IRQ: %d\n", err);
- goto err;
- }
+ err = platform_get_irq_byname(pdev, "msi");
+ if (err < 0) {
+ dev_err(dev, "failed to get IRQ: %d\n", err);
+ goto err;
+ }
- msi->irq = err;
+ msi->irq = err;
- err = request_irq(msi->irq, tegra_pcie_msi_irq, IRQF_NO_THREAD,
- tegra_msi_irq_chip.name, pcie);
- if (err < 0) {
- dev_err(dev, "failed to request IRQ: %d\n", err);
- goto err;
- }
+ err = request_irq(msi->irq, tegra_pcie_msi_irq, IRQF_NO_THREAD,
+ tegra_msi_irq_chip.name, pcie);
+ if (err < 0) {
+ dev_err(dev, "failed to request IRQ: %d\n", err);
+ goto err;
+ }
- /* setup AFI/FPCI range */
- msi->pages = __get_free_pages(GFP_KERNEL, 0);
- msi->phys = virt_to_phys((void *)msi->pages);
+ /* setup AFI/FPCI range */
+ msi->pages = __get_free_pages(GFP_KERNEL, 0);
+ msi->phys = virt_to_phys((void *)msi->pages);
+ }
afi_writel(pcie, msi->phys >> soc->msi_base_shift, AFI_MSI_FPCI_BAR_ST);
afi_writel(pcie, msi->phys, AFI_MSI_AXI_BAR_ST);
@@ -2831,26 +2825,16 @@ static int tegra_pcie_probe(struct platform_device *pdev)
return err;
}
- err = tegra_pcie_enable_controller(pcie);
- if (err)
+ pm_runtime_enable(pcie->dev);
+ err = pm_runtime_get_sync(pcie->dev);
+ if (err) {
+ dev_err(dev, "fail to enable pcie controller: %d\n", err);
goto put_resources;
+ }
err = tegra_pcie_request_resources(pcie);
if (err)
- goto disable_controller;
-
- /* setup the AFI address translations */
- tegra_pcie_setup_translations(pcie);
-
- if (IS_ENABLED(CONFIG_PCI_MSI)) {
- err = tegra_pcie_enable_msi(pcie);
- if (err < 0) {
- dev_err(dev, "failed to enable MSI support: %d\n", err);
- goto free_resources;
- }
- }
-
- tegra_pcie_enable_ports(pcie);
+ goto pm_runtime_put;
pci_add_flags(PCI_REASSIGN_ALL_RSRC | PCI_REASSIGN_ALL_BUS);
host->busnr = pcie->busn.start;
@@ -2862,7 +2846,7 @@ static int tegra_pcie_probe(struct platform_device *pdev)
err = pci_scan_root_bus_bridge(host);
if (err < 0) {
dev_err(dev, "failed to register host: %d\n", err);
- goto disable_msi;
+ goto free_resources;
}
pci_bus_size_bridges(host->bus);
@@ -2884,14 +2868,13 @@ static int tegra_pcie_probe(struct platform_device *pdev)
return 0;
-disable_msi:
- if (IS_ENABLED(CONFIG_PCI_MSI))
- tegra_pcie_disable_msi(pcie);
- tegra_pcie_disable_ports(pcie);
free_resources:
tegra_pcie_free_resources(pcie);
-disable_controller:
- tegra_pcie_disable_controller(pcie);
+pm_runtime_put:
+ if (IS_ENABLED(CONFIG_PCI_MSI))
+ tegra_pcie_disable_msi(pcie);
+ pm_runtime_put_sync(pcie->dev);
+ pm_runtime_disable(pcie->dev);
put_resources:
tegra_pcie_put_resources(pcie);
return err;
@@ -2901,7 +2884,6 @@ static int tegra_pcie_remove(struct platform_device *pdev)
{
struct tegra_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
- struct tegra_pcie_port *port, *tmp;
if (IS_ENABLED(CONFIG_DEBUG_FS))
tegra_pcie_debugfs_exit(pcie);
@@ -2909,21 +2891,77 @@ static int tegra_pcie_remove(struct platform_device *pdev)
pci_remove_root_bus(host->bus);
if (IS_ENABLED(CONFIG_PCI_MSI))
tegra_pcie_disable_msi(pcie);
+ tegra_pcie_free_resources(pcie);
+ pm_runtime_put_sync(pcie->dev);
+ pm_runtime_disable(pcie->dev);
+ tegra_pcie_put_resources(pcie);
+
+ return 0;
+}
+
+static int tegra_pcie_pm_suspend(struct device *dev)
+{
+ struct tegra_pcie *pcie = dev_get_drvdata(dev);
+ struct tegra_pcie_port *port, *tmp;
+
list_for_each_entry_safe(port, tmp, &pcie->ports, list)
tegra_pcie_pme_turnoff(port);
tegra_pcie_disable_ports(pcie);
- tegra_pcie_free_resources(pcie);
tegra_pcie_disable_controller(pcie);
- tegra_pcie_put_resources(pcie);
+ tegra_pcie_power_off(pcie);
return 0;
}
+static int tegra_pcie_pm_resume(struct device *dev)
+{
+ struct tegra_pcie *pcie = dev_get_drvdata(dev);
+ int err;
+
+ err = tegra_pcie_power_on(pcie);
+ if (err) {
+ dev_err(dev, "tegra pcie power on fail: %d\n", err);
+ return err;
+ }
+ err = tegra_pcie_enable_controller(pcie);
+ if (err) {
+ dev_err(dev, "tegra pcie controller enable fail: %d\n", err);
+ goto poweroff;
+ }
+ tegra_pcie_setup_translations(pcie);
+
+ if (IS_ENABLED(CONFIG_PCI_MSI)) {
+ err = tegra_pcie_enable_msi(pcie);
+ if (err < 0) {
+ dev_err(dev, "failed to enable MSI support: %d\n", err);
+ goto disable_controller;
+ }
+ }
+
+ tegra_pcie_enable_ports(pcie);
+
+ return 0;
+
+disable_controller:
+ tegra_pcie_disable_controller(pcie);
+poweroff:
+ tegra_pcie_power_off(pcie);
+
+ return err;
+}
+
+static const struct dev_pm_ops tegra_pcie_pm_ops = {
+ SET_RUNTIME_PM_OPS(tegra_pcie_pm_suspend, tegra_pcie_pm_resume, NULL)
+ SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_pcie_pm_suspend,
+ tegra_pcie_pm_resume)
+};
+
static struct platform_driver tegra_pcie_driver = {
.driver = {
.name = "tegra-pcie",
.of_match_table = tegra_pcie_of_match,
.suppress_bind_attrs = true,
+ .pm = &tegra_pcie_pm_ops,
},
.probe = tegra_pcie_probe,
.remove = tegra_pcie_remove,
--
2.1.4
^ permalink raw reply related
* [PATCH V2 8/9] PCI: tegra: Broadcast PME_turn_Off message before link goes to L2
From: Manikanta Maddireddy @ 2017-11-25 19:32 UTC (permalink / raw)
To: thierry.reding, jonathanh, robh+dt, frowand.list, bhelgaas, rjw,
tglx
Cc: vidyas, kthota, linux-tegra, devicetree, linux-pci, linux-pm,
Manikanta Maddireddy
In-Reply-To: <1511638333-22951-1-git-send-email-mmaddireddy@nvidia.com>
Per PCIe r3.0, sec 5.3.3.2.1, PCIe root port shoould broadcast PME_turn_Off
message before PCIe link goes to L2. PME_turn_Off broadcast mechanism is
implemented in AFI module. Each Tegra PCIe root port has its own
PME_turn_Off and PME_TO_Ack bitmap in AFI_PME register, program this
register to broadcast PME_turn_Off message.
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
---
V2:
* no change in this patch
drivers/pci/host/pci-tegra.c | 76 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index bbc2807bcd4a..b380958a3deb 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -155,6 +155,8 @@
#define AFI_INTR_EN_FPCI_TIMEOUT (1 << 7)
#define AFI_INTR_EN_PRSNT_SENSE (1 << 8)
+#define AFI_PCIE_PME 0xf0
+
#define AFI_PCIE_CONFIG 0x0f8
#define AFI_PCIE_CONFIG_PCIE_DISABLE(x) (1 << ((x) + 1))
#define AFI_PCIE_CONFIG_PCIE_DISABLE_ALL 0xe
@@ -315,6 +317,7 @@
#define PADS_REFCLK_CFG_DRVI_SHIFT 12 /* 15:12 */
#define LINK_RETRAIN_TIMEOUT 100000
+#define PME_ACK_TIMEOUT 10000
struct tegra_msi {
struct msi_controller chip;
@@ -1503,6 +1506,76 @@ static int tegra_pcie_put_resources(struct tegra_pcie *pcie)
return 0;
}
+static inline u32 get_pme_turnoff_bitmap(struct tegra_pcie_port *port)
+{
+ struct device *dev = port->pcie->dev;
+ struct device_node *np = dev->of_node;
+ int ret = 0;
+
+ switch (port->index) {
+ case 0:
+ ret = 0;
+ case 1:
+ ret = 8;
+ case 2:
+ if (of_device_is_compatible(np, "nvidia,tegra30-pcie"))
+ ret = 16;
+ else
+ ret = 12;
+ }
+ return ret;
+}
+
+static inline u32 get_pme_ack_bitmap(struct tegra_pcie_port *port)
+{
+ struct device *dev = port->pcie->dev;
+ struct device_node *np = dev->of_node;
+ int ret = 0;
+
+ switch (port->index) {
+ case 0:
+ ret = 5;
+ case 1:
+ ret = 10;
+ case 2:
+ if (of_device_is_compatible(np, "nvidia,tegra30-pcie"))
+ ret = 18;
+ else
+ ret = 14;
+ }
+ return ret;
+}
+
+static void tegra_pcie_pme_turnoff(struct tegra_pcie_port *port)
+{
+ struct tegra_pcie *pcie = port->pcie;
+ ktime_t deadline;
+ unsigned int data;
+
+ data = afi_readl(pcie, AFI_PCIE_PME);
+ data |= (0x1 << get_pme_turnoff_bitmap(port));
+ afi_writel(pcie, data, AFI_PCIE_PME);
+
+ deadline = ktime_add_us(ktime_get(), PME_ACK_TIMEOUT);
+ do {
+ data = afi_readl(pcie, AFI_PCIE_PME);
+ data &= (0x1 << get_pme_ack_bitmap(port));
+ udelay(1);
+ if (ktime_after(ktime_get(), deadline))
+ break;
+ } while (!data);
+
+ if (data)
+ dev_err(pcie->dev, "PME Ack is not receieved on port: %d\n",
+ port->index);
+
+ usleep_range(10000, 11000);
+
+ data = afi_readl(pcie, AFI_PCIE_PME);
+ data &= ~(0x1 << get_pme_turnoff_bitmap(port));
+ afi_writel(pcie, data, AFI_PCIE_PME);
+}
+
static int tegra_msi_alloc(struct tegra_msi *chip)
{
int msi;
@@ -2828,6 +2901,7 @@ static int tegra_pcie_remove(struct platform_device *pdev)
{
struct tegra_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
+ struct tegra_pcie_port *port, *tmp;
if (IS_ENABLED(CONFIG_DEBUG_FS))
tegra_pcie_debugfs_exit(pcie);
@@ -2835,6 +2909,8 @@ static int tegra_pcie_remove(struct platform_device *pdev)
pci_remove_root_bus(host->bus);
if (IS_ENABLED(CONFIG_PCI_MSI))
tegra_pcie_disable_msi(pcie);
+ list_for_each_entry_safe(port, tmp, &pcie->ports, list)
+ tegra_pcie_pme_turnoff(port);
tegra_pcie_disable_ports(pcie);
tegra_pcie_free_resources(pcie);
tegra_pcie_disable_controller(pcie);
--
2.1.4
^ permalink raw reply related
* [PATCH V2 7/9] PCI: tegra: Add loadable kernel module support
From: Manikanta Maddireddy @ 2017-11-25 19:32 UTC (permalink / raw)
To: thierry.reding, jonathanh, robh+dt, frowand.list, bhelgaas, rjw,
tglx
Cc: vidyas, kthota, linux-tegra, devicetree, linux-pci, linux-pm,
Manikanta Maddireddy
In-Reply-To: <1511638333-22951-1-git-send-email-mmaddireddy@nvidia.com>
Implement remove callback function for Tegra PCIe driver to add
loadable kernel module support. Change PCI_TEGRA config to tristate to
allow pci-tegra driver to be build as a module.
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
---
V2:
* no change in this patch
drivers/pci/host/Kconfig | 2 +-
drivers/pci/host/pci-tegra.c | 31 ++++++++++++++++++++++++++++++-
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index 38d12980db0f..6fd2a5937804 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -34,7 +34,7 @@ config PCI_FTPCI100
default ARCH_GEMINI
config PCI_TEGRA
- bool "NVIDIA Tegra PCIe controller"
+ tristate "NVIDIA Tegra PCIe controller"
depends on ARCH_TEGRA
help
Say Y here if you want support for the PCIe host controller found
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 7f7b8c9c1e84..bbc2807bcd4a 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -35,6 +35,7 @@
#include <linux/irqdomain.h>
#include <linux/kernel.h>
#include <linux/init.h>
+#include <linux/module.h>
#include <linux/msi.h>
#include <linux/of_address.h>
#include <linux/of_pci.h>
@@ -2720,6 +2721,12 @@ static int tegra_pcie_debugfs_init(struct tegra_pcie *pcie)
return -ENOMEM;
}
+static void tegra_pcie_debugfs_exit(struct tegra_pcie *pcie)
+{
+ debugfs_remove_recursive(pcie->debugfs);
+ pcie->debugfs = NULL;
+}
+
static int tegra_pcie_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -2734,6 +2741,7 @@ static int tegra_pcie_probe(struct platform_device *pdev)
return -ENOMEM;
pcie = pci_host_bridge_priv(host);
+ platform_set_drvdata(pdev, pcie);
pcie->soc = of_device_get_match_data(dev);
INIT_LIST_HEAD(&pcie->buses);
@@ -2816,6 +2824,25 @@ static int tegra_pcie_probe(struct platform_device *pdev)
return err;
}
+static int tegra_pcie_remove(struct platform_device *pdev)
+{
+ struct tegra_pcie *pcie = platform_get_drvdata(pdev);
+ struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
+
+ if (IS_ENABLED(CONFIG_DEBUG_FS))
+ tegra_pcie_debugfs_exit(pcie);
+ pci_stop_root_bus(host->bus);
+ pci_remove_root_bus(host->bus);
+ if (IS_ENABLED(CONFIG_PCI_MSI))
+ tegra_pcie_disable_msi(pcie);
+ tegra_pcie_disable_ports(pcie);
+ tegra_pcie_free_resources(pcie);
+ tegra_pcie_disable_controller(pcie);
+ tegra_pcie_put_resources(pcie);
+
+ return 0;
+}
+
static struct platform_driver tegra_pcie_driver = {
.driver = {
.name = "tegra-pcie",
@@ -2823,5 +2850,7 @@ static struct platform_driver tegra_pcie_driver = {
.suppress_bind_attrs = true,
},
.probe = tegra_pcie_probe,
+ .remove = tegra_pcie_remove,
};
-builtin_platform_driver(tegra_pcie_driver);
+module_platform_driver(tegra_pcie_driver);
+MODULE_LICENSE("GPL");
--
2.1.4
^ permalink raw reply related
* [PATCH V2 6/9] PCI: tegra: free resources on probe failure
From: Manikanta Maddireddy @ 2017-11-25 19:32 UTC (permalink / raw)
To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
jonathanh-DDmLM1+adcrQT0dZR+AlfA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, rjw-LthD3rsA81gm4RdzfppkhA,
tglx-hfZtesqFncYOwBW4kG4KsQ
Cc: vidyas-DDmLM1+adcrQT0dZR+AlfA, kthota-DDmLM1+adcrQT0dZR+AlfA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA,
Manikanta Maddireddy
In-Reply-To: <1511638333-22951-1-git-send-email-mmaddireddy-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
tegra_pcie_probe() can fail in multiple instances, this patch takes care
of freeing the resources which are allocated before probe fail.
Signed-off-by: Manikanta Maddireddy <mmaddireddy-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
V2:
* no change in this patch
drivers/pci/host/pci-tegra.c | 102 ++++++++++++++++++++++++++++++++++++-------
1 file changed, 86 insertions(+), 16 deletions(-)
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index e9b3ff95e259..7f7b8c9c1e84 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -701,14 +701,25 @@ static int tegra_pcie_request_resources(struct tegra_pcie *pcie)
pci_add_resource(windows, &pcie->busn);
err = devm_request_pci_bus_resources(dev, windows);
- if (err < 0)
+ if (err < 0) {
+ pci_free_resource_list(windows);
return err;
+ }
pci_remap_iospace(&pcie->pio, pcie->io.start);
return 0;
}
+static void tegra_pcie_free_resources(struct tegra_pcie *pcie)
+{
+ struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
+ struct list_head *windows = &host->windows;
+
+ pci_unmap_iospace(&pcie->pio);
+ pci_free_resource_list(windows);
+}
+
static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
{
struct pci_host_bridge *host = pci_find_host_bridge(pdev->bus);
@@ -1109,29 +1120,40 @@ static int tegra_pcie_enable_controller(struct tegra_pcie *pcie)
return 0;
}
-static void tegra_pcie_power_off(struct tegra_pcie *pcie)
+static void tegra_pcie_disable_controller(struct tegra_pcie *pcie)
{
struct device *dev = pcie->dev;
const struct tegra_pcie_soc *soc = pcie->soc;
int err;
- /* TODO: disable and unprepare clocks? */
-
if (soc->program_uphy) {
err = tegra_pcie_phy_power_off(pcie);
if (err < 0)
dev_err(dev, "failed to power off PHY(s): %d\n", err);
}
+}
+
+static void tegra_pcie_power_off(struct tegra_pcie *pcie)
+{
+ struct device *dev = pcie->dev;
+ const struct tegra_pcie_soc *soc = pcie->soc;
+ int err;
reset_control_assert(pcie->afi_rst);
reset_control_assert(pcie->pex_rst);
- if (!dev->pm_domain)
- tegra_powergate_power_off(TEGRA_POWERGATE_PCIE);
+ clk_disable_unprepare(pcie->pll_e);
+ if (soc->has_cml_clk)
+ clk_disable_unprepare(pcie->cml_clk);
+ clk_disable_unprepare(pcie->afi_clk);
+ clk_disable_unprepare(pcie->pex_clk);
err = regulator_bulk_disable(pcie->num_supplies, pcie->supplies);
if (err < 0)
dev_warn(dev, "failed to disable regulators: %d\n", err);
+
+ if (!dev->pm_domain)
+ tegra_powergate_power_off(TEGRA_POWERGATE_PCIE);
}
static int tegra_pcie_power_on(struct tegra_pcie *pcie)
@@ -1262,6 +1284,15 @@ static int tegra_pcie_phys_get_legacy(struct tegra_pcie *pcie)
return 0;
}
+static void tegra_pcie_phys_put_legacy(struct tegra_pcie *pcie)
+{
+ int err;
+
+ err = phy_exit(pcie->phy);
+ if (err < 0)
+ dev_err(pcie->dev, "failed to teardown PHY: %d\n", err);
+}
+
static struct phy *devm_of_phy_optional_get_index(struct device *dev,
struct device_node *np,
const char *consumer,
@@ -1315,6 +1346,19 @@ static int tegra_pcie_port_get_phys(struct tegra_pcie_port *port)
return 0;
}
+static void tegra_pcie_port_put_phys(struct tegra_pcie_port *port)
+{
+ struct device *dev = port->pcie->dev;
+ unsigned int i;
+ int err;
+
+ for (i = 0; i < port->lanes; i++) {
+ err = phy_exit(port->phys[i]);
+ if (err < 0)
+ dev_err(dev, "failed to teardown PHY#%u: %d\n", i, err);
+ }
+}
+
static int tegra_pcie_phys_get(struct tegra_pcie *pcie)
{
const struct tegra_pcie_soc *soc = pcie->soc;
@@ -1334,6 +1378,19 @@ static int tegra_pcie_phys_get(struct tegra_pcie *pcie)
return 0;
}
+static void tegra_pcie_phys_put(struct tegra_pcie *pcie)
+{
+ const struct tegra_pcie_soc *soc = pcie->soc;
+ struct device_node *np = pcie->dev->of_node;
+ struct tegra_pcie_port *port;
+
+ if (!soc->has_gen2 || of_find_property(np, "phys", NULL) != NULL)
+ tegra_pcie_phys_put_legacy(pcie);
+
+ list_for_each_entry(port, &pcie->ports, list)
+ tegra_pcie_port_put_phys(port);
+}
+
static int tegra_pcie_get_resources(struct tegra_pcie *pcie)
{
struct device *dev = pcie->dev;
@@ -1366,7 +1423,7 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie)
err = tegra_pcie_power_on(pcie);
if (err) {
dev_err(dev, "failed to power up: %d\n", err);
- return err;
+ goto phys_put;
}
pads = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pads");
@@ -1424,25 +1481,23 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie)
poweroff:
tegra_pcie_power_off(pcie);
+phys_put:
+ if (soc->program_uphy)
+ tegra_pcie_phys_put(pcie);
return err;
}
static int tegra_pcie_put_resources(struct tegra_pcie *pcie)
{
- struct device *dev = pcie->dev;
const struct tegra_pcie_soc *soc = pcie->soc;
- int err;
if (pcie->irq > 0)
free_irq(pcie->irq, pcie);
tegra_pcie_power_off(pcie);
- if (soc->program_uphy) {
- err = phy_exit(pcie->phy);
- if (err < 0)
- dev_err(dev, "failed to teardown PHY: %d\n", err);
- }
+ if (soc->program_uphy)
+ tegra_pcie_phys_put(pcie);
return 0;
}
@@ -2371,6 +2426,16 @@ static void tegra_pcie_enable_ports(struct tegra_pcie *pcie)
}
}
+static void tegra_pcie_disable_ports(struct tegra_pcie *pcie)
+{
+ struct tegra_pcie_port *port, *tmp;
+
+ reset_control_assert(pcie->pcie_xrst);
+
+ list_for_each_entry_safe(port, tmp, &pcie->ports, list)
+ tegra_pcie_port_disable(port);
+}
+
static void tegra_pcie_change_link_speed(struct tegra_pcie *pcie,
struct pci_dev *pci_dev)
{
@@ -2691,7 +2756,7 @@ static int tegra_pcie_probe(struct platform_device *pdev)
err = tegra_pcie_request_resources(pcie);
if (err)
- goto put_resources;
+ goto disable_controller;
/* setup the AFI address translations */
tegra_pcie_setup_translations(pcie);
@@ -2700,7 +2765,7 @@ static int tegra_pcie_probe(struct platform_device *pdev)
err = tegra_pcie_enable_msi(pcie);
if (err < 0) {
dev_err(dev, "failed to enable MSI support: %d\n", err);
- goto put_resources;
+ goto free_resources;
}
}
@@ -2741,6 +2806,11 @@ static int tegra_pcie_probe(struct platform_device *pdev)
disable_msi:
if (IS_ENABLED(CONFIG_PCI_MSI))
tegra_pcie_disable_msi(pcie);
+ tegra_pcie_disable_ports(pcie);
+free_resources:
+ tegra_pcie_free_resources(pcie);
+disable_controller:
+ tegra_pcie_disable_controller(pcie);
put_resources:
tegra_pcie_put_resources(pcie);
return err;
--
2.1.4
^ permalink raw reply related
* [PATCH V2 5/9] PCI: Export pci_flags
From: Manikanta Maddireddy @ 2017-11-25 19:32 UTC (permalink / raw)
To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
jonathanh-DDmLM1+adcrQT0dZR+AlfA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, rjw-LthD3rsA81gm4RdzfppkhA,
tglx-hfZtesqFncYOwBW4kG4KsQ
Cc: vidyas-DDmLM1+adcrQT0dZR+AlfA, kthota-DDmLM1+adcrQT0dZR+AlfA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA,
Manikanta Maddireddy
In-Reply-To: <1511638333-22951-1-git-send-email-mmaddireddy-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
pci_flags variable is used in inline functions in 'pci.h', Tegra PCIe
driver use one of these functions pci_add_flags() and includes 'pci.h'.
Export pci_flags to allow Tegra PCIe host controller driver to be
compiled as loadable kernel module.
Signed-off-by: Manikanta Maddireddy <mmaddireddy-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
V2:
* commit message update
drivers/pci/setup-bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index b1ad466199ad..3567e1c4e340 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -29,6 +29,7 @@
#include "pci.h"
unsigned int pci_flags;
+EXPORT_SYMBOL(pci_flags);
struct pci_dev_resource {
struct list_head list;
--
2.1.4
^ permalink raw reply related
* [PATCH V2 4/9] PCI: Export pci_find_host_bridge()
From: Manikanta Maddireddy @ 2017-11-25 19:32 UTC (permalink / raw)
To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
jonathanh-DDmLM1+adcrQT0dZR+AlfA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, rjw-LthD3rsA81gm4RdzfppkhA,
tglx-hfZtesqFncYOwBW4kG4KsQ
Cc: vidyas-DDmLM1+adcrQT0dZR+AlfA, kthota-DDmLM1+adcrQT0dZR+AlfA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA,
Manikanta Maddireddy
In-Reply-To: <1511638333-22951-1-git-send-email-mmaddireddy-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
PCI subsystem pass pci_bus pointer to pci_ops callback functions, Tegra
host driver use pci_find_host_bridge() to get pci_host_bridge from pci_bus.
Export pci_find_host_bridge() to allow Tegra PCIe driver to be compiled as
loadable kernel module.
Signed-off-by: Manikanta Maddireddy <mmaddireddy-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
V2:
* commit message update
drivers/pci/host-bridge.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
index add66236215c..e0942fc086ad 100644
--- a/drivers/pci/host-bridge.c
+++ b/drivers/pci/host-bridge.c
@@ -22,6 +22,7 @@ struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus)
return to_pci_host_bridge(root_bus->bridge);
}
+EXPORT_SYMBOL(pci_find_host_bridge);
struct device *pci_get_host_bridge_device(struct pci_dev *dev)
{
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH V2 3/9] ARM: tegra: Export tegra_cpuidle_pcie_irqs_in_use()
From: Manikanta Maddireddy @ 2017-11-25 19:32 UTC (permalink / raw)
To: thierry.reding, jonathanh, robh+dt, frowand.list, bhelgaas, rjw,
tglx
Cc: vidyas, kthota, linux-tegra, devicetree, linux-pci, linux-pm,
Manikanta Maddireddy
In-Reply-To: <1511638333-22951-1-git-send-email-mmaddireddy@nvidia.com>
Tegra20 has a HW bug where PCIe interrupts are lost when LP2 (Tegra idle
state) is enabled. tegra_cpuidle_pcie_irqs_in_use() disables LP2 when
PCIe irq is mapped. EXPORT tegra_cpuidle_pcie_irqs_in_use() to allow Tegra
PCIe driver to be compiled as loadable kernel module.
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
---
V2:
* commit message update
arch/arm/mach-tegra/cpuidle.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c
index 316563141add..7d7e6d3ce32d 100644
--- a/arch/arm/mach-tegra/cpuidle.c
+++ b/arch/arm/mach-tegra/cpuidle.c
@@ -57,3 +57,4 @@ void tegra_cpuidle_pcie_irqs_in_use(void)
break;
}
}
+EXPORT_SYMBOL(tegra_cpuidle_pcie_irqs_in_use);
--
2.1.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox