]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/au1000/common/setup.c
[MIPS] Alchemy: kill useless #include's, #define's and extern's
[linux-2.6-omap-h63xx.git] / arch / mips / au1000 / common / setup.c
index a90d425d4651a66c0e805d47511ecb86d0b866db..0e86f7a6b4a7f5ad60fa1a24cab5b14d7c815508 100644 (file)
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  */
+
 #include <linux/init.h>
-#include <linux/sched.h>
 #include <linux/ioport.h>
-#include <linux/mm.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/pm.h>
 
-#include <asm/cpu.h>
-#include <asm/bootinfo.h>
-#include <asm/irq.h>
 #include <asm/mipsregs.h>
 #include <asm/reboot.h>
-#include <asm/pgtable.h>
 #include <asm/time.h>
 
 #include <au1000.h>
@@ -49,15 +42,13 @@ extern void __init board_setup(void);
 extern void au1000_restart(char *);
 extern void au1000_halt(void);
 extern void au1000_power_off(void);
-extern void au1x_time_init(void);
-extern void au1x_timer_setup(struct irqaction *irq);
 extern void set_cpuspec(void);
 
 void __init plat_mem_setup(void)
 {
        struct  cpu_spec *sp;
        char *argptr;
-       unsigned long prid, cpupll, bclk = 1;
+       unsigned long prid, cpufreq, bclk = 1;
 
        set_cpuspec();
        sp = cur_cpu_spec[0];
@@ -65,8 +56,15 @@ void __init plat_mem_setup(void)
        board_setup();  /* board specific setup */
 
        prid = read_c0_prid();
-       cpupll = (au_readl(0xB1900060) & 0x3F) * 12;
-       printk("(PRId %08lx) @ %ldMHZ\n", prid, cpupll);
+       if (sp->cpu_pll_wo)
+#ifdef CONFIG_SOC_AU1000_FREQUENCY
+               cpufreq = CONFIG_SOC_AU1000_FREQUENCY / 1000000;
+#else
+               cpufreq = 396;
+#endif
+       else
+               cpufreq = (au_readl(SYS_CPUPLL) & 0x3F) * 12;
+       printk(KERN_INFO "(PRID %08lx) @ %ld MHz\n", prid, cpufreq);
 
        bclk = sp->cpu_bclk;
        if (bclk)
@@ -137,12 +135,11 @@ phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
 
 #ifdef CONFIG_PCI
        {
-               u32 start, end;
+               u32 start = (u32)Au1500_PCI_MEM_START;
+               u32 end   = (u32)Au1500_PCI_MEM_END;
 
-               start = (u32)Au1500_PCI_MEM_START;
-               end = (u32)Au1500_PCI_MEM_END;
-               /* check for pci memory window */
-               if ((phys_addr >= start) && ((phys_addr + size) < end))
+               /* Check for PCI memory window */
+               if (phys_addr >= start && (phys_addr + size - 1) <= end)
                        return (phys_t)
                               ((phys_addr - start) + Au1500_PCI_MEM_START);
        }