Changeset 103bbde in rtems


Ignore:
Timestamp:
Feb 11, 2015, 11:50:35 AM (5 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
56662f5c
Parents:
dd8abfc
git-author:
Daniel Hellstrom <daniel@…> (02/11/15 11:50:35)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:25)
Message:

GR-TMTC-1553: fix build warnings

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

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/shared/include/gr_tmtc_1553.h

    rdd8abfc r103bbde  
    2929 *
    3030 * The gr_rasta_io_resources is declared weak so that the user can override the
    31  * default configuration.
     31 * default configuration. The array must be terminated with a NULL resource.
    3232 */
    3333extern struct drvmgr_bus_res *gr_tmtc_1553_resources[];
     
    4343void gr_tmtc_1553_register_drv(void);
    4444
     45/* Print information about all GR-TMTC-1553 devices registered to this driver */
     46void gr_tmtc_1553_print(int options);
     47
     48/* Print information about one GR-TMTC-1553 device */
     49void gr_tmtc_1553_print_dev(struct drvmgr_dev *dev, int options);
     50
    4551#ifdef __cplusplus
    4652}
  • c/src/lib/libbsp/sparc/shared/pci/gr_tmtc_1553.c

    rdd8abfc r103bbde  
    3232#include <drvmgr/ambapp_bus.h>
    3333#include <drvmgr/pci_bus.h>
     34#include <drvmgr/bspcommon.h>
    3435#include <genirq.h>
    3536
     
    5051int gr_tmtc_1553_init1(struct drvmgr_dev *dev);
    5152int gr_tmtc_1553_init2(struct drvmgr_dev *dev);
     53void gr_tmtc_1553_isr (void *arg);
    5254
    5355struct gr_tmtc_1553_ver {
     
    161163        NULL
    162164};
    163 int gr_tmtc_1553_resources_cnt = 0;
    164165
    165166void gr_tmtc_1553_register_drv(void)
     
    195196}
    196197
    197 int gr_tmtc_1553_hw_init(struct gr_tmtc_1553_priv *priv)
     198static int gr_tmtc_1553_hw_init(struct gr_tmtc_1553_priv *priv)
    198199{
    199200        unsigned int *page0 = NULL;
    200201        struct ambapp_dev *tmp;
    201         int status;
    202202        unsigned int pci_freq_hz;
    203203        struct pci_dev_info *devinfo = priv->devinfo;
     
    244244
    245245        /* Frequency is the hsame as the PCI bus frequency */
    246         drvmgr_freq_get(priv->dev, NULL, &pci_freq_hz);
     246        drvmgr_freq_get(priv->dev, 0, &pci_freq_hz);
    247247
    248248        ambapp_freq_init(&priv->abus, NULL, pci_freq_hz);
    249249
    250250        /* Find IRQ controller */
    251         tmp = (void *)ambapp_for_each(&priv->abus,
     251        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    252252                                        (OPTIONS_ALL|OPTIONS_APB_SLVS),
    253253                                        VENDOR_GAISLER, GAISLER_IRQMP,
     
    284284        int status;
    285285        uint32_t bar0, bar0_size;
     286        int resources_cnt;
    286287
    287288        /* PCI device does not have the IRQ line register, when PCI autoconf configures it the configuration
     
    292293         */
    293294        ((struct pci_dev_info *)dev->businfo)->irq = ((struct amba_dev_info *)dev->parent->dev->businfo)->info.irq;
    294        
     295
    295296        priv = malloc(sizeof(struct gr_tmtc_1553_priv));
    296297        if ( !priv )
     
    302303
    303304        /* Determine number of configurations */
    304         if ( gr_tmtc_1553_resources_cnt == 0 ) {
    305                 while ( gr_tmtc_1553_resources[gr_tmtc_1553_resources_cnt] )
    306                         gr_tmtc_1553_resources_cnt++;
    307         }
     305        resources_cnt = get_resarray_count(gr_tmtc_1553_resources);
    308306
    309307        /* Generate Device prefix */
     
    355353         */
    356354        priv->config.maps_up = DRVMGR_TRANSLATE_NO_BRIDGE;
    357         if ( priv->dev->minor_drv < gr_tmtc_1553_resources_cnt ) {
     355        if ( priv->dev->minor_drv < resources_cnt ) {
    358356                priv->config.resources = gr_tmtc_1553_resources[priv->dev->minor_drv];
    359357        } else {
Note: See TracChangeset for help on using the changeset viewer.