diff --git a/include/spec/parallella/drivers/board_base.h b/include/spec/parallella/drivers/board_base.h new file mode 100644 index 0000000..f418cca --- /dev/null +++ b/include/spec/parallella/drivers/board_base.h @@ -0,0 +1,45 @@ +/* + * \brief Base driver for Parallella Board + * \author Johannes Schlatow + * \date 2015-06-30 + */ + +/* + * Copyright (C) 2015 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +#ifndef _INCLUDE__PARALLELLA__DRIVERS__BOARD_BASE_H_ +#define _INCLUDE__PARALLELLA__DRIVERS__BOARD_BASE_H_ + +#include + +namespace Genode { struct Board_base; } + +/** + * Base driver for the Parallella platform + */ +struct Genode::Board_base : Zynq::Board_base +{ + enum + { + /* clocks (assuming 6:2:1 mode) */ + PS_CLOCK = 33333333, + CPU_1X_CLOCK = 111111100, + CPU_6X4X_CLOCK = 6*CPU_1X_CLOCK, + + CORTEX_A9_CLOCK = CPU_6X4X_CLOCK, + CORTEX_A9_PRIVATE_TIMER_CLK = CORTEX_A9_CLOCK, + CORTEX_A9_PRIVATE_TIMER_DIV = 100, + + SDHCI_BASE = MMIO_0_BASE + 0x101000, + SDHCI_SIZE = 0x100, + SDHCI_IRQ = 79, + + UART_1_MMIO_BASE = MMIO_0_BASE + UART_SIZE, + }; +}; + +#endif /* _INCLUDE__PARALLELLA__DRIVERS__BOARD_BASE_H_ */ diff --git a/include/spec/zc702/drivers/board_base.h b/include/spec/zc702/drivers/board_base.h new file mode 100644 index 0000000..56ead40 --- /dev/null +++ b/include/spec/zc702/drivers/board_base.h @@ -0,0 +1,44 @@ +/* + * \brief Base driver for ZC702 Board + * \author Johannes Schlatow + * \date 2016-03-24 + */ + +/* + * Copyright (C) 2016 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +#ifndef _INCLUDE__ZC702__DRIVERS__BOARD_BASE_H_ +#define _INCLUDE__ZC702__DRIVERS__BOARD_BASE_H_ + +#include + +namespace Genode { struct Board_base; } + +/** + * Base driver for the ZC702 platform + */ +struct Genode::Board_base : Zynq::Board_base +{ + enum + { + /* clocks (assuming 6:2:1 mode) */ + CPU_1X_CLOCK = 111111100, + CPU_6X4X_CLOCK = 6*CPU_1X_CLOCK, + + CORTEX_A9_CLOCK = CPU_6X4X_CLOCK, + CORTEX_A9_PRIVATE_TIMER_CLK = CORTEX_A9_CLOCK, + CORTEX_A9_PRIVATE_TIMER_DIV = 100, + + SDHCI_BASE = MMIO_0_BASE + 0x100000, + SDHCI_SIZE = 0x100, + SDHCI_IRQ = 56, + + UART_1_MMIO_BASE = MMIO_0_BASE + UART_SIZE, + }; +}; + +#endif /* _INCLUDE__ZC702__DRIVERS__BOARD_BASE_H_ */ diff --git a/include/spec/zc706/drivers/board_base.h b/include/spec/zc706/drivers/board_base.h new file mode 100644 index 0000000..4dec7d1 --- /dev/null +++ b/include/spec/zc706/drivers/board_base.h @@ -0,0 +1,44 @@ +/* + * \brief Base driver for ZC706 Board + * \author Johannes Schlatow + * \date 2016-03-24 + */ + +/* + * Copyright (C) 2016 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +#ifndef _INCLUDE__ZC706__DRIVERS__BOARD_BASE_H_ +#define _INCLUDE__ZC706__DRIVERS__BOARD_BASE_H_ + +#include + +namespace Genode { struct Board_base; } + +/** + * Base driver for the ZC706 platform + */ +struct Genode::Board_base : Zynq::Board_base +{ + enum + { + /* clocks (assuming 6:2:1 mode) */ + CPU_1X_CLOCK = 111111100, + CPU_6X4X_CLOCK = 6*CPU_1X_CLOCK, + + CORTEX_A9_CLOCK = CPU_6X4X_CLOCK, + CORTEX_A9_PRIVATE_TIMER_CLK = CORTEX_A9_CLOCK, + CORTEX_A9_PRIVATE_TIMER_DIV = 100, + + SDHCI_BASE = MMIO_0_BASE + 0x100000, + SDHCI_SIZE = 0x100, + SDHCI_IRQ = 56, + + UART_1_MMIO_BASE = MMIO_0_BASE + UART_SIZE, + }; +}; + +#endif /* _INCLUDE__ZC706__DRIVERS__BOARD_BASE_H_ */ diff --git a/include/spec/zedboard/drivers/board_base.h b/include/spec/zedboard/drivers/board_base.h new file mode 100644 index 0000000..4340d78 --- /dev/null +++ b/include/spec/zedboard/drivers/board_base.h @@ -0,0 +1,64 @@ +/* + * \brief Base driver for Zedboard + * \author Mark Albers + * \date 2015-09-29 + */ + +/* + * Copyright (C) 2015 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +#ifndef _INCLUDE__ZEDBOARD__DRIVERS__BOARD_BASE_H_ +#define _INCLUDE__ZEDBOARD__DRIVERS__BOARD_BASE_H_ + +#include + +namespace Genode { struct Board_base; } + +/** + * Base driver for the Zedboard platform + */ +struct Genode::Board_base : Zynq::Board_base +{ + enum + { + PS_CLOCK = 33333333, + ARM_PLL_CLOCK = 1333333*1000, + DDR_PLL_CLOCK = 1066667*1000, + IO_PLL_CLOCK = 1000*1000*1000, + CPU_1X_CLOCK = 111111115, + CPU_6X4X_CLOCK = 6*CPU_1X_CLOCK, + CPU_3X2X_CLOCK = 3*CPU_1X_CLOCK, + CPU_2X_CLOCK = 2*CPU_1X_CLOCK, + + UART_1_MMIO_BASE = MMIO_0_BASE + UART_SIZE, + + CORTEX_A9_CLOCK = CPU_6X4X_CLOCK, + CORTEX_A9_PRIVATE_TIMER_CLK = CORTEX_A9_CLOCK, + CORTEX_A9_PRIVATE_TIMER_DIV = 100, + + RAM_0_SIZE = 0x20000000, /* 512MB */ + DDR_CLOCK = 533333313, + + FCLK_CLK0 = 100*1000*1000, /* AXI */ + FCLK_CLK1 = 20250*1000, /* Cam */ + FCLK_CLK2 = 150*1000*1000, /* AXI HP */ + + I2C0_MMIO_BASE = 0xE0004000, + I2C1_MMIO_BASE = 0xE0005000, + I2C_MMIO_SIZE = 0x1000, + + + QSPI_CLOCK = 200*1000*1000, + ETH_CLOCK = 125*1000*1000, + SD_CLOCK = 50*1000*1000, + + GPIO_MMIO_SIZE = 0x1000, + VDMA_MMIO_SIZE = 0x10000, + }; +}; + +#endif /* _INCLUDE__ZEDBOARD__DRIVERS__BOARD_BASE_H_ */ diff --git a/lib/mk/spec/zynq_parallella/core.mk b/lib/mk/spec/zynq_parallella/core.mk new file mode 100644 index 0000000..c5bd590 --- /dev/null +++ b/lib/mk/spec/zynq_parallella/core.mk @@ -0,0 +1,15 @@ +# +# \brief Build config for Genodes core process +# \author Johannes Schlatow +# \date 2016-05-03 +# + +TMP := $(call select_from_repositories,lib/mk/spec/zynq/core.inc) +BASE_HW_DIR := $(TMP:%lib/mk/spec/zynq/core.inc=%) + +# add include paths +INC_DIR += $(REP_DIR)/src/core/include/spec/xilinx_uartps_1 +INC_DIR += $(REP_DIR)/src/core/include/spec/zynq_parallella + +# include less specific configuration +include $(BASE_HW_DIR)/lib/mk/spec/zynq/core.inc diff --git a/lib/mk/spec/zynq_zc702/core.mk b/lib/mk/spec/zynq_zc702/core.mk new file mode 100644 index 0000000..4c3c93c --- /dev/null +++ b/lib/mk/spec/zynq_zc702/core.mk @@ -0,0 +1,15 @@ +# +# \brief Build config for Genodes core process +# \author Johannes Schlatow +# \date 2016-05-03 +# + +TMP := $(call select_from_repositories,lib/mk/spec/zynq/core.inc) +BASE_HW_DIR := $(TMP:%lib/mk/spec/zynq/core.inc=%) + +# add include paths +INC_DIR += $(REP_DIR)/src/core/include/spec/xilinx_uartps_1 +INC_DIR += $(REP_DIR)/src/core/include/spec/zynq_zc702 + +# include less specific configuration +include $(BASE_HW_DIR)/lib/mk/spec/zynq/core.inc diff --git a/lib/mk/spec/zynq_zc706/core.mk b/lib/mk/spec/zynq_zc706/core.mk new file mode 100644 index 0000000..ab88f6f --- /dev/null +++ b/lib/mk/spec/zynq_zc706/core.mk @@ -0,0 +1,15 @@ +# +# \brief Build config for Genodes core process +# \author Johannes Schlatow +# \date 2016-05-03 +# + +TMP := $(call select_from_repositories,lib/mk/spec/zynq/core.inc) +BASE_HW_DIR := $(TMP:%lib/mk/spec/zynq/core.inc=%) + +# add include paths +INC_DIR += $(REP_DIR)/src/core/include/spec/xilinx_uartps_1 +INC_DIR += $(REP_DIR)/src/core/include/spec/zynq_zc706 + +# include less specific configuration +include $(BASE_HW_DIR)/lib/mk/spec/zynq/core.inc diff --git a/lib/mk/spec/zynq_zedboard/core.mk b/lib/mk/spec/zynq_zedboard/core.mk new file mode 100644 index 0000000..b332b77 --- /dev/null +++ b/lib/mk/spec/zynq_zedboard/core.mk @@ -0,0 +1,15 @@ +# +# \brief Build config for Genodes core process +# \author Johannes Schlatow +# \date 2016-05-03 +# + +TMP := $(call select_from_repositories,lib/mk/spec/zynq/core.inc) +BASE_HW_DIR := $(TMP:%lib/mk/spec/zynq/core.inc=%) + +# add include paths +INC_DIR += $(REP_DIR)/src/core/include/spec/xilinx_uartps_1 +INC_DIR += $(REP_DIR)/src/core/include/spec/zynq_zedboard + +# include less specific configuration +include $(BASE_HW_DIR)/lib/mk/spec/zynq/core.inc diff --git a/mk/spec/zynq_parallella.mk b/mk/spec/zynq_parallella.mk new file mode 100644 index 0000000..ffcf3fd --- /dev/null +++ b/mk/spec/zynq_parallella.mk @@ -0,0 +1,9 @@ +# +# Pull in CPU specifics +# +SPECS += zynq cadence_gem + +REP_INC_DIR += include/spec/parallella +REP_INC_DIR += include/spec/xilinx + +include $(call select_from_repositories,mk/spec/zynq.mk) diff --git a/mk/spec/zynq_zc702.mk b/mk/spec/zynq_zc702.mk new file mode 100644 index 0000000..4d50ef7 --- /dev/null +++ b/mk/spec/zynq_zc702.mk @@ -0,0 +1,9 @@ +# +# Pull in CPU specifics +# +SPECS += zynq cadence_gem zynq_uart1 + +REP_INC_DIR += include/spec/zc702 +REP_INC_DIR += include/spec/xilinx + +include $(call select_from_repositories,mk/spec/zynq.mk) diff --git a/mk/spec/zynq_zc706.mk b/mk/spec/zynq_zc706.mk new file mode 100644 index 0000000..b0df685 --- /dev/null +++ b/mk/spec/zynq_zc706.mk @@ -0,0 +1,9 @@ +# +# Pull in CPU specifics +# +SPECS += zynq cadence_gem zynq_uart1 + +REP_INC_DIR += include/spec/zc706 +REP_INC_DIR += include/spec/xilinx + +include $(call select_from_repositories,mk/spec/zynq.mk) diff --git a/mk/spec/zynq_zedboard.mk b/mk/spec/zynq_zedboard.mk new file mode 100644 index 0000000..e78667d --- /dev/null +++ b/mk/spec/zynq_zedboard.mk @@ -0,0 +1,9 @@ +# +# Pull in CPU specifics +# +SPECS += zynq cadence_gem zynq_uart1 + +REP_INC_DIR += include/spec/zedboard +REP_INC_DIR += include/spec/xilinx + +include $(call select_from_repositories,mk/spec/zynq.mk) diff --git a/src/core/include/spec/xilinx_uartps_1/serial.h b/src/core/include/spec/xilinx_uartps_1/serial.h new file mode 100644 index 0000000..292246e --- /dev/null +++ b/src/core/include/spec/xilinx_uartps_1/serial.h @@ -0,0 +1,44 @@ +/* + * \brief Serial output driver for core + * \author Johannes Schlatow + * \date 2014-12-15 + */ + +/* + * Copyright (C) 2014-2015 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +#ifndef _CORE__INCLUDE__SPEC__XILINX_UARTPS_1__SERIAL_H_ +#define _CORE__INCLUDE__SPEC__XILINX_UARTPS_1__SERIAL_H_ + +/* core includes */ +#include + +/* Genode includes */ +#include + +namespace Genode { class Serial; } + +/** + * Serial output driver for core + */ +class Genode::Serial : public Xilinx_uartps_base +{ + public: + + /** + * Constructor + * + * \param baud_rate targeted transfer baud-rate + */ + Serial(unsigned const baud_rate) + : + Xilinx_uartps_base(Board::UART_1_MMIO_BASE, + Board::UART_CLOCK, baud_rate) + { } +}; + +#endif /* _CORE__INCLUDE__SPEC__XILINX_UARTPS_1__SERIAL_H_ */ diff --git a/src/core/include/spec/zynq_parallella/board.h b/src/core/include/spec/zynq_parallella/board.h new file mode 100644 index 0000000..33a8c74 --- /dev/null +++ b/src/core/include/spec/zynq_parallella/board.h @@ -0,0 +1,33 @@ +/* + * \brief Board driver for core on Zynq + * \author Johannes Schlatow + * \author Stefan Kalkowski + * \author Martin Stein + * \date 2014-06-02 + */ + +/* + * Copyright (C) 2014-2015 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +#ifndef _CORE__INCLUDE__SPEC__ZYNQ_PARALLELLA__BOARD_H_ +#define _CORE__INCLUDE__SPEC__ZYNQ_PARALLELLA__BOARD_H_ + +/* core includes */ +#include + +namespace Genode +{ + struct Board : Cortex_a9::Board + { + enum { + KERNEL_UART_BASE = UART_1_MMIO_BASE, + KERNEL_UART_SIZE = UART_SIZE, + }; + }; +} + +#endif /* _CORE__INCLUDE__SPEC__ZYNQ_PARALLELLA__BOARD_H_ */ diff --git a/src/core/include/spec/zynq_zc702/board.h b/src/core/include/spec/zynq_zc702/board.h new file mode 100644 index 0000000..182022d --- /dev/null +++ b/src/core/include/spec/zynq_zc702/board.h @@ -0,0 +1,33 @@ +/* + * \brief Board driver for core on Zynq + * \author Johannes Schlatow + * \author Stefan Kalkowski + * \author Martin Stein + * \date 2014-06-02 + */ + +/* + * Copyright (C) 2014-2015 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +#ifndef _CORE__INCLUDE__SPEC__ZYNQ_ZC702__BOARD_H_ +#define _CORE__INCLUDE__SPEC__ZYNQ_ZC702__BOARD_H_ + +/* core includes */ +#include + +namespace Genode +{ + struct Board : Cortex_a9::Board + { + enum { + KERNEL_UART_BASE = UART_1_MMIO_BASE, + KERNEL_UART_SIZE = UART_SIZE, + }; + }; +} + +#endif /* _CORE__INCLUDE__SPEC__ZYNQ_ZC702__BOARD_H_ */ diff --git a/src/core/include/spec/zynq_zc706/board.h b/src/core/include/spec/zynq_zc706/board.h new file mode 100644 index 0000000..6865300 --- /dev/null +++ b/src/core/include/spec/zynq_zc706/board.h @@ -0,0 +1,33 @@ +/* + * \brief Board driver for core on Zynq + * \author Johannes Schlatow + * \author Stefan Kalkowski + * \author Martin Stein + * \date 2014-06-02 + */ + +/* + * Copyright (C) 2014-2015 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +#ifndef _CORE__INCLUDE__SPEC__ZYNQ_ZC706__BOARD_H_ +#define _CORE__INCLUDE__SPEC__ZYNQ_ZC706__BOARD_H_ + +/* core includes */ +#include + +namespace Genode +{ + struct Board : Cortex_a9::Board + { + enum { + KERNEL_UART_BASE = UART_1_MMIO_BASE, + KERNEL_UART_SIZE = UART_SIZE, + }; + }; +} + +#endif /* _CORE__INCLUDE__SPEC__ZYNQ_ZC706__BOARD_H_ */ diff --git a/src/core/include/spec/zynq_zedboard/board.h b/src/core/include/spec/zynq_zedboard/board.h new file mode 100644 index 0000000..6a01914 --- /dev/null +++ b/src/core/include/spec/zynq_zedboard/board.h @@ -0,0 +1,33 @@ +/* + * \brief Board driver for core on Zynq + * \author Johannes Schlatow + * \author Stefan Kalkowski + * \author Martin Stein + * \date 2014-06-02 + */ + +/* + * Copyright (C) 2014-2015 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +#ifndef _CORE__INCLUDE__SPEC__ZYNQ_ZEDBOARD__BOARD_H_ +#define _CORE__INCLUDE__SPEC__ZYNQ_ZEDBOARD__BOARD_H_ + +/* core includes */ +#include + +namespace Genode +{ + struct Board : Cortex_a9::Board + { + enum { + KERNEL_UART_BASE = UART_1_MMIO_BASE, + KERNEL_UART_SIZE = UART_SIZE, + }; + }; +} + +#endif /* _CORE__INCLUDE__SPEC__ZYNQ_ZEDBOARD__BOARD_H_ */