aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/common/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/alchemy/common/setup.c')
-rw-r--r--arch/mips/alchemy/common/setup.c40
1 files changed, 7 insertions, 33 deletions
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c
index 6184baa56786..561e5da2658b 100644
--- a/arch/mips/alchemy/common/setup.c
+++ b/arch/mips/alchemy/common/setup.c
@@ -29,18 +29,13 @@
29#include <linux/ioport.h> 29#include <linux/ioport.h>
30#include <linux/jiffies.h> 30#include <linux/jiffies.h>
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/pm.h>
33 32
34#include <asm/mipsregs.h> 33#include <asm/mipsregs.h>
35#include <asm/reboot.h>
36#include <asm/time.h> 34#include <asm/time.h>
37 35
38#include <au1000.h> 36#include <au1000.h>
39 37
40extern void __init board_setup(void); 38extern void __init board_setup(void);
41extern void au1000_restart(char *);
42extern void au1000_halt(void);
43extern void au1000_power_off(void);
44extern void set_cpuspec(void); 39extern void set_cpuspec(void);
45 40
46void __init plat_mem_setup(void) 41void __init plat_mem_setup(void)
@@ -57,10 +52,6 @@ void __init plat_mem_setup(void)
57 /* this is faster than wasting cycles trying to approximate it */ 52 /* this is faster than wasting cycles trying to approximate it */
58 preset_lpj = (est_freq >> 1) / HZ; 53 preset_lpj = (est_freq >> 1) / HZ;
59 54
60 _machine_restart = au1000_restart;
61 _machine_halt = au1000_halt;
62 pm_power_off = au1000_power_off;
63
64 board_setup(); /* board specific setup */ 55 board_setup(); /* board specific setup */
65 56
66 if (au1xxx_cpu_needs_config_od()) 57 if (au1xxx_cpu_needs_config_od())
@@ -78,37 +69,20 @@ void __init plat_mem_setup(void)
78 iomem_resource.end = IOMEM_RESOURCE_END; 69 iomem_resource.end = IOMEM_RESOURCE_END;
79} 70}
80 71
81#if defined(CONFIG_64BIT_PHYS_ADDR) 72#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_PCI)
82/* This routine should be valid for all Au1x based boards */ 73/* This routine should be valid for all Au1x based boards */
83phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) 74phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
84{ 75{
76 u32 start = (u32)Au1500_PCI_MEM_START;
77 u32 end = (u32)Au1500_PCI_MEM_END;
78
85 /* Don't fixup 36-bit addresses */ 79 /* Don't fixup 36-bit addresses */
86 if ((phys_addr >> 32) != 0) 80 if ((phys_addr >> 32) != 0)
87 return phys_addr; 81 return phys_addr;
88 82
89#ifdef CONFIG_PCI 83 /* Check for PCI memory window */
90 { 84 if (phys_addr >= start && (phys_addr + size - 1) <= end)
91 u32 start = (u32)Au1500_PCI_MEM_START; 85 return (phys_t)((phys_addr - start) + Au1500_PCI_MEM_START);
92 u32 end = (u32)Au1500_PCI_MEM_END;
93
94 /* Check for PCI memory window */
95 if (phys_addr >= start && (phys_addr + size - 1) <= end)
96 return (phys_t)
97 ((phys_addr - start) + Au1500_PCI_MEM_START);
98 }
99#endif
100
101 /*
102 * All Au1xx0 SOCs have a PCMCIA controller.
103 * We setup our 32-bit pseudo addresses to be equal to the
104 * 36-bit addr >> 4, to make it easier to check the address
105 * and fix it.
106 * The PCMCIA socket 0 physical attribute address is 0xF 4000 0000.
107 * The pseudo address we use is 0xF400 0000. Any address over
108 * 0xF400 0000 is a PCMCIA pseudo address.
109 */
110 if ((phys_addr >= 0xF4000000) && (phys_addr < 0xFFFFFFFF))
111 return (phys_t)(phys_addr << 4);
112 86
113 /* default nop */ 87 /* default nop */
114 return phys_addr; 88 return phys_addr;