diff options
author | John Crispin <blogic@openwrt.org> | 2014-03-18 19:21:56 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-03-18 19:21:56 +0000 |
commit | de51ae36beb618be705b292e32610a2e3efae330 (patch) | |
tree | 5bd54a4e1462f1d3bd187b2af9d1f2d1d4f00d55 /target/linux/ramips/files/drivers/usb/host/mtk-phy-ahb.c | |
parent | 694bc2270f53c34cdf86d5067040481f37e44e00 (diff) | |
download | master-187ad058-de51ae36beb618be705b292e32610a2e3efae330.tar.gz master-187ad058-de51ae36beb618be705b292e32610a2e3efae330.tar.bz2 master-187ad058-de51ae36beb618be705b292e32610a2e3efae330.zip |
ralink: refresh patches
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39949 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/drivers/usb/host/mtk-phy-ahb.c')
-rw-r--r-- | target/linux/ramips/files/drivers/usb/host/mtk-phy-ahb.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/target/linux/ramips/files/drivers/usb/host/mtk-phy-ahb.c b/target/linux/ramips/files/drivers/usb/host/mtk-phy-ahb.c deleted file mode 100644 index ebaf7c8b15..0000000000 --- a/target/linux/ramips/files/drivers/usb/host/mtk-phy-ahb.c +++ /dev/null @@ -1,58 +0,0 @@ -#include "mtk-phy.h" -#ifdef CONFIG_U3D_HAL_SUPPORT -#include "mu3d_hal_osal.h" -#endif - -#ifdef CONFIG_U3_PHY_AHB_SUPPORT -#include <linux/gfp.h> -#include <linux/kernel.h> -#include <linux/slab.h> - -#ifndef CONFIG_U3D_HAL_SUPPORT -#define os_writel(addr,data) {\ - (*((volatile PHY_UINT32*)(addr)) = data);\ - } -#define os_readl(addr) *((volatile PHY_UINT32*)(addr)) -#define os_writelmsk(addr, data, msk) \ - { os_writel(addr, ((os_readl(addr) & ~(msk)) | ((data) & (msk)))); \ - } -#define os_setmsk(addr, msk) \ - { os_writel(addr, os_readl(addr) | msk); \ - } -#define os_clrmsk(addr, msk) \ - { os_writel(addr, os_readl(addr) &~ msk); \ - } -/*msk the data first, then umsk with the umsk.*/ -#define os_writelmskumsk(addr, data, msk, umsk) \ -{\ - os_writel(addr, ((os_readl(addr) & ~(msk)) | ((data) & (msk))) & (umsk));\ -} - -#endif - -PHY_INT32 U3PhyWriteReg32(PHY_UINT32 addr, PHY_UINT32 data) -{ - os_writel(addr, data); - - return 0; -} - -PHY_INT32 U3PhyReadReg32(PHY_UINT32 addr) -{ - return os_readl(addr); -} - -PHY_INT32 U3PhyWriteReg8(PHY_UINT32 addr, PHY_UINT8 data) -{ - os_writelmsk(addr&0xfffffffc, data<<((addr%4)*8), 0xff<<((addr%4)*8)); - - return 0; -} - -PHY_INT8 U3PhyReadReg8(PHY_UINT32 addr) -{ - return ((os_readl(addr)>>((addr%4)*8))&0xff); -} - -#endif - |