From: Thomas Cort Date: Mon, 17 Jun 2013 12:23:31 +0000 (-0400) Subject: clkconf: move clkconf from libgpio to it's own lib X-Git-Tag: v3.3.0~914 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=ba92d5219d3ca12987cae7749dd19475b4de68c0;p=minix.git clkconf: move clkconf from libgpio to it's own lib Clock configuration will be needed by other/future subsystems such as i2c. Extract the functionality from libgpio and put it into it's own library. Change-Id: I6f6de0b3fb4d305ddfeac74123b78c983d1318dd --- diff --git a/distrib/sets/lists/minix/md.evbarm b/distrib/sets/lists/minix/md.evbarm index 8b9113f1c..fab0b0f55 100644 --- a/distrib/sets/lists/minix/md.evbarm +++ b/distrib/sets/lists/minix/md.evbarm @@ -92,6 +92,8 @@ ./usr/include/evbarm/vmparam.h minix-sys ./usr/include/evbarm/wchar_limits.h minix-sys ./usr/include/i386 minix-sys obsolete +./usr/lib/libclkconf.a minix-sys +./usr/lib/libclkconf_pic.a minix-sys ./usr/lib/libgpio.a minix-sys ./usr/lib/libgpio_pic.a minix-sys ./usr/lib/libpadconf.a minix-sys diff --git a/distrib/sets/lists/minix/mi b/distrib/sets/lists/minix/mi index 6ffeb55a6..549c80ea6 100644 --- a/distrib/sets/lists/minix/mi +++ b/distrib/sets/lists/minix/mi @@ -625,6 +625,7 @@ ./usr/include/minix/btrace.h minix-sys ./usr/include/minix/callnr.h minix-sys ./usr/include/minix/chardriver.h minix-sys +./usr/include/minix/clkconf.h minix-sys ./usr/include/minix/com.h minix-sys ./usr/include/minix/compiler.h minix-sys ./usr/include/minix/config.h minix-sys diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 7cb5a9cc8..ceeef86a0 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -3,7 +3,7 @@ PROG= gpio SRCS= gpio.c DPADD+= ${LIBBLOCKDRIVER} ${LIBSYS} -LDADD+= -lvtreefs -lsys -lgpio -lpadconf +LDADD+= -lvtreefs -lsys -lgpio -lpadconf -lclkconf # # This is a system driver. diff --git a/include/minix/Makefile b/include/minix/Makefile index f52c0ce08..071d38770 100644 --- a/include/minix/Makefile +++ b/include/minix/Makefile @@ -6,7 +6,7 @@ INCS+= dirent.h paths.h param.h INCS+= acpi.h audio_fw.h bitmap.h \ bdev.h blockdriver.h blockdriver_mt.h \ btrace.h \ - callnr.h chardriver.h com.h compiler.h \ + callnr.h chardriver.h clkconf.h com.h compiler.h \ config.h const.h cpufeature.h crtso.h \ debug.h devio.h devman.h dmap.h \ driver.h drivers.h drvlib.h ds.h \ diff --git a/lib/libgpio/clkconf.h b/include/minix/clkconf.h similarity index 100% rename from lib/libgpio/clkconf.h rename to include/minix/clkconf.h diff --git a/lib/Makefile b/lib/Makefile index 40e4f4cb7..87b1179dc 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -54,7 +54,7 @@ SUBDIR += libvassert libhgfs libvboxfs libvirtio .endif .if (${MACHINE_ARCH} == "earm") -SUBDIR += libgpio libpadconf +SUBDIR += libclkconf libgpio libpadconf .endif .if (${MKRUMP} != "no") diff --git a/lib/libclkconf/Makefile b/lib/libclkconf/Makefile new file mode 100644 index 000000000..88ac3c3cc --- /dev/null +++ b/lib/libclkconf/Makefile @@ -0,0 +1,10 @@ +# Makefile for libclkconf + +CPPFLAGS+= -D_SYSTEM + +LIB= clkconf + +SRCS= \ + clkconf.c + +.include diff --git a/lib/libgpio/clkconf.c b/lib/libclkconf/clkconf.c similarity index 97% rename from lib/libgpio/clkconf.c rename to lib/libclkconf/clkconf.c index 7fb73cdfe..e830c07f2 100644 --- a/lib/libgpio/clkconf.c +++ b/lib/libclkconf/clkconf.c @@ -3,6 +3,7 @@ #include #include #include +#include /* system headers */ #include @@ -16,9 +17,6 @@ #include #include -/* local headers */ -#include "clkconf.h" - /* used for logging */ static struct log log = { .name = "omap_clkconf", diff --git a/lib/libgpio/Makefile b/lib/libgpio/Makefile index 8c5cb2be3..e60d45bd1 100644 --- a/lib/libgpio/Makefile +++ b/lib/libgpio/Makefile @@ -5,7 +5,7 @@ CPPFLAGS+= -D_SYSTEM LIB= gpio SRCS= \ - gpio_omap.c clkconf.c + gpio_omap.c WARNS?= 5 diff --git a/lib/libgpio/gpio_omap.c b/lib/libgpio/gpio_omap.c index dcfc10a29..22f73499c 100644 --- a/lib/libgpio/gpio_omap.c +++ b/lib/libgpio/gpio_omap.c @@ -4,6 +4,7 @@ #include #include #include +#include /* system headers */ #include @@ -17,8 +18,6 @@ #include #include -#include "clkconf.h" - /* local headers */ /* used for logging */