public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: olof@lixom.net (Olof Johansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/3] [ARM] tegra: harmony: enable PCI Express
Date: Thu, 23 Sep 2010 10:22:33 -0500	[thread overview]
Message-ID: <20100923152233.GA3966@lixom.net> (raw)
In-Reply-To: <4ca30e894db667875888e55b9281247b398489a9.1285070872.git.mike@compulab.co.il>

On Tue, Sep 21, 2010 at 02:17:52PM +0200, Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> CC: Colin Cross <ccross@google.com>
> CC: Gary King <GKing@nvidia.com>
> ---
>  arch/arm/mach-tegra/Makefile             |    1 +
>  arch/arm/mach-tegra/board-harmony-pcie.c |   52 ++++++++++++++++++++++++++++++
>  2 files changed, 53 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-tegra/board-harmony-pcie.c
> 
> diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
> index 23c9600..60f73c7 100644
> --- a/arch/arm/mach-tegra/Makefile
> +++ b/arch/arm/mach-tegra/Makefile
> @@ -13,3 +13,4 @@ obj-$(CONFIG_TEGRA_PCI)			+= pcie.o
>  
>  obj-${CONFIG_MACH_HARMONY}              += board-harmony.o
>  obj-${CONFIG_MACH_HARMONY}              += board-harmony-pinmux.o
> +obj-${CONFIG_MACH_HARMONY}              += board-harmony-pcie.o
> diff --git a/arch/arm/mach-tegra/board-harmony-pcie.c b/arch/arm/mach-tegra/board-harmony-pcie.c
> new file mode 100644
> index 0000000..824c0a1
> --- /dev/null
> +++ b/arch/arm/mach-tegra/board-harmony-pcie.c
> @@ -0,0 +1,52 @@
> +/*
> + * arch/arm/mach-tegra/board-harmony-pcie.c
> + *
> + * Copyright (C) 2010 CompuLab, Ltd.
> + * Mike Rapoport <mike@compulab.co.il>
> + *
> + * This software is licensed under the terms of the GNU General Public
> + * License version 2, as published by the Free Software Foundation, and
> + * may be copied, distributed, and modified under those terms.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/gpio.h>
> +#include <linux/err.h>
> +#include <linux/regulator/consumer.h>
> +
> +#include <mach/pinmux.h>
> +#include "board.h"
> +
> +#ifdef CONFIG_TEGRA_PCI
> +
> +static int __init harmony_pcie_init(void)
> +{
> +	int err;
> +
> +	tegra_pinmux_set_tristate(TEGRA_PINGROUP_GPV, TEGRA_TRI_NORMAL);
> +	tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXA, TEGRA_TRI_NORMAL);
> +	tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXK, TEGRA_TRI_NORMAL);
> +
> +	err = tegra_pcie_init(true, true);
> +	if (err)
> +		goto err_pcie;
> +
> +	return 0;
> +
> +err_pcie:
> +	tegra_pinmux_set_tristate(TEGRA_PINGROUP_GPV, TEGRA_TRI_TRISTATE);
> +	tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXA, TEGRA_TRI_TRISTATE);
> +	tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXK, TEGRA_TRI_TRISTATE);
> +
> +	return err;
> +}
> +
> +subsys_initcall(harmony_pcie_init);

Hi,

This isn't multiboard-friendly, since this will run on all boards
that are built-in.  Please either check for the platform at the beginning
and abort, or call this explicitly from another board init function.



-Olof

      reply	other threads:[~2010-09-23 15:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21 12:17 [PATCH v2 0/3] *** SUBJECT HERE *** Mike Rapoport
2010-09-21 12:17 ` [PATCH v2 1/3] [ARM] tegra: add PCI Express clocks Mike Rapoport
2010-09-21 12:17 ` [PATCH v2 2/3] [ARM] tegra: add PCI Express support Mike Rapoport
2010-09-21 12:30   ` Arnd Bergmann
2010-09-21 13:23     ` Pawel Moll
2010-09-21 13:33       ` Arnd Bergmann
2010-09-21 14:35     ` Mike Rapoport
2010-09-21 15:03       ` Arnd Bergmann
2010-09-21 12:17 ` [PATCH v2 3/3] [ARM] tegra: harmony: enable PCI Express Mike Rapoport
2010-09-23 15:22   ` Olof Johansson [this message]

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=20100923152233.GA3966@lixom.net \
    --to=olof@lixom.net \
    --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