Patchwork [U-Boot,04/15] Only delay boot if keyboard open

login
register
mail settings
Submitter Pali Rohár
Date Sept. 1, 2011, 11:34 a.m.
Message ID <1314876881-9669-4-git-send-email-pali.rohar@gmail.com>
Download mbox | patch
Permalink /patch/112879/
State Changes Requested
Headers show

Comments

Pali Rohár - Sept. 1, 2011, 11:34 a.m.
From: Matan Ziv-Av <matan@svgalib.org>

---
 board/nokia/rx51/rx51.c      |    7 +++++++
 include/configs/nokia_rx51.h |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)
Mike Frysinger - Sept. 1, 2011, 1:58 p.m.
On Thursday, September 01, 2011 07:34:30 Pali Rohár wrote:
>  board/nokia/rx51/rx51.c      |    7 +++++++
>  include/configs/nokia_rx51.h |    1 +

this is a new board port.  why not squash all your fixes into one instead of 
sending out an incomplete/buggy board port which needs patches to fixup ?
-mike
Pali Rohár - Oct. 8, 2011, 11:29 p.m.
On Thursday 01 September 2011 09:58:06 you wrote:
> On Thursday, September 01, 2011 07:34:30 Pali Rohár wrote:
> >  board/nokia/rx51/rx51.c      |    7 +++++++
> >  include/configs/nokia_rx51.h |    1 +
> 
> this is a new board port.  why not squash all your fixes into one instead of
> sending out an incomplete/buggy board port which needs patches to fixup ?

I wrote that my patch series was not complete and not correct. In next 
(complete) series I will mix board files into one patch.

> -mike
Mike Frysinger - Oct. 9, 2011, 4 p.m.
On Saturday 08 October 2011 19:29:27 Pali Rohár wrote:
> On Thursday 01 September 2011 09:58:06 you wrote:
> > On Thursday, September 01, 2011 07:34:30 Pali Rohár wrote:
> > >  board/nokia/rx51/rx51.c      |    7 +++++++
> > >  include/configs/nokia_rx51.h |    1 +
> > 
> > this is a new board port.  why not squash all your fixes into one instead
> > of sending out an incomplete/buggy board port which needs patches to
> > fixup ?
> 
> I wrote that my patch series was not complete and not correct. In next
> (complete) series I will mix board files into one patch.

OK

please keep replies on the list and don't seen them to specific people
-mike

Patch

diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index 3149a79..347d08a 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -104,6 +104,13 @@  int misc_init_r(void)
 	setenv("nolo_atagaddr", buf);
 #endif
 
+	// set environment variable slide_sw
+	// if keyboard slide is open/close
+	omap_set_gpio_direction(71, 1);
+	unsigned val = omap_get_gpio_datain(71);
+	omap_free_gpio(71);
+	setenv("slide_sw", val ? "close" : "open");
+
 	dieid_num_r();
 
 	return 0;
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index 45b942a..5c3b068 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -200,6 +200,7 @@  int rx51_kp_getc(void);
 		"bootm ${nolo_kernaddr}\0"
 
 #define CONFIG_PREBOOT \
+	"if test $slide_sw != open ; then run noloboot; fi ;" \
 	"echo Extra commands:;" \
 	"echo run sercon - Use serial port for control.;" \
 	"echo run usbcon - Use usbtty for control.;" \