diff options
Diffstat (limited to 'src/soc/broadcom/cygnus/phy_reg_access.c')
-rwxr-xr-x | src/soc/broadcom/cygnus/phy_reg_access.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/soc/broadcom/cygnus/phy_reg_access.c b/src/soc/broadcom/cygnus/phy_reg_access.c new file mode 100755 index 0000000000..eb48133656 --- /dev/null +++ b/src/soc/broadcom/cygnus/phy_reg_access.c @@ -0,0 +1,31 @@ +/* +* Copyright (C) 2015 Broadcom Corporation +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation version 2. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include "soc/shmoo_and28/phy_reg_access.h" + +uint32 REGRD (uint32 address) { + + volatile unsigned long data; + + data = (* (volatile uint32 *) ( ((uint32)GLOBAL_REG_RBUS_START) | (address))); + //printf("REGRD %08X=%08X\n", address, data); + return data; +} + +uint32 REGWR (uint32 address, uint32 data) { + + ((* (volatile uint32 *) ( ((uint32)GLOBAL_REG_RBUS_START) | (address))) = data); + //printf("REGWR %08X=%08X\n", address, data); +// return SOC_E_NONE; + return 0; +} |