Rudolf Marek (r.marek@assembler.cz) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1680
-gerrit
commit a2dea87820ce5a52425bb3f088bd8590ced362f6 Author: Rudolf Marek r.marek@assembler.cz Date: Sun Nov 4 12:26:03 2012 +0100
Add the Asus F2A85-M
Add the Asus F2A85-M, while at it, add also SBxxx specific snippets which may be used by future boards. It contains handy stuff to enable the LPC decodes and also it enables clock output if SB clockchip is used.
Change-Id: Ieb782bdb35831568d61fd57c7c956bf4cc9747c7 Signed-off-by: Rudolf Marek r.marek@assembler.cz --- SerialICE/Kconfig | 6 ++++ SerialICE/mainboard/asus_f2a85-m.c | 50 ++++++++++++++++++++++++++++ SerialICE/southbridge/amd-sbxxx.c | 68 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+)
diff --git a/SerialICE/Kconfig b/SerialICE/Kconfig index 7199453..5a4c073 100644 --- a/SerialICE/Kconfig +++ b/SerialICE/Kconfig @@ -45,6 +45,10 @@ config BOARD_INTEL_D945GCLF config BOARD_DELL_S1850 bool "Dell PowerEdge S1850"
+config BOARD_ASUS_F2A85_M + bool "ASUS F2A85-M" + select BUILD_XMMSTACK + config BOARD_ASUS_M2V_MX_SE bool "ASUS M2V-MX SE" select VIA_ROMSTRAP @@ -121,6 +125,7 @@ config BOARD_INIT default "roda_rk886ex.c" if BOARD_RODA_RK886EX default "intel_d945gclf.c" if BOARD_INTEL_D945GCLF default "dell_s1850.c" if BOARD_DELL_S1850 + default "asus_f2a85-m.c" if BOARD_ASUS_F2A85_M default "asus_m2v-mx_se.c" if BOARD_ASUS_M2V_MX_SE default "asus_k8v-x.c" if BOARD_ASUS_K8V_X default "msi_ms6178.c" if BOARD_MSI_MS6178 @@ -144,6 +149,7 @@ config BOARD_INIT config SOUTHBRIDGE_INIT string default "southbridge/intel-ich7.c" if BOARD_KONTRON_986LCD_M + default "southbridge/amd-sbxxx.c" if BOARD_ASUS_F2A85_M
config SUPERIO_INIT string diff --git a/SerialICE/mainboard/asus_f2a85-m.c b/SerialICE/mainboard/asus_f2a85-m.c new file mode 100644 index 0000000..532421d --- /dev/null +++ b/SerialICE/mainboard/asus_f2a85-m.c @@ -0,0 +1,50 @@ +/* + * SerialICE + * + * Copyright (C) 2006 Uwe Hermann uwe@hermann-uwe.de + * Copyright (C) 2012 Rudolf Marek r.marek@assembler.cz + * + * 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 + */ + +const char boardname[33]="Asus F2A85-M "; + +#define SUPERIO_CONFIG_PORT 0x2e + +static void superio_init(void) +{ + u8 byte; + pnp_enter_ext_func_mode_ite(SUPERIO_CONFIG_PORT); + + /* Disable the watchdog. */ + pnp_set_logical_device(SUPERIO_CONFIG_PORT, 7); + pnp_write_register(SUPERIO_CONFIG_PORT, 0x72, 0x00); + + /* Enable the serial port. */ + pnp_set_logical_device(SUPERIO_CONFIG_PORT, 1); /* COM1 */ + pnp_set_enable(SUPERIO_CONFIG_PORT, 0); + pnp_set_iobase0(SUPERIO_CONFIG_PORT, 0x3f8); + pnp_set_irq0(SUPERIO_CONFIG_PORT, 4); + pnp_set_enable(SUPERIO_CONFIG_PORT, 1); + + pnp_exit_ext_func_mode_ite(SUPERIO_CONFIG_PORT); +} + + +static void chipset_init(void) +{ + southbridge_init(); + sbxxx_enable_48mhzout(); + superio_init(); +} diff --git a/SerialICE/southbridge/amd-sbxxx.c b/SerialICE/southbridge/amd-sbxxx.c new file mode 100644 index 0000000..86f1278 --- /dev/null +++ b/SerialICE/southbridge/amd-sbxxx.c @@ -0,0 +1,68 @@ +/* + * SerialICE + * + * Copyright (C) 2012 Rudolf Marek r.marek@assembler.cz + * + * 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 + */ + +/* This initializes AMD SBxx that + * o Ports 0x2e/0x2f 0x4e/0x4f and 0x3f8 are routed to superio + * o the MMIO regs of SB are accesible + * o enables POST card (see #if 0) + */ + +#define MMIO_NON_POSTED_START 0xfed00000 +#define MMIO_NON_POSTED_END 0xfedfffff +#define SB_MMIO 0xFED80000 +#define SB_MMIO_MISC32(x) *(volatile u32 *)(SB_MMIO + 0xE00 + (x)) + +static void sbxxx_enable_48mhzout(void) +{ + /* most likely programming to 48MHz out signal */ + u32 reg32; + reg32 = SB_MMIO_MISC32(0x28); + reg32 &= 0xffc7ffff; + reg32 |= 0x00100000; + SB_MMIO_MISC32(0x28) = reg32; + + reg32 = SB_MMIO_MISC32(0x40); + reg32 &= ~0x80u; + SB_MMIO_MISC32(0x40) = reg32; +} + +static void southbridge_init(void) +{ + u16 reg16; + u32 reg32; + + /* route FED00000 - FEDFFFFF as non-posted to SB */ + pci_write_config32(PCI_ADDR(0, 0x18, 1, 0x84), + (((MMIO_NON_POSTED_END & ~0xffffu) >> 8) | (1 << 7))); + /* lowest NP address is HPET at FED00000 */ + pci_write_config32(PCI_ADDR(0, 0x18, 1, 0x80), + (MMIO_NON_POSTED_START >> 8) | 3); + + /* Send all IO (0000-FFFF) to southbridge. */ + pci_write_config32(PCI_ADDR(0, 0x18, 1, 0xc4), 0x0000f000); + pci_write_config32(PCI_ADDR(0, 0x18, 1, 0xc0), 0x00000003); + + /* SB MMIO range decode enable */ + outb(0x24, 0xcd6); + outb(0x1, 0xcd7); + + /* Enable LPC decoding of 0x2e/0x2f, 0x4e/0x4f 0x3f8 */ + pci_write_config8(PCI_ADDR(0, 0x14, 3, 0x44), (1<<6)); + pci_write_config8(PCI_ADDR(0, 0x14, 3, 0x48), (1 << 1) | (1 << 0)); +}