Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60541
b: refs/heads/master
c: 1112334
h: refs/heads/master
i:
  60539: f1fb939
v: v3
  • Loading branch information
David Gibson authored and Paul Mackerras committed Jun 14, 2007
1 parent a09d0ba commit 4be3b39
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 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: 4508dc21feb189159d4cc1d5b79c5a55fad5f2ed
refs/heads/master: 11123346bfba8e65631957c6c25ed1a6ca1b4ffe
16 changes: 16 additions & 0 deletions trunk/arch/powerpc/boot/44x.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,19 @@ void ibm44x_fixup_memsize(void)

dt_fixup_memory(0, memsize);
}

#define SPRN_DBCR0 0x134
#define DBCR0_RST_SYSTEM 0x30000000

void ibm44x_dbcr_reset(void)
{
unsigned long tmp;

asm volatile (
"mfspr %0,%1\n"
"oris %0,%0,%2@h\n"
"mtspr %1,%0"
: "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
);

}
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/boot/44x.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#define _PPC_BOOT_44X_H_

void ibm44x_fixup_memsize(void);

void ibm44x_dbcr_reset(void);
void ebony_init(void *mac0, void *mac1);

#endif /* _PPC_BOOT_44X_H_ */
18 changes: 1 addition & 17 deletions trunk/arch/powerpc/boot/ebony.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,10 @@ static void ebony_fixups(void)
dt_fixup_mac_addresses(ebony_mac0, ebony_mac1);
}

#define SPRN_DBCR0 0x134
#define DBCR0_RST_SYSTEM 0x30000000

static void ebony_exit(void)
{
unsigned long tmp;

asm volatile (
"mfspr %0,%1\n"
"oris %0,%0,%2@h\n"
"mtspr %1,%0"
: "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
);

}

void ebony_init(void *mac0, void *mac1)
{
platform_ops.fixups = ebony_fixups;
platform_ops.exit = ebony_exit;
platform_ops.exit = ibm44x_dbcr_reset;
ebony_mac0 = mac0;
ebony_mac1 = mac1;
ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
Expand Down

0 comments on commit 4be3b39

Please sign in to comment.