Mono Moosbart (mono(a)posteo.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7923
-gerrit
commit 41ed4b1597c6957b63061380167972ada12d3813
Author: Axel Holewa <mono(a)posteo.de>
Date: Thu Dec 25 08:11:54 2014 +0100
macbook21: Add CST entries
Due to the CST entries the machine uses less power running
GNU/Linux-libre. This can be seen by monitoring CPU temperature
and time left the machine can run on battery. CPU temperature
measurements have been done with lm_sensors, battery querying
with acpi. Tests have been done before applying this patch and
after. In both cases the battery was fully loaded and the machine
powered up on battery, without AC. In both tests the machine was
idleing for more than 1 hour.
Without this patch battery was predicted to last 01:52:30 hours,
CPU temperature first measurement showed 38 degrees. After 15 min
idle, temperature has reached its maximum value in this test of
61 and 62 degrees (Core 0 and 1). Fan speed begins to increase
shortly after 15 min. From its minimal value 1800 rpm it reaches
3100 rpm after 40 min. CPU temperature did not increase any further.
After 60 min idle, the battery was predicted to still last 57 min.
With this patch battery was predicted to last 02:22:40 hours. That
is plus 30 min. CPU temperature begins at 35 degrees. After 15 min
temperature has reached 45 degrees; after 30 min it has reached
the maximal temperature during this test of about 50 degrees.
That is 10 degrees improvement. The fan stayed at minimal speed.
After 60 min idle, the battery was predicted to still last 01:22:48
hours; a 25 minute improvement.
Change-Id: I6b2173df1dc09300329b61b51b79f4b9f4a8fb13
Signed-off-by: Axel Holewa <mono(a)posteo.de>
---
src/mainboard/apple/macbook21/mainboard.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/apple/macbook21/mainboard.c b/src/mainboard/apple/macbook21/mainboard.c
index 99527c1..7d8ffd9 100644
--- a/src/mainboard/apple/macbook21/mainboard.c
+++ b/src/mainboard/apple/macbook21/mainboard.c
@@ -36,9 +36,15 @@
#include <drivers/intel/gma/int15.h>
#define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
+static acpi_cstate_t cst_entries[] = {
+ { 1, 1, 1000, { 0x7f, 1, 2, { 0 }, 0, 0 } },
+ { 2, 1, 500, { 0x7f, 1, 2, { 0 }, 0x10, 0 } },
+};
+
int get_cst_entries(acpi_cstate_t **entries)
{
- return 0;
+ *entries = cst_entries;
+ return ARRAY_SIZE(cst_entries);
}
static void mainboard_init(device_t dev)
the following patch was just integrated into master:
commit a40901bf01505508607fe1c9225482f7cbe57e63
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Mon Dec 22 18:46:18 2014 +1100
vendorcode/amd/cimx/sbX00: Make SBPort.c filename consistent
Change-Id: I41ba4cffa545a31c1e0845ec44c8a433bda9f99d
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7886
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
See http://review.coreboot.org/7886 for details.
-gerrit
the following patch was just integrated into master:
commit bae775a4f43449e79622ed144118554ff780744a
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Thu Dec 18 10:36:33 2014 +0200
arch/x86: Declare GDT symbols and move_gdt()
We relocate GDT to CBMEM, this can be done late in ramstage.
Note: We currently do this for BSP CPU only.
Change-Id: I626faaf22f846433f25ca2253d6a2a5230f50b6b
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/7858
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
See http://review.coreboot.org/7858 for details.
-gerrit
the following patch was just integrated into master:
commit a91e1e6cc18b3d510a8dd5e3b2c7bdbba3299369
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Dec 31 10:36:08 2014 +0200
Fix Kconfig whitespace
Change-Id: Iad64d018edda3064a77bfbcd41cfea5275a2e737
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/8013
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
See http://review.coreboot.org/8013 for details.
-gerrit
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8013
-gerrit
commit 1e9513befea11e4edce3af184bf236b53eefd982
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Dec 31 10:36:08 2014 +0200
Fix Kconfig whitespace
Change-Id: Iad64d018edda3064a77bfbcd41cfea5275a2e737
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/device/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 67d01e0..dc00b75 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -385,7 +385,7 @@ config SOFTWARE_I2C
be useful for debugging or on platforms where a driver for the real
I2C controller is not (yet) available. The platform code needs to
provide bindings to manually toggle I2C lines.
-
+
endmenu
menu "Display"
Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8012
-gerrit
commit 7fad4da58afd735cc5e2ab3d3aadf4056e502f14
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Wed May 28 10:49:51 2014 -0700
storm: modify memory layout
This is an interim change (before EFS is enabled), align ROM and RAM
stages so that they have enough room and do not step over each other.
BUG=chrome-os-partner:27784
TEST=manual
. booted coreboot successfully on ap148
Original-Change-Id: I6e1710ac7ca494a69aea5ba3b117bfd882aded26
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/202046
Original-Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
Original-Reviewed-by: Trevor Bourget <tbourget(a)codeaurora.org>
(cherry picked from commit f1fd4e3f9d699cc694cf7840c169db9bbe9193b6)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I9861d34a8bdd6963afbeed7fca7fda8a891ec481
---
src/soc/qualcomm/ipq806x/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/soc/qualcomm/ipq806x/Kconfig b/src/soc/qualcomm/ipq806x/Kconfig
index fccb251..33052e9 100644
--- a/src/soc/qualcomm/ipq806x/Kconfig
+++ b/src/soc/qualcomm/ipq806x/Kconfig
@@ -45,11 +45,11 @@ config BOOTBLOCK_BASE
config ROMSTAGE_BASE
hex
- default 0x40608000
+ default 0x40620000
config RAMSTAGE_BASE
hex
- default 0x4060c000
+ default 0x40640000
config SYS_SDRAM_BASE
hex
Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8011
-gerrit
commit 427c4ceb05389384d311af6a5add84c9eac75fb8
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue May 27 18:03:38 2014 -0700
ipq806x: clean up UART driver tx_byte function
The driver as it was copied from u-boot provided a function to
transmit multiple characters in one invocation. This feature was not
ported to coreboot, there is no need to maintain the complexity when
only one character at a time is transmitted. It is also very desirable
to get rid of a 1024 byte array allocated on the stack.
The array was necessary to allow to convert multiple newline
characters in the transmit data flow into two character sequences
CRLF. Now just a single word is enough to keep one or two characters
to transmit.
BUG=chrome-os-partner:27784
TEST=verified that coreboot with the new code prints generates console
output.
Original-Change-Id: I73869c5f4ca87210b34811b583386554bafff1e7
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/201782
Original-Reviewed-by: Stefan Reinauer <reinauer(a)chromium.org>
Original-Reviewed-by: Trevor Bourget <tbourget(a)codeaurora.org>
(cherry picked from commit eab3dc9d30c7e8355a2563e18ada78e4070e6151)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I4274b8f7188bf9636906b39bcd9ec7adf0e1222e
---
src/soc/qualcomm/ipq806x/include/ipq_uart.h | 9 ---
src/soc/qualcomm/ipq806x/uart.c | 121 +++++-----------------------
2 files changed, 18 insertions(+), 112 deletions(-)
diff --git a/src/soc/qualcomm/ipq806x/include/ipq_uart.h b/src/soc/qualcomm/ipq806x/include/ipq_uart.h
index da943b9..90ca704 100644
--- a/src/soc/qualcomm/ipq806x/include/ipq_uart.h
+++ b/src/soc/qualcomm/ipq806x/include/ipq_uart.h
@@ -38,15 +38,6 @@
((value << (32 - end_pos))\
>> (32 - (end_pos - start_pos)))
-
-#define PACK_CHARS_INTO_WORDS(a, cnt, word) { \
- word = 0; \
- int j; \
- for(j=0; j < (int)cnt; j++) { \
- word |= (a[j] & 0xff)<< (j * 8);\
- } \
- }
-
extern void __udelay(unsigned long usec);
diff --git a/src/soc/qualcomm/ipq806x/uart.c b/src/soc/qualcomm/ipq806x/uart.c
index f7b5d02..e09bd0f 100644
--- a/src/soc/qualcomm/ipq806x/uart.c
+++ b/src/soc/qualcomm/ipq806x/uart.c
@@ -192,108 +192,32 @@ msm_boot_uart_dm_read(unsigned int *data, int *count, int wait)
}
#endif
-/**
- * msm_boot_uart_replace_lr_with_cr - replaces "\n" with "\r\n"
- * @data_in: characters to be converted
- * @num_of_chars: no. of characters
- * @data_out: location where converted chars are stored
- *
- * Replace linefeed char "\n" with carriage return + linefeed
- * "\r\n". Currently keeping it simple than efficient.
- */
-static unsigned int
-msm_boot_uart_replace_lr_with_cr(unsigned char *data_in,
- int num_of_chars,
- char *data_out, int *num_of_chars_out)
+void uart_tx_byte(int idx, unsigned char data)
{
- int i = 0, j = 0;
-
- if ((data_in == NULL) || (data_out == NULL) || (num_of_chars < 0))
- return MSM_BOOT_UART_DM_E_INVAL;
-
- for (i = 0, j = 0; i < num_of_chars; i++, j++) {
- if (data_in[i] == '\n')
- data_out[j++] = '\r';
-
- data_out[j] = data_in[i];
- }
-
- *num_of_chars_out = j;
-
- return MSM_BOOT_UART_DM_E_SUCCESS;
-}
-
-/**
- * msm_boot_uart_dm_write - transmit data
- * @data: data to transmit
- * @num_of_chars: no. of bytes to transmit
- *
- * Writes the data to the TX FIFO. If no space is available blocks
- * till space becomes available.
- */
-static unsigned int
-msm_boot_uart_dm_write(unsigned char *data, unsigned int num_of_chars)
-{
- unsigned int tx_word_count = 0;
- unsigned int tx_char_left = 0, tx_char = 0;
- unsigned int tx_word = 0;
- int i = 0;
- char *tx_data = NULL;
- char new_data[1024];
+ int num_of_chars = 1;
+ unsigned tx_data = 0;
unsigned int base = uart_board_param.uart_dm_base;
- if ((data == NULL) || (num_of_chars <= 0))
- return MSM_BOOT_UART_DM_E_INVAL;
-
- /* Replace line-feed (/n) with carriage-return + line-feed (/r/n) */
- msm_boot_uart_replace_lr_with_cr(data, num_of_chars, new_data, &i);
-
- tx_data = new_data;
- num_of_chars = i;
-
- /* Write to NO_CHARS_FOR_TX register number of characters
- * to be transmitted. However, before writing TX_FIFO must
- * be empty as indicated by TX_READY interrupt in IMR register
- */
- /* Check if transmit FIFO is empty.
- * If not we'll wait for TX_READY interrupt. */
-
- if (!(readl_i(MSM_BOOT_UART_DM_SR(base)) & MSM_BOOT_UART_DM_SR_TXEMT)) {
- while (!(readl_i(MSM_BOOT_UART_DM_ISR(base)) &
- MSM_BOOT_UART_DM_TX_READY))
- udelay(1);
+ /* Add CR to every LF. */
+ if (data == '\n') {
+ num_of_chars++;
+ tx_data = '\r' | ('\n' << 8);
+ } else {
+ tx_data = data;
}
- /* We are here. FIFO is ready to be written. */
- /* Write number of characters to be written */
- writel_i(num_of_chars, MSM_BOOT_UART_DM_NO_CHARS_FOR_TX(base));
-
- /* Clear TX_READY interrupt */
- writel_i(MSM_BOOT_UART_DM_GCMD_RES_TX_RDY_INT,
- MSM_BOOT_UART_DM_CR(base));
-
- /* We use four-character word FIFO. So we need to divide data into
- * four characters and write in UART_DM_TF register */
- tx_word_count = (num_of_chars % 4) ? ((num_of_chars / 4) + 1) :
- (num_of_chars / 4);
- tx_char_left = num_of_chars;
-
- for (i = 0; i < (int)tx_word_count; i++) {
- tx_char = (tx_char_left < 4) ? tx_char_left : 4;
- PACK_CHARS_INTO_WORDS(tx_data, tx_char, tx_word);
-
- /* Wait till TX FIFO has space */
+ /* Wait until transmit FIFO is empty. */
while (!(readl_i(MSM_BOOT_UART_DM_SR(base)) &
- MSM_BOOT_UART_DM_SR_TXRDY))
+ MSM_BOOT_UART_DM_SR_TXEMT))
udelay(1);
+ /*
+ * TX FIFO is ready to accept new character(s). First write number of
+ * characters to be transmitted.
+ */
+ writel_i(num_of_chars, MSM_BOOT_UART_DM_NO_CHARS_FOR_TX(base));
- /* TX FIFO has space. Write the chars */
- writel_i(tx_word, MSM_BOOT_UART_DM_TF(base, 0));
- tx_char_left = num_of_chars - (i + 1) * 4;
- tx_data = tx_data + 4;
- }
-
- return MSM_BOOT_UART_DM_E_SUCCESS;
+ /* And now write the character(s) */
+ writel_i(tx_data, MSM_BOOT_UART_DM_TF(base, 0));
}
/*
@@ -419,15 +343,6 @@ uint32_t uartmem_getbaseaddr(void)
#endif
/**
- * uart_tx_byte - transmits a character
- * @c: character to transmit
- */
-void uart_tx_byte(int idx, unsigned char c)
-{
- msm_boot_uart_dm_write(&c, 1);
-}
-
-/**
* uart_tx_flush - transmits a string of data
* @s: string to transmit
*/