mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/12] Blackfin arch GPIO updating
@ 2007-08-08  3:35 Bryan Wu
  2007-08-08  3:35 ` [PATCH 01/12] Blackfin arch: add peripheral resource allocation support Bryan Wu
                   ` (11 more replies)
  0 siblings, 12 replies; 30+ messages in thread
From: Bryan Wu @ 2007-08-08  3:35 UTC (permalink / raw)
  To: torvalds, linux-kernel, akpm; +Cc: dbrownell

As David mentioned, I send out these series patch to LKML for review.
These patches are related Blackfin arch GPIO updating, not big change at all.
I think it is OK for git-pull in -RC2 or later.

Thanks
- Bryan Wu


^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: [PATCH 02/12] Blackfin arch: Add label to call new GPIO API
@ 2007-08-17 20:25 Hennerich, Michael
  2007-08-17 21:29 ` David Brownell
  0 siblings, 1 reply; 30+ messages in thread
From: Hennerich, Michael @ 2007-08-17 20:25 UTC (permalink / raw)
  To: David Brownell, Mike Frysinger
  Cc: Bryan Wu, torvalds, linux-kernel, akpm, Michael Hennerich



>-----Original Message-----
>From: David Brownell [mailto:david-b@pacbell.net]
>
>On Friday 17 August 2007, Mike Frysinger wrote:
>> On 8/17/07, David Brownell <david-b@pacbell.net> wrote:
>> > ...
>> > Just for the record, this is an unusual way to use these calls.
>> >
>> > Other platforms completely decouple these issues from the
>> > IRQ infrastructure ... doing the pinmux and gpio claiming
>> > separately from the request_irq()/free_irq() paths, mostly
>> > as part of board setup.  Doing all of that "early":
>> >
>> >  - keeps those error returns from causing hard-to-track-down
>> >    runtime bugs;
>> >
>> >  - works always, even on platforms where a given IRQ may
>> >    appear on any of several pins/balls;
>> >
>> >  - makes it easier to cross-check against board schematics,
>> >    by keeping most board-specific setup in one source file;
>> >
>> >  - shrinks the kernel's runtime footprint;
>> >
>> >  - allows the label to be more descriptive ... describeing
>> >    exactly *which* IRQ, so that using the labels for better
>> >    diagnostics actually gives better diagnostics.
>> >
>> > Again, not "wrong"; but probably sub-optimal.  You might
>> > want to move towards earlier binding now, while Linux is
>> > still young on Blackfin and you don't have legacy code to
>> > worry about.
>>
>> in the Blackfin port, if you want to use a pin as an IRQ rather than
>> GPIO, you use the normal request_irq/free_irq API ... those functions
>> will call back into the proper GPIO/PORTMUX code so that the pin is
>> setup properly.  this is done so that code isnt duplicated across
>> files and so that we can easily detect if someone does something
>> incorrect like try to take the same pin and use it as
>> irq/gpio/whatever at the same time ...
>>
>> are you saying that other ports dont unify the backend code paths at
all
>?
>
>Some platforms try to "unify" the pin setup in the boot loader.
>Most of them cope with bogus bootloaders by doing it in the board
>setup code.
>
>I don't know of any who try to do it "late" as you summarized.
>
>See above why "late" unification is not necessarily as good as
>"early" unification.
>
>And then there's the OMAP1 example, where for example you might
>know that you want MPUIO-0 but that's insufficient to tell whether
>you must mux ball F18 or R13 ... so it's impossible to do the kind
>of "late" unification done here, and pinmux *MUST* be separate from
>IRQ setup.

Dave,

We are not talking about PIN routing. One physical PIN/BALL can only
have one dedicated function the same time. It's more about telling about
possible conflicts, on a development board level.

What Mike wants to point out is that a external IRQ is first a GPIO and
needs to be configured like an INPUT GPIO and then a specific bit needs
to be set unmask it as IRQ.

So why not use the GPIO infrastructure to setup this pin as GPIO?

-Michael  

  


>
>- Dave

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: [PATCH 02/12] Blackfin arch: Add label to call new GPIO API
@ 2007-08-17 22:02 Hennerich, Michael
  0 siblings, 0 replies; 30+ messages in thread
From: Hennerich, Michael @ 2007-08-17 22:02 UTC (permalink / raw)
  To: David Brownell, Hennerich, Michael
  Cc: Mike Frysinger, Bryan Wu, torvalds, linux-kernel, akpm



>-----Original Message-----
>From: David Brownell [mailto:david-b@pacbell.net]
>
>On Friday 17 August 2007, Hennerich, Michael wrote:
>> What Mike wants to point out is that a external IRQ is first a GPIO
and
>> needs to be configured like an INPUT GPIO and then a specific bit
needs
>> to be set unmask it as IRQ.
>>
>> So why not use the GPIO infrastructure to setup this pin as GPIO?
>
>My comments about the advantages of using that infrastructure
>for *early* binding captured the key points ... it's "failfast".
>
>For IRQs you're probably on decently firm ground, since it's
>extremely rare that people not handle request_irq() errors.
>
>Remember, I just pointed out that the "late fail" strategy
>is unusual.  That doesn't mean it's wrong ... just it'll be
>a bit of surprise, some cognitive dissonance to developers
>picking up a Blackfin project, potentially more error prone.
>

Dave,

Thanks - we really appreciate your feedback.
Please believe me - since a great while we have similar internal
discussion how we should handle these things.

Things need to be DAU proof.

We rather prefer having some verbal runtime messages, than having a
system that doesn't do what expected and being silent.
(The bootloader doesn't know what kernel modules are being loaded
requiring specific HW setup) 

We also don't fear the memory overhead (compared to the support
overhead), the runtime overhead is almost neglectable since these
functions are only called once, best case twice (module remove).

I see your points - I would prefer having a fix function board suiting
all our customers' needs - or something like an x86 system where
everything is fixed or dedicated and abstracted by IO/Memory and IRQ.

-Michael 

  


>- Dave

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

end of thread, other threads:[~2007-08-20  3:42 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-08  3:35 [PATCH 00/12] Blackfin arch GPIO updating Bryan Wu
2007-08-08  3:35 ` [PATCH 01/12] Blackfin arch: add peripheral resource allocation support Bryan Wu
2007-08-17 18:12   ` David Brownell
2007-08-08  3:35 ` [PATCH 02/12] Blackfin arch: Add label to call new GPIO API Bryan Wu
2007-08-17 18:24   ` David Brownell
2007-08-17 19:45     ` Mike Frysinger
2007-08-17 20:09       ` David Brownell
2007-08-17 20:19         ` Mike Frysinger
2007-08-17 20:21           ` Mike Frysinger
2007-08-17 21:15           ` David Brownell
2007-08-17 21:53     ` Robin Getz
2007-08-17 22:34       ` David Brownell
2007-08-18 19:07         ` Robin Getz
2007-08-19 21:54           ` David Brownell
2007-08-20  1:55             ` Robin Getz
2007-08-20  3:41               ` David Brownell
2007-08-08  3:35 ` [PATCH 03/12] Blackfin arch: fix PORT_J BUG for BF537/6 EMAC driver Bryan Wu
2007-08-08  3:35 ` [PATCH 04/12] Blackfin arch: Finalize the generic gpio support - add gpio_to_irq and irq_to_gpio Bryan Wu
2007-08-08  3:35 ` [PATCH 05/12] Blackfin arch: Advertise GENERIC_GPIO and remove duplicated GENERIC_CALIBRATE_DELAY Bryan Wu
2007-08-08  3:35 ` [PATCH 06/12] Blackfin arch: Add PORT_J.High (needed for BF548-EZkit Touchscreen interrupts) - remove PORT_C.H Bryan Wu
2007-08-08  3:35 ` [PATCH 07/12] Blackfin arch: bug fixing, add missing BF533_FAMILY GPIO_PFx definition Bryan Wu
2007-08-08  3:35 ` [PATCH 08/12] Blackfin arch: add missing gpio error handling to make sure we roll back requests in case one fails Bryan Wu
2007-08-08  3:35 ` [PATCH 09/12] Blackfin arch: scrub remaining ASSEMBLY usage since the switch to __ASSEMBLY__ Bryan Wu
2007-08-08  3:35 ` [PATCH 10/12] Blackfin arch: update platform driver resource information to the ezkitBF548 board file Bryan Wu
2007-08-08  3:35 ` [PATCH 11/12] Blackfin arch: after removing fs.h from mm.h, fix the broken on Blackfin arch Bryan Wu
2007-08-08  3:35 ` [PATCH 12/12] Blackfin serial driver: use new GPIO API Bryan Wu
2007-08-17 17:29   ` David Brownell
2007-08-17 20:25 [PATCH 02/12] Blackfin arch: Add label to call " Hennerich, Michael
2007-08-17 21:29 ` David Brownell
2007-08-17 22:02 Hennerich, Michael

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

Powered by JetHome