From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by ozlabs.org (Postfix) with ESMTP id 58617DDD1B for ; Sat, 21 Feb 2009 07:05:11 +1100 (EST) Received: by yx-out-2324.google.com with SMTP id 8so388344yxb.39 for ; Fri, 20 Feb 2009 12:05:09 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20090220191108.GA21163@ovro.caltech.edu> References: <20090220191108.GA21163@ovro.caltech.edu> Date: Fri, 20 Feb 2009 14:05:08 -0600 Message-ID: Subject: Re: PCI reading without endian conversion From: Matt Sealey To: Ira Snyder Content-Type: text/plain; charset=UTF-8 Cc: PowerPC dev list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Feb 20, 2009 at 1:11 PM, Ira Snyder wrote: > On Fri, Feb 20, 2009 at 12:57:36PM -0600, Matt Sealey wrote: > > I'm pretty sure memcpy_fromio() and memcpy_toio() will get you what you > want. They don't change byte ordering. Are they guaranteed to only do 32-bit, aligned accesses? I made some cheats on my CPLD to ignore byte enables and so on, because it makes the design cleaner and easier to read (for students) plus, saves a ton of logic cells. It's totally within the PCI standard, but it means if you do a byte read memcpy() you get.. very weird results (i.e. not great). -- Matt Sealey Genesi, Manager, Developer Relations