From: Rogan Dawes Date: Mon, 28 Mar 2011 11:09:43 +0200 Subject: [U-Boot] Support for reading GPIO's in boot scripts? In-Reply-To: References: <4D904D5E.8070303@dawes.za.net> Message-ID: <4D905057.20401@dawes.za.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2011/03/28 11:08 AM, Mike Frysinger wrote: > On Mon, Mar 28, 2011 at 4:57 AM, Rogan Dawes wrote: >> I'm wondering if there is any support in u-boot for reading the state of >> a GPIO input (i.e. button) to control the sequence of boot events? >> >> i.e. my board has a reset button, can I read its state to determine >> whether to try to TFTP-boot a new kernel, or to boot the existing one in >> flash? >> >> I did try to grep the sources for any hints, but did not find anything. >> I may have been looking in the wrong place, of course! > > i plan on generalizing arch/blackfin/cpu/cmd_gpio.c for all arches in > this next cycle (it is mostly done). but that would require your arch > to support the generic gpio layer. > -mike Cool, thanks for the answer, Mike! I'll wait to see what you do, and whatever needs to be done for my arch/board. Rogan