From d5f551a82a5d6f5c54798094c00ad606ca9d6807 Mon Sep 17 00:00:00 2001 From: Icarus Chau Date: Fri, 13 Feb 2015 15:16:37 -0800 Subject: broadcom/cygnus: Initialize dram in romstage. BUG=chrome-os-partner:36456 BRANCH=broadcom-firmware TEST=When enable configuration CYGNUS_SDRAM_TEST_DDR, print on console: sdram initialization is completed. test ddr start from 0x60000000 to 0x80000000 ... test ddr end: fail=0 Translation table is @ 02004000 Mapping address range [0x00000000:0x00000000) as uncached Change-Id: I88dc2f0c504e2a152133edd442c3d776dd73d37e Signed-off-by: Patrick Georgi Original-Commit-Id: 376471751d6980f99bbe47faad193c79a05fa69f Original-Signed-off-by: Icarus Chau Original-Reviewed-on: https://chrome-internal-review.googlesource.com/199775 Original-Commit-Queue: Original-Tested-by: Original-Reviewed-by: Scott Branden Original-Change-Id: I47bc5d9ec147cc8bfbd893e8c0d7e5fc5e401771 Original-Reviewed-on: https://chromium-review.googlesource.com/256416 Original-Reviewed-by: Aaron Durbin Original-Tested-by: Daisuke Nojiri Original-Commit-Queue: Daisuke Nojiri Reviewed-on: http://review.coreboot.org/9853 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/soc/broadcom/cygnus/phy_reg_access.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 src/soc/broadcom/cygnus/phy_reg_access.c (limited to 'src/soc/broadcom/cygnus/phy_reg_access.c') 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; +} -- cgit v1.2.3