
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 <asm/io.h> #include <asm/errno.h>
+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-LS1... Sent from the U-Boot mailing list archive at Nabble.com.