All of lore.kernel.org
 help / color / mirror / Atom feed
From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] Kirkwood: enable PCIe before reading device ID register
Date: Fri, 04 Feb 2011 16:16:42 +0300	[thread overview]
Message-ID: <4D4BFC3A.9060505@ru.mvista.com> (raw)
In-Reply-To: <1296684971-10577-2-git-send-email-ecc@cmu.edu>

Hello.

On 03-02-2011 1:16, Eric Cooper wrote:

> PCIe may have been disabled (by kirkwood_clock_gate)
> if this kernel was started by kexec.  Make sure PCIe
> is enabled before attempting to access the device ID
> register, otherwise the system will hang.

> Signed-off-by: Eric Cooper<ecc@cmu.edu>
[...]

> diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
> index 513ad31..ca294ff 100644
> --- a/arch/arm/mach-kirkwood/pcie.c
> +++ b/arch/arm/mach-kirkwood/pcie.c
> @@ -18,8 +18,16 @@
>   #include<mach/bridge-regs.h>
>   #include "common.h"
>
> +void kirkwood_enable_pcie(void)
> +{
> +	u32 curr = readl(CLOCK_GATING_CTRL);

    An empty line wouldn't hurt here...

> +	if (!(curr&  CGC_PEX0))
> +		writel(curr | CGC_PEX0, CLOCK_GATING_CTRL);
> +}
> +

WBR, Sergei

  reply	other threads:[~2011-02-04 13:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 22:16 [PATCH v2 1/3] add machine-specific hook to machine_kexec Eric Cooper
2011-02-02 22:16 ` [PATCH v2 2/3] Kirkwood: enable PCIe before reading device ID register Eric Cooper
2011-02-04 13:16   ` Sergei Shtylyov [this message]
2011-02-02 22:16 ` [PATCH v2 3/3] Kirkwood: enable PCIe for kexec Eric Cooper
2011-02-02 22:22 ` [PATCH v2 1/3] add machine-specific hook to machine_kexec Nicolas Pitre

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=4D4BFC3A.9060505@ru.mvista.com \
    --to=sshtylyov@mvista.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 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.