linux-mips
[Top] [All Lists]

Re: [PATCH 03/10] MIPS: PCI: Byteswap not needed in little-endian mode

To: Jayachandran C <jchandra@broadcom.com>
Subject: Re: [PATCH 03/10] MIPS: PCI: Byteswap not needed in little-endian mode
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Mon, 14 Jan 2013 20:48:12 +0300
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <1358179922-26663-4-git-send-email-jchandra@broadcom.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1358179922-26663-1-git-send-email-jchandra@broadcom.com> <1358179922-26663-4-git-send-email-jchandra@broadcom.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
Hello.

On 01/14/2013 07:11 PM, Jayachandran C wrote:

> Wrap the xlp_enable_pci_bswap() function and its call with
> '#ifdef __BIG_ENDIAN'. On Netlogic XLP, the PCIe initialization code
> to setup to byteswap is needed only in big-endian mode.

> Signed-off-by: Jayachandran C <jchandra@broadcom.com>
> ---
>  arch/mips/pci/pci-xlp.c |    4 ++++
>  1 file changed, 4 insertions(+)

> diff --git a/arch/mips/pci/pci-xlp.c b/arch/mips/pci/pci-xlp.c
> index 140557a..fe435fc 100644
> --- a/arch/mips/pci/pci-xlp.c
> +++ b/arch/mips/pci/pci-xlp.c
> @@ -191,6 +191,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
>       return 0;
>  }
>  
> +#ifdef __BIG_ENDIAN
>  static int xlp_enable_pci_bswap(void)
>  {
>       uint64_t pciebase, sysbase;
> @@ -224,6 +225,7 @@ static int xlp_enable_pci_bswap(void)
>       }
>       return 0;
>  }
> +#endif
>  
>  static int __init pcibios_init(void)
>  {
> @@ -235,7 +237,9 @@ static int __init pcibios_init(void)
>       ioport_resource.start =  0;
>       ioport_resource.end   = ~0;
>  
> +#ifdef __BIG_ENDIAN
>       xlp_enable_pci_bswap();
> +#endif

   Define empty inline function for the non-BE case instead. That's what
Documentation/SubmittingPatches tells us to do.

WBR, Sergei


<Prev in Thread] Current Thread [Next in Thread>