Ionela Voinescu (ionela.voinescu(a)imgtec.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12766
-gerrit
commit 67ac42ec429a52e3ca0a1cdfa1158d58735ff2c8
Author: Ionela Voinescu <ionela.voinescu(a)imgtec.com>
Date: Wed Jul 15 12:12:02 2015 +0100
mainboard/google/urara: change SYS PLL to 700MHz
This also requires a change in the dividers used for
UART, USB, I2C setup.
Tested on pistachio bring up board:
PERIPH_SYS_CLK_OUT_MAIN output frequency = 350.000 MHz
UART1_CLK_OUT output frequency = 1.842 MHz
USB_PHY_CLK_OUT output frequency = 50.000 MHz
SYS_CLK_OUT output frequency = 350.000 MHz
DDR_CLK_OUT output frequency = 350.000 MHz
ROM_CLK_OUT output frequency = 175.000 MHz
Change-Id: Ib5e5186eceef89f7c33bf88391fab1fccb8649e4
Signed-off-by: Ionela Voinescu <ionela.voinescu(a)imgtec.com>
---
src/mainboard/google/urara/bootblock.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/mainboard/google/urara/bootblock.c b/src/mainboard/google/urara/bootblock.c
index 40696b6..7775916 100644
--- a/src/mainboard/google/urara/bootblock.c
+++ b/src/mainboard/google/urara/bootblock.c
@@ -172,7 +172,7 @@ static void bootblock_mainboard_init(void)
{
int ret;
- /* System PLL divided by 2 -> 400 MHz */
+ /* System PLL divided by 2 -> 350 MHz */
/* The same frequency will be the input frequency for the SPFI block */
system_clk_setup(1);
@@ -181,8 +181,8 @@ static void bootblock_mainboard_init(void)
* the values set or not by the boot ROM code */
mips_clk_setup(0, 0);
- /* Setup system PLL at 800 MHz */
- ret = sys_pll_setup(2, 1);
+ /* Setup system PLL at 700 MHz */
+ ret = sys_pll_setup(2, 1, 13, 350);
if (ret != CLOCKS_OK)
return;
/* Setup MIPS PLL at 546 MHz */
@@ -193,9 +193,9 @@ static void bootblock_mainboard_init(void)
/* Setup SPIM1 MFIOs */
spim1_mfio_setup();
/* Setup UART1 clock and MFIOs
- * System PLL divided by 7 divided by 62 -> 1.8433 Mhz
+ * System PLL divided by 5 divided by 76 -> 1.8421 Mhz
*/
- uart1_clk_setup(6, 61);
+ uart1_clk_setup(4, 75);
uart1_mfio_setup();
}
@@ -213,23 +213,23 @@ static int init_extra_hardware(void)
}
/* Setup USB clock
- * System clock divided by 8 -> 50 MHz
+ * System clock divided by 7 -> 50 MHz
*/
- if (usb_clk_setup(7, 2, 7) != CLOCKS_OK) {
+ if (usb_clk_setup(6, 2, 7) != CLOCKS_OK) {
printk(BIOS_ERR, "%s: Failed to set up USB clock.\n",
__func__);
return -1;
}
/* Setup I2C clocks and MFIOs
- * System PLL divided by 4 divided by 3 -> 33.33 MHz
+ * System clock divided by 4 divided by 3 -> 29.1(6) MHz
*/
i2c_clk_setup(3, 2, hardware->i2c_interface);
i2c_mfio_setup(hardware->i2c_interface);
/* Ethernet clocks setup: ENET as clock source */
- eth_clk_setup(0, 7);
- /* ROM clock setup: system clock divided by 2 -> 200 MHz */
+ eth_clk_setup(0, 6);
+ /* ROM clock setup: system clock divided by 2 -> 175 MHz */
/* Hash accelerator is driven from the ROM clock */
rom_clk_setup(1);
Ionela Voinescu (ionela.voinescu(a)imgtec.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12764
-gerrit
commit bfc9c63b79647814ae92982b1224e322705ae6c9
Author: Ionela Voinescu <ionela.voinescu(a)imgtec.com>
Date: Tue May 26 12:20:19 2015 +0100
imgtec/pistachio: DDR2, DDR3: DLL reset set
Bit 8 of the MR register is automatically set by the PHY
during memory initilization but having it set in the
register leads to a more clear understanding.
Tested on Pistachio bring up board; DDR2 and DDR3 are
initialized properly.
Change-Id: Ie6953e2a96ba2961521b372d280f362ee1c52b94
Signed-off-by: Ionela Voinescu <ionela.voinescu(a)imgtec.com>
---
src/soc/imgtec/pistachio/ddr2_init.c | 2 +-
src/soc/imgtec/pistachio/ddr3_init.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/soc/imgtec/pistachio/ddr2_init.c b/src/soc/imgtec/pistachio/ddr2_init.c
index 322d241..9549537 100644
--- a/src/soc/imgtec/pistachio/ddr2_init.c
+++ b/src/soc/imgtec/pistachio/ddr2_init.c
@@ -112,7 +112,7 @@ int init_ddr2(void)
* 15:13 RSVD RSVD
* 31:16 Reserved
*/
- write32(DDR_PHY + DDRPHY_MR_OFFSET, 0x00000A62 | (BL8 ? 0x1 : 0x0));
+ write32(DDR_PHY + DDRPHY_MR_OFFSET, 0x00000B62 | (BL8 ? 0x1 : 0x0));
/* MR1 : EMR Register
* Generate to use with PHY and PCTL
* 0 DE DLL Enable 0 Disable 1
diff --git a/src/soc/imgtec/pistachio/ddr3_init.c b/src/soc/imgtec/pistachio/ddr3_init.c
index e77a5cd..5cb36a0 100644
--- a/src/soc/imgtec/pistachio/ddr3_init.c
+++ b/src/soc/imgtec/pistachio/ddr3_init.c
@@ -119,7 +119,7 @@ int init_ddr3(void)
* 15:13 RSVD RSVD
* 31:16 Reserved
*/
- write32(DDR_PHY + DDRPHY_MR_OFFSET, 0x00001420);
+ write32(DDR_PHY + DDRPHY_MR_OFFSET, 0x00001520);
/* MR1 : DDR3 mode register 1
* Generate to use with PHY and PCTL
* 0 DE DLL Enable 0 Disable 1
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12760
-gerrit
commit 87a0d0755754f0d8433b7280929989b8f738bd85
Author: Martin Roth <martinroth(a)google.com>
Date: Thu Dec 17 12:44:35 2015 -0700
board_status.sh: checksum the rom and save it for later verification
This allows users who build the rom from the board-status repo to
verify that their rom matches the original.
Change-Id: I4e8564e389495909219f92ccdafb8e9568f8f0d0
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/board_status/board_status.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 578e40a..410488f 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -242,6 +242,7 @@ if [ -n "$(echo $rom_contents | grep payload_version)" ]; then
echo "Extracting payload_version from build/coreboot.rom"
$cbfstool_cmd build/coreboot.rom extract -n payload_version -f "${tmpdir}/payload_version.txt" >/dev/null 2>&1
fi
+md5sum -b build/coreboot.rom > "${tmpdir}/rom_checksum.txt"
# Obtain board and revision info to form the directory structure:
# <vendor>/<board>/<revision>/<timestamp>
@@ -264,6 +265,7 @@ test -f "${tmpdir}/payload_config.txt" && mv "${tmpdir}/payload_config.txt" "${t
test -f "${tmpdir}/payload_version.txt" && mv "${tmpdir}/payload_version.txt" "${tmpdir}/${results}"
mv "${tmpdir}/config.short.txt" "${tmpdir}/${results}"
mv "${tmpdir}/cbfs.txt" "${tmpdir}/${results}"
+mv "${tmpdir}/rom_checksum.txt" "${tmpdir}/${results}"
touch ${tmpdir}/${results}/revision.txt
printf "Local revision: %s\n" "$($getrevision -l)" >> ${tmpdir}/${results}/revision.txt
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12759
-gerrit
commit a93415d048963405f0bdd246f4d71ab1d6fadc87
Author: Martin Roth <martinroth(a)google.com>
Date: Thu Dec 17 12:38:45 2015 -0700
board_status.sh: Clean up output, show what the script is doing
- Print what the script is doing so when it asks for the ssh password
several times in a row, it's obvious that it's actually doing different
things, not that the password failed.
- Don't print the output from cbfstool - it's not useful.
Change-Id: I785283475e14f242117682800c26db6b4f9f1e2c
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/board_status/board_status.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index fce45fb..578e40a 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -225,7 +225,8 @@ if test ! -x build/cbfstool; then
make -C util/cbfstool/ && cp util/cbfstool/cbfstool build/cbfstool
fi
test_cmd $LOCAL "$cbfstool_cmd"
-$cbfstool_cmd build/coreboot.rom extract -n config -f ${tmpdir}/config.txt
+echo "Extracting config.txt from build/coreboot.rom"
+$cbfstool_cmd build/coreboot.rom extract -n config -f "${tmpdir}/config.txt" >/dev/null 2>&1
mv ${tmpdir}/config.txt ${tmpdir}/config.short.txt
cp ${tmpdir}/config.short.txt ${tmpcfg}
yes "" | make DOTCONFIG=${tmpcfg} oldconfig 2>/dev/null >/dev/null
@@ -272,13 +273,17 @@ printf "Upstream URL: %s\n" $($getrevision -U)>> ${tmpdir}/${results}/revision.t
printf "Timestamp: %s\n" "$timestamp" >> ${tmpdir}/${results}/revision.txt
if [ -z "$SERIAL_DEVICE" ]; then
+ echo "Verifying that CBMEM is available on remote device"
test_cmd $REMOTE "cbmem"
+ echo "Getting coreboot boot log"
cmd $REMOTE "cbmem -c" "${tmpdir}/${results}/coreboot_console.txt"
+ echo "Getting timestamp data"
cmd_nonfatal $REMOTE "cbmem -t" "${tmpdir}/${results}/coreboot_timestamps.txt"
else
get_serial_bootlog "$SERIAL_DEVICE" "$SERIAL_PORT_SPEED" "${tmpdir}/${results}/coreboot_console.txt"
fi
+echo "Getting remote dmesg"
cmd $REMOTE dmesg "${tmpdir}/${results}/kernel_log.txt"
#
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12757
-gerrit
commit 207f6f8bcd7b4d40243194c117f2daa987252fd3
Author: Martin Roth <martinroth(a)google.com>
Date: Thu Dec 17 12:02:45 2015 -0700
board_status.sh: Update to fix serial port reads
The old serial port read method lost characters from the boot log. This
method works better for me.
- Put get_serial_bootlog arguments into variable names for clarity.
- Fully configure the serial port with stty: disable parity and flow control.
- Change serial port read from reading with 'cat' to reading with 'read'.
- Update help to show current default speed from the variable.
tested under dash, bash, and zsh on several platfoms.
Change-Id: I91ae63a3c226e61019dbdf69c405c3f20ba7db54
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/board_status/board_status.sh | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index ee27bc0..d8bd3a8 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -122,8 +122,12 @@ cmd_nonfatal()
# $3: filename to direct output of command into
get_serial_bootlog () {
- if [ ! -c "$1" ]; then
- echo "$1 is not a valid serial device"
+ local TTY=$1
+ local SPEED=$2
+ local FILENAME=$3
+
+ if [ ! -c "$TTY" ]; then
+ echo "$TTY is not a valid serial device"
exit $EXIT_FAILURE
fi
@@ -136,27 +140,29 @@ get_serial_bootlog () {
fi
echo
- echo "Waiting to receive boot log from $1"
+ echo "Waiting to receive boot log from $TTY"
echo "Press [Enter] when the boot is complete and the"
echo "system is ready for ssh to get the dmesg log."
+ echo
if [ $tput_not_available -eq 0 ]; then
tput sgr0
fi
# set up the serial port
- cmd $LOCAL "stty -F $1 $2 cs8 -cstopb"
+ stty -F $TTY $SPEED cs8 -cstopb -parenb clocal
# read from the serial port - user must press enter when complete
test_cmd $LOCAL "tee"
- cat "$SERIAL_DEVICE" | tee "$3" &
+ while read LINE; do
+ echo "$LINE" | tee -a "$FILENAME"
+ done < "$SERIAL_DEVICE" &
PID=$!
- read
- kill "$PID" 2>/dev/null &
+ read foo
+ kill "$PID" 2>/dev/null
- # remove the binary zero value that gets inserted into the file.
- sed -i 's/\x00//' "$3"
+ echo "Finished reading boot log."
}
show_help() {
@@ -173,7 +179,7 @@ Options
-s </dev/xxx>
Obtain boot log via serial device.
-S <speed>
- Set the port speed for the serial device (Default is 115200).
+ Set the port speed for the serial device (Default is $SERIAL_PORT_SPEED).
-u
Upload results to coreboot.org.
"