Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 1/3] MIPS: lantiq: fixes external interruot sources
@ 2011-07-18 20:04 John Crispin
  2011-07-18 20:04 ` [PATCH 2/3] MIPS: lantiq: fix setting the PCI bus speed on AR9 John Crispin
  2011-07-18 20:04 ` [PATCH 3/3] MIPS: lantiq: set timeout in uart_port John Crispin
  0 siblings, 2 replies; 4+ messages in thread
From: John Crispin @ 2011-07-18 20:04 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: John Crispin, linux-mips

The irq base offset needs to be ignored when matching irqs to external
interrupt pins. Taking the offset into account resulted in the EIU not
being brought up properly.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
---
 arch/mips/lantiq/irq.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
index fc89795..f9737bb 100644
--- a/arch/mips/lantiq/irq.c
+++ b/arch/mips/lantiq/irq.c
@@ -123,11 +123,10 @@ void ltq_enable_irq(struct irq_data *d)
 static unsigned int ltq_startup_eiu_irq(struct irq_data *d)
 {
 	int i;
-	int irq_nr = d->irq - INT_NUM_IRQ0;
 
 	ltq_enable_irq(d);
 	for (i = 0; i < MAX_EIU; i++) {
-		if (irq_nr == ltq_eiu_irq[i]) {
+		if (d->irq == ltq_eiu_irq[i]) {
 			/* low level - we should really handle set_type */
 			ltq_eiu_w32(ltq_eiu_r32(LTQ_EIU_EXIN_C) |
 				(0x6 << (i * 4)), LTQ_EIU_EXIN_C);
@@ -147,11 +146,10 @@ static unsigned int ltq_startup_eiu_irq(struct irq_data *d)
 static void ltq_shutdown_eiu_irq(struct irq_data *d)
 {
 	int i;
-	int irq_nr = d->irq - INT_NUM_IRQ0;
 
 	ltq_disable_irq(d);
 	for (i = 0; i < MAX_EIU; i++) {
-		if (irq_nr == ltq_eiu_irq[i]) {
+		if (d->irq == ltq_eiu_irq[i]) {
 			/* disable */
 			ltq_eiu_w32(ltq_eiu_r32(LTQ_EIU_EXIN_INEN) & ~(1 << i),
 				LTQ_EIU_EXIN_INEN);
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] MIPS: lantiq: fix setting the PCI bus speed on AR9
  2011-07-18 20:04 [PATCH 1/3] MIPS: lantiq: fixes external interruot sources John Crispin
@ 2011-07-18 20:04 ` John Crispin
  2011-08-03 14:38   ` Ralf Baechle
  2011-07-18 20:04 ` [PATCH 3/3] MIPS: lantiq: set timeout in uart_port John Crispin
  1 sibling, 1 reply; 4+ messages in thread
From: John Crispin @ 2011-07-18 20:04 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: John Crispin, linux-mips

The bits used to set the PCI bus speed on AR9 are slightly different to those
used on Danube.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
---
 arch/mips/pci/pci-lantiq.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
index 603d749..8656388 100644
--- a/arch/mips/pci/pci-lantiq.c
+++ b/arch/mips/pci/pci-lantiq.c
@@ -171,8 +171,13 @@ static int __devinit ltq_pci_startup(struct ltq_pci_data *conf)
 	u32 temp_buffer;
 
 	/* set clock to 33Mhz */
-	ltq_cgu_w32(ltq_cgu_r32(LTQ_CGU_IFCCR) & ~0xf00000, LTQ_CGU_IFCCR);
-	ltq_cgu_w32(ltq_cgu_r32(LTQ_CGU_IFCCR) | 0x800000, LTQ_CGU_IFCCR);
+	if (ltq_is_ar9()) {
+		ltq_cgu_w32(ltq_cgu_r32(LTQ_CGU_IFCCR) & ~0x1f00000, LTQ_CGU_IFCCR);
+		ltq_cgu_w32(ltq_cgu_r32(LTQ_CGU_IFCCR) | 0xe00000, LTQ_CGU_IFCCR);
+	} else {
+		ltq_cgu_w32(ltq_cgu_r32(LTQ_CGU_IFCCR) & ~0xf00000, LTQ_CGU_IFCCR);
+		ltq_cgu_w32(ltq_cgu_r32(LTQ_CGU_IFCCR) | 0x800000, LTQ_CGU_IFCCR);
+	}
 
 	/* external or internal clock ? */
 	if (conf->clock) {
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] MIPS: lantiq: set timeout in uart_port
  2011-07-18 20:04 [PATCH 1/3] MIPS: lantiq: fixes external interruot sources John Crispin
  2011-07-18 20:04 ` [PATCH 2/3] MIPS: lantiq: fix setting the PCI bus speed on AR9 John Crispin
@ 2011-07-18 20:04 ` John Crispin
  1 sibling, 0 replies; 4+ messages in thread
From: John Crispin @ 2011-07-18 20:04 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: John Crispin, Thomas Langer, linux-mips, linux-serial

Without this patch apps using readline hang.

Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: linux-serial@vger.kernel.org
---
 drivers/tty/serial/lantiq.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index 58cf279..bc95f52 100644
--- a/drivers/tty/serial/lantiq.c
+++ b/drivers/tty/serial/lantiq.c
@@ -478,8 +478,10 @@ lqasc_set_termios(struct uart_port *port,
 	spin_unlock_irqrestore(&ltq_asc_lock, flags);
 
 	/* Don't rewrite B0 */
-        if (tty_termios_baud_rate(new))
+	if (tty_termios_baud_rate(new))
 		tty_termios_encode_baud_rate(new, baud, baud);
+
+	uart_update_timeout(port, cflag, baud);
 }
 
 static const char*
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/3] MIPS: lantiq: fix setting the PCI bus speed on AR9
  2011-07-18 20:04 ` [PATCH 2/3] MIPS: lantiq: fix setting the PCI bus speed on AR9 John Crispin
@ 2011-08-03 14:38   ` Ralf Baechle
  0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2011-08-03 14:38 UTC (permalink / raw)
  To: John Crispin; +Cc: linux-mips

Applied.  Thanks,

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-03 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-18 20:04 [PATCH 1/3] MIPS: lantiq: fixes external interruot sources John Crispin
2011-07-18 20:04 ` [PATCH 2/3] MIPS: lantiq: fix setting the PCI bus speed on AR9 John Crispin
2011-08-03 14:38   ` Ralf Baechle
2011-07-18 20:04 ` [PATCH 3/3] MIPS: lantiq: set timeout in uart_port John Crispin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox