[PATCHv2 for soc 1/4] arm: socfpga: Add new device tree source for actual socfpga HW

Olof Johansson olof at lixom.net
Thu Jan 31 22:46:42 EST 2013


On Thu, Jan 31, 2013 at 11:05:40AM -0600, dinguyen at altera.com wrote:
> From: Dinh Nguyen <dinguyen at altera.com>
> 
> Up to this point, support for socfpga has only been on a virtual
> platform. Now that actual hardware is available, we add the appropriate
> device tree source files.
> 
> Signed-off-by: Dinh Nguyen <dinguyen at altera.com>
> Tested-by: Pavel Machek <pavel at denx.de>
> Reviewed-by: Pavel Machek <pavel at denx.de>
> Cc: Russell King <linux at arm.linux.org.uk>
> Cc: Arnd Bergmann <arnd at arndb.de>
> Cc: Olof Johansson <olof at lixom.net>

Are you planning on sending us a merge request, or do you want us to apply this
to a branch in arm-soc for you?

(Note comment below though)

> diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dts b/arch/arm/boot/dts/socfpga_cyclone5.dts
> index ab7e4a9..7ad3cc6 100644
> --- a/arch/arm/boot/dts/socfpga_cyclone5.dts
> +++ b/arch/arm/boot/dts/socfpga_cyclone5.dts
> @@ -20,7 +20,7 @@
>  
>  / {
>  	model = "Altera SOCFPGA Cyclone V";
> -	compatible = "altr,socfpga-cyclone5";
> +	compatible = "altr,socfpga-cyclone5", "altr,socfpga";
>  
>  	chosen {
>  		bootargs = "console=ttyS0,57600";

[...]

> diff --git a/arch/arm/boot/dts/socfpga_vt.dts b/arch/arm/boot/dts/socfpga_vt.dts
> new file mode 100644
> index 0000000..a0c6c65
> --- /dev/null
> +++ b/arch/arm/boot/dts/socfpga_vt.dts
[...]
> +
> +/ {
> +	model = "Altera SOCFPGA VT";
> +	compatible = "altr,socfpga-vt", "altr,socfpga";
> +
> +	chosen {
> +		bootargs = "console=ttyS0,57600";
> +	};
> +
[...]
> diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
> index 6732924..198f491 100644
> --- a/arch/arm/mach-socfpga/socfpga.c
> +++ b/arch/arm/mach-socfpga/socfpga.c
> @@ -99,6 +99,7 @@ static void __init socfpga_cyclone5_init(void)
>  static const char *altera_dt_match[] = {
>  	"altr,socfpga",
>  	"altr,socfpga-cyclone5",
> +	"altr,socfpga-vt",
>  	NULL
>  };

Since you have altr,socfpga in the compatible for the new board, you don't need
to add an explicit check for the more specific one here. Same for cyclone5, you
should even be able to remove that.


-Olof



More information about the linux-arm-kernel mailing list