Re: [PATCH v3 19/19] usb: dwc3: add support for AMD NL platform

From: Huang Rui
Date: Wed Oct 29 2014 - 10:36:45 EST


On Wed, Oct 29, 2014 at 09:11:46AM -0500, Felipe Balbi wrote:
> On Wed, Oct 29, 2014 at 05:13:43PM +0800, Huang Rui wrote:
> > Hi Felipe, Paul,
> >
> > On Tue, Oct 28, 2014 at 10:35:37PM +0800, Huang Rui wrote:
> > > On Tue, Oct 28, 2014 at 08:38:56AM -0500, Felipe Balbi wrote:
> >
> > <snip>
> >
> > > >
> > > > however, as I mentioned before, the core shouldn't have to know that
> > > > it's running on an AMD platform. We already support several different
> > > > platforms (OMAP5, AM437x, DRA7xx, Exynos5, Exynos7, Qcom, Merrifield,
> > > > Baytrail, Braswell, HAPS PCIe, and STiH407) and none of them get their
> > > > $my_awesome_platform flag in dwc3, why should AMD be any different ?
> > > >
> > > > This is the only part of $subject that I cannot accept because it would
> > > > mean we would be giving AMD a special treatment when there shouldn't be
> > > > any, for anybody.
> > > >
> > >
> > > That's because I used this flag to enable below quirks on AMD NL FPGA
> > > board, and FPGA flag only can be detected on core. Can I set
> > > disable_scramble_quirk, dis_u3_susphy_quirk, and dis_u2_susphy_quirk
> > > for all the FPGA platforms?
> > >
> > > if (dwc->amd_nl_plat && dwc->is_fpga) {
> > > dwc->disable_scramble_quirk = true;
> > > dwc->dis_u3_susphy_quirk = true;
> > > dwc->dis_u2_susphy_quirk = true;
> > > }
> > >
> >
> > I confirmed with HW designer, these three quirks only will be needed
> > on FPGA board. And these should *not* be used on non-FPGA board, as you
> > known.
> >
> > So I would like to use below conditions on dwc3 core. When I set these
> > quirk flags in pci glue layer, then core can filter them by is_fpga
> > flag to support both on FPGA and SoC. Is there any concern? If that, I
> > should remove WARN_ONCE at disable_scramble flag.
> >
> > if (dwc->disable_scramble_quirk && dwc->is_fpga) {..}
> >
> > if (dwc->dis_u2_susphy_quirk && dwc->is_fpga) {..}
> >
> > if (dwc->dis_u3_susphy_quirk && dwc->is_fpga) {..}
>
> the problem is that somebody might need this on non-FPGA. Currently,
> only AMD needs these and only on FPGA, but you never know.
>
> I guess we can add it like this for now and once we have a real AMD
> product, we drop FPGA support from AMD.
>

OK, agree.

Then I comments below WARN_ONCE, OK?

/* FIXME it should be used after AMD NL product taps out */
#if 0
WARN_ONCE(dwc->disable_scramble_quirk && !dwc->is_fpga,
"disable_scramble cannot be used on non-FPGA builds\n");
#endif

Thanks,
Rui
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/