From patchwork Mon Apr 14 11:55:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 28314 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A40D20F46 for ; Mon, 14 Apr 2014 11:57:47 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oy12sf29965645veb.3 for ; Mon, 14 Apr 2014 04:57:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=QGpPurXb5oBXJ9y+sdOJwlYa7v5o2y4gM5OxLJleHXw=; b=CpQie+QdqhCE5SKLsAvIdF6rbdzUm0QFdSEke6pPsfvN8JjHITZqI+a4hOB43buaYt CgJ1OhYjYAz/qtw/VP+kiPVOm35xT8xdvu4999AyxmK8cu/uh6LX6KETDvAPChwIGFnI rmDYiKCq47ybgVVhRrBwZiIY8P2IvfJe3pyCQn26E5Z8xWRmBuSe0ck7jY9okh5AcsBY YXwbSTr9OYf59n80MPLaMo8GY6cQDpWJV2oYda/3WyDvAYmwCortdMaPf7CF0i8UUjN4 0jZ/H9BeBVU7ttGEK55rSxeXvDntzUvbDzYgx0g2oZKFknsniGa0lcr3S82VK5tqhOFX 5kgg== X-Gm-Message-State: ALoCoQkZrAyUD7ky0b8iHQDLW6CqJVoDTjbEBlklGR07LG7BiPnao1G0kTE3wEiwrcBl9BDLHCJ4 X-Received: by 10.58.202.10 with SMTP id ke10mr18930642vec.8.1397476667250; Mon, 14 Apr 2014 04:57:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.183 with SMTP id 52ls2674299qgv.38.gmail; Mon, 14 Apr 2014 04:57:47 -0700 (PDT) X-Received: by 10.220.162.6 with SMTP id t6mr36862344vcx.12.1397476667113; Mon, 14 Apr 2014 04:57:47 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id rl1si2703088vcb.182.2014.04.14.04.57.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 04:57:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so7390146vcb.35 for ; Mon, 14 Apr 2014 04:57:47 -0700 (PDT) X-Received: by 10.52.253.75 with SMTP id zy11mr19024407vdc.10.1397476667013; Mon, 14 Apr 2014 04:57:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp141302vcb; Mon, 14 Apr 2014 04:57:46 -0700 (PDT) X-Received: by 10.140.81.197 with SMTP id f63mr1982758qgd.114.1397476666592; Mon, 14 Apr 2014 04:57:46 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id m6si6582626qcg.34.2014.04.14.04.57.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 04:57:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WZfW5-0001mb-D5; Mon, 14 Apr 2014 11:57:37 +0000 Received: from mail-lb0-f181.google.com ([209.85.217.181]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WZfUP-0001jh-Me for lng-odp@lists.linaro.org; Mon, 14 Apr 2014 11:55:53 +0000 Received: by mail-lb0-f181.google.com with SMTP id c11so5479695lbj.26 for ; Mon, 14 Apr 2014 04:55:55 -0700 (PDT) X-Received: by 10.152.18.135 with SMTP id w7mr10401226lad.29.1397476555151; Mon, 14 Apr 2014 04:55:55 -0700 (PDT) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id bm3sm14022014lbb.12.2014.04.14.04.55.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 04:55:54 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Mon, 14 Apr 2014 14:55:25 +0300 Message-Id: <1397476530-20816-6-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397476530-20816-1-git-send-email-taras.kondratiuk@linaro.org> References: <1397476530-20816-1-git-send-email-taras.kondratiuk@linaro.org> Cc: Filip Moerman Subject: [lng-odp] [PATCH 05/10] Keystone2: Add platform config headers X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Add configuration headers for C6638. Signed-off-by: Taras Kondratiuk --- .../include/configs/odp_config_platform.h | 76 ++++++++++++++++ .../include/configs/odp_config_platform_c6638.h | 96 ++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 platform/linux-keystone2/include/configs/odp_config_platform.h create mode 100644 platform/linux-keystone2/include/configs/odp_config_platform_c6638.h diff --git a/platform/linux-keystone2/include/configs/odp_config_platform.h b/platform/linux-keystone2/include/configs/odp_config_platform.h new file mode 100644 index 0000000..743d8dd --- /dev/null +++ b/platform/linux-keystone2/include/configs/odp_config_platform.h @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2012, Texas Instruments Incorporated - http://www.ti.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Texas Instruments Incorporated nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +#ifndef ODP_CONFIG_PLATFORM_H_ +#define ODP_CONFIG_PLATFORM_H_ + +/* #include */ +#if defined(TI_EM_C6678) +#include +#elif defined(TI_EM_C6614) +#include +#elif defined(TI_EM_C6638) +#include +#else +#error "platform not defined or unsupported!" +#endif + +#define TI_ODP_PUBLIC_DESC_SIZE (64u) +#define TI_ODP_PUBLIC_DESC_NUM (4096u) +#define TI_ODP_REGION_NUM (2) /* local regions are not used on Linux */ + +#define MY_EM_DEVICE_ID (0) +#define MY_EM_PROCESS_ID (0) + +/* + * Queue, pool and event definitions + */ +#define MY_EM_PROC_QUEUE_NUM (32) +#define MY_EM_PROC_QUEUE_TYPE (EM_QUEUE_TYPE_PARALLEL) +#define MY_EM_PROC_EVENT_TYPE (TI_EM_EVENT_TYPE_PRELOAD_OFF) +/* +#define MY_EM_POOL_NUM (0) + +#define MY_EM_POOL_IDX (0) +#define MY_EM_EVENT_NUM (2048) + +#define MY_EM_EVENT_BUF_SIZE (32*16) +#define MY_EM_BUF_MODE (TI_EM_BUF_MODE_GLOBAL_TIGHT) + +#define MY_EM_EXIT_POOL_IDX (1) +#define MY_EM_EXIT_EVENT_NUM (TI_EM_CORE_NUM) +*/ +/* + * Number of public and local events. + * Number of private events are defined somewhere else. + */ +//#define MY_EM_PUBLIC_EVENT_DSC_SIZE (64u) +//#define MY_EM_PUBLIC_EVENT_NUM (2056) +//#define MY_EM_REGION_NUM (2) /* local regions are not used on Linux */ + +#endif /* ODP_CONFIG_PLATFORM_H_ */ diff --git a/platform/linux-keystone2/include/configs/odp_config_platform_c6638.h b/platform/linux-keystone2/include/configs/odp_config_platform_c6638.h new file mode 100644 index 0000000..8193aab --- /dev/null +++ b/platform/linux-keystone2/include/configs/odp_config_platform_c6638.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2012, Texas Instruments Incorporated - http://www.ti.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Texas Instruments Incorporated nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +/* + * This is the typical configuration for TCI6638 (KeyStone 2, Linux ARM A15) + * + * Descriptors and PDSP communications memory must reside in contiguous and coherent DDR + * (using CMA). + * + * On KeyStone2 QMSS regions do not need to be ordered. + */ +#ifndef ODP_CONFIG_PLATFORM_C6638_H_ +#define ODP_CONFIG_PLATFORM_C6638_H_ + +/* Cores are here "EM cores" that are not necessarily tied to real "CPU cores" */ +#define MY_EM_CORE_NUM (4) /* number of cores used by OpenEM */ +#define MY_EM_INIT_CORE_IDX (0) /* core on which the init will be started */ + +/* Index of the QMSS PDSP that will be used by OpenEM, Linux use QMSS PDSP0 for accumulator */ +#define MY_EM_SCHED_PDSP_IDX (2) + +/* Define if we are polling or waiting on event interrupts when dispatching events */ +#define MY_EM_DISPATCH_MODE (TI_EM_RH_POLL_MODE) + +/* + * Coherent contiguous memory used for PDSP <-> CPU communication + * We use one page per slot and CORE_NUM + 2 slots + */ +#ifdef TI_EM_USE_MSM +#define MY_EM_PDSP_COMM_MEM_BASE (0x0c000000) /* MSM */ +#else +#define MY_EM_PDSP_COMM_MEM_BASE (0x0) /* use DDR from CMA (contiguous & coherent)*/ +#endif +#define MY_EM_PDSP_COMM_MEM_VBASE (0x0) /* dynamic mapping */ +#define MY_EM_PDSP_COMM_MEM_SIZE (0x00010000) /* allowing 16 slots */ +#define MY_EM_PDSP_COMM_MEM_OFFSET (0x0) /* no offset */ + +/* + * Base physical address for event descriptors. + * In the future in will be managed by Linux or platform resource manager. + */ +#ifdef TI_EM_USE_MSM +#define TI_ODP_PUBLIC_DESC_BASE (0x0c100000) /* MSM */ +#define TI_ODP_PUBLIC_DESC_VBASE (0x0) /* dynamic mapping */ +#define TI_ODP_PUBLIC_DESC_OFFSET (0x0) /* no offset, QMSS/PDSP mapping equal to CPU mapping */ +#else /* TI_EM_USE_MSM */ +#define TI_ODP_PUBLIC_DESC_BASE (0x0) /* use DDR from CMA (contiguous & coherent)*/ +#define TI_ODP_PUBLIC_DESC_VBASE (0x0) /* dynamic mapping */ +#define TI_ODP_PUBLIC_DESC_OFFSET (0x0) /* no offset, QMSS/PDSP mapping equal to CPU mapping */ +#endif /* TI_EM_USE_MSM */ + +#define TI_ODP_PUBLIC_REGION_IDX (1) /* Linux uses 12 & 13 on ARM, set in DTS */ +#define TI_ODP_PRIVATE_REGION_IDX (2) +#define TI_ODP_PUBLIC_START_DESC_IDX (0) /* start index for desc (Linux starts at 0x4000, set in DTS) */ +#define TI_ODP_PRIVATE_START_DESC_IDX (-1) /* Automatically computed */ + +#define TI_ODP_PRIVATE_DESC_BASE (TI_EM_PDSPSH_DRAM) /* use PDSP data RAM */ +#define TI_ODP_PRIVATE_DESC_OFFSET (TI_EM_PDSP_DRAM_OFFSET) /* offset between CPU and QMSS/PDSP mapping */ +#define TI_ODP_PRIVATE_DESC_VBASE (0x0) /* dynamic mapping */ + +/* + * For the time being, free queues that can be used from user application are + * harcoded here. In the future it will be provided by platform resource manager. + */ +#define TI_ODP_PUBLIC_QUEUE_BASE_IDX (QMSS_GENERAL_PURPOSE_USER_QUEUE_BASE) +#define TI_ODP_FREE_QUEUE_BASE_IDX (TI_ODP_PUBLIC_QUEUE_BASE_IDX + ODP_CONFIG_QUEUES) +#define MY_EM_PRIVATE_FREE_QUEUE_IDX (TI_ODP_FREE_QUEUE_BASE_IDX + ODP_CONFIG_BUFFER_POOLS) +#define MY_EM_SCHED_QUEUE_IDX (MY_EM_PRIVATE_FREE_QUEUE_IDX + 2) + +#endif /* ODP_CONFIG_PLATFORM_C6638_H_ */ +