From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 04 Jan 2013 11:22:18 +0100 Subject: [U-Boot] [PATCH] drivers/block/systemace: replaced in16/out16 with more common readw/writew macros In-Reply-To: References: <1357139186-9172-1-git-send-email-alexey.brodkin@gmail.com> <20130103120546.3C323200781@gemini.denx.de> <20130103123737.5776B200781@gemini.denx.de> Message-ID: <20130104102218.0993F20008A@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Alexey, In message you wrote: > > but then do you think if there's any way to use some generic > read/write routines? For reference, please see section "KERNEL I/O BARRIER EFFECTS" in the Linux kernel Documentation/memory-barriers.txt file. According to that, we should strive to using ioreadX(), iowriteX() (and some kernel hackers actually support such an oppinion) - however, there is little support for thjis in existing code. ARM traditionally tends to be using readX(), writeX(), at least on the LE implmentamtions (I don't know what the BE variants do). PowerPC has tradtitionally been using inX(), outX() resp. their explicit counterparts in_leX() / in_beX() / out_leX() / out_beX(). These functions are also available in ARM, and have been used for drivers for IP blocks shared between SoCs of different architectures. > The problem is we use ml509 board loaded with Synopsys DW ACR700 core > and we need to access SystemACE CF-card controller (to boot Linux > kernel mainly). > > Or should I just add conditional branch for ARC architecture? Is there a need to change the driver at all? Can you not just provide the needed inX(), outX() accessors for your architecture? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Why waste negative entropy on comments, when you could use the same entropy to create bugs instead?" - Steve Elias