Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Jayachandran Chandrashekaran Nair
	<jayachandran.chandrashekaran@broadcom.com>,
	Jayachandran C <jchandra@broadcom.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, Rob Herring <robh@kernel.org>
Subject: Re: [RFC PATCH 2/2] PCI: Handle Broadcom Vulcan quirks
Date: Tue, 16 Feb 2016 22:46:41 +0100	[thread overview]
Message-ID: <3683441.Vpq7tGkM4s@wuerfel> (raw)
In-Reply-To: <20160216210337.GA8244@localhost>

On Tuesday 16 February 2016 15:03:37 Bjorn Helgaas wrote:
> 
> Your PCI host bridge has a window of address space that it forwards
> from the primary (CPU) side to the secondary (PCI) side.  I assume
> that's what you mean by the "PCI MEM range."  Apparently if the BAR is
> programmed inside that window, it causes some hardware error.  That
> still seems strange; there's no driver for the device, and we know the
> range is in use so it won't be assigned to any other device, so Linux
> should never *access* the range.
> 
> Apparently if you program the BAR *outside* the window, the hardware
> error does not happen, and the private registers are accessible.  But
> Linux currently doesn't know where this space is.
> 
> If we ignore the BAR in Linux, apparently the hardware error does not
> happen.  But the BAR still contains some value, so this is really the
> same as having the BAR outside the window, presumably because it came
> out of reset that way, or maybe firmware programmed it.
> 
> It sounds to me like you should do the following:
> 
> a) Have firmware program this BAR where you want it,
> 
> b) Describe these private registers as internal PCI bridge registers,
>    using a DT "reg" property,
> 
> c) Describe the host bridge window (which doesn't include the above
>    registers) using the normal "ranges" property, and
> 
> d) Arrange for config writes to BAR 0 to be dropped and for reads to
>    return 0, maybe by checks in your config accessors.

We should be able to express this in the ranges property as
a non-relocatable range, I'm pretty sure the PCI binding allows
this, but the Linux PCI code might not honor the flag at the
moment, which can be fixed.

	Arnd

  reply	other threads:[~2016-02-16 21:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-14 22:05 [RFC PATCH 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_BRIDGE_SKIP_ALIAS Jayachandran C
2016-02-14 22:05 ` [RFC PATCH 2/2] PCI: Quirks for Broadcom Vulcan Jayachandran C
2016-02-15  9:26   ` [RFC PATCH 2/2] PCI: Handle Broadcom Vulcan quirks Jayachandran C
2016-02-15 18:30     ` Bjorn Helgaas
2016-02-16 16:17       ` Jayachandran Chandrashekaran Nair
2016-02-16 17:14         ` Bjorn Helgaas
2016-02-16 18:09           ` Jayachandran Chandrashekaran Nair
2016-02-16 21:03             ` Bjorn Helgaas
2016-02-16 21:46               ` Arnd Bergmann [this message]
2016-02-17 17:06               ` Jayachandran Chandrashekaran Nair
2016-02-18 15:49                 ` Bjorn Helgaas
2016-02-23 14:40                   ` Jayachandran Chandrashekaran Nair
2016-02-23 15:12                     ` Bjorn Helgaas
2016-02-27  8:14                       ` Jayachandran Chandrashekaran Nair
2016-02-27 14:36                         ` Bjorn Helgaas
2016-02-15 18:20 ` [RFC PATCH 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_BRIDGE_SKIP_ALIAS Bjorn Helgaas
2016-02-15 19:39   ` Alex Williamson
2016-02-16 21:08     ` Jayachandran Chandrashekaran Nair
2016-02-16 22:25       ` Alex Williamson
2016-02-17 11:45         ` Jayachandran Chandrashekaran Nair
2016-02-17 15:28           ` Alex Williamson
2016-02-18 13:27             ` Jayachandran Chandrashekaran Nair
2016-02-18 14:14               ` Alex Williamson
2016-02-20 18:15                 ` Jayachandran Chandrashekaran Nair

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=3683441.Vpq7tGkM4s@wuerfel \
    --to=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=jayachandran.chandrashekaran@broadcom.com \
    --cc=jchandra@broadcom.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox