public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 11/11] Add support for Freescale's mx35pdk board.
Date: Thu, 20 Jan 2011 11:45:11 +0100	[thread overview]
Message-ID: <4D381237.9040309@denx.de> (raw)
In-Reply-To: <20110120094141.DE5E5D301D7@gemini.denx.de>

On 01/20/2011 10:41 AM, Wolfgang Denk wrote:
> Dear Stefano Babic,
> 
> In message <1295513194-16158-12-git-send-email-sbabic@denx.de> you wrote:
>> The patch adds suupport for the Freescale's mx35pdk board
>> (known as well as mx35_3stack).
> 
> Checkpatch says:
> 
> 	[U-Boot] [PATCH V2 11/11] Add support for Freescale's mx35pdk board.
> 	total: 0 errors, 1 warnings, 1331 lines checked
> 
> (Prototype for smc911x_initialize() is in netdev.h).

Thanks, I have not search with attention. I fix it.

> Please use TAB for indentation.

Thanks - in this case checkpatch reports nothing, and I suppose
everything is ok.

> 
> 
>> +int checkboard(void)
>> +{
>> +	struct ccm_regs *ccm =
>> +		(struct ccm_regs *)IMX_CCM_BASE;
>> +
>> +	puts("Board: MX35 PDK ");
>> +
>> +	/*
>> +	 * Be sure that I2C is initialized to check
>> +	 * the board revision
>> +	 */
>> +	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
> 
> Error checking?

I wil ladd it

> 
>> +	/* Print board revision */
>> +	puts(board_detect() ? "2.0" : "1.0");
>> + 
>> +	/* Print CPU revision */
>> +	puts(" i.MX35 ");
> 
> I mentioned this before:  If you make board_detect() return 1 or 2, 
> you can combine the calls to puts() for example like that:

I was unsure, it seemed to me easier to understand as it is implemented
now, becaues board_detect() is used to detect if the PMIC is installed
or not. It returns 0 or 1, and tell if the test for the PMIC was
successful.

Probably the former version of the board has no pmic at all or was not
connected to I2C. So in another part of code board_detect is used in
boolean form:

if (board_detect()) {

I thought that to combine the result makes some confusion. Probably it
is clearer to use get_board_rev() instead of board_detect() and to
extract the revision number from the returned u32:

 	printf("Board: MX35 PDK %d.0 i.MX35 ", (get_board_rev() >> 8) & 0xFF);

> Eventually similar improvment could be done here. [Just a hint - feel
> free to post-pone into a later patch if this affects other boards as
> well.]

Agree, to change this I would prefer a patch for all i.MX boards at the
same time. They use at the moment the same approach I use now.

best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  reply	other threads:[~2011-01-20 10:45 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20  8:46 [U-Boot] Adding support for MX35 Stefano Babic
2011-01-20  8:46 ` [U-Boot] [PATCH V2 01/11] Add support for MX35 processor Stefano Babic
2011-01-20  9:25   ` Wolfgang Denk
2011-01-20 10:19     ` Stefano Babic
2011-01-20 11:52       ` Wolfgang Denk
2011-01-20 17:49   ` [U-Boot] [PATCH V3 " Stefano Babic
2011-02-01 17:50     ` Stefano Babic
2011-01-20  8:46 ` [U-Boot] [PATCH V2 02/11] serial_mxc: add support for Freescale's i.MX35 processor Stefano Babic
2011-01-20  8:46 ` [U-Boot] [PATCH V2 03/11] mxc_i2c: Add support for the " Stefano Babic
2011-01-21  6:28   ` Heiko Schocher
2011-01-20  8:46 ` [U-Boot] [PATCH V2 04/11] I2C: mxc_i2c: get rid of __REG access Stefano Babic
2011-01-20  9:27   ` Wolfgang Denk
2011-01-20 10:23     ` Stefano Babic
2011-01-20 17:50   ` [U-Boot] [PATCH V3 " Stefano Babic
2011-01-21  6:30     ` Heiko Schocher
2011-01-20  8:46 ` [U-Boot] [PATCH V2 05/11] I2C: mxc_i2c: address failure with mx35 processor Stefano Babic
2011-01-20  9:30   ` Wolfgang Denk
2011-01-20 10:27     ` Stefano Babic
2011-01-20 17:51   ` [U-Boot] [PATCH V3 " Stefano Babic
2011-01-21  6:36     ` Heiko Schocher
2011-01-21  9:08       ` Stefano Babic
2011-01-21  9:21         ` Heiko Schocher
2011-01-20  8:46 ` [U-Boot] [PATCH V2 06/11] Add basic support for Freescale's mc9sdz60 Stefano Babic
2011-01-20  8:46 ` [U-Boot] [PATCH V2 07/11] SPI: mxc_spi: add support for i.MX35 processor Stefano Babic
2011-01-20  8:46 ` [U-Boot] [PATCH V2 08/11] SPI: mxc_spi: fix swapping bug and add missing swapping in unaligned rx case Stefano Babic
2011-01-20  9:32   ` Wolfgang Denk
2011-01-20 10:29     ` Stefano Babic
2011-01-20 11:59       ` Wolfgang Denk
2011-01-20 17:53   ` [U-Boot] [PATCH V3 " Stefano Babic
2011-02-01 17:53     ` Stefano Babic
2011-01-20  8:46 ` [U-Boot] [PATCH V2 09/11] SPI: mxc_spi: add SPI clock calculation and setup to the driver Stefano Babic
2011-02-01 17:58   ` Stefano Babic
2011-01-20  8:46 ` [U-Boot] [PATCH V2 10/11] SPI: mxc_spi: replace fixed offsets with structures Stefano Babic
2011-01-20  9:33   ` Wolfgang Denk
2011-01-20 10:30     ` Stefano Babic
2011-01-20  8:46 ` [U-Boot] [PATCH V2 11/11] Add support for Freescale's mx35pdk board Stefano Babic
2011-01-20  9:41   ` Wolfgang Denk
2011-01-20 10:45     ` Stefano Babic [this message]
2011-01-20 12:03       ` Wolfgang Denk
2011-01-20 17:53   ` [U-Boot] [PATCH V3 " Stefano Babic
2011-01-20 18:05     ` [U-Boot] [PATCH V4 " Stefano Babic
2011-02-01 17:51       ` Stefano Babic
2011-02-01 17:51     ` [U-Boot] [PATCH V3 " Stefano Babic
2011-01-20  9:52 ` [U-Boot] Adding support for MX35 Wolfgang Denk
2011-01-20 10:50   ` Stefano Babic
2011-01-20 12:04     ` Wolfgang Denk

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=4D381237.9040309@denx.de \
    --to=sbabic@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