On Tue, 22 Mar 2011 16:11:03 +0800 Xiangfu Liu <xian...@openmobilefree.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 03/08/2011 07:44 AM, Scott Wood wrote: > >> +#if defined(CONFIG_QI_LB60) > >> > +#define KEY_U_OUT (32 * 2 + 16) > >> > +#define KEY_U_IN (32 * 3 + 19) > >> > + __gpio_as_input(KEY_U_IN); > >> > + __gpio_enable_pull(KEY_U_IN); > >> > + __gpio_as_output(KEY_U_OUT); > >> > + __gpio_clear_pin(KEY_U_OUT); > >> > + > >> > + if (__gpio_get_pin(KEY_U_IN) == 0) > >> > + usb_boot(); > >> > +#endif > >> > +#endif > > This stuff does not belong in the NAND driver; it belongs under your board > > or cpu directory. > > > > I have tried to move those 'usb_boot' to board files. the only problem is > I have to run this 'usb_boot' very early. after CPU load the real u-boot to > memory > the usb_boot will not working. I will try to found more info about this. > then explain more in next email. OK, so you need to run it during the SPL phase -- but there should be some board/cpu-specific file for the SPL (if not, create one). Current examples of this include nand_spl/board/freescale/p1_p2_rdb/nand_boot.c and arch/powerpc/cpu/mpc83xx/nand_init.c. -Scott _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot