Changeset 90fd587 in rtems


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

GR-RASTA-SPW-ROUTER: 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_spw_router.h

    r960aebf r90fd587  
    3333#define RASTA_SPW_ROUTER_OPTIONS_IRQ   0x02 /* Print current IRQ setup */
    3434
    35 /* Print information about GR-CPCI-LEON4-N2X PCI board */
     35/* Print information about all GR-CPCI-LEON4-N2X PCI boards */
    3636void gr_rasta_spw_router_print(int options);
     37
     38/* Print information about one GR-CPCI-LEON4-N2X PCI board */
     39void gr_rasta_spw_router_print_dev(struct drvmgr_dev *dev, int options);
    3740
    3841/* Register GR-RASTA-SPW-ROUTER driver to Driver Manager */
  • c/src/lib/libbsp/sparc/shared/pci/gr_rasta_spw_router.c

    r960aebf r90fd587  
    2929#include <drvmgr/ambapp_bus.h>
    3030#include <drvmgr/pci_bus.h>
     31#include <drvmgr/bspcommon.h>
    3132#include <genirq.h>
    3233#include <gr_rasta_spw_router.h>
     
    197198        NULL
    198199};
    199 int gr_rasta_spw_router_resources_cnt = 0;
    200200
    201201void gr_rasta_spw_router_register_drv(void)
     
    240240        uint8_t tmp2;
    241241        struct ambapp_dev *tmp;
    242         int status;
    243242        struct ambapp_ahb_info *ahb;
    244243        uint8_t cap_ptr;
     
    308307
    309308        /* Find IRQ controller, Clear all current IRQs */
    310         tmp = ambapp_for_each(&priv->abus,
     309        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    311310                                (OPTIONS_ALL|OPTIONS_APB_SLVS),
    312311                                VENDOR_GAISLER, GAISLER_IRQMP,
     
    328327
    329328        /* Find GRPCI2 controller AHB Slave interface */
    330         tmp = (void *)ambapp_for_each(&priv->abus,
     329        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    331330                                        (OPTIONS_ALL|OPTIONS_AHB_SLVS),
    332331                                        VENDOR_GAISLER, GAISLER_GRPCI2,
     
    344343
    345344        /* Find GRPCI2 controller APB Slave interface */
    346         tmp = (void *)ambapp_for_each(&priv->abus,
     345        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    347346                                        (OPTIONS_ALL|OPTIONS_APB_SLVS),
    348347                                        VENDOR_GAISLER, GAISLER_GRPCI2,
     
    388387        uint32_t bar0, bar0_size;
    389388        union drvmgr_key_value *value;
     389        int resources_cnt;
    390390
    391391        priv = dev->priv;
     
    398398
    399399        /* Determine number of configurations */
    400         if ( gr_rasta_spw_router_resources_cnt == 0 ) {
    401                 while ( gr_rasta_spw_router_resources[gr_rasta_spw_router_resources_cnt] )
    402                         gr_rasta_spw_router_resources_cnt++;
    403         }
     400        resources_cnt = get_resarray_count(gr_rasta_spw_router_resources);
    404401
    405402        /* Generate Device prefix */
     
    455452        priv->config.maps_up = &priv->bus_maps_up[0];
    456453        priv->config.maps_down = &priv->bus_maps_down[0];
    457         if ( priv->dev->minor_drv < gr_rasta_spw_router_resources_cnt ) {
     454        if ( priv->dev->minor_drv < resources_cnt ) {
    458455                priv->config.resources = gr_rasta_spw_router_resources[priv->dev->minor_drv];
    459456        } else {
Note: See TracChangeset for help on using the changeset viewer.