diff mbox

[U-Boot,v7,1/4] gpio: Move common gpio.h to include/asm-generic

Message ID 1318391415-28474-1-git-send-email-joe.hershberger@ni.com
State Superseded
Delegated to: Kim Phillips
Headers show

Commit Message

Joe Hershberger Oct. 12, 2011, 3:50 a.m. UTC
Common GPIO API used by cmd_gpio should be available to any arch

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Kim Phillips <kim.phillips@freescale.com>
---
Changes for v4:
 - Split out of patch 1/2
Changes for v5:
 - Moved asm/arch/gpio.h include to asm/gpio.h
Changes for v6:
Changes for v7:

 arch/arm/include/asm/gpio.h     |   38 +-------------------------------------
 arch/powerpc/include/asm/gpio.h |    2 ++
 include/asm-generic/gpio.h      |   37 +++++++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 37 deletions(-)
 create mode 100644 arch/powerpc/include/asm/gpio.h
 create mode 100644 include/asm-generic/gpio.h

Comments

Laurence Withers Oct. 12, 2011, 3:55 p.m. UTC | #1
On Tue, Oct 11, 2011 at 10:50:12PM -0500, Joe Hershberger wrote:
> Common GPIO API used by cmd_gpio should be available to any arch
> 
> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
> Cc: Joe Hershberger <joe.hershberger@gmail.com>
> Cc: Kim Phillips <kim.phillips@freescale.com>

Tested-by: Laurence Withers <lwithers@guralp.com>

Bye for now,
Kim Phillips Nov. 3, 2011, 8:53 p.m. UTC | #2
On Wed, 12 Oct 2011 15:55:25 +0000
Laurence Withers <lwithers@guralp.com> wrote:

> On Tue, Oct 11, 2011 at 10:50:12PM -0500, Joe Hershberger wrote:
> > Common GPIO API used by cmd_gpio should be available to any arch
> > 
> > Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
> > Cc: Joe Hershberger <joe.hershberger@gmail.com>
> > Cc: Kim Phillips <kim.phillips@freescale.com>
> 
> Tested-by: Laurence Withers <lwithers@guralp.com>

the initial two patches in this patchseries conflict with upstream:

commit 9d2cb8e8e6a3650613eab95c1b30023e81beb15c
Author: Simon Glass <sjg@chromium.org>
Date:   Fri Oct 7 13:53:50 2011 +0000

    Add generic gpio.h in asm-generic

And if I try applying the latter two, I get this:

$ ./MAKEALL MPC8313ERDB_33
Configuring for MPC8313ERDB_33 - Board: MPC8313ERDB, Options: SYS_33MHZ
mpc83xx_gpio.c:25:22: fatal error: asm/gpio.h: No such file or directory
compilation terminated.
make[1]: *** No rule to make target `.depend', needed by `libgpio.o'.  Stop.
make: *** [drivers/gpio/libgpio.o] Error 2
make: *** Waiting for unfinished jobs....
cmd_gpio.c:12:22: fatal error: asm/gpio.h: No such file or directory
compilation terminated.
make[1]: *** No rule to make target `.depend', needed by `libcommon.o'.  Stop.
make[1]: *** Waiting for unfinished jobs....
make: *** [common/libcommon.o] Error 2
powerpc-linux-gnu-size: './u-boot': No such file

please rebase and resubmit.

Thanks,

Kim
diff mbox

Patch

diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index eb071d1..d49ad08 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -1,38 +1,2 @@ 
-/*
- * Copyright (c) 2011, NVIDIA Corp. All rights reserved.
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#ifndef _GPIO_H_
-#define _GPIO_H_
-
 #include <asm/arch/gpio.h>
-/*
- * Generic GPIO API
- */
-
-int gpio_request(int gp, const char *label);
-void gpio_free(int gp);
-void gpio_toggle_value(int gp);
-int gpio_direction_input(int gp);
-int gpio_direction_output(int gp, int value);
-int gpio_get_value(int gp);
-void gpio_set_value(int gp, int value);
-
-#endif	/* _GPIO_H_ */
+#include <asm-generic/gpio.h>
diff --git a/arch/powerpc/include/asm/gpio.h b/arch/powerpc/include/asm/gpio.h
new file mode 100644
index 0000000..d49ad08
--- /dev/null
+++ b/arch/powerpc/include/asm/gpio.h
@@ -0,0 +1,2 @@ 
+#include <asm/arch/gpio.h>
+#include <asm-generic/gpio.h>
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
new file mode 100644
index 0000000..57542ad
--- /dev/null
+++ b/include/asm-generic/gpio.h
@@ -0,0 +1,37 @@ 
+/*
+ * Copyright (c) 2011, NVIDIA Corp. All rights reserved.
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _GPIO_H_
+#define _GPIO_H_
+
+/*
+ * Generic GPIO API
+ */
+
+int gpio_request(int gp, const char *label);
+void gpio_free(int gp);
+void gpio_toggle_value(int gp);
+int gpio_direction_input(int gp);
+int gpio_direction_output(int gp, int value);
+int gpio_get_value(int gp);
+void gpio_set_value(int gp, int value);
+
+#endif	/* _GPIO_H_ */