From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH 05/05] ARM: shmobile: Koelsch SYS-DMAC and MSIOF prototype
Date: Wed, 25 Jun 2014 00:41:10 +0000 [thread overview]
Message-ID: <20140625004110.18295.98130.sendpatchset@w520> (raw)
From: Magnus Damm <damm+renesas@opensource.se>
Enable DMA for MSIOF on r8a7791 Koelsch.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
arch/arm/boot/dts/r8a7791.dtsi | 6 +++---
arch/arm/mach-shmobile/board-koelsch-reference.c | 19 +++++++++++++++++++
2 files changed, 22 insertions(+), 3 deletions(-)
--- 0001/arch/arm/boot/dts/r8a7791.dtsi
+++ work/arch/arm/boot/dts/r8a7791.dtsi 2014-06-25 09:12:54.000000000 +0900
@@ -933,7 +933,7 @@
msiof0: spi@e6e20000 {
compatible = "renesas,msiof-r8a7791";
- reg = <0 0xe6e20000 0 0x0064>;
+ reg = <0 0xe6e20000 0 0x0064>, <0 0xe7e20000 0 0x0064>;
interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
#address-cells = <1>;
@@ -943,7 +943,7 @@
msiof1: spi@e6e10000 {
compatible = "renesas,msiof-r8a7791";
- reg = <0 0xe6e10000 0 0x0064>;
+ reg = <0 0xe6e10000 0 0x0064>, <0 0xe7e10000 0 0x0064>;
interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp2_clks R8A7791_CLK_MSIOF1>;
#address-cells = <1>;
@@ -953,7 +953,7 @@
msiof2: spi@e6e00000 {
compatible = "renesas,msiof-r8a7791";
- reg = <0 0xe6e00000 0 0x0064>;
+ reg = <0 0xe6e00000 0 0x0064>, <0 0xe7e00000 0 0x0064>;
interrupts = <0 158 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp2_clks R8A7791_CLK_MSIOF2>;
#address-cells = <1>;
--- 0015/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ work/arch/arm/mach-shmobile/board-koelsch-reference.c 2014-06-25 09:13:44.000000000 +0900
@@ -72,6 +72,7 @@ static const struct resource du_resource
#include <linux/mfd/tmio.h>
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/serial_sci.h>
+#include <linux/spi/sh_msiof.h>
/* Local DMA slave IDs */
enum {
@@ -118,6 +119,12 @@ enum {
SYS_DMAC_SLAVE_HSCIF1_RX,
SYS_DMAC_SLAVE_HSCIF2_TX,
SYS_DMAC_SLAVE_HSCIF2_RX,
+ SYS_DMAC_SLAVE_MSIOF0_TX,
+ SYS_DMAC_SLAVE_MSIOF0_RX,
+ SYS_DMAC_SLAVE_MSIOF1_TX,
+ SYS_DMAC_SLAVE_MSIOF1_RX,
+ SYS_DMAC_SLAVE_MSIOF2_TX,
+ SYS_DMAC_SLAVE_MSIOF2_RX,
};
#define DMAE_CHANNEL(a, b) \
@@ -172,6 +179,9 @@ static const struct sh_dmae_slave_config
SYS_DMAC_SLAVE_TX(HSCIF0, 8, 0xe62c0000, 0xc, 0x14, 0x39, 0x3a),
SYS_DMAC_SLAVE_TX(HSCIF1, 8, 0xe62c8000, 0xc, 0x14, 0x4d, 0x4e),
SYS_DMAC_SLAVE_TX(HSCIF2, 8, 0xe62d0000, 0xc, 0x14, 0x3b, 0x3c),
+ SYS_DMAC_SLAVE(MSIOF0, 32, 0xe7e20000, 0x50, 0x60, 0x51, 0x52),
+ SYS_DMAC_SLAVE(MSIOF1, 32, 0xe7e10000, 0x50, 0x60, 0x55, 0x56),
+ SYS_DMAC_SLAVE(MSIOF2, 32, 0xe7e00000, 0x50, 0x60, 0x41, 0x42),
};
static const struct sh_dmae_channel r8a7791_sys_dmac_channels[] = {
@@ -312,6 +322,13 @@ PDATA_HSCIF(17, 0xe6cd0000, gic_spi(21),
#define AUXDATA_SCIFB(index, baseaddr, irq) SCIF_AD("scifb", index, baseaddr)
#define AUXDATA_HSCIF(index, baseaddr, irq) SCIF_AD("hscif", index, baseaddr)
+static struct sh_msiof_spi_info msiof0_info = {
+ .rx_fifo_override = 256,
+ .num_chipselect = 1,
+ .dma_tx_id = SYS_DMAC_SLAVE_MSIOF0_TX,
+ .dma_rx_id = SYS_DMAC_SLAVE_MSIOF0_RX,
+};
+
static struct of_dev_auxdata koelsch_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("renesas,sdhi-r8a7791", 0xee100000, "sdhi0",
&sdhi0_info),
@@ -337,6 +354,8 @@ static struct of_dev_auxdata koelsch_aux
AUXDATA_HSCIF(15, 0xe62c0000, gic_spi(154)), /* HSCIF0 */
AUXDATA_HSCIF(16, 0xe62c8000, gic_spi(155)), /* HSCIF1 */
AUXDATA_HSCIF(17, 0xe6cd0000, gic_spi(21)), /* HSCIF2 */
+ OF_DEV_AUXDATA("renesas,msiof-r8a7791", 0xe6e20000,
+ "spi_r8a7791_msiof.0", &msiof0_info),
{},
};
reply other threads:[~2014-06-25 0:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20140625004110.18295.98130.sendpatchset@w520 \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.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