Changeset 05a45c7 in rtems


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

GR_701: 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_701.h

    rcb64b862 r05a45c7  
    2828 * used by the drivers controlling the cores on the GR-701 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 gr701_resources is declared weak so that the user can override the
     31 * default configuration. The array must be terminated with a NULL resource.
    3232 */
    3333extern struct drvmgr_bus_res *gr701_resources[];
     
    3636#define GR701_OPTIONS_IRQ    0x02
    3737
    38 /* Print information about GR-RASTA-IO PCI board */
     38/* Print information about all GR-701 PCI boards */
    3939void gr701_print(int options);
     40
     41/* Print information about one GR-701 PCI board */
     42void gr701_print_dev(struct drvmgr_dev *dev, int options);
    4043
    4144/* Register GR-701 driver */
  • c/src/lib/libbsp/sparc/shared/pci/gr_701.c

    rcb64b862 r05a45c7  
    3333#include <drvmgr/ambapp_bus.h>
    3434#include <drvmgr/pci_bus.h>
     35#include <drvmgr/bspcommon.h>
    3536#include <genirq.h>
    3637
     
    5152int gr701_init1(struct drvmgr_dev *dev);
    5253int gr701_init2(struct drvmgr_dev *dev);
     54void gr701_interrupt(void *arg);
    5355
    5456#define READ_REG(address) (*(volatile unsigned int *)address)
     
    187189        NULL
    188190};
    189 int gr701_resources_cnt = 0;
    190191
    191192void gr701_register_drv(void)
     
    214215}
    215216
    216 int gr701_hw_init(struct gr701_priv *priv)
     217static int gr701_hw_init(struct gr701_priv *priv)
    217218{
    218219        uint32_t com1;
     
    278279
    279280        /* Frequency is the same as the PCI bus frequency */
    280         drvmgr_freq_get(priv->dev, NULL, &pci_freq_hz);
     281        drvmgr_freq_get(priv->dev, 0, &pci_freq_hz);
    281282
    282283        /* Initialize Frequency of AMBA bus */
     
    294295}
    295296
    296 void gr701_hw_init2(struct gr701_priv *priv)
     297static void gr701_hw_init2(struct gr701_priv *priv)
    297298{
    298299        /* Enable PCI Master (for DMA) */
     
    308309        struct pci_dev_info *devinfo;
    309310        uint32_t bar0, bar1, bar0_size, bar1_size;
     311        int resources_cnt;
    310312
    311313        priv = malloc(sizeof(struct gr701_priv));
     
    318320
    319321        /* Determine number of configurations */
    320         if ( gr701_resources_cnt == 0 ) {
    321                 while ( gr701_resources[gr701_resources_cnt] )
    322                         gr701_resources_cnt++;
    323         }
     322        resources_cnt = get_resarray_count(gr701_resources);
    324323
    325324        /* Generate Device prefix */
    326 
    327325        strcpy(priv->prefix, "/dev/gr701_0");
    328326        priv->prefix[11] += dev->minor_drv;
     
    370368        priv->config.maps_up = &priv->bus_maps_up[0];
    371369        priv->config.maps_down = &priv->bus_maps_down[0];
    372         if ( priv->dev->minor_drv < gr701_resources_cnt ) {
     370        if ( priv->dev->minor_drv < resources_cnt ) {
    373371                priv->config.resources = gr701_resources[priv->dev->minor_drv];
    374372        } else {
Note: See TracChangeset for help on using the changeset viewer.