From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Murray Date: Mon, 17 Feb 2014 13:04:35 +0000 Subject: [U-Boot] [PATCH v3 5/7] zynq: Add support for auto nandboot In-Reply-To: References: <1392639991-18798-1-git-send-email-sivadur@xilinx.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 On 17 February 2014 12:26, Siva Durga Prasad Paladugu wrote: > From: Jagannadha Sutradharudu Teki > > Added support to find the nand bootmode and also > updated the default env. with nandboot. > > Signed-off-by: Siva Durga Prasad Paladugu > Signed-off-by: Jagannadha Sutradharudu Teki > --- > Changes for v3: > -Separated out the nand patch series > as per Michal comment. > Changes for v2: > -None > --- > board/xilinx/zynq/board.c | 4 ++++ > doc/README.zynq | 3 ++- > include/configs/zynq-common.h | 3 +++ > 3 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c > index 5a47149..9dd158c 100644 > --- a/board/xilinx/zynq/board.c > +++ b/board/xilinx/zynq/board.c > @@ -15,6 +15,7 @@ DECLARE_GLOBAL_DATA_PTR; > /* Bootmode setting values */ > #define ZYNQ_BM_MASK 0x0F > #define ZYNQ_BM_NOR 0x02 > +#define ZYNQ_BM_NAND 0x04 > #define ZYNQ_BM_SD 0x05 > #define ZYNQ_BM_JTAG 0x0 > > @@ -75,6 +76,9 @@ int board_late_init(void) > case ZYNQ_BM_NOR: > setenv("modeboot", "norboot"); > break; > + case ZYNQ_BM_NAND: > + setenv("modeboot", "nandboot"); > + break; > case ZYNQ_BM_SD: > setenv("modeboot", "sdboot"); > break; > diff --git a/doc/README.zynq b/doc/README.zynq > index 043c970..e0b38cf 100644 > --- a/doc/README.zynq > +++ b/doc/README.zynq > @@ -54,10 +54,11 @@ is intern used in autoboot. > > SLCR bootmode register Bit[3:0] values > #define ZYNQ_BM_NOR 0x02 > +#define ZYNQ_BM_NOR 0x04 > #define ZYNQ_BM_SD 0x05 > #define ZYNQ_BM_JTAG 0x0 > > -"modeboot" variable can assign any of "norboot", "sdboot" or "jtagboot" > +"modeboot" variable can assign any of "norboot", "nandboot", "sdboot" or "jtagboot" > bootmode strings at runtime. > > 5. Mainline status > diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h > index 08adaa2..068e59a 100644 > --- a/include/configs/zynq-common.h > +++ b/include/configs/zynq-common.h > @@ -170,6 +170,9 @@ > "norboot=echo Copying FIT from NOR flash to RAM... && " \ > "cp.b ${nor_flash_off} ${load_addr} ${fit_size} && " \ > "bootm ${load_addr}\0" \ > + "nandboot=echo Copying FIT from NAND flash to RAM... && " \ > + "nand read ${load_addr} ${flash_off} ${fit_size} && " \ > + "bootm ${load_addr}\0" \ Is there an opportunity to use 'nboot' here? i.e. nboot ${load_addr} 0 ${flash_off} (instead of nand read and bootm) This would mean you don't waste time reading NAND you don't use and you don't have to worry about maintaining ${fit_size} whenever the kernel changes size. Andrew Murray > "sdboot=echo Copying FIT from SD to RAM... && " \ > "fatload mmc 0 ${load_addr} ${fit_image} && " \ > "bootm ${load_addr}\0" \ > -- > 1.7.4 > > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot