From: Ryan Chen <ryanchen.aspeed@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: openbmc@lists.ozlabs.org, joel@jms.id.au, andrew@aj.id.au,
ryan_chen@aspeedtech.com, mine260309@gmail.com
Subject: Re: [PATCH linux dev-4.17 3/7] mmc: Aspeed: Add Aspeed sdhci core driver
Date: Thu, 26 Jul 2018 11:26:39 +0800 [thread overview]
Message-ID: <20180726032639.GA20992@ryan-ubuntu> (raw)
In-Reply-To: <7880c8f400a5bf343e28ddd84e4d88980601b8bf.camel@kernel.crashing.org>
On Thu, Jul 26, 2018 at 01:14:58PM +1000, Benjamin Herrenschmidt wrote:
> On Thu, 2018-07-26 at 11:07 +0800, Ryan Chen wrote:
> > On Thu, Jul 26, 2018 at 11:47:40AM +1000, Benjamin Herrenschmidt wrote:
> > > On Thu, 2018-07-26 at 11:41 +1000, Benjamin Herrenschmidt wrote:
> > > > Change the "irq" prefixes on the functions.. Dont' do a chained
> > > > handler, that will be too much overhead for no benefit. Your SoC aren't
> > > > very fast and you want to avoid that overhead.
> > > >
> > > > Just do a normal interrupt handler, and have it call each port
> > > > interrupts.
> > > >
> > > > This isn't really an interrupt controller, it has no
> > > > enable/disable/masking ability, I would just create the ports directly
> > > > from the same driver and process the interrupts.
> > > >
> > > > I don't think there's benefit in keeping the ports as separate drivers.
> > >
> > > Look at how shdci-pci does it, sdhci-acpi as well, they have multiple
> > > slots. You can just register multiple slots from a single driver
> > > I think. You can still use device-tree sub-nodes and iterate them
> > > from the core driver to create the slots if you want, in case you may
> > > add slots in the future, but it's not even that a big deal.
> > >
> > > Ben.
> > >
> > >
> >
> > Thanks, after look into sdhci-pci, it should only request one pci_irq,
> > But, i am wondering where is the slot dispatch. could you help me point out it?
>
> So the PCI one just uses the same IRQ number for all the slots in
> sdhci_pci_probe_slot(), so the IRQ ends up shared.
>
> So on every irq it will jsut check all slots.
>
> Not sure if that's a problem. Due to how sdhci is organized, if you
> really want to make sure it only accesses the one slot, then you indeed
> do have to use a cascaded interrupt controller as you are doing, but
> I'm not sure it's really worthwhile.
>
> Cheers,
> Ben.
>
>
Yes, there is two way, to handle irq.
One is use share irq, so my sdhci driver have following outcome when share
irq,
cat /proc/interrupt
----------
34: 82 AVIC 26 Edge mmc0, mmc1
---------
when use cascaded interrupt.
.........
292: 35 sdhci-ic 0 Edge mmc0
293: 42 sdhci-ic 1 Edge mmc1
---------
use separate slot (actually it is) interrupt, it have advantage for each slot
debug. if use share. the debug will not easy.
next prev parent reply other threads:[~2018-07-26 3:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 7:26 [PATCHv2 linux dev-4.17 0/7] mmc/host: Add Aspeed SDIO driver Ryan Chen
2018-07-17 7:26 ` [PATCH linux dev-4.17 1/7] clk: Aspeed: Modify clk-aspeed.c driver probe sequence Ryan Chen
2018-07-17 7:26 ` [PATCH linux dev-4.17 2/7] clk: Aspeed: Add sdhci reset and clock Ryan Chen
2018-07-17 7:26 ` [PATCH linux dev-4.17 3/7] mmc: Aspeed: Add Aspeed sdhci core driver Ryan Chen
2018-07-26 1:41 ` Benjamin Herrenschmidt
2018-07-26 1:47 ` Benjamin Herrenschmidt
2018-07-26 3:07 ` Ryan Chen
2018-07-26 3:14 ` Benjamin Herrenschmidt
2018-07-26 3:26 ` Ryan Chen [this message]
2018-07-26 3:55 ` Benjamin Herrenschmidt
2018-07-26 9:10 ` Ryan Chen
2018-07-26 22:37 ` Benjamin Herrenschmidt
2018-07-17 7:26 ` [PATCH linux dev-4.17 4/7] mmc: Aspeed: Add driver for Aspeed sdhci Ryan Chen
2018-07-17 7:26 ` [PATCH linux dev-4.17 5/7] dts: Aspeed: Add devicetree " Ryan Chen
2018-07-17 7:26 ` [PATCH linux dev-4.17 6/7] Documentation: mmc: add aspeed sdhci binding document Ryan Chen
2018-07-17 7:26 ` [PATCH linux dev-4.17 7/7] configs: Aspeed: enable mmc host in defconfig Ryan Chen
2018-07-19 4:36 ` [PATCHv2 linux dev-4.17 0/7] mmc/host: Add Aspeed SDIO driver Benjamin Herrenschmidt
2019-02-15 10:36 ` Alexander Amelkin
2019-02-16 6:20 ` Ryan Chen
2019-03-12 12:16 ` Alexander Amelkin
2019-03-13 0:29 ` Ryan Chen
2019-03-22 12:26 ` Alexander Amelkin
2019-04-11 12:33 ` Joel Stanley
2019-04-16 10:57 ` [PATCHv2-modified dev-4.19 0/7] Add support for ASPEED SDHCI controller Alexander Amelkin
2019-04-18 6:22 ` Andrew Jeffery
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=20180726032639.GA20992@ryan-ubuntu \
--to=ryanchen.aspeed@gmail.com \
--cc=andrew@aj.id.au \
--cc=benh@kernel.crashing.org \
--cc=joel@jms.id.au \
--cc=mine260309@gmail.com \
--cc=openbmc@lists.ozlabs.org \
--cc=ryan_chen@aspeedtech.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).