arch/mips/bcm63xx/dev-usb-usbd.c
Source file repositories/reference/linux-study-clean/arch/mips/bcm63xx/dev-usb-usbd.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/bcm63xx/dev-usb-usbd.c- Extension
.c- Size
- 1881 bytes
- Lines
- 66
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/kernel.hlinux/platform_device.hlinux/dma-mapping.hbcm63xx_cpu.hbcm63xx_dev_usb_usbd.h
Detected Declarations
function bcm63xx_usbd_register
Annotated Snippet
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <bcm63xx_cpu.h>
#include <bcm63xx_dev_usb_usbd.h>
#define NUM_MMIO 2
#define NUM_IRQ 7
static struct resource usbd_resources[NUM_MMIO + NUM_IRQ];
static u64 usbd_dmamask = DMA_BIT_MASK(32);
static struct platform_device bcm63xx_usbd_device = {
.name = "bcm63xx_udc",
.id = -1,
.num_resources = ARRAY_SIZE(usbd_resources),
.resource = usbd_resources,
.dev = {
.dma_mask = &usbd_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
int __init bcm63xx_usbd_register(const struct bcm63xx_usbd_platform_data *pd)
{
const int irq_list[NUM_IRQ] = { IRQ_USBD,
IRQ_USBD_RXDMA0, IRQ_USBD_TXDMA0,
IRQ_USBD_RXDMA1, IRQ_USBD_TXDMA1,
IRQ_USBD_RXDMA2, IRQ_USBD_TXDMA2 };
int i;
if (!BCMCPU_IS_6328() && !BCMCPU_IS_6368())
return 0;
usbd_resources[0].start = bcm63xx_regset_address(RSET_USBD);
usbd_resources[0].end = usbd_resources[0].start + RSET_USBD_SIZE - 1;
usbd_resources[0].flags = IORESOURCE_MEM;
usbd_resources[1].start = bcm63xx_regset_address(RSET_USBDMA);
usbd_resources[1].end = usbd_resources[1].start + RSET_USBDMA_SIZE - 1;
usbd_resources[1].flags = IORESOURCE_MEM;
for (i = 0; i < NUM_IRQ; i++) {
struct resource *r = &usbd_resources[NUM_MMIO + i];
r->start = r->end = bcm63xx_get_irq_number(irq_list[i]);
r->flags = IORESOURCE_IRQ;
}
platform_device_add_data(&bcm63xx_usbd_device, pd, sizeof(*pd));
return platform_device_register(&bcm63xx_usbd_device);
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/platform_device.h`, `linux/dma-mapping.h`, `bcm63xx_cpu.h`, `bcm63xx_dev_usb_usbd.h`.
- Detected declarations: `function bcm63xx_usbd_register`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source implementation candidate.
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.