lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 13 Apr 2023 03:44:27 +0000
From:   Stanley Chang[昌育德] 
        <stanley_chang@...ltek.com>
To:     Thinh Nguyen <Thinh.Nguyen@...opsys.com>
CC:     "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 1/2] usb: dwc3: core: add support for remapping global register start address


> > > +     /*
> > > +      * For some dwc3 controller, the dwc3 global register start address
> is
> > > +      * not at DWC3_GLOBALS_REGS_START (0xc100).
> > > +      */
> > > +     if (dev->of_node) {
> > > +             int global_regs_starting_offset = 0;
> > > +
> > > +             device_property_read_u32(dev,
> > "snps,global-regs-starting-offset",
> > > +                              &global_regs_starting_offset);
> >
> > I suggested to use compatible string instead since this isn't common
> > and only unique to your platform. Any reason we shouldn't do that?
> >
> > ie. something like this:
> >
> > if (dev->of_node && of_device_is_compatiable(dev->of_node,
> > "your-platform"))
> >         dwc_res.start += your_platform_offset; else
> >         dwc_res.start = DWC3_GLOBALS_REGS_START;
> >
> 
> I will try this suggestion.
> 
> Thanks,
> Stanley

The dwc3/core is a general driver for every dwc3 IP of SoCs,
and vendor's definition and compatible should specify on its parent.
This should be inappropriate if we add a special platform compatible to dwc3/core driver.
Therefore, I define this property to adjust this value. This is more resilient.
If there are other platforms that also have non-standard offset, this property is also applicable.

Thank,
Stanley

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ