All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH u-boot git] there are non-DM6446 DaVinci chips
Date: Fri, 17 Apr 2009 07:44:59 +0200	[thread overview]
Message-ID: <20090417054459.GL31923@game.jcrosoft.org> (raw)
In-Reply-To: <200904121544.23683.david-b@pacbell.net>

On 15:44 Sun 12 Apr     , David Brownell wrote:
> From: David Brownell <dbrownell@users.sourceforge.net>
> 
> Start updating DaVinci board support to reduce dependencies on
> dm644x chips and EVM-like boards ... beginning with "psc.c",
> which hosts a bunch of those dependencies:
> 
>  - Pinmux registers and their contents are SoC-specific, and
>    are also unrelated to the Power and Sleep Controller.
>    
>      * Declare more of the pinmux registers;
>      * Move their bitfield decls to a public header;
>      * Renaming thse bitfields to be clearly SoC-specific.
> 
>  - Rename the errata workarounds to be clearly SoC-specific.
> 
>  - Add a CONFIG_SOC_DM6446; use it to prevent some mux goofs.
> 
>  - Don't include the I2C support if the I2C driver is not enabled.
> 
> Plus two minor bugfixes:
> 
>  - Correct the PSC_MDSTAT mask ...  it's six bits, not five.
>    (Original DM6446 doces said five, FWIW.)
> 
>  - Correct the PWREMU_MGT mask ... don't set must-be-zero bits.
> 
> The simplest always-correct way to handle pinmux is in board_init()
> calls; or possibly in SoC-specific device setup code.  Currently
> these chips don't have such SoC-specific support.
could you split it in more logical change please
> 
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> ---
>  board/davinci/common/psc.c              |   29 ++++++++++++++++-------------
>  board/davinci/common/psc.h              |    2 +-
>  board/davinci/dvevm/dvevm.c             |    2 +-
>  board/davinci/schmoogie/schmoogie.c     |    2 +-
>  board/davinci/sffsdr/sffsdr.c           |    2 +-
>  board/davinci/sonata/sonata.c           |    2 +-
>  include/asm-arm/arch-davinci/hardware.h |   23 +++++++++++++++++++++--
>  include/configs/davinci_dvevm.h         |    1 +
>  include/configs/davinci_schmoogie.h     |    1 +
>  include/configs/davinci_sffsdr.h        |    1 +
>  include/configs/davinci_sonata.h        |    1 +
>  11 files changed, 46 insertions(+), 20 deletions(-)
> 
> --- a/board/davinci/common/psc.c
> +++ b/board/davinci/common/psc.c
> @@ -26,13 +26,6 @@
>  #include <common.h>
>  #include <asm/arch/hardware.h>
>  
> -#define PINMUX0_EMACEN (1 << 31)
> -#define PINMUX0_AECS5  (1 << 11)
> -#define PINMUX0_AECS4  (1 << 10)
> -
> -#define PINMUX1_I2C    (1 <<  7)
> -#define PINMUX1_UART1  (1 <<  1)
> -#define PINMUX1_UART0  (1 <<  0)
>  
>  /*
>   * The DM6446 includes two separate power domains: "Always On" and "DSP". The
> @@ -57,7 +50,7 @@ void lpsc_on(unsigned int id)
>  
>  	while (REG(PSC_PTSTAT) & 0x01);
>  
> -	if ((*mdstat & 0x1f) == 0x03)
> +	if ((*mdstat & 0x3f) == 0x03)
>  		return;			/* Already on and enabled */
>  
>  	*mdctl |= 0x03;
> @@ -129,10 +122,12 @@ void davinci_enable_uart0(void)
>  	lpsc_on(DAVINCI_LPSC_UART0);
>  
>  	/* Bringup UART0 out of reset */
> -	REG(UART0_PWREMU_MGMT) = 0x0000e003;
> +	REG(UART0_PWREMU_MGMT) = 0x00006001;
>  
> +#ifdef CONFIG_SOC_DM6446
>  	/* Enable UART0 MUX lines */
> -	REG(PINMUX1) |= PINMUX1_UART0;
> +	REG(PINMUX1) |= DM644X_PINMUX1_UART0;
is this the same for all DM6446?
and the same question for the I2C and EMAC

it will be better to init pio/mux in devices file without redefined it in the
board as done for the at91

Best Regards,
J.

  reply	other threads:[~2009-04-17  5:44 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-12 22:44 [U-Boot] [PATCH u-boot git] there are non-DM6446 DaVinci chips David Brownell
2009-04-17  5:44 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-04-17  6:31   ` David Brownell
2009-04-17  7:28     ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-18 21:00       ` David Brownell
2009-04-24 16:24     ` Hugo Villeneuve
2009-04-24 19:33       ` David Brownell
2009-04-24 21:45         ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-24 22:40           ` David Brownell
2009-04-25  5:17             ` [U-Boot] U-Boot ARM merge strategy, was: " Dirk Behme
2009-04-25  6:27               ` Ben Warren
2009-04-25  7:03                 ` David Brownell
2009-04-25  7:18                   ` Ben Warren
2009-04-25  8:05                     ` David Brownell
2009-04-25 10:48                       ` Wolfgang Denk
2009-04-25 11:40                         ` Dirk Behme
2009-04-25 12:55                         ` [U-Boot] U-Boot ARM merge strategy David Brownell
2009-04-25 13:53                           ` Wolfgang Denk
2009-04-25 18:53                             ` David Brownell
2009-04-26 21:38                               ` Wolfgang Denk
2009-04-27 13:44                         ` [U-Boot] U-Boot ARM merge strategy, was: there are non-DM6446 DaVinci chips Jerry Van Baren
2009-04-27 14:00                           ` Wolfgang Denk
2009-04-25 10:30                   ` Wolfgang Denk
2009-04-25  7:07                 ` [U-Boot] U-Boot ARM merge strategy Dirk Behme
2009-04-25  7:42                   ` Ben Warren
2009-04-25 10:46                     ` Wolfgang Denk
2009-04-25 11:35                       ` Dirk Behme
2009-04-25 13:44                         ` Wolfgang Denk
2009-04-27 15:47                           ` Detlev Zundel
2009-04-27 19:42                             ` Wolfgang Denk
2009-04-28  8:32                               ` Detlev Zundel
2009-04-28  9:07                                 ` Wolfgang Denk
2009-04-25 16:13                       ` Ben Warren
2009-04-26  5:15                       ` Dirk Behme
2009-04-25 10:41                   ` Wolfgang Denk
2009-04-25 17:08                   ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-25 17:30                     ` Wolfgang Denk
2009-04-25 18:02                       ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-25 18:55                     ` David Brownell
2009-04-25  6:57               ` [U-Boot] U-Boot ARM merge strategy, was: there are non-DM6446 DaVinci chips David Brownell
2009-04-25  7:11                 ` Dirk Behme
2009-04-24 23:46           ` [U-Boot] [PATCH u-boot git] " Ben Warren
2009-04-25  0:36             ` David Brownell

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=20090417054459.GL31923@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.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 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.