Re: [U-Boot] [PATCH 6/8] arm: mx6: novena: Pull GPIO definitions into header

2014-12-30 Thread Stefano Babic
On 16/12/2014 14:09, Marek Vasut wrote:
 Pull the definitions of GPIOs into a separate header file, so that
 they can be used across all source files.
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Igor Grinberg grinb...@compulab.co.il
 Cc: Nikita Kiryanov nik...@compulab.co.il
 Cc: Sean Cross x...@kosagi.com
 Cc: Simon Glass s...@chromium.org
 Cc: Stefano Babic sba...@denx.de
 Cc: Tim Harvey thar...@gateworks.com
 ---


Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 6/8] arm: mx6: novena: Pull GPIO definitions into header

2014-12-16 Thread Marek Vasut
Pull the definitions of GPIOs into a separate header file, so that
they can be used across all source files.

Signed-off-by: Marek Vasut ma...@denx.de
Cc: Igor Grinberg grinb...@compulab.co.il
Cc: Nikita Kiryanov nik...@compulab.co.il
Cc: Sean Cross x...@kosagi.com
Cc: Simon Glass s...@chromium.org
Cc: Stefano Babic sba...@denx.de
Cc: Tim Harvey thar...@gateworks.com
---
 board/kosagi/novena/novena.c |  6 ++
 board/kosagi/novena/novena.h | 23 +++
 board/kosagi/novena/novena_spl.c | 10 ++
 3 files changed, 27 insertions(+), 12 deletions(-)
 create mode 100644 board/kosagi/novena/novena.h

diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
index e303a57..5493e07 100644
--- a/board/kosagi/novena/novena.c
+++ b/board/kosagi/novena/novena.c
@@ -36,11 +36,9 @@
 #include power/pfuze100_pmic.h
 #include stdio_dev.h
 
-DECLARE_GLOBAL_DATA_PTR;
+#include novena.h
 
-#define NOVENA_BUTTON_GPIO IMX_GPIO_NR(4, 14)
-#define NOVENA_SD_WP   IMX_GPIO_NR(1, 2)
-#define NOVENA_SD_CD   IMX_GPIO_NR(1, 4)
+DECLARE_GLOBAL_DATA_PTR;
 
 /*
  * GPIO button
diff --git a/board/kosagi/novena/novena.h b/board/kosagi/novena/novena.h
new file mode 100644
index 000..6613ad4
--- /dev/null
+++ b/board/kosagi/novena/novena.h
@@ -0,0 +1,23 @@
+/*
+ * Novena board support
+ *
+ * Copyright (C) 2014 Marek Vasut ma...@denx.de
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef __BOARD_KOSAGI_NOVENA_NOVENA_H__
+#define __BOARD_KOSAGI_NOVENA_NOVENA_H__
+
+#define NOVENA_AUDIO_PWRON IMX_GPIO_NR(5, 17)
+#define NOVENA_BUTTON_GPIO IMX_GPIO_NR(4, 14)
+#define NOVENA_FPGA_RESET_N_GPIO   IMX_GPIO_NR(5, 7)
+#define NOVENA_HDMI_GHOST_HPD  IMX_GPIO_NR(5, 4)
+#define NOVENA_PCIE_DISABLE_GPIO   IMX_GPIO_NR(2, 16)
+#define NOVENA_PCIE_POWER_ON_GPIO  IMX_GPIO_NR(7, 12)
+#define NOVENA_PCIE_RESET_GPIO IMX_GPIO_NR(3, 29)
+#define NOVENA_PCIE_WAKE_UP_GPIO   IMX_GPIO_NR(3, 22)
+#define NOVENA_SD_CD   IMX_GPIO_NR(1, 4)
+#define NOVENA_SD_WP   IMX_GPIO_NR(1, 2)
+
+#endif /* __BOARD_KOSAGI_NOVENA_NOVENA_H__ */
diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
index c07735a..5ebc59b 100644
--- a/board/kosagi/novena/novena_spl.c
+++ b/board/kosagi/novena/novena_spl.c
@@ -25,6 +25,8 @@
 
 #include asm/arch/mx6-ddr.h
 
+#include novena.h
+
 DECLARE_GLOBAL_DATA_PTR;
 
 #define UART_PAD_CTRL  \
@@ -68,14 +70,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
 
-#define NOVENA_AUDIO_PWRON IMX_GPIO_NR(5, 17)
-#define NOVENA_FPGA_RESET_N_GPIO   IMX_GPIO_NR(5, 7)
-#define NOVENA_HDMI_GHOST_HPD  IMX_GPIO_NR(5, 4)
-#define NOVENA_PCIE_RESET_GPIO IMX_GPIO_NR(3, 29)
-#define NOVENA_PCIE_POWER_ON_GPIO  IMX_GPIO_NR(7, 12)
-#define NOVENA_PCIE_WAKE_UP_GPIO   IMX_GPIO_NR(3, 22)
-#define NOVENA_PCIE_DISABLE_GPIO   IMX_GPIO_NR(2, 16)
-
 /*
  * Audio
  */
-- 
2.1.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot