From 54c6977e9ca41fb38b45f1746d90f2806be3b5cb Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 13 Jun 2010 01:45:10 +0200 Subject: Add qsort - add support for sorting data arrays Code adapted from uClibc-0.9.30.3 Signed-off-by: Wolfgang Denk --- include/common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index 6a79ec2aad..2f85d12db0 100644 --- a/include/common.h +++ b/include/common.h @@ -631,6 +631,10 @@ static inline IPaddr_t getenv_IPaddr (char *var) return (string_to_ip(getenv(var))); } +/* lib/qsort.c */ +void qsort(void *base, size_t nmemb, size_t size, + int(*compar)(const void *, const void *)); + /* lib/time.c */ void udelay (unsigned long); -- cgit v1.2.1 From 6d014adfa2ac4b1151d2b80a6943f59c3e254239 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 20 Jun 2010 16:03:45 +0200 Subject: Remove support for CONFIG_HAS_UID and "forceenv" command This (undocumented) concept was only in use for the MVSMR and davinci_schmoogie Sergey Kubushyn boards. Drop it for now. If really needed, it should be reimplemented later in the context of the new environment command set. Signed-off-by: Wolfgang Denk Cc: Andre Schwarz Cc: Sergey Kubushyn Acked-by: Sergey Kubushyn --- include/common.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index 2f85d12db0..7e647e64a7 100644 --- a/include/common.h +++ b/include/common.h @@ -262,9 +262,6 @@ int saveenv (void); int inline setenv (char *, char *); #else int setenv (char *, char *); -#ifdef CONFIG_HAS_UID -void forceenv (char *, char *); -#endif #endif /* CONFIG_PPC */ #ifdef CONFIG_ARM # include -- cgit v1.2.1 From 3fbeeea63334f7a69406be7c05185f4bf45da8d8 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Fri, 17 Sep 2010 13:10:34 +0200 Subject: common: move TOTAL_MALLOC_LEN to include/common.h Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher --- include/common.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index 7e647e64a7..cc966722ea 100644 --- a/include/common.h +++ b/include/common.h @@ -189,6 +189,15 @@ typedef void (interrupt_handler_t)(void *); #define MIN(x, y) min(x, y) #define MAX(x, y) max(x, y) +#if defined(CONFIG_ENV_IS_EMBEDDED) +#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN +#elif ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \ + (CONFIG_ENV_ADDR >= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) ) || \ + defined(CONFIG_ENV_IS_IN_NVRAM) +#define TOTAL_MALLOC_LEN (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE) +#else +#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN +#endif /** * container_of - cast a member of a structure out to the containing structure -- cgit v1.2.1 From b36df561154bdd0a41bb77e09c5575ca2cf48013 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 9 Sep 2010 19:18:00 +0200 Subject: ppc4xx: Move ppc4xx headers to powerpc include directory This patch moves some ppc4xx related headers from the common include directory (include/) to the powerpc specific one (arch/powerpc/include/asm/). This way to common include directory is not so cluttered with files. Signed-off-by: Stefan Roese --- include/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index cc966722ea..2151597b2b 100644 --- a/include/common.h +++ b/include/common.h @@ -96,7 +96,7 @@ typedef volatile unsigned char vu_char; #include #endif #ifdef CONFIG_4xx -#include +#include #endif #ifdef CONFIG_HYMOD #include -- cgit v1.2.1 From 550650ddd0fde00f245bc3da72d7272844198394 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 20 Sep 2010 16:05:31 +0200 Subject: ppc4xx: Use common NS16550 driver for PPC4xx UART This patch removes the PPC4xx UART driver. Instead the common NS16550 driver is used, since all PPC4xx SoC's use this peripheral device. The file 4xx_uart.c now only implements the UART clock calculation function which also sets the SoC internal UART divisors. All PPC4xx board config headers are changed to use this common NS16550 driver now. Tested on these boards: acadia, canyonlands, katmai, kilauea, sequoia, zeus Signed-off-by: Stefan Roese --- include/common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index 2151597b2b..d6182275d4 100644 --- a/include/common.h +++ b/include/common.h @@ -535,6 +535,7 @@ ulong get_PERCLK2(void); ulong get_PERCLK3(void); #endif ulong get_bus_freq (ulong); +int get_serial_clock(void); #if defined(CONFIG_MPC85xx) typedef MPC85xx_SYS_INFO sys_info_t; -- cgit v1.2.1 From 24956642ef7de5d8340683d721113f993ffaa0a8 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Wed, 15 Sep 2010 09:33:25 +0200 Subject: Remove unused CONFIG_SERIAL_SOFTWARE_FIFO feature This patch removes the completely unused CONFIG_SERIAL_SOFTWARE_FIFO feature from U-Boot. It has only been implemented for PPC4xx and was not used at all. So let's remove it and make the code smaller and cleaner. Signed-off-by: Stefan Roese Acked-by: Detlev Zundel --- include/common.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index d6182275d4..0a64c71b4d 100644 --- a/include/common.h +++ b/include/common.h @@ -214,14 +214,6 @@ typedef void (interrupt_handler_t)(void *); * Function Prototypes */ -#ifdef CONFIG_SERIAL_SOFTWARE_FIFO -void serial_buffered_init (void); -void serial_buffered_putc (const char); -void serial_buffered_puts (const char *); -int serial_buffered_getc (void); -int serial_buffered_tstc (void); -#endif /* CONFIG_SERIAL_SOFTWARE_FIFO */ - void hang (void) __attribute__ ((noreturn)); /* */ -- cgit v1.2.1