David Imhoff (dimhoff_devel(a)xs4all.nl) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10068
-gerrit
commit ed8a98e54c169e21d6eb7511eb838ba7c3b15e42
Author: David Imhoff <dimhoff_devel(a)xs4all.nl>
Date: Sun May 3 14:06:21 2015 +0200
spi: Remove out of date comment and alphabetically order flash table
What is described by the comment has already been fixed in f0d038f4.
This also means that STM_ID_N25Q128 doesn't have to be at the top of
stmicro_spi_flash_table anymore.
Change-Id: I7a9e9a0cdfdb1cf34e914e186fc6957c1d9b5ca6
Signed-off-by: David Imhoff <dimhoff_devel(a)xs4all.nl>
---
src/drivers/spi/stmicro.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/drivers/spi/stmicro.c b/src/drivers/spi/stmicro.c
index 3e35120..3cec0be 100644
--- a/src/drivers/spi/stmicro.c
+++ b/src/drivers/spi/stmicro.c
@@ -60,11 +60,6 @@
#define STM_ID_N25Q256A 0xba19
#define STM_ID_N25Q128 0xbb18
-/* Some SPI flash share the same .idcode1 (idcode[2]). To handle this without
- * (possibly) breaking existing implementations, add the new device at the top
- * of the flash table array and set its .idcode1 = STM_ID_USE_ALT_ID. The .id
- * is then (idcode[1] << 8 | idcode[2]).
- */
struct stmicro_spi_flash_params {
u16 device_id;
u8 op_erase;
@@ -88,14 +83,6 @@ static inline struct stmicro_spi_flash *to_stmicro_spi_flash(struct spi_flash
static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = {
{
- .device_id = STM_ID_N25Q128,
- .op_erase = CMD_M25PXX_SSE,
- .page_size = 256,
- .pages_per_sector = 16,
- .nr_sectors = 4096,
- .name = "N25Q128",
- },
- {
.device_id = STM_ID_M25P10,
.op_erase = CMD_M25PXX_SE,
.page_size = 256,
@@ -160,6 +147,14 @@ static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = {
.name = "M25P128",
},
{
+ .device_id = STM_ID_N25Q128,
+ .op_erase = CMD_M25PXX_SSE,
+ .page_size = 256,
+ .pages_per_sector = 16,
+ .nr_sectors = 4096,
+ .name = "N25Q128",
+ },
+ {
.device_id = STM_ID_N25Q256A,
.page_size = 256,
.pages_per_sector = 256,
David Imhoff (dimhoff_devel(a)xs4all.nl) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10067
-gerrit
commit 2334401134ba381f12e001713a510a7bd3de2966
Author: David Imhoff <dimhoff_devel(a)xs4all.nl>
Date: Sun May 3 13:47:49 2015 +0200
spi: Changed 'page' to 'sector' in log message
The log message said 'page size' while actually the sector size was
printed. This is confusing since for stmicro page size != sector size.
Change-Id: I795a4b7c1bc8de2538a87fd4ba56f5a78d9ca2ac
Signed-off-by: David Imhoff <dimhoff_devel(a)xs4all.nl>
---
src/drivers/spi/spi_flash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index d40f72a..b8469b9 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -381,7 +381,7 @@ flash_detected:
tseg_relocate((void **)&flash->name);
#endif
- printk(BIOS_INFO, "SF: Detected %s with page size %x, total %x\n",
+ printk(BIOS_INFO, "SF: Detected %s with sector size %x, total %x\n",
flash->name, flash->sector_size, flash->size);
spi_flash_dev = flash;
Damien Zammit (damien(a)zamaudio.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10066
-gerrit
commit 26329de655582728909118497663e40bf08ddea9
Author: Damien Zammit <damien(a)zamaudio.com>
Date: Sun May 3 19:49:37 2015 +1000
cpu/intel/socket_atom_d5xx: Add Intel Atom D5xx cpu and socket.
Will push a working romstage for Intel D510MO board soon that
boots to UART console.
Change-Id: I82a630c9836c099d0fcc62e019c20f328a75151d
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
---
src/cpu/intel/Kconfig | 1 +
src/cpu/intel/Makefile.inc | 1 +
src/cpu/intel/model_106cx/model_106cx_init.c | 1 +
src/cpu/intel/socket_atom_d5xx/Kconfig | 20 +++++++++++++++++++
src/cpu/intel/socket_atom_d5xx/Makefile.inc | 10 ++++++++++
src/cpu/intel/socket_atom_d5xx/socket_atom_d5xx.c | 24 +++++++++++++++++++++++
6 files changed, 57 insertions(+)
diff --git a/src/cpu/intel/Kconfig b/src/cpu/intel/Kconfig
index de76e3e..8b98d4a 100644
--- a/src/cpu/intel/Kconfig
+++ b/src/cpu/intel/Kconfig
@@ -23,6 +23,7 @@ source src/cpu/intel/haswell/Kconfig
# Sockets/Slots
source src/cpu/intel/slot_2/Kconfig
source src/cpu/intel/slot_1/Kconfig
+source src/cpu/intel/socket_atom_d5xx/Kconfig
source src/cpu/intel/socket_BGA956/Kconfig
source src/cpu/intel/socket_FC_PGA370/Kconfig
source src/cpu/intel/socket_mFCBGA479/Kconfig
diff --git a/src/cpu/intel/Makefile.inc b/src/cpu/intel/Makefile.inc
index 51451e9..b1d8737 100644
--- a/src/cpu/intel/Makefile.inc
+++ b/src/cpu/intel/Makefile.inc
@@ -3,6 +3,7 @@
#
# Therefore: ONLY include Makefile.inc from socket directories!
+subdirs-$(CONFIG_CPU_INTEL_SOCKET_ATOM_D5XX) += socket_atom_d5xx
subdirs-$(CONFIG_CPU_INTEL_SOCKET_441) += socket_441
subdirs-$(CONFIG_CPU_INTEL_SOCKET_BGA956) += socket_BGA956
subdirs-$(CONFIG_CPU_INTEL_EP80579) += ep80579
diff --git a/src/cpu/intel/model_106cx/model_106cx_init.c b/src/cpu/intel/model_106cx/model_106cx_init.c
index b201474..da603dd 100644
--- a/src/cpu/intel/model_106cx/model_106cx_init.c
+++ b/src/cpu/intel/model_106cx/model_106cx_init.c
@@ -152,6 +152,7 @@ static struct device_operations cpu_dev_ops = {
static struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x106c0 }, /* Intel Atom 230 */
+ { X86_VENDOR_INTEL, 0x106ca }, /* Intel Atom D5xx */
{ 0, 0 },
};
diff --git a/src/cpu/intel/socket_atom_d5xx/Kconfig b/src/cpu/intel/socket_atom_d5xx/Kconfig
new file mode 100644
index 0000000..b8ac1e3
--- /dev/null
+++ b/src/cpu/intel/socket_atom_d5xx/Kconfig
@@ -0,0 +1,20 @@
+config CPU_INTEL_SOCKET_ATOM_D5XX
+ bool
+
+if CPU_INTEL_SOCKET_ATOM_D5XX
+
+config SOCKET_SPECIFIC_OPTIONS
+ def_bool y
+ select CPU_INTEL_MODEL_106CX
+ select MMX
+ select SSE
+
+config DCACHE_RAM_BASE
+ hex
+ default 0xfffe0000
+
+config DCACHE_RAM_SIZE
+ hex
+ default 0x8000
+
+endif # CPU_INTEL_SOCKET_ATOM_D5XX
diff --git a/src/cpu/intel/socket_atom_d5xx/Makefile.inc b/src/cpu/intel/socket_atom_d5xx/Makefile.inc
new file mode 100644
index 0000000..13dd799
--- /dev/null
+++ b/src/cpu/intel/socket_atom_d5xx/Makefile.inc
@@ -0,0 +1,10 @@
+ramstage-y += socket_atom_d5xx.c
+subdirs-y += ../model_106cx
+subdirs-y += ../../x86/tsc
+subdirs-y += ../../x86/mtrr
+subdirs-y += ../../x86/lapic
+subdirs-y += ../../x86/cache
+subdirs-y += ../../x86/smm
+subdirs-y += ../microcode
+subdirs-y += ../hyperthreading
+subdirs-y += ../speedstep
diff --git a/src/cpu/intel/socket_atom_d5xx/socket_atom_d5xx.c b/src/cpu/intel/socket_atom_d5xx/socket_atom_d5xx.c
new file mode 100644
index 0000000..092592d
--- /dev/null
+++ b/src/cpu/intel/socket_atom_d5xx/socket_atom_d5xx.c
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2009 coresystems GmbH
+ *
+ * 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
+ */
+
+#include <device/device.h>
+
+struct chip_operations cpu_intel_socket_atom_ops = {
+ CHIP_NAME("Socket Atom D5xx CPU")
+};
Damien Zammit (damien(a)zamaudio.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7626
-gerrit
commit 1b0c8d73fc6ee2a48afe60990454d040775e2f85
Author: Damien Zammit <damien(a)zamaudio.com>
Date: Tue Dec 2 20:24:31 2014 +1100
superio/smsc/sch311x: Add support for SCH3112, SCH3114 and SCH3116 Super I/Os
Includes a command to share all 2-6 serial ports among a single IRQ.
Tested on Intel D510MO (not in tree yet)
Change-Id: I759d458bb03e145a68fe04617521ce079cc2be2f
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
---
src/superio/smsc/Kconfig | 2 +
src/superio/smsc/Makefile.inc | 1 +
src/superio/smsc/sch311x/Makefile.inc | 21 ++++++++
src/superio/smsc/sch311x/sch311x.h | 36 +++++++++++++
src/superio/smsc/sch311x/sch311x_early_init.c | 73 +++++++++++++++++++++++++++
src/superio/smsc/sch311x/superio.c | 68 +++++++++++++++++++++++++
6 files changed, 201 insertions(+)
diff --git a/src/superio/smsc/Kconfig b/src/superio/smsc/Kconfig
index 6aaa112..a47d127 100644
--- a/src/superio/smsc/Kconfig
+++ b/src/superio/smsc/Kconfig
@@ -47,5 +47,7 @@ config SUPERIO_SMSC_SMSCSUPERIO
select SUPERIO_WANTS_14MHZ_CLOCK
config SUPERIO_SMSC_SIO1036
bool
+config SUPERIO_SMSC_SCH311X
+ bool
config SUPERIO_SMSC_SCH4037
bool
diff --git a/src/superio/smsc/Makefile.inc b/src/superio/smsc/Makefile.inc
index a89b6ac..2397d6c 100644
--- a/src/superio/smsc/Makefile.inc
+++ b/src/superio/smsc/Makefile.inc
@@ -32,4 +32,5 @@ subdirs-y += kbc1100
subdirs-y += mec1308
subdirs-y += smscsuperio
subdirs-y += sio1036
+subdirs-y += sch311x
subdirs-y += sch4037
diff --git a/src/superio/smsc/sch311x/Makefile.inc b/src/superio/smsc/sch311x/Makefile.inc
new file mode 100644
index 0000000..de0e724
--- /dev/null
+++ b/src/superio/smsc/sch311x/Makefile.inc
@@ -0,0 +1,21 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2014 Damien Zammit <damien(a)zamaudio.com>
+#
+# 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
+#
+
+romstage-$(CONFIG_SUPERIO_SMSC_SCH311X) += sch311x_early_init.c
+ramstage-$(CONFIG_SUPERIO_SMSC_SCH311X) += superio.c
diff --git a/src/superio/smsc/sch311x/sch311x.h b/src/superio/smsc/sch311x/sch311x.h
new file mode 100644
index 0000000..f9cd089
--- /dev/null
+++ b/src/superio/smsc/sch311x/sch311x.h
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Damien Zammit <damien(a)zamaudio.com>
+ *
+ * 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 SUPERIO_SCH_311X_H
+#define SUPERIO_SCH_311X_H
+
+#define SCH311X_FDD 0 /* FDD */
+#define SCH311X_LPT 3 /* LPT */
+#define SMSCSUPERIO_SP1 4 /* Com1 */
+#define SMSCSUPERIO_SP2 5 /* Com2 */
+#define SCH311X_KBC 7 /* KBC */
+#define SCH311X_RUNTIME 0x0A /* Runtime */
+#define SMSCSUPERIO_SP3 0x0B /* Com3 */
+#define SMSCSUPERIO_SP4 0x0C /* Com4 */
+#define SMSCSUPERIO_SP5 0x0D /* Com5 */
+#define SMSCSUPERIO_SP6 0x0E /* Com6 */
+
+void sch311x_early_init(unsigned port);
+
+#endif /* SUPERIO_SCH_311X_H */
diff --git a/src/superio/smsc/sch311x/sch311x_early_init.c b/src/superio/smsc/sch311x/sch311x_early_init.c
new file mode 100644
index 0000000..4b0db47
--- /dev/null
+++ b/src/superio/smsc/sch311x/sch311x_early_init.c
@@ -0,0 +1,73 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ * Copyright (C) 2014 Damien Zammit <damien(a)zamaudio.com>
+ *
+ * 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
+ */
+
+
+#include <arch/io.h>
+#include <device/pnp.h>
+#include <stdint.h>
+
+#include "sch311x.h"
+
+static void pnp_enter_conf_state(pnp_devfn_t dev)
+{
+ unsigned port = dev >> 8;
+ outb(0x55, port);
+}
+
+static void pnp_exit_conf_state(pnp_devfn_t dev)
+{
+ unsigned port = dev >> 8;
+ outb(0xaa, port);
+}
+
+void sch311x_early_init(unsigned port)
+{
+ pnp_devfn_t dev;
+
+ dev = PNP_DEV(port, SMSCSUPERIO_SP1);
+ pnp_enter_conf_state(dev);
+
+ /* Auto power management */
+ pnp_write_config(dev, 0x22, 0x38); /* BIT3+BIT4+BIT5 */
+ pnp_write_config(dev, 0x23, 0 );
+
+ /* Enable SMSC UART 0 */
+ dev = PNP_DEV(port, SMSCSUPERIO_SP1);
+ pnp_set_logical_device(dev);
+ pnp_set_enable(dev, 0);
+
+ pnp_set_iobase(dev, PNP_IDX_IO0, CONFIG_TTYS0_BASE);
+ pnp_set_irq(dev, PNP_IDX_IRQ0, 0x4);
+
+ /* Enable High speed, disable MIDI support,
+ * Share 1x IRQ among all serial ports */
+ pnp_write_config(dev, 0xF0, 0xC2);
+ pnp_set_enable(dev, 1);
+
+ /* Enable keyboard */
+ dev = PNP_DEV(port, SCH311X_KBC);
+ pnp_set_logical_device(dev);
+ pnp_set_enable(dev, 0);
+ pnp_set_irq(dev, 0x70, 1); /* IRQ 1 */
+ pnp_set_irq(dev, 0x72, 12); /* IRQ 12 */
+ pnp_set_enable(dev, 1);
+
+ pnp_exit_conf_state(dev);
+}
diff --git a/src/superio/smsc/sch311x/superio.c b/src/superio/smsc/sch311x/superio.c
new file mode 100644
index 0000000..e28ff77
--- /dev/null
+++ b/src/superio/smsc/sch311x/superio.c
@@ -0,0 +1,68 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, 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
+ */
+
+/* RAM driver for the SMSC SCH311X Super I/O chip */
+
+#include <arch/io.h>
+#include <device/device.h>
+#include <device/pnp.h>
+#include <superio/conf_mode.h>
+#include <console/console.h>
+#include <pc80/keyboard.h>
+#include <stdlib.h>
+
+#include "sch311x.h"
+
+static void sch311x_init(struct device *dev)
+{
+ if (!dev->enabled) {
+ return;
+ }
+
+ switch(dev->path.pnp.device) {
+ case SCH311X_KBC:
+ pc_keyboard_init();
+ break;
+ default:
+ break;
+ }
+}
+
+static struct device_operations ops = {
+ .read_resources = pnp_read_resources,
+ .set_resources = pnp_set_resources,
+ .enable_resources = pnp_enable_resources,
+ .enable = pnp_alt_enable,
+ .init = sch311x_init,
+ .ops_pnp_mode = &pnp_conf_mode_55_aa,
+};
+
+static struct pnp_info pnp_dev_info[] = {
+ { &ops, SCH311X_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, { 0x7ff, 0 }, { 0x7ff, 0x4}, },
+};
+
+static void enable_dev(struct device *dev)
+{
+ pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
+}
+
+struct chip_operations superio_smsc_sch311x_ops = {
+ CHIP_NAME("SMSC SCH311x Super I/O")
+ .enable_dev = enable_dev,
+};