All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jingoo Han <jg1.han@samsung.com>
Cc: "'Kishon Vijay Abraham I'" <kishon@ti.com>,
	"'Pratyush Anand'" <pratyush.anand@st.com>,
	"'Bjorn Helgaas'" <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	"'Kukjin Kim'" <kgene.kim@samsung.com>,
	"'Mohit KUMAR'" <Mohit.KUMAR@st.com>,
	"'Sean Cross'" <xobs@kosagi.com>,
	"'Thierry Reding'" <thierry.reding@gmail.com>,
	"'SRIKANTH TUMKUR SHIVANAND'" <ts.srikanth@samsung.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH V3] pci: exynos: split into two parts such as Synopsys part and Exynos part
Date: Wed, 24 Jul 2013 23:02:40 +0200	[thread overview]
Message-ID: <201307242302.40934.arnd@arndb.de> (raw)
In-Reply-To: <001301ce8772$522dfc50$f689f4f0$@samsung.com>

On Tuesday 23 July 2013, Jingoo Han wrote:
> > 
> > Also I have one more query.
> > In your dt binding, your pci address and cpu address is the same. But the pci
> > address should start at 0x00000000 and end at 0xffffffff (for 32bit). Shouldn't
> > the cpu address map to something within this range of pci address?

The size is limited by the window available (e.g. 0x80000000-0x8FFFFFFF), it can
never be the full 4GB on a 32 bit non-LPAE system. If you only care about memory
space here (in practice you want at least also config space) that means you could
either have an identity map

	<0x82000000 0 0x80000000 0x80000000 0 0x1fffffff>;

or use bus address 0

	<0x82000000 0 0 0x80000000 0 0x1fffffff>;

but the length is always limited by the upstream bus.

> Sorry, I cannot answer it exactly.
> DT binding was confirmed by Arnd Bergmann.
> He will answer it exactly.

Normally you want the pci and cpu addresses to be the same, i.e. identity mapped.
This simplifies PCI bus master DMA as it ensures that there is no aliasing between
PCI memory space and RAM addresses visible to the host.

If you know that there is never any RAM at CPU address 0, you can also make the
PCI memory space be mapped from bus address 0, which has the advantage of allowing
access to low PCI addresses, e.g. for legacy VGA output using the 0xa0000-0xbffff
range, but it's less common. In particular on x86 there is always an identity
mapping.

The driver should be able to handle any mapping that can be described by the binding
and is physically possible to be programmed into the translation windows.

	Arnd

  reply	other threads:[~2013-07-24 21:03 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18  5:21 [PATCH V3] pci: exynos: split into two parts such as Synopsys part and Exynos part Jingoo Han
2013-07-18  5:21 ` Jingoo Han
2013-07-22 15:03 ` Kishon Vijay Abraham I
2013-07-22 15:03   ` Kishon Vijay Abraham I
2013-07-23  1:14   ` Jingoo Han
2013-07-23  4:49     ` Pratyush Anand
2013-07-23  4:49       ` Pratyush Anand
2013-07-23  6:29     ` Kishon Vijay Abraham I
2013-07-23  6:29       ` Kishon Vijay Abraham I
2013-07-23  7:00       ` Jingoo Han
2013-07-24 21:02         ` Arnd Bergmann [this message]
2013-09-12  6:34         ` Kishon Vijay Abraham I
2013-09-12  6:34           ` Kishon Vijay Abraham I
2013-09-12  7:15           ` Jingoo Han
2013-09-12  9:30             ` Pratyush Anand
2013-09-12  9:30               ` Pratyush Anand
2013-09-12  9:43               ` Kishon Vijay Abraham I
2013-09-12  9:43                 ` Kishon Vijay Abraham I
2013-09-12  9:52                 ` Pratyush Anand
2013-09-12  9:52                   ` Pratyush Anand
2013-09-12 10:07                   ` Kishon Vijay Abraham I
2013-09-12 10:07                     ` Kishon Vijay Abraham I
2013-09-12 10:18                     ` Pratyush Anand
2013-09-12 10:18                       ` Pratyush Anand
2013-09-12 10:46                       ` Pratyush Anand
2013-09-12 10:46                         ` Pratyush Anand
2013-09-12 11:14                         ` Kishon Vijay Abraham I
2013-09-12 11:14                           ` Kishon Vijay Abraham I
2013-09-21 14:56                         ` Kishon Vijay Abraham I
2013-09-21 14:56                           ` Kishon Vijay Abraham I
2013-09-21 22:03                           ` Arnd Bergmann
2013-09-21 22:03                             ` Arnd Bergmann
2013-09-21 22:03                             ` Arnd Bergmann
2013-09-22 11:16                             ` Kishon Vijay Abraham I
2013-09-22 11:16                               ` Kishon Vijay Abraham I
2013-09-22 11:16                               ` Kishon Vijay Abraham I
2013-09-23  4:14                               ` Pratyush Anand
2013-09-23  4:14                                 ` Pratyush Anand
2013-09-23  5:32                                 ` Kishon Vijay Abraham I
2013-09-23  5:32                                   ` Kishon Vijay Abraham I
2013-09-23  5:32                                   ` Kishon Vijay Abraham I
2013-09-23  6:50                                   ` Pratyush Anand
2013-09-23  6:50                                     ` Pratyush Anand
2013-09-23  6:50                                     ` Pratyush Anand
2013-09-24 21:23                                   ` Arnd Bergmann
2013-09-24 21:23                                     ` Arnd Bergmann
2013-09-26  5:06                                     ` Kishon Vijay Abraham I
2013-09-26  5:06                                       ` Kishon Vijay Abraham I
2013-09-26  9:51                                       ` Arnd Bergmann
2013-09-26  9:51                                         ` Arnd Bergmann
2013-09-26 10:12                                         ` Kishon Vijay Abraham I
2013-09-26 10:12                                           ` Kishon Vijay Abraham I
2013-09-26 10:12                                           ` Kishon Vijay Abraham I
2013-09-12 10:25                 ` Jingoo Han
2013-07-23  8:42       ` Jingoo Han

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=201307242302.40934.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Mohit.KUMAR@st.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jg1.han@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=pratyush.anand@st.com \
    --cc=thierry.reding@gmail.com \
    --cc=ts.srikanth@samsung.com \
    --cc=xobs@kosagi.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 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.