From: Arnd Bergmann <arnd@arndb.de>
To: Michal Simek <michal.simek@xilinx.com>
Cc: linux-kernel@vger.kernel.org, Michal Simek <monstr@monstr.eu>,
Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2 2/3] video: xilinxfb: Do not use out_be32 IO function
Date: Thu, 30 May 2013 22:04:01 +0000 [thread overview]
Message-ID: <3808365.SOUxDqkW9J@wuerfel> (raw)
In-Reply-To: <a15de155a3f32fc1416833df1b281db05d347541.1369906849.git.michal.simek@xilinx.com>
On Thursday 30 May 2013 11:41:01 Michal Simek wrote:
> * To perform the read/write on the registers we need to check on
> * which bus its connected and call the appropriate write API.
> */
> -static void xilinx_fb_out_be32(struct xilinxfb_drvdata *drvdata, u32 offset,
> +static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset,
> u32 val)
> {
> if (drvdata->flags & PLB_ACCESS_FLAG)
> - out_be32(drvdata->regs + (offset << 2), val);
> + __raw_writel(val, drvdata->regs + (offset << 2));
> #ifdef CONFIG_PPC_DCR
> else
> dcr_write(drvdata->dcr_host, offset, val);
>
This is probably missing barriers, and is wrong on systems on which
the endianess of the device is different from the CPU.
You already have an indirection in there, so I guess it won't hurt
to create a third case for little-endian registers and add
another bit in drvdata->flags, or make it depend on the architecture,
if the endianess of the device registers is known at compile time.
Arnd
next prev parent reply other threads:[~2013-05-30 22:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 9:41 [PATCH v2 1/3] video: xilinxfb: Fix OF probing on little-endian systems Michal Simek
2013-05-30 9:41 ` [PATCH v2 2/3] video: xilinxfb: Do not use out_be32 IO function Michal Simek
2013-05-30 22:04 ` Arnd Bergmann [this message]
2013-05-31 1:16 ` Timur Tabi
2013-05-31 7:39 ` Michal Simek
2013-05-30 9:41 ` [PATCH v2 3/3] video: xilinxfb: Use driver for Xilinx ARM Zynq Michal Simek
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=3808365.SOUxDqkW9J@wuerfel \
--to=arnd@arndb.de \
--cc=FlorianSchandinat@gmx.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=monstr@monstr.eu \
/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