diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2018-04-19 16:23:55 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-04-26 11:52:41 +0000 |
commit | 1c09cfa37b167d64da2a182058b04780789f6201 (patch) | |
tree | 4400a93de19720b3dba53819447a5ad5563a6234 /src/mainboard/sifive | |
parent | 55b46454bc324ffe622419a9ef87cab076d65d1a (diff) |
mb/sifive: Add HiFive Unleashed mainboard
Change-Id: I52ef2da9148809923c90178a00ba94babba8d2f8
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/25790
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/sifive')
-rw-r--r-- | src/mainboard/sifive/Kconfig | 16 | ||||
-rw-r--r-- | src/mainboard/sifive/Kconfig.name | 2 | ||||
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/Kconfig | 33 | ||||
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/Kconfig.name | 2 | ||||
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/Makefile.inc | 18 | ||||
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/board_info.txt | 6 | ||||
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/devicetree.cb | 16 | ||||
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/mainboard.c | 27 | ||||
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/memlayout.ld | 16 | ||||
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/romstage.c | 26 |
10 files changed, 162 insertions, 0 deletions
diff --git a/src/mainboard/sifive/Kconfig b/src/mainboard/sifive/Kconfig new file mode 100644 index 0000000000..1527705df1 --- /dev/null +++ b/src/mainboard/sifive/Kconfig @@ -0,0 +1,16 @@ +if VENDOR_SIFIVE + +choice + prompt "Mainboard model" + +source "src/mainboard/sifive/*/Kconfig.name" + +endchoice + +source "src/mainboard/sifive/*/Kconfig" + +config MAINBOARD_VENDOR + string + default "SiFive" + +endif # VENDOR_SIFIVE diff --git a/src/mainboard/sifive/Kconfig.name b/src/mainboard/sifive/Kconfig.name new file mode 100644 index 0000000000..4cc741edfe --- /dev/null +++ b/src/mainboard/sifive/Kconfig.name @@ -0,0 +1,2 @@ +config VENDOR_SIFIVE + bool "SiFive" diff --git a/src/mainboard/sifive/hifive-unleashed/Kconfig b/src/mainboard/sifive/hifive-unleashed/Kconfig new file mode 100644 index 0000000000..5e49f19758 --- /dev/null +++ b/src/mainboard/sifive/hifive-unleashed/Kconfig @@ -0,0 +1,33 @@ +# This file is part of the coreboot project. +# +# Copyright (C) 2018 Jonathan Neuschäfer +# +# 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. + +if BOARD_SIFIVE_HIFIVE_UNLEASHED + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select SOC_SIFIVE_FU540 + select BOARD_ROMSIZE_KB_32768 + +config MAINBOARD_DIR + string + default sifive/hifive-unleashed + +config MAX_CPUS + int + default 4 + +config MAINBOARD_PART_NUMBER + string + default "HiFive Unleashed" + +endif diff --git a/src/mainboard/sifive/hifive-unleashed/Kconfig.name b/src/mainboard/sifive/hifive-unleashed/Kconfig.name new file mode 100644 index 0000000000..1ee3793974 --- /dev/null +++ b/src/mainboard/sifive/hifive-unleashed/Kconfig.name @@ -0,0 +1,2 @@ +config BOARD_SIFIVE_HIFIVE_UNLEASHED + bool "HiFive Unleashed" diff --git a/src/mainboard/sifive/hifive-unleashed/Makefile.inc b/src/mainboard/sifive/hifive-unleashed/Makefile.inc new file mode 100644 index 0000000000..27ddcbad87 --- /dev/null +++ b/src/mainboard/sifive/hifive-unleashed/Makefile.inc @@ -0,0 +1,18 @@ +# This file is part of the coreboot project. +# +# Copyright (C) 2018 Jonathan Neuschäfer +# +# 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. + +romstage-y += romstage.c + +bootblock-y += memlayout.ld +romstage-y += memlayout.ld +ramstage-y += memlayout.ld diff --git a/src/mainboard/sifive/hifive-unleashed/board_info.txt b/src/mainboard/sifive/hifive-unleashed/board_info.txt new file mode 100644 index 0000000000..2ad7d59354 --- /dev/null +++ b/src/mainboard/sifive/hifive-unleashed/board_info.txt @@ -0,0 +1,6 @@ +Category: eval +ROM package: SOIC-16 +ROM protocol: SPI +ROM socketed: n +Flashrom support: n +Board URL: https://www.crowdsupply.com/sifive/hifive-unleashed diff --git a/src/mainboard/sifive/hifive-unleashed/devicetree.cb b/src/mainboard/sifive/hifive-unleashed/devicetree.cb new file mode 100644 index 0000000000..1c9f79ad92 --- /dev/null +++ b/src/mainboard/sifive/hifive-unleashed/devicetree.cb @@ -0,0 +1,16 @@ +# This file is part of the coreboot project. +# +# Copyright (C) 2018 Jonathan Neuschäfer +# +# 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. + +chip soc/sifive/fu540 + device cpu_cluster 0 on end +end diff --git a/src/mainboard/sifive/hifive-unleashed/mainboard.c b/src/mainboard/sifive/hifive-unleashed/mainboard.c new file mode 100644 index 0000000000..ab4d6aec88 --- /dev/null +++ b/src/mainboard/sifive/hifive-unleashed/mainboard.c @@ -0,0 +1,27 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2018 Jonathan Neuschäfer + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * 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. + */ + +#include <device/device.h> +#include <bootblock_common.h> +#include <timestamp.h> + +static void mainboard_enable(device_t dev) +{ +} + +struct chip_operations mainboard_ops = { + .name = CONFIG_MAINBOARD_PART_NUMBER, + .enable_dev = mainboard_enable, +}; diff --git a/src/mainboard/sifive/hifive-unleashed/memlayout.ld b/src/mainboard/sifive/hifive-unleashed/memlayout.ld new file mode 100644 index 0000000000..d1a6d65a00 --- /dev/null +++ b/src/mainboard/sifive/hifive-unleashed/memlayout.ld @@ -0,0 +1,16 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2018 Jonathan Neuschäfer + * + * 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. + */ + +#include <soc/memlayout.ld> diff --git a/src/mainboard/sifive/hifive-unleashed/romstage.c b/src/mainboard/sifive/hifive-unleashed/romstage.c new file mode 100644 index 0000000000..b30b73665b --- /dev/null +++ b/src/mainboard/sifive/hifive-unleashed/romstage.c @@ -0,0 +1,26 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2013 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * 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. + */ + +#include <console/console.h> +#include <program_loading.h> + +void main(void) +{ + console_init(); + + /* TODO: Follow Section 6.3 (FSBL) of the FU540 manual */ + + run_ramstage(); +} |