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

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

 



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@xxxxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux