Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297815
b: refs/heads/master
c: bfc906d
h: refs/heads/master
i:
  297813: 70d7f15
  297811: 7ac31f8
  297807: 9d28db2
v: v3
  • Loading branch information
Thomas Schwinge authored and Paul Mundt committed Mar 28, 2012
1 parent 4dfe0cf commit 534d41d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 49d4bcaddca977fffdea8b0b71f6e5da96dac78e
refs/heads/master: bfc906d885762cd5e9381c1815b18bd7753cedf5
15 changes: 12 additions & 3 deletions trunk/arch/sh/drivers/pci/pci-sh7780.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
#include <asm/mmu.h>
#include <asm/sizes.h>

#if defined(CONFIG_CPU_BIG_ENDIAN)
# define PCICR_ENDIANNESS SH4_PCICR_BSWP
#else
# define PCICR_ENDIANNESS 0
#endif


static struct resource sh7785_pci_resources[] = {
{
.name = "PCI IO",
Expand Down Expand Up @@ -254,7 +261,7 @@ static int __init sh7780_pci_init(void)
__raw_writel(PCIECR_ENBL, PCIECR);

/* Reset */
__raw_writel(SH4_PCICR_PREFIX | SH4_PCICR_PRST,
__raw_writel(SH4_PCICR_PREFIX | SH4_PCICR_PRST | PCICR_ENDIANNESS,
chan->reg_base + SH4_PCICR);

/*
Expand Down Expand Up @@ -290,7 +297,8 @@ static int __init sh7780_pci_init(void)
* Now throw it in to register initialization mode and
* start the real work.
*/
__raw_writel(SH4_PCICR_PREFIX, chan->reg_base + SH4_PCICR);
__raw_writel(SH4_PCICR_PREFIX | PCICR_ENDIANNESS,
chan->reg_base + SH4_PCICR);

memphys = __pa(memory_start);
memsize = roundup_pow_of_two(memory_end - memory_start);
Expand Down Expand Up @@ -380,7 +388,8 @@ static int __init sh7780_pci_init(void)
* Initialization mode complete, release the control register and
* enable round robin mode to stop device overruns/starvation.
*/
__raw_writel(SH4_PCICR_PREFIX | SH4_PCICR_CFIN | SH4_PCICR_FTO,
__raw_writel(SH4_PCICR_PREFIX | SH4_PCICR_CFIN | SH4_PCICR_FTO |
PCICR_ENDIANNESS,
chan->reg_base + SH4_PCICR);

ret = register_pci_controller(chan);
Expand Down

0 comments on commit 534d41d

Please sign in to comment.