From: Will Deacon <will.deacon@arm.com>
To: Jon Hunter <jon-hunter@ti.com>
Cc: Russell King <linux@arm.linux.org.uk>,
Grant Likely <grant.likely@secretlab.ca>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
device-tree <devicetree-discuss@lists.ozlabs.org>,
linux-omap <linux-omap@vger.kernel.org>,
linux-arm <linux-arm-kernel@lists.infradead.org>,
Paul Walmsley <paul@pwsan.com>,
Pratik Patel <pratikp@codeaurora.org>,
Linus Walleij <linus.walleij@linaro.org>,
Ming Lei <ming.lei@canonical.com>
Subject: Re: [RFC 3/5] ARM: CTI: Convert CTI helpers to AMBA bus driver
Date: Thu, 13 Dec 2012 15:08:26 +0000 [thread overview]
Message-ID: <20121213150826.GM26540@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <1355348588-22318-4-git-send-email-jon-hunter@ti.com>
On Wed, Dec 12, 2012 at 09:43:06PM +0000, Jon Hunter wrote:
> Convert the Cross Trigger Interface (CTI) helpers in cti.h into a
> AMBA bus driver so that we can use device-tree to look-up the hardware
> specific information such as base address and interrupt number during
> the device probe. This also add APIs to request, cti_get() and release,
> cti_put(), a CTI module so that drivers can allocate a module at
> runtime.
>
> Currently, the driver only supports looking-up the CTI hardware
> information via device-tree, however, the driver could be extended to
> support non-device-tree configurations if needed for a particular
> architecture.
>
> The CTI driver only currently supports CTI modules that have a single
> CPU interrupt, however, could be extended in the future to support more
> interrupts if a device requires this.
Aha, so elaborating on my earlier comments, we basically want to do the same
thing for ETB I reckon. This does raise the question about namespaces
though...
> +/**
> + * struct cti - Cross Trigger Interface (CTI) struct
> + *
> + * @node: Connects CTI instance to list of CTI instances
> + * @dev: Pointer to device structure
> + * @base: Mapped virtual address of the CTI module
> + * @name: Name associated with CTI instance
> + * @irq: Interrupt associated with CTI instance
> + * @trig_out: Trigger output associated with interrupt (@irq)
> + * @reserved: Used to indicate if CTI instance has been allocated
> + * @enabled: Used to indicate if CTI instance has been enabled
> + */
> +struct cti {
> + struct list_head node;
> + struct device *dev;
> + void __iomem *base;
> + const char *name;
> + int irq;
> + int trig_out;
> + bool reserved;
> + bool enabled;
> +};
> +
> +#ifdef CONFIG_ARM_AMBA_CTI
> +
> +int cti_map_trigger(struct cti *cti, int trig_in, int trig_out, int chan);
> +int cti_enable(struct cti *cti);
> +int cti_disable(struct cti *cti);
> +int cti_irq_ack(struct cti *cti);
> +struct cti *cti_get(const char *name);
> +void cti_put(struct cti *cti);
I wonder whether we should stick these all into a struct and have a general
way to see which coresight devices we have and then retrieve their ops
structures (so things like perf can walk a virtual coresight bus containing
initialised devices). It might also help if we decide to describe the
plumbing in the device tree, like Rob suggested.
What do you reckon?
Will
next prev parent reply other threads:[~2012-12-13 15:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 21:43 [RFC 0/5] ARM: Add Cross Trigger Interface driver Jon Hunter
[not found] ` <1355348588-22318-1-git-send-email-jon-hunter-l0cyMroinI0@public.gmane.org>
2012-12-12 21:43 ` [RFC 1/5] ARM: CORESIGHT: Add generic lock/unlock helpers Jon Hunter
[not found] ` <1355348588-22318-2-git-send-email-jon-hunter-l0cyMroinI0@public.gmane.org>
2012-12-13 14:58 ` Will Deacon
[not found] ` <20121213145803.GL26540-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2012-12-13 19:18 ` Jon Hunter
2012-12-13 19:36 ` Jean Pihet
2012-12-12 21:43 ` [RFC 4/5] ARM: dts: OMAP4: Add CTI nodes Jon Hunter
2012-12-12 21:43 ` [RFC 2/5] ARM: dts: Add Cross Trigger Interface binding Jon Hunter
2012-12-12 22:12 ` Rob Herring
2012-12-12 23:23 ` Jon Hunter
2012-12-14 19:53 ` Rob Herring
2012-12-13 17:41 ` Will Deacon
2012-12-13 19:21 ` Jon Hunter
2012-12-17 16:20 ` Mark Rutland
2012-12-17 16:30 ` Jon Hunter
2012-12-12 21:43 ` [RFC 3/5] ARM: CTI: Convert CTI helpers to AMBA bus driver Jon Hunter
2012-12-13 15:08 ` Will Deacon [this message]
[not found] ` <20121213150826.GM26540-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2012-12-13 19:35 ` Jon Hunter
2012-12-21 22:27 ` Pratik Patel
2012-12-21 22:35 ` Pratik Patel
2013-01-02 19:13 ` Jon Hunter
2013-01-02 19:23 ` Jon Hunter
2013-01-03 18:47 ` Pratik Patel
2012-12-12 21:43 ` [RFC 5/5] ARM: OMAP4: Add AMBA APB Clock Jon Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121213150826.GM26540@mudshark.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=jon-hunter@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=ming.lei@canonical.com \
--cc=paul@pwsan.com \
--cc=pratikp@codeaurora.org \
--cc=rob.herring@calxeda.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).