[PATCH linux dev-4.17 3/7] mmc: Aspeed: Add Aspeed sdhci core driver

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Jul 26 13:14:58 AEST 2018


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.




More information about the openbmc mailing list