[RFC PATCHv1 3/5] arm: mach-kirkwood: seperate PCIe window init from other windows

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Thu Mar 28 05:35:34 EST 2013


On Wed, Mar 27, 2013 at 07:05:02PM +0100, Thomas Petazzoni wrote:

This all looks really great to me, I hope to try it as well when I get
time. But just one small suggestion:

> diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
> index ea49476..1b4675f 100644
> +++ b/arch/arm/mach-kirkwood/board-dt.c
> @@ -72,6 +72,8 @@ static void __init kirkwood_of_clk_init(void)
>  
>  static void __init kirkwood_dt_init(void)
>  {
> +	int needs_pcie_wins = 1;
> +
>  	pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
>  
>  	/*
> @@ -144,6 +146,9 @@ static void __init kirkwood_dt_init(void)
>  	if (of_machine_is_compatible("usi,topkick"))
>  		usi_topkick_init();
>  
> +	if (needs_pcie_wins)
> +		kirkwood_setup_pcie_wins();
> +
>  	of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
>  }

Moving the window setup into mach-kirkwood/pcie.c:kirkwood_pcie_init
would avoid this needs_pcie_wins thing since kirkwood_pcie_init will
naturally never be called once the other patches are applied.

Cheers,
Jason


More information about the devicetree-discuss mailing list