public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: gregory.clement@free-electrons•com (Gregory CLEMENT)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH V4 1/3] arm: dma mapping: Export a dma ops function arm_dma_set_mask
Date: Wed, 21 Nov 2012 11:03:22 +0100	[thread overview]
Message-ID: <50ACA6EA.4030301@free-electrons.com> (raw)
In-Reply-To: <50ACA633.7020207@samsung.com>

On 11/21/2012 11:00 AM, Marek Szyprowski wrote:
> Hello,
> 
> On 11/21/2012 10:39 AM, Gregory CLEMENT wrote:
>> Expose another DMA operations function: arm_dma_set_mask. This
>> function will be added to a custom DMA ops for Armada 370/XP.
>> Depending of its configuration Armada 370/XP can be set as a "nearly"
>> coherent architecture. In this case the DMA ops is made of:
>> - specific functions for this architecture
>> - already exposed arm DMA related functions
>> - the arm_dma_set_mask which was not exposed yet.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons•com>
> 
> Acked-by: Marek Szyprowski <m.szyprowski@samsung•com>

Thanks!

> 
>> ---
>>   arch/arm/include/asm/dma-mapping.h |    2 ++
>>   arch/arm/mm/dma-mapping.c          |    4 +---
>>   2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
>> index 2300484..98d4dab 100644
>> --- a/arch/arm/include/asm/dma-mapping.h
>> +++ b/arch/arm/include/asm/dma-mapping.h
>> @@ -111,6 +111,8 @@ static inline void dma_free_noncoherent(struct device *dev, size_t size,
>>   
>>   extern int dma_supported(struct device *dev, u64 mask);
>>   
>> +extern int arm_dma_set_mask(struct device *dev, u64 dma_mask);
>> +
>>   /**
>>    * arm_dma_alloc - allocate consistent memory for DMA
>>    * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
>> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
>> index 58bc3e4..5383bc0 100644
>> --- a/arch/arm/mm/dma-mapping.c
>> +++ b/arch/arm/mm/dma-mapping.c
>> @@ -124,8 +124,6 @@ static void arm_dma_sync_single_for_device(struct device *dev,
>>   	__dma_page_cpu_to_dev(page, offset, size, dir);
>>   }
>>   
>> -static int arm_dma_set_mask(struct device *dev, u64 dma_mask);
>> -
>>   struct dma_map_ops arm_dma_ops = {
>>   	.alloc			= arm_dma_alloc,
>>   	.free			= arm_dma_free,
>> @@ -971,7 +969,7 @@ int dma_supported(struct device *dev, u64 mask)
>>   }
>>   EXPORT_SYMBOL(dma_supported);
>>   
>> -static int arm_dma_set_mask(struct device *dev, u64 dma_mask)
>> +int arm_dma_set_mask(struct device *dev, u64 dma_mask)
>>   {
>>   	if (!dev->dma_mask || !dma_supported(dev, dma_mask))
>>   		return -EIO;
> 
> Best regards
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2012-11-21 10:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21  9:39 [PATCH V4 0/3] Add hardware I/O coherency support for Armada 370/XP Gregory CLEMENT
2012-11-21  9:39 ` [PATCH V4 1/3] arm: dma mapping: Export a dma ops function arm_dma_set_mask Gregory CLEMENT
2012-11-21 10:00   ` Marek Szyprowski
2012-11-21 10:03     ` Gregory CLEMENT [this message]
2012-11-21  9:39 ` [PATCH V4 2/3] arm: plat-orion: Add coherency attribute when setup mbus target Gregory CLEMENT
2012-11-21  9:39 ` [PATCH V4 3/3] arm: mvebu: Add hardware I/O Coherency support Gregory CLEMENT
2012-11-21 10:04   ` Marek Szyprowski

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=50ACA6EA.4030301@free-electrons.com \
    --to=gregory.clement@free-electrons$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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