From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E60E8C10F0E for ; Fri, 12 Apr 2019 15:20:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B46492171F for ; Fri, 12 Apr 2019 15:20:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DPFzYl1p" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B46492171F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NqQiv+zJaBrW1fc8sjvqD2F5NvA4tLXOeuqeFHhaNaM=; b=DPFzYl1pDLzxF7 FCWfd/HnmNKtI4Aa8oZtaA1YdPEYn9gPX0RYqeFcKZlASMJ3VAbTCN31eoZJSXtTGNNZ1dp8Rnmx1 DzyGFER57HqNdqwLYWm9e85p0antU7loAEGyvFVeCF3IRnLgxLcOkEjzFl4fsah8+4M+dzglP29ja 7zPgl4EnuupZQnHsftDwntdtpUe81pdpyQRySk/JL8YNWt86Ljvv0Kp8Jj6apszRVAfXSDJulmZJ+ 6q0lunLxHqzqKfxswl/AjjR3iC3ua+jb9Vu53g5zF0pRHSM68h5aIxae0yA6zol5UbG6rh7cHdVLP WTkzNtF7hZ4fywwtr9Ug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hExyk-0006TY-R4; Fri, 12 Apr 2019 15:20:34 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hExyh-0006Sg-7s for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2019 15:20:32 +0000 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 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-Disposition: inline In-Reply-To: <49dd19bf-f5bd-e048-75ad-2d4cb708bcf9@ti.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190412_082031_321432_1AD66916 X-CRM114-Status: GOOD ( 17.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Device Tree Mailing List , Grygorii Strashko , jason@lakedaemon.net, Peter Ujfalusi , Marc Zyngier , Sekhar Nori , linux-kernel@vger.kernel.org, Tero Kristo , Rob Herring , Santosh Shilimkar , Linux ARM Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel