From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andreas_Bie=DFmann?= Date: Thu, 18 Aug 2011 16:03:42 +0200 Subject: [U-Boot] [PATCH 1/4] macb: initial support for Cadence GEM In-Reply-To: <1313674339-1834-2-git-send-email-fovsoft@gmail.com> References: <1313674339-1834-1-git-send-email-fovsoft@gmail.com> <1313674339-1834-2-git-send-email-fovsoft@gmail.com> Message-ID: <4E4D1BBE.2050001@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Dave Aldrige, Am 18.08.2011 15:32, schrieb Dave Aldridge: > 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 > --- > drivers/net/macb.c | 18 +++++++++++----- > drivers/net/macb.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 67 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/macb.c b/drivers/net/macb.c > index c63eea9..d52dda0 100644 > --- a/drivers/net/macb.c > +++ b/drivers/net/macb.c > @@ -88,6 +88,7 @@ struct macb_dma_desc { > > struct macb_device { > void *regs; > + int is_gem; is it required to have a runtime distinction here? I mean is it possible to have a Cadence GEM type and a old style MACB type of HW on the same device? If not I would prefer a compile time differentiation here to avoid the macb_or_gem_(read|write) macros (but lets wait for some comments from the custodians) regards Andreas Bie?mann