Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers
On Thu, 2014-07-24 at 04:16 -0500, Caraman Mihai Claudiu-B02008 wrote: > Scott, Alex's request to define SPE handlers only for e500v2 implies changes > in 32-bit FSL kernel to have exclusive configurations for e200/e500v2 and > e500mc/e5500. We would probably need something like this, what's your take on > it? That is already a compile-time decision. > diff --git a/arch/powerpc/kernel/head_fsl_booke.S > b/arch/powerpc/kernel/head_fsl_booke.S > index b497188..9d41015 100644 > --- a/arch/powerpc/kernel/head_fsl_booke.S > +++ b/arch/powerpc/kernel/head_fsl_booke.S > @@ -613,6 +613,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) > mfspr r10, SPRN_SPRG_RSCRATCH0 > b InstructionStorage > > +/* Define SPE handlers only for e500v2 and e200 */ > +#ifndef CONFIG_PPC_E500MC > #ifdef CONFIG_SPE > /* SPE Unavailable */ > START_EXCEPTION(SPEUnavailable) > @@ -626,7 +628,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) > EXCEPTION(0x2020, SPE_ALTIVEC_UNAVAIL, SPEUnavailable, \ > unknown_exception, EXC_XFER_EE) > #endif /* CONFIG_SPE */ > +#endif This is redundant: config SPE bool "SPE Support" depends on E200 || (E500 && !PPC_E500MC) default y > diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c > index c1faade..3ab65c2 100644 > --- a/arch/powerpc/kernel/cputable.c > +++ b/arch/powerpc/kernel/cputable.c > @@ -2030,6 +2030,7 @@ static struct cpu_spec __initdata cpu_specs[] = { > #endif /* CONFIG_PPC32 */ > #ifdef CONFIG_E500 > #ifdef CONFIG_PPC32 > +#ifndef CONFIG_PPC_E500MC > { /* e500 */ > .pvr_mask = 0x, > .pvr_value = 0x8020, > @@ -2069,6 +2070,7 @@ static struct cpu_spec __initdata cpu_specs[] = { > .machine_check = machine_check_e500, > .platform = "ppc8548", > }, > +#endif /* !CONFIG_PPC_E500MC */ > { /* e500mc */ > .pvr_mask = 0x, > .pvr_value = 0x8023, > This looks a bit strange -- e500v2 gets excluded if PPC_E500MC, but e500mc gets included in !PPC_E500MC? -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 1/7] dt: Introduce the FMan 10 Gb/s MDIO binding
Hello Shao-Hui, On 07/24/2014 10:11 PM, Shaohui Xie wrote: > Hello, Scott, Shruti, > > There are two types MDIO controllers, each MAC has a corresponding > MDIO controller to access internal PHYs inside Serdes, another is > dedicated MDIO controller to access external PHYs (PHYs on board or > riser card, etc). Current MDIO driver does not distinguish the two > controllers, if we need to distinguish the controllers, what could be > the proper way? Perhaps a new property is needed in dts? As per the intended binding, FMan v3 MDIO must use the "fsl,fman-memac-mdio" compatible. Why is that not enough to differentiate the two controllers? Cheers, > Please comment! > Thanks! > > Best Regards, > Shaohui Xie >> -Original Message- >> From: Linuxppc-dev [mailto:linuxppc-dev- >> bounces+b21989=freescale@lists.ozlabs.org] On Behalf Of Shruti >> Kanetkar >> Sent: Thursday, July 17, 2014 4:17 AM >> To: Wood Scott-B07421 >> Cc: Kanetkar Shruti-B44454; linuxppc-dev@lists.ozlabs.org >> Subject: [PATCH v2 1/7] dt: Introduce the FMan 10 Gb/s MDIO binding >> >> This document covers FManv2 and FManv3 mEMAC MDIO >> >> Signed-off-by: Shruti Kanetkar >> --- >> .../devicetree/bindings/net/fsl-xgmac-phy.txt | 29 >> ++ >> 1 file changed, 29 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/net/fsl-xgmac- >> phy.txt >> >> diff --git a/Documentation/devicetree/bindings/net/fsl-xgmac-phy.txt >> b/Documentation/devicetree/bindings/net/fsl-xgmac-phy.txt >> new file mode 100644 >> index 000..2f2d56d >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/net/fsl-xgmac-phy.txt >> @@ -0,0 +1,29 @@ >> +*MDIO IO device >> + >> +The MDIO is a bus to which the PHY devices are connected. For each >> +device that exists on this bus, a child node should be created. >> + >> +Required properties: >> +- compatible: Currently supported strings/devices are: >> +- "fsl,fman-xmdio" (Must be used for 10 Gb/s MDIO from >> FMan v2. >> + Can be used for 1/10 Gb/s MDIO from FMan v3) >> +- "fsl,fman-memac-mdio" (Must be used for 1/10 Gb/s >> MDIO from >> + FMan v3) >> +- reg >> + >> +Example for FMan v2: >> +mdio@f1000 { >> +#address-cells = <1>; >> +#size-cells = <0>; >> +compatible = "fsl,fman-xmdio"; >> +reg = <0xf1000 0x1000>; >> +}; >> + >> +Example for FMan v3: >> + >> +mdio@f1000 { >> +#address-cells = <1>; >> +#size-cells = <0>; >> +compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; >> +reg = <0xf1000 0x1000>; >> +} >> -- >> 1.8.3.1 >> >> ___ >> Linuxppc-dev mailing list >> Linuxppc-dev@lists.ozlabs.org >> https://lists.ozlabs.org/listinfo/linuxppc-dev ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 1/7] dt: Introduce the FMan 10 Gb/s MDIO binding
On Thu, 2014-07-24 at 22:11 -0500, Xie Shaohui-B21989 wrote: > Hello, Scott, Shruti, > > There are two types MDIO controllers, each MAC has a corresponding MDIO > controller to access internal PHYs inside Serdes, another is dedicated > MDIO controller to access external PHYs (PHYs on board or riser card, > etc). Current MDIO driver does not distinguish the two controllers, if > we need to distinguish the controllers, what could be the proper way? > Perhaps a new property is needed in dts? Are these different programming models, or just two instances of the same type of device, with different things attached? -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 0/3] ASoC: fsl_sai: Fix some issues in fsl_sai_trigger()
On Wed, Jul 23, 2014 at 07:23:37PM +0800, Nicolin Chen wrote: > The series of patches focus on issue fix inside fsl_sai_trigger(). Applied all, thanks. signature.asc Description: Digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: fixing endianness of flash_block_list in rtas_flash
The function rtas_flash_firmware passes the address of a data structure, flash_block_list, when making the update-flash-64-and-reboot rtas call. While the endianness of the address is handled correctly, the endianness of the data is not. This patch ensures that the data in flash_block_list is big endian when passed to rtas on little endian hosts. Signed-off-by: Thomas Falcon --- arch/powerpc/kernel/rtas_flash.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 658e89d..db2b482 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c @@ -611,17 +611,19 @@ static void rtas_flash_firmware(int reboot_type) for (f = flist; f; f = next) { /* Translate data addrs to absolute */ for (i = 0; i < f->num_blocks; i++) { - f->blocks[i].data = (char *)__pa(f->blocks[i].data); + f->blocks[i].data = (char *)cpu_to_be64(__pa(f->blocks[i].data)); image_size += f->blocks[i].length; + f->blocks[i].length = cpu_to_be64(f->blocks[i].length); } next = f->next; /* Don't translate NULL pointer for last entry */ if (f->next) - f->next = (struct flash_block_list *)__pa(f->next); + f->next = (struct flash_block_list *)cpu_to_be64(__pa(f->next)); else f->next = NULL; /* make num_blocks into the version/length field */ f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16); + f->num_blocks = cpu_to_be64(f->num_blocks); } printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size); -- 1.9.3 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2 6/9] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure
From: Sudeep Holla This patch removes the redundant sysfs cacheinfo code by making use of the newly introduced generic cacheinfo infrastructure. Signed-off-by: Sudeep Holla Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/cacheinfo.c | 813 +--- arch/powerpc/kernel/cacheinfo.h | 8 - arch/powerpc/kernel/sysfs.c | 12 +- 3 files changed, 91 insertions(+), 742 deletions(-) delete mode 100644 arch/powerpc/kernel/cacheinfo.h diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c index 40198d50b4c2..b871c246d945 100644 --- a/arch/powerpc/kernel/cacheinfo.c +++ b/arch/powerpc/kernel/cacheinfo.c @@ -10,38 +10,10 @@ * 2 as published by the Free Software Foundation. */ +#include #include -#include #include -#include -#include -#include #include -#include -#include -#include - -#include "cacheinfo.h" - -/* per-cpu object for tracking: - * - a "cache" kobject for the top-level directory - * - a list of "index" objects representing the cpu's local cache hierarchy - */ -struct cache_dir { - struct kobject *kobj; /* bare (not embedded) kobject for cache - * directory */ - struct cache_index_dir *index; /* list of index objects */ -}; - -/* "index" object: each cpu's cache directory has an index - * subdirectory corresponding to a cache object associated with the - * cpu. This object's lifetime is managed via the embedded kobject. - */ -struct cache_index_dir { - struct kobject kobj; - struct cache_index_dir *next; /* next index in parent directory */ - struct cache *cache; -}; /* Template for determining which OF properties to query for a given * cache type */ @@ -60,11 +32,6 @@ struct cache_type_info { const char *nr_sets_prop; }; -/* These are used to index the cache_type_info array. */ -#define CACHE_TYPE_UNIFIED 0 -#define CACHE_TYPE_INSTRUCTION 1 -#define CACHE_TYPE_DATA2 - static const struct cache_type_info cache_type_info[] = { { /* PowerPC Processor binding says the [di]-cache-* @@ -92,231 +59,83 @@ static const struct cache_type_info cache_type_info[] = { }, }; -/* Cache object: each instance of this corresponds to a distinct cache - * in the system. There are separate objects for Harvard caches: one - * each for instruction and data, and each refers to the same OF node. - * The refcount of the OF node is elevated for the lifetime of the - * cache object. A cache object is released when its shared_cpu_map - * is cleared (see cache_cpu_clear). - * - * A cache object is on two lists: an unsorted global list - * (cache_list) of cache objects; and a singly-linked list - * representing the local cache hierarchy, which is ordered by level - * (e.g. L1d -> L1i -> L2 -> L3). - */ -struct cache { - struct device_node *ofnode;/* OF node for this cache, may be cpu */ - struct cpumask shared_cpu_map; /* online CPUs using this cache */ - int type; /* split cache disambiguation */ - int level; /* level not explicit in device tree */ - struct list_head list; /* global list of cache objects */ - struct cache *next_local; /* next cache of >= level */ -}; - -static DEFINE_PER_CPU(struct cache_dir *, cache_dir_pcpu); - -/* traversal/modification of this list occurs only at cpu hotplug time; - * access is serialized by cpu hotplug locking - */ -static LIST_HEAD(cache_list); - -static struct cache_index_dir *kobj_to_cache_index_dir(struct kobject *k) -{ - return container_of(k, struct cache_index_dir, kobj); -} - -static const char *cache_type_string(const struct cache *cache) +static inline int get_cacheinfo_idx(enum cache_type type) { - return cache_type_info[cache->type].name; -} - -static void cache_init(struct cache *cache, int type, int level, - struct device_node *ofnode) -{ - cache->type = type; - cache->level = level; - cache->ofnode = of_node_get(ofnode); - INIT_LIST_HEAD(&cache->list); - list_add(&cache->list, &cache_list); -} - -static struct cache *new_cache(int type, int level, struct device_node *ofnode) -{ - struct cache *cache; - - cache = kzalloc(sizeof(*cache), GFP_KERNEL); - if (cache) - cache_init(cache, type, level, ofnode); - - return cache; -} - -static void release_cache_debugcheck(struct cache *cache) -{ - struct cache *iter; - - list_for_each_entry(iter, &cache_list, list) - WARN_ONCE(iter->next_local == cache, - "cache for %s(%s) refers to cache for %s(%s)\n", - iter->ofnode->full_name, - cache_type_string(iter), - cache->ofnode->full_name, - cache_type_string(cache)); -} - -static void release_c
[PATCH v2 0/9] drivers: cacheinfo support
From: Sudeep Holla This series adds a generic cacheinfo support similar to topology. The implementation is based on x86 cacheinfo support. Currently x86, powerpc, ia64 and s390 have their own implementations. While adding similar support to ARM and ARM64, here is the attempt to make it generic quite similar to topology info support. It also adds the missing ABI documentation for the cacheinfo sysfs which is already being used. It moves all the existing different implementations on x86, ia64, powerpc and s390 to use the generic cacheinfo infrastructure introduced here. These changes on non-ARM platforms are only compile tested and tested on x86. This series also adds support for ARM and ARM64 architectures based on the generic support. Since there was no objection to the idea in RFC, I am posting non-RFC version here. The code can be fetched from: git://linux-arm.org/linux-skn cacheinfo Changes v1->v2: - removed custom device_{add,remove}_attrs, using is_visible callback instead(suggested by GregKH) - arm64: changes as per MarkR review comments - Moved smp_call_function_single to architectures using it(arm, arm64, x86) (suggested by Stephen Boyd) - arm (mostly changes as per RMK's review comments) - fixed to allow v7 + v6 build - l2 cache changes to remove extra structure - populated CTR for few StrongARM CPU's not implementing CTR Previous RFCs: [1] https://lkml.org/lkml/2014/1/8/523 [2] https://lkml.org/lkml/2014/2/7/654 [3] https://lkml.org/lkml/2014/2/19/391 Cc: Greg Kroah-Hartman Cc: linux-i...@vger.kernel.org Cc: linux...@de.ibm.com Cc: linux-s...@vger.kernel.org Cc: x...@kernel.org Cc: linuxppc-dev@lists.ozlabs.org Sudeep Holla (9): drivers: base: add new class "cpu" to group cpu devices drivers: base: support cpu cache information interface to userspace via sysfs ia64: move cacheinfo sysfs to generic cacheinfo infrastructure s390: move cacheinfo sysfs to generic cacheinfo infrastructure x86: move cacheinfo sysfs to generic cacheinfo infrastructure powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure ARM64: kernel: add support for cpu cache information ARM: kernel: add support for cpu cache information ARM: kernel: add outer cache support for cacheinfo implementation Documentation/ABI/testing/sysfs-devices-system-cpu | 41 ++ arch/arm/include/asm/outercache.h | 9 + arch/arm/kernel/Makefile | 1 + arch/arm/kernel/cacheinfo.c| 284 +++ arch/arm/mm/Kconfig| 13 + arch/arm/mm/cache-l2x0.c | 35 +- arch/arm/mm/cache-tauros2.c| 35 + arch/arm/mm/cache-xsc3l2.c | 16 + arch/arm64/kernel/Makefile | 3 +- arch/arm64/kernel/cacheinfo.c | 142 arch/ia64/kernel/topology.c| 401 ++ arch/powerpc/kernel/cacheinfo.c| 813 +++-- arch/powerpc/kernel/cacheinfo.h| 8 - arch/powerpc/kernel/sysfs.c| 12 +- arch/s390/kernel/cache.c | 388 +++--- arch/x86/kernel/cpu/intel_cacheinfo.c | 680 + drivers/base/Makefile | 2 +- drivers/base/cacheinfo.c | 539 ++ drivers/base/core.c| 39 +- drivers/base/cpu.c | 7 + include/linux/cacheinfo.h | 73 ++ include/linux/cpu.h| 2 + 22 files changed, 1660 insertions(+), 1883 deletions(-) create mode 100644 arch/arm/kernel/cacheinfo.c create mode 100644 arch/arm64/kernel/cacheinfo.c delete mode 100644 arch/powerpc/kernel/cacheinfo.h create mode 100644 drivers/base/cacheinfo.c create mode 100644 include/linux/cacheinfo.h -- 1.8.3.2 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 3/5] mmc: sdhci-pltfm: Do not use parent as the host's device
The code selecting a device for the sdhci host has been continuously tweaked (4b711cb13843f5082e82970dd1e8031383134a65 "mmc: sdhci-pltfm: Add structure for host-specific data" and a4d2177f00a5252d825236c5124bc1e9918bdb41 "mmc: sdhci-pltfm: dt device does not pass parent to sdhci_alloc_host") while there does not seem to be any reason to use platform device's parent in the first place. The comment saying "Some PCI-based MFD need the parent here" seem to refer to Timberdale FPGA driver (the only MFD driver registering SDHCI cell, drivers/mfd/timberdale.c) but again, the only situation when parent device matter is runtime PM, which is not implemented for Timberdale. Cc: Chris Ball Cc: Anton Vorontsov Cc: Ulf Hansson Cc: linux-...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Pawel Moll --- This patch is a part of effort to remove references to platform_bus and make it static. Chris, Anton, Ulf - could you please advise if the assumptions above are correct or if I'm completely wrong? Do you know what where the real reasons to use parent originally? The PCI comment seems like a red herring to me... drivers/mmc/host/sdhci-pltfm.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 7e834fb..4996112 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -136,13 +136,8 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, if (resource_size(iomem) < 0x100) dev_err(&pdev->dev, "Invalid iomem size!\n"); - /* Some PCI-based MFD need the parent here */ - if (pdev->dev.parent != &platform_bus && !np) - host = sdhci_alloc_host(pdev->dev.parent, - sizeof(struct sdhci_pltfm_host) + priv_size); - else - host = sdhci_alloc_host(&pdev->dev, - sizeof(struct sdhci_pltfm_host) + priv_size); + host = sdhci_alloc_host(&pdev->dev, + sizeof(struct sdhci_pltfm_host) + priv_size); if (IS_ERR(host)) { ret = PTR_ERR(host); -- 1.9.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 0/3] dmaengine: mpc512x: add device tree binding document and DMA channel lookup
On Wed, Jun 25, 2014 at 02:52:57PM +0400, Alexander Popov wrote: > This patch series introduces a device tree binding document for > the MPC512x DMA controller and adds device tree based DMA channel lookup > for it. > > This version contains the improved device tree binding document: > #dma-cells is made a required property, as it must be according > dma/dma.txt document. Applied, thanks -- ~Vinod ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v5 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
On 07/25/2014 04:58 PM, Nicolin Chen wrote: Hi Varka, On Fri, Jul 25, 2014 at 05:04:11PM +0530, Varka Bhadram wrote: On 07/25/2014 02:16 PM, Nicolin Chen wrote: The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a signal associated with an input clock into a signal associated with a different output clock. The driver currently works as a Front End of DPCM with other Back Ends DAI links such as ESAI<->CS42888 and SSI<->WM8962 and SAI. It converts the original sample rate to a common rate supported by Back Ends for playback while converts the common rate of Back Ends to a desired rate for capture. It has 3 pairs to support three different substreams within totally 10 channels. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/fsl,asrc.txt | 60 ++ sound/soc/fsl/Kconfig | 9 + sound/soc/fsl/Makefile | 2 + sound/soc/fsl/fsl_asrc.c | 992 + sound/soc/fsl/fsl_asrc.h | 461 ++ sound/soc/fsl/fsl_asrc_dma.c | 386 6 files changed, 1910 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,asrc.txt create mode 100644 sound/soc/fsl/fsl_asrc.c create mode 100644 sound/soc/fsl/fsl_asrc.h create mode 100644 sound/soc/fsl/fsl_asrc_dma.c check patch warnings on this patch... [...] ./scripts/checkpatch.pl --max-line-length=128 0002-ASoC-fsl_apatch total: 0 errors, 0 warnings, 1928 lines checked 0002-ASoCpatch has no obvious style problems and is ready for submission [...] I think there's no need to be so strict by wrapping all lines inside 80 characters, especially for those that will be less readable if being wrapped and for those in header file. Ohhh .. If this is the case, patch addressed all of comments... Thanks.. /Reviewed-by: Varka Bhadram / -- Regards, Varka Bhadram. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v5 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
Hi Varka, On Fri, Jul 25, 2014 at 05:04:11PM +0530, Varka Bhadram wrote: > On 07/25/2014 02:16 PM, Nicolin Chen wrote: > >The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a > >signal associated with an input clock into a signal associated with a > >different > >output clock. The driver currently works as a Front End of DPCM with other > >Back > >Ends DAI links such as ESAI<->CS42888 and SSI<->WM8962 and SAI. It converts > >the > >original sample rate to a common rate supported by Back Ends for playback > >while > >converts the common rate of Back Ends to a desired rate for capture. It has 3 > >pairs to support three different substreams within totally 10 channels. > > > >Signed-off-by: Nicolin Chen > >--- > > .../devicetree/bindings/sound/fsl,asrc.txt | 60 ++ > > sound/soc/fsl/Kconfig | 9 + > > sound/soc/fsl/Makefile | 2 + > > sound/soc/fsl/fsl_asrc.c | 992 > > + > > sound/soc/fsl/fsl_asrc.h | 461 ++ > > sound/soc/fsl/fsl_asrc_dma.c | 386 > > 6 files changed, 1910 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/sound/fsl,asrc.txt > > create mode 100644 sound/soc/fsl/fsl_asrc.c > > create mode 100644 sound/soc/fsl/fsl_asrc.h > > create mode 100644 sound/soc/fsl/fsl_asrc_dma.c > > > > > check patch warnings on this patch... [...] ./scripts/checkpatch.pl --max-line-length=128 0002-ASoC-fsl_apatch total: 0 errors, 0 warnings, 1928 lines checked 0002-ASoCpatch has no obvious style problems and is ready for submission [...] I think there's no need to be so strict by wrapping all lines inside 80 characters, especially for those that will be less readable if being wrapped and for those in header file. Thank you Nicolin ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v5 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
On 07/25/2014 02:16 PM, Nicolin Chen wrote: The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a signal associated with an input clock into a signal associated with a different output clock. The driver currently works as a Front End of DPCM with other Back Ends DAI links such as ESAI<->CS42888 and SSI<->WM8962 and SAI. It converts the original sample rate to a common rate supported by Back Ends for playback while converts the common rate of Back Ends to a desired rate for capture. It has 3 pairs to support three different substreams within totally 10 channels. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/fsl,asrc.txt | 60 ++ sound/soc/fsl/Kconfig | 9 + sound/soc/fsl/Makefile | 2 + sound/soc/fsl/fsl_asrc.c | 992 + sound/soc/fsl/fsl_asrc.h | 461 ++ sound/soc/fsl/fsl_asrc_dma.c | 386 6 files changed, 1910 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,asrc.txt create mode 100644 sound/soc/fsl/fsl_asrc.c create mode 100644 sound/soc/fsl/fsl_asrc.h create mode 100644 sound/soc/fsl/fsl_asrc_dma.c check patch warnings on this patch... -- Regards, Varka Bhadram. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
On Fri, Jul 25, 2014 at 02:13:10PM +0530, Varka Bhadram wrote: > On 07/25/2014 01:27 PM, Nicolin Chen wrote: > >>>+ if (IS_ERR(asrc_priv->regmap)) { > >>>+ dev_err(&pdev->dev, "failed to init regmap\n"); > >>>+ return PTR_ERR(asrc_priv->regmap); > >>>+ } > >>>+ > >>>+ irq = platform_get_irq(pdev, 0); > >>>+ if (irq < 0) { > >>>+ dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); > >>>+ return irq; > >>>+ } > >>>+ > >>>+ ret = devm_request_irq(&pdev->dev, irq, fsl_asrc_isr, 0, > >>>+ asrc_priv->name, asrc_priv); > >>same... > >Sorry I don't see any problem with this devm_request_irq()... > > Ohhh... This is the problem with my email client... Sorry... No problem. I appreciate your carefulness :) Thank you, Nicolin ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
On 07/25/2014 01:27 PM, Nicolin Chen wrote: Hi Varka, Thank you for the comments! On Fri, Jul 25, 2014 at 01:05:05PM +0530, Varka Bhadram wrote: On 07/25/2014 12:49 PM, Nicolin Chen wrote: (...) +static const struct platform_device_id fsl_asrc_devtype[] = { + { + .name = "imx35-asrc", + .driver_data = IMX35_ASRC, + }, { + .name = "imx53-asrc", + .driver_data = IMX53_ASRC, + }, { + /* sentinel */ + } +}; +MODULE_DEVICE_TABLE(platform, fsl_asrc_devtype); + where are you using fsl_asrc_devtype,,,? +static const struct of_device_id fsl_asrc_ids[] = { + { + .compatible = "fsl,imx35-asrc", + .data = &fsl_asrc_devtype[IMX35_ASRC], Ya here ... but what is the use...? I got your point. I will drop all these and move ids behind probe/remove() as you suggested at the first place and then use of_device_is_compatible() inside the probe() instead. + asrc_priv->regmap = devm_regmap_init_mmio_clk(&pdev->dev, + "mem", regs, &fsl_asrc_regmap_config); devm_regmap_init_mmio_clk(&pdev->dev, "mem", regs, &fsl_asrc_regmap_config); I'll refine to devm_regmap_init_mmio_clk(&pdev->dev, "mem", regs, &fsl_asrc_regmap_config); + if (IS_ERR(asrc_priv->regmap)) { + dev_err(&pdev->dev, "failed to init regmap\n"); + return PTR_ERR(asrc_priv->regmap); + } + + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); + return irq; + } + + ret = devm_request_irq(&pdev->dev, irq, fsl_asrc_isr, 0, + asrc_priv->name, asrc_priv); same... Sorry I don't see any problem with this devm_request_irq()... Ohhh... This is the problem with my email client... Sorry... Thanks... -- Regards, Varka Bhadram. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v5 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a signal associated with an input clock into a signal associated with a different output clock. The driver currently works as a Front End of DPCM with other Back Ends DAI links such as ESAI<->CS42888 and SSI<->WM8962 and SAI. It converts the original sample rate to a common rate supported by Back Ends for playback while converts the common rate of Back Ends to a desired rate for capture. It has 3 pairs to support three different substreams within totally 10 channels. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/fsl,asrc.txt | 60 ++ sound/soc/fsl/Kconfig | 9 + sound/soc/fsl/Makefile | 2 + sound/soc/fsl/fsl_asrc.c | 992 + sound/soc/fsl/fsl_asrc.h | 461 ++ sound/soc/fsl/fsl_asrc_dma.c | 386 6 files changed, 1910 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,asrc.txt create mode 100644 sound/soc/fsl/fsl_asrc.c create mode 100644 sound/soc/fsl/fsl_asrc.h create mode 100644 sound/soc/fsl/fsl_asrc_dma.c diff --git a/Documentation/devicetree/bindings/sound/fsl,asrc.txt b/Documentation/devicetree/bindings/sound/fsl,asrc.txt new file mode 100644 index 000..0beaf8d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/fsl,asrc.txt @@ -0,0 +1,60 @@ +Freescale Asynchronous Sample Rate Converter (ASRC) Controller + +The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a +signal associated with an input clock into a signal associated with a different +output clock. The driver currently works as a Front End of DPCM with other Back +Ends Audio controller such as ESAI, SSI and SAI. It has three pairs to support +three substreams within totally 10 channels. + +Required properties: + + - compatible : Contains "fsl,imx35-asrc" or "fsl,imx53-asrc". + + - reg: Offset and length of the register set for the device. + + - interrupts : Contains the spdif interrupt. + + - dmas : Generic dma devicetree binding as described in + Documentation/devicetree/bindings/dma/dma.txt. + + - dma-names : Contains "rxa", "rxb", "rxc", "txa", "txb" and "txc". + + - clocks : Contains an entry for each entry in clock-names. + + - clock-names: Contains the following entries + "mem" Peripheral access clock to access registers. + "ipg" Peripheral clock to driver module. + "asrck_<0-f>" Clock sources for input and output clock. + + - big-endian: If this property is absent, the native endian mode + will be in use as default, or the big endian mode + will be in use for all the device registers. + + - fsl,asrc-rate : Defines a mutual sample rate used by DPCM Back Ends. + + - fsl,asrc-width: Defines a mutual sample width used by DPCM Back Ends. + +Example: + +asrc: asrc@02034000 { + compatible = "fsl,imx53-asrc"; + reg = <0x02034000 0x4000>; + interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks 107>, <&clks 107>, <&clks 0>, + <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, + <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, + <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, + <&clks 107>, <&clks 0>, <&clks 0>; + clock-names = "mem", "ipg", "asrck0", + "asrck_1", "asrck_2", "asrck_3", "asrck_4", + "asrck_5", "asrck_6", "asrck_7", "asrck_8", + "asrck_9", "asrck_a", "asrck_b", "asrck_c", + "asrck_d", "asrck_e", "asrck_f"; + dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>, +<&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>; + dma-names = "rxa", "rxb", "rxc", + "txa", "txb", "txc"; + fsl,asrc-rate = <48000>; + fsl,asrc-width = <16>; + status = "okay"; +}; diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index 2d60e37..e06fbfe 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig @@ -2,6 +2,15 @@ menu "SoC Audio for Freescale CPUs" comment "Common SoC Audio options for Freescale CPUs:" +config SND_SOC_FSL_ASRC + tristate "Asynchronous Sample Rate Converter (ASRC) module support" + select REGMAP_MMIO + help + Say Y if you want to add Asynchronous Sample Rate Converter (ASRC) + support for the Freescale CPUs. + This option is only useful for out-of-tree drivers since + in-tree drivers select it automatically. + config SND_SOC_FSL_SAI tristate "Synchronous Audio Interface (SAI) module support" select REGMAP_MMIO diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile index ce49570..ff7ee2c 10
[PATCH v5 1/2] ARM: imx: Add the secondary request into the structure for imx-sdma
SDMA supports device to device (per_2_per) scripts to handle DMA transfering between two peripheral devices. The per_2_per script, however, needs two dma requests from two sides while the current structure only defined one request. So this patch just simply adds the secondary request so as to let SDMA and its user to add its implementation later. [ Both change in the SDMA driver and its users like Freescale ASRC ASoC driver should be taken along with this change in order to truly support per_2_per sciprts. However, we here make an expediency by adding this first so that we can add either side later since this patch won't break any function and meanwhile it can make merge window more smoothly: we don't need to apply the change inside dmaengine branch via ASoC tree any more. -- Nicolin ] Signed-off-by: Nicolin Chen Acked-by: Shawn Guo --- include/linux/platform_data/dma-imx.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h index 7aa0e89..6a1357d 100644 --- a/include/linux/platform_data/dma-imx.h +++ b/include/linux/platform_data/dma-imx.h @@ -51,6 +51,7 @@ enum imx_dma_prio { struct imx_dma_data { int dma_request; /* DMA request line */ + int dma_request2; /* secondary DMA request line */ enum sdma_peripheral_type peripheral_type; int priority; }; -- 1.8.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v5 0/2] Add Freescale ASRC driver
This series of patches add Freescale ASRC module driver support along with the extra request in imx-sdma structure required by SDMA Device to Device script. The previous version has been in the maillist for nearly six months without any comment and reply. So I decide to drop the SDMA part's change since this series focus on ASRC support (Later, we can send SDMA part separately.) so that ASRC driver may get upstream first. Changelog v5: (All follow Varka's suggestions) * PATCH-2: Added missing '\n' to pair_err() calls. * PATCH-2: Return the final regmap_write() for fsl_asrc_init(). * PATCH-2: Dropped fsl_asrc_devtype and use simple ids behind fsl_asrc_pm. * PATCH-2: Use of_device_is_compatible() to differ compatible directly. * PATCH-2: Fixed indentation for devm_regmap_init_mmio_clk() call. v4: (All follow Varka's suggestions) * PATCH-2: Added '\n' to dev_dbg() inside fsl_asrc_isr(). * PATCH-2: Added indentations to DT binding document. * PATCH-2: Redefined fsl_asrc_set_watermarks() as void type. * PATCH-2: Put fsl_asrc_isr() and fsl_asrc_ids before probe() v3: * PATCH-1: Added an Acked-by from Shawn Guo * PATCH-2: Dropped THIS_MODULE as Tobias suggests * PATCH-2: Use dma_coerce_mask_and_coherent() in fsl_asrc_dma_pcm_new() * PATCH-2: Added substream check in fsl_asrc_dma_pcm_new() v2: * PATCH-1: Dropped the change to SDMA driver. * PATCH-2: Dropped useless member in private data structures. * PATCH-2: Refined some comments in fsl_asrc_dma.c driver. * PATCH-2: Refined commit comments. Nicolin Chen (2): ARM: imx: Add the secondary request into the structure for imx-sdma ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers .../devicetree/bindings/sound/fsl,asrc.txt | 60 ++ include/linux/platform_data/dma-imx.h | 1 + sound/soc/fsl/Kconfig | 9 + sound/soc/fsl/Makefile | 2 + sound/soc/fsl/fsl_asrc.c | 992 + sound/soc/fsl/fsl_asrc.h | 461 ++ sound/soc/fsl/fsl_asrc_dma.c | 386 7 files changed, 1911 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,asrc.txt create mode 100644 sound/soc/fsl/fsl_asrc.c create mode 100644 sound/soc/fsl/fsl_asrc.h create mode 100644 sound/soc/fsl/fsl_asrc_dma.c -- 1.8.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
Hi Varka, Thank you for the comments! On Fri, Jul 25, 2014 at 01:05:05PM +0530, Varka Bhadram wrote: > On 07/25/2014 12:49 PM, Nicolin Chen wrote: > (...) > > >+static const struct platform_device_id fsl_asrc_devtype[] = { > >+{ > >+.name = "imx35-asrc", > >+.driver_data = IMX35_ASRC, > >+}, { > >+.name = "imx53-asrc", > >+.driver_data = IMX53_ASRC, > >+}, { > >+/* sentinel */ > >+} > >+}; > >+MODULE_DEVICE_TABLE(platform, fsl_asrc_devtype); > >+ > > where are you using fsl_asrc_devtype,,,? > > >+static const struct of_device_id fsl_asrc_ids[] = { > >+{ > >+.compatible = "fsl,imx35-asrc", > >+.data = &fsl_asrc_devtype[IMX35_ASRC], > > Ya here ... but what is the use...? I got your point. I will drop all these and move ids behind probe/remove() as you suggested at the first place and then use of_device_is_compatible() inside the probe() instead. > >+asrc_priv->regmap = devm_regmap_init_mmio_clk(&pdev->dev, > >+"mem", regs, &fsl_asrc_regmap_config); > > devm_regmap_init_mmio_clk(&pdev->dev, > "mem", regs, > &fsl_asrc_regmap_config); I'll refine to devm_regmap_init_mmio_clk(&pdev->dev, "mem", regs, &fsl_asrc_regmap_config); > > >+if (IS_ERR(asrc_priv->regmap)) { > >+dev_err(&pdev->dev, "failed to init regmap\n"); > >+return PTR_ERR(asrc_priv->regmap); > >+} > >+ > >+irq = platform_get_irq(pdev, 0); > >+if (irq < 0) { > >+dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); > >+return irq; > >+} > >+ > >+ret = devm_request_irq(&pdev->dev, irq, fsl_asrc_isr, 0, > >+ asrc_priv->name, asrc_priv); > > same... Sorry I don't see any problem with this devm_request_irq()... Thank you, Nicolin ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
On 07/25/2014 12:49 PM, Nicolin Chen wrote: (...) + + div[IN] = clk_get_rate(clk) / inrate; + if (div[IN] == 0) { + pair_err("failed to support input sample rate %dHz by asrck_%x", + inrate, clk_index[ideal ? OUT : IN]); Oh... missed terminating new line... + return -EINVAL; + } + + clk = asrc_priv->asrck_clk[clk_index[OUT]]; + + /* Use fixed output rate for Ideal Ratio mode (INCLK_NONE) */ + if (ideal) + div[OUT] = clk_get_rate(clk) / IDEAL_RATIO_RATE; + else + div[OUT] = clk_get_rate(clk) / outrate; + + if (div[OUT] == 0) { + pair_err("failed to support output sample rate %dHz by asrck_%x", + outrate, clk_index[OUT]); same.. + return -EINVAL; + } + + (...) +static int fsl_asrc_init(struct fsl_asrc *asrc_priv) +{ + /* Halt ASRC internal FP when input FIFO needs data for pair A, B, C */ + regmap_write(asrc_priv->regmap, REG_ASRCTR, ASRCTR_ASRCEN); + + /* Disable interrupt by default */ + regmap_write(asrc_priv->regmap, REG_ASRIER, 0x0); + + /* Apply recommended settings for parameters from Reference Manual */ + regmap_write(asrc_priv->regmap, REG_ASRPM1, 0x7f); + regmap_write(asrc_priv->regmap, REG_ASRPM2, 0x25); + regmap_write(asrc_priv->regmap, REG_ASRPM3, 0xff7280); + regmap_write(asrc_priv->regmap, REG_ASRPM4, 0xff7280); + regmap_write(asrc_priv->regmap, REG_ASRPM5, 0xff7280); + + /* Base address for task queue FIFO. Set to 0x7C */ + regmap_update_bits(asrc_priv->regmap, REG_ASRTFR1, + ASRTFR1_TF_BASE_MASK, ASRTFR1_TF_BASE(0xfc)); + + /* Set the processing clock for 76KHz to 133M */ + regmap_write(asrc_priv->regmap, REG_ASR76K, 0x06D6); + + /* Set the processing clock for 56KHz to 133M */ + regmap_write(asrc_priv->regmap, REG_ASR56K, 0x0947); No where we are checking the return value here, but return zero...? check the regmap_write return value then return or implement this to void... + + return 0; +} + +/** + * Interrupt handler for ASRC + */ + (...) +static const struct platform_device_id fsl_asrc_devtype[] = { + { + .name = "imx35-asrc", + .driver_data = IMX35_ASRC, + }, { + .name = "imx53-asrc", + .driver_data = IMX53_ASRC, + }, { + /* sentinel */ + } +}; +MODULE_DEVICE_TABLE(platform, fsl_asrc_devtype); + where are you using fsl_asrc_devtype,,,? +static const struct of_device_id fsl_asrc_ids[] = { + { + .compatible = "fsl,imx35-asrc", + .data = &fsl_asrc_devtype[IMX35_ASRC], Ya here ... but what is the use...? + }, { + .compatible = "fsl,imx53-asrc", + .data = &fsl_asrc_devtype[IMX53_ASRC], + }, { + /* sentinel */ + } +}; +MODULE_DEVICE_TABLE(of, fsl_asrc_ids); + (...) + asrc_priv->regmap = devm_regmap_init_mmio_clk(&pdev->dev, + "mem", regs, &fsl_asrc_regmap_config); devm_regmap_init_mmio_clk(&pdev->dev, "mem", regs, &fsl_asrc_regmap_config); + if (IS_ERR(asrc_priv->regmap)) { + dev_err(&pdev->dev, "failed to init regmap\n"); + return PTR_ERR(asrc_priv->regmap); + } + + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); + return irq; + } + + ret = devm_request_irq(&pdev->dev, irq, fsl_asrc_isr, 0, + asrc_priv->name, asrc_priv); same... Thanks... -- Regards, Varka Bhadram. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v4 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a signal associated with an input clock into a signal associated with a different output clock. The driver currently works as a Front End of DPCM with other Back Ends DAI links such as ESAI<->CS42888 and SSI<->WM8962 and SAI. It converts the original sample rate to a common rate supported by Back Ends for playback while converts the common rate of Back Ends to a desired rate for capture. It has 3 pairs to support three different substreams within totally 10 channels. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/fsl,asrc.txt | 60 ++ sound/soc/fsl/Kconfig |9 + sound/soc/fsl/Makefile |2 + sound/soc/fsl/fsl_asrc.c | 1032 sound/soc/fsl/fsl_asrc.h | 461 + sound/soc/fsl/fsl_asrc_dma.c | 386 6 files changed, 1950 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,asrc.txt create mode 100644 sound/soc/fsl/fsl_asrc.c create mode 100644 sound/soc/fsl/fsl_asrc.h create mode 100644 sound/soc/fsl/fsl_asrc_dma.c diff --git a/Documentation/devicetree/bindings/sound/fsl,asrc.txt b/Documentation/devicetree/bindings/sound/fsl,asrc.txt new file mode 100644 index 000..0beaf8d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/fsl,asrc.txt @@ -0,0 +1,60 @@ +Freescale Asynchronous Sample Rate Converter (ASRC) Controller + +The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a +signal associated with an input clock into a signal associated with a different +output clock. The driver currently works as a Front End of DPCM with other Back +Ends Audio controller such as ESAI, SSI and SAI. It has three pairs to support +three substreams within totally 10 channels. + +Required properties: + + - compatible : Contains "fsl,imx35-asrc" or "fsl,imx53-asrc". + + - reg: Offset and length of the register set for the device. + + - interrupts : Contains the spdif interrupt. + + - dmas : Generic dma devicetree binding as described in + Documentation/devicetree/bindings/dma/dma.txt. + + - dma-names : Contains "rxa", "rxb", "rxc", "txa", "txb" and "txc". + + - clocks : Contains an entry for each entry in clock-names. + + - clock-names: Contains the following entries + "mem" Peripheral access clock to access registers. + "ipg" Peripheral clock to driver module. + "asrck_<0-f>" Clock sources for input and output clock. + + - big-endian: If this property is absent, the native endian mode + will be in use as default, or the big endian mode + will be in use for all the device registers. + + - fsl,asrc-rate : Defines a mutual sample rate used by DPCM Back Ends. + + - fsl,asrc-width: Defines a mutual sample width used by DPCM Back Ends. + +Example: + +asrc: asrc@02034000 { + compatible = "fsl,imx53-asrc"; + reg = <0x02034000 0x4000>; + interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks 107>, <&clks 107>, <&clks 0>, + <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, + <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, + <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, + <&clks 107>, <&clks 0>, <&clks 0>; + clock-names = "mem", "ipg", "asrck0", + "asrck_1", "asrck_2", "asrck_3", "asrck_4", + "asrck_5", "asrck_6", "asrck_7", "asrck_8", + "asrck_9", "asrck_a", "asrck_b", "asrck_c", + "asrck_d", "asrck_e", "asrck_f"; + dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>, +<&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>; + dma-names = "rxa", "rxb", "rxc", + "txa", "txb", "txc"; + fsl,asrc-rate = <48000>; + fsl,asrc-width = <16>; + status = "okay"; +}; diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index 2d60e37..e06fbfe 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig @@ -2,6 +2,15 @@ menu "SoC Audio for Freescale CPUs" comment "Common SoC Audio options for Freescale CPUs:" +config SND_SOC_FSL_ASRC + tristate "Asynchronous Sample Rate Converter (ASRC) module support" + select REGMAP_MMIO + help + Say Y if you want to add Asynchronous Sample Rate Converter (ASRC) + support for the Freescale CPUs. + This option is only useful for out-of-tree drivers since + in-tree drivers select it automatically. + config SND_SOC_FSL_SAI tristate "Synchronous Audio Interface (SAI) module support" select REGMAP_MMIO diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile index ce49570..ff7ee2
[PATCH v4 1/2] ARM: imx: Add the secondary request into the structure for imx-sdma
SDMA supports device to device (per_2_per) scripts to handle DMA transfering between two peripheral devices. The per_2_per script, however, needs two dma requests from two sides while the current structure only defined one request. So this patch just simply adds the secondary request so as to let SDMA and its user to add its implementation later. [ Both change in the SDMA driver and its users like Freescale ASRC ASoC driver should be taken along with this change in order to truly support per_2_per sciprts. However, we here make an expediency by adding this first so that we can add either side later since this patch won't break any function and meanwhile it can make merge window more smoothly: we don't need to apply the change inside dmaengine branch via ASoC tree any more. -- Nicolin ] Signed-off-by: Nicolin Chen Acked-by: Shawn Guo --- include/linux/platform_data/dma-imx.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h index 7aa0e89..6a1357d 100644 --- a/include/linux/platform_data/dma-imx.h +++ b/include/linux/platform_data/dma-imx.h @@ -51,6 +51,7 @@ enum imx_dma_prio { struct imx_dma_data { int dma_request; /* DMA request line */ + int dma_request2; /* secondary DMA request line */ enum sdma_peripheral_type peripheral_type; int priority; }; -- 1.8.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v4 0/2] Add Freescale ASRC driver
This series of patches add Freescale ASRC module driver support along with the extra request in imx-sdma structure required by SDMA Device to Device script. The previous version has been in the maillist for nearly six months without any comment and reply. So I decide to drop the SDMA part's change since this series focus on ASRC support (Later, we can send SDMA part separately.) so that ASRC driver may get upstream first. Changelog v4: (All follow Varka's suggestions) * PATCH-2: Added '\n' to dev_dbg() inside fsl_asrc_isr(). * PATCH-2: Added indentations to DT binding document. * PATCH-2: Redefined fsl_asrc_set_watermarks() as void type. * PATCH-2: Put fsl_asrc_isr() and fsl_asrc_ids before probe() v3: * PATCH-1: Added an Acked-by from Shawn Guo * PATCH-2: Dropped THIS_MODULE as Tobias suggests * PATCH-2: Use dma_coerce_mask_and_coherent() in fsl_asrc_dma_pcm_new() * PATCH-2: Added substream check in fsl_asrc_dma_pcm_new() v2: * PATCH-1: Dropped the change to SDMA driver. * PATCH-2: Dropped useless member in private data structures. * PATCH-2: Refined some comments in fsl_asrc_dma.c driver. * PATCH-2: Refined commit comments. Nicolin Chen (2): ARM: imx: Add the secondary request into the structure for imx-sdma ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers .../devicetree/bindings/sound/fsl,asrc.txt | 60 ++ include/linux/platform_data/dma-imx.h |1 + sound/soc/fsl/Kconfig |9 + sound/soc/fsl/Makefile |2 + sound/soc/fsl/fsl_asrc.c | 1032 sound/soc/fsl/fsl_asrc.h | 461 + sound/soc/fsl/fsl_asrc_dma.c | 386 7 files changed, 1951 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,asrc.txt create mode 100644 sound/soc/fsl/fsl_asrc.c create mode 100644 sound/soc/fsl/fsl_asrc.h create mode 100644 sound/soc/fsl/fsl_asrc_dma.c -- 1.8.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev