From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Wed, 01 Dec 2010 09:48:45 +0100 Subject: [U-Boot] [PATCH v2] BLOCK: Add freescale IMX51 PATA driver In-Reply-To: <20101201053418.0C29A134FEF@gemini.denx.de> References: <1291087578-16714-1-git-send-email-marek.vasut@gmail.com> <4CF4DCD5.7030403@denx.de> <201012010346.21897.marek.vasut@gmail.com> <20101201053418.0C29A134FEF@gemini.denx.de> Message-ID: <4CF60BED.3060301@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 On 12/01/2010 06:34 AM, Wolfgang Denk wrote: > Dear Marek Vasut, > > In message <201012010346.21897.marek.vasut@gmail.com> you wrote: >> >> On efikamx, I'll soon submit it mainline (when I clean it up enough). Here's the >> relevant part of configuration file (the #define __io is actually the important >> thing): > > Is there a way to do without this? > >> #define __io > > I mean, these empty defines look pretty bogus to me. I have found several boards with the same behavior: include/configs/mv-common.h:#define __io include/configs/r2dplus.h:#define __io include/configs/edminiv2.h:#define __io include/configs/nhk8815.h:#define __io(a)((void __iomem *)(PCI_IO_VADDR + (a))) include/configs/r7780mp.h:#define __io __io is defined if CMD_IDE is set for most of them, meaning CMD_IDE requires this define, even if it has no particular meaning for the processor we are using. It seems to me that defining __io is only required for enabling the switch inside arch/arm/include/asm/io.h: #ifdef __io #define outsb(p,d,l) __raw_writesb(__io(p),d,l) ... Really __io should accept a parameter to make some casting, as I can see in the blackfin architecture. Except the nhk8815 board, no parameter is accepted and the define enables only the #ifdef switch. Probably there is a better way to do this ;-). Could be maybe better to define __io inside io.h if it is not already defined by a board ? Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================