arch/sh/boards/mach-r2d/setup.c
Source file repositories/reference/linux-study-clean/arch/sh/boards/mach-r2d/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sh/boards/mach-r2d/setup.c- Extension
.c- Size
- 7250 bytes
- Lines
- 306
- 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
linux/init.hlinux/platform_device.hlinux/mtd/mtd.hlinux/mtd/partitions.hlinux/mtd/physmap.hlinux/ata_platform.hlinux/sm501.hlinux/sm501-regs.hlinux/pm.hlinux/fb.hlinux/spi/spi.hlinux/spi/spi_bitbang.hasm/machvec.hmach/r2d.hasm/io.hasm/io_trapped.hasm/spi.h
Detected Declarations
function r2d_chip_selectfunction rts7751r2d_devices_setupfunction rts7751r2d_power_offfunction rts7751r2d_setupmodule init rts7751r2d_devices_setup
Annotated Snippet
device_initcall(rts7751r2d_devices_setup);
static void rts7751r2d_power_off(void)
{
__raw_writew(0x0001, PA_POWOFF);
}
/*
* Initialize the board
*/
static void __init rts7751r2d_setup(char **cmdline_p)
{
void __iomem *sm501_reg;
u16 ver = __raw_readw(PA_VERREG);
printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n");
printk(KERN_INFO "FPGA version:%d (revision:%d)\n",
(ver >> 4) & 0xf, ver & 0xf);
__raw_writew(0x0000, PA_OUTPORT);
pm_power_off = rts7751r2d_power_off;
/* sm501 dram configuration:
* ColSizeX = 11 - External Memory Column Size: 256 words.
* APX = 1 - External Memory Active to Pre-Charge Delay: 7 clocks.
* RstX = 1 - External Memory Reset: Normal.
* Rfsh = 1 - Local Memory Refresh to Command Delay: 12 clocks.
* BwC = 1 - Local Memory Block Write Cycle Time: 2 clocks.
* BwP = 1 - Local Memory Block Write to Pre-Charge Delay: 1 clock.
* AP = 1 - Internal Memory Active to Pre-Charge Delay: 7 clocks.
* Rst = 1 - Internal Memory Reset: Normal.
* RA = 1 - Internal Memory Remain in Active State: Do not remain.
*/
sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL;
writel(readl(sm501_reg) | 0x00f107c0, sm501_reg);
}
/*
* The Machine Vector
*/
static struct sh_machine_vector mv_rts7751r2d __initmv = {
.mv_name = "RTS7751R2D",
.mv_setup = rts7751r2d_setup,
.mv_init_irq = init_rts7751r2d_IRQ,
.mv_irq_demux = rts7751r2d_irq_demux,
};
Annotation
- Immediate include surface: `linux/init.h`, `linux/platform_device.h`, `linux/mtd/mtd.h`, `linux/mtd/partitions.h`, `linux/mtd/physmap.h`, `linux/ata_platform.h`, `linux/sm501.h`, `linux/sm501-regs.h`.
- Detected declarations: `function r2d_chip_select`, `function rts7751r2d_devices_setup`, `function rts7751r2d_power_off`, `function rts7751r2d_setup`, `module init rts7751r2d_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.