1 /* C-interface for AMBA PnP scanning functions implemented in
2 * ambapp_low.S. At the point the memory and stack can be
5 * (C) Copyright 2010, 2015
6 * Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com.
8 * SPDX-License-Identifier: GPL-2.0+
13 .extern _nomem_ambapp_find_buses
14 .extern _nomem_find_apb
15 .extern _nomem_find_ahb
17 .globl ambapp_find_buses
18 .globl ambapp_find_apb
19 .globl ambapp_find_ahb
22 /* C-interface for _nomem_ambapp_find_buses used when memory is available.
26 mov %i1, %l7 /* Save second argument */
27 call _nomem_ambapp_find_buses
42 /* C-interface for _nomem_find_apb used when memory is available.
44 * void ambapp_find_apb(
45 * struct ambapp_bus *abus,
46 * unsigned int dev_vend,
48 * struct ambapp_find_apb_info *result
55 mov %i3, %l7 /* Save second argument */
59 /* Initialize buses available in system */
69 st %o2, [%l7+0x08] /* Decremented Index */
70 st %o3, [%l7] /* PnP configuration address of APB Device */
71 st %o4, [%l7+0x04] /* AHB Bus Index of AHB/APB bridge and APB Device */
76 /* C-interface for _nomem_find_ahb used when memory is available.
78 * void ambapp_find_ahb(
79 * struct ambapp_bus *abus,
80 * unsigned int dev_vend,
83 * struct ambapp_find_ahb_info *result
90 mov %i4, %l7 /* Save second argument */
98 /* Initialize buses available in system */
108 st %o2, [%l7+0x08] /* Decremented Index */
109 st %o3, [%l7] /* PnP configuration address of AHB Device */
110 st %o4, [%l7+0x04] /* AHB Bus Index of AHB Device */