From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3] C_CAN: Add 32-bit accesses
Date: Mon, 12 May 2014 17:47:29 +0200 [thread overview]
Message-ID: <5370ED11.4000002@pengutronix.de> (raw)
In-Reply-To: <20140506135702.GA9879@amd.pavel.ucw.cz>
On 05/06/2014 03:57 PM, Pavel Machek wrote:
> Add helpers for 32-bit accesses and replace open-coded 32-bit access
> with calls to helpers. Minimum changes are done to the pci case, as I
> don't have access to that hardware.
I'll ask David Miller to merge net/master into net-next/master so that I
can apply this patch.
For now, I've applied the patch to can-next testing-c_can
(git://gitorious.org/linux-can/linux-can-next.git testing-c_can)
Can you make other patches based on that tree, please.
> --- a/drivers/net/can/c_can/c_can_pci.c
> +++ b/drivers/net/can/c_can/c_can_pci.c
> @@ -63,6 +63,23 @@ static void c_can_pci_write_reg_aligned_to_32bit(struct c_can_priv *priv,
> writew(val, priv->base + 2 * priv->regs[index]);
> }
>
> +static u32 c_can_plat_read_reg32(struct c_can_priv *priv, enum reg index)
> +{
> + u32 val;
> +
> + val = priv->read_reg(priv, index);
> + val |= ((u32) priv->read_reg(priv, index + 1)) << 16;
> +
> + return val;
> +}
> +
> +static void c_can_plat_write_reg32(struct c_can_priv *priv, enum reg index,
> + u32 val)
> +{
> + priv->write_reg(priv, index + 1, val>>16);
spaces around >>, I'll fix this while applying.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 242 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140512/f8f4bdc9/attachment-0001.sig>
next prev parent reply other threads:[~2014-05-12 15:47 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 7:11 [PATCH v2 1/6] ARM: socfpga: dts: fix pdma interrupt Steffen Trumtrar
2014-04-02 7:11 ` [PATCH v2 2/6] ARM: socfpga: dts: add remaining interrupts for pdma Steffen Trumtrar
2014-04-02 7:11 ` [PATCH v2 3/6] ARM: socfpga: dts: add i2c busses Steffen Trumtrar
2014-04-02 7:11 ` [PATCH v2 4/6] ARM: socfpga: dts: add can0+1 Steffen Trumtrar
2014-04-04 10:28 ` Pavel Machek
2014-04-25 19:53 ` can problems on socfpga [was Re: [PATCH v2 4/6] ARM: socfpga: dts: add can0+1] Pavel Machek
2014-04-25 20:24 ` Dinh Nguyen
2014-04-25 21:31 ` Thor Thayer
2014-04-26 8:57 ` Pavel Machek
2014-04-26 9:16 ` Pavel Machek
2014-04-26 9:36 ` Pavel Machek
2014-04-26 20:31 ` Pavel Machek
2014-04-26 20:51 ` Oliver Hartkopp
2014-04-26 22:37 ` Marc Kleine-Budde
2014-04-27 12:25 ` [patch] Fix CAN on socfpga, for net/master Pavel Machek
2014-04-28 20:20 ` Thor Thayer
2014-04-28 21:15 ` Pavel Machek
2014-04-28 23:37 ` T Thayer
[not found] ` <CAF03EBd19PC5RAsLR6-dMPF2x3XRf9X4bFPgX2kRdCYWUQBYcA@mail.gmail.com>
2014-04-30 21:53 ` Pavel Machek
2014-05-01 13:15 ` Thor Thayer
2014-05-02 8:48 ` [PATCHv2] " Pavel Machek
2014-05-02 12:27 ` Marc Kleine-Budde
2014-05-05 12:07 ` Pavel Machek
2014-05-13 12:07 ` Pavel Machek
2014-05-05 12:08 ` [PATCH 2/2] Add 32-bit accesses Pavel Machek
2014-05-05 12:40 ` Marc Kleine-Budde
2014-05-06 13:57 ` [PATCHv3] C_CAN: " Pavel Machek
2014-05-12 15:47 ` Marc Kleine-Budde [this message]
2014-05-13 11:29 ` Pavel Machek
2014-05-13 13:09 ` [PATCHv3] C_CAN: hwinit support for non-TI devices Pavel Machek
2014-05-13 13:36 ` Marc Kleine-Budde
2014-05-13 15:08 ` Pavel Machek
2014-05-13 15:18 ` Marc Kleine-Budde
2014-05-05 12:08 ` [PATCH 1/2] " Pavel Machek
2014-05-05 12:21 ` Marc Kleine-Budde
2014-05-05 12:22 ` Marc Kleine-Budde
2014-05-05 12:58 ` Pavel Machek
2014-05-05 13:00 ` Marc Kleine-Budde
2014-05-05 13:00 ` Pavel Machek
2014-04-02 7:11 ` [PATCH v2 5/6] ARM: socfpga: dts: add support for EBV SOCrates Steffen Trumtrar
2014-04-04 10:28 ` Pavel Machek
2014-04-02 7:11 ` [PATCH v2 6/6] ARM: socfpga: dts: add rtc on i2c0 to socrates Steffen Trumtrar
2014-04-02 17:33 ` [PATCH v2 1/6] ARM: socfpga: dts: fix pdma interrupt Dinh Nguyen
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=5370ED11.4000002@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).