linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* flash_platform_data namespace collision
@ 2010-01-16  5:41 Matt Mackall
  2010-01-16  6:03 ` David Brownell
  2010-01-16 11:04 ` Russell King
  0 siblings, 2 replies; 5+ messages in thread
From: Matt Mackall @ 2010-01-16  5:41 UTC (permalink / raw)
  To: David Brownell, Russell King, David Woodhouse
  Cc: Linux Mailing List, linux-embedded

I've got a board here with SPI, NOR, and NAND flash devices and I've
just run into a namespace collision on flash_platform_data from

 include/spi/flash.h

and

 arch/arm/include/asm/mach/flash.h

And each appears to have a bunch of users.

-- 
http://selenic.com : development and support for Mercurial and Linux



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

* Re: flash_platform_data namespace collision
  2010-01-16  5:41 flash_platform_data namespace collision Matt Mackall
@ 2010-01-16  6:03 ` David Brownell
  2010-01-16 11:04 ` Russell King
  1 sibling, 0 replies; 5+ messages in thread
From: David Brownell @ 2010-01-16  6:03 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Russell King, David Woodhouse, Linux Mailing List, linux-embedded

On Friday 15 January 2010, Matt Mackall wrote:
> I've got a board here with SPI, NOR, and NAND flash devices and I've
> just run into a namespace collision on flash_platform_data from
> 
>  include/spi/flash.h
> 
> and
> 
>  arch/arm/include/asm/mach/flash.h
> 
> And each appears to have a bunch of users.

ISTR someone noting that before but omitting a patch.

You can do that one better.  :)

I think changing the SPI flash name will affect fewer platforms.

- Dave

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

* Re: flash_platform_data namespace collision
  2010-01-16  5:41 flash_platform_data namespace collision Matt Mackall
  2010-01-16  6:03 ` David Brownell
@ 2010-01-16 11:04 ` Russell King
  2010-01-16 17:47   ` Matt Mackall
  1 sibling, 1 reply; 5+ messages in thread
From: Russell King @ 2010-01-16 11:04 UTC (permalink / raw)
  To: Matt Mackall
  Cc: David Brownell, David Woodhouse, Linux Mailing List, linux-embedded

On Fri, Jan 15, 2010 at 11:41:15PM -0600, Matt Mackall wrote:
> I've got a board here with SPI, NOR, and NAND flash devices and I've
> just run into a namespace collision on flash_platform_data from

The one in arch/arm/include/asm/mach/flash.h is designed to have great
appeal and flexibility across different platforms, and indeed we have
at least 70 users across six different MTD NOR flash drivers and two
MTD NAND drivers.

If anything, I believe that this header should move into linux/mtd/
and become a standard structure for platforms to communicate their
requirements to flash drivers.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

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

* Re: flash_platform_data namespace collision
  2010-01-16 11:04 ` Russell King
@ 2010-01-16 17:47   ` Matt Mackall
  2010-01-16 19:23     ` David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Mackall @ 2010-01-16 17:47 UTC (permalink / raw)
  To: Russell King
  Cc: David Brownell, David Woodhouse, Linux Mailing List, linux-embedded

On Sat, 2010-01-16 at 11:04 +0000, Russell King wrote:
> On Fri, Jan 15, 2010 at 11:41:15PM -0600, Matt Mackall wrote:
> > I've got a board here with SPI, NOR, and NAND flash devices and I've
> > just run into a namespace collision on flash_platform_data from
> 
> The one in arch/arm/include/asm/mach/flash.h is designed to have great
> appeal and flexibility across different platforms, and indeed we have
> at least 70 users across six different MTD NOR flash drivers and two
> MTD NAND drivers.
> 
> If anything, I believe that this header should move into linux/mtd/
> and become a standard structure for platforms to communicate their
> requirements to flash drivers.

Yeah, I think this is probably the way to go. Davids, any objections?

-- 
http://selenic.com : development and support for Mercurial and Linux



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

* Re: flash_platform_data namespace collision
  2010-01-16 17:47   ` Matt Mackall
@ 2010-01-16 19:23     ` David Brownell
  0 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2010-01-16 19:23 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Russell King, David Woodhouse, Linux Mailing List, linux-embedded

On Saturday 16 January 2010, Matt Mackall wrote:
> On Sat, 2010-01-16 at 11:04 +0000, Russell King wrote:
> > On Fri, Jan 15, 2010 at 11:41:15PM -0600, Matt Mackall wrote:
> > > I've got a board here with SPI, NOR, and NAND flash devices and I've
> > > just run into a namespace collision on flash_platform_data from
> > 
> > The one in arch/arm/include/asm/mach/flash.h is designed to have great
> > appeal and flexibility across different platforms, and indeed we have
> > at least 70 users across six different MTD NOR flash drivers and two
> > MTD NAND drivers.

Yet it doesn't do what's needed for SPI flash (identify the chip type,
when it can't probed); and for that application none of those methods
are useful (and their slots are just wasted/confusing space).


> > If anything, I believe that this header should move into linux/mtd/
> > and become a standard structure for platforms to communicate their
> > requirements to flash drivers.
> 
> Yeah, I think this is probably the way to go. Davids, any objections?

I had similar thoughts when I first happened across that structure.

But such a move wouldn't resolve $SUBJECT ... which is IMO best addressed
by the obvious rename of the one to spi_flash_platform_data.

- dave

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

end of thread, other threads:[~2010-01-16 19:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-16  5:41 flash_platform_data namespace collision Matt Mackall
2010-01-16  6:03 ` David Brownell
2010-01-16 11:04 ` Russell King
2010-01-16 17:47   ` Matt Mackall
2010-01-16 19:23     ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).