02.08.2013 Views

P4080 PCIe Adapter SDK User Guide Production Release

P4080 PCIe Adapter SDK User Guide Production Release

P4080 PCIe Adapter SDK User Guide Production Release

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Freescale Semiconductor<br />

/**<br />

* API: unregister_hardware_function :<br />

* Each upper-level Hardware Function driver calls this function to<br />

* unregister itself from Host Packet Driver. This function is<br />

* invoked at the time of Driver unload. It sends an unload command to <strong>P4080</strong><br />

* to notify that hardware function Driver is unloaded. The Host<br />

* Packet Driver cleans all the data structures of the Hardware Function that<br />

* requested the de-registration.<br />

*<br />

* @func_id – Identifier of a Hardware Function.<br />

*/<br />

The prototype of this API is as follows.<br />

void unregister_hardware_function(<strong>P4080</strong>_HW_FUNCTIONS func_id);<br />

func_id – Hardware function identifier based on “enum <strong>P4080</strong>_HW_FUNCTIONS”<br />

/**<br />

* API: get_p4080_address : It converts an address that belongs to Host domain<br />

* into <strong>P4080</strong> PCIE domain address. The converted address will be the<br />

* pcie address * in <strong>P4080</strong> domain. When accessed by <strong>P4080</strong> software or<br />

hardware,<br />

* in the <strong>P4080</strong>->Host direction, the address gets translated into<br />

* Host domain address<br />

* using outbound ATMU. The Host address 0x0 is mapped into 0xC_0000_0000 <strong>PCIe</strong><br />

* address on <strong>P4080</strong>.<br />

*<br />

* @host_address – Address belongs to Host domain.<br />

*<br />

* @return – Address belongs to <strong>P4080</strong> PCIE domain.<br />

*/<br />

unsigned long long get_p4080_address(unsigned long long host_address);<br />

host_address – Address in Host domain that needs to be converted into <strong>P4080</strong> domain<br />

address.<br />

/**<br />

* API: convert_p4080_add_to_host_virt : It converts an address belonging<br />

© Freescale Semiconductor, Inc., 2011. All rights reserved.<br />

Freescale Confidential Proprietary Page 72

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!