mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Zhao Qiang <qiang.zhao@freescale.com>
Cc: <linux-kernel@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>,
	<lauraa@codeaurora.org>, <X.xie@freescale.com>,
	<benh@kernel.crashing.org>, <leoli@freescale.com>,
	<paulus@samba.org>
Subject: Re: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common
Date: Mon, 21 Sep 2015 17:54:05 -0500	[thread overview]
Message-ID: <20150921225405.GB12709@home.buserror.net> (raw)
In-Reply-To: <1442560521-19354-4-git-send-email-qiang.zhao@freescale.com>

On Fri, Sep 18, 2015 at 03:15:20PM +0800, Zhao Qiang wrote:
> QE and CPM have the same muram, they use the same management
> functions. Now QE support both ARM and PowerPC, it is necessary
> to move QE to "driver/soc", so move the muram management functions
> from cpm_common to qe_common for preparing to move QE code to "driver/soc"
> 
> 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 v6:
> 	- using genalloc instead rheap to manage QE MURAM
> 	- remove qe_reset from platform file, using 
> 	- subsys_initcall to call qe_init function.

Why is the init change in the same patch as moving the muram code?

> Changes for v7:
> 	- move this patch from 3/3 to 2/3
> 	- convert cpm with genalloc
> 	- check for gen_pool allocation failure
> Changes for v8:
> 	- rebase
> 	- move BD_SC_* macro instead of copy
> Changes for v9:
> 	- doesn't modify CPM, add a new patch to modify.
> 	- rebase
> Changes for v10:
> 	- rebase
> 
>  arch/powerpc/include/asm/cpm.h            |  59 --------
>  arch/powerpc/include/asm/qe.h             |  51 ++++++-
>  arch/powerpc/platforms/83xx/km83xx.c      |   2 -
>  arch/powerpc/platforms/83xx/mpc832x_mds.c |   2 -
>  arch/powerpc/platforms/83xx/mpc832x_rdb.c |   2 -
>  arch/powerpc/platforms/83xx/mpc836x_mds.c |   2 -
>  arch/powerpc/platforms/83xx/mpc836x_rdk.c |   3 -
>  arch/powerpc/platforms/85xx/common.c      |   1 -
>  arch/powerpc/sysdev/cpm_common.c          | 206 +------------------------
>  arch/powerpc/sysdev/qe_lib/Makefile       |   2 +-
>  arch/powerpc/sysdev/qe_lib/qe.c           |  15 ++
>  arch/powerpc/sysdev/qe_lib/qe_common.c    | 242 ++++++++++++++++++++++++++++++
>  12 files changed, 302 insertions(+), 285 deletions(-)
>  create mode 100644 arch/powerpc/sysdev/qe_lib/qe_common.c
> 
> diff --git a/arch/powerpc/include/asm/cpm.h b/arch/powerpc/include/asm/cpm.h
> index 4398a6c..003a736 100644
> --- a/arch/powerpc/include/asm/cpm.h
> +++ b/arch/powerpc/include/asm/cpm.h
> @@ -93,22 +93,6 @@ typedef struct cpm_buf_desc {
>   */
>  
>  #define BD_SC_EMPTY	(0x8000)	/* Receive is empty */
> -#define BD_SC_READY	(0x8000)	/* Transmit is ready */
> -#define BD_SC_WRAP	(0x2000)	/* Last buffer descriptor */
> -#define BD_SC_INTRPT	(0x1000)	/* Interrupt on change */
> -#define BD_SC_LAST	(0x0800)	/* Last buffer in frame */
> -#define BD_SC_TC	(0x0400)	/* Transmit CRC */
> -#define BD_SC_CM	(0x0200)	/* Continuous mode */
> -#define BD_SC_ID	(0x0100)	/* Rec'd too many idles */
> -#define BD_SC_P		(0x0100)	/* xmt preamble */
> -#define BD_SC_BR	(0x0020)	/* Break received */
> -#define BD_SC_FR	(0x0010)	/* Framing error */
> -#define BD_SC_PR	(0x0008)	/* Parity error */
> -#define BD_SC_NAK	(0x0004)	/* NAK - did not respond */
> -#define BD_SC_OV	(0x0002)	/* Overrun */
> -#define BD_SC_UN	(0x0002)	/* Underrun */
> -#define BD_SC_CD	(0x0001)	/* */
> -#define BD_SC_CL	(0x0001)	/* Collision */

What does this have to do with muram?

> -/* 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
> +/* we actually use qe_muram implementation, define this for convenience */
> +#define cpm_muram_init qe_muram_init
> +#define cpm_muram_alloc qe_muram_alloc
> +#define cpm_muram_alloc_fixed qe_muram_alloc_fixed
> +#define cpm_muram_free qe_muram_free
> +#define cpm_muram_addr qe_muram_addr
> +#define cpm_muram_offset qe_muram_offset

I've said many times now that any changes to the code, including renaming
functions, needs to be a separate patch from moving the code.

-Scott

  reply	other threads:[~2015-09-21 22:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18  7:15 [PATCH v10 1/5] genalloc:support memory-allocation with bytes-alignment to genalloc Zhao Qiang
2015-09-18  7:15 ` [PATCH v10 2/5] genalloc:support allocating specific region Zhao Qiang
2015-09-18  7:15 ` [PATCH v10 3/5] CPM/QE: use genalloc to manage CPM/QE muram Zhao Qiang
2015-09-21 22:47   ` Scott Wood
2015-09-22  8:10     ` Zhao Qiang
2015-09-23  0:19       ` Scott Wood
2015-09-23  2:20         ` Zhao Qiang
2015-09-23  4:02           ` Scott Wood
2015-09-23  5:28             ` Zhao Qiang
2015-09-24 23:30               ` Scott Wood
2015-09-25  2:50                 ` Zhao Qiang
2015-09-25  5:08                   ` Scott Wood
2015-09-25  5:33                     ` Zhao Qiang
2015-09-18  7:15 ` [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common Zhao Qiang
2015-09-21 22:54   ` Scott Wood [this message]
2015-09-22  2:23     ` Zhao Qiang
2015-09-22  2:25       ` Scott Wood
2015-09-22  3:06         ` Zhao Qiang
2015-09-22  3:07           ` Scott Wood
2015-09-22  3:22             ` Zhao Qiang
2015-09-22  3:24               ` Scott Wood
2015-09-22  4:07                 ` Zhao Qiang
2015-09-18  7:15 ` [PATCH v10 5/5] QE: Move QE from arch/powerpc to drivers/soc Zhao Qiang
2015-09-21 22:56   ` Scott Wood
2015-09-22  8:24     ` Zhao Qiang
2015-09-22 16:39       ` Scott Wood
2015-09-23  2:01         ` Zhao Qiang

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=20150921225405.GB12709@home.buserror.net \
    --to=scottwood@freescale.com \
    --cc=X.xie@freescale.com \
    --cc=benh@kernel.crashing.org \
    --cc=lauraa@codeaurora.org \
    --cc=leoli@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=qiang.zhao@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

all inboxes | Powered by JetHome®