arch/mips/cavium-octeon/flash_setup.c

Source file repositories/reference/linux-study-clean/arch/mips/cavium-octeon/flash_setup.c

File Facts

System
Linux kernel
Corpus path
arch/mips/cavium-octeon/flash_setup.c
Extension
.c
Size
3716 bytes
Lines
145
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.

Dependency Surface

Detected Declarations

Annotated Snippet

if (mymtd) {
			mymtd->owner = THIS_MODULE;
			mtd_device_parse_register(mymtd, part_probe_types,
						  NULL, NULL, 0);
		} else {
			pr_err("Failed to register MTD device for flash\n");
		}
	}
	return 0;
}

static const struct of_device_id of_flash_match[] = {
	{
		.compatible	= "cfi-flash",
	},
	{ },
};
MODULE_DEVICE_TABLE(of, of_flash_match);

static struct platform_driver of_flash_driver = {
	.driver = {
		.name = "octeon-of-flash",
		.of_match_table = of_flash_match,
	},
	.probe		= octeon_flash_probe,
};

static int octeon_flash_init(void)
{
	return platform_driver_register(&of_flash_driver);
}
late_initcall(octeon_flash_init);

MODULE_LICENSE("GPL");

Annotation

Implementation Notes