Re: [cip-dev] [RFC PATCH 4.19.y-cip 41/50] PCI: rcar: Add endpoint mode support

Lad Prabhakar
2020-10-15T16:31:54Z

[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]

Hi Pavel,

Thank you for the review.

> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: 14 October 2020 10:22
> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Cc: cip-dev@lists.cip-project.org; Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek <pavel@denx.de>; Biju Das
> <biju.das.jz@bp.renesas.com>
> Subject: Re: [RFC PATCH 4.19.y-cip 41/50] PCI: rcar: Add endpoint mode support
>
> Hi!
>
> > commit 2a6d0d63d99956a66f6605832f11755d74a41951 upstream.
> >
> > Add support for R-Car PCIe controller to work in endpoint mode.
>
> > +ep->ob_window[i].phys_base = res->start;
> > +ep->ob_window[i].size = resource_size(res);
> > +/* controller doesn't support multiple allocation
> > + * from same window, so set page_size to window size
> > + */
>
> Comment not according to CodingStyle.
>
Yep
> > +memset(&win, 0x0, sizeof(win));
> > +memset(&res, 0x0, sizeof(res));
>
> Plain 0 would be enough
>
Agreed.

Ill post patches upstream to fix this and then backport or do you want me to do the changes in place ?
>
> > +val |= ASTINTX;
> > +rcar_pci_write_reg(pcie, val, PCIEINTXR);
> > +usleep_range(1000, 1001);
> > +val = rcar_pci_read_reg(pcie, PCIEINTXR);
>
> This is crazy. Either you need exact timing or you don't, but I don't
> believe usleep can guarantee microsecond accuracy.
>
> (And you probably don't need it, right?)
>
Indeed a sleep is needed but checkpatch complains about it so usleep_range() was added.

Cheers,
Prabhakar

> Best regards,
> Pavel
> --
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647

[-- Attachment #2: Type: text/plain, Size: 420 bytes --]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5582): https://lists.cip-project.org/g/cip-dev/message/5582
Mute This Topic: https://lists.cip-project.org/mt/77461723/4520388