arch/sh/kernel/cpu/sh4a/setup-shx3.c

Source file repositories/reference/linux-study-clean/arch/sh/kernel/cpu/sh4a/setup-shx3.c

File Facts

System
Linux kernel
Corpus path
arch/sh/kernel/cpu/sh4a/setup-shx3.c
Extension
.c
Size
12552 bytes
Lines
397
Domain
Architecture Layer
Bucket
arch/sh
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 (unlikely(ret)) {
			pr_err("Failed to set IRQ mode\n");
			return;
		}

		register_intc_controller(&intc_desc_irq);
		break;
	case IRQ_MODE_IRL3210:
		ret |= gpio_request(GPIO_FN_IRL3, intc_desc_irl.name);
		ret |= gpio_request(GPIO_FN_IRL2, intc_desc_irl.name);
		ret |= gpio_request(GPIO_FN_IRL1, intc_desc_irl.name);
		ret |= gpio_request(GPIO_FN_IRL0, intc_desc_irl.name);

		if (unlikely(ret)) {
			pr_err("Failed to set IRL mode\n");
			return;
		}

		register_intc_controller(&intc_desc_irl);
		break;
	default:
		BUG();
	}
}

void __init plat_irq_setup(void)
{
	register_intc_controller(&intc_desc);
}

void __init plat_mem_setup(void)
{
	unsigned int nid = 1;

	/* Register CPU#0 URAM space as Node 1 */
	setup_bootmem_node(nid++, 0x145f0000, 0x14610000);	/* CPU0 */

#if 0
	/* XXX: Not yet.. */
	setup_bootmem_node(nid++, 0x14df0000, 0x14e10000);	/* CPU1 */
	setup_bootmem_node(nid++, 0x155f0000, 0x15610000);	/* CPU2 */
	setup_bootmem_node(nid++, 0x15df0000, 0x15e10000);	/* CPU3 */
#endif

	setup_bootmem_node(nid++, 0x16000000, 0x16020000);	/* CSM */
}

Annotation

Implementation Notes