arch/arm/mach-orion5x/board-mss2.c

Source file repositories/reference/linux-study-clean/arch/arm/mach-orion5x/board-mss2.c

File Facts

System
Linux kernel
Corpus path
arch/arm/mach-orion5x/board-mss2.c
Extension
.c
Size
2168 bytes
Lines
87
Domain
Architecture Layer
Bucket
arch/arm
Inferred role
Architecture Layer: exported/initcall integration point
Status
integration 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

subsys_initcall(mss2_pci_init);

/*****************************************************************************
 * MSS2 power off method
 ****************************************************************************/
/*
 * On the Maxtor Shared Storage II, the shutdown process is the following :
 * - Userland modifies U-boot env to tell U-boot to go idle at next boot
 * - The board reboots
 * - U-boot starts and go into an idle mode until the user press "power"
 */
static void mss2_power_off(void)
{
	u32 reg;

	/*
	 * Enable and issue soft reset
	 */
	reg = readl(RSTOUTn_MASK);
	reg |= 1 << 2;
	writel(reg, RSTOUTn_MASK);

	reg = readl(CPU_SOFT_RESET);
	reg |= 1;
	writel(reg, CPU_SOFT_RESET);
}

void __init mss2_init(void)
{
	/* register mss2 specific power-off method */
	register_platform_power_off(mss2_power_off);
}

Annotation

Implementation Notes