From: nm@ti.com (Menon, Nishanth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2] davinci: da850: move input frequency to board specific files
Date: Sat, 28 May 2011 02:55:48 -0700 [thread overview]
Message-ID: <BANLkTik2ouNyibS=_s=8t5yRFrEX+tF07A@mail.gmail.com> (raw)
In-Reply-To: <1306488053-27978-1-git-send-email-christian.riesch@omicron.at>
On Fri, May 27, 2011 at 02:20, Christian Riesch
<christian.riesch@omicron.at> wrote:
> From: Bob Dunlop <bob.dunlop@xyzzy.org.uk>
>
> Currently the input frequency of the SoC is hardcoded in the SoC specific
> da850.c file to 24 MHz. Since the SoC accepts input frequencies in a wide
> range from 12 to 50 MHz, boards with different oscillator/crystal
> frequencies may be built.
>
> This patch allows setting a different input frequency in the board
> specific files to support boards with oscillator/crystal frequencies other
> than 24 MHz.
Curious question: have you considered Documentation/power/opp.txt? Not
entirely sure if that will help, but I am curious to know if there are
reasons why it did not scale for you
Regards,
Nishanth Menon
>
> Signed-off-by: Bob Dunlop <bob.dunlop@xyzzy.org.uk>
> Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
> ---
>
> Hi,
> in private email Bob Dunlop suggested to pass a pointer to a small
> structure instead of the frequency value to allow future expansions,
> e.g., for the OPP list. Therefore I submit his patch as V2.
> Christian
>
> ?arch/arm/mach-davinci/board-da850-evm.c ? ? | ? ?2 +-
> ?arch/arm/mach-davinci/board-mityomapl138.c ?| ? ?2 +-
> ?arch/arm/mach-davinci/board-omapl138-hawk.c | ? ?2 +-
> ?arch/arm/mach-davinci/da850.c ? ? ? ? ? ? ? | ? ?5 ++++-
> ?arch/arm/mach-davinci/include/mach/da8xx.h ?| ? ?6 +++++-
> ?5 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
> index a7b41bf..231ff87 100644
> --- a/arch/arm/mach-davinci/board-da850-evm.c
> +++ b/arch/arm/mach-davinci/board-da850-evm.c
> @@ -1252,7 +1252,7 @@ console_initcall(da850_evm_console_init);
>
> ?static void __init da850_evm_map_io(void)
> ?{
> - ? ? ? da850_init();
> + ? ? ? da850_init(NULL);
> ?}
>
> ?MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM")
> diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
> index 606a6f2..362770c 100644
> --- a/arch/arm/mach-davinci/board-mityomapl138.c
> +++ b/arch/arm/mach-davinci/board-mityomapl138.c
> @@ -561,7 +561,7 @@ console_initcall(mityomapl138_console_init);
>
> ?static void __init mityomapl138_map_io(void)
> ?{
> - ? ? ? da850_init();
> + ? ? ? da850_init(NULL);
> ?}
>
> ?MACHINE_START(MITYOMAPL138, "MityDSP-L138/MityARM-1808")
> diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
> index 67c38d0..c43a6c3 100644
> --- a/arch/arm/mach-davinci/board-omapl138-hawk.c
> +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
> @@ -334,7 +334,7 @@ console_initcall(omapl138_hawk_console_init);
>
> ?static void __init omapl138_hawk_map_io(void)
> ?{
> - ? ? ? da850_init();
> + ? ? ? da850_init(NULL);
> ?}
>
> ?MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard")
> diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
> index 133aac4..ebd0603 100644
> --- a/arch/arm/mach-davinci/da850.c
> +++ b/arch/arm/mach-davinci/da850.c
> @@ -1104,10 +1104,13 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
> ? ? ? ?.reset_device ? ? ? ? ? = &da8xx_wdt_device,
> ?};
>
> -void __init da850_init(void)
> +void __init da850_init(struct da850_init_board_info *board)
> ?{
> ? ? ? ?unsigned int v;
>
> + ? ? ? if (board && board->ref_clk_rate)
> + ? ? ? ? ? ? ? ref_clk.rate = board->ref_clk_rate;
> +
> ? ? ? ?davinci_common_init(&davinci_soc_info_da850);
>
> ? ? ? ?da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
> diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
> index ad64da7..66efc5d 100644
> --- a/arch/arm/mach-davinci/include/mach/da8xx.h
> +++ b/arch/arm/mach-davinci/include/mach/da8xx.h
> @@ -69,8 +69,12 @@ extern unsigned int da850_max_speed;
> ?#define DA8XX_AEMIF_CTL_BASE ? 0x68000000
> ?#define DA8XX_ARM_RAM_BASE ? ? 0xffff0000
>
> +struct da850_init_board_info {
> + ? ? ? unsigned long ref_clk_rate;
> +};
> +
> ?void __init da830_init(void);
> -void __init da850_init(void);
> +void __init da850_init(struct da850_init_board_info *board);
>
> ?int da830_register_edma(struct edma_rsv_info *rsv);
> ?int da850_register_edma(struct edma_rsv_info *rsv[2]);
> --
> 1.7.0.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
next prev parent reply other threads:[~2011-05-28 9:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 8:37 [PATCH] davinci: da850: move input frequency to board specific files Christian Riesch
2011-05-27 9:20 ` [PATCH V2] " Christian Riesch
2011-05-28 9:55 ` Menon, Nishanth [this message]
2011-05-30 8:23 ` Christian Riesch
2011-06-01 17:15 ` Nori, Sekhar
2011-06-06 22:44 ` Kevin Hilman
2011-06-07 10:39 ` Nori, Sekhar
2011-06-07 16:23 ` Kevin Hilman
2011-06-08 12:08 ` Nori, Sekhar
2011-06-14 15:33 ` Nori, Sekhar
2011-06-14 17:39 ` [PATCH] davinci: da850: add a .set_rate method to ref_clk Christian Riesch
2011-06-28 11:23 ` Nori, Sekhar
2011-06-28 15:10 ` [PATCH v2] " Christian Riesch
2011-07-06 16:36 ` Nori, Sekhar
2011-06-16 15:06 ` [PATCH V2] davinci: da850: move input frequency to board specific files Kevin Hilman
2011-06-09 10:05 ` Christian Riesch
2011-06-09 16:48 ` Nori, Sekhar
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='BANLkTik2ouNyibS=_s=8t5yRFrEX+tF07A@mail.gmail.com' \
--to=nm@ti.com \
--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 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).