Documentation/misc-devices/spear-pcie-gadget.rst
Source file repositories/reference/linux-study-clean/Documentation/misc-devices/spear-pcie-gadget.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/misc-devices/spear-pcie-gadget.rst- Extension
.rst- Size
- 4440 bytes
- Lines
- 171
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
========================
Spear PCIe Gadget Driver
========================
Author
======
Pratyush Anand (pratyush.anand@gmail.com)
Location
========
driver/misc/spear13xx_pcie_gadget.c
Supported Chip:
===============
SPEAr1300
SPEAr1310
Menuconfig option:
==================
Device Drivers
Misc devices
PCIe gadget support for SPEAr13XX platform
purpose
=======
This driver has several nodes which can be read/written by configfs interface.
Its main purpose is to configure selected dual mode PCIe controller as device
and then program its various registers to configure it as a particular device
type. This driver can be used to show spear's PCIe device capability.
Description of different nodes:
===============================
read behavior of nodes:
-----------------------
=============== ==============================================================
link gives ltssm status.
int_type type of supported interrupt
no_of_msi zero if MSI is not enabled by host. A positive value is the
number of MSI vector granted.
vendor_id returns programmed vendor id (hex)
device_id returns programmed device id(hex)
bar0_size: returns size of bar0 in hex.
bar0_address returns address of bar0 mapped area in hex.
bar0_rw_offset returns offset of bar0 for which bar0_data will return value.
bar0_data returns data at bar0_rw_offset.
=============== ==============================================================
write behavior of nodes:
------------------------
=============== ================================================================
link write UP to enable ltsmm DOWN to disable
int_type write interrupt type to be configured and (int_type could be
INTA, MSI or NO_INT). Select MSI only when you have programmed
no_of_msi node.
no_of_msi number of MSI vector needed.
inta write 1 to assert INTA and 0 to de-assert.
send_msi write MSI vector to be sent.
vendor_id write vendor id(hex) to be programmed.
device_id write device id(hex) to be programmed.
bar0_size write size of bar0 in hex. default bar0 size is 1000 (hex)
bytes.
bar0_address write address of bar0 mapped area in hex. (default mapping of
bar0 is SYSRAM1(E0800000). Always program bar size before bar
address. Kernel might modify bar size and address for alignment,
so read back bar size and address after writing to cross check.
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.