Re: [PATCH 2/3] [ARM] tegra: add PCI Express support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 16, 2010 at 9:53 AM, Mike Rapoport <mike@xxxxxxxxxxxxxx> wrote:
> Signed-off-by: Mike Rapoport <mike@xxxxxxxxxxxxxx>
> ---
>  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?
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux