summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:02:14 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:02:14 +0200
commitb2c5310d4da56237571bb8ea8d24b030c941030f (patch)
treec2c39f8c1ebdad8c3e69af86cb3c105434212edd /lib
parentfda840672d0eb662ddf4c7080532fe2dfeb0b0b1 (diff)
downloadbarebox-b2c5310d4da56237571bb8ea8d24b030c941030f.tar.gz
barebox-b2c5310d4da56237571bb8ea8d24b030c941030f.tar.xz
svn_rev_653
restructure tree, add reginfo command
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig8
-rw-r--r--lib/Makefile1
-rw-r--r--lib/global.c35
-rw-r--r--lib/misc.c28
-rw-r--r--lib/parameter.c2
5 files changed, 2 insertions, 72 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index ac86758786..2cbef7b7d0 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -7,13 +7,5 @@ config BZLIB
config CRC32
bool
-config DYNAMIC_CRC_TABLE
- bool
- prompt "Generate the crc32 table dynamically"
- default y
- help
- Saying yes to this option saves around 800 bytes of binary size.
- If unsure say yes.
-
config CRC16
bool
diff --git a/lib/Makefile b/lib/Makefile
index 3e11016668..13aa1ce8d9 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -7,7 +7,6 @@ obj-y += div64.o
obj-y += misc.o
obj-y += driver.o
obj-y += parameter.o
-obj-y += global.o
obj-y += xfuncs.o
obj-y += getopt.o
obj-y += readkey.o
diff --git a/lib/global.c b/lib/global.c
deleted file mode 100644
index 2d7544b8fd..0000000000
--- a/lib/global.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <common.h>
-#include <command.h>
-#include <init.h>
-#include <driver.h>
-#include <malloc.h>
-#include <errno.h>
-
-static struct device_d global_dev;
-
-int global_add_param(struct param_d *param)
-{
- return dev_add_param(&global_dev, param);
-}
-
-static struct device_d global_dev = {
- .name = "global",
- .id = "env",
- .map_base = 0,
- .size = 0,
-};
-
-static struct driver_d global_driver = {
- .name = "global",
- .probe = dummy_probe,
-};
-
-static int global_init(void)
-{
- register_device(&global_dev);
- register_driver(&global_driver);
- return 0;
-}
-
-coredevice_initcall(global_init);
-
diff --git a/lib/misc.c b/lib/misc.c
index 5a7a72cd58..5ba9a0bbfa 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -1,36 +1,8 @@
#include <common.h>
-#include <command.h>
-#include <driver.h>
-#include <init.h>
#include <malloc.h>
-#include <linux/ctype.h>
#include <errno.h>
#include <fs.h>
-#include <net.h>
-
-int cmd_get_data_size(char* arg, int default_size)
-{
- /* Check for a size specification .b, .w or .l.
- */
- int len = strlen(arg);
- if (len > 2 && arg[len-2] == '.') {
- switch(arg[len-1]) {
- case 'b':
- return 1;
- case 'w':
- return 2;
- case 'l':
- return 4;
- case 's':
- return -2;
- default:
- return -1;
- }
- }
- return default_size;
-}
-
unsigned long strtoul_suffix(const char *str, char **endp, int base)
{
diff --git a/lib/parameter.c b/lib/parameter.c
index a2490d4ac2..bf5d87ecf5 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -33,6 +33,7 @@ const char *dev_get_param(struct device_d *dev, const char *name)
return param->value;
}
+#ifdef CONFIG_NET
IPaddr_t dev_get_param_ip(struct device_d *dev, char *name)
{
return string_to_ip(dev_get_param(dev, name));
@@ -45,6 +46,7 @@ int dev_set_param_ip(struct device_d *dev, char *name, IPaddr_t ip)
return dev_set_param(dev, name, ipstr);
}
+#endif
int dev_set_param(struct device_d *dev, const char *name, const char *val)
{