nand_spl: Define nand_select function
Subsystems (2)
PATCH 1/1 nand_spl: Define nand_select function
Split up the selection of nand_chip from nand_init to a separate function. This is just to make it a little consistent as we've nand_deselect function.
Also use it in spl_nand_load_image function.
--- common/spl/spl_nand.c | 1 + drivers/mtd/nand/nand_spl_simple.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletions(-)
common/spl/spl_nand.c +1 -0
@@ -34,6 +34,7 @@ void spl_nand_load_image(void)debug ("spl: nand - using hw ecc\n" );nand_init (); +nand_select ();/*use CONFIG_SYS_TEXT_BASE as temporary storage area */ header = (struct image_header *)(CONFIG_SYS_TEXT_BASE );
drivers/mtd/nand/nand_spl_simple.c +5 -1
@@ -270,12 +270,16 @@ void nand_init(void) nand_chip.ecc.correct = nand_correct_data; }#endif +} +/* Select before operation */ +void nand_select (void ) +{if (nand_chip.select_chip) nand_chip.select_chip (&mtd,0 ); } -/* Unselect after operation */ +/* Deselect after operation */ void nand_deselect (void ) {if (nand_chip.select_chip)
Signature · 1 line
1.7.4.1
PATCH 1/1 nand_spl: Define nand_select function
Quoted 8 lines · Vikram Narayanan
Split up the selection of
nand_chipfromnand_initto a separate function. This is just to make it a little consistent as we'venand_deselectfunction.Also use it in
spl_nand_load_imagefunction.Signed-off-by Vikram Narayanan <[email protected]>Cc Stefan Roese <[email protected]>
What does this allow for us to do next? We've added a few bytes to SPL and we're already close to being too large sometimes.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121023/72742644/attachment.pgp>
PATCH 1/1 nand_spl: Define nand_select function
Quoted 6 lines · Tom Rini
Quoted 4 lines · Vikram Narayanan
Split up the selection of
nand_chipfromnand_initto a separate function. This is just to make it a little consistent as we'venand_deselectfunction.
Quoted 8 lines
Quoted 4 lines
Also use it in
spl_nand_load_imagefunction.Signed-off-by Vikram Narayanan<[email protected]>Cc Stefan Roese<[email protected]>What does this allow for us to do next? We've added a few bytes to SPL and we're already close to being too large sometimes.
Yep. 12 bytes added. If SPL is too much loaded to include this, the patch shall be dropped.
~Vikram
PATCH 1/1 nand_spl: Define nand_select function
Quoted 9 lines · Vikram Narayanan
Quoted 8 lines · Tom Rini
Quoted 6 lines · Vikram Narayanan
Split up the selection of
nand_chipfromnand_initto a separate function. This is just to make it a little consistent as we'venand_deselectfunction.Also use it in
spl_nand_load_imagefunction.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Vikram Narayanan<[email protected]>Cc Stefan Roese<[email protected]>What does this allow for us to do next? We've added a few bytes to SPL and we're already close to being too large sometimes.
Yep. 12 bytes added. If SPL is too much loaded to include this, the patch shall be dropped.
Since we're trying to squish down to 4kb and every byte counts, yes, this might well be. Thanks.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121023/ad3e6057/attachment.pgp>