From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 14 Sep 2012 06:45:41 +0200 Subject: [U-Boot] [PATCH 2/4 v2] net: Add driver for Zynq Gem IP In-Reply-To: References: <1345098630-27902-1-git-send-email-monstr@monstr.eu> <201209131128.52353.marex@denx.de> Message-ID: <201209140645.41556.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Joe Hershberger, > Hi Marek, > > On Thu, Sep 13, 2012 at 4:28 AM, Marek Vasut wrote: > > Dear Michal Simek, > > > >> + /* > >> + * Following is the setup for Network Control register. > >> + * Bit 2: Set to enable Receive operation. > >> + * Bit 3: Set to enable Transmitt operation. > >> + * Bit 4: Set to enable MDIO operation. > >> + */ > >> + tmp = readl(®s->nwctrl); > >> + /* MDIO, Rx and Tx enable */ > >> + tmp |= ZYNQ_GEM_NWCTRL_MDEN_MASK | ZYNQ_GEM_NWCTRL_RXEN_MASK | > >> + ZYNQ_GEM_NWCTRL_TXEN_MASK; > >> + writel(tmp, ®s->nwctrl); > > > > setbits_le32() > > This is not equivalent. Using setbits_le32() will not provide a dmb() > on the operations the way that readl(), writel() does. I believe this > will cause problems when the dcache is enabled, right? Not when dcache is enabled, the register space isn't cached. But the compiler can run some wild optimizations across that. So where's the problem, do we add dmb() to clrsetbits() calls ? > -Joe Best regards, Marek Vasut