Re: [PATCH, RFC] default machine descriptor for multiplatform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/31/2013 10:51 AM, Arnd Bergmann wrote:
> This is what I think it would look like to do a default platform
> with an empty machine descriptor on ARM. It makes the few required
> entries in the descriptor optional by using the new irqchip_init()
> and clocksource_of_init() functions as defaults, and adds
> a fallback for the DT case to customize_machine to probe all
> the default devices.
> 
> For the case that CONFIG_MULTIPLATFORM is enabled, it then
> adds a machine descriptor that never matches any machine but
> is used as a fallback if nothing else matches.

> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c

>  static int __init customize_machine(void)
>  {
> -	/* customizes platform devices, or adds new ones */
> +	/*
> +	 * customizes platform devices, or adds new ones
> +	 * On DT based machines, we fall back to populating the
> +	 * machine from the device tree, if no callback is provided,
> +	 * otherwise we would always need an init_machine callback.
> +	 */
>  	if (machine_desc->init_machine)
>  		machine_desc->init_machine();
> +	else
> +		of_platform_populate(NULL, of_default_bus_match_table,
> +					NULL, NULL);

With that change, we can remove the custom .init_machine() functions for
all of Tegra, since they just do that:-)

> diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c

> +#ifdef CONFIG_IRQCHIP
>  void __init irqchip_init(void)
>  {
>  	of_irq_init(__irqchip_begin);
>  }
> +#else
> +static inline void irqchip_init(void)
> +{
> +}
> +#endif

That'd need to go in a header file.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux