* [PATCH 2/3] sh: sh7724: Add USBHS DMAEngine support
@ 2011-06-15 6:08 Kuninori Morimoto
2011-06-15 7:01 ` Guennadi Liakhovetski
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2011-06-15 6:08 UTC (permalink / raw)
To: linux-sh
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
---
arch/sh/include/cpu-sh4/cpu/sh7724.h | 8 ++++++
arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 40 ++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h
index 3daef8e..cbc47e6 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7724.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h
@@ -298,6 +298,14 @@ enum {
SHDMA_SLAVE_SCIF4_RX,
SHDMA_SLAVE_SCIF5_TX,
SHDMA_SLAVE_SCIF5_RX,
+ SHDMA_SLAVE_USB0D0_TX,
+ SHDMA_SLAVE_USB0D0_RX,
+ SHDMA_SLAVE_USB0D1_TX,
+ SHDMA_SLAVE_USB0D1_RX,
+ SHDMA_SLAVE_USB1D0_TX,
+ SHDMA_SLAVE_USB1D0_RX,
+ SHDMA_SLAVE_USB1D1_TX,
+ SHDMA_SLAVE_USB1D1_RX,
SHDMA_SLAVE_SDHI0_TX,
SHDMA_SLAVE_SDHI0_RX,
SHDMA_SLAVE_SDHI1_TX,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index 0333fe9..134a397 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -93,6 +93,46 @@ static const struct sh_dmae_slave_config sh7724_dmae_slaves[] = {
.chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
.mid_rid = 0x36,
}, {
+ .slave_id = SHDMA_SLAVE_USB0D0_TX,
+ .addr = 0xA4D80100,
+ .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0x73,
+ }, {
+ .slave_id = SHDMA_SLAVE_USB0D0_RX,
+ .addr = 0xA4D80100,
+ .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0x73,
+ }, {
+ .slave_id = SHDMA_SLAVE_USB0D1_TX,
+ .addr = 0xA4D80120,
+ .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0x77,
+ }, {
+ .slave_id = SHDMA_SLAVE_USB0D1_RX,
+ .addr = 0xA4D80120,
+ .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0x77,
+ }, {
+ .slave_id = SHDMA_SLAVE_USB1D0_TX,
+ .addr = 0xA4D90100,
+ .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0xab,
+ }, {
+ .slave_id = SHDMA_SLAVE_USB1D0_RX,
+ .addr = 0xA4D90100,
+ .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0xab,
+ }, {
+ .slave_id = SHDMA_SLAVE_USB1D1_TX,
+ .addr = 0xA4D90120,
+ .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0xaf,
+ }, {
+ .slave_id = SHDMA_SLAVE_USB1D1_RX,
+ .addr = 0xA4D90120,
+ .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0xaf,
+ }, {
.slave_id = SHDMA_SLAVE_SDHI0_TX,
.addr = 0x04ce0030,
.chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 2/3] sh: sh7724: Add USBHS DMAEngine support
2011-06-15 6:08 [PATCH 2/3] sh: sh7724: Add USBHS DMAEngine support Kuninori Morimoto
@ 2011-06-15 7:01 ` Guennadi Liakhovetski
2011-06-15 7:16 ` Paul Mundt
2011-06-15 7:31 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Guennadi Liakhovetski @ 2011-06-15 7:01 UTC (permalink / raw)
To: linux-sh
On Wed, 15 Jun 2011, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
> ---
> arch/sh/include/cpu-sh4/cpu/sh7724.h | 8 ++++++
> arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 40 ++++++++++++++++++++++++++++++++
> 2 files changed, 48 insertions(+), 0 deletions(-)
>
> diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h
> index 3daef8e..cbc47e6 100644
> --- a/arch/sh/include/cpu-sh4/cpu/sh7724.h
> +++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h
> @@ -298,6 +298,14 @@ enum {
> SHDMA_SLAVE_SCIF4_RX,
> SHDMA_SLAVE_SCIF5_TX,
> SHDMA_SLAVE_SCIF5_RX,
> + SHDMA_SLAVE_USB0D0_TX,
> + SHDMA_SLAVE_USB0D0_RX,
> + SHDMA_SLAVE_USB0D1_TX,
> + SHDMA_SLAVE_USB0D1_RX,
> + SHDMA_SLAVE_USB1D0_TX,
> + SHDMA_SLAVE_USB1D0_RX,
> + SHDMA_SLAVE_USB1D1_TX,
> + SHDMA_SLAVE_USB1D1_RX,
> SHDMA_SLAVE_SDHI0_TX,
> SHDMA_SLAVE_SDHI0_RX,
> SHDMA_SLAVE_SDHI1_TX,
Any specific reason to add your IDs in the middle? Between IDs for another
controller type?
> diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
> index 0333fe9..134a397 100644
> --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
> +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
> @@ -93,6 +93,46 @@ static const struct sh_dmae_slave_config sh7724_dmae_slaves[] = {
> .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
> .mid_rid = 0x36,
> }, {
> + .slave_id = SHDMA_SLAVE_USB0D0_TX,
> + .addr = 0xA4D80100,
Would be better to use consistent - lower casing.
> + .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
> + .mid_rid = 0x73,
> + }, {
> + .slave_id = SHDMA_SLAVE_USB0D0_RX,
> + .addr = 0xA4D80100,
> + .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
> + .mid_rid = 0x73,
> + }, {
> + .slave_id = SHDMA_SLAVE_USB0D1_TX,
> + .addr = 0xA4D80120,
> + .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
> + .mid_rid = 0x77,
> + }, {
> + .slave_id = SHDMA_SLAVE_USB0D1_RX,
> + .addr = 0xA4D80120,
> + .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
> + .mid_rid = 0x77,
> + }, {
> + .slave_id = SHDMA_SLAVE_USB1D0_TX,
> + .addr = 0xA4D90100,
> + .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
> + .mid_rid = 0xab,
> + }, {
> + .slave_id = SHDMA_SLAVE_USB1D0_RX,
> + .addr = 0xA4D90100,
> + .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
> + .mid_rid = 0xab,
> + }, {
> + .slave_id = SHDMA_SLAVE_USB1D1_TX,
> + .addr = 0xA4D90120,
> + .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
> + .mid_rid = 0xaf,
> + }, {
> + .slave_id = SHDMA_SLAVE_USB1D1_RX,
> + .addr = 0xA4D90120,
> + .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
> + .mid_rid = 0xaf,
> + }, {
> .slave_id = SHDMA_SLAVE_SDHI0_TX,
> .addr = 0x04ce0030,
> .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
Why in the middle?
> --
> 1.7.4.1
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 2/3] sh: sh7724: Add USBHS DMAEngine support
2011-06-15 6:08 [PATCH 2/3] sh: sh7724: Add USBHS DMAEngine support Kuninori Morimoto
2011-06-15 7:01 ` Guennadi Liakhovetski
@ 2011-06-15 7:16 ` Paul Mundt
2011-06-15 7:31 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2011-06-15 7:16 UTC (permalink / raw)
To: linux-sh
On Wed, Jun 15, 2011 at 09:01:02AM +0200, Guennadi Liakhovetski wrote:
> On Wed, 15 Jun 2011, Kuninori Morimoto wrote:
>
> > Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
> > ---
> > arch/sh/include/cpu-sh4/cpu/sh7724.h | 8 ++++++
> > arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 40 ++++++++++++++++++++++++++++++++
> > 2 files changed, 48 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h
> > index 3daef8e..cbc47e6 100644
> > --- a/arch/sh/include/cpu-sh4/cpu/sh7724.h
> > +++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h
> > @@ -298,6 +298,14 @@ enum {
> > SHDMA_SLAVE_SCIF4_RX,
> > SHDMA_SLAVE_SCIF5_TX,
> > SHDMA_SLAVE_SCIF5_RX,
> > + SHDMA_SLAVE_USB0D0_TX,
> > + SHDMA_SLAVE_USB0D0_RX,
> > + SHDMA_SLAVE_USB0D1_TX,
> > + SHDMA_SLAVE_USB0D1_RX,
> > + SHDMA_SLAVE_USB1D0_TX,
> > + SHDMA_SLAVE_USB1D0_RX,
> > + SHDMA_SLAVE_USB1D1_TX,
> > + SHDMA_SLAVE_USB1D1_RX,
> > SHDMA_SLAVE_SDHI0_TX,
> > SHDMA_SLAVE_SDHI0_RX,
> > SHDMA_SLAVE_SDHI1_TX,
>
> Any specific reason to add your IDs in the middle? Between IDs for another
> controller type?
>
While it doesn't really matter in this case, I much prefer people to do
this than to constantly add them at the end. The issue is that if I have
two patches that both append to the end of the list in two different
branches with two different dependencies I'll almost certainly have to spend
time fixing them up by hand rather than having git take care of it for
me.
Much for the same reason that it's generally frowned upon for people to
arbitrarily add new drivers at the end of a given Makefile.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 2/3] sh: sh7724: Add USBHS DMAEngine support
2011-06-15 6:08 [PATCH 2/3] sh: sh7724: Add USBHS DMAEngine support Kuninori Morimoto
2011-06-15 7:01 ` Guennadi Liakhovetski
2011-06-15 7:16 ` Paul Mundt
@ 2011-06-15 7:31 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2011-06-15 7:31 UTC (permalink / raw)
To: linux-sh
Dear Paul, Guennadi
> > > SHDMA_SLAVE_SCIF4_RX,
> > > SHDMA_SLAVE_SCIF5_TX,
> > > SHDMA_SLAVE_SCIF5_RX,
> > > + SHDMA_SLAVE_USB0D0_TX,
> > > + SHDMA_SLAVE_USB0D0_RX,
> > > + SHDMA_SLAVE_USB0D1_TX,
> > > + SHDMA_SLAVE_USB0D1_RX,
> > > + SHDMA_SLAVE_USB1D0_TX,
> > > + SHDMA_SLAVE_USB1D0_RX,
> > > + SHDMA_SLAVE_USB1D1_TX,
> > > + SHDMA_SLAVE_USB1D1_RX,
> > > SHDMA_SLAVE_SDHI0_TX,
> > > SHDMA_SLAVE_SDHI0_RX,
> > > SHDMA_SLAVE_SDHI1_TX,
> >
> > Any specific reason to add your IDs in the middle? Between IDs for another
> > controller type?
The reason was that it is
"Selecting On-Chip Peripheral Module Request" table order on SuperH manual.
> While it doesn't really matter in this case, I much prefer people to do
> this than to constantly add them at the end. The issue is that if I have
> two patches that both append to the end of the list in two different
> branches with two different dependencies I'll almost certainly have to spend
> time fixing them up by hand rather than having git take care of it for
> me.
>
> Much for the same reason that it's generally frowned upon for people to
> arbitrarily add new drivers at the end of a given Makefile.
Thanks.
I can send v2 patch if you needs. please let me know
Best regards
--
Kuninori Morimoto
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-15 7:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 6:08 [PATCH 2/3] sh: sh7724: Add USBHS DMAEngine support Kuninori Morimoto
2011-06-15 7:01 ` Guennadi Liakhovetski
2011-06-15 7:16 ` Paul Mundt
2011-06-15 7:31 ` Kuninori Morimoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox