xen: arm: platforms: Remove determining reset specific values from dts for XGENE.
PATCH 1/1 xen: arm: platforms: Remove determining reset specific values from dts for XGENE.
This patch removes reading reset specific values (address, size and mask) from dts and uses values defined in the code now.
This is because currently xgene reset driver (submitted in linux) is going through a change (which is not yet accepted), this new driver has a new type of dts bindings for reset.
Hence till linux driver comes to some conclusion, we will use hardcoded values instead of reading from dts so that xen code will not break due to the linux transition.
Ref:
http://lists.xen.org/archives/html/xen-devel/2014-01/msg02256.html
http://www.gossamer-threads.com/lists/linux/kernel/1845585
--- xen/arch/arm/platforms/xgene-storm.c | 43 +++++++++------------------------- 1 file changed, 11 insertions(+), 32 deletions(-)
xen/arch/arm/platforms/xgene-storm.c +11 -32
@@ -25,6 +25,11 @@#include <asm/io.h> #include <asm/gic.h> +/* XGENE RESET Specific defines */ +#define XGENE_RESET_ADDR 0x17000014UL +#define XGENE_RESET_SIZE 0x100 +#define XGENE_RESET_MASK 0x1 +/* Variables to save reset address of soc during platform initialization. */ static u64 reset_addr, reset_size;static u32 reset_mask;
@@ -141,38 +146,12 @@ static void xgene_storm_reset(void)static int xgene_storm_init (void ) { -static const struct dt_device_match reset_ids[]__initconst = - { -DT_MATCH_COMPATIBLE ("apm,xgene-reboot" ), - {}, - }; -struct dt_device_node *dev; -int res; - - dev =dt_find_matching_node (NULL , reset_ids); -if ( !dev ) - { -printk ("XGENE: Unable to find a compatible reset node in the device tree" ); -return 0 ; - } - -dt_device_set_used_by (dev,DOMID_XEN ); - -/* Retrieve base address and size */ - res =dt_device_get_address (dev,0 , &reset_addr, &reset_size); -if ( res ) - { -printk ("XGENE: Unable to retrieve the base address for reset\n" ); -return 0 ; - } - -/* Get reset mask */ - res =dt_property_read_u32 (dev,"mask" , &reset_mask); -if ( !res ) - { -printk ("XGENE: Unable to retrieve the reset mask\n" ); -return 0 ; - } +/* TBD: Once Linux side device tree bindings are finalized retrieve +* these values from dts. +*/ + reset_addr =XGENE_RESET_ADDR ; + reset_size =XGENE_RESET_SIZE ; + reset_mask =XGENE_RESET_MASK ; reset_vals_valid = true;return 0 ;
Signature · 1 line
1.7.9.5
Quoted 8 lines · Pranavkumar Sawargaonkar
This patch removes reading reset specific values (address, size and mask) from dts and uses values defined in the code now.
This is because currently xgene reset driver (submitted in linux) is going through a change (which is not yet accepted), this new driver has a new type of dts bindings for reset.
Hence till linux driver comes to some conclusion, we will use hardcoded values instead of reading from dts so that xen code will not break due to the linux transition.
Quoted 6 lines
Ref:
http://lists.xen.org/archives/html/xen-devel/2014-01/msg02256.html
http://www.gossamer-threads.com/lists/linux/kernel/1845585Signed-off-by Pranavkumar Sawargaonkar <[email protected]>Signed-off-by Anup Patel <[email protected]>
George -- I'd like to take this into 4.4 to avoid shipping a Xen which relies on an unagreed DTS binding (which is an ABI of sorts).
Ian.
Quoted 65 lines
--- xen/arch/arm/platforms/xgene-storm.c | 43 +++++++++------------------------- 1 file changed, 11 insertions(+), 32 deletions(-)xen/arch/arm/platforms/xgene-storm.c +11
-32@@ -25,6 +25,11 @@#include <asm/io.h> #include <asm/gic.h> +/* XGENE RESET Specific defines */ +#define XGENE_RESET_ADDR 0x17000014UL +#define XGENE_RESET_SIZE 0x100 +#define XGENE_RESET_MASK 0x1 +/* Variables to save reset address of soc during platform initialization. */ static u64 reset_addr, reset_size;static u32 reset_mask;@@ -141,38 +146,12 @@ static void xgene_storm_reset(void)static int xgene_storm_init (void ) { -static const struct dt_device_match reset_ids[]__initconst = - { -DT_MATCH_COMPATIBLE ("apm,xgene-reboot" ), - {}, - }; -struct dt_device_node *dev; -int res; - - dev =dt_find_matching_node (NULL , reset_ids); -if ( !dev ) - { -printk ("XGENE: Unable to find a compatible reset node in the device tree" ); -return 0 ; - } - -dt_device_set_used_by (dev,DOMID_XEN ); - -/* Retrieve base address and size */ - res =dt_device_get_address (dev,0 , &reset_addr, &reset_size); -if ( res ) - { -printk ("XGENE: Unable to retrieve the base address for reset\n" ); -return 0 ; - } - -/* Get reset mask */ - res =dt_property_read_u32 (dev,"mask" , &reset_mask); -if ( !res ) - { -printk ("XGENE: Unable to retrieve the reset mask\n" ); -return 0 ; - } +/* TBD: Once Linux side device tree bindings are finalized retrieve +* these values from dts. +*/ + reset_addr =XGENE_RESET_ADDR ; + reset_size =XGENE_RESET_SIZE ; + reset_mask =XGENE_RESET_MASK ; reset_vals_valid = true;return 0 ;
Quoted 13 lines · Ian Campbell
Quoted 12 lines · Pranavkumar Sawargaonkar
This patch removes reading reset specific values (address, size and mask) from dts and uses values defined in the code now.
This is because currently xgene reset driver (submitted in linux) is going through a change (which is not yet accepted), this new driver has a new type of dts bindings for reset.
Hence till linux driver comes to some conclusion, we will use hardcoded values instead of reading from dts so that xen code will not break due to the linux transition.Ref:
http://lists.xen.org/archives/html/xen-devel/2014-01/msg02256.html
http://www.gossamer-threads.com/lists/linux/kernel/1845585
Quoted 6 lines
Quoted 2 lines
Signed-off-by Pranavkumar Sawargaonkar <[email protected]>Signed-off-by Anup Patel <[email protected]>Acked-by Ian Campbell <[email protected]>George -- I'd like to take this into 4.4 to avoid shipping a Xen which relies on an unagreed DTS binding (which is an ABI of sorts).
Is this the reboot binging one with 3 options, #2 of which was hard-code the values rather than using DT?
Assuming so:
Quoted 16 lines · George Dunlap
Quoted 15 lines · Ian Campbell
Quoted 14 lines · Pranavkumar Sawargaonkar
This patch removes reading reset specific values (address, size and mask) from dts and uses values defined in the code now.
This is because currently xgene reset driver (submitted in linux) is going through a change (which is not yet accepted), this new driver has a new type of dts bindings for reset.
Hence till linux driver comes to some conclusion, we will use hardcoded values instead of reading from dts so that xen code will not break due to the linux transition.Ref:
http://lists.xen.org/archives/html/xen-devel/2014-01/msg02256.html
http://www.gossamer-threads.com/lists/linux/kernel/1845585Signed-off-by Pranavkumar Sawargaonkar <[email protected]>Signed-off-by Anup Patel <[email protected]>
Quoted 7 lines
Quoted 4 lines
Acked-by Ian Campbell <[email protected]>George -- I'd like to take this into 4.4 to avoid shipping a Xen which relies on an unagreed DTS binding (which is an ABI of sorts).
Is this the reboot binging one with 3 options, #2 of which was hard-code the values rather than using DT?
Yes.
Quoted 3 lines
Assuming so:
Release-acked-by George Dunlap <[email protected]>
Thanks.
Ian Campbell
AppliedQuoted 21 lines · George Dunlap
Quoted 13 lines · Ian Campbell
Quoted 12 lines · Pranavkumar Sawargaonkar
This patch removes reading reset specific values (address, size and mask) from dts and uses values defined in the code now.
This is because currently xgene reset driver (submitted in linux) is going through a change (which is not yet accepted), this new driver has a new type of dts bindings for reset.
Hence till linux driver comes to some conclusion, we will use hardcoded values instead of reading from dts so that xen code will not break due to the linux transition.Ref:
http://lists.xen.org/archives/html/xen-devel/2014-01/msg02256.html
http://www.gossamer-threads.com/lists/linux/kernel/1845585Quoted 6 lines
Quoted 2 lines
Signed-off-by Pranavkumar Sawargaonkar <[email protected]>Signed-off-by Anup Patel <[email protected]>Acked-by Ian Campbell <[email protected]>George -- I'd like to take this into 4.4 to avoid shipping a Xen which relies on an unagreed DTS binding (which is an ABI of sorts).
Quoted 6 lines
Is this the reboot binging one with 3 options, #2 of which was hard-code the values rather than using DT?
Assuming so:
Release-acked-by George Dunlap <[email protected]>
Applied, thanks all.
I reflowed the commit message to make it fit in 80 columns.