public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board
  2008-05-12  4:29 [PATCH 0/2] Try to make 8250 serial work on embedded platform Bryan Wu
@ 2008-05-12  4:29 ` Bryan Wu
  2008-05-12  9:54   ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Bryan Wu @ 2008-05-12  4:29 UTC (permalink / raw)
  To: akpm, alan; +Cc: linux-kernel, Javier Herrero, Bryan Wu, Bryan Wu

From: Javier Herrero <jherrero@hvsistemas.es>

Added support for 8250-class UARTs in HV Sistemas H8606 board,
modification in 8250.c driver for correct compilation with Blackfin

Besides, I think that there is more people using 8250-class UARTs
with a different hardware than the H8606 board. This code can be shared
by them.

Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 drivers/serial/8250.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index a1ca9b7..d171561 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1548,6 +1548,10 @@ static int serial_link_irq_chain(struct uart_8250_port *up)
 		i->head = &up->list;
 		spin_unlock_irq(&i->lock);
 
+#ifdef SERIAL_EXTRA_IRQ_FLAGS
+		irq_flags |= SERIAL_EXTRA_IRQ_FLAGS;
+#endif
+
 		ret = request_irq(up->port.irq, serial8250_interrupt,
 				  irq_flags, "serial", i);
 		if (ret < 0)
-- 
1.5.5

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

* Re: [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board
  2008-05-12  4:29 ` [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board Bryan Wu
@ 2008-05-12  9:54   ` Alan Cox
  2008-05-12 17:31     ` Javier Herrero
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2008-05-12  9:54 UTC (permalink / raw)
  To: Bryan Wu; +Cc: akpm, linux-kernel, Javier Herrero, Bryan Wu, Bryan Wu

>  
> +#ifdef SERIAL_EXTRA_IRQ_FLAGS
> +		irq_flags |= SERIAL_EXTRA_IRQ_FLAGS;
> +#endif
> +


We try and keep ifdefs out of code. It is also not clear what you would
do if you had a box where the extra flags depended on the port.

So two suggestions

Either

Add just the line

+		irq_flags |= SERIAL_EXTRA_IRQ_FLAGS;

and at the end of 8250.h do

#ifndef SERIAL_EXTRA_IRQ_FLAGS
#define SERIAL_EXTRA_IRQ_FLAGS			0
#endif

or the same but with an argument (unused for now)

SERIAL_EXTRA_IRQ_FLAGS(up)

Alan

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

* Re: [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board
  2008-05-12  9:54   ` Alan Cox
@ 2008-05-12 17:31     ` Javier Herrero
  0 siblings, 0 replies; 8+ messages in thread
From: Javier Herrero @ 2008-05-12 17:31 UTC (permalink / raw)
  To: Alan Cox; +Cc: Bryan Wu, akpm, linux-kernel, Bryan Wu

Hello, Alan,

Thans, I will redo the patch in the way you suggest, test it and resend.

Regards,

Javier

Alan Cox escribió:
>>  
>> +#ifdef SERIAL_EXTRA_IRQ_FLAGS
>> +		irq_flags |= SERIAL_EXTRA_IRQ_FLAGS;
>> +#endif
>> +
>
>
> We try and keep ifdefs out of code. It is also not clear what you would
> do if you had a box where the extra flags depended on the port.
>
> So two suggestions
>
> Either
>
> Add just the line
>
> +		irq_flags |= SERIAL_EXTRA_IRQ_FLAGS;
>
> and at the end of 8250.h do
>
> #ifndef SERIAL_EXTRA_IRQ_FLAGS
> #define SERIAL_EXTRA_IRQ_FLAGS			0
> #endif
>
> or the same but with an argument (unused for now)
>
> SERIAL_EXTRA_IRQ_FLAGS(up)
>
> Alan
>
>

-- 
------------------------------------------------------------------------
Javier Herrero                            EMAIL: jherrero@hvsistemas.com
HV Sistemas S.L.                          PHONE:         +34 949 336 806
Los Charcones, 17A                        FAX:           +34 949 336 792
19170 El Casar - Guadalajara - Spain      WEB: http://www.hvsistemas.com 


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

* [PATCH 0/2] Add irq extra flags to 8250 serial driver
@ 2008-05-13  4:14 Bryan Wu
  2008-05-13  4:14 ` [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board Bryan Wu
  2008-05-13  4:14 ` [PATCH 2/2] [Blackfin] serial driver: add extra IRQ flag for 8250 serial driver Bryan Wu
  0 siblings, 2 replies; 8+ messages in thread
From: Bryan Wu @ 2008-05-13  4:14 UTC (permalink / raw)
  To: alan, linux-kernel

Hi Alan,

Thanks Javier for updating this patch according to you review.
Do you think it is ok? If yes, I'd like to add these patches to
Blackfin git-tree and will invite linus to pull later.

-Bryan


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

* [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board
  2008-05-13  4:14 [PATCH 0/2] Add irq extra flags to 8250 serial driver Bryan Wu
@ 2008-05-13  4:14 ` Bryan Wu
  2008-05-13  9:50   ` Alan Cox
  2008-05-13  4:14 ` [PATCH 2/2] [Blackfin] serial driver: add extra IRQ flag for 8250 serial driver Bryan Wu
  1 sibling, 1 reply; 8+ messages in thread
From: Bryan Wu @ 2008-05-13  4:14 UTC (permalink / raw)
  To: alan, linux-kernel; +Cc: Javier Herrero, Bryan Wu

From: Javier Herrero <jherrero@hvsistemas.es>

Added support for 8250-class UARTs in HV Sistemas H8606 board,
modification in 8250.c driver for correct compilation with Blackfin

Besides, I think that there is more people using 8250-class UARTs
with a different hardware than the H8606 board. This code can be shared
by them.

Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 drivers/serial/8250.c |    5 +++--
 drivers/serial/8250.h |    5 +++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index a1ca9b7..1400ea6 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -43,6 +43,7 @@
 
 #include <asm/io.h>
 #include <asm/irq.h>
+#include <asm/serial.h>
 
 #include "8250.h"
 
@@ -92,8 +93,6 @@ static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS;
  */
 #define CONFIG_HUB6 1
 
-#include <asm/serial.h>
-
 /*
  * SERIAL_PORT_DFNS tells us about built-in ports that have no
  * standard enumeration mechanism.   Platforms that can find all
@@ -1548,6 +1547,8 @@ static int serial_link_irq_chain(struct uart_8250_port *up)
 		i->head = &up->list;
 		spin_unlock_irq(&i->lock);
 
+		irq_flags |= SERIAL_EXTRA_IRQ_FLAGS;
+
 		ret = request_irq(up->port.irq, serial8250_interrupt,
 				  irq_flags, "serial", i);
 		if (ret < 0)
diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h
index 91bd28f..a10a40c 100644
--- a/drivers/serial/8250.h
+++ b/drivers/serial/8250.h
@@ -78,3 +78,8 @@ struct serial8250_config {
 #else
 #define ALPHA_KLUDGE_MCR 0
 #endif
+
+#ifndef SERIAL_EXTRA_IRQ_FLAGS
+#define SERIAL_EXTRA_IRQ_FLAGS 0
+#endif
+
-- 
1.5.5

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

* [PATCH 2/2] [Blackfin] serial driver: add extra IRQ flag for 8250 serial driver
  2008-05-13  4:14 [PATCH 0/2] Add irq extra flags to 8250 serial driver Bryan Wu
  2008-05-13  4:14 ` [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board Bryan Wu
@ 2008-05-13  4:14 ` Bryan Wu
  1 sibling, 0 replies; 8+ messages in thread
From: Bryan Wu @ 2008-05-13  4:14 UTC (permalink / raw)
  To: alan, linux-kernel; +Cc: Javier Herrero, Bryan Wu

From: Javier Herrero <jherrero@hvsistemas.es>

Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 include/asm-blackfin/serial.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-blackfin/serial.h

diff --git a/include/asm-blackfin/serial.h b/include/asm-blackfin/serial.h
new file mode 100644
index 0000000..994dd86
--- /dev/null
+++ b/include/asm-blackfin/serial.h
@@ -0,0 +1,5 @@
+/*
+ * include/asm-blackfin/serial.h
+ */
+
+#define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH
-- 
1.5.5

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

* Re: [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board
  2008-05-13  4:14 ` [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board Bryan Wu
@ 2008-05-13  9:50   ` Alan Cox
  2008-05-13 10:23     ` Bryan Wu
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2008-05-13  9:50 UTC (permalink / raw)
  To: Bryan Wu; +Cc: linux-kernel, Javier Herrero, Bryan Wu

On Tue, 13 May 2008 12:14:28 +0800
Bryan Wu <cooloney@kernel.org> wrote:

> From: Javier Herrero <jherrero@hvsistemas.es>
> 
> Added support for 8250-class UARTs in HV Sistemas H8606 board,
> modification in 8250.c driver for correct compilation with Blackfin
> 
> Besides, I think that there is more people using 8250-class UARTs
> with a different hardware than the H8606 board. This code can be shared
> by them.
> 
> Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Signed-off-by: Bryan Wu <cooloney@kernel.org>

Acked-by: Alan Cox <alan@redhat.com>

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

* Re: [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board
  2008-05-13  9:50   ` Alan Cox
@ 2008-05-13 10:23     ` Bryan Wu
  0 siblings, 0 replies; 8+ messages in thread
From: Bryan Wu @ 2008-05-13 10:23 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, Javier Herrero

On Tue, May 13, 2008 at 5:50 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Tue, 13 May 2008 12:14:28 +0800
>  Bryan Wu <cooloney@kernel.org> wrote:
>
>  > From: Javier Herrero <jherrero@hvsistemas.es>
>  >
>  > Added support for 8250-class UARTs in HV Sistemas H8606 board,
>  > modification in 8250.c driver for correct compilation with Blackfin
>  >
>  > Besides, I think that there is more people using 8250-class UARTs
>  > with a different hardware than the H8606 board. This code can be shared
>  > by them.
>  >
>  > Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
>  > Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
>  > Signed-off-by: Bryan Wu <cooloney@kernel.org>
>
>  Acked-by: Alan Cox <alan@redhat.com>

Thanks, I will apply this patch to Blackfin git-tree

-Bryan

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

end of thread, other threads:[~2008-05-13 10:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13  4:14 [PATCH 0/2] Add irq extra flags to 8250 serial driver Bryan Wu
2008-05-13  4:14 ` [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board Bryan Wu
2008-05-13  9:50   ` Alan Cox
2008-05-13 10:23     ` Bryan Wu
2008-05-13  4:14 ` [PATCH 2/2] [Blackfin] serial driver: add extra IRQ flag for 8250 serial driver Bryan Wu
  -- strict thread matches above, loose matches on Subject: below --
2008-05-12  4:29 [PATCH 0/2] Try to make 8250 serial work on embedded platform Bryan Wu
2008-05-12  4:29 ` [PATCH 1/2] [8250 Serial Driver]: Added support for 8250-class UARTs in HV Sistemas H8606 board Bryan Wu
2008-05-12  9:54   ` Alan Cox
2008-05-12 17:31     ` Javier Herrero

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