Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114539
b: refs/heads/master
c: cc2e113
h: refs/heads/master
i:
  114537: b6330a6
  114535: 90cf36c
v: v3
  • Loading branch information
Ilya Yanok authored and Josh Boyer committed Sep 2, 2008
1 parent 6282fe7 commit 18b1a22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 38d56f1677130004497835a776feb84f068ce22a
refs/heads/master: cc2e113b4bbd415d53d8bb87a446cde6b7ce8acc
13 changes: 6 additions & 7 deletions trunk/arch/powerpc/sysdev/ppc4xx_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@
#include <asm/machdep.h>
#include <asm/dcr.h>
#include <asm/dcr-regs.h>
#include <mm/mmu_decl.h>

#include "ppc4xx_pci.h"

static int dma_offset_set;

/* Move that to a useable header */
extern unsigned long total_memory;

#define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL))
#define U64_TO_U32_HIGH(val) ((u32)((val) >> 32))

Expand Down Expand Up @@ -105,7 +103,8 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,

/* Default */
res->start = 0;
res->end = size = 0x80000000;
size = 0x80000000;
res->end = size - 1;
res->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;

/* Get dma-ranges property */
Expand Down Expand Up @@ -167,13 +166,13 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,
*/
if (size < total_memory) {
printk(KERN_ERR "%s: dma-ranges too small "
"(size=%llx total_memory=%lx)\n",
hose->dn->full_name, size, total_memory);
"(size=%llx total_memory=%llx)\n",
hose->dn->full_name, size, (u64)total_memory);
return -ENXIO;
}

/* Check we are a power of 2 size and that base is a multiple of size*/
if (!is_power_of_2(size) ||
if ((size & (size - 1)) != 0 ||
(res->start & (size - 1)) != 0) {
printk(KERN_ERR "%s: dma-ranges unaligned\n",
hose->dn->full_name);
Expand Down

0 comments on commit 18b1a22

Please sign in to comment.