All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 04/11] Blackfin: bf60x: add dma support
Date: Thu, 07 Feb 2013 11:11:08 +0100	[thread overview]
Message-ID: <20130207101108.08AEE200565@gemini.denx.de> (raw)
In-Reply-To: <1360223258-6945-5-git-send-email-sonic.adi@gmail.com>

Dear Sonic Zhang,

In message <1360223258-6945-5-git-send-email-sonic.adi@gmail.com> you wrote:
> From: Bob Liu <lliubbo@gmail.com>
> 
> Add dma support for bf60x.
> 
> Signed-off-by: Bob Liu <lliubbo@gmail.com>
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> ---
>  arch/blackfin/include/asm/dma.h                  |  113 ++++++++++++----------
>  arch/blackfin/include/asm/mach-common/bits/dma.h |   48 +++++++++-
>  arch/blackfin/lib/string.c                       |   97 ++++++++++---------
>  3 files changed, 159 insertions(+), 99 deletions(-)

There are checkpatch errors and warnings.  Please fix these!!


>  struct dmasg_large {
>  	void *next_desc_addr;
> -	unsigned long start_addr;
> -	unsigned short cfg;
> -	unsigned short x_count;
> -	short x_modify;
> -	unsigned short y_count;
> -	short y_modify;
> +	u32 start_addr;
> +	u16 cfg;
> +	u16 x_count;
> +	s16 x_modify;
> +	u16 y_count;
> +	s16 y_modify;
>  } __attribute__((packed));
>  
>  struct dmasg {
> -	unsigned long start_addr;
> -	unsigned short cfg;
> -	unsigned short x_count;
> -	short x_modify;
> -	unsigned short y_count;
> -	short y_modify;
> +	u32 start_addr;
> +	u16 cfg;
> +	u16 x_count;
> +	s16 x_modify;
> +	u16 y_count;
> +	s16 y_modify;
>  } __attribute__((packed));

These appear totally unrelated changes.  These should be split out
into separate patches.

> +/*
> + * All Blackfin system MMRs are padded to 32bits even if the register
> + * itself is only 16bits.  So use a helper macro to streamline this.
> + */
> +#define __BFP(m) m; u16 __pad_##m
>  struct dma_register {
> -	void *next_desc_ptr;	/* DMA Next Descriptor Pointer register */
> -	unsigned long start_addr;	/* DMA Start address  register */
> -
> -	unsigned short cfg;	/* DMA Configuration register */
> -	unsigned short dummy1;	/* DMA Configuration register */
> -
> -	unsigned long reserved;
> -
> -	unsigned short x_count;	/* DMA x_count register */
> -	unsigned short dummy2;
> -
> -	short x_modify;	/* DMA x_modify register */
> -	unsigned short dummy3;
> -
> -	unsigned short y_count;	/* DMA y_count register */
> -	unsigned short dummy4;
> -
> -	short y_modify;	/* DMA y_modify register */
> -	unsigned short dummy5;
> -
> -	void *curr_desc_ptr;	/* DMA Current Descriptor Pointer
> -					   register */
> -	unsigned long curr_addr_ptr;	/* DMA Current Address Pointer
> -						   register */
> -	unsigned short irq_status;	/* DMA irq status register */
> -	unsigned short dummy6;
> -
> -	unsigned short peripheral_map;	/* DMA peripheral map register */
> -	unsigned short dummy7;
> -
> -	unsigned short curr_x_count;	/* DMA Current x-count register */
> -	unsigned short dummy8;
> -
> -	unsigned long reserved2;
> -
> -	unsigned short curr_y_count;	/* DMA Current y-count register */
> -	unsigned short dummy9;
> -
> -	unsigned long reserved3;
> -
> +#ifdef __ADSPBF60x__
> +	void *next_desc_ptr;
> +	u32 start_addr;
> +	u32 config;

You drop all the comments; please don't do that.

Also, "cfg" used to be a short, now it gets replaced by "config" which
is a u32.  Is this correct?

> +	void *next_desc_ptr;
> +	u32 start_addr;
> +	u16 __BFP(config);
> +	u32 __pad0;
> +	u16 __BFP(x_count);
> +	s16 __BFP(x_modify);
> +	u16 __BFP(y_count);
> +	s16 __BFP(y_modify);
> +	void *curr_desc_ptr;
> +	u32 curr_addr_ptr;
> +	u16 __BFP(status);
> +	u16 __BFP(peripheral_map);
> +	u16 __BFP(curr_x_count);
> +	u32 __pad1;
> +	u16 __BFP(curr_y_count);
> +	u32 __pad2;

Sorry, but this is unreadable.  NAK.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Software suppliers are trying to make their  software  packages  more
``user-friendly''.  .  .  .  Their best approach, so far, has been to
take all the old brochures, and stamp the words, ``user-friendly'' on
the cover.                                               - Bill Gates

  reply	other threads:[~2013-02-07 10:11 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07  7:47 [U-Boot] [PATCH 00/11] Add BF60x processor support to Blackfin architecture Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 01/11] Blackfin: bf60x: new processor header files Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 02/11] Blackfin: bf60x: Port blackfin core architecture code to boot on bf60x Sonic Zhang
2013-02-07 10:21   ` Wolfgang Denk
2013-02-08  4:31     ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 03/11] Blackfin: bf60x: add serial support Sonic Zhang
2013-02-07 10:15   ` Wolfgang Denk
2013-02-08  4:20     ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 04/11] Blackfin: bf60x: add dma support Sonic Zhang
2013-02-07 10:11   ` Wolfgang Denk [this message]
2013-02-08  4:17     ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 05/11] Blackfin: bf60x: support big cplb page Sonic Zhang
2013-02-07 10:33   ` Wolfgang Denk
2013-02-08  4:22     ` Sonic Zhang
2013-02-18  2:43     ` Bob Liu
2013-02-18  7:41       ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 06/11] Blackfin: bf60x: add gpio support Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 07/11] blackfin: bf609: add board and headers files to support bf609 Sonic Zhang
2013-02-07 10:26   ` Wolfgang Denk
2013-02-08  4:26     ` Sonic Zhang
2013-02-08  6:29     ` Sonic Zhang
2013-02-08  8:29     ` Sonic Zhang
2013-02-17 20:13       ` Wolfgang Denk
2013-02-07  7:47 ` [U-Boot] [PATCH 08/11] Blackfin: bf60x: add rsi/sdh support Sonic Zhang
2013-02-07 10:17   ` Wolfgang Denk
2013-02-08  4:33     ` Sonic Zhang
2013-02-08  8:35     ` Sonic Zhang
2013-02-17 20:15       ` Wolfgang Denk
2013-02-18  7:38         ` Sonic Zhang
2013-03-04 11:21           ` Wolfgang Denk
2013-03-05  2:22             ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 09/11] Blackfin: spi: add bf6xx spi driver Sonic Zhang
2013-02-07 10:23   ` Wolfgang Denk
2013-02-08  6:50     ` Sonic Zhang
2013-02-17 20:12       ` Wolfgang Denk
2013-02-07  7:47 ` [U-Boot] [PATCH 10/11] Blackfin: bf60x: add hw watchdog support Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 11/11] Blackfin: bf60x: add resume from hibernate Sonic Zhang
2013-02-07 10:22   ` Wolfgang Denk
2013-02-07 10:04 ` [U-Boot] [PATCH 00/11] Add BF60x processor support to Blackfin architecture Wolfgang Denk
2013-02-07 12:28   ` Albert ARIBAUD

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=20130207101108.08AEE200565@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.