Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 2 Jul 2001 22:39:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 2 Jul 2001 22:39:41 -0400 Received: from www.transvirtual.com ([206.14.214.140]:15887 "EHLO www.transvirtual.com") by vger.kernel.org with ESMTP id ; Mon, 2 Jul 2001 22:39:28 -0400 Date: Mon, 2 Jul 2001 19:39:05 -0700 (PDT) From: James Simmons To: David T Eger cc: linux-kernel@vger.kernel.org Subject: Re: readl() / writel() on PowerPC In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > I have been working on a driver for a PowerPC PCI card/framebuffer device, > and noticed that the standard readl() and writel() for this platform to > byte swapping, since PowerPC runs big-endian. However, at least for my > hardware it's *really* not needed, and should just do a regular load > store, as is done for CONFIG_APUS. Looking at another driver > (drivers/char/bttv.h) I notice that Mr. Metzler redefines his read and > write routines for PowerPC as well to do simple loads and stores to IO > regions. > > Am I missing something? Is there some reason that readl() and > writel() should byte-swap by default? Use the fb_writeX/fb_readX functions in fbcon.h. They take care of these issues. P.S Watchout for userland programs. You can NOT use memset on the framebuffer on PPC due to caching issues. Use have to use tricks similar to what is done in fbcon.h with fb_memset. - 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/