diff mbox

[U-Boot,1/2] mpc85xx gpio related header files changes to compile common cmd_gpio.c

Message ID 5515A11E.5010202@arcturusnetworks.com
State Superseded
Delegated to: York Sun
Headers show

Commit Message

Oleksandr G Zhadan March 27, 2015, 6:27 p.m. UTC
Hi York,

I add explanation and re-send the same patch.

On 03/26/2015 05:20 PM, York Sun wrote:
>
>
> On 03/26/2015 02:16 PM, Oleksandr G Zhadan wrote:
>> From: Oleksandr Zhadan <oleks@arcturusnetworks.com>
>
> Please add commit message to explain why and what you are changing.
>
>>
>> Signed-off-by: Oleksandr Zhadan <oleks@arcturusnetworks.com>
>> Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
>> ---
>
> If you resend the same patch, please add a comment under the --- line.
> If you make a new version, please add change log.
>
> York
>
>
From: Oleksandr Zhadan <oleks@arcturusnetworks.com>

1. Fix Incompatibility in functions gpio_free() and gpio_set_value() 
definitions between <asm/gpio.h> and <asm-generic/gpio.h> (void vs int)

2. Fix Compilation error when build common/cmd_gpio.c for mpc85xx (p1020)

Signed-off-by: Oleksandr Zhadan <oleks@arcturusnetworks.com>
Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
---

  arch/powerpc/include/asm/arch-mpc85xx/gpio.h |    2 ++
  arch/powerpc/include/asm/mpc85xx_gpio.h      |    6 ++++--
  2 files changed, 6 insertions(+), 2 deletions(-)

  static inline int gpio_direction_input(unsigned gpio)
@@ -97,12 +98,13 @@ static inline int gpio_get_value(unsigned gpio)
      return !!mpc85xx_gpio_get(1U << gpio);
  }

-static inline void gpio_set_value(unsigned gpio, int value)
+static inline int gpio_set_value(unsigned gpio, int value)
  {
      if (value)
          mpc85xx_gpio_set_high(1U << gpio);
      else
          mpc85xx_gpio_set_low(1U << gpio);
+    return 0;
  }

  static inline int gpio_is_valid(int gpio)

Comments

York Sun March 27, 2015, 6:44 p.m. UTC | #1
On 03/27/2015 11:27 AM, Oleksandr G Zhadan wrote:
> Hi York,
> 
> I add explanation and re-send the same patch.


Whenever you make changes to the patch, please add a change log under the ---
line. Please also see my comments on previous patch sent 5 minutes before this.

York
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h 
b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h
index 8beed30..71794a8 100644
--- a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h
+++ b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h
@@ -12,4 +12,6 @@ 
  #ifndef __ASM_ARCH_MX85XX_GPIO_H
  #define __ASM_ARCH_MX85XX_GPIO_H

+#include <asm/mpc85xx_gpio.h>
+
  #endif
diff --git a/arch/powerpc/include/asm/mpc85xx_gpio.h 
b/arch/powerpc/include/asm/mpc85xx_gpio.h
index 87bb4a0..1d0dad4 100644
--- a/arch/powerpc/include/asm/mpc85xx_gpio.h
+++ b/arch/powerpc/include/asm/mpc85xx_gpio.h
@@ -72,9 +72,10 @@  static inline int gpio_request(unsigned gpio, const 
char *label)
      return 0;
  }

-static inline void gpio_free(unsigned gpio)
+static inline int gpio_free(unsigned gpio)
  {
      /* Compatibility shim */
+    return 0;
  }