arch/sh/boards/mach-highlander/setup.c
Source file repositories/reference/linux-study-clean/arch/sh/boards/mach-highlander/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sh/boards/mach-highlander/setup.c- Extension
.c- Size
- 9151 bytes
- Lines
- 417
- 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/io.hlinux/platform_device.hlinux/ata_platform.hlinux/types.hlinux/mtd/physmap.hlinux/i2c.hlinux/irq.hlinux/interrupt.hlinux/usb/r8a66597.hlinux/usb/m66592.hlinux/clkdev.hnet/ax88796.hasm/machvec.hmach/highlander.hasm/clock.hasm/heartbeat.hasm/io.hasm/io_trapped.h
Detected Declarations
function r7780rp_devices_setupfunction ivdr_clk_enablefunction ivdr_clk_disablefunction r7780rp_power_offfunction highlander_setupfunction highlander_irq_demuxfunction highlander_init_irqmodule init r7780rp_devices_setup
Annotated Snippet
device_initcall(r7780rp_devices_setup);
/*
* Platform specific clocks
*/
static int ivdr_clk_enable(struct clk *clk)
{
__raw_writew(__raw_readw(PA_IVDRCTL) | (1 << IVDR_CK_ON), PA_IVDRCTL);
return 0;
}
static void ivdr_clk_disable(struct clk *clk)
{
__raw_writew(__raw_readw(PA_IVDRCTL) & ~(1 << IVDR_CK_ON), PA_IVDRCTL);
}
static struct sh_clk_ops ivdr_clk_ops = {
.enable = ivdr_clk_enable,
.disable = ivdr_clk_disable,
};
static struct clk ivdr_clk = {
.ops = &ivdr_clk_ops,
};
static struct clk *r7780rp_clocks[] = {
&ivdr_clk,
};
static struct clk_lookup lookups[] = {
/* main clocks */
CLKDEV_CON_ID("ivdr_clk", &ivdr_clk),
};
static void r7780rp_power_off(void)
{
if (mach_is_r7780mp() || mach_is_r7785rp())
__raw_writew(0x0001, PA_POFF);
}
/*
* Initialize the board
*/
static void __init highlander_setup(char **cmdline_p)
{
u16 ver = __raw_readw(PA_VERREG);
int i;
printk(KERN_INFO "Renesas Solutions Highlander %s support.\n",
mach_is_r7780rp() ? "R7780RP-1" :
mach_is_r7780mp() ? "R7780MP" :
"R7785RP");
printk(KERN_INFO "Board version: %d (revision %d), "
"FPGA version: %d (revision %d)\n",
(ver >> 12) & 0xf, (ver >> 8) & 0xf,
(ver >> 4) & 0xf, ver & 0xf);
highlander_plat_pinmux_setup();
/*
* Enable the important clocks right away..
*/
for (i = 0; i < ARRAY_SIZE(r7780rp_clocks); i++) {
struct clk *clk = r7780rp_clocks[i];
clk_register(clk);
clk_enable(clk);
}
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
__raw_writew(0x0000, PA_OBLED); /* Clear LED. */
if (mach_is_r7780rp())
__raw_writew(0x0001, PA_SDPOW); /* SD Power ON */
__raw_writew(__raw_readw(PA_IVDRCTL) | 0x01, PA_IVDRCTL); /* Si13112 */
pm_power_off = r7780rp_power_off;
}
static unsigned char irl2irq[HL_NR_IRL];
static int highlander_irq_demux(int irq)
{
if (irq >= HL_NR_IRL + 16 || irq < 16 || !irl2irq[irq - 16])
return irq;
return irl2irq[irq - 16];
Annotation
- Immediate include surface: `linux/init.h`, `linux/io.h`, `linux/platform_device.h`, `linux/ata_platform.h`, `linux/types.h`, `linux/mtd/physmap.h`, `linux/i2c.h`, `linux/irq.h`.
- Detected declarations: `function r7780rp_devices_setup`, `function ivdr_clk_enable`, `function ivdr_clk_disable`, `function r7780rp_power_off`, `function highlander_setup`, `function highlander_irq_demux`, `function highlander_init_irq`, `module init r7780rp_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.