[MIPS] Ocelot G: Fix build error and numerous warnings.

The cause of the build errors was a 64-bit kernel being configured in
ocelot_g_defconfig without the code being 64-bit proof. Fixed for now
by limiting 64-bit selection to SYS_SUPPORTS_64BIT_KERNEL if BROKEN.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+9 -4
+1 -1
arch/mips/Kconfig
··· 408 408 select SWAP_IO_SPACE 409 409 select SYS_HAS_CPU_RM7000 410 410 select SYS_SUPPORTS_32BIT_KERNEL 411 - select SYS_SUPPORTS_64BIT_KERNEL 411 + select SYS_SUPPORTS_64BIT_KERNEL if BROKEN 412 412 select SYS_SUPPORTS_BIG_ENDIAN 413 413 help 414 414 The Ocelot is a MIPS-based Single Board Computer (SBC) made by
+3 -3
arch/mips/momentum/ocelot_g/ocelot_pld.h
··· 23 23 #define OCELOT_REG_INTSET (12) 24 24 #define OCELOT_REG_INTCLR (13) 25 25 26 - #define OCELOT_PLD_WRITE(x, y) writeb(x, OCELOT_CS0_ADDR + OCELOT_REG_##y) 27 - #define OCELOT_PLD_READ(x) readb(OCELOT_CS0_ADDR + OCELOT_REG_##x) 28 - 26 + #define __PLD_REG_TO_ADDR(reg) ((void *) OCELOT_CS0_ADDR + OCELOT_REG_##reg) 27 + #define OCELOT_PLD_WRITE(x, reg) writeb(x, __PLD_REG_TO_ADDR(reg)) 28 + #define OCELOT_PLD_READ(reg) readb(__PLD_REG_TO_ADDR(reg)) 29 29 30 30 #endif /* __MOMENCO_OCELOT_PLD_H__ */
+5
arch/mips/momentum/ocelot_g/setup.c
··· 57 57 #include <asm/gt64240.h> 58 58 #include <asm/irq.h> 59 59 #include <asm/pci.h> 60 + #include <asm/pgtable.h> 60 61 #include <asm/processor.h> 61 62 #include <asm/reboot.h> 62 63 #include <linux/bootmem.h> ··· 159 158 rm7k_tcache_enabled = 1; 160 159 161 160 printk("Done\n"); 161 + } 162 + 163 + void __init plat_timer_setup(struct irqaction *irq) 164 + { 162 165 } 163 166 164 167 void __init plat_mem_setup(void)