MIPS: Alchemy: Default to noncoherent IO on Au1200 AB w. USB
PATCH 1/1 MIPS: Alchemy: Default to noncoherent IO on Au1200 AB w. USB
CONFIG_DMA_COHERENT is no longer set; default to noncoherent io on Au1200 revision AB if USB is enabled.
Signed-off-by Manuel Lauss <[email protected]>
--- arch/mips/alchemy/common/setup.c | 7 +++++++ arch/mips/alchemy/common/usb.c | 26 ++------------------------ 2 files changed, 9 insertions(+), 24 deletions(-)
arch/mips/alchemy/common/setup.c +7 -0
@@ -67,6 +67,13 @@ void __init plat_mem_setup(void)case ALCHEMY_CPU_AU1500 :case ALCHEMY_CPU_AU1100 : coherentio =0 ; +break ; +case ALCHEMY_CPU_AU1200 : +/* Au1200 AB USB does not support coherent memory */ +if (IS_ENABLED (CONFIG_USB ) && + (!(read_c0_prid () &PRID_REV_MASK ))) + coherentio =0 ; +break ; }board_setup ();/* board specific setup */
arch/mips/alchemy/common/usb.c +2 -24
@@ -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 ; }
Signature · 1 line
1.9.1
PATCH 1/1 MIPS: Alchemy: devboards: sit and spin after poweroff
earlier boards don't implement the poweroff bit in CPLD, instead let the cpu spin in the wait function.
Signed-off-by Manuel Lauss <[email protected]>
--- arch/mips/alchemy/devboards/platform.c | 3 +++ 1 file changed, 3 insertions(+)
arch/mips/alchemy/devboards/platform.c +3 -0
@@ -11,6 +11,7 @@#include <linux/pm.h> #include <asm/bootinfo.h> +#include <asm/idle.h> #include <asm/reboot.h> #include <asm/mach-au1x00/au1000.h> #include <asm/mach-db1x00/bcsr.h>
@@ -53,6 +54,8 @@ static void db1x_power_off(void) {bcsr_write (BCSR_RESETS ,0 );bcsr_write (BCSR_SYSTEM ,BCSR_SYSTEM_PWROFF |BCSR_SYSTEM_RESET ); +while (1 )/* sit and spin */ +cpu_wait (); }static void db1x_reset (char *c)
Signature · 1 line
1.9.1