From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Scharsig Date: Thu, 30 Nov 2006 15:52:43 +0100 Subject: [U-Boot-Users] [PATCH] use CFI-Flash and board depended driver together In-Reply-To: <456EE943.3010003@freescale.com> References: <456EE943.3010003@freescale.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Timur Tabi schrieb: >Ugh, I really dislike code like this. I know,this code is dirty. But it's very simple and works for me. > on these things, but I would rather you did something else. For > instance, if CFG_FLASH_BOARD_DRIVER is not defined, then the cfi_xxx > functions are defined here. Otherwise, they are declared as externs and No, if CFG_FLASH_BOARD_DRIVER is not defined cfi_xxx functions are not defined in orginal cfi_flash.c. In this case all other uboot moduls can call functions under orginal names. > You could do the same thing here. Rename flash_get_size() to > cfi_flash_get_size() and treat it like the other cfi_xxx functions above. A simple rename doesn't work. flash_init calls board_flash_get_size and board_flash_getsize calls the orginal flash_get_size, if selected bank is suppored by cfi driver