From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Loc Ho <lho-qTEPVZfXA3Y@public.gmane.org>
Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Linux SCSI List
<linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
Don Dutile <ddutile-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Jon Masters <jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"patches-qTEPVZfXA3Y@public.gmane.org"
<patches-qTEPVZfXA3Y@public.gmane.org>,
Tuan Phan <tphan-qTEPVZfXA3Y@public.gmane.org>,
Suman Tripathi <stripathi-qTEPVZfXA3Y@public.gmane.org>
Subject: Re: [PATCH v17 3/4] ata: Add APM X-Gene SoC AHCI SATA host controller driver
Date: Fri, 14 Mar 2014 22:06:36 +0100 [thread overview]
Message-ID: <201403142206.36611.arnd@arndb.de> (raw)
In-Reply-To: <CAPw-ZT=1KWEowD_i=qoWwg372XdzC4p227rpNo7ov+NwOYFUDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Friday 14 March 2014, Loc Ho wrote:
> Hi,
>
> >> > gets called. Can you clarify what this register access does?
> >> > If it's just setting a index into a mux output, would it make
> >> > sense to have an optional DT property containing an integer with
> >> > the mux setting you want to set? That way you wouldn't even
> >> > have to have two compatible strings but just do
> >> >
> >> > ret = of_property_read_u32(node, "apm,ahci-mux", &mux);
> >> > if (!ret)
> >> > xgene_ahci_mux_select(ctx, mux);
> >> >
> >>
> >> Given that fact that I will break up the resource. Let's just use the
> >> resource for the MUX to handle this. For the IP that doesn't existed,
> >> I will just not list it.
> >
> > Ah, that sounds good. It also means that if the firmware has set up
> > the mux already, you don't have to touch it again. That would probably
> > be the preferred case.
> >
> > I'm undecided about the value that you write in there. That could either
> > be passed through DT as I suggested above for extra flexibility, or you
> > can keep it hardcoded if you are absolutely sure that there will never
> > need to be a case where you have to set it to something other than '1',
>
> It is only a mux between two IP's. Writing 1 is fine. For ACPI, it can
> be missing and handled by the firmware or can be handled just like the
> DTS way.
Why can't you have it handled by the firmware in the DTS case?
I still think it's rather unlikely that we will actually see ACPI support
on your platform, btw.
I'm willing to look at the patches you need for it, but I'm not very
optimistic, in particular because of the kind of hacks you need
for random bits of hardware.
> > Is there also an IOMMU, or just the PIM? If there is no IOMMU,
> > we will actually have to use the swiotlb code here, otherwise we
> > can rely on the IOMMU to do the translation so we can pretend that
> > there is always 64-bit DMA capability.
> >
> > In theory, the PIM could be dynamically reprogrammed for each
> > DMA, as an extremely primitive IOMMU implementation, but I don't
> > know what the impact on performance would be from doing that.
> > It would also prevent you from starting multiple concurrent DMAs,
> > although I suspect that is not an important case for SPI and SDIO.
>
> This first generation don't support IOMMU and rely on swiotlb. In any
> case, for SDIO, the solution is to reprogram the PIM and limit to SDMA
> - single buffer - for each operation.
Ok, interesting. In that case, I suppose the DMA mask is actually 64-bit.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v17 3/4] ata: Add APM X-Gene SoC AHCI SATA host controller driver
Date: Fri, 14 Mar 2014 22:06:36 +0100 [thread overview]
Message-ID: <201403142206.36611.arnd@arndb.de> (raw)
In-Reply-To: <CAPw-ZT=1KWEowD_i=qoWwg372XdzC4p227rpNo7ov+NwOYFUDA@mail.gmail.com>
On Friday 14 March 2014, Loc Ho wrote:
> Hi,
>
> >> > gets called. Can you clarify what this register access does?
> >> > If it's just setting a index into a mux output, would it make
> >> > sense to have an optional DT property containing an integer with
> >> > the mux setting you want to set? That way you wouldn't even
> >> > have to have two compatible strings but just do
> >> >
> >> > ret = of_property_read_u32(node, "apm,ahci-mux", &mux);
> >> > if (!ret)
> >> > xgene_ahci_mux_select(ctx, mux);
> >> >
> >>
> >> Given that fact that I will break up the resource. Let's just use the
> >> resource for the MUX to handle this. For the IP that doesn't existed,
> >> I will just not list it.
> >
> > Ah, that sounds good. It also means that if the firmware has set up
> > the mux already, you don't have to touch it again. That would probably
> > be the preferred case.
> >
> > I'm undecided about the value that you write in there. That could either
> > be passed through DT as I suggested above for extra flexibility, or you
> > can keep it hardcoded if you are absolutely sure that there will never
> > need to be a case where you have to set it to something other than '1',
>
> It is only a mux between two IP's. Writing 1 is fine. For ACPI, it can
> be missing and handled by the firmware or can be handled just like the
> DTS way.
Why can't you have it handled by the firmware in the DTS case?
I still think it's rather unlikely that we will actually see ACPI support
on your platform, btw.
I'm willing to look at the patches you need for it, but I'm not very
optimistic, in particular because of the kind of hacks you need
for random bits of hardware.
> > Is there also an IOMMU, or just the PIM? If there is no IOMMU,
> > we will actually have to use the swiotlb code here, otherwise we
> > can rely on the IOMMU to do the translation so we can pretend that
> > there is always 64-bit DMA capability.
> >
> > In theory, the PIM could be dynamically reprogrammed for each
> > DMA, as an extremely primitive IOMMU implementation, but I don't
> > know what the impact on performance would be from doing that.
> > It would also prevent you from starting multiple concurrent DMAs,
> > although I suspect that is not an important case for SPI and SDIO.
>
> This first generation don't support IOMMU and rely on swiotlb. In any
> case, for SDIO, the solution is to reprogram the PIM and limit to SDMA
> - single buffer - for each operation.
Ok, interesting. In that case, I suppose the DMA mask is actually 64-bit.
Arnd
next prev parent reply other threads:[~2014-03-14 21:06 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 20:19 [PATCH v17 0/4] ata: Add APM X-Gene SoC AHCI SATA host controller support Loc Ho
2014-03-12 20:19 ` Loc Ho
2014-03-12 20:19 ` [PATCH v17 1/4] arm64: Add APM X-Gene SoC 15Gbps Multi-purpose PHY DTS entries Loc Ho
2014-03-12 20:19 ` Loc Ho
2014-03-12 20:19 ` [PATCH v17 2/4] Documentation: Add documentation for the APM X-Gene SoC SATA host controller DTS binding Loc Ho
2014-03-12 20:19 ` Loc Ho
2014-03-12 20:19 ` [PATCH v17 3/4] ata: Add APM X-Gene SoC AHCI SATA host controller driver Loc Ho
2014-03-12 20:19 ` Loc Ho
2014-03-12 20:19 ` [PATCH v17 4/4] arm64: Add APM X-Gene SoC AHCI SATA host controller DTS entries Loc Ho
2014-03-12 20:19 ` Loc Ho
2014-03-14 11:42 ` Arnd Bergmann
2014-03-14 11:42 ` Arnd Bergmann
2014-03-13 17:01 ` [PATCH v17 3/4] ata: Add APM X-Gene SoC AHCI SATA host controller driver Bartlomiej Zolnierkiewicz
2014-03-13 17:01 ` Bartlomiej Zolnierkiewicz
2014-03-14 11:41 ` Arnd Bergmann
2014-03-14 11:41 ` Arnd Bergmann
2014-03-14 18:49 ` Loc Ho
2014-03-14 18:49 ` Loc Ho
2014-03-14 19:05 ` Arnd Bergmann
2014-03-14 19:05 ` Arnd Bergmann
2014-03-14 20:27 ` Loc Ho
2014-03-14 20:27 ` Loc Ho
[not found] ` <CAPw-ZT=1KWEowD_i=qoWwg372XdzC4p227rpNo7ov+NwOYFUDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-14 21:06 ` Arnd Bergmann [this message]
2014-03-14 21:06 ` Arnd Bergmann
2014-03-14 21:38 ` Loc Ho
2014-03-14 21:38 ` Loc Ho
2014-03-15 9:01 ` Arnd Bergmann
2014-03-15 9:01 ` Arnd Bergmann
2014-03-14 11:11 ` [PATCH v17 2/4] Documentation: Add documentation for the APM X-Gene SoC SATA host controller DTS binding Arnd Bergmann
2014-03-14 11:11 ` Arnd Bergmann
2014-03-14 11:08 ` [PATCH v17 1/4] arm64: Add APM X-Gene SoC 15Gbps Multi-purpose PHY DTS entries Arnd Bergmann
2014-03-14 11:08 ` Arnd Bergmann
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=201403142206.36611.arnd@arndb.de \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=ddutile-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=lho-qTEPVZfXA3Y@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=patches-qTEPVZfXA3Y@public.gmane.org \
--cc=stripathi-qTEPVZfXA3Y@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tphan-qTEPVZfXA3Y@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.