diff options
Diffstat (limited to 'arch/mips/alchemy/common')
| -rw-r--r-- | arch/mips/alchemy/common/power.c | 1 | ||||
| -rw-r--r-- | arch/mips/alchemy/common/setup.c | 16 | ||||
| -rw-r--r-- | arch/mips/alchemy/common/sleeper.S | 6 | ||||
| -rw-r--r-- | arch/mips/alchemy/common/usb.c | 26 | 
4 files changed, 21 insertions, 28 deletions
diff --git a/arch/mips/alchemy/common/power.c b/arch/mips/alchemy/common/power.c index 0c7fce2a3c1..bdb28dee8fd 100644 --- a/arch/mips/alchemy/common/power.c +++ b/arch/mips/alchemy/common/power.c @@ -29,7 +29,6 @@   *  675 Mass Ave, Cambridge, MA 02139, USA.   */ -#include <linux/init.h>  #include <linux/pm.h>  #include <linux/sysctl.h>  #include <linux/jiffies.h> diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c index 62b4e7bbeab..8267e3c9772 100644 --- a/arch/mips/alchemy/common/setup.c +++ b/arch/mips/alchemy/common/setup.c @@ -30,6 +30,7 @@  #include <linux/jiffies.h>  #include <linux/module.h> +#include <asm/dma-coherence.h>  #include <asm/mipsregs.h>  #include <asm/time.h> @@ -59,6 +60,21 @@ void __init plat_mem_setup(void)  		/* Clear to obtain best system bus performance */  		clear_c0_config(1 << 19); /* Clear Config[OD] */ +	hw_coherentio = 0; +	coherentio = 1; +	switch (alchemy_get_cputype()) { +	case ALCHEMY_CPU_AU1000: +	case ALCHEMY_CPU_AU1500: +	case ALCHEMY_CPU_AU1100: +		coherentio = 0; +		break; +	case ALCHEMY_CPU_AU1200: +		/* Au1200 AB USB does not support coherent memory */ +		if (0 == (read_c0_prid() & PRID_REV_MASK)) +			coherentio = 0; +		break; +	} +  	board_setup();	/* board specific setup */  	/* IO/MEM resources. */ diff --git a/arch/mips/alchemy/common/sleeper.S b/arch/mips/alchemy/common/sleeper.S index 706d933e008..c73d81270b4 100644 --- a/arch/mips/alchemy/common/sleeper.S +++ b/arch/mips/alchemy/common/sleeper.S @@ -95,7 +95,7 @@ LEAF(alchemy_sleep_au1000)  	/* cache following instructions, as memory gets put to sleep */  	la	t0, 1f -	.set	mips3 +	.set	arch=r4000  	cache	0x14, 0(t0)  	cache	0x14, 32(t0)  	cache	0x14, 64(t0) @@ -121,7 +121,7 @@ LEAF(alchemy_sleep_au1550)  	/* cache following instructions, as memory gets put to sleep */  	la	t0, 1f -	.set	mips3 +	.set	arch=r4000  	cache	0x14, 0(t0)  	cache	0x14, 32(t0)  	cache	0x14, 64(t0) @@ -163,7 +163,7 @@ LEAF(alchemy_sleep_au1300)  	la	t1, 4f  	subu	t2, t1, t0 -	.set	mips3 +	.set	arch=r4000  1:	cache	0x14, 0(t0)  	subu	t2, t2, 32 diff --git a/arch/mips/alchemy/common/usb.c b/arch/mips/alchemy/common/usb.c index 2adc7edda49..d193dbea84a 100644 --- a/arch/mips/alchemy/common/usb.c +++ b/arch/mips/alchemy/common/usb.c @@ -355,47 +355,25 @@ static inline void __au1200_udc_control(void __iomem *base, int enable)  	}  } -static inline int au1200_coherency_bug(void) -{ -#if defined(CONFIG_DMA_COHERENT) -	/* Au1200 AB USB does not support coherent memory */ -	if (!(read_c0_prid() & PRID_REV_MASK)) { -		printk(KERN_INFO "Au1200 USB: this is chip revision AB !!\n"); -		printk(KERN_INFO "Au1200 USB: update your board or re-configure" -				 " the kernel\n"); -		return -ENODEV; -	} -#endif -	return 0; -} -  static inline int au1200_usb_control(int block, int enable)  {  	void __iomem *base =  			(void __iomem *)KSEG1ADDR(AU1200_USB_CTL_PHYS_ADDR); -	int ret = 0;  	switch (block) {  	case ALCHEMY_USB_OHCI0: -		ret = au1200_coherency_bug(); -		if (ret && enable) -			goto out;  		__au1200_ohci_control(base, enable);  		break;  	case ALCHEMY_USB_UDC0:  		__au1200_udc_control(base, enable);  		break;  	case ALCHEMY_USB_EHCI0: -		ret = au1200_coherency_bug(); -		if (ret && enable) -			goto out;  		__au1200_ehci_control(base, enable);  		break;  	default: -		ret = -ENODEV; +		return -ENODEV;  	} -out: -	return ret; +	return 0;  }  | 
