Skip to content
  • Amadeusz Sławiński's avatar
    PPC: xnu kernel expects FLUSH to be cleared on STOP · 987422bc
    Amadeusz Sławiński authored
    
    
    otherwise it gets stuck in a loop
    so clear it when unsetting run when flush is set
    
    void
    IODBDMAStop( volatile IODBDMAChannelRegisters *registers)
    {
    
    	IOSetDBDMAChannelControl( registers,
    	IOClearDBDMAChannelControlBits( kdbdmaRun )
    		| IOSetDBDMAChannelControlBits(  kdbdmaFlush ));
    
    DBDMA: writel 0x0000000000000b00 <= 0xa0002000
    DBDMA: channel 0x16 reg 0x0
    DBDMA:     status 0x00002000
    
    	while( IOGetDBDMAChannelStatus( registers) & (
    			kdbdmaActive | kdbdmaFlush))
    		eieio();
    
    DBDMA: readl 0x0000000000000b04 => 0x00002000
    DBDMA: channel 0x16 reg 0x1
    DBDMA: readl 0x0000000000000b04 => 0x00002000
    DBDMA: channel 0x16 reg 0x1
    DBDMA: readl 0x0000000000000b04 => 0x00002000
    DBDMA: channel 0x16 reg 0x1
    DBDMA: readl 0x0000000000000b04 => 0x00002000
    DBDMA: channel 0x16 reg 0x1
    it continues to get printed
    
    }
    
    Signed-off-by: default avatarAmadeusz Sławiński <amade@asmblr.net>
    [agraf: replace tabs with spaces]
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    987422bc