From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v6 2/5] spi: cadence_qspi: fix indirect read/write start address
Date: Wed, 23 Sep 2015 12:42:07 +0200 [thread overview]
Message-ID: <201509231242.07759.marex@denx.de> (raw)
In-Reply-To: <CAD6G_RR+Sy5tiD0AmypmB2s7KzSWvYZAqdJ-s5CT0qrE1oBmNw@mail.gmail.com>
On Wednesday, September 23, 2015 at 12:30:34 PM, Jagan Teki wrote:
> On 23 September 2015 at 15:43, Marek Vasut <marex@denx.de> wrote:
> > On Wednesday, September 23, 2015 at 12:11:20 PM, Jagan Teki wrote:
> >> On 11 September 2015 at 23:58, Vikas Manocha <vikas.manocha@st.com> wrote:
> >> > Indirect read/write start addresses are flash start addresses for
> >> > indirect read or write transfers. These should be absolute flash
> >> > addresses instead of offsets.
> >> >
> >> > Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
> >>
> >> Reviewed-by: Jagan Teki <jteki@openedev.com>
> >>
> >> > ---
> >> >
> >> > Changes in v6: none
> >> > Changes in v5: fixed type cast compilation warnings.
> >> > Changes in v4: removed extra type casts.
> >> > Changes in v3: none
> >> > Changes in v2: Rebased to master
> >> >
> >> > drivers/spi/cadence_qspi_apb.c | 6 ++++--
> >> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/drivers/spi/cadence_qspi_apb.c
> >> > b/drivers/spi/cadence_qspi_apb.c index d377ad1..c5b14c5 100644
> >> > --- a/drivers/spi/cadence_qspi_apb.c
> >> > +++ b/drivers/spi/cadence_qspi_apb.c
> >> > @@ -705,7 +705,8 @@ int cadence_qspi_apb_indirect_read_setup(struct
> >> > cadence_spi_platdata *plat,
> >> >
> >> > /* Get address */
> >> > addr_value = cadence_qspi_apb_cmd2addr(&cmdbuf[1],
> >> > addr_bytes);
> >> >
> >> > - writel(addr_value, plat->regbase +
> >> > CQSPI_REG_INDIRECTRDSTARTADDR); + writel((u32)plat->ahbbase +
> >> > addr_value,
> >> > + plat->regbase + CQSPI_REG_INDIRECTRDSTARTADDR);
> >> >
> >> > /* The remaining lenght is dummy bytes. */
> >> > dummy_bytes = cmdlen - addr_bytes - 1;
> >> >
> >> > @@ -795,7 +796,8 @@ int cadence_qspi_apb_indirect_write_setup(struct
> >> > cadence_spi_platdata *plat,
> >> >
> >> > /* Setup write address. */
> >> > reg = cadence_qspi_apb_cmd2addr(&cmdbuf[1], addr_bytes);
> >> >
> >> > - writel(reg, plat->regbase + CQSPI_REG_INDIRECTWRSTARTADDR);
> >> > + writel((u32)plat->ahbbase + reg,
> >
> > Jagan, is introducing ad-hoc typecasts to suppress warnings OK with you ?
>
> I think there are few ad-hoc typecasts similar to were there in the
> driver, do you have any other thoughts?
Yes, for example -- fix the few, then add new features. Adding more just because
there were some before is a totally shitty approach.
Best regards,
Marek Vasut
next prev parent reply other threads:[~2015-09-23 10:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 18:28 [U-Boot] [PATCH v6 0/5] spi: cadence_qspi: optimize & fix indirect rd-writes Vikas Manocha
2015-09-11 18:28 ` [U-Boot] [PATCH v6 1/5] spi: cadence_qspi: move trigger base configuration in init Vikas Manocha
2015-09-23 10:06 ` Jagan Teki
2015-09-11 18:28 ` [U-Boot] [PATCH v6 2/5] spi: cadence_qspi: fix indirect read/write start address Vikas Manocha
2015-09-23 10:11 ` Jagan Teki
2015-09-23 10:13 ` Marek Vasut
2015-09-23 10:30 ` Jagan Teki
2015-09-23 10:42 ` Marek Vasut [this message]
2015-09-23 18:01 ` Jagan Teki
2015-09-11 18:28 ` [U-Boot] [PATCH v6 3/5] spi: cadence_qspi: fix base trigger address & transfer " Vikas Manocha
2015-09-23 10:14 ` Jagan Teki
2015-09-11 18:28 ` [U-Boot] [PATCH v6 4/5] spi: cadence_qspi: rename ahbbase to flashbase for clarity Vikas Manocha
2015-09-23 10:15 ` Jagan Teki
2015-09-23 17:54 ` Vikas MANOCHA
2015-09-11 18:28 ` [U-Boot] [PATCH v6 5/5] spi: cadence_qspi: get fifo width from device tree Vikas Manocha
2015-09-23 11:00 ` Jagan Teki
2015-09-23 18:01 ` Vikas MANOCHA
2015-09-21 18:01 ` [U-Boot] [PATCH v6 0/5] spi: cadence_qspi: optimize & fix indirect rd-writes Vikas MANOCHA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201509231242.07759.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox