diff options
author | Sidath Senanayake <sidaths@google.com> | 2018-01-22 13:55:38 +0100 |
---|---|---|
committer | Sidath Senanayake <sidaths@google.com> | 2018-01-22 13:55:38 +0100 |
commit | e42736e67f7d84d329d9595b7393e6784c5b887f (patch) | |
tree | 03608c098294da4426551ec7127cfe0aa4f806ee /mali_kbase/platform/vexpress_6xvirtex7_10mhz | |
parent | dbd2655766535ffc24e24503a7279f3abfd40d7e (diff) | |
download | gpu-e42736e67f7d84d329d9595b7393e6784c5b887f.tar.gz |
Mali Bifrost DDK r10p0 KMD
Provenance:
27ee08eb4 (collaborate/EAC/b_r10p0)
BX304L01B-BU-00000-r10p0-01rel0
BX304L06A-BU-00000-r10p0-01rel0
BX304X07X-BU-00000-r10p0-01rel0
Signed-off-by: Sidath Senanayake <sidaths@google.com>
Change-Id: I31c8d66dad91c5b998f3e07757054c37c6aea963
Diffstat (limited to 'mali_kbase/platform/vexpress_6xvirtex7_10mhz')
5 files changed, 28 insertions, 160 deletions
diff --git a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/Kbuild b/mali_kbase/platform/vexpress_6xvirtex7_10mhz/Kbuild index d9d5e90..e07709c 100644 --- a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/Kbuild +++ b/mali_kbase/platform/vexpress_6xvirtex7_10mhz/Kbuild @@ -6,12 +6,18 @@ # Foundation, and any use by you of this program is subject to the terms # of such GNU licence. # -# A copy of the licence is included with the program, and can also be obtained -# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. +# 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, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. +# +# SPDX-License-Identifier: GPL-2.0 # # - mali_kbase-y += \ $(MALI_PLATFORM_DIR)/mali_kbase_config_vexpress.o \ diff --git a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_platform.h b/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_platform.h index dbdf21e..fac3cd5 100644 --- a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_platform.h +++ b/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_platform.h @@ -7,54 +7,18 @@ * Foundation, and any use by you of this program is subject to the terms * of such GNU licence. * - * A copy of the licence is included with the program, and can also be obtained - * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. + * 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 "mali_kbase_cpu_vexpress.h" - -/** - * Maximum frequency GPU will be clocked at. Given in kHz. - * This must be specified as there is no default value. - * - * Attached value: number in kHz - * Default value: NA - */ -#define GPU_FREQ_KHZ_MAX 10000 -/** - * Minimum frequency GPU will be clocked at. Given in kHz. - * This must be specified as there is no default value. - * - * Attached value: number in kHz - * Default value: NA - */ -#define GPU_FREQ_KHZ_MIN 10000 - -/** - * CPU_SPEED_FUNC - A pointer to a function that calculates the CPU clock - * - * CPU clock speed of the platform is in MHz - see kbase_cpu_clk_speed_func - * for the function prototype. - * - * Attached value: A kbase_cpu_clk_speed_func. - * Default Value: NA - */ -#define CPU_SPEED_FUNC (&kbase_get_vexpress_cpu_clock_speed) - -/** - * GPU_SPEED_FUNC - A pointer to a function that calculates the GPU clock + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. * - * GPU clock speed of the platform in MHz - see kbase_gpu_clk_speed_func - * for the function prototype. + * SPDX-License-Identifier: GPL-2.0 * - * Attached value: A kbase_gpu_clk_speed_func. - * Default Value: NA */ -#define GPU_SPEED_FUNC (NULL) /** * Power management configuration diff --git a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_vexpress.c b/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_vexpress.c index 5d8ec2d..b6714b9 100644 --- a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_vexpress.c +++ b/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_vexpress.c @@ -7,21 +7,25 @@ * Foundation, and any use by you of this program is subject to the terms * of such GNU licence. * - * A copy of the licence is included with the program, and can also be obtained - * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. + * 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, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. + * + * SPDX-License-Identifier: GPL-2.0 * */ - - #include <linux/ioport.h> #include <mali_kbase.h> #include <mali_kbase_defs.h> #include <mali_kbase_config.h> -#include "mali_kbase_cpu_vexpress.h" #ifndef CONFIG_OF static struct kbase_io_resources io_resources = { @@ -61,10 +65,3 @@ struct kbase_platform_config *kbase_get_platform_config(void) { return &versatile_platform_config; } - -int kbase_platform_early_init(void) -{ - /* Nothing needed at this stage */ - return 0; -} - diff --git a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_cpu_vexpress.c b/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_cpu_vexpress.c deleted file mode 100644 index 816dff4..0000000 --- a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_cpu_vexpress.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * - * (C) COPYRIGHT 2011-2013 ARM Limited. All rights reserved. - * - * This program is free software and is provided to you under the terms of the - * GNU General Public License version 2 as published by the Free Software - * Foundation, and any use by you of this program is subject to the terms - * of such GNU licence. - * - * A copy of the licence is included with the program, and can also be obtained - * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - - - - - -#include <linux/io.h> -#include <mali_kbase.h> -#include "mali_kbase_cpu_vexpress.h" - -#define HZ_IN_MHZ (1000000) - -#define CORETILE_EXPRESS_A9X4_SCC_START (0x100E2000) -#define MOTHERBOARD_SYS_CFG_START (0x10000000) -#define SYS_CFGDATA_OFFSET (0x000000A0) -#define SYS_CFGCTRL_OFFSET (0x000000A4) -#define SYS_CFGSTAT_OFFSET (0x000000A8) - -#define SYS_CFGCTRL_START_BIT_VALUE (1 << 31) -#define READ_REG_BIT_VALUE (0 << 30) -#define DCC_DEFAULT_BIT_VALUE (0 << 26) -#define SYS_CFG_OSC_FUNC_BIT_VALUE (1 << 20) -#define SITE_DEFAULT_BIT_VALUE (1 << 16) -#define BOARD_STACK_POS_DEFAULT_BIT_VALUE (0 << 12) -#define DEVICE_DEFAULT_BIT_VALUE (2 << 0) -#define SYS_CFG_COMPLETE_BIT_VALUE (1 << 0) -#define SYS_CFG_ERROR_BIT_VALUE (1 << 1) - -#define FEED_REG_BIT_MASK (0x0F) -#define FCLK_PA_DIVIDE_BIT_SHIFT (0x03) -#define FCLK_PB_DIVIDE_BIT_SHIFT (0x07) -#define FCLK_PC_DIVIDE_BIT_SHIFT (0x0B) -#define AXICLK_PA_DIVIDE_BIT_SHIFT (0x0F) -#define AXICLK_PB_DIVIDE_BIT_SHIFT (0x13) - -#define IS_SINGLE_BIT_SET(val, pos) (val&(1<<pos)) - -#define CPU_CLOCK_SPEED_UNDEFINED 0 - -#define CPU_CLOCK_SPEED_6XV7 50 - -static u32 cpu_clock_speed = CPU_CLOCK_SPEED_UNDEFINED; - -static DEFINE_RAW_SPINLOCK(syscfg_lock); -/** - * kbase_get_vendor_specific_cpu_clock_speed - * @brief Retrieves the CPU clock speed. - * The implementation is platform specific. - * @param[out] cpu_clock - the value of CPU clock speed in MHz - * @return 0 on success, 1 otherwise -*/ -int kbase_get_vexpress_cpu_clock_speed(u32 *cpu_clock) -{ - /* TODO: MIDBASE-2873 - Provide runtime detection of CPU clock freq for 6XV7 board */ - *cpu_clock = CPU_CLOCK_SPEED_6XV7; - - return 0; -} diff --git a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_cpu_vexpress.h b/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_cpu_vexpress.h deleted file mode 100644 index 23647cc..0000000 --- a/mali_kbase/platform/vexpress_6xvirtex7_10mhz/mali_kbase_cpu_vexpress.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * (C) COPYRIGHT 2012-2013, 2015 ARM Limited. All rights reserved. - * - * This program is free software and is provided to you under the terms of the - * GNU General Public License version 2 as published by the Free Software - * Foundation, and any use by you of this program is subject to the terms - * of such GNU licence. - * - * A copy of the licence is included with the program, and can also be obtained - * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - - - - - -#ifndef _KBASE_CPU_VEXPRESS_H_ -#define _KBASE_CPU_VEXPRESS_H_ - -/** - * Versatile Express implementation of @ref kbase_cpu_clk_speed_func. - */ -int kbase_get_vexpress_cpu_clock_speed(u32 *cpu_clock); - -#endif /* _KBASE_CPU_VEXPRESS_H_ */ |