drivers/usb/renesas_usbhs/rza.c

Source file repositories/reference/linux-study-clean/drivers/usb/renesas_usbhs/rza.c

File Facts

System
Linux kernel
Corpus path
drivers/usb/renesas_usbhs/rza.c
Extension
.c
Size
1533 bytes
Lines
57
Domain
Driver Families
Bucket
drivers/usb
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (freq_extal == 12000000) {
			/* Select 12MHz XTAL */
			usbhs_bset(priv, SYSCFG, UCKSEL, UCKSEL);
		} else {
			dev_err(usbhs_priv_to_dev(priv), "A 48MHz USB clock or 12MHz main clock is required.\n");
			return -EIO;
		}
	}

	/* Enable USB PLL (NOTE: ch0 controls both ch0 and ch1) */
	usbhs_bset(priv, SYSCFG, UPLLE, UPLLE);
	usleep_range(1000, 2000);
	usbhs_bset(priv, SUSPMODE, SUSPM, SUSPM);

	return 0;
}

const struct renesas_usbhs_platform_info usbhs_rza1_plat_info = {
	.platform_callback = {
		.hardware_init = usbhs_rza1_hardware_init,
		.get_id = usbhs_get_id_as_gadget,
	},
	.driver_param = {
		.has_new_pipe_configs = 1,
	},
};

Annotation

Implementation Notes