Received: by 10.213.65.68 with SMTP id h4csp603382imn; Sat, 17 Mar 2018 16:54:47 -0700 (PDT) X-Google-Smtp-Source: AG47ELuIEHZbypmXrh2WS2dXwhRjDKXCJYqiIZ3BpeBPYbcD6jrEyX2JQ3hgXdaUv8icSivw8jnJ X-Received: by 10.101.89.6 with SMTP id f6mr5285802pgu.178.1521330887490; Sat, 17 Mar 2018 16:54:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521330887; cv=none; d=google.com; s=arc-20160816; b=rng7PnOpUIqxwQeNy7Vg3xA1XViwG+x5pS0859CXUhk3zRzToei7bw+k37y1B8mLvi QngSag7HMR1N+0Z/Srj4naqXfcgTgZfrHr378DLsf6FU1KcHHH2CIRTlj1ndqyuJOwkL i1mLJUhgevRN7E8xaA0SSV2kMt4RezIsj7KJy17qtdkB897V782zHqsF+J6bQu3i0Hej hpVGJPptoRFrIE9OyNtAkzIEkIpqW3z7spzUAGl9bPWby9eBKJS97erOVs/dorOV/gMO o1IJ8eudyflRyZwJxwn5OfFKdA+F+xTEG1akivQo29V+wWK9iuiP5YZbWfa+KUja4kma kVlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=3mLWtQcd5y/L2A2BbCpWy5Gi3V0YT31DAUQiAPHSdi8=; b=PGwP3I0GACvG2hl54l/749cMNO/xCcJbn6unU/vLX4JrnsZV3QnD0DbIN2PD/LE6JS nSGWCS17AkaqK9QCIilhxcFfxLzkDUUPjO8yPsAEomW/YCyt1BRzlIhb1OXfyhXJbKU5 1QSuJ5pLNbpDamTMU/czMXvm37YLgHyK8fXUOv3GO+l1BQ38M/3Dd4MvCHW9UglCLCQS UbMGwbqXa62pGqncdqpUcaMgaYhsVfyXf/eRDIx8VLrpGu5i3NaMS/GtmVsbXNWkrnMF mSSWhl2hQUNx1o3vMLUmeNOn/L2f+wCwGVVShNZV6ChV6jmFLjnbp2iL3pMLCfgkia9D 8Pmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=TbaNy1rB; 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 m62si7347281pga.507.2018.03.17.16.54.33; Sat, 17 Mar 2018 16:54: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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=TbaNy1rB; 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 S1753875AbeCQXwq (ORCPT + 99 others); Sat, 17 Mar 2018 19:52:46 -0400 Received: from merlin.infradead.org ([205.233.59.134]:37568 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924AbeCQXwo (ORCPT ); Sat, 17 Mar 2018 19:52:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3mLWtQcd5y/L2A2BbCpWy5Gi3V0YT31DAUQiAPHSdi8=; b=TbaNy1rBhelahb6uqB5G0MiPa5 5D0gJPiNJsTPvEwlOraIwKsY60u8MNVKRh3EtoVxNZNGnZrBgY0DPrJbOoGtnjNT+wGRdKqJCGJOu v8xupFLsp2+38knm9rCwWxjtGfZ+Sla04U2PyzVSd2UUa1JXmvvfpZt80wxJLlsMBx9lE8HtzVklB PU4dwKikVfUs8iJA2L3IbVA9+4kDq4HdiPsecCjSLXlBBw8+11G0wBY1ENLzXCBqIQ9M98lzq4yOx x9eCls3yX44hYrn/3xHb/z3q7UYBNhiKeESv9mUHfdt05GRDKh+wpVys6xmcorWZE6/9O0vlbUHaJ Pg4AWIKA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1exLcp-00058B-5k; Sat, 17 Mar 2018 23:52:35 +0000 Subject: Re: [PATCH v4 3/8] doc: Add doc for the Ingenic TCU hardware To: Paul Cercueil , Thomas Gleixner , Jason Cooper , Marc Zyngier , Lee Jones , Daniel Lezcano , Ralf Baechle , Rob Herring , Jonathan Corbet , Mark Rutland Cc: James Hogan , Maarten ter Huurne , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, linux-doc@vger.kernel.org References: <20180110224838.16711-2-paul@crapouillou.net> <20180317232901.14129-1-paul@crapouillou.net> <20180317232901.14129-4-paul@crapouillou.net> From: Randy Dunlap Message-ID: <1e5b82ca-5ac3-6e98-d40b-67916008b485@infradead.org> Date: Sat, 17 Mar 2018 16:52:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180317232901.14129-4-paul@crapouillou.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/17/2018 04:28 PM, Paul Cercueil wrote: > Add a documentation file about the Timer/Counter Unit (TCU) > present in the Ingenic JZ47xx SoCs. > > Signed-off-by: Paul Cercueil > --- > Documentation/mips/00-INDEX | 3 +++ > Documentation/mips/ingenic-tcu.txt | 50 ++++++++++++++++++++++++++++++++++++++ > 2 files changed, 53 insertions(+) > create mode 100644 Documentation/mips/ingenic-tcu.txt > > v4: New patch in this series > diff --git a/Documentation/mips/ingenic-tcu.txt b/Documentation/mips/ingenic-tcu.txt > new file mode 100644 > index 000000000000..2508e5793da8 > --- /dev/null > +++ b/Documentation/mips/ingenic-tcu.txt > @@ -0,0 +1,50 @@ > +Ingenic JZ47xx SoCs Timer/Counter Unit hardware > +----------------------------------------------- > + > +The Timer/Counter Unit (TCU) in Ingenic JZ47xx SoCs is a multi-function > +hardware block. It features eight channels, that can be used as counters, drop comma ............. ^ > +timers, or PWM. > + > +- JZ4770 introduced a separate channel, called Operating System Timer (OST). > + It is a 64-bit programmable timer. > + > +- Each one of the eight channels has its own clock, which can be reparented > + to three different clocks (pclk, ext, rtc), gated, and reclocked, through > + their TCSR register. > + * The watchdog and OST hardware blocks also feature a TCSR register with > + the same format in their register space. > + * The TCU registers used to gate/ungate can also gate/ungate the watchdog > + and OST clocks. > + > +- On SoCs >= JZ4770, there are two different modes: > + * Channels 0, 3-7 operate in TCU1 mode: they cannot work in sleep mode, > + but are easier to operate. > + * Channels 1-2 operate in TCU2 mode: they can work in sleep mode, but > + the operation is a bit more complicated than with TCU1 channels. > + > +- Each channel can generate an interrupt. Some channels share an interrupt > + line, some don't, and this changes between SoC versions: > + * on JZ4740, timer 0 and timer 1 have their own interrupt line; others share > + one interrupt line. > + * on JZ4770 and JZ4780, timer 5 has its own interrupt; timers 0-4 and 6-7 all > + use one interrupt line; the OST uses the last interrupt. "The OST uses the last interrupt." is not clear to someone who doesn't know about this hardware. (I can read it several ways.) Does it mean that the 4770 and 4780 have 3 interrupt lines used like so? - timer 5 uses one interrupt line - timers 0-4 and 6-7 use a second interrupt line - the OST uses a third interrupt line thanks, -- ~Randy