[PATCH v3 5/8] arm: shmobile: Add the RZ/N1 arch to the shmobile Kconfig

2018-03-29 Thread Michel Pollet
Add the RZ/N1 Family (Part #R9A06G0xx) ARCH config to the rest of
the Renesas SoC collection.

Signed-off-by: Michel Pollet 
Reviewed-by: Geert Uytterhoeven 
---
 arch/arm/mach-shmobile/Kconfig | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 280e731..221fbcb 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -110,6 +110,11 @@ config ARCH_R8A7794
bool "R-Car E2 (R8A77940)"
select ARCH_RCAR_GEN2
 
+config ARCH_RZN1
+   bool "RZ/N1 (R9A06G0xx) Family"
+   select ARM_AMBA
+   select CPU_V7
+
 config ARCH_SH73A0
bool "SH-Mobile AG5 (R8A73A00)"
select ARCH_RMOBILE
-- 
2.7.4



Re: [PATCH v3 5/8] arm: shmobile: Add the RZ/N1 arch to the shmobile Kconfig

2018-03-30 Thread Simon Horman
On Thu, Mar 29, 2018 at 08:47:01AM +0100, Michel Pollet wrote:
> Add the RZ/N1 Family (Part #R9A06G0xx) ARCH config to the rest of
> the Renesas SoC collection.
> 
> Signed-off-by: Michel Pollet 
> Reviewed-by: Geert Uytterhoeven 

Thanks, applied.


Re: [PATCH v3 5/8] arm: shmobile: Add the RZ/N1 arch to the shmobile Kconfig

2018-03-30 Thread kbuild test robot
Hi Michel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on renesas/devel]
[also build test ERROR on v4.16-rc7 next-20180329]
[cannot apply to robh/for-next power-supply/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Michel-Pollet/arm-Base-support-for-Renesas-RZN1D-DB-Board/20180330-103029
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git devel
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm 

All error/warnings (new ones prefixed by >>):

   drivers/power/reset/rzn1-reboot.c: In function 'rzn1_reboot_probe':
>> drivers/power/reset/rzn1-reboot.c:70:2: warning: this 'if' clause does not 
>> guard... [-Wmisleading-indentation]
 if (!parent || !parent->of_node)
 ^~
   drivers/power/reset/rzn1-reboot.c:72:3: note: ...this statement, but the 
latter is misleadingly indented as if it were guarded by the 'if'
  return -ENODEV;
  ^~
   drivers/power/reset/rzn1-reboot.c:66:6: warning: unused variable 'err' 
[-Wunused-variable]
 int err;
 ^~~
   drivers/power/reset/rzn1-reboot.c: At top level:
>> drivers/power/reset/rzn1-reboot.c:74:2: warning: data definition has no type 
>> or storage class
 sysctrl = syscon_node_to_regmap(parent->of_node);
 ^~~
>> drivers/power/reset/rzn1-reboot.c:74:2: error: type defaults to 'int' in 
>> declaration of 'sysctrl' [-Werror=implicit-int]
>> drivers/power/reset/rzn1-reboot.c:74:2: error: conflicting types for 
>> 'sysctrl'
   drivers/power/reset/rzn1-reboot.c:37:23: note: previous declaration of 
'sysctrl' was here
static struct regmap *sysctrl;
  ^~~
>> drivers/power/reset/rzn1-reboot.c:74:34: error: 'parent' undeclared here 
>> (not in a function); did you mean 'pte_t'?
 sysctrl = syscon_node_to_regmap(parent->of_node);
 ^~
 pte_t
>> drivers/power/reset/rzn1-reboot.c:75:2: error: expected identifier or '(' 
>> before 'if'
 if (IS_ERR(sysctrl)) {
 ^~
   drivers/power/reset/rzn1-reboot.c:79:2: warning: data definition has no type 
or storage class
 err = register_restart_handler(&rzn1_reboot_nb);
 ^~~
>> drivers/power/reset/rzn1-reboot.c:79:2: error: type defaults to 'int' in 
>> declaration of 'err' [-Werror=implicit-int]
>> drivers/power/reset/rzn1-reboot.c:79:8: error: initializer element is not 
>> constant
 err = register_restart_handler(&rzn1_reboot_nb);
   ^~~~
   drivers/power/reset/rzn1-reboot.c:80:2: error: expected identifier or '(' 
before 'if'
 if (err) {
 ^~
>> drivers/power/reset/rzn1-reboot.c:85:2: error: expected identifier or '(' 
>> before 'return'
 return err;
 ^~
>> drivers/power/reset/rzn1-reboot.c:86:1: error: expected identifier or '(' 
>> before '}' token
}
^
   cc1: some warnings being treated as errors

vim +74 drivers/power/reset/rzn1-reboot.c

a673cd20 Michel Pollet 2018-03-29  63  
a673cd20 Michel Pollet 2018-03-29  64  static int rzn1_reboot_probe(struct 
platform_device *pdev)
a673cd20 Michel Pollet 2018-03-29  65  {
a673cd20 Michel Pollet 2018-03-29 @66   int err;
a673cd20 Michel Pollet 2018-03-29  67   struct device *parent;
a673cd20 Michel Pollet 2018-03-29  68  
a673cd20 Michel Pollet 2018-03-29  69   parent = pdev->dev.parent;
a673cd20 Michel Pollet 2018-03-29 @70   if (!parent || !parent->of_node)
a673cd20 Michel Pollet 2018-03-29  71   dev_err(&pdev->dev, "couldn't 
find sysctrl node\n");
a673cd20 Michel Pollet 2018-03-29 @72   return -ENODEV;
a673cd20 Michel Pollet 2018-03-29  73   }
a673cd20 Michel Pollet 2018-03-29 @74   sysctrl = 
syscon_node_to_regmap(parent->of_node);
a673cd20 Michel Pollet 2018-03-29 @75   if (IS_ERR(sysctrl)) {
a673cd20 Michel Pollet 2018-03-29  76   dev_err(&pdev->dev, "couldn't 
find find regmap\n");
a673cd20 Michel Pollet 2018-03-29  77   return PTR_ERR(sysctrl);
a673cd20 Michel Pollet 2018-03-29  78   }
a673cd20 Michel Pollet 2018-03-29 @79   err = 
register_restart_handler(&rzn1_reboot_nb);
a673cd20 Michel Pollet 2018-03-29  80   if (err) {
a673cd20 Michel Pollet 2018-03-29  81   dev_err(&pdev->dev, "register 
restart handler failed(err=%d)\n",
a673cd20 Michel Pollet 2018-03-29  82   err);
a673cd20 Michel Pollet 2018-03-29  83   }
a673cd20 Michel Pollet 2018-03-29  84  
a673cd20 Michel Pollet 2018-03-29 @85   return err;
a673cd20 Michel Pollet 2018-03-29 @86  }
a673cd20 Michel Pollet 2018-03-29  87  

:: The code at line 74 was first introduced by commit
:: a673cd202aba192