public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/11] Blackfin: bf60x: add serial support
Date: Thu, 07 Feb 2013 11:15:10 +0100	[thread overview]
Message-ID: <20130207101510.509FB200565@gemini.denx.de> (raw)
In-Reply-To: <1360223258-6945-4-git-send-email-sonic.adi@gmail.com>

Dear Sonic Zhang,

In message <1360223258-6945-4-git-send-email-sonic.adi@gmail.com> you wrote:
> 
> Add serial for bf60x.

There is a large number of checkpatch issues.  Please fix!!

> +/*
> + * 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) u16 m; u16 __pad_##m
> +struct bfin_mmr_serial {
> +#if BFIN_UART_HW_VER == 2
> +	__BFP(dll);
> +	__BFP(dlh);
> +	__BFP(gctl);
> +	__BFP(lcr);
> +	__BFP(mcr);
> +	__BFP(lsr);
> +	__BFP(msr);
> +	__BFP(scr);
> +	__BFP(ier_set);
> +	__BFP(ier_clear);
> +	__BFP(thr);
> +	__BFP(rbr);
> +#else
> +	union {
> +		u16 dll;
> +		u16 thr;
> +		const u16 rbr;
> +	};
> +	const u16 __spad0;
> +	union {
> +		u16 dlh;
> +		u16 ier;
> +	};
> +	const u16 __spad1;
> +	const __BFP(iir);
> +	__BFP(lcr);
> +	__BFP(mcr);
> +	__BFP(lsr);
> +	__BFP(msr);
> +	__BFP(scr);
> +	const u32 __spad2;
> +	__BFP(gctl);
> +#endif

Sorry, but this is totally unreadable.


> +# define DO_MUX(port, mux_tx, mux_rx, tx, rx) \
> +	bfin_write_PORT##port##_MUX((bfin_read_PORT##port##_MUX() & ~(PORT_x_MUX_##mux_tx##_MASK | PORT_x_MUX_##mux_rx##_MASK)) | PORT_x_MUX_##mux_tx##_FUNC_1 | PORT_x_MUX_##mux_rx##_FUNC_1); \
> +	bfin_write_PORT##port##_FER(bfin_read_PORT##port##_FER() | P##port##tx | P##port##rx);
> +	switch (CONFIG_UART_CONSOLE) {
> +	case 0:
> +		DO_MUX(G, 7, 7, 12, 13);
> +		break;	/* Port G; mux 7; PG12 and PG13 */
> +	case 1:
> +		DO_MUX(F, 3, 3, 6, 7);
> +		break;	/* Port F; mux 3; PF6 and PF7 */

This is totally unreadable.

This needs serious fixing.

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
Too bad that all the people who know how to run the country are  busy
driving taxicabs and cutting hair.                     - George Burns

  reply	other threads:[~2013-02-07 10:15 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 [this message]
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
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=20130207101510.509FB200565@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox