Skip to contentSkip to conversation

cfi_flash: A bit of cleanup and code simplification

PATCH New Stefan Roese 2 participants 5 messages Aug 31, 2010 – Sep 16, 2010

lore
Share & tools
lore
#0 lore raw

cover cfi_flash: A bit of cleanup and code simplification

Hi,

following are a few patches with minor code clean-up and simplification for the cfi_flash driver. Especially the usage of CONFIG_SYS_MAX_FLASH_BANKS_DETECT to support dynamic flash bank number detection is reworked a bit. Additionally, now the flash base address list can be dynamically changed if needed as well.

Here the shortlog:

Stefan Roese (4):
cfi_flash: Simplify flash_get_info()
cfi_flash: Add weak default for cfi_flash_bank_addr()
cfi_flash: Simplify dynamic flash bank number detection
cfi_flash: Remove uneccessary #ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT

 board/esd/apc405/apc405.c   |    6 ++----
 board/tqc/tqm834x/tqm834x.c |   12 +++++-------
 common/cmd_bootm.c          |    1 +
 common/cmd_flash.c          |   10 ++--------
 common/flash.c              |    1 +
 drivers/mtd/cfi_flash.c     |   32 +++++++++++++++-----------------
 drivers/mtd/cfi_mtd.c       |   10 +---------
 include/configs/APC405.h    |    6 ------
 include/configs/IDS8247.h   |    3 +--
 include/configs/TQM834x.h   |    4 ----
 include/flash.h             |    2 ++
 include/mtd/cfi_flash.h     |   18 ++++++++++++++++++
 12 files changed, 48 insertions(+), 57 deletions(-)

As you can see, these patches touch non-cfi related files too. If nobody objects, I'll collect these patches in my cfi-flash repository for the next merge window.

Cheers,
Stefan

--
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

#1 lore raw

cover cfi_flash: A bit of cleanup and code simplification

Quoted 6 lines · On Tuesday 31 August 2010 13:33:23 Stefan Roese wrote:

following are a few patches with minor code clean-up and simplification for the cfi_flash driver. Especially the usage of CONFIG_SYS_MAX_FLASH_BANKS_DETECT to support dynamic flash bank number detection is reworked a bit. Additionally, now the flash base address list can be dynamically changed if needed as well.

Quoted 7 lines

Here the shortlog:

Stefan Roese (4):
cfi_flash: Simplify flash_get_info()
cfi_flash: Add weak default for cfi_flash_bank_addr()
cfi_flash: Simplify dynamic flash bank number detection
cfi_flash: Remove uneccessary #ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT

The patch-series applied to u-boot-cfi-flash/next. Thanks.

Cheers,
Stefan

--
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

#2 lore raw

cover cfi_flash: A bit of cleanup and code simplification

Quoted 15 lines · Stefan Roese
Quoted 6 lines · On Tuesday 31 August 2010 13:33:23 Stefan Roese wrote:

following are a few patches with minor code clean-up and simplification for the cfi_flash driver. Especially the usage of CONFIG_SYS_MAX_FLASH_BANKS_DETECT to support dynamic flash bank number detection is reworked a bit. Additionally, now the flash base address list can be dynamically changed if needed as well.

Quoted 7 lines

Here the shortlog:

Stefan Roese (4):
cfi_flash: Simplify flash_get_info()
cfi_flash: Add weak default for cfi_flash_bank_addr()
cfi_flash: Simplify dynamic flash bank number detection
cfi_flash: Remove uneccessary #ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT

Quoted 4 lines

The patch-series applied to u-boot-cfi-flash/next. Thanks.

Cheers,
Stefan

Hi Stefan,

Have you had any thoughts about what the CONFIG_CFI option should be called for the odd flash arrangement on my DNS323? If you let me know what to call it, I'll submit a patch.

Thanks

Rogan

#3 lore raw

cover cfi_flash: A bit of cleanup and code simplification

Hi Rogan,

Quoted 3 lines · On Thursday 16 September 2010 16:21:05 Rogan Dawes wrote:

Have you had any thoughts about what the CONFIG_CFI option should be called for the odd flash arrangement on my DNS323? If you let me know what to call it, I'll submit a patch.

Sorry, but no, I have no idea right now. IIRC, this patch I sent you was more a hack for testing and not ready for upstream acceptance. But please go ahead and send such a patch, with a name that fits it best form your point of view. Perhaps others have an idea how best to implement this in a clean way. And at least its available on the list for reference.

Cheers,
Stefan

--
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

#4 lore raw

cover cfi_flash: A bit of cleanup and code simplification

Quoted 7 lines · Stefan Roese

Hi Rogan,

Quoted 3 lines · On Thursday 16 September 2010 16:21:05 Rogan Dawes wrote:

Have you had any thoughts about what the CONFIG_CFI option should be called for the odd flash arrangement on my DNS323? If you let me know what to call it, I'll submit a patch.

Quoted 8 lines

Sorry, but no, I have no idea right now. IIRC, this patch I sent you was more a hack for testing and not ready for upstream acceptance. But please go ahead and send such a patch, with a name that fits it best form your point of view. Perhaps others have an idea how best to implement this in a clean way. And at least its available on the list for reference.

Cheers,
Stefan

Hi Stefan,

My problem is that I don't know how to describe the odd address line connection setup. That would lead to a decent name, and a suitable patch would follow shortly thereafter.

Rogan