Re: [PATCH] gpio: dwapb: enable for ARC

From: Alexey Brodkin
Date: Thu Apr 09 2015 - 03:51:18 EST

On Wed, 2015-04-08 at 17:03 +-0200, Linus Walleij wrote:
+AD4- On Tue, Mar 31, 2015 at 10:30 AM, Alexey Brodkin
+AD4- wrote:
+AD4- +AD4- From: Vineet Gupta
+AD4- +AD4-
+AD4- +AD4- Synopsys SDP platform uses DW GPIO controller in design with
+AD4- +AD4- ARC cores. So adding ARC to architectures that may select this
+AD4- +AD4- GPIO controller.
+AD4- +AD4-
+AD4- +AD4- Even though support for Synopsys SDP is yet to be submitted we'll need
+AD4- +AD4- this tiny option enabled at least for properly working interrupts (DW
+AD4- +AD4- GPIO controller is used as interrupt controller).
+AD4- +AD4-
+AD4- +AD4- Signed-off-by: Vineet Gupta
+AD4- +AD4- Signed-off-by: Alexey Brodkin
+AD4- +AD4- Cc: Andy Shevchenko
+AD4- +AD4- Cc: Linus Walleij
+AD4- Patch applied.
+AD4- But ...
+AD4- +AD4- - depends on ((ARM +AHwAfA- ARM64) +ACYAJg- OF+AF8-GPIO) +AHwAfA- X86+AF8-INTEL+AF8-QUARK
+AD4- +AD4- +- depends on ((ARC +AHwAfA- ARM +AHwAfA- ARM64) +ACYAJg- OF+AF8-GPIO) +AHwAfA- X86+AF8-INTEL+AF8-QUARK
+AD4- This is getting a bit silly. What stops us from actually just enabling
+AD4- it for any architecture?

Agree. That looks like nonsense now.
Origin of arch-limitation is

gpio: dwapb: fix compile errors
Whereas the DWAPB driver does not really depend on the ARM
architecture, it uses +AFs-readl+AHw-writel+AF0AXw-relaxed() not found on
arch such as Blackfin, so restrict this to ARM until there is
another architecture that can make use of it.

It is also using the of+AF8-node of the gpiochip, so fix this
too by requiring OF+AF8-GPIO.

All error/warnings:

make.cross ARCH+AD0-blackfin
drivers/gpio/gpio-dwapb.c: In function 'dwapb+AF8-irq+AF8-handler':
drivers/gpio/gpio-dwapb.c:91:2: error: implicit declaration of function
'readl+AF8-relaxed' +AFs--Werror+AD0-implicit-function-declaration+AF0-
drivers/gpio/gpio-dwapb.c: In function 'dwapb+AF8-configure+AF8-irqs':
drivers/gpio/gpio-dwapb.c:212:32: error: 'struct gpio+AF8-chip' has no
member named 'of+AF8-node'
drivers/gpio/gpio-dwapb.c:221:16: error: 'struct gpio+AF8-chip' has no
member named 'of+AF8-node'
drivers/gpio/gpio-dwapb.c: In function 'dwapb+AF8-gpio+AF8-add+AF8-port':
drivers/gpio/gpio-dwapb.c:331:14: error: 'struct gpio+AF8-chip' has no
member named 'of+AF8-node'
cc1: some warnings being treated as errors

Probably better fix is to make dwgpio depend on +ACE-BLACKFIN because we
know it won't be built for it. If there're other arches that don't
define +AFs-readl+AHw-writel+AF0AXw-relaxed() we may add them as well.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at