public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom <Tom.Rix@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4] OMAP3: add CM-T35 board
Date: Sun, 15 Nov 2009 15:47:41 -0600	[thread overview]
Message-ID: <4B0076FD.4080804@windriver.com> (raw)
In-Reply-To: <1258296430-19678-1-git-send-email-mike@compulab.co.il>

Mike Rapoport wrote:
> Add CM-T35 board support
> 
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> 
> --
> v2 changes:
> - rename board config file from omap3_cm-t35.h to cm-t35.h
> - remove SZ_xx references
> - add MAKEALL/MAINTEINERS entries
> 
> v3 changes:
> - fix whitespace and indentation
> - remove eth_init from board_eth_init
> - add CM-T35 entry to doc/README.omap3
> - fixed board name in MAINTAINERS
> 
> v4 changes:
> - rebased agains u-boot-ti/next branch
> 

<snip>

> +static void setup_net_chip(void)
> +{
> +	struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
> +
> +	enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[5],
> +			      CM_T35_SMC911X_BASE, GPMC_SIZE_16M);
> +	enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[4],
> +			      SB_T35_SMC911X_BASE, GPMC_SIZE_16M);
> +
> +	/* Enable off mode for NWE in PADCONF_GPMC_NWE register */
> +	writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
> +
> +	/* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */
> +	writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe);
> +
> +	/* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */
> +	writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00,
> +		&ctrl_base->gpmc_nadv_ale);
> +
> +	/* Reset the ethernet controller via TPS65930 GPIO */
> +	/* Set GPIO1 of TPS65930 as output */
> +	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
> +			     TWL4030_BASEADD_GPIO+0x03);
> +	/* Send a pulse on the GPIO pin */
> +	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
> +			     TWL4030_BASEADD_GPIO+0x0C);
> +	udelay(1);
> +	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
> +			     TWL4030_BASEADD_GPIO+0x09);
> +	udelay(1);
> +	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
> +			     TWL4030_BASEADD_GPIO+0x0C);

> +}
> +
> +/*
> + * Routine: board_init
> + * Description: Early hardware init.
> + */
> +int board_init(void)
> +{
> +	gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
> +
> +	/* board id for Linux */
> +	gd->bd->bi_arch_number = MACH_TYPE_CM_T35;
> +	/* boot param addr */
> +	gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
> +
> +	return 0;
> +}
> +
> +/*
> + * Routine: misc_init_r
> + * Description: Init ethernet (done here so udelay works)
> + */
> +int misc_init_r(void)
> +{
> +#ifdef CONFIG_DRIVER_OMAP34XX_I2C
> +	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
> +#endif
> +
> +#if defined(CONFIG_CMD_NET)
> +	setup_net_chip();
> +#endif

Net setup should be dependent on i2c initialization.
The setup_net_chip uses i2c read/write

> +
> +	dieid_num_r();
> +
> +	return 0;
> +}



Tom

      parent reply	other threads:[~2009-11-15 21:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-15 14:47 [U-Boot] [PATCH v4] OMAP3: add CM-T35 board Mike Rapoport
2009-11-15 18:58 ` Paulraj, Sandeep
2009-11-15 20:34   ` Tom
2009-11-16  9:14     ` Mike Rapoport
2009-11-16 13:14       ` Tom
2009-11-16 14:03         ` Mike Rapoport
2009-11-16 21:16           ` Tom
2009-11-17 20:18       ` Wolfgang Denk
2009-11-15 21:20 ` Wolfgang Denk
2009-11-16  6:42   ` Mike Rapoport
2009-11-15 21:47 ` Tom [this message]

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=4B0076FD.4080804@windriver.com \
    --to=tom.rix@windriver.com \
    --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