Changeset 960aebf in rtems


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

GR-RASTA-IO: 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_io.h

    r03037b4 r960aebf  
    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_rasta_io_resources[];
     
    3737#define RASTA_IO_OPTIONS_IRQ    0x02 /* Print current IRQ setup */
    3838
    39 /* Print information about GR-RASTA-IO PCI board */
     39/* Print information about GR-RASTA-IO PCI boards */
    4040void gr_rasta_io_print(int options);
     41
     42/* Print information about a GR-RASTA-IO PCI board */
     43void gr_rasta_io_print_dev(struct drvmgr_dev *dev, int options);
    4144
    4245/* Register GR-RASTA-IO driver */
  • c/src/lib/libbsp/sparc/shared/pci/gr_rasta_io.c

    r03037b4 r960aebf  
    3131#include <drvmgr/ambapp_bus.h>
    3232#include <drvmgr/pci_bus.h>
     33#include <drvmgr/bspcommon.h>
    3334#include <genirq.h>
    3435
     
    6667int gr_rasta_io_init1(struct drvmgr_dev *dev);
    6768int gr_rasta_io_init2(struct drvmgr_dev *dev);
     69void gr_rasta_io_isr (void *arg);
    6870
    6971struct grpci_regs {
     
    220222        NULL
    221223};
    222 int gr_rasta_io_resources_cnt = 0;
    223224
    224225void gr_rasta_io_register_drv(void)
     
    255256
    256257/* PCI Hardware (Revision 0 and 1) initialization */
    257 int gr_rasta_io_hw_init(struct gr_rasta_io_priv *priv)
     258static int gr_rasta_io_hw_init(struct gr_rasta_io_priv *priv)
    258259{
    259260        unsigned int *page0 = NULL;
    260261        struct ambapp_dev *tmp;
    261         int status;
    262262        struct ambapp_ahb_info *ahb;
    263263        struct pci_dev_info *devinfo = priv->devinfo;
     
    320320
    321321        /* Find GRPCI controller */
    322         tmp = (void *)ambapp_for_each(&priv->abus,
     322        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    323323                                        (OPTIONS_ALL|OPTIONS_APB_SLVS),
    324324                                        VENDOR_GAISLER, GAISLER_PCIFBRG,
     
    337337
    338338        /* Find IRQ controller, Clear all current IRQs */
    339         tmp = (void *)ambapp_for_each(&priv->abus,
     339        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    340340                                        (OPTIONS_ALL|OPTIONS_APB_SLVS),
    341341                                        VENDOR_GAISLER, GAISLER_IRQMP,
     
    365365
    366366        /* Find GRPCI controller AHB Slave interface */
    367         tmp = (void *)ambapp_for_each(&priv->abus,
     367        tmp = (struct ambapp_dev *)ambapp_for_each(&priv->abus,
    368368                                        (OPTIONS_ALL|OPTIONS_AHB_SLVS),
    369369                                        VENDOR_GAISLER, GAISLER_PCIFBRG,
     
    389389
    390390/* PCI Hardware (Revision 1) initialization */
    391 int gr_rasta_io2_hw_init(struct gr_rasta_io_priv *priv)
     391static int gr_rasta_io2_hw_init(struct gr_rasta_io_priv *priv)
    392392{
    393393        int i;
     
    396396        uint8_t tmp2;
    397397        struct ambapp_dev *tmp;
    398         int status;
    399398        struct ambapp_ahb_info *ahb;
    400399        uint8_t cap_ptr;
    401400        pci_dev_t pcidev = priv->pcidev;
    402401        struct pci_dev_info *devinfo = priv->devinfo;
    403         unsigned int pci_freq_hz;
    404402
    405403        /* Check capabilities list bit */
     
    535533}
    536534
    537 int gr_rasta_io_hw_init2(struct gr_rasta_io_priv *priv)
     535static int gr_rasta_io_hw_init2(struct gr_rasta_io_priv *priv)
    538536{
    539537        /* Enable DMA by enabling PCI target as master */
     
    553551        uint32_t bar0, bar1, bar0_size, bar1_size;
    554552        union drvmgr_key_value *value;
     553        int resources_cnt;
    555554
    556555        priv = malloc(sizeof(struct gr_rasta_io_priv));
     
    563562
    564563        /* Determine number of configurations */
    565         if ( gr_rasta_io_resources_cnt == 0 ) {
    566                 while ( gr_rasta_io_resources[gr_rasta_io_resources_cnt] )
    567                         gr_rasta_io_resources_cnt++;
    568         }
     564        resources_cnt = get_resarray_count(gr_rasta_io_resources);
    569565
    570566        /* Generate Device prefix */
     
    646642        priv->config.maps_up = &priv->bus_maps_up[0];
    647643        priv->config.maps_down = &priv->bus_maps_down[0];
    648         if ( priv->dev->minor_drv < gr_rasta_io_resources_cnt ) {
     644        if ( priv->dev->minor_drv < resources_cnt ) {
    649645                priv->config.resources = gr_rasta_io_resources[priv->dev->minor_drv];
    650646        } else {
Note: See TracChangeset for help on using the changeset viewer.