Changeset 03037b4 in rtems


Ignore:
Timestamp:
Feb 11, 2015, 11:38:22 AM (5 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
960aebf
Parents:
ef7a009
git-author:
Daniel Hellstrom <daniel@…> (02/11/15 11:38:22)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:25)
Message:

GR-RASTA-ADCDAC: 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_rasta_adcdac.h

    ref7a009 r03037b4  
    2828 * used by the drivers controlling the cores on the GR-RASTA-ADCDAC target AMBA bus.
    2929 *
    30  * The gr_rasta_io_resources is declared weak so that the user can override the
    31  * default configuration.
     30 * The gr_rasta_adcdac_resources is declared weak so that the user can override
     31 * the default configuration. The array must be terminated with a NULL resource.
    3232 */
    3333extern struct drvmgr_bus_res *gr_rasta_adcdac_resources[];
     
    3737#define RASTA_ADCDAC_OPTIONS_IRQ    0x02 /* Print current IRQ setup */
    3838
    39 /* Print information about GR-RASTA-IO PCI board */
     39/* Print information about all GR-RASTA-IO PCI boards */
    4040void gr_rasta_adcdac_print(int options);
     41
     42/* Print information about one GR-RASTA-IO PCI board */
     43void gr_rasta_adcdac_print_dev(struct drvmgr_dev *dev, int options);
    4144
    4245/* Register GR-RASTA-IO driver */
  • c/src/lib/libbsp/sparc/shared/pci/gr_rasta_adcdac.c

    ref7a009 r03037b4  
    3131#include <drvmgr/ambapp_bus.h>
    3232#include <drvmgr/pci_bus.h>
     33#include <drvmgr/bspcommon.h>
    3334#include <genirq.h>
    3435
     
    5657int gr_rasta_adcdac_init1(struct drvmgr_dev *dev);
    5758int gr_rasta_adcdac_init2(struct drvmgr_dev *dev);
     59void gr_rasta_adcdac_isr (void *arg);
    5860
    5961struct grpci_regs {
     
    180182        NULL
    181183};
    182 int gr_rasta_adcdac_resources_cnt = 0;
    183184
    184185void gr_rasta_adcdac_register_drv(void)
     
    214215}
    215216
    216 int gr_rasta_adcdac_hw_init1(struct gr_rasta_adcdac_priv *priv)
     217static int gr_rasta_adcdac_hw_init1(struct gr_rasta_adcdac_priv *priv)
    217218{
    218219        uint32_t data;
    219220        unsigned int *page0 = NULL;
    220221        struct ambapp_dev *tmp;
    221         int status;
    222222        struct ambapp_ahb_info *ahb;
    223223        struct pci_dev_info *devinfo = priv->devinfo;
     
    286286
    287287        /* Find GRPCI controller */
    288         tmp = (void *)ambapp_for_each(&priv->abus,
     288        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    289289                                        (OPTIONS_ALL|OPTIONS_APB_SLVS),
    290290                                        VENDOR_GAISLER, GAISLER_PCIFBRG,
     
    303303
    304304        /* Find IRQ controller */
    305         tmp = (void *)ambapp_for_each(&priv->abus,
     305        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    306306                                        (OPTIONS_ALL|OPTIONS_APB_SLVS),
    307307                                        VENDOR_GAISLER, GAISLER_IRQMP,
     
    331331
    332332        /* Find GRPCI controller AHB Slave interface */
    333         tmp = (void *)ambapp_for_each(&priv->abus,
     333        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    334334                                        (OPTIONS_ALL|OPTIONS_AHB_SLVS),
    335335                                        VENDOR_GAISLER, GAISLER_PCIFBRG,
     
    354354}
    355355
    356 int gr_rasta_adcdac_hw_init2(struct gr_rasta_adcdac_priv *priv)
     356static int gr_rasta_adcdac_hw_init2(struct gr_rasta_adcdac_priv *priv)
    357357{
    358358        /* Enable DMA by enabling PCI target as master */
     
    372372        uint32_t bar0, bar1, bar0_size, bar1_size;
    373373        union drvmgr_key_value *value;
     374        int resources_cnt;
    374375
    375376        priv = malloc(sizeof(struct gr_rasta_adcdac_priv));
     
    382383
    383384        /* Determine number of configurations */
    384         if ( gr_rasta_adcdac_resources_cnt == 0 ) {
    385                 while ( gr_rasta_adcdac_resources[gr_rasta_adcdac_resources_cnt] )
    386                         gr_rasta_adcdac_resources_cnt++;
    387         }
     385        resources_cnt = get_resarray_count(gr_rasta_adcdac_resources);
    388386
    389387        /* Generate Device prefix */
     
    447445        priv->config.maps_up = &priv->bus_maps_up[0];
    448446        priv->config.maps_down = &priv->bus_maps_down[0];
    449         if ( priv->dev->minor_drv < gr_rasta_adcdac_resources_cnt ) {
     447        if ( priv->dev->minor_drv < resources_cnt ) {
    450448                priv->config.resources = gr_rasta_adcdac_resources[priv->dev->minor_drv];
    451449        } else {
Note: See TracChangeset for help on using the changeset viewer.