Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1210774 > unrolled thread
| Started by | Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
|---|---|
| First post | 2015-08-21 01:10 +0200 |
| Last post | 2015-08-23 16:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] dmaengine: vdma: Add 64 bit addressing support to the driver Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2015-08-21 01:10 +0200
Re: [PATCH] dmaengine: vdma: Add 64 bit addressing support to the driver Vinod Koul <vinod.koul@intel.com> - 2015-08-23 15:40 +0200
Re: [PATCH] dmaengine: vdma: Add 64 bit addressing support to the driver Arnd Bergmann <arnd@arndb.de> - 2015-08-23 16:10 +0200
| From | Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
|---|---|
| Date | 2015-08-21 01:10 +0200 |
| Subject | Re: [PATCH] dmaengine: vdma: Add 64 bit addressing support to the driver |
| Message-ID | <pZH85-2wb-1@gated-at.bofh.it> |
Hi Anurag,
On Thursday 20 August 2015 10:47:48 Anurag Kumar Vulisha wrote:
> On Thursday, August 20, 2015 2:41 PM Anurag Kumar Vulisha wrote:
> > On Wednesday 05 August 2015 17:17:37 Anurag Kumar Vulisha wrote:
> >> This patch adds the 64 bit addressing support to the vdma driver.
> >>
> >> Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
> >> ---
> >>
> >> drivers/dma/Kconfig | 2 +-
> >> drivers/dma/xilinx/xilinx_vdma.c | 36 +++++++++++++++++++++++++------
> >>
> >> 2 files changed, 31 insertions(+), 7 deletions(-)
[snip]
> >> diff --git a/drivers/dma/xilinx/xilinx_vdma.c
> >> b/drivers/dma/xilinx/xilinx_vdma.c index d8434d4..3dcbd29 100644
> >> --- a/drivers/dma/xilinx/xilinx_vdma.c
> >> +++ b/drivers/dma/xilinx/xilinx_vdma.c
[snip]
> >> @@ -272,6 +276,20 @@ static inline void vdma_desc_write(struct
> >> xilinx_vdma_chan *chan, u32 reg, vdma_write(chan, chan->desc_offset +
> >> reg, value); }
> >>
> >> +#if defined(CONFIG_PHYS_ADDR_T_64BIT) static inline void
> >> +vdma_desc_write_64(struct xilinx_vdma_chan *chan, u32
> >> reg,
> >> + u64 value)
> >> +{
> >> + /* Write the lsb 32 bits*/
> >> + writel(lower_32_bits(value),
> >> + chan->xdev->regs + chan->desc_offset + reg);
> >> +
> >> + /* Write the msb 32 bits */
> >> + writel(upper_32_bits(value),
> >> + chan->xdev->regs + chan->desc_offset + reg + 4);
> >
> > So the CPU can't perform 64-bit register access ?
>
> We are trying to write at a register address(0x5c) which is not aligned on
> 8 bytes boundary.So if I try to use 64 bit write on it, unalignment fault
> will be generated. Because of this we are using two separate 32 bit
> writes.
Broken hardware design. Fair enough :-)
> > How is 64 bit DMA addressing implemented ? Can you use a 64-bit VDMA on
> > a 32- bit platform with LPAE ? Can you use a 32-bit VDMA on a 64-bit
> > platform ? Given that VDMA is an IP core you can instantiate in the
> > programmable logic I expect some level of flexibility to be possible, but
> > this patch doesn't seem to support it. Please provide more context to
> > allow a proper review (and please include it in the commit message of v2).
>
> The VDMA core is a soft ip, which can be programmed to support both 32 bit
> and 64 bit addressing.When the VDMA core is configured for 32 bit address
> space , transfer start address is specified by a single register.
>
> When the VDMA core is configured for an address space greater than 32, each
> start address is specified by a combination of two registers.The first
> register specifies the LSB 32 bits of address, while the next register
> specifies the MSB 32 bits of address.For example,5Ch will specify the LSB
> bits while 60h will specify the MSB bits of the first start address. So we
> need to program two registers at a time.
>
> Yes,64 bit vdma can be used on 32 bit platform and 32 bit vdma can also be
> used on 64 bit platform.As far as i know , there is no use case where 64
> bit dma can be used on 32 bit platform.Please correct me if i am wrong.
I'm not sure what the use cases would be, but it makes me feel uncomfortable
to decide on whether the VDMA is 32 or 64 bits based on the type of CPU.
As the VDMA flavour is selected at synthesis time, how about specifying it in
DT instead ? You could just add an address-width property.
--
Regards,
Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Date | 2015-08-23 15:40 +0200 |
| Subject | Re: [PATCH] dmaengine: vdma: Add 64 bit addressing support to the driver |
| Message-ID | <q0DF7-2dH-5@gated-at.bofh.it> |
| In reply to | #1210774 |
On Fri, Aug 21, 2015 at 02:01:59AM +0300, Laurent Pinchart wrote: > > > How is 64 bit DMA addressing implemented ? Can you use a 64-bit VDMA on > > > a 32- bit platform with LPAE ? Can you use a 32-bit VDMA on a 64-bit > > > platform ? Given that VDMA is an IP core you can instantiate in the > > > programmable logic I expect some level of flexibility to be possible, but > > > this patch doesn't seem to support it. Please provide more context to > > > allow a proper review (and please include it in the commit message of v2). > > > > The VDMA core is a soft ip, which can be programmed to support both 32 bit > > and 64 bit addressing.When the VDMA core is configured for 32 bit address > > space , transfer start address is specified by a single register. > > > > When the VDMA core is configured for an address space greater than 32, each > > start address is specified by a combination of two registers.The first > > register specifies the LSB 32 bits of address, while the next register > > specifies the MSB 32 bits of address.For example,5Ch will specify the LSB > > bits while 60h will specify the MSB bits of the first start address. So we > > need to program two registers at a time. > > > > Yes,64 bit vdma can be used on 32 bit platform and 32 bit vdma can also be > > used on 64 bit platform.As far as i know , there is no use case where 64 > > bit dma can be used on 32 bit platform.Please correct me if i am wrong. > > I'm not sure what the use cases would be, but it makes me feel uncomfortable > to decide on whether the VDMA is 32 or 64 bits based on the type of CPU. > > As the VDMA flavour is selected at synthesis time, how about specifying it in > DT instead ? You could just add an address-width property. That would be saner thing to do. People wont check which IP and will mix and match. So you may have a 64 bit system with your 32 bit IP... -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-08-23 16:10 +0200 |
| Message-ID | <q0E89-30F-17@gated-at.bofh.it> |
| In reply to | #1211631 |
On Sunday 23 August 2015 19:09:33 Vinod Koul wrote: > On Fri, Aug 21, 2015 at 02:01:59AM +0300, Laurent Pinchart wrote: > > > > How is 64 bit DMA addressing implemented ? Can you use a 64-bit VDMA on > > > > a 32- bit platform with LPAE ? Can you use a 32-bit VDMA on a 64-bit > > > > platform ? Given that VDMA is an IP core you can instantiate in the > > > > programmable logic I expect some level of flexibility to be possible, but > > > > this patch doesn't seem to support it. Please provide more context to > > > > allow a proper review (and please include it in the commit message of v2). > > > > > > The VDMA core is a soft ip, which can be programmed to support both 32 bit > > > and 64 bit addressing.When the VDMA core is configured for 32 bit address > > > space , transfer start address is specified by a single register. > > > > > > When the VDMA core is configured for an address space greater than 32, each > > > start address is specified by a combination of two registers.The first > > > register specifies the LSB 32 bits of address, while the next register > > > specifies the MSB 32 bits of address.For example,5Ch will specify the LSB > > > bits while 60h will specify the MSB bits of the first start address. So we > > > need to program two registers at a time. > > > > > > Yes,64 bit vdma can be used on 32 bit platform and 32 bit vdma can also be > > > used on 64 bit platform.As far as i know , there is no use case where 64 > > > bit dma can be used on 32 bit platform.Please correct me if i am wrong. > > > > I'm not sure what the use cases would be, but it makes me feel uncomfortable > > to decide on whether the VDMA is 32 or 64 bits based on the type of CPU. > > > > As the VDMA flavour is selected at synthesis time, how about specifying it in > > DT instead ? You could just add an address-width property. > That would be saner thing to do. People wont check which IP and will mix and > match. So you may have a 64 bit system with your 32 bit IP... Note that you need two things here: an identification of whether the IP block itself is configured as 64-bit or 32-bit (either using the compatible string, or a separate property), and a dma-ranges property of the parent bus that describes what the bus can do and how the address range of the device maps to the address range of the parent bus. The DT probe code will set the dma offset according to the dma-ranges, and will prevent the device from setting a mask that does not get translated properly, e.g. if you have a 64-bit capable device on a 32-bit bus. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web