Update of /cvsroot/gc-linux/linux/arch/ppc/platforms
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29560/arch/ppc/platforms
Modified Files:
gamecube.c
Log Message:
Merged 2.6.23.
Index: gamecube.c
===================================================================
RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- gamecube.c 14 Nov 2007 23:08:47 -0000 1.39
+++ gamecube.c 16 Nov 2007 23:26:06 -0000 1.40
@@ -56,14 +56,14 @@
#define AUDIO_DMA_LENGTH ((void __iomem *)0xCC005036)
#define AI_DCL_PLAY (1<<15)
-static unsigned long gamecube_find_end_of_memory(void)
+static unsigned long __init gamecube_find_end_of_memory(void)
{
return GCN_MEM_SIZE;
}
-static void gamecube_map_io(void)
+static void __init gamecube_map_io(void)
{
-#ifdef CONFIG_GAMECUBE_DEBUG_CONSOLE
+#ifdef CONFIG_GAMECUBE_CONSOLE
io_block_mapping(0xd0000000, 0, 0x02000000, _PAGE_IO);
#endif
@@ -71,6 +71,35 @@
io_block_mapping(0xcc000000, 0x0c000000, 0x00100000, _PAGE_IO);
}
+static void __init gamecube_calibrate_decr(void)
+{
+ int freq, divisor;
+ freq = 162000000;
+ divisor = 4;
+ tb_ticks_per_jiffy = freq / HZ / divisor;
+ tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000);
+}
+
+static void __init gamecube_setup_arch(void)
+{
+#ifdef CONFIG_GAMECUBE_CONSOLE
+ gcn_con_init();
+#endif
+
+ /* On my North American Launch cube booted
+ * via PSO, I get a flooding of ARAM interrupts and audio MADNESS
+ * when I first boot. By clearing the AI interrupts and stopping
+ * audio, it goes away and I can boot normally.
+ */
+
+ /* ack and clear the interrupts for the AI line */
+ out_be16(CSR_REG,
+ DSP_CSR_PIINT|DSP_CSR_AIDINT|DSP_CSR_ARINT|DSP_CSR_DSPINT);
+ /* stop any audio */
+ out_be16(AUDIO_DMA_LENGTH,
+ in_be16(AUDIO_DMA_LENGTH) & ~AI_DCL_PLAY);
+}
+
static void gamecube_restart(char *cmd)
{
local_irq_disable();
@@ -88,15 +117,6 @@
gamecube_restart(NULL);
}
-static void gamecube_calibrate_decr(void)
-{
- int freq, divisor;
- freq = 162000000;
- divisor = 4;
- tb_ticks_per_jiffy = freq / HZ / divisor;
- tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000);
-}
-
static int gamecube_get_irq(void)
{
int irq;
@@ -142,7 +162,7 @@
.end = flipper_end_irq,
};
-static void gamecube_init_IRQ(void)
+static void __init gamecube_init_IRQ(void)
{
int i;
@@ -168,26 +188,6 @@
return 0;
}
-static void gamecube_setup_arch(void)
-{
-#ifdef CONFIG_GAMECUBE_CONSOLE
- gcn_con_init();
-#endif
-
- /* On my North American Launch cube booted
- * via PSO, I get a flooding of ARAM interrupts and audio MADNESS
- * when I first boot. By clearing the AI interrupts and stopping
- * audio, it goes away and I can boot normally.
- */
-
- /* ack and clear the interrupts for the AI line */
- out_be16(CSR_REG,
- DSP_CSR_PIINT|DSP_CSR_AIDINT|DSP_CSR_ARINT|DSP_CSR_DSPINT);
- /* stop any audio */
- out_be16(AUDIO_DMA_LENGTH,
- in_be16(AUDIO_DMA_LENGTH) & ~AI_DCL_PLAY);
-}
-
#ifdef CONFIG_KEXEC
static void gamecube_shutdown(void)
{
@@ -214,21 +214,20 @@
}
#endif
+ ppc_md.find_end_of_memory = gamecube_find_end_of_memory;
+ ppc_md.setup_io_mappings = gamecube_map_io;
+ ppc_md.calibrate_decr = gamecube_calibrate_decr;
ppc_md.setup_arch = gamecube_setup_arch;
+
ppc_md.show_cpuinfo = gamecube_show_cpuinfo;
- ppc_md.init_IRQ = gamecube_init_IRQ;
ppc_md.get_irq = gamecube_get_irq;
+ ppc_md.init_IRQ = gamecube_init_IRQ;
ppc_md.restart = gamecube_restart;
ppc_md.power_off = gamecube_power_off;
ppc_md.halt = gamecube_halt;
- ppc_md.calibrate_decr = gamecube_calibrate_decr;
-
- ppc_md.find_end_of_memory = gamecube_find_end_of_memory;
- ppc_md.setup_io_mappings = gamecube_map_io;
-
#ifdef CONFIG_KEXEC
ppc_md.machine_shutdown = gamecube_shutdown;
ppc_md.machine_kexec_prepare = gamecube_kexec_prepare;
|