From: AlisonWang Date: Sun, 10 Aug 2014 22:44:13 -0700 (PDT) Subject: [U-Boot] [PATCH v2 04/10] arm: ls102xa: Add etsec support for LS102xA In-Reply-To: <53E2A85C.9050203@freescale.com> References: <1404372264-2301-1-git-send-email-b18965@freescale.com> <1404372264-2301-5-git-send-email-b18965@freescale.com> <53E2A85C.9050203@freescale.com> Message-ID: <1407735853778-186446.post@n7.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/03/2014 12:24 AM, Alison Wang wrote: Missing commit message here. [Alison Wang] Yes, I will add in v3. > Signed-off-by: Alison Wang <[hidden email]> > --- > Change log: > v2: Add private mdio read and write support. > > drivers/net/fsl_mdio.c | 24 +++++++++++++++++++----- > drivers/net/tsec.c | 7 +++++++ > include/fsl_mdio.h | 3 +++ > include/tsec.h | 7 ++++++- > 4 files changed, 35 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/fsl_mdio.c b/drivers/net/fsl_mdio.c > index 8d09f5d..3081228 100644 > --- a/drivers/net/fsl_mdio.c > +++ b/drivers/net/fsl_mdio.c > @@ -12,6 +12,15 @@ > #include > #include > > +void tsec_mdio_sync(void) > +{ > +#if defined(CONFIG_PPC) > + asm("sync"); > +#elif defined(CONFIG_ARM) > + asm("dsb"); > +#endif > +} > + > void tsec_local_mdio_write(struct tsec_mii_mng __iomem *phyregs, int > port_addr, > int dev_addr, int regnum, int value) > { > @@ -19,7 +28,7 @@ void tsec_local_mdio_write(struct tsec_mii_mng __iomem > *phyregs, int port_addr, > > out_be32(&phyregs->miimadd, (port_addr << 8) | (regnum & 0x1f)); > out_be32(&phyregs->miimcon, value); > - asm("sync"); > + tsec_mdio_sync(); > Don't reinvent the wheel. You can use mb() where you use tsec_mdio_sync(); [Alison Wang] Yes, I will change in v3. Thanks. Best Regards, Alison Wang -- View this message in context: http://u-boot.10912.n7.nabble.com/PATCH-v2-0-9-arm-ls102xa-Add-Freescale-LS102xA-SoC-and-LS1021AQDS-TWR-board-support-tp183468p186446.html Sent from the U-Boot mailing list archive at Nabble.com.