Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp529768yba; Fri, 12 Apr 2019 08:21:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLTRFRw3Nr2vOZSvNivakdQ15a1aNMR1AybnKAZxVHoZUsQUF67FzcPiXco4rdzZSrrXNQ X-Received: by 2002:a63:4558:: with SMTP id u24mr31479702pgk.225.1555082507864; Fri, 12 Apr 2019 08:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555082507; cv=none; d=google.com; s=arc-20160816; b=aZKQ/o4AgrzKFWbxUO5zMjEU1iCmahV3Rch4rUCMONH8/SQVG8Uiv6kMrsi14B9BNS 1IRlM+K9EAAJeC5l2twE9wERp3agtRWry93ry5jXMKY0LjSsz0WRAVTFFgFRu+vls3Qr CDPExZCptY7Mov/7p6D70s+SHn7WYg6+h9ep7r31cqkFyjmYNnJklsME+FNmFTpid7oO ZKhxfPRkIU2A2C6aRmpYCjofIURuhd6ndxkTSRsurb4cV0wqzoDJWbAXE7HXxpZzqeJ1 /0PGxC00P+6Fg72znPxxKhz0e9O8aeOwLfVeXBIKhBC6A/kGejl8sKTWbJaDTzva828L LTOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=H58LVfiRMLkmpFmXvPnEe3rskx9jDqq6uhJpIuMfe7U=; b=g9ECKPvnExtv29TaBsNiECyYRO5Yu4St4zLEDvG/c4DzCNYMP0ZjHMHQE+VdHCjYfE 6clwhwRdAKMlz49W0Ly2d6JkDjA1FTe8rlBhCwUQ+/kpSo5sb1n0ZRqnDqVmtVV8LaSr kEj9WtK/lF5xT1mTyBmjkveIE+muF+/OSG3LGoxRjyHcUEA7ZxdO18owpDiqNWpNWBtc /lidZ1V7ilnVpzmC2UhqE1Cd4aBkgEylWOHJHIaTyKvDzzmFKU7NQ4KOw2kUjGyZa8K1 XLak5UE1ZcIc0HM6s8qbtWoz0KBHdpAzRGh2A8gaZbn6qi32fE2nBLmANT8U08x1YBB4 FwwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si23424898plg.262.2019.04.12.08.21.32; Fri, 12 Apr 2019 08:21:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727015AbfDLPUa (ORCPT + 99 others); Fri, 12 Apr 2019 11:20:30 -0400 Received: from muru.com ([72.249.23.125]:45590 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbfDLPU3 (ORCPT ); Fri, 12 Apr 2019 11:20:29 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 5324E80F3; Fri, 12 Apr 2019 15:20:43 +0000 (UTC) Date: Fri, 12 Apr 2019 08:20:24 -0700 From: Tony Lindgren To: Lokesh Vutla Cc: Marc Zyngier , Nishanth Menon , Santosh Shilimkar , Rob Herring , jason@lakedaemon.net, Linux ARM Mailing List , linux-kernel@vger.kernel.org, Device Tree Mailing List , Sekhar Nori , Tero Kristo , Peter Ujfalusi , Grygorii Strashko Subject: Re: [PATCH v6 04/12] firmware: ti_sci: Add RM mapping table for am654 Message-ID: <20190412152024.GU2839@atomide.com> References: <20190410041358.16809-1-lokeshvutla@ti.com> <20190410041358.16809-5-lokeshvutla@ti.com> <20190411145416.GP2839@atomide.com> <49dd19bf-f5bd-e048-75ad-2d4cb708bcf9@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49dd19bf-f5bd-e048-75ad-2d4cb708bcf9@ti.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Lokesh Vutla [190412 04:08]: > > > On 11/04/19 8:24 PM, Tony Lindgren wrote: > > Hi, > > > > * Lokesh Vutla [190410 04:15]: > >> From: Peter Ujfalusi > >> diff --git a/Documentation/devicetree/bindings/arm/keystone/ti,sci.txt b/Documentation/devicetree/bindings/arm/keystone/ti,sci.txt > >> index b56a02c10ae6..6f0cd31c1520 100644 > >> --- a/Documentation/devicetree/bindings/arm/keystone/ti,sci.txt > >> +++ b/Documentation/devicetree/bindings/arm/keystone/ti,sci.txt > >> @@ -24,7 +24,8 @@ relationship between the TI-SCI parent node to the child node. > >> > >> Required properties: > >> ------------------- > >> -- compatible: should be "ti,k2g-sci" > >> +- compatible: should be "ti,k2g-sci" for TI 66AK2G SoC > >> + should be "ti,am654-sci" for for TI AM654 SoC > >> - mbox-names: > >> "rx" - Mailbox corresponding to receive path > >> "tx" - Mailbox corresponding to transmit path > >> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c > >> index d303f5a14da9..88e461498def 100644 > >> --- a/drivers/firmware/ti_sci.c > >> +++ b/drivers/firmware/ti_sci.c > >> @@ -2297,10 +2297,33 @@ static const struct ti_sci_desc ti_sci_pmmc_k2g_desc = { > >> /* Limited by MBOX_TX_QUEUE_LEN. K2G can handle upto 128 messages! */ > >> .max_msgs = 20, > >> .max_msg_size = 64, > >> + .rm_type_map = NULL, > >> +}; > >> + > >> +static struct ti_sci_rm_type_map ti_sci_am654_rm_type_map[] = { > >> + {.dev_id = 56, .type = 0x00b}, /* GIC_IRQ */ > >> + {.dev_id = 179, .type = 0x000}, /* MAIN_NAV_UDMASS_IA0 */ > >> + {.dev_id = 187, .type = 0x009}, /* MAIN_NAV_RA */ > >> + {.dev_id = 188, .type = 0x006}, /* MAIN_NAV_UDMAP */ > >> + {.dev_id = 194, .type = 0x007}, /* MCU_NAV_UDMAP */ > >> + {.dev_id = 195, .type = 0x00a}, /* MCU_NAV_RA */ > >> + {.dev_id = 0, .type = 0x000}, /* end of table */ > >> +}; > >> + > >> +/* Description for AM654 */ > >> +static const struct ti_sci_desc ti_sci_pmmc_am654_desc = { > >> + .default_host_id = 12, > >> + /* Conservative duration */ > >> + .max_rx_timeout_ms = 10000, > >> + /* Limited by MBOX_TX_QUEUE_LEN. K2G can handle upto 128 messages! */ > >> + .max_msgs = 20, > >> + .max_msg_size = 60, > >> + .rm_type_map = ti_sci_am654_rm_type_map, > >> }; > >> > >> static const struct of_device_id ti_sci_of_match[] = { > >> {.compatible = "ti,k2g-sci", .data = &ti_sci_pmmc_k2g_desc}, > >> + {.compatible = "ti,am654-sci", .data = &ti_sci_pmmc_am654_desc}, > >> { /* Sentinel */ }, > >> }; > >> MODULE_DEVICE_TABLE(of, ti_sci_of_match); > > > > Great, this approach with mapping table in the driver based on > > the compatible looks good to me and avoids stuffing the IDs > > into device tree: > > > > Acked-by: Tony Lindgren > > > > Thanks, but I don't think you understood what the patch is actually doing. > Please look at the rest of the series on how this table is being used. Oh OK yes I misunderstood. So you still need to use the dev_id also in the dts. Regards, Tony