[PATCH] bsp/gen5200: Fix i2c.h and i2cdrv.h installation

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jan 19 14:33:51 UTC 2018


Install these files only as <bsp/i2c.h> and <bsp/i2cdrv.h>.

Update #3254.
---
 c/src/lib/libbsp/powerpc/gen5200/Makefile.am       | 3 +--
 c/src/lib/libbsp/powerpc/gen5200/i2c/i2cdrv.c      | 4 ++--
 c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.c | 2 +-
 c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.h | 2 +-
 c/src/lib/libbsp/powerpc/gen5200/include/bsp.h     | 2 +-
 c/src/lib/libbsp/powerpc/gen5200/preinstall.am     | 8 --------
 c/src/lib/libbsp/powerpc/gen5200/tod/pcf8563.c     | 2 +-
 c/src/lib/libbsp/powerpc/gen5200/tod/todcfg.c      | 2 +-
 8 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/gen5200/Makefile.am b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am
index 3110518f21..88e8d5191b 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am
@@ -12,8 +12,7 @@ include_bestcomm_task_apidir = $(include_bestcommdir)/task_api
 
 dist_project_lib_DATA = bsp_specs
 
-include_HEADERS = include/bsp.h include/i2cdrv.h \
-    include/i2c.h
+include_HEADERS = include/bsp.h
 include_HEADERS += include/tm27.h
 
 nodist_include_HEADERS = include/bspopts.h
diff --git a/c/src/lib/libbsp/powerpc/gen5200/i2c/i2cdrv.c b/c/src/lib/libbsp/powerpc/gen5200/i2c/i2cdrv.c
index 17ba342812..2c20b3dbdc 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/i2c/i2cdrv.c
+++ b/c/src/lib/libbsp/powerpc/gen5200/i2c/i2cdrv.c
@@ -36,11 +36,11 @@
  */
 
 #include <bsp.h>
+#include <bsp/i2c.h>
+#include <bsp/i2cdrv.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "../include/i2c.h"
-#include "../include/i2cdrv.h"
 #include "mpc5200mbus.h"
 
 #ifndef I2C_NUMBER_OF_BUSES
diff --git a/c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.c b/c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.c
index d0202062cf..aa926bc8d9 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.c
+++ b/c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.c
@@ -33,7 +33,7 @@
 #include "../i2c/mpc5200mbus.h"
 #include <bsp/mpc5200.h>
 #include <bsp/irq.h>
-#include <i2c.h>
+#include <bsp/i2c.h>
 
 /* Events of I2C machine */
 typedef enum i2c_event {
diff --git a/c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.h b/c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.h
index fb3c214d60..e68b564e2f 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.h
+++ b/c/src/lib/libbsp/powerpc/gen5200/i2c/mpc5200mbus.h
@@ -35,7 +35,7 @@
 #define __MPC5200BSP_MPC5200MBUS_H__
 
 #include <bsp/mpc5200.h>
-#include <i2c.h>
+#include <bsp/i2c.h>
 
 
 /* States of I2C machine */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h b/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h
index 77bb19702e..40ac1116c5 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h
@@ -142,7 +142,7 @@ LINKER_SYMBOL(MBAR);
 #ifndef ASM
 
 #include <rtems.h>
-#include <i2cdrv.h>
+#include <bsp/i2cdrv.h>
 #include <bsp/irq.h>
 #include <bsp/vectors.h>
 #include <bsp/u-boot.h>
diff --git a/c/src/lib/libbsp/powerpc/gen5200/preinstall.am b/c/src/lib/libbsp/powerpc/gen5200/preinstall.am
index b6b203150d..73c986eacc 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/preinstall.am
+++ b/c/src/lib/libbsp/powerpc/gen5200/preinstall.am
@@ -61,14 +61,6 @@ $(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
 
-$(PROJECT_INCLUDE)/i2cdrv.h: include/i2cdrv.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i2cdrv.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/i2cdrv.h
-
-$(PROJECT_INCLUDE)/i2c.h: include/i2c.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i2c.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/i2c.h
-
 $(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
diff --git a/c/src/lib/libbsp/powerpc/gen5200/tod/pcf8563.c b/c/src/lib/libbsp/powerpc/gen5200/tod/pcf8563.c
index e15d47adf4..eb3d758f80 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/tod/pcf8563.c
+++ b/c/src/lib/libbsp/powerpc/gen5200/tod/pcf8563.c
@@ -42,10 +42,10 @@
 
 #include <rtems.h>
 #include <bsp/fatal.h>
+#include <bsp/i2c.h>
 #include <libchip/rtc.h>
 #include <string.h>
 #include "../tod/pcf8563.h"
-#include "../include/i2c.h"
 
 /* Convert from/to Binary-Coded Decimal representation */
 #define From_BCD( _x ) ((((_x) >> 4) * 10) + ((_x) & 0x0F))
diff --git a/c/src/lib/libbsp/powerpc/gen5200/tod/todcfg.c b/c/src/lib/libbsp/powerpc/gen5200/tod/todcfg.c
index 2120fa3362..6db222b7f0 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/tod/todcfg.c
+++ b/c/src/lib/libbsp/powerpc/gen5200/tod/todcfg.c
@@ -33,7 +33,7 @@
  */
 
 #include <bsp.h>
-#include "../include/i2c.h"
+#include <bsp/i2c.h>
 #include <libchip/rtc.h>
 #include "../tod/pcf8563.h"
 
-- 
2.12.3



More information about the devel mailing list