Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189800
b: refs/heads/master
c: fc7683a
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Monakhov authored and Jan Kara committed Apr 12, 2010
1 parent b409d7d commit 68ea6e0
Show file tree
Hide file tree
Showing 55 changed files with 631 additions and 1,070 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: 50fc88cb03786a79e9982d9d8dfb3fd225de9099
refs/heads/master: fc7683a3c30c22131b1651271d6bf9ea113b77c5
40 changes: 40 additions & 0 deletions trunk/arch/mips/alchemy/devboards/db1200/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,43 @@ void __init board_setup(void)
wmb();
}

/* use the hexleds to count the number of times the cpu has entered
* wait, the dots to indicate whether the CPU is currently idle or
* active (dots off = sleeping, dots on = working) for cases where
* the number doesn't change for a long(er) period of time.
*/
static void db1200_wait(void)
{
__asm__(" .set push \n"
" .set mips3 \n"
" .set noreorder \n"
" cache 0x14, 0(%0) \n"
" cache 0x14, 32(%0) \n"
" cache 0x14, 64(%0) \n"
/* dots off: we're about to call wait */
" lui $26, 0xb980 \n"
" ori $27, $0, 3 \n"
" sb $27, 0x18($26) \n"
" sync \n"
" nop \n"
" wait \n"
" nop \n"
" nop \n"
" nop \n"
" nop \n"
" nop \n"
/* dots on: there's work to do, increment cntr */
" lui $26, 0xb980 \n"
" sb $0, 0x18($26) \n"
" lui $26, 0xb9c0 \n"
" lb $27, 0($26) \n"
" addiu $27, $27, 1 \n"
" sb $27, 0($26) \n"
" sync \n"
" .set pop \n"
: : "r" (db1200_wait));
}

static int __init db1200_arch_init(void)
{
/* GPIO7 is low-level triggered CPLD cascade */
Expand All @@ -73,6 +110,9 @@ static int __init db1200_arch_init(void)
irq_to_desc(DB1200_SD0_INSERT_INT)->status |= IRQ_NOAUTOEN;
irq_to_desc(DB1200_SD0_EJECT_INT)->status |= IRQ_NOAUTOEN;

if (cpu_wait)
cpu_wait = db1200_wait;

return 0;
}
arch_initcall(db1200_arch_init);
3 changes: 1 addition & 2 deletions trunk/arch/mips/ar7/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static struct plat_vlynq_data vlynq_high_data = {
.on = vlynq_on,
.off = vlynq_off,
},
.reset_bit = 16,
.reset_bit = 26,
.gpio_bit = 19,
};

Expand Down Expand Up @@ -600,7 +600,6 @@ static int __init ar7_register_devices(void)
}

if (ar7_has_high_cpmac()) {
res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status);
if (!res) {
cpmac_get_mac(1, cpmac_high_data.dev_addr);

Expand Down
Loading

0 comments on commit 68ea6e0

Please sign in to comment.