All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] [orion] Move address map setup out of the drivers and into platform.
Date: Wed, 16 Nov 2011 17:49:55 +0100	[thread overview]
Message-ID: <20111116164955.GA18497@lunn.ch> (raw)
In-Reply-To: <alpine.LFD.2.02.1111160951060.3307@xanadu.home>

> > How would you suggest using IORESOURCE_BUS? 
> 
> Looking at it closer, I don't think simple resource ranges would be 
> suitable after all.
> 
> I would therefore suggest the following starting point:
> 
> diff --git a/include/linux/mbus.h b/include/linux/mbus.h
> index c11ff29325..2d8989c6e4 100644
> --- a/include/linux/mbus.h
> +++ b/include/linux/mbus.h
> @@ -32,5 +32,17 @@ struct mbus_dram_target_info
>  	} cs[4];
>  };
>  
> +/* 
> + * The Marvell mbus is to be found only on SOCs from the Orion family
> + * at the moment.  Provide a dummy stub for other architectures.
> + */
> +#ifdef CONFIG_PLAT_ORION
> +extern const struct mbus_dram_target_info *mrvl_mbus_dram_info(void);
> +#else
> +static inline const struct mbus_dram_target_info *mrvl_mbus_dram_info(void)
> +{
> +	return NULL;
> +}
> +#endif
>  
>  #endif
> 

So you are suggesting each mach-* implements this function and returns
its specific *_dram_target_info structure? Four functions which are
virtually identical. I would probably just have orion_dram_target_info
in the plat-orion which all mach-* use and one implementation of this
function in plat-oriom.

> However I still have doubts on the usefulness of this exercice.  There 
> are often more than just this mbus stuff to be found into platform data 
> structures anyway.  things like number of ports, PHY addresses, etc.  
> Eventually, those parameters should be retrieved from a device tree, and 
> probably the mbus parameters should be retrieved from there as well.  

I agree about ports, PHY addresses, etc. They are all a property of
the hardware, and belong in device tree. However the memory address of
*_dram_target_info does not belong in the device true. 

> Until then, I don't think we gain much from changing the existing 
> platform data method.

I'm just trying to move towards device tree. *_dram_target_info is one
thing which is blocking this move. The second maybe the clock
speed. It would be nice to move to clkdev, and remove clk from the
platform_data structures.

Do you see a better way to move toward device tree for orion?

   Andrew

  reply	other threads:[~2011-11-16 16:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-12 20:00 [PATCH 0/5] Move mbus setup code out of drivers and into platform Andrew Lunn
2011-11-12 20:00 ` [PATCH 1/5] [orion] Consolidate the address map setup on Orion based platforms Andrew Lunn
2011-11-12 20:00 ` [PATCH 2/5] [orion] Move the *_mbus_dram_info structure into the orion platform and call it orion_mbus_dram_info everywhere Andrew Lunn
2011-11-12 20:00 ` [PATCH 3/5] [orion] Move address map setup out of the drivers and into platform Andrew Lunn
2011-11-13 20:53   ` Michael Walle
2011-11-15  0:06   ` Nicolas Pitre
2011-11-15  7:41     ` Andrew Lunn
2011-11-15 22:14       ` Nicolas Pitre
2011-11-16  6:59         ` Andrew Lunn
2011-11-16 16:08           ` Nicolas Pitre
2011-11-16 16:49             ` Andrew Lunn [this message]
2011-11-16 17:18               ` Michael Walle
2011-11-16 17:25               ` Nicolas Pitre
2011-11-12 20:00 ` [PATCH 4/5] [orion] Remove address map info from all platform data strucutures Andrew Lunn
2011-11-12 20:00 ` [PATCH 5/5] [orion] Consolidate the address map setup code Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111116164955.GA18497@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.