summaryrefslogtreecommitdiff
path: root/src/mainboard/emulation/imgvp-pistachio
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/emulation/imgvp-pistachio')
-rw-r--r--src/mainboard/emulation/imgvp-pistachio/Kconfig53
-rw-r--r--src/mainboard/emulation/imgvp-pistachio/Makefile.inc22
-rw-r--r--src/mainboard/emulation/imgvp-pistachio/bootblock.c24
-rw-r--r--src/mainboard/emulation/imgvp-pistachio/devicetree.cb26
-rw-r--r--src/mainboard/emulation/imgvp-pistachio/mainboard.c33
-rw-r--r--src/mainboard/emulation/imgvp-pistachio/romstage.c38
6 files changed, 196 insertions, 0 deletions
diff --git a/src/mainboard/emulation/imgvp-pistachio/Kconfig b/src/mainboard/emulation/imgvp-pistachio/Kconfig
new file mode 100644
index 0000000000..068528e6d6
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-pistachio/Kconfig
@@ -0,0 +1,53 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2014 Imagination Technologies
+#
+# 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
+#
+
+if BOARD_EMULATION_IMGVP_PISTACHIO
+
+config BOARD_SPECIFIC_OPTIONS
+ def_bool y
+ select BOOTBLOCK_CONSOLE
+ select CPU_IMGTEC_PISTACHIO
+
+config MAINBOARD_DIR
+ string
+ default emulation/imgvp-pistachio
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "ImgTec Pistachio Virtual Platform"
+
+config BOOTBLOCK_MAINBOARD_INIT
+ string
+ default "mainboard/emulation/imgvp-pistachio/bootblock.c"
+
+config SYS_SDRAM_BASE
+ hex "SDRAM base address"
+ default 0x80000000
+
+config DRAM_SIZE_MB
+ int
+ default 256
+
+config HEAP_SIZE
+ hex
+ default 0x08000000
+
+endif
diff --git a/src/mainboard/emulation/imgvp-pistachio/Makefile.inc b/src/mainboard/emulation/imgvp-pistachio/Makefile.inc
new file mode 100644
index 0000000000..8be1b22946
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-pistachio/Makefile.inc
@@ -0,0 +1,22 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright 2014 Imagination Technologies Ltd.
+#
+# 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-y += romstage.c
diff --git a/src/mainboard/emulation/imgvp-pistachio/bootblock.c b/src/mainboard/emulation/imgvp-pistachio/bootblock.c
new file mode 100644
index 0000000000..1784a02f44
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-pistachio/bootblock.c
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Imagination Technologies
+ *
+ * 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
+ */
+
+void bootblock_mainboard_init(void)
+{
+}
diff --git a/src/mainboard/emulation/imgvp-pistachio/devicetree.cb b/src/mainboard/emulation/imgvp-pistachio/devicetree.cb
new file mode 100644
index 0000000000..a328b9d1cf
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-pistachio/devicetree.cb
@@ -0,0 +1,26 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2014 Imagination Technologies
+#
+# 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
+#
+
+chip soc/imgtec/pistachio
+ chip drivers/generic/generic # I2C0 controller
+ device i2c 6 on end # Fake component for testing
+ end
+end
diff --git a/src/mainboard/emulation/imgvp-pistachio/mainboard.c b/src/mainboard/emulation/imgvp-pistachio/mainboard.c
new file mode 100644
index 0000000000..fdae940c6f
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-pistachio/mainboard.c
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Imagination Technologies
+ *
+ * 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 <console/console.h>
+#include <device/device.h>
+
+static void mainboard_enable(device_t dev)
+{
+ printk(BIOS_INFO, "Enable imgvp-pistachio device...\n");
+}
+
+struct chip_operations mainboard_ops = {
+ .enable_dev = mainboard_enable,
+};
+
diff --git a/src/mainboard/emulation/imgvp-pistachio/romstage.c b/src/mainboard/emulation/imgvp-pistachio/romstage.c
new file mode 100644
index 0000000000..ac0ea5f903
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-pistachio/romstage.c
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Imagination Technologies
+ *
+ * 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/hlt.h>
+#include <arch/stages.h>
+#include <cbfs.h>
+#include <console/console.h>
+
+void main(void)
+{
+ void *entry;
+
+ console_init();
+
+ entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/ramstage");
+ if (entry != (void *)-1)
+ stage_exit(entry);
+
+ hlt();
+}