All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/4] macb: initial support for Cadence GEM
Date: Sat, 22 Oct 2011 01:07:31 +0200	[thread overview]
Message-ID: <20111021230731.409D011F9E79@gemini.denx.de> (raw)
In-Reply-To: <1318251753-23604-1-git-send-email-fovsoft@gmail.com>

Dear Dave Aldridge,

In message <1318251753-23604-1-git-send-email-fovsoft@gmail.com> you wrote:
> The Cadence GEM is based on the MACB Ethernet controller but has a few
> small changes with regards to register and bitfield placement.  This
> patch detects the presence of a GEM by reading the module ID register
> and setting a flag appropriately.
> 
> This handles the new HW address, USRIO and hash register base register
> locations in GEM.
> 
> Signed-off-by: Dave Aldridge <fovsoft@gmail.com>
...
> --- a/drivers/net/macb.h
> +++ b/drivers/net/macb.h
> @@ -71,6 +71,15 @@
>  #define MACB_TPQ				0x00bc
>  #define MACB_USRIO				0x00c0
>  #define MACB_WOL				0x00c4
> +#define MACB_MID				0x00fc
> +
> +/* GEM register offsets. */
> +#define GEM_NCFGR				0x0004
> +#define GEM_USRIO				0x000c
> +#define GEM_HRB					0x0080
> +#define GEM_HRT					0x0084
> +#define GEM_SA1B				0x0088
> +#define GEM_SA1T				0x008C

NAK.

>  /* Register access macros */
>  #define macb_readl(port,reg)				\
>  	readl((port)->regs + MACB_##reg)
>  #define macb_writel(port,reg,value)			\
>  	writel((value), (port)->regs + MACB_##reg)
> +#define gem_readl(port, reg)				\
> +	__raw_readl((port)->regs + GEM_##reg)
> +#define gem_writel(port, reg, value)			\
> +	__raw_writel((value), (port)->regs + GEM_##reg)

NAK.  We don't allow regoister accesses through base address + offset
notation any more.

Please use a C struct instead.



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
Today is the yesterday you worried about tomorrow.

      parent reply	other threads:[~2011-10-21 23:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 13:02 [U-Boot] [PATCH v2 1/4] macb: initial support for Cadence GEM Dave Aldridge
2011-10-10 13:02 ` [U-Boot] [PATCH v2 2/4] macb: support higher rate GEM MDIO clock divisors Dave Aldridge
2011-12-06 20:25   ` Wolfgang Denk
2011-12-06 20:26   ` Wolfgang Denk
2011-10-10 13:02 ` [U-Boot] [PATCH v2 3/4] macb: support DMA bus widths > 32 bits Dave Aldridge
2011-10-10 13:02 ` [U-Boot] [PATCH v2 4/4] macb: allow GEM to have configurable receive buffer size Dave Aldridge
2011-10-21 23:07 ` Wolfgang Denk [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=20111021230731.409D011F9E79@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 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.