RE: [STUPID] Best looking code to transfer to a t-shirt

From: Maciej Soltysiak (solt@dns.toxicfilms.tv)
Date: Sat Jan 04 2003 - 08:46:44 EST


> If only the Linux kernel had something as heart-warming as FreeBSD's
> "diediedie ()". :D
How about this:

arch/m68k/mac/psc.c

/*
 * Try to kill all DMA channels on the PSC. Not sure how this his
 * supposed to work; this is code lifted from macmace.c and then
 * expanded to cover what I think are the other 7 channels.
 */

void psc_dma_die_die_die(void)
{
        int i;

        printk("Killing all PSC DMA channels...");
        for (i = 0 ; i < 9 ; i++) {
                psc_write_word(PSC_CTL_BASE + (i << 4), 0x8800);
                psc_write_word(PSC_CTL_BASE + (i << 4), 0x1000);
                psc_write_word(PSC_CMD_BASE + (i << 5), 0x1100);
                psc_write_word(PSC_CMD_BASE + (i << 5) + 0x10, 0x1100);
        }
        printk("done!\n");
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:25 EST