public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Try to make 8250 serial work on embedded platform
@ 2008-05-12  4:29 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  4:29 ` [PATCH 2/2] [Blackfin] serial driver: add extra IRQ flag for 8250 serial driver Bryan Wu
  0 siblings, 2 replies; 5+ messages in thread
From: Bryan Wu @ 2008-05-12  4:29 UTC (permalink / raw)
  To: akpm, alan; +Cc: linux-kernel

Hi Alan and Andrew,

How do you think of this patch set?

>From Javier:
Without the first, the 8250-class UART does not work with the Blackfin,
and without the second, you get a compilation error if you activate
8250 UARTs. Besides, I think that there is more people using 8250-class
UARTs with a different hardware than the H8606 board.

Thanks
-Bryan


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

* [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
  2008-05-12  4:29 ` [PATCH 2/2] [Blackfin] serial driver: add extra IRQ flag for 8250 serial driver Bryan Wu
  1 sibling, 1 reply; 5+ 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] 5+ messages in thread

* [PATCH 2/2] [Blackfin] serial driver: add extra IRQ flag for 8250 serial driver
  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  4:29 ` Bryan Wu
  1 sibling, 0 replies; 5+ 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>

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>
---
 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ messages in thread

end of thread, other threads:[~2008-05-12 17:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-05-12  4:29 ` [PATCH 2/2] [Blackfin] serial driver: add extra IRQ flag for 8250 serial driver Bryan Wu

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