Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1212347 > unrolled thread

Re: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram

Started byScott Wood <scottwood@freescale.com>
First post2015-08-24 19:00 +0200
Last post2015-08-25 10:10 +0200
Articles 2 — 2 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.


Contents

  Re: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage  muram Scott Wood <scottwood@freescale.com> - 2015-08-24 19:00 +0200
    RE: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram Zhao Qiang <qiang.zhao@freescale.com> - 2015-08-25 10:10 +0200

#1212347 — Re: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram

FromScott Wood <scottwood@freescale.com>
Date2015-08-24 19:00 +0200
SubjectRe: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram
Message-ID<q13ge-56Y-11@gated-at.bofh.it>
On Mon, 2015-08-24 at 17:31 +0800, Zhao Qiang wrote:
> muram is used for qe, add qe_muram_ functions to manage
> muram.
> 
> Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com>
> ---
> Changes for v2:
>       - no changes
> Changes for v3:
>       - no changes
> Changes for v4:
>       - no changes
> Changes for v5:
>       - no changes
> Changes for v5:
>       - using genalloc instead rheap to manage QE MURAM
>       - remove qe_reset from platform file, using 
>       - subsys_initcall to call qe_init function.

This patch should come before the one that moves the code.

> diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
> new file mode 100644
> index 0000000..7f1762c
> --- /dev/null
> +++ b/drivers/soc/fsl/qe/qe_common.c
> @@ -0,0 +1,193 @@
> +/*
> + * common qe code
> + *
> + * author: scott wood <scottwood@freescale.com>
> + *
> + * copyright 2007-2008,2010 freescale Semiconductor, Inc.
> + *
> + * some parts derived from commproc.c/qe2_common.c, which is:
> + * copyright (c) 1997 dan error_act (dmalek@jlc.net)
> + * copyright (c) 1999-2001 dan Malek <dan@embeddedalley.com>
> + * copyright (c) 2000 montavista Software, Inc (source@mvista.com)
> + * 2006 (c) montavista software, Inc.
> + * vitaly bordug <vbordug@ru.mvista.com>

Why did you lowercase everyone's names?  Why is this copying code rather than 
moving it?


> diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h
> index 55da07e..aaf3dc2 100644
> --- a/include/linux/genalloc.h
> +++ b/include/linux/genalloc.h
> @@ -30,6 +30,7 @@
>  #ifndef __GENALLOC_H__
>  #define __GENALLOC_H__
>  
> +#include <linux/types.h>
>  #include <linux/spinlock_types.h>
>  
>  struct device;

This does not belong in this patch.


> @@ -187,12 +190,41 @@ static inline int qe_alive_during_sleep(void)
>  }
>  
>  /* we actually use cpm_muram implementation, define this for convenience */
> -#define qe_muram_init cpm_muram_init
> -#define qe_muram_alloc cpm_muram_alloc
> -#define qe_muram_alloc_fixed cpm_muram_alloc_fixed
> -#define qe_muram_free cpm_muram_free
> -#define qe_muram_addr cpm_muram_addr
> -#define qe_muram_offset cpm_muram_offset
> +int qe_muram_init(void);
> +
> +#if defined(CONFIG_QUICC_ENGINE)
> +unsigned long qe_muram_alloc(unsigned long size, unsigned long align);
> +int qe_muram_free(unsigned long offset);
> +void __iomem *qe_muram_addr(unsigned long offset);
> +unsigned long qe_muram_offset(void __iomem *addr);
> +dma_addr_t qe_muram_dma(void __iomem *addr);
> +#else
> +static inline unsigned long qe_muram_alloc(unsigned long size,
> +                                         unsigned long align)
> +{
> +     return -ENOSYS;
> +}

What code calls these functions without CONFIG_QUICC_ENGINE?

Are you converting qe without cpm?  Why?

-Scott

--
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]


#1212783 — RE: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram

FromZhao Qiang <qiang.zhao@freescale.com>
Date2015-08-25 10:10 +0200
SubjectRE: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram
Message-ID<q1hsT-Dz-17@gated-at.bofh.it>
In reply to#1212347
DQpPbiBUdWUsIDIwMTUtMDgtMjUgYXQgMTI6MzUgKzA4MDAsIFdvb2QgU2NvdHQtQjA3NDIxIHdy
b3RlOg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBXb29kIFNjb3R0LUIw
NzQyMQ0KPiBTZW50OiBUdWVzZGF5LCBBdWd1c3QgMjUsIDIwMTUgMTI6MzUgQU0NCj4gVG86IFpo
YW8gUWlhbmctQjQ1NDc1DQo+IENjOiBsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnOyBsaW51
eHBwYy1kZXZAbGlzdHMub3psYWJzLm9yZzsNCj4gbGF1cmFhQGNvZGVhdXJvcmEub3JnOyBYaWUg
WGlhb2JvLVI2MzA2MTsgYmVuaEBrZXJuZWwuY3Jhc2hpbmcub3JnOyBMaQ0KPiBZYW5nLUxlby1S
NTg0NzI7IHBhdWx1c0BzYW1iYS5vcmcNCj4gU3ViamVjdDogUmU6IFtQQVRDSCB2NiAzLzNdIHFl
X2NvbW1vbjogYWRkIHFlX211cmFtXyBmdW5jdGlvbnMgdG8gbWFuYWdlDQo+IG11cmFtDQo+IA0K
PiBPbiBNb24sIDIwMTUtMDgtMjQgYXQgMTc6MzEgKzA4MDAsIFpoYW8gUWlhbmcgd3JvdGU6DQo+
IA0KPiA+IEBAIC0xODcsMTIgKzE5MCw0MSBAQCBzdGF0aWMgaW5saW5lIGludCBxZV9hbGl2ZV9k
dXJpbmdfc2xlZXAodm9pZCkNCj4gPiAgfQ0KPiA+DQo+ID4gIC8qIHdlIGFjdHVhbGx5IHVzZSBj
cG1fbXVyYW0gaW1wbGVtZW50YXRpb24sIGRlZmluZSB0aGlzIGZvcg0KPiBjb252ZW5pZW5jZSAq
L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ikNCj4g
PiArew0KPiA+ICsgICAgIHJldHVybiAtRU5PU1lTOw0KPiA+ICt9DQo+IA0KPiBXaGF0IGNvZGUg
Y2FsbHMgdGhlc2UgZnVuY3Rpb25zIHdpdGhvdXQgQ09ORklHX1FVSUNDX0VOR0lORT8NCj4gDQo+
IEFyZSB5b3UgY29udmVydGluZyBxZSB3aXRob3V0IGNwbT8gIFdoeT8NCg0KQ1BNIGp1c3Qgd29y
ayBvbiBQb3dlclBDIG9sZCBib2FyZHMsIGl0IGlzIG5vdCBuZWNlc3NhcnkgdG8gY29udmVydCBp
dC4gICANCg0KPiANCj4gLVNjb3R0DQoNCg0KLVpoYW8NCg==
--
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