Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3195
-gerrit
commit af94d5a2992557f43125e6b2031c3345198c3baa
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Sat May 4 01:54:45 2013 +0200
Revert "exynos5250/snow: deprecate time.h"
This reverts commit 2fde9668b47e74d1bfad2f1688a4481e6b966d04
Somehow this got merged before its dependencies. 3190 must be merged first, followed by 3176. However 3190 will fail while this patch is in. So the situation can't correct itself.
Reverting this until the other two go in.
Change-Id: I176f37c12711849c96f1889eacad38c00a8142c4
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
src/cpu/samsung/exynos5250/clk.h | 1 -
src/cpu/samsung/exynos5250/mct.c | 12 ++++++++++--
src/cpu/samsung/exynos5250/monotonic_timer.c | 1 +
src/include/time.h | 26 ++++++++++++++++++++++++++
src/mainboard/google/snow/bootblock.c | 6 +++---
src/mainboard/google/snow/romstage.c | 1 +
6 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/src/cpu/samsung/exynos5250/clk.h b/src/cpu/samsung/exynos5250/clk.h
index 828e7d8..1894c00 100644
--- a/src/cpu/samsung/exynos5250/clk.h
+++ b/src/cpu/samsung/exynos5250/clk.h
@@ -585,7 +585,6 @@ int clock_get_mem_selection(enum ddr_mode *mem_type,
unsigned *frequency_mhz, unsigned *arm_freq,
enum mem_manuf *mem_manuf);
-void mct_start(void);
uint64_t mct_raw_value(void);
#endif
diff --git a/src/cpu/samsung/exynos5250/mct.c b/src/cpu/samsung/exynos5250/mct.c
index db76e9d..4216643 100644
--- a/src/cpu/samsung/exynos5250/mct.c
+++ b/src/cpu/samsung/exynos5250/mct.c
@@ -22,7 +22,7 @@
#include <arch/io.h>
#include <stdint.h>
-
+#include <time.h>
#include "clk.h"
struct __attribute__((packed)) mct_regs
@@ -101,8 +101,16 @@ uint64_t mct_raw_value(void)
return (upper << 32) | lower;
}
-void mct_start(void)
+void timer_start(void)
{
writel(readl(&mct->g_tcon) | (0x1 << 8), &mct->g_tcon);
enabled = 1;
}
+
+u32 timer_us(void)
+{
+ uint64_t raw = mct_raw_value();
+ static uint32_t ticks_per_microsecond = MCT_HZ/1000000;
+ uint32_t usec = raw / ticks_per_microsecond;
+ return usec;
+}
diff --git a/src/cpu/samsung/exynos5250/monotonic_timer.c b/src/cpu/samsung/exynos5250/monotonic_timer.c
index 7c6229b..85fb208 100644
--- a/src/cpu/samsung/exynos5250/monotonic_timer.c
+++ b/src/cpu/samsung/exynos5250/monotonic_timer.c
@@ -20,6 +20,7 @@
#include <stdint.h>
#include <delay.h>
#include <timer.h>
+#include <time.h> /* TODO: deprecate in favor of monotonic timer stuff */
#include "clk.h"
diff --git a/src/include/time.h b/src/include/time.h
new file mode 100644
index 0000000..2cfcb35
--- /dev/null
+++ b/src/include/time.h
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Google, Inc.
+ *
+ * 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 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
+ */
+
+#ifndef TIME_H
+#define TIME_H
+
+void timer_start(void);
+u32 timer_us(void);
+
+#endif /* TIME_H */
diff --git a/src/mainboard/google/snow/bootblock.c b/src/mainboard/google/snow/bootblock.c
index 56c2650..4464042 100644
--- a/src/mainboard/google/snow/bootblock.c
+++ b/src/mainboard/google/snow/bootblock.c
@@ -21,8 +21,8 @@
#include <arch/io.h>
#include <cbfs.h>
#include <uart.h>
+#include <time.h>
#include <console/console.h>
-#include <cpu/samsung/exynos5250/clk.h>
#include <cpu/samsung/exynos5250/periph.h>
#include <cpu/samsung/exynos5250/pinmux.h>
#include "mainboard.h"
@@ -30,10 +30,10 @@
void bootblock_mainboard_init(void);
void bootblock_mainboard_init(void)
{
- /* kick off the multi-core timer.
+ /* kick off the microsecond timer.
* We want to do this as early as we can.
*/
- mct_start();
+ timer_start();
if (snow_get_wakeup_state() == SNOW_WAKEUP_DIRECT) {
snow_wakeup();
diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c
index 508dac6..aa3a340 100644
--- a/src/mainboard/google/snow/romstage.c
+++ b/src/mainboard/google/snow/romstage.c
@@ -36,6 +36,7 @@
#include <cpu/samsung/exynos5250/clock_init.h>
#include <console/console.h>
#include <arch/stages.h>
+#include <time.h>
#include <drivers/maxim/max77686/max77686.h>
#include <device/i2c.h>
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3195
-gerrit
commit 9941308313a943367f923a58b702721e428bcb2e
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Sat May 4 01:54:45 2013 +0200
Revert "exynos5250/snow: deprecate time.h"
This reverts commit 2fde9668b47e74d1bfad2f1688a4481e6b966d04
Somehow this got merged before its dependencies. 3190 must be merged first, followed by 3176. However 3190 will fail while this patch is in. So the situation can't correct itself.
Reverting this until the other two go in.
Change-Id: I176f37c12711849c96f1889eacad38c00a8142c4
---
src/cpu/samsung/exynos5250/clk.h | 1 -
src/cpu/samsung/exynos5250/mct.c | 12 ++++++++++--
src/cpu/samsung/exynos5250/monotonic_timer.c | 1 +
src/include/time.h | 26 ++++++++++++++++++++++++++
src/mainboard/google/snow/bootblock.c | 6 +++---
src/mainboard/google/snow/romstage.c | 1 +
6 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/src/cpu/samsung/exynos5250/clk.h b/src/cpu/samsung/exynos5250/clk.h
index 828e7d8..1894c00 100644
--- a/src/cpu/samsung/exynos5250/clk.h
+++ b/src/cpu/samsung/exynos5250/clk.h
@@ -585,7 +585,6 @@ int clock_get_mem_selection(enum ddr_mode *mem_type,
unsigned *frequency_mhz, unsigned *arm_freq,
enum mem_manuf *mem_manuf);
-void mct_start(void);
uint64_t mct_raw_value(void);
#endif
diff --git a/src/cpu/samsung/exynos5250/mct.c b/src/cpu/samsung/exynos5250/mct.c
index db76e9d..4216643 100644
--- a/src/cpu/samsung/exynos5250/mct.c
+++ b/src/cpu/samsung/exynos5250/mct.c
@@ -22,7 +22,7 @@
#include <arch/io.h>
#include <stdint.h>
-
+#include <time.h>
#include "clk.h"
struct __attribute__((packed)) mct_regs
@@ -101,8 +101,16 @@ uint64_t mct_raw_value(void)
return (upper << 32) | lower;
}
-void mct_start(void)
+void timer_start(void)
{
writel(readl(&mct->g_tcon) | (0x1 << 8), &mct->g_tcon);
enabled = 1;
}
+
+u32 timer_us(void)
+{
+ uint64_t raw = mct_raw_value();
+ static uint32_t ticks_per_microsecond = MCT_HZ/1000000;
+ uint32_t usec = raw / ticks_per_microsecond;
+ return usec;
+}
diff --git a/src/cpu/samsung/exynos5250/monotonic_timer.c b/src/cpu/samsung/exynos5250/monotonic_timer.c
index 7c6229b..85fb208 100644
--- a/src/cpu/samsung/exynos5250/monotonic_timer.c
+++ b/src/cpu/samsung/exynos5250/monotonic_timer.c
@@ -20,6 +20,7 @@
#include <stdint.h>
#include <delay.h>
#include <timer.h>
+#include <time.h> /* TODO: deprecate in favor of monotonic timer stuff */
#include "clk.h"
diff --git a/src/include/time.h b/src/include/time.h
new file mode 100644
index 0000000..2cfcb35
--- /dev/null
+++ b/src/include/time.h
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Google, Inc.
+ *
+ * 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 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
+ */
+
+#ifndef TIME_H
+#define TIME_H
+
+void timer_start(void);
+u32 timer_us(void);
+
+#endif /* TIME_H */
diff --git a/src/mainboard/google/snow/bootblock.c b/src/mainboard/google/snow/bootblock.c
index 56c2650..4464042 100644
--- a/src/mainboard/google/snow/bootblock.c
+++ b/src/mainboard/google/snow/bootblock.c
@@ -21,8 +21,8 @@
#include <arch/io.h>
#include <cbfs.h>
#include <uart.h>
+#include <time.h>
#include <console/console.h>
-#include <cpu/samsung/exynos5250/clk.h>
#include <cpu/samsung/exynos5250/periph.h>
#include <cpu/samsung/exynos5250/pinmux.h>
#include "mainboard.h"
@@ -30,10 +30,10 @@
void bootblock_mainboard_init(void);
void bootblock_mainboard_init(void)
{
- /* kick off the multi-core timer.
+ /* kick off the microsecond timer.
* We want to do this as early as we can.
*/
- mct_start();
+ timer_start();
if (snow_get_wakeup_state() == SNOW_WAKEUP_DIRECT) {
snow_wakeup();
diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c
index 508dac6..aa3a340 100644
--- a/src/mainboard/google/snow/romstage.c
+++ b/src/mainboard/google/snow/romstage.c
@@ -36,6 +36,7 @@
#include <cpu/samsung/exynos5250/clock_init.h>
#include <console/console.h>
#include <arch/stages.h>
+#include <time.h>
#include <drivers/maxim/max77686/max77686.h>
#include <device/i2c.h>
the following patch was just integrated into master:
commit cc76d7e011ead7350c8b7017c401a584e88154e2
Author: Rudolf Marek <r.marek(a)assembler.cz>
Date: Wed May 1 22:29:13 2013 +0200
Asus F2A85-M Enable the SD controller for F2A85-M
If the SD controller is "off" hudson.c won't disable that because,
there is no code for this yet.
The PCI device is still visible and PCI BAR will be allocated
by Linux. Unfortunately it may happen that the particular address
is used by non-standard BAR for SPI controller.
Change-Id: Ied7c581727541e2c81b0b1c2b70fd32de0014730
Signed-off-by: Rudolf Marek <r.marek(a)assembler.cz>
Reviewed-on: http://review.coreboot.org/3167
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Thu May 2 08:05:13 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Sat May 4 00:26:35 2013, giving +2
See http://review.coreboot.org/3167 for details.
-gerrit
the following patch was just integrated into master:
commit dfb0686f8435d8e637a3ab23bc07b0ef5caef0e9
Author: Martin Roth <martin.roth(a)se-eng.com>
Date: Tue Apr 23 15:11:52 2013 -0600
AMD F15: Fix warning in Proc/CPU/Feature
Fix Warning:
cpuFeatureLeveling.c:265, GNU Compiler 4 (gcc), Priority: Normal
cast to pointer from integer of different size [-Wint-to-pointer-cast]
with an intermediate cast to (intptr_t)
Change-Id: I3bfd2ea1e797632316675338789dabef8f73ba64
Signed-off-by: Martin Roth <martin.roth(a)se-eng.com>
Reviewed-on: http://review.coreboot.org/3126
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Dave Frodin <dave.frodin(a)se-eng.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Wed Apr 24 00:15:37 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Sat May 4 00:25:19 2013, giving +2
See http://review.coreboot.org/3126 for details.
-gerrit
the following patch was just integrated into master:
commit 8187f3d32c7ec85d1cc2228e2e7729ffc80c4b89
Author: Martin Roth <martin.roth(a)se-eng.com>
Date: Tue Apr 23 15:02:51 2013 -0600
AMD F15: Fix warnings in Proc/Common
This fixes 3 warnings in the Proc/Common directory:
AmdS3Save.c:250, GNU Compiler 4 (gcc), Priority: Normal
AmdS3LateRestore.c:123, GNU Compiler 4 (gcc), Priority: Normal
cast from pointer to integer of different size [-Wpointer-to-int-cast]
Fixed with a second cast to (intptr_t)
AmdInitReset.c:153, GNU Compiler 4 (gcc), Priority: Normal
statement with no effect [-Wunused-value]
Fixed by commenting the line out as it is in the other families code.
Change-Id: Ib35ec466671712af01568b7c2a18ee138fe883c0
Signed-off-by: Martin Roth <martin.roth(a)se-eng.com>
Reviewed-on: http://review.coreboot.org/3125
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Dave Frodin <dave.frodin(a)se-eng.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Tue Apr 23 23:43:17 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Sat May 4 00:25:08 2013, giving +2
See http://review.coreboot.org/3125 for details.
-gerrit