public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARMV7: Add support For Logic OMAP35x/DM37x modules
Date: Sun, 18 Dec 2011 11:16:10 +0200	[thread overview]
Message-ID: <4EEDAF5A.1010905@compulab.co.il> (raw)
In-Reply-To: <1324067511-14142-1-git-send-email-peter.barada@logicpd.com>

Hi Peter,

Some comments (hopefully last ones) in addition to Wolfgang's and Tom's:

On 12/16/11 22:31, Peter Barada wrote:
> This patch adds basic support for OMAP35x/DM37x SOM LV/Torpedo
> reference boards. It assumes U-boot is loaded to SDRAM with the
> help of another small bootloader (x-load) running from SRAM.
> 
> Signed-off-by: Peter Barada <peter.barada@logicpd.com>
> Cc: Tom Rini <tom.rini@gmail.com>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> ---
> 
> Changes for V3:
>     Inline identify_board() into board_init()
>     Remove triple empty lines
>     Use sdelay() instead of naked delay loop
>     Use enable_gpmc_cs_config() to setup GPMC CS1 access to LAN92xx
>     Remove CONFIG_L2_OFF - holdover from previous work in u-boot-2011.06
>         where adding 270p 32bpp frambuffer support cause failure while
> 	booting linux kernel.  Will address when I add video support
>     Reduce CONFIG_SYS_MAXARGS to 16
> 
> Changes for V2:
>     Rework logic_identify() into identify_board() - can't use checkboard()
>            since its enabled by CONFIG_DISPLAY_BOARDINFO
>     Properly indent comments in set_muxconf_regs()
>     Move setup_net_chip() call from misc_init_r to board_eth_init()
>     Remove triple empty line spacing
>     Pass gpio_request(189) non-empty description
>     Remove board/logicpd/omap3som/config.mk
>     Remove clean/distclean from board/logicpd/omap3som/Makefile
>     Modify board_mmc_init() to be one line function
>     Modify include/configs/omap3_logic.h to use on/off #defines
> 
>  board/logicpd/omap3som/Makefile     |   42 +++
>  board/logicpd/omap3som/omap3logic.c |  523 +++++++++++++++++++++++++++++++++++
>  board/logicpd/omap3som/omap3logic.h |   35 +++
>  boards.cfg                          |    1 +
>  include/configs/omap3_logic.h       |  351 +++++++++++++++++++++++
>  5 files changed, 952 insertions(+), 0 deletions(-)
>  create mode 100644 board/logicpd/omap3som/Makefile
>  create mode 100644 board/logicpd/omap3som/omap3logic.c
>  create mode 100644 board/logicpd/omap3som/omap3logic.h
>  create mode 100644 include/configs/omap3_logic.h

[...]

> diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
> new file mode 100644
> index 0000000..eb051db
> --- /dev/null
> +++ b/board/logicpd/omap3som/omap3logic.c

[...]

> +/*
> + * Routine: board_init
> + * Description: Early hardware init.
> + */
> +int board_init(void)
> +{
> +	struct board_id *board;
> +	unsigned int val;
> +
> +	gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
> +
> +	/* boot param addr */
> +	gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
> +
> +	/*
> +	 * To identify between a SOM LV and Torpedo module,
> +	 * a pulldown resistor is on hsusb0_data5 for the SOM LV module.
> +	 * Drive the pin (and let it soak), then read it back.
> +	 * If the pin is still high its a Torpedo.  If low its a SOM LV
> +	 */
> +
> +	/* Mux hsusb0_data5 as a GPIO */
> +	MUX_VAL(CP(HSUSB0_DATA5),	(IEN  | PTD | DIS | M4));
> +
> +	if (gpio_request(GPIO_189, "husb0_data5.gpio_189") == 0) {

Usually, by the label goes the functionality it is used for
in current request, but af course it is up to you, it is not a
blocker as long as the label is valid.

> +
> +		/* Drive GPIO_189 - the pulldown resistor on the SOM LV
> +		 * will drain the voltage */

incorrect multi-line comment (fix globally) and probably,
the empty line before it can be removed.

> +		gpio_direction_output(GPIO_189, 0);
> +		gpio_set_value(GPIO_189, 1);
> +
> +		/* Let it soak for a bit */
> +		sdelay(0x100);
> +
> +		/* Read state of GPIO_189 as an input and if its set.
> +		 * If so the board is a Torpedo */
> +		gpio_direction_input(GPIO_189);
> +		val = gpio_get_value(GPIO_189);
> +		gpio_free(GPIO_189);
> +
> +		board = &boards[!!(get_cpu_family() == CPU_OMAP36XX)][!!val];
> +		printf("Board: %s\n", board->name);
> +
> +		/* Set the machine_id passed to Linux */
> +		gd->bd->bi_arch_number = board->machine_id;
> +	}
> +
> +	/* restore hsusb0_data5 pin as hsusb0_data5 */
> +	MUX_VAL(CP(HSUSB0_DATA5),	(IEN  | PTD | DIS | M0));
> +
> +	return 0;
> +}

[...]

> +/*
> + * Routine: misc_init_r
> + * Description: Init ethernet (done here so udelay works)

Function changed, comment left...

> + */
> +int misc_init_r(void)
> +{
> +	dieid_num_r();
> +
> +	return 0;
> +}

[...]


-- 
Regards,
Igor.

  parent reply	other threads:[~2011-12-18  9:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 22:47 [U-Boot] [PATCH 1/1] ARMV7: Add support For Logic OMAP35x/DM37x modules Peter Barada
2011-12-15  0:15 ` Tom Rini
2011-12-15  4:59   ` Peter Barada
2011-12-15  8:47 ` Igor Grinberg
2011-12-15 17:15 ` [U-Boot] [PATCH v2] " Peter Barada
2011-12-15 18:30   ` Tom Rini
2011-12-16  6:09     ` Peter Barada
2011-12-16 16:28       ` Tom Rini
2011-12-16 20:31         ` [U-Boot] [PATCH] " Peter Barada
2011-12-16 20:33           ` Peter Barada
2011-12-16 22:43           ` Tom Rini
2011-12-17 20:44           ` Wolfgang Denk
2011-12-18  9:16           ` Igor Grinberg [this message]
2011-12-18 17:25             ` [U-Boot] [PATCH v4] " Peter Barada
2011-12-19  7:37               ` Igor Grinberg
2011-12-19 15:44                 ` Peter Barada
2011-12-20  5:54                 ` [U-Boot] [PATCH v5] " Peter Barada
2011-12-20  7:18                   ` Igor Grinberg
2012-01-03 16:48                     ` Tom Rini
2011-12-18  9:00       ` [U-Boot] [PATCH v2] " Igor Grinberg
2011-12-18 12:33         ` 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=4EEDAF5A.1010905@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --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