LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2] fsldma: add support to 36-bit physical address
  2010-11-11 12:16 [PATCH v2] fsldma: add support to 36-bit physical address Li Yang
@ 2010-11-11 11:56 ` Kumar Gala
  2010-11-12  3:16   ` Li Yang-R58472
  2010-11-13 22:43   ` Timur Tabi
  2010-11-15 15:17 ` Kumar Gala
  1 sibling, 2 replies; 9+ messages in thread
From: Kumar Gala @ 2010-11-11 11:56 UTC (permalink / raw)
  To: Li Yang; +Cc: dan.j.williams, linuxppc-dev, linux-kernel


On Nov 11, 2010, at 6:16 AM, Li Yang wrote:

> Expand the dma_mask of fsldma device to 36-bit, indicating that the
> DMA engine can deal with 36-bit physical address and does not need
> the SWIOTLB to create bounce buffer for it when doing dma_map_*().
>=20
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> Add more detailed commit message
>=20
> drivers/dma/fsldma.c |    4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>=20
> diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
> index cea08be..8c79b37 100644
> --- a/drivers/dma/fsldma.c
> +++ b/drivers/dma/fsldma.c
> @@ -1,7 +1,7 @@
> /*
>  * Freescale MPC85xx, MPC83xx DMA Engine support
>  *
> - * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights =
reserved.
> + * Copyright (C) 2007-2010 Freescale Semiconductor, Inc. All rights =
reserved.
>  *
>  * Author:
>  *   Zhang Wei <wei.zhang@freescale.com>, Jul 2007
> @@ -1338,6 +1338,8 @@ static int __devinit fsldma_of_probe(struct =
platform_device *op,
> 	fdev->common.device_control =3D fsl_dma_device_control;
> 	fdev->common.dev =3D &op->dev;
>=20
> +	dma_set_mask(&(op->dev), DMA_BIT_MASK(36));
> +

Is there any reason we shouldn't set DMA_BIT_MASK(64) since the DMA =
block programming model allows the address to be 64-bits?

> 	dev_set_drvdata(&op->dev, fdev);
>=20
> 	/*
> --=20
> 1.6.6-rc1.GIT
>=20

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] fsldma: add support to 36-bit physical address
@ 2010-11-11 12:16 Li Yang
  2010-11-11 11:56 ` Kumar Gala
  2010-11-15 15:17 ` Kumar Gala
  0 siblings, 2 replies; 9+ messages in thread
From: Li Yang @ 2010-11-11 12:16 UTC (permalink / raw)
  To: dan.j.williams; +Cc: linuxppc-dev, linux-kernel

Expand the dma_mask of fsldma device to 36-bit, indicating that the
DMA engine can deal with 36-bit physical address and does not need
the SWIOTLB to create bounce buffer for it when doing dma_map_*().

Signed-off-by: Li Yang <leoli@freescale.com>
---
Add more detailed commit message

 drivers/dma/fsldma.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index cea08be..8c79b37 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1,7 +1,7 @@
 /*
  * Freescale MPC85xx, MPC83xx DMA Engine support
  *
- * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
+ * Copyright (C) 2007-2010 Freescale Semiconductor, Inc. All rights reserved.
  *
  * Author:
  *   Zhang Wei <wei.zhang@freescale.com>, Jul 2007
@@ -1338,6 +1338,8 @@ static int __devinit fsldma_of_probe(struct platform_device *op,
 	fdev->common.device_control = fsl_dma_device_control;
 	fdev->common.dev = &op->dev;
 
+	dma_set_mask(&(op->dev), DMA_BIT_MASK(36));
+
 	dev_set_drvdata(&op->dev, fdev);
 
 	/*
-- 
1.6.6-rc1.GIT

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: [PATCH v2] fsldma: add support to 36-bit physical address
  2010-11-11 11:56 ` Kumar Gala
@ 2010-11-12  3:16   ` Li Yang-R58472
  2010-11-13 22:43   ` Timur Tabi
  1 sibling, 0 replies; 9+ messages in thread
From: Li Yang-R58472 @ 2010-11-12  3:16 UTC (permalink / raw)
  To: Kumar Gala; +Cc: dan.j.williams, linuxppc-dev, linux-kernel

>Subject: Re: [PATCH v2] fsldma: add support to 36-bit physical address
>
>
>On Nov 11, 2010, at 6:16 AM, Li Yang wrote:
>
>> Expand the dma_mask of fsldma device to 36-bit, indicating that the
>> DMA engine can deal with 36-bit physical address and does not need =
the
>> SWIOTLB to create bounce buffer for it when doing dma_map_*().
>>
>> Signed-off-by: Li Yang <leoli@freescale.com>
>> ---
>> Add more detailed commit message
>>
>> drivers/dma/fsldma.c |    4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index
>> cea08be..8c79b37 100644
>> --- a/drivers/dma/fsldma.c
>> +++ b/drivers/dma/fsldma.c
>> @@ -1,7 +1,7 @@
>> /*
>>  * Freescale MPC85xx, MPC83xx DMA Engine support
>>  *
>> - * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights =
reserved.
>> + * Copyright (C) 2007-2010 Freescale Semiconductor, Inc. All rights
>reserved.
>>  *
>>  * Author:
>>  *   Zhang Wei <wei.zhang@freescale.com>, Jul 2007
>> @@ -1338,6 +1338,8 @@ static int __devinit fsldma_of_probe(struct
>platform_device *op,
>> 	fdev->common.device_control =3D fsl_dma_device_control;
>> 	fdev->common.dev =3D &op->dev;
>>
>> +	dma_set_mask(&(op->dev), DMA_BIT_MASK(36));
>> +
>
>Is there any reason we shouldn't set DMA_BIT_MASK(64) since the DMA =
block
>programming model allows the address to be 64-bits?

The current code is only verified on chips with 36-bit physical address. =
 I'm not sure if the driver can work without any change on the 64-bit =
chip, although the register model suggests it can work well with 64-bit. =
 If you can confirm that it's compatible with the block on 64-bit chip, =
then we can change it to 64 bit dma mask.

- Leo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] fsldma: add support to 36-bit physical address
  2010-11-11 11:56 ` Kumar Gala
  2010-11-12  3:16   ` Li Yang-R58472
@ 2010-11-13 22:43   ` Timur Tabi
  2010-11-15 15:16     ` Kumar Gala
  1 sibling, 1 reply; 9+ messages in thread
From: Timur Tabi @ 2010-11-13 22:43 UTC (permalink / raw)
  To: Kumar Gala; +Cc: dan.j.williams, linuxppc-dev, linux-kernel

On Thu, Nov 11, 2010 at 5:56 AM, Kumar Gala <galak@kernel.crashing.org> wrote:

> Is there any reason we shouldn't set DMA_BIT_MASK(64) since the DMA block programming model allows the address to be 64-bits?

Can you explain that?  The DMA registers only have room for 36 bits
for the physical address.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] fsldma: add support to 36-bit physical address
  2010-11-13 22:43   ` Timur Tabi
@ 2010-11-15 15:16     ` Kumar Gala
  2010-11-15 16:13       ` Timur Tabi
  0 siblings, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2010-11-15 15:16 UTC (permalink / raw)
  To: Timur Tabi; +Cc: dan.j.williams, linuxppc-dev, linux-kernel


On Nov 13, 2010, at 4:43 PM, Timur Tabi wrote:

> On Thu, Nov 11, 2010 at 5:56 AM, Kumar Gala =
<galak@kernel.crashing.org> wrote:
>=20
>> Is there any reason we shouldn't set DMA_BIT_MASK(64) since the DMA =
block programming model allows the address to be 64-bits?
>=20
> Can you explain that?  The DMA registers only have room for 36 bits
> for the physical address.

The programming model (if you look at the free-space in the registers =
and data structures) supports a 64-bit address.  I'm trying to avoid =
changing the driver in the future if we have >36-bit.  However this is =
such a minor worry that I'll stop and just ack the patch as is.

- k=

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] fsldma: add support to 36-bit physical address
  2010-11-11 12:16 [PATCH v2] fsldma: add support to 36-bit physical address Li Yang
  2010-11-11 11:56 ` Kumar Gala
@ 2010-11-15 15:17 ` Kumar Gala
  1 sibling, 0 replies; 9+ messages in thread
From: Kumar Gala @ 2010-11-15 15:17 UTC (permalink / raw)
  To: Li Yang; +Cc: dan.j.williams, linuxppc-dev, linux-kernel


On Nov 11, 2010, at 6:16 AM, Li Yang wrote:

> Expand the dma_mask of fsldma device to 36-bit, indicating that the
> DMA engine can deal with 36-bit physical address and does not need
> the SWIOTLB to create bounce buffer for it when doing dma_map_*().
> 
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> Add more detailed commit message
> 
> drivers/dma/fsldma.c |    4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)

Acked-by: Kumar Gala <galak@kernel.crashing.org>

- k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] fsldma: add support to 36-bit physical address
  2010-11-15 15:16     ` Kumar Gala
@ 2010-11-15 16:13       ` Timur Tabi
  2010-11-15 17:43         ` Kumar Gala
  0 siblings, 1 reply; 9+ messages in thread
From: Timur Tabi @ 2010-11-15 16:13 UTC (permalink / raw)
  To: Kumar Gala; +Cc: dan.j.williams, linuxppc-dev, linux-kernel

On Mon, Nov 15, 2010 at 9:16 AM, Kumar Gala <galak@kernel.crashing.org> wro=
te:

> The programming model (if you look at the free-space in the registers and=
 data structures) supports a 64-bit address. =A0I'm trying to avoid changin=
g the driver in the future if we have >36-bit. =A0However this is such a mi=
nor worry that I'll stop and just ack the patch as is.

I must still be missing something.  I'm looking at the description of
the SATR register in the MPC8572 RM, and it shows this:

0 - 3 |   4 - 5   |     6     |   7  |   8 - 11  |   12 - 15  | 16-21 | 22-=
31
 ---  | STFLOWLVL | SPCIORDER | SSME | STRANSINT | SREADTTYPE |  ---  |  ES=
AD

The most that we can extend ESAD to is 16 bits, for a total of a
48-bit physical address.  Where are the other 16 bits supposed to go?

--=20
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] fsldma: add support to 36-bit physical address
  2010-11-15 16:13       ` Timur Tabi
@ 2010-11-15 17:43         ` Kumar Gala
  2010-11-15 17:53           ` Scott Wood
  0 siblings, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2010-11-15 17:43 UTC (permalink / raw)
  To: Timur Tabi; +Cc: dan.j.williams, linuxppc-dev, linux-kernel


On Nov 15, 2010, at 10:13 AM, Timur Tabi wrote:

> On Mon, Nov 15, 2010 at 9:16 AM, Kumar Gala =
<galak@kernel.crashing.org> wrote:
>=20
>> The programming model (if you look at the free-space in the registers =
and data structures) supports a 64-bit address.  I'm trying to avoid =
changing the driver in the future if we have >36-bit.  However this is =
such a minor worry that I'll stop and just ack the patch as is.
>=20
> I must still be missing something.  I'm looking at the description of
> the SATR register in the MPC8572 RM, and it shows this:
>=20
> 0 - 3 |   4 - 5   |     6     |   7  |   8 - 11  |   12 - 15  | 16-21 =
| 22-31
> ---  | STFLOWLVL | SPCIORDER | SSME | STRANSINT | SREADTTYPE |  ---  | =
 ESAD
>=20
> The most that we can extend ESAD to is 16 bits, for a total of a
> 48-bit physical address.  Where are the other 16 bits supposed to go?

I was looking at the link addresses.  I stand corrected so our max is =
48-bits.

- k=

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] fsldma: add support to 36-bit physical address
  2010-11-15 17:43         ` Kumar Gala
@ 2010-11-15 17:53           ` Scott Wood
  0 siblings, 0 replies; 9+ messages in thread
From: Scott Wood @ 2010-11-15 17:53 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Timur Tabi, linuxppc-dev, dan.j.williams, linux-kernel

On Mon, 15 Nov 2010 11:43:12 -0600
Kumar Gala <galak@kernel.crashing.org> wrote:

> 
> On Nov 15, 2010, at 10:13 AM, Timur Tabi wrote:
> 
> > On Mon, Nov 15, 2010 at 9:16 AM, Kumar Gala <galak@kernel.crashing.org> wrote:
> > 
> >> The programming model (if you look at the free-space in the registers and data structures) supports a 64-bit address.  I'm trying to avoid changing the driver in the future if we have >36-bit.  However this is such a minor worry that I'll stop and just ack the patch as is.
> > 
> > I must still be missing something.  I'm looking at the description of
> > the SATR register in the MPC8572 RM, and it shows this:
> > 
> > 0 - 3 |   4 - 5   |     6     |   7  |   8 - 11  |   12 - 15  | 16-21 | 22-31
> > ---  | STFLOWLVL | SPCIORDER | SSME | STRANSINT | SREADTTYPE |  ---  |  ESAD
> > 
> > The most that we can extend ESAD to is 16 bits, for a total of a
> > 48-bit physical address.  Where are the other 16 bits supposed to go?
> 
> I was looking at the link addresses.  I stand corrected so our max is 48-bits.

Looks like 42 bits -- just because bits 16-21 could be used to extend
ESAD doesn't mean that they have been.

-Scott

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-11-15 17:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-11 12:16 [PATCH v2] fsldma: add support to 36-bit physical address Li Yang
2010-11-11 11:56 ` Kumar Gala
2010-11-12  3:16   ` Li Yang-R58472
2010-11-13 22:43   ` Timur Tabi
2010-11-15 15:16     ` Kumar Gala
2010-11-15 16:13       ` Timur Tabi
2010-11-15 17:43         ` Kumar Gala
2010-11-15 17:53           ` Scott Wood
2010-11-15 15:17 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox