[PATCH 1/7] bsps/sparc: Make local functions for amba plug&play static.
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Mar 13 14:27:53 UTC 2014
No comment?
Looks OK except I wish we had spotted <amba.h> not being
<bsp/amba.h> when it was first merged. Can you please
install it to bsp/.
That goes for other .h files specific to the BSP. We try to
keep from polluting the top of the INCLUDE directory since
this namespace is owned by POSIX and other standards.
On 3/13/2014 9:19 AM, Daniel Cederman wrote:
> ---
> c/src/lib/libbsp/sparc/shared/amba/ambapp.c | 12 ++++++------
> c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c | 2 +-
> c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c | 1 +
> c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c | 2 +-
> c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c | 5 +----
> 5 files changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp.c
> index 504a3e7..7b3ae4a 100644
> --- a/c/src/lib/libbsp/sparc/shared/amba/ambapp.c
> +++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp.c
> @@ -21,7 +21,7 @@
> #define AMBA_APB_SLAVES 16
>
> /* Allocate one AMBA device */
> -struct ambapp_dev *ambapp_alloc_dev_struct(int dev_type)
> +static struct ambapp_dev *ambapp_alloc_dev_struct(int dev_type)
> {
> int size = sizeof(struct ambapp_dev);
> struct ambapp_dev *dev;
> @@ -38,7 +38,7 @@ struct ambapp_dev *ambapp_alloc_dev_struct(int dev_type)
> return dev;
> }
>
> -unsigned int
> +static unsigned int
> ambapp_addr_from (struct ambapp_mmap *mmaps, unsigned int address)
> {
> /* no translation? */
> @@ -55,7 +55,7 @@ ambapp_addr_from (struct ambapp_mmap *mmaps, unsigned int address)
> return 1;
> }
>
> -void ambapp_ahb_dev_init(
> +static void ambapp_ahb_dev_init(
> unsigned int ioarea,
> struct ambapp_mmap *mmaps,
> struct ambapp_pnp_ahb *ahb,
> @@ -102,7 +102,7 @@ void ambapp_ahb_dev_init(
> }
> }
>
> -void ambapp_apb_dev_init(
> +static void ambapp_apb_dev_init(
> unsigned int base,
> struct ambapp_mmap *mmaps,
> struct ambapp_pnp_apb *apb,
> @@ -123,7 +123,7 @@ void ambapp_apb_dev_init(
> apb_info->mask = ambapp_pnp_apb_mask(apb->iobar);
> }
>
> -int ambapp_add_ahbbus(
> +static int ambapp_add_ahbbus(
> struct ambapp_bus *abus,
> unsigned int ioarea
> )
> @@ -298,7 +298,7 @@ int ambapp_scan(
> }
>
> /* Match search options againt device */
> -int ambapp_dev_match_options(struct ambapp_dev *dev, unsigned int options, int vendor, int device)
> +static int ambapp_dev_match_options(struct ambapp_dev *dev, unsigned int options, int vendor, int device)
> {
> if ((((options & (OPTIONS_ALL_DEVS)) == OPTIONS_ALL_DEVS) || /* TYPE */
> ((options & OPTIONS_AHB_MSTS) && (dev->dev_type == DEV_AHB_MST)) ||
> diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c
> index 03c0f68..0d18fea 100644
> --- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c
> +++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c
> @@ -21,7 +21,7 @@
> * If a unsupported bridge is found the invalid frequncy of 0Hz is
> * returned.
> */
> -unsigned int ambapp_freq_calc(
> +static unsigned int ambapp_freq_calc(
> struct ambapp_bus *abus,
> int ahbidx,
> unsigned int freq_hz,
> diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c
> index 4a47366..c0a8d63 100644
> --- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c
> +++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c
> @@ -12,6 +12,7 @@
> * http://www.rtems.com/license/LICENSE.
> */
>
> +#include <ambapp.h>
> #include <ambapp_ids.h>
> #include <string.h>
>
> diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c
> index 15aebe5..5d8212c 100644
> --- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c
> +++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c
> @@ -19,7 +19,7 @@ struct ambapp_dev_find_match_arg {
> };
>
> /* AMBA PP find routines */
> -int ambapp_dev_find_match(struct ambapp_dev *dev, int index, void *arg)
> +static int ambapp_dev_find_match(struct ambapp_dev *dev, int index, void *arg)
> {
> struct ambapp_dev_find_match_arg *p = arg;
>
> diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c
> index f73ec1d..e4e04fd 100644
> --- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c
> +++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c
> @@ -12,16 +12,13 @@
> #include <stdio.h>
> #include <ambapp.h>
>
> -extern char *ambapp_device_id2str(int vendor, int id);
> -extern char *ambapp_vendor_id2str(int vendor);
> -
> struct ambapp_dev_print_arg {
> int show_depth;
> };
>
> static char *unknown = "unknown";
>
> -int ambapp_dev_print(struct ambapp_dev *dev, int index, void *arg)
> +static int ambapp_dev_print(struct ambapp_dev *dev, int index, void *arg)
> {
> char *dev_str, *ven_str, *type_str;
> struct ambapp_dev_print_arg *p = arg;
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the devel
mailing list