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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <153818192522.119890.9441387074333006354@swboyd.mtv.corp.google.com>
Date:   Fri, 28 Sep 2018 17:45:25 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     Ryan Case <ryandcase@...omium.org>
Cc:     Mark Brown <broonie@...nel.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        linux-arm-msm@...r.kernel.org,
        Doug Anderson <dianders@...omium.org>,
        Trent Piepho <tpiepho@...inj.com>,
        Boris Brezillon <boris.brezillon@...tlin.com>,
        Girish Mahadevan <girishm@...eaurora.org>,
        linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org
Subject: Re: [PATCH v3 2/2] spi: Introduce new driver for Qualcomm QuadSPI controller

Quoting Ryan Case (2018-09-28 11:19:51)
> On Wed, Sep 26, 2018 at 11:43 PM Stephen Boyd <swboyd@...omium.org> wrote:
> > Quoting Ryan Case (2018-09-26 13:52:04)
> > > From: Girish Mahadevan <girishm@...eaurora.org>
> > > +#include <asm/unaligned.h>
> > > +
> > > +#define AHB_MIN_HZ             9600000UL
> >
> > Is this used?
> 
> Nope. Do you want all currently unused defines removed or specifically this
> one? I saw precedent in other drivers for defining registers/flags/values of
> supported but unused functionality so I left these (big endian, DDR, ...).

I guess it's fine but I don't know if it will ever be used so remove it?
I'd leave the others if they help someone know what register bits exist.
That's usually how I handle it.

> 
> 
> > > +       speed_hz = slv->max_speed_hz;
> > > +       if (xfer->speed_hz)
> > > +               speed_hz = xfer->speed_hz;
> > > +
> > > +       ret = clk_set_rate(ctrl->clks[QSPI_CLK_CORE].clk, speed_hz * 4);
> >
> > Why 4? Is that related to the number of wires?
> 
> In normal operation the core clock should be running at 4x the rate of the
> transfer clock regardless of number of wires used.

Ok. Maybe add a comment so we understand that.

> 
> > > +                       put_unaligned(rd_fifo, word_buf++);
> > > +               }
> > > +               ctrl->xfer.rx_buf = word_buf;
> > > +       }
> > > +
> > > +       if (bytes_to_read) {
> > > +               byte_buf = ctrl->xfer.rx_buf;
> >
> > Does this need to move forward by words_to_read bytes so that the left
> > over bytes are tacked onto the end? Or this should be an else if
> > statement?
> 
> When the words block completes it updates the rx_buf location so it is already
> at the correct offset for bytes.
> 

Ok I see. Subtle!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ