From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH 03/10] MIPS: PCI: Byteswap not needed in little-endian mode
Date: Tue, 15 Jan 2013 15:58:04 +0400 [thread overview]
Message-ID: <50F5444C.5020209@mvista.com> (raw)
In-Reply-To: <1358230746-13785-1-git-send-email-jchandra@broadcom.com>
Hello.
On 15-01-2013 10:19, 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 | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
> diff --git a/arch/mips/pci/pci-xlp.c b/arch/mips/pci/pci-xlp.c
> index 140557a..d201efa 100644
> --- a/arch/mips/pci/pci-xlp.c
> +++ b/arch/mips/pci/pci-xlp.c
> @@ -191,8 +191,14 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
> return 0;
> }
>
> -static int xlp_enable_pci_bswap(void)
> +/*
> + * If big-endian, enable hardware byteswap on the PCIe bridges.
> + * This will make both the SoC and PCIe devices behave consistently with
> + * readl/writel.
> + */
> +static void xlp_config_pci_bswap(void)
> {
> +#ifdef __BIG_ENDIAN
> uint64_t pciebase, sysbase;
> int node, i;
> u32 reg;
> @@ -222,7 +228,7 @@ static int xlp_enable_pci_bswap(void)
> reg = nlm_read_bridge_reg(sysbase, BRIDGE_PCIEIO_LIMIT0 + i);
> nlm_write_pci_reg(pciebase, PCIE_BYTE_SWAP_IO_LIM, reg | 0xfff);
> }
> - return 0;
> +#endif
You misunderstood. #ifdef within functions are frowned upon. Thios patch
is hardly better than previous then.
WBR, Sergei
next prev parent reply other threads:[~2013-01-15 11:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 16:11 [PATCH 00/10] Netlogic: Fixes and updates for 3.9 Jayachandran C
2013-01-14 16:11 ` [PATCH 01/10] MIPS: Netlogic: add XLS6xx to FMN config Jayachandran C
2013-01-14 16:11 ` [PATCH 02/10] MIPS: Netlogic: Optimize EIMR/EIRR accesses in 32-bit Jayachandran C
2013-01-14 16:11 ` [PATCH 03/10] MIPS: PCI: Byteswap not needed in little-endian mode Jayachandran C
2013-01-14 17:48 ` Sergei Shtylyov
2013-01-15 6:19 ` Jayachandran C
2013-01-15 11:58 ` Sergei Shtylyov [this message]
2013-01-15 12:16 ` Florian Fainelli
2013-01-14 16:11 ` [PATCH 04/10] MIPS: Netlogic: Split XLP L1 i-cache among threads Jayachandran C
2013-01-15 18:04 ` Ralf Baechle
2013-01-14 16:11 ` [PATCH 05/10] MIPS: Netlogic: Use PIC timer as a clocksource Jayachandran C
2013-01-14 16:11 ` [PATCH 06/10] MIPS: PCI: Prevent hang on XLP reg read Jayachandran C
2013-01-14 16:11 ` [PATCH 07/10] MIPS: Netlogic: No hazards needed for XLR/XLS Jayachandran C
2013-01-14 16:12 ` [PATCH 08/10] MIPS: Netlogic: use preset loops per jiffy Jayachandran C
2013-01-14 16:12 ` [PATCH 09/10] MIPS: Netlogic: Fix for quad-XLP boot Jayachandran C
2013-01-14 16:12 ` [PATCH 10/10] MIPS: PCI: Multi-node PCI support for Netlogic XLP Jayachandran C
2013-01-15 6:20 ` Jayachandran C
2013-01-15 6:38 ` Jayachandran C
2013-01-15 6:38 ` [PATCH 03/10] MIPS: PCI: Byteswap not needed in little-endian mode Jayachandran C
2013-01-16 12:12 ` Jayachandran C
2013-01-16 12:12 ` [PATCH 10/10] MIPS: PCI: Multi-node PCI support for Netlogic XLP Jayachandran C
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=50F5444C.5020209@mvista.com \
--to=sshtylyov@mvista.com \
--cc=jchandra@broadcom.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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