1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2025-04-21 12:27:27 +03:00

Make it compile again; fixed poweroff problem

This commit is contained in:
Bas Wijnen
2013-05-12 09:46:11 -04:00
parent 223ed86672
commit b06e011a07
16 changed files with 245 additions and 195 deletions

View File

@@ -1,4 +1,5 @@
#pypp 0
// vim: set filetype=cpp ://
// Iris: micro-kernel for a capability-based operating system.
// mips/nanonote/board.ccp: nanonote-specific definitions.
// Copyright 2009 Bas Wijnen <wijnen@debian.org>
@@ -22,7 +23,7 @@
void board_init ():
pll_init ()
cpm_stop_all ()
cpm_start_all ()
// Timer interrupts and buzzer.
cpm_start_tcu ()
// sdram memory.
@@ -38,7 +39,7 @@ void board_init ():
// buzzer.
gpio_as_pwm4 ()
// Set up memory.
//setup_sdram ()
setup_sdram ()
// Use some gpio pins for lcd.
gpio_as_gpio (2, (1 << 21) | (1 << 22) | (1 << 23))
gpio_as_output (2, (1 << 21) | (1 << 22) | (1 << 23))
@@ -52,6 +53,7 @@ void board_init ():
// Set up keyboard: this breaks uart receive.
gpio_as_gpio (3, 0x05fc0000)
// Set up timed interrupts.
tcu_start_timer_clock (0)
tcu_stop_counter (0)
tcu_select_extalclk (0)
tcu_select_clk_div4 (0)
@@ -104,6 +106,8 @@ void arch_poweroff ():
while !rtc_write_ready ():
rtc_enabled ()
while !rtc_write_ready ():
rtc_set_hrcr_val (0x7f)
while !rtc_write_ready ():
kdebug ("Power down.\n")
sync_serial ()
rtc_power_down ()