grlib: Add ambapp_plb()

Replace the global variable ambapp_plb with a function to allow an automatic on
demand initialization.
This commit is contained in:
Sebastian Huber
2021-06-10 13:04:13 +02:00
parent c4c8d3fd50
commit 2c07f24af2
19 changed files with 96 additions and 63 deletions

View File

@@ -188,6 +188,11 @@ struct ambapp_context {
void *(*alloc)(size_t);
};
/**
* @brief Gets the fully scanned AMBA Plug & Play Processor Local Bus (PLB).
*/
extern struct ambapp_bus *ambapp_plb(void);
/* Scan a AMBA Plug & Play bus and create all device structures describing the
* the devices. The devices will form a tree, where every node describes one
* interface. The resulting tree is placed in the location pointed to by root.

View File

@@ -157,8 +157,6 @@ RTEMS_INLINE_ROUTINE unsigned int grlib_read_uncached32(unsigned int address)
#endif
extern struct ambapp_bus ambapp_plb;
#ifdef __cplusplus
}
#endif