forked from Imagelibrary/rtems
bsps/sparc: Move shared files to bsps
This patch is a part of the BSP source reorganization. Update #3285.
This commit is contained in:
23
bsps/sparc/shared/amba/ambapp_count.c
Normal file
23
bsps/sparc/shared/amba/ambapp_count.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* AMBA Plug & Play routines
|
||||
*
|
||||
* COPYRIGHT (c) 2011
|
||||
* Aeroflex Gaisler
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <ambapp.h>
|
||||
|
||||
/* Get number of devices matching search options */
|
||||
int ambapp_dev_count(struct ambapp_bus *abus, unsigned int options,
|
||||
int vendor, int device)
|
||||
{
|
||||
int count = 10000;
|
||||
|
||||
ambapp_for_each(abus, options, vendor, device, ambapp_find_by_idx, &count);
|
||||
|
||||
return 10000 - count;
|
||||
}
|
||||
Reference in New Issue
Block a user