Changeset ef7a009 in rtems


Ignore:
Timestamp:
Feb 11, 2015, 11:37:28 AM (5 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
03037b4
Parents:
05a45c7
git-author:
Daniel Hellstrom <daniel@…> (02/11/15 11:37:28)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:25)
Message:

GR-LEON4-N2X: 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_leon4_n2x.h

    r05a45c7 ref7a009  
    3939 *
    4040 * The gr_leon4_n2x_resources is declared weak so that the user can override the
    41  * default configuration.
     41 * default configuration. The array must be terminated with a NULL resource.
    4242 */
    4343extern struct drvmgr_bus_res *gr_leon4_n2x_resources[];
     
    4646#define GR_LEON4_N2X_OPTIONS_AMBA   0x01 /* Print AMBA bus devices */
    4747
    48 /* Print information about GR-CPCI-LEON4-N2X PCI board */
     48/* Print information about all GR-CPCI-LEON4-N2X PCI boards */
    4949void gr_leon4_n2x_print(int options);
     50
     51/* Print information about one GR-CPCI-LEON4-N2X PCI board */
     52void gr_cpci_leon4_n2x_print_dev(struct drvmgr_dev *dev, int options);
    5053
    5154/* Register GR-CPCI-LEON4-N2X driver */
  • c/src/lib/libbsp/sparc/shared/pci/gr_leon4_n2x.c

    r05a45c7 ref7a009  
    4040#include <drvmgr/ambapp_bus.h>
    4141#include <drvmgr/pci_bus.h>
     42#include <drvmgr/bspcommon.h>
    4243#include <genirq.h>
    4344
     
    6869int gr_cpci_leon4_n2x_init1(struct drvmgr_dev *dev);
    6970int gr_cpci_leon4_n2x_init2(struct drvmgr_dev *dev);
     71void gr_cpci_leon4_n2x_isr(void *arg);
    7072
    7173struct grpci2_regs {
     
    200202        NULL
    201203};
    202 int gr_leon4_n2x_resources_cnt = 0;
    203204
    204205void gr_cpci_leon4_n2x_register_drv(void)
     
    245246}
    246247
    247 int gr_cpci_leon4_n2x_hw_init1(struct gr_cpci_leon4_n2x_priv *priv)
     248static int gr_cpci_leon4_n2x_hw_init1(struct gr_cpci_leon4_n2x_priv *priv)
    248249{
    249250        int i;
     
    399400
    400401        /* Find GRPCI2 controller AHB Slave interface */
    401         tmp = (void *)ambapp_for_each(&priv->abus,
     402        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    402403                                        (OPTIONS_ALL|OPTIONS_AHB_SLVS),
    403404                                        VENDOR_GAISLER, GAISLER_GRPCI2,
     
    415416
    416417        /* Find GRPCI2 controller APB Slave interface */
    417         tmp = (void *)ambapp_for_each(&priv->abus,
     418        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    418419                                        (OPTIONS_ALL|OPTIONS_APB_SLVS),
    419420                                        VENDOR_GAISLER, GAISLER_GRPCI2,
     
    452453}
    453454
    454 int gr_cpci_leon4_n2x_hw_init2(struct gr_cpci_leon4_n2x_priv *priv)
     455static int gr_cpci_leon4_n2x_hw_init2(struct gr_cpci_leon4_n2x_priv *priv)
    455456{
    456457        /* Enable DMA by enabling PCI target as master */
     
    469470        int status, i;
    470471        union drvmgr_key_value *value;
     472        int resources_cnt;
    471473
    472474        priv = dev->priv;
     
    479481
    480482        /* Determine number of configurations */
    481         if (gr_leon4_n2x_resources_cnt == 0) {
    482                 while (gr_leon4_n2x_resources[gr_leon4_n2x_resources_cnt])
    483                         gr_leon4_n2x_resources_cnt++;
    484         }
     483        resources_cnt = get_resarray_count(gr_leon4_n2x_resources);
    485484
    486485        /* Generate Device prefix */
     
    557556        priv->config.maps_up = &priv->bus_maps_up[0];
    558557        priv->config.maps_down = &priv->bus_maps_down[0];
    559         if ( priv->dev->minor_drv < gr_leon4_n2x_resources_cnt ) {
     558        if ( priv->dev->minor_drv < resources_cnt ) {
    560559                priv->config.resources = gr_leon4_n2x_resources[priv->dev->minor_drv];
    561560        } else {
Note: See TracChangeset for help on using the changeset viewer.