Changeset b787bead in rtems


Ignore:
Timestamp:
Feb 10, 2015, 8:23:48 AM (5 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
3f38335b
Parents:
05ce8bd5
git-author:
Daniel Hellstrom <daniel@…> (02/10/15 08:23:48)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:22)
Message:

GR1553B: fixed build warnings

Location:
c/src/lib/libbsp/sparc/shared
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/shared/1553/gr1553b.c

    r05ce8bd5 rb787bead  
    4040
    4141/* Device lists */
    42 struct gr1553_device_feature *gr1553_bm_root = NULL;
    43 struct gr1553_device_feature *gr1553_rt_root = NULL;
    44 struct gr1553_device_feature *gr1553_bc_root = NULL;
     42static struct gr1553_device_feature *gr1553_bm_root = NULL;
     43static struct gr1553_device_feature *gr1553_rt_root = NULL;
     44static struct gr1553_device_feature *gr1553_bc_root = NULL;
    4545
    4646/* Driver registered */
    47 int gr1553_driver_registerd = 0;
     47static int gr1553_driver_registerd = 0;
    4848
    4949/* Add 'feat' to linked list pointed to by 'root'. A minor is also assigned. */
    50 void gr1553_list_add
     50static void gr1553_list_add
    5151        (
    5252        struct gr1553_device_feature **root,
     
    8080}
    8181
    82 struct gr1553_device_feature *gr1553_list_find
     82static struct gr1553_device_feature *gr1553_list_find
    8383        (
    8484        struct gr1553_device_feature *root,
     
    180180}
    181181
    182 int gr1553_init2(struct drvmgr_dev *dev)
     182static int gr1553_init2(struct drvmgr_dev *dev)
    183183{
    184184        struct amba_dev_info *ambadev;
     
    210210 * core supports.
    211211 */
    212 int gr1553_init3(struct drvmgr_dev *dev)
     212static int gr1553_init3(struct drvmgr_dev *dev)
    213213{
    214214        struct amba_dev_info *ambadev;
  • c/src/lib/libbsp/sparc/shared/1553/gr1553bc.c

    r05ce8bd5 rb787bead  
    616616}
    617617
    618 int gr1553bc_minor_first_avail(struct gr1553bc_minor *minor)
     618static int gr1553bc_minor_first_avail(struct gr1553bc_minor *minor)
    619619{
    620620        int slot_num;
     
    12341234}
    12351235
    1236 void gr1553bc_isr_std(union gr1553bc_bd *bd, void *data)
     1236static void gr1553bc_isr_std(union gr1553bc_bd *bd, void *data)
    12371237{
    12381238        /* Do nothing */
  • c/src/lib/libbsp/sparc/shared/1553/gr1553bm.c

    r05ce8bd5 rb787bead  
    1818
    1919
    20 #define GR1553BM_WRITE_MEM(adr, val) *(volatile uint32_t *)(adr) = (val)
     20#define GR1553BM_WRITE_MEM(adr, val) *(volatile uint32_t *)(adr) = (uint32_t)(val)
    2121#define GR1553BM_READ_MEM(adr) (*(volatile uint32_t *)(adr))
    2222
    23 #define GR1553BM_WRITE_REG(adr, val) *(volatile uint32_t *)(adr) = (val)
     23#define GR1553BM_WRITE_REG(adr, val) *(volatile uint32_t *)(adr) = (uint32_t)(val)
    2424#define GR1553BM_READ_REG(adr) (*(volatile uint32_t *)(adr))
    2525
  • c/src/lib/libbsp/sparc/shared/1553/gr1553rt.c

    r05ce8bd5 rb787bead  
    2020#include <drvmgr/ambapp_bus.h>
    2121
    22 #define GR1553RT_WRITE_MEM(adr, val) *(volatile uint32_t *)(adr) = (val)
     22#define GR1553RT_WRITE_MEM(adr, val) *(volatile uint32_t *)(adr) = (uint32_t)(val)
    2323#define GR1553RT_READ_MEM(adr) (*(volatile uint32_t *)(adr))
    2424
    25 #define GR1553RT_WRITE_REG(adr, val) *(volatile uint32_t *)(adr) = (val)
     25#define GR1553RT_WRITE_REG(adr, val) *(volatile uint32_t *)(adr) = (uint32_t)(val)
    2626#define GR1553RT_READ_REG(adr) (*(volatile uint32_t *)(adr))
    2727
     
    130130void gr1553rt_sw_init(struct gr1553rt_priv *priv);
    131131void gr1553rt_sw_free(struct gr1553rt_priv *priv);
    132 int gr1553rt_sw_alloc(struct gr1553rt_priv *priv);
     132void gr1553rt_isr(void *data);
    133133
    134134/* Assign and ID to the list. An LIST ID is needed before scheduling list
     
    137137 * Only 64 lists can be registered at a time on the same device.
    138138 */
    139 int gr1553rt_list_reg(struct gr1553rt_list *list)
     139static int gr1553rt_list_reg(struct gr1553rt_list *list)
    140140{
    141141        struct gr1553rt_priv *priv = list->rt;
     
    157157}
    158158
     159#if 0 /* unused for now */
    159160/* Unregister List from device */
    160 void gr1553rt_list_unreg(struct gr1553rt_list *list)
     161static void gr1553rt_list_unreg(struct gr1553rt_list *list)
    161162{
    162163        struct gr1553rt_priv *priv = list->rt;
     
    165166        list->listid = -1;
    166167}
     168#endif
    167169
    168170static int gr1553rt_bdid(void *rt, struct gr1553rt_sw_bd *bd)
     
    179181}
    180182
    181 void gr1553rt_bd_alloc_init(void *rt, int count)
     183static void gr1553rt_bd_alloc_init(void *rt, int count)
    182184{
    183185        struct gr1553rt_priv *priv = rt;
     
    193195
    194196/* Allocate a Chain of descriptors */
    195 int gr1553rt_bd_alloc(void *rt, struct gr1553rt_sw_bd **bd, int cnt)
     197static int gr1553rt_bd_alloc(void *rt, struct gr1553rt_sw_bd **bd, int cnt)
    196198{
    197199        struct gr1553rt_priv *priv = rt;
     
    223225}
    224226
    225 void gr1553rt_bd_free(void *rt, struct gr1553rt_sw_bd *bd)
     227#if 0 /* unused for now */
     228static void gr1553rt_bd_free(void *rt, struct gr1553rt_sw_bd *bd)
    226229{
    227230        struct gr1553rt_priv *priv = rt;
     
    236239        priv->swbd_free_cnt++;
    237240}
     241#endif
    238242
    239243int gr1553rt_list_init
     
    817821
    818822/* Free dynamically allocated buffers, if any */
    819 int gr1553rt_sw_alloc(struct gr1553rt_priv *priv)
     823static int gr1553rt_sw_alloc(struct gr1553rt_priv *priv)
    820824{
    821825        int size;
     
    864868        if ((unsigned int)priv->cfg.bd_buffer & 1) {
    865869                /* Translate Address from HARDWARE (REMOTE) to CPU-LOCAL */
    866                 priv->bds_hw = (unsigned int)priv->cfg.bd_buffer & ~0x1;
     870                priv->bds_hw = (struct gr1553rt_bd *)
     871                        ((unsigned int)priv->cfg.bd_buffer & ~0x1);
    867872                priv->bd_buffer = priv->cfg.bd_buffer;
    868873                drvmgr_translate_check(
     
    907912        if ((unsigned int)priv->cfg.satab_buffer & 1) {
    908913                /* Translate Address from HARDWARE (REMOTE) to CPU-LOCAL */
    909                 priv->sas_hw = (unsigned int)priv->cfg.satab_buffer & ~0x1;
     914                priv->sas_hw = (struct gr1553rt_sa *)
     915                        ((unsigned int)priv->cfg.satab_buffer & ~0x1);
    910916                priv->satab_buffer = priv->cfg.satab_buffer;
    911917                drvmgr_translate_check(
  • c/src/lib/libbsp/sparc/shared/include/gr1553b.h

    r05ce8bd5 rb787bead  
    2424#define __GR1553B_H__
    2525
     26#include <stdint.h>
     27
    2628#ifdef __cplusplus
    2729extern "C" {
     
    3133struct gr1553b_regs {
    3234        /* Common Registers */
    33         volatile unsigned int irq; /* 0x00 IRQ register */
    34         volatile unsigned int imask;    /* 0x04 IRQ enable mask */
     35        volatile uint32_t irq;          /* 0x00 IRQ register */
     36        volatile uint32_t imask;        /* 0x04 IRQ enable mask */
    3537        int unused0[(0x10-0x08)/4];
    36         volatile unsigned int hwcfg;    /* 0x10 HW config register */
     38        volatile uint32_t hwcfg;        /* 0x10 HW config register */
    3739
    3840        int unused1[(0x40-0x14)/4];     /* Padding */
    3941
    4042        /* BC Registers */
    41         volatile unsigned int bc_stat;  /* 0x40 BC status */
    42         volatile unsigned int bc_ctrl;  /* 0x44 BC Action register */
    43         volatile unsigned int bc_bd;    /* 0x48 BC transfer list pointer */
    44         volatile unsigned int bc_abd;   /* 0x4c BC async list pointer */
    45         volatile unsigned int bc_timer; /* 0x50 BC timer register */
    46         volatile unsigned int bc_wake;  /* 0x54 BC wakeup control register */
    47         volatile unsigned int bc_irqptr;/* 0x58 BC transfer IRQ pointer */
    48         volatile unsigned int bc_busmsk;/* 0x5C BC per-RT bus mask register */
     43        volatile uint32_t bc_stat;      /* 0x40 BC status */
     44        volatile uint32_t bc_ctrl;      /* 0x44 BC Action register */
     45        volatile uint32_t bc_bd;        /* 0x48 BC transfer list pointer */
     46        volatile uint32_t bc_abd;       /* 0x4c BC async list pointer */
     47        volatile uint32_t bc_timer;     /* 0x50 BC timer register */
     48        volatile uint32_t bc_wake;      /* 0x54 BC wakeup control register */
     49        volatile uint32_t bc_irqptr;    /* 0x58 BC transfer IRQ pointer */
     50        volatile uint32_t bc_busmsk;    /* 0x5C BC per-RT bus mask register */
    4951
    5052        int unused2[(0x68-0x60)/4];     /* Padding */
    5153
    52         volatile unsigned int bc_slot;  /* 0x48 BC Current BD pointer */
    53         volatile unsigned int bc_aslot; /* 0x4c BC Current async BD pointer */
     54        volatile uint32_t bc_slot;      /* 0x48 BC Current BD pointer */
     55        volatile uint32_t bc_aslot;     /* 0x4c BC Current async BD pointer */
    5456
    5557        int unused3[(0x80-0x70)/4];     /* Padding */
    5658
    5759        /* RT Registers */
    58         volatile unsigned int rt_stat;  /* 0x80 RT status */
    59         volatile unsigned int rt_cfg;   /* 0x84 RT config register */
    60         volatile unsigned int rt_stat2; /* 0x88 RT bus status bits */
    61         volatile unsigned int rt_statw; /* 0x8c RT status words */
    62         volatile unsigned int rt_sync;  /* 0x90 RT bus synchronize */
    63         volatile unsigned int rt_tab;   /* 0x94 RT subaddress table base */
    64         volatile unsigned int rt_mcctrl;/* 0x98 RT valid mode code mask */
     60        volatile uint32_t rt_stat;      /* 0x80 RT status */
     61        volatile uint32_t rt_cfg;       /* 0x84 RT config register */
     62        volatile uint32_t rt_stat2;     /* 0x88 RT bus status bits */
     63        volatile uint32_t rt_statw;     /* 0x8c RT status words */
     64        volatile uint32_t rt_sync;      /* 0x90 RT bus synchronize */
     65        volatile uint32_t rt_tab;       /* 0x94 RT subaddress table base */
     66        volatile uint32_t rt_mcctrl;    /* 0x98 RT valid mode code mask */
    6567        int unused4[(0xa4-0x9c)/4];
    66         volatile unsigned int rt_ttag;  /* 0xa4 RT time tag register */
     68        volatile uint32_t rt_ttag;      /* 0xa4 RT time tag register */
    6769        int unused5;                    /* 0xa8 RESERVED */
    68         volatile unsigned int rt_evsz;  /* 0xac RT event log end pointer */
    69         volatile unsigned int rt_evlog; /* 0xb0 RT event log position */
    70         volatile unsigned int rt_evirq; /* 0xb4 RT event log IRQ position */
     70        volatile uint32_t rt_evsz;      /* 0xac RT event log end pointer */
     71        volatile uint32_t rt_evlog;     /* 0xb0 RT event log position */
     72        volatile uint32_t rt_evirq;     /* 0xb4 RT event log IRQ position */
    7173
    7274        int unused6[(0xc0-0xb8)/4];     /* Padding */
    7375
    7476        /* BM Registers */
    75         volatile unsigned int bm_stat;  /* 0xc0 BM status */
    76         volatile unsigned int bm_ctrl;  /* 0xc4 BM control register */
    77         volatile unsigned int bm_adr;   /* 0xc8 BM address filter */
    78         volatile unsigned int bm_subadr;/* 0xcc BM subaddress filter */
    79         volatile unsigned int bm_mc;    /* 0xd0 BM mode code filter */
    80         volatile unsigned int bm_start; /* 0xd4 BM log start address */
    81         volatile unsigned int bm_end;   /* 0xd8 BM log size/alignment mask */
    82         volatile unsigned int bm_pos;   /* 0xdc BM log position */
    83         volatile unsigned int bm_ttag;  /* 0xe0 BM time tag register */
     77        volatile uint32_t bm_stat;      /* 0xc0 BM status */
     78        volatile uint32_t bm_ctrl;      /* 0xc4 BM control register */
     79        volatile uint32_t bm_adr;       /* 0xc8 BM address filter */
     80        volatile uint32_t bm_subadr;    /* 0xcc BM subaddress filter */
     81        volatile uint32_t bm_mc;        /* 0xd0 BM mode code filter */
     82        volatile uint32_t bm_start;     /* 0xd4 BM log start address */
     83        volatile uint32_t bm_end;       /* 0xd8 BM log size/alignment mask */
     84        volatile uint32_t bm_pos;       /* 0xdc BM log position */
     85        volatile uint32_t bm_ttag;      /* 0xe0 BM time tag register */
    8486};
    8587
Note: See TracChangeset for help on using the changeset viewer.