From: Wolfgang Denk Date: Mon, 17 Jan 2011 23:04:24 +0100 Subject: [U-Boot] [PATCH] ppc4xx: Support dual link OSD In-Reply-To: <1294662805-11704-3-git-send-email-eibach@gdsys.de> References: <1294662805-11704-1-git-send-email-eibach@gdsys.de> <1294662805-11704-2-git-send-email-eibach@gdsys.de> <1294662805-11704-3-git-send-email-eibach@gdsys.de> Message-ID: <20110117220424.1A555D1CAD5@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 Dirk Eibach, In message <1294662805-11704-3-git-send-email-eibach@gdsys.de> you wrote: > > #define BASE_WIDTH 32 > @@ -38,12 +44,18 @@ > enum { > REG_CONTROL = 0x0010, > REG_MPC3W_CONTROL = 0x001a, > + REG_EXT_INTERRUPT = 0x001c, > + REG_EXT_INTERRUPT_ENABLE = 0x001e, > + REG_IIC_WRITE_MAILBOX = 0x0030, > + REG_IIC_WRITE_MAILBOX_EXT = 0x0032, > + REG_IIC_READ_MAILBOX = 0x0034, > + REG_IIC_READ_MAILBOX_EXT = 0x0036, > REG_VIDEOCONTROL = 0x0042, > - REG_OSDVERSION = 0x0100, > - REG_OSDFEATURES = 0x0102, > - REG_OSDCONTROL = 0x0104, > - REG_XY_SIZE = 0x0106, > - REG_VIDEOMEM = 0x0800, > + REG_OSDVERSION = CONFIG_SYS_FPGA_OSD_BASE + 0x0000, > + REG_OSDFEATURES = CONFIG_SYS_FPGA_OSD_BASE + 0x0002, > + REG_OSDCONTROL = CONFIG_SYS_FPGA_OSD_BASE + 0x0004, > + REG_XY_SIZE = CONFIG_SYS_FPGA_OSD_BASE + 0x0006, > + REG_VIDEOMEM = CONFIG_SYS_FPGA_OSD_MEM, This has a certain smell to me - it smells like device accesses based on a base + offset notation, which is not waht we want to see. Why don't you use proper C structs instead to describe your devices? 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 "Those who will be able to conquer software will be able to conquer the world." - Tadahiro Sekimoto, president, NEC Corp.