Re: linux-omap vs N810

2008-04-29 Thread Tony Lindgren
* Tony Lindgren [EMAIL PROTECTED] [080428 16:30]:
 Hi,
 
 * Jarkko Nikula [EMAIL PROTECTED] [080427 23:26]:
  On Mon, 28 Apr 2008 00:01:09 +0200 (CEST)
  ext [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
   Hello,
   I'm having a major problem running linux-omap kernel on Nokia N810.
   After correct build and flashing (tested by the use of self-built
   patched Nokia kernel) the device seems to hang before framebuffer
   initialization, then is rebooted by the watchdog. Manual FB update is
   disabled, I've checked the configuration in many possible ways.
   
   I'd like to hear about possible causes of that.
   
  Most probably reason is development time machine id  passed by the
  bootloader where linux-omap is using official id of 1548. This will be
  corrected in our future SW releases.
  
  Try to hack change N810 machine id in arch/arm/tools/mach-types from
  1548 to .
 
 Attached are some patches to boot N810 with current linux-omap kernel and
 mount root on the internal MMC. I'm currently booting to Debian sid
 created with debootstrap, but this should work for any distro.
 
 I also put up a page for it with more notes:
 
 http://www.muru.com/linux/n8x0/
 
 Only the first few patches are ready for merging, hopefully we can get
 all the attached hacks worked away soon..
 
 Tony
 

I've pushed the camera fix, bluetooth and mmc patches below  I've
updated the remaining hacks on my website.

Tony

 From 19e546ef60e84692e8c357e092a03365993e1552 Mon Sep 17 00:00:00 2001
 From: Tony Lindgren [EMAIL PROTECTED]
 Date: Mon, 28 Apr 2008 14:55:27 -0700
 Subject: [PATCH] V4L: Fix compile for 24xx camera
 
 Fix compile for 24xx camera
 
 Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
 ---
  drivers/media/video/omap/camera_core.c |2 +-
  drivers/media/video/omap24xxcam.c  |2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/media/video/omap/camera_core.c 
 b/drivers/media/video/omap/camera_core.c
 index dce47fc..eeedb36 100644
 --- a/drivers/media/video/omap/camera_core.c
 +++ b/drivers/media/video/omap/camera_core.c
 @@ -916,7 +916,7 @@ static int camera_core_open(struct inode *inode, struct 
 file *file)
   vidioc_int_g_fmt_cap(cam-sdev, format);
   spin_unlock(cam-img_lock);
  
 - videobuf_queue_pci_init(fh-vbq, cam-vbq_ops, NULL, cam-vbq_lock,
 + videobuf_queue_sg_init(fh-vbq, cam-vbq_ops, NULL, cam-vbq_lock,
   fh-type, V4L2_FIELD_NONE,
   sizeof(struct videobuf_buffer), fh);
  
 diff --git a/drivers/media/video/omap24xxcam.c 
 b/drivers/media/video/omap24xxcam.c
 index 4308fec..dfd3479 100644
 --- a/drivers/media/video/omap24xxcam.c
 +++ b/drivers/media/video/omap24xxcam.c
 @@ -1493,7 +1493,7 @@ static int omap24xxcam_open(struct inode *inode, struct 
 file *file)
  
   spin_lock_init(fh-vbq_lock);
  
 - videobuf_queue_pci_init(fh-vbq, omap24xxcam_vbq_ops, NULL,
 + videobuf_queue_sg_init(fh-vbq, omap24xxcam_vbq_ops, NULL,
   fh-vbq_lock, V4L2_BUF_TYPE_VIDEO_CAPTURE,
   V4L2_FIELD_NONE,
   sizeof(struct videobuf_buffer), fh);
 -- 
 1.5.3.6
 

 From 74c922e92ccaf702baf04eb72c93c25c4f4fea09 Mon Sep 17 00:00:00 2001
 From: Tony Lindgren [EMAIL PROTECTED]
 Date: Wed, 23 Apr 2008 16:39:36 -0700
 Subject: [PATCH] BT: Sync hcih4p with Nokia N810 driver and fix compile
 
 Sync hcih4p with kernel-source-rx-34-2.6.21.0 and fix compile.
 
 Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
 ---
  drivers/bluetooth/hci_h4p/core.c|   19 ---
  drivers/bluetooth/hci_h4p/hci_h4p.h |1 +
  drivers/bluetooth/hci_h4p/uart.c|   11 ++-
  3 files changed, 19 insertions(+), 12 deletions(-)
 
 diff --git a/drivers/bluetooth/hci_h4p/core.c 
 b/drivers/bluetooth/hci_h4p/core.c
 index 09c1f93..7fb5d12 100644
 --- a/drivers/bluetooth/hci_h4p/core.c
 +++ b/drivers/bluetooth/hci_h4p/core.c
 @@ -144,7 +144,7 @@ static void hci_h4p_enable_rx(struct hci_h4p_info *info)
   if (info-rx_pm_enabled) {
   hci_h4p_set_clk(info, info-rx_clocks_en, 1);
   hci_h4p_outb(info, UART_IER, hci_h4p_inb(info, UART_IER) | 
 UART_IER_RDI);
 - hci_h4p_set_auto_ctsrts(info, 1, UART_EFR_RTS);
 + __hci_h4p_set_auto_ctsrts(info, 1, UART_EFR_RTS);
   info-rx_pm_enabled = 0;
   }
   spin_unlock_irqrestore(info-lock, flags);
 @@ -157,7 +157,7 @@ static void hci_h4p_rx_pm_timer(unsigned long data)
  
   spin_lock_irqsave(info-lock, flags);
   if (!(hci_h4p_inb(info, UART_LSR)  UART_LSR_DR)) {
 - hci_h4p_set_auto_ctsrts(info, 0, UART_EFR_RTS);
 + __hci_h4p_set_auto_ctsrts(info, 0, UART_EFR_RTS);
   hci_h4p_set_rts(info, 0);
   hci_h4p_outb(info, UART_IER, hci_h4p_inb(info, UART_IER)  
 ~UART_IER_RDI);
   hci_h4p_set_clk(info, info-rx_clocks_en, 0);
 @@ -231,7 +231,6 @@ static void 

Re: linux-omap vs N810

2008-04-28 Thread Jarkko Nikula
On Mon, 28 Apr 2008 00:01:09 +0200 (CEST)
ext [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hello,
 I'm having a major problem running linux-omap kernel on Nokia N810.
 After correct build and flashing (tested by the use of self-built
 patched Nokia kernel) the device seems to hang before framebuffer
 initialization, then is rebooted by the watchdog. Manual FB update is
 disabled, I've checked the configuration in many possible ways.
 
 I'd like to hear about possible causes of that.
 
Most probably reason is development time machine id  passed by the
bootloader where linux-omap is using official id of 1548. This will be
corrected in our future SW releases.

Try to hack change N810 machine id in arch/arm/tools/mach-types from
1548 to .


Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: linux-omap vs N810

2008-04-28 Thread Tony Lindgren
Hi,

* Jarkko Nikula [EMAIL PROTECTED] [080427 23:26]:
 On Mon, 28 Apr 2008 00:01:09 +0200 (CEST)
 ext [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Hello,
  I'm having a major problem running linux-omap kernel on Nokia N810.
  After correct build and flashing (tested by the use of self-built
  patched Nokia kernel) the device seems to hang before framebuffer
  initialization, then is rebooted by the watchdog. Manual FB update is
  disabled, I've checked the configuration in many possible ways.
  
  I'd like to hear about possible causes of that.
  
 Most probably reason is development time machine id  passed by the
 bootloader where linux-omap is using official id of 1548. This will be
 corrected in our future SW releases.
 
 Try to hack change N810 machine id in arch/arm/tools/mach-types from
 1548 to .

Attached are some patches to boot N810 with current linux-omap kernel and
mount root on the internal MMC. I'm currently booting to Debian sid
created with debootstrap, but this should work for any distro.

I also put up a page for it with more notes:

http://www.muru.com/linux/n8x0/

Only the first few patches are ready for merging, hopefully we can get
all the attached hacks worked away soon..

Tony

From 19e546ef60e84692e8c357e092a03365993e1552 Mon Sep 17 00:00:00 2001
From: Tony Lindgren [EMAIL PROTECTED]
Date: Mon, 28 Apr 2008 14:55:27 -0700
Subject: [PATCH] V4L: Fix compile for 24xx camera

Fix compile for 24xx camera

Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
---
 drivers/media/video/omap/camera_core.c |2 +-
 drivers/media/video/omap24xxcam.c  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/omap/camera_core.c b/drivers/media/video/omap/camera_core.c
index dce47fc..eeedb36 100644
--- a/drivers/media/video/omap/camera_core.c
+++ b/drivers/media/video/omap/camera_core.c
@@ -916,7 +916,7 @@ static int camera_core_open(struct inode *inode, struct file *file)
 	vidioc_int_g_fmt_cap(cam-sdev, format);
 	spin_unlock(cam-img_lock);
 
-	videobuf_queue_pci_init(fh-vbq, cam-vbq_ops, NULL, cam-vbq_lock,
+	videobuf_queue_sg_init(fh-vbq, cam-vbq_ops, NULL, cam-vbq_lock,
 			fh-type, V4L2_FIELD_NONE,
 			sizeof(struct videobuf_buffer), fh);
 
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
index 4308fec..dfd3479 100644
--- a/drivers/media/video/omap24xxcam.c
+++ b/drivers/media/video/omap24xxcam.c
@@ -1493,7 +1493,7 @@ static int omap24xxcam_open(struct inode *inode, struct file *file)
 
 	spin_lock_init(fh-vbq_lock);
 
-	videobuf_queue_pci_init(fh-vbq, omap24xxcam_vbq_ops, NULL,
+	videobuf_queue_sg_init(fh-vbq, omap24xxcam_vbq_ops, NULL,
 fh-vbq_lock, V4L2_BUF_TYPE_VIDEO_CAPTURE,
 V4L2_FIELD_NONE,
 sizeof(struct videobuf_buffer), fh);
-- 
1.5.3.6

From 74c922e92ccaf702baf04eb72c93c25c4f4fea09 Mon Sep 17 00:00:00 2001
From: Tony Lindgren [EMAIL PROTECTED]
Date: Wed, 23 Apr 2008 16:39:36 -0700
Subject: [PATCH] BT: Sync hcih4p with Nokia N810 driver and fix compile

Sync hcih4p with kernel-source-rx-34-2.6.21.0 and fix compile.

Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
---
 drivers/bluetooth/hci_h4p/core.c|   19 ---
 drivers/bluetooth/hci_h4p/hci_h4p.h |1 +
 drivers/bluetooth/hci_h4p/uart.c|   11 ++-
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/drivers/bluetooth/hci_h4p/core.c b/drivers/bluetooth/hci_h4p/core.c
index 09c1f93..7fb5d12 100644
--- a/drivers/bluetooth/hci_h4p/core.c
+++ b/drivers/bluetooth/hci_h4p/core.c
@@ -144,7 +144,7 @@ static void hci_h4p_enable_rx(struct hci_h4p_info *info)
 	if (info-rx_pm_enabled) {
 		hci_h4p_set_clk(info, info-rx_clocks_en, 1);
 		hci_h4p_outb(info, UART_IER, hci_h4p_inb(info, UART_IER) | UART_IER_RDI);
-		hci_h4p_set_auto_ctsrts(info, 1, UART_EFR_RTS);
+		__hci_h4p_set_auto_ctsrts(info, 1, UART_EFR_RTS);
 		info-rx_pm_enabled = 0;
 	}
 	spin_unlock_irqrestore(info-lock, flags);
@@ -157,7 +157,7 @@ static void hci_h4p_rx_pm_timer(unsigned long data)
 
 	spin_lock_irqsave(info-lock, flags);
 	if (!(hci_h4p_inb(info, UART_LSR)  UART_LSR_DR)) {
-		hci_h4p_set_auto_ctsrts(info, 0, UART_EFR_RTS);
+		__hci_h4p_set_auto_ctsrts(info, 0, UART_EFR_RTS);
 		hci_h4p_set_rts(info, 0);
 		hci_h4p_outb(info, UART_IER, hci_h4p_inb(info, UART_IER)  ~UART_IER_RDI);
 		hci_h4p_set_clk(info, info-rx_clocks_en, 0);
@@ -231,7 +231,6 @@ static void hci_h4p_negotiation_packet(struct hci_h4p_info *info,
 			goto neg_ret;
 
 		hci_h4p_change_speed(info, MAX_BAUD_RATE);
-		hci_h4p_set_rts(info, 1);
 
 		err = hci_h4p_wait_for_cts(info, 1, 100);
 		if (err  0)
@@ -252,8 +251,8 @@ static void hci_h4p_negotiation_packet(struct hci_h4p_info *info,
 	return;
 
 neg_ret:
-	complete(info-init_completion);
 	info-init_error = err;
+	complete(info-init_completion);
 	kfree_skb(skb);
 }
 
@@ -511,7 +510,6 @@ static irqreturn_t hci_h4p_interrupt(int irq, void *data)
 		ret = IRQ_HANDLED;
 	}
 
-
 	return ret;
 }
 
@@ -545,7 +543,6 

linux-omap vs N810

2008-04-27 Thread astralstorm
Hello,
I'm having a major problem running linux-omap kernel on Nokia N810.
After correct build and flashing (tested by the use of self-built patched
Nokia kernel) the device seems to hang before framebuffer initialization,
then is rebooted by the watchdog. Manual FB update is disabled, I've
checked the configuration in many possible ways.

I'd like to hear about possible causes of that.

I do not have the serial console wired in (yet_, but would still like to
get debugging output. What would you recommend?


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: linux-omap vs N810

2008-04-27 Thread Igor Stoppa
On Mon, 2008-04-28 at 00:01 +0200, ext [EMAIL PROTECTED] wrote:
 Hello,
 I'm having a major problem running linux-omap kernel on Nokia N810.
 After correct build and flashing (tested by the use of self-built patched
 Nokia kernel) the device seems to hang before framebuffer initialization,
 then is rebooted by the watchdog. Manual FB update is disabled, I've
 checked the configuration in many possible ways.
 
 I'd like to hear about possible causes of that.
 
 I do not have the serial console wired in (yet_, but would still like to
 get debugging output. What would you recommend?

Do you have it in RD mode with no-lifeguard-reboots (check flasher
options)? If it's a reboot performed by the sw watchdog because some
component is crashing too many times, you could get a bit further in the
boot sequence, maybe to the point of ssh into the tablet.

-- 
Cheers, Igor

---

Igor Stoppa
Next Generation Software
Nokia Devices RD - Helsinki
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html