arch/sh/boards/mach-kfr2r09/setup.c
Source file repositories/reference/linux-study-clean/arch/sh/boards/mach-kfr2r09/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sh/boards/mach-kfr2r09/setup.c- Extension
.c- Size
- 16150 bytes
- Lines
- 650
- Domain
- Architecture Layer
- Bucket
- arch/sh
- 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.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/clock.hasm/io.hasm/machvec.hasm/suspend.hcpu/sh7724.hlinux/clkdev.hlinux/delay.hlinux/gpio.hlinux/gpio/machine.hlinux/i2c.hlinux/init.hlinux/input.hlinux/input/sh_keysc.hlinux/interrupt.hlinux/memblock.hlinux/mmc/host.hlinux/mtd/physmap.hlinux/platform_data/lv5207lp.hlinux/platform_data/tmio.hlinux/platform_device.hlinux/regulator/fixed.hlinux/regulator/machine.hlinux/sh_intc.hlinux/usb/r8a66597.hlinux/videodev2.hlinux/dma-map-ops.hmach/kfr2r09.hmedia/drv-intf/renesas-ceu.hmedia/i2c/rj54n1cb0c.hvideo/sh_mobile_lcdc.h
Detected Declarations
function kfr2r09_usb0_gadget_i2c_setupfunction kfr2r09_serial_i2c_setupfunction kfr2r09_usb0_gadget_i2c_setupfunction kfr2r09_serial_i2c_setupfunction kfr2r09_usb0_gadget_setupfunction kfr2r09_devices_setupfunction kfr2r09_mode_pinsfunction kfr2r09_mv_mem_reservemodule init kfr2r09_devices_setup
Annotated Snippet
device_initcall(kfr2r09_devices_setup);
/* Return the board specific boot mode pin configuration */
static int kfr2r09_mode_pins(void)
{
/* MD0=1, MD1=1, MD2=0: Clock Mode 3
* MD3=0: 16-bit Area0 Bus Width
* MD5=1: Little Endian
* MD8=1: Test Mode Disabled
*/
return MODE_PIN0 | MODE_PIN1 | MODE_PIN5 | MODE_PIN8;
}
/* Reserve a portion of memory for CEU buffers */
static void __init kfr2r09_mv_mem_reserve(void)
{
phys_addr_t phys;
phys_addr_t size = CEU_BUFFER_MEMORY_SIZE;
phys = memblock_phys_alloc(size, PAGE_SIZE);
if (!phys)
panic("Failed to allocate CEU memory\n");
memblock_phys_free(phys, size);
memblock_remove(phys, size);
ceu_dma_membase = phys;
}
/*
* The Machine Vector
*/
static struct sh_machine_vector mv_kfr2r09 __initmv = {
.mv_name = "kfr2r09",
.mv_mode_pins = kfr2r09_mode_pins,
.mv_mem_reserve = kfr2r09_mv_mem_reserve,
};
Annotation
- Immediate include surface: `asm/clock.h`, `asm/io.h`, `asm/machvec.h`, `asm/suspend.h`, `cpu/sh7724.h`, `linux/clkdev.h`, `linux/delay.h`, `linux/gpio.h`.
- Detected declarations: `function kfr2r09_usb0_gadget_i2c_setup`, `function kfr2r09_serial_i2c_setup`, `function kfr2r09_usb0_gadget_i2c_setup`, `function kfr2r09_serial_i2c_setup`, `function kfr2r09_usb0_gadget_setup`, `function kfr2r09_devices_setup`, `function kfr2r09_mode_pins`, `function kfr2r09_mv_mem_reserve`, `module init kfr2r09_devices_setup`.
- Atlas domain: Architecture Layer / arch/sh.
- Implementation status: integration 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.