the following patch was just integrated into master:
commit 0c8b7d1ac272d5578e61c260a14f4fabbf3f53eb
Author: Stefan Tauner <stefan.tauner(a)gmx.at>
Date: Fri Apr 5 20:38:08 2013 +0200
inteltool: remove unused file descriptor variable and ifdefs
Change-Id: I6a119b1f362f481914377e8d14c713159f895130
Signed-off-by: Stefan Tauner <stefan.tauner(a)gmx.at>
Reviewed-on: http://review.coreboot.org/3030
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
Build-Tested: build bot (Jenkins) at Fri Apr 5 21:46:02 2013, giving +1
Reviewed-By: Ronald G. Minnich <rminnich(a)gmail.com> at Mon Apr 8 18:17:57 2013, giving +2
See http://review.coreboot.org/3030 for details.
-gerrit
the following patch was just integrated into master:
commit db9eaf4cb2a2fe65b0d08dc5b47426f7399d6757
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Fri Apr 5 15:38:12 2013 -0700
snow/exynos5250: move board-specific power stuff to mainboard dir
This moves highly board-specific code out from the Exynos5250
power_init() into Snow's romstage.c. There's no reason the CPU-
specific code should care about which PMIC we are using and
which bus it is on.
Change-Id: I52313177395519cddcab11225fc23d5e50c4c4e3
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Reviewed-on: http://review.coreboot.org/3034
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
Build-Tested: build bot (Jenkins) at Sat Apr 6 03:53:00 2013, giving +1
Reviewed-By: Ronald G. Minnich <rminnich(a)gmail.com> at Mon Apr 8 18:16:04 2013, giving +2
See http://review.coreboot.org/3034 for details.
-gerrit
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3037
-gerrit
commit 509eab148b71fc36833aa0feb6bb63e74dd056a5
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Sun Apr 7 17:26:34 2013 -0700
armv7: specify condition code for msr instruction
This adds condition codes when using the msr instruction. Although
described as "optional" in the Cortex-A series programmer's guide,
our experience with using the msr instruction in the payload suggests
that the condition code is not optional and that this only worked
in coreboot (and u-boot) because the processor comes up in SVC32 mode.
(credit to Gabe Black for finding this, I'm only uploading the patch)
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Change-Id: I0aa4715ae415e1ccc5719b7b55adcd527cc1597b
---
src/arch/armv7/bootblock.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arch/armv7/bootblock.inc b/src/arch/armv7/bootblock.inc
index c647834..faf5475 100644
--- a/src/arch/armv7/bootblock.inc
+++ b/src/arch/armv7/bootblock.inc
@@ -58,7 +58,7 @@ reset:
mrs r0, cpsr
bic r0, r0, #0x1f
orr r0, r0, #0xd3
- msr cpsr,r0
+ msr cpsr_cxsf,r0
/*
* From Cortex-A Series Programmer's Guide:
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3038
-gerrit
commit eff28f992c90119e71692f0705c5c8f153ec345d
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Sun Apr 7 17:38:32 2013 -0700
exynos5250: add missing address-of operator in UART driver
This adds a missing address-of operator. This was a subtle bug that
didn't seem to cause problems at first since the serial console
appeared to work. However it caused an imprecise external abort which
became apparent later on when aborts were unmasked in the kernel via
the CPSR_A bit.
(credit goes to Gabe Black for finding this)
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Change-Id: I80a33b147d92d559fa8fefbe7d5642235deb9aea
---
src/cpu/samsung/exynos5250/uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/samsung/exynos5250/uart.c b/src/cpu/samsung/exynos5250/uart.c
index d23087a..75c5763 100644
--- a/src/cpu/samsung/exynos5250/uart.c
+++ b/src/cpu/samsung/exynos5250/uart.c
@@ -185,7 +185,7 @@ static void exynos5_uart_tx_byte(unsigned char data)
struct s5p_uart *uart = (struct s5p_uart *)base_port;
/* wait for room in the tx FIFO */
- while ((readl(uart->ufstat) & TX_FIFO_FULL_MASK)) {
+ while ((readl(&uart->ufstat) & TX_FIFO_FULL_MASK)) {
if (exynos5_uart_err_check(1))
return;
}
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3038
-gerrit
commit 32ad472aa1b52549eae47a0f21746c8e41eff871
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Sun Apr 7 17:38:32 2013 -0700
exynos5250: add missing address-of operator in UART driver
This adds a missing address-of operator. This was a subtle bug that
didn't seem to cause problems at first since the serial console
appeared to work. However it caused an imprecise external abort which
became apparent later on when aborts were unmasked in the kernel via
the CPSR_A bit.
(credit goes to Gabe Black for finding this)
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Change-Id: I80a33b147d92d559fa8fefbe7d5642235deb9aea
---
src/cpu/samsung/exynos5250/uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/samsung/exynos5250/uart.c b/src/cpu/samsung/exynos5250/uart.c
index d23087a..75c5763 100644
--- a/src/cpu/samsung/exynos5250/uart.c
+++ b/src/cpu/samsung/exynos5250/uart.c
@@ -185,7 +185,7 @@ static void exynos5_uart_tx_byte(unsigned char data)
struct s5p_uart *uart = (struct s5p_uart *)base_port;
/* wait for room in the tx FIFO */
- while ((readl(uart->ufstat) & TX_FIFO_FULL_MASK)) {
+ while ((readl(&uart->ufstat) & TX_FIFO_FULL_MASK)) {
if (exynos5_uart_err_check(1))
return;
}
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3037
-gerrit
commit c4a05467636ba94ead652be9588e9c96c85aa2a4
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Sun Apr 7 17:26:34 2013 -0700
armv7: specify operational condition codes for msr instruction
This adds condition codes when using the msr instruction. Although
described as "optional" in the Cortex-A series programmer's guide,
our experience with using the msr instruction in the payload suggests
that the condition code is not optional and that this only worked
in coreboot (and u-boot) because the processor comes up in SVC32 mode.
(credit to Gabe Black for finding this, I'm only uploading the patch)
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Change-Id: I0aa4715ae415e1ccc5719b7b55adcd527cc1597b
---
src/arch/armv7/bootblock.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arch/armv7/bootblock.inc b/src/arch/armv7/bootblock.inc
index c647834..faf5475 100644
--- a/src/arch/armv7/bootblock.inc
+++ b/src/arch/armv7/bootblock.inc
@@ -58,7 +58,7 @@ reset:
mrs r0, cpsr
bic r0, r0, #0x1f
orr r0, r0, #0xd3
- msr cpsr,r0
+ msr cpsr_cxsf,r0
/*
* From Cortex-A Series Programmer's Guide:
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3035
-gerrit
commit d4eb3b284c8b29366a7ab3d900b784a2bb73d55c
Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
Date: Sat Apr 6 16:52:12 2013 +0200
Add Azalia support for non-AGESA sb700 and enable it for M4A785T-M
The code was took and converted from configureAzaliaSetConfigD4Dword
in src/vendorcode/amd/cimx/sb700/AZALIA.c
TODO: split that commit in two(one for my board and one generic).
TODO: better commit message
Change-Id: I333b2ebe595aacd9562ad8f4f7f7efab0386619a
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
---
src/mainboard/asus/m4a785-m/hda.h | 38 +++++++++++++++++++++++++++++++++
src/mainboard/asus/m4a785-m/mainboard.c | 25 ++++++++++++++++++++++
src/southbridge/amd/sb700/hda.c | 28 ++++++++++++++++++++++++
src/southbridge/amd/sb700/hda.h | 31 +++++++++++++++++++++++++++
4 files changed, 122 insertions(+)
diff --git a/src/mainboard/asus/m4a785-m/hda.h b/src/mainboard/asus/m4a785-m/hda.h
new file mode 100644
index 0000000..77d3afb
--- /dev/null
+++ b/src/mainboard/asus/m4a785-m/hda.h
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011 Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 M4A785T_M_HDA_H
+#define M4A785T_M_HDA_H
+static CODECENTRY m4a785t_m_codec_vt1708s[] = /* VIA VT1708S */
+{
+ {0x19, 0x01011012},
+ {0x1a, 0x01a19026},
+ {0x1b, 0x0181302e},
+ {0x1c, 0x01014010},
+ {0x1d, 0x0221401f},
+ {0x1e, 0x02a19027},
+ {0x1f, 0x593311f8},
+ {0x20, 0x074411f0},
+ {0x21, 0x985601f0},
+ {0x22, 0x01016011},
+ {0x23, 0x01012014},
+ {0xff, 0xffffffff} /* end of table */
+};
+#endif
diff --git a/src/mainboard/asus/m4a785-m/mainboard.c b/src/mainboard/asus/m4a785-m/mainboard.c
index b1154ab..bc9167a 100644
--- a/src/mainboard/asus/m4a785-m/mainboard.c
+++ b/src/mainboard/asus/m4a785-m/mainboard.c
@@ -25,7 +25,9 @@
#include <cpu/amd/mtrr.h>
#include <device/pci_def.h>
#include "southbridge/amd/sb700/sb700.h"
+#include "southbridge/amd/sb700/hda.h"
#include "southbridge/amd/sb700/smbus.h"
+#include "hda.h"
#define ADT7461_ADDRESS 0x4C
#define ARA_ADDRESS 0x0C /* Alert Response Address */
@@ -186,6 +188,28 @@ static void set_thermal_config(void)
*/
}
+static void audio_setup(void)
+{
+ struct device *dev;
+ u8 dbPinRouting, dbChannelNum=0;
+ u32 bar0 = 0;
+
+ printk(BIOS_INFO, "Configuring Azalia Started...\n");
+
+ /* find the BAR 0 */
+ dev = dev_find_slot(0, PCI_DEVFN(0x14, 2));
+ bar0 = dev->resource_list[0].base;
+
+ dbPinRouting = pci_read_config8(dev_find_slot(0, PCI_DEVFN(0x14, 0)), 0xfc /* SB_SMBUS_REGFC */ );
+ do{
+ if ( ( !(dbPinRouting & 0x1 /* BIT0 */) ) && (dbPinRouting & 0x2 /* BIT1 */ ) )
+ azalia_set_config(m4a785t_m_codec_vt1708s, dbChannelNum, bar0);
+ dbPinRouting >>= 2;
+ dbChannelNum++;
+ } while (dbChannelNum != 4);
+ printk(BIOS_INFO, "Configuring Azalia Ended...\n");
+}
+
/*************************************************
* enable the dedicated function in this board.
* This function called early than rs780_enable.
@@ -197,6 +221,7 @@ static void mainboard_enable(device_t dev)
set_pcie_dereset();
/* get_ide_dma66(); */
set_thermal_config();
+ audio_setup();
}
struct chip_operations mainboard_ops = {
diff --git a/src/southbridge/amd/sb700/hda.c b/src/southbridge/amd/sb700/hda.c
index 98cb75f..d02aed1 100644
--- a/src/southbridge/amd/sb700/hda.c
+++ b/src/southbridge/amd/sb700/hda.c
@@ -24,12 +24,40 @@
#include <device/pci_ops.h>
#include <arch/io.h>
#include <delay.h>
+#include "../../../vendorcode/amd/cimx/sb700/SB700.h"
#include "sb700.h"
+#include "hda.h"
#define HDA_ICII_REG 0x68
#define HDA_ICII_BUSY (1 << 0)
#define HDA_ICII_VALID (1 << 1)
+void azalia_set_config(CODECENTRY* tempAzaliaCodecEntryPtr, u32 ddChannelNum, u32 ddBAR0){
+ u8 dbtemp1,dbtemp2, i;
+ u32 ddtemp=0,ddtemp2=0;
+
+ while ((tempAzaliaCodecEntryPtr->Nid) != 0xFF){
+ dbtemp1=0x20;
+ if ((tempAzaliaCodecEntryPtr->Nid) == 0x1)
+ dbtemp1=0x24;
+ ddtemp = tempAzaliaCodecEntryPtr->Nid;
+ ddtemp &= 0xff;
+ ddtemp <<= 20;
+ ddtemp |= ddChannelNum;
+ ddtemp |= (0x700 << 8);
+ for(i=4; i>0; i--){
+ do{
+ ddtemp2 = read32(ddBAR0 + SB_AZ_BAR_REG68);
+ } while (ddtemp2 & 0x1 /* Bit 0 */);
+ dbtemp2 = ( (tempAzaliaCodecEntryPtr->Byte40) >> ((4-i) * 8 ) ) & 0xff;
+ ddtemp = (ddtemp & 0xFFFF0000)+ ((dbtemp1 - i) << 8) + dbtemp2;
+ write32(ddBAR0 + SB_AZ_BAR_REG60 /*, AccWidthUint32 | S3_SAVE, */, ddtemp);
+ // delay(60);
+ }
+ ++tempAzaliaCodecEntryPtr;
+ }
+}
+
static int set_bits(u32 port, u32 mask, u32 val)
{
u32 dword;
diff --git a/src/southbridge/amd/sb700/hda.h b/src/southbridge/amd/sb700/hda.h
new file mode 100644
index 0000000..e7d3009
--- /dev/null
+++ b/src/southbridge/amd/sb700/hda.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011 Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 SB700_HDA_H
+#define SB700_HDA_H
+
+typedef struct _CODECENTRY{
+ u8 Nid;
+ u32 Byte40;
+}CODECENTRY;
+
+void azalia_set_config(CODECENTRY* tempAzaliaCodecEntryPtr, u32 ddChannelNum, u32 ddBAR0);
+
+#endif
the following patch was just integrated into master:
commit 161ccc76ea0f8941a34c5bed323cc9ba1fe0221d
Author: Ronald G. Minnich <rminnich(a)gmail.com>
Date: Fri Apr 5 13:35:29 2013 -0700
exynos5250: add a chip.h file for the display register settings
Display hardware is part of this SOC, and we need to be able
to set certain variables in devicetree.cb. This chip file
contains the initial things we think we need to set.
Change-Id: I16f2d4228c87116dbeb53a3c9f3f359a6444f552
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
Reviewed-on: http://review.coreboot.org/3031
Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
Tested-by: build bot (Jenkins)
Build-Tested: build bot (Jenkins) at Sat Apr 6 01:22:14 2013, giving +1
Reviewed-By: David Hendricks <dhendrix(a)chromium.org> at Sat Apr 6 00:34:56 2013, giving +2
See http://review.coreboot.org/3031 for details.
-gerrit