linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ccross@google.com (Colin Cross)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] [ARM] tegra: add PCI Express support
Date: Thu, 16 Sep 2010 14:42:03 -0700	[thread overview]
Message-ID: <AANLkTin5mkE3oTtYajrXxPnMUhj202xkwZp2yb8sNcCT@mail.gmail.com> (raw)
In-Reply-To: <4c70c64b9b0c187af872af65426bfef60079a2a3.1284655723.git.mike@compulab.co.il>

On Thu, Sep 16, 2010 at 9:53 AM, Mike Rapoport <mike@compulab.co.il> wrote:
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> ---
> ?arch/arm/mach-tegra/Kconfig ? ? ? ? ? ? ? ? | ? ?4 +
> ?arch/arm/mach-tegra/Makefile ? ? ? ? ? ? ? ?| ? ?1 +
> ?arch/arm/mach-tegra/board.h ? ? ? ? ? ? ? ? | ? ?1 +
> ?arch/arm/mach-tegra/include/mach/hardware.h | ? ?4 +
> ?arch/arm/mach-tegra/pcie.c ? ? ? ? ? ? ? ? ?| ?889 +++++++++++++++++++++++++++
> ?5 files changed, 899 insertions(+), 0 deletions(-)
> ?create mode 100644 arch/arm/mach-tegra/pcie.c
>
<snip>

> +/* register definitions */
> +#define AFI_OFSET ? ? ?0x3800
> +#define PADS_OFSET ? ? 0x3000
OFFSET

> +#define RP0_OFFSET ? ? 0x0000
> +#define RP1_OFFSET ? ? 0x1000

<snip>

> +static void tegra_pcie_xclk_clamp(bool clamp)
> +{
> + ? ? ? u32 reg;
> +
> + ? ? ? reg = pmc_readl(PMC_SCRATCH42) & ~PMC_SCRATCH42_PCX_CLAMP;
> +
> + ? ? ? if (clamp)
> + ? ? ? ? ? ? ? reg |= PMC_SCRATCH42_PCX_CLAMP;
> +
> + ? ? ? pmc_writel(reg, PMC_SCRATCH42);
> +}

Maybe add this to mach-tegra/powergate.c, to avoid having to set PMC
registers directly?

> +static int tegra_pcie_power_on(void)
> +{
> + ? ? ? int err;
> +
> + ? ? ? tegra_pcie_xclk_clamp(true);
> + ? ? ? tegra_periph_reset_assert(tegra_pcie.pcie_xclk);
> + ? ? ? tegra_pcie_xclk_clamp(false);
> +
> + ? ? ? clk_enable(tegra_pcie.afi_clk);
> + ? ? ? clk_enable(tegra_pcie.pex_clk);
> + ? ? ? return clk_enable(tegra_pcie.pll_e);
> +}
Any reason you can't use the powergate api here too?

> +static void tegra_pcie_power_off(void)
> +{
> + ? ? ? tegra_periph_reset_assert(tegra_pcie.pcie_xclk);
> + ? ? ? tegra_periph_reset_assert(tegra_pcie.afi_clk);
> + ? ? ? tegra_periph_reset_assert(tegra_pcie.pex_clk);
> +
> + ? ? ? tegra_pcie_xclk_clamp(true);
> +}
Can you power off the pcie partition?

  reply	other threads:[~2010-09-16 21:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16 16:53 [PATCH 0/3] [ARM] tegra: PCI Express support Mike Rapoport
2010-09-16 16:53 ` [PATCH 1/3] [ARM] tegra: add PCI Express clocks Mike Rapoport
2010-09-16 21:27   ` Colin Cross
2010-09-16 22:27     ` Mike Rapoport
2010-09-17  0:14       ` Gary King
2010-09-19  7:54         ` Mike Rapoport
2010-09-16 23:53   ` Mogambo Park
2010-09-19  7:52     ` Mike Rapoport
2010-09-16 16:53 ` [PATCH 2/3] [ARM] tegra: add PCI Express support Mike Rapoport
2010-09-16 21:42   ` Colin Cross [this message]
2010-09-16 22:16     ` Mike Rapoport
2010-09-16 16:53 ` [PATCH 3/3] [ARM] tegra: harmony: enable PCI Express Mike Rapoport
2010-09-16 21:44   ` Colin Cross
2010-09-16 21:57     ` Mike Rapoport
2010-09-16 17:12 ` [PATCH 0/3] [ARM] tegra: PCI Express support Arnd Bergmann
2010-09-19 14:07   ` Mike Rapoport
2010-09-19 14:39     ` Arnd Bergmann
2010-09-19 15:02       ` Russell King - ARM Linux
2010-09-19 16:34         ` Arnd Bergmann
2010-09-19 16:40           ` Russell King - ARM Linux
2010-09-19 17:09             ` Arnd Bergmann
2010-09-19 15:36       ` Mike Rapoport
2010-09-19 16:01         ` Russell King - ARM Linux
2010-09-20  7:15           ` Mike Rapoport
2010-09-20  9:13             ` Arnd Bergmann
2010-09-20  9:58             ` Russell King - ARM Linux

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=AANLkTin5mkE3oTtYajrXxPnMUhj202xkwZp2yb8sNcCT@mail.gmail.com \
    --to=ccross@google.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).