arch/arm/mach-orion5x/ts209-setup.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-orion5x/ts209-setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-orion5x/ts209-setup.c- Extension
.c- Size
- 8677 bytes
- Lines
- 332
- 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.
- 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/gpio.hlinux/kernel.hlinux/init.hlinux/platform_device.hlinux/pci.hlinux/irq.hlinux/mtd/physmap.hlinux/mtd/rawnand.hlinux/mv643xx_eth.hlinux/gpio_keys.hlinux/input.hlinux/i2c.hlinux/serial_reg.hlinux/ata_platform.hasm/mach-types.hasm/mach/arch.hasm/mach/pci.hcommon.hmpp.horion5x.htsx09-common.h
Detected Declarations
function qnap_ts209_pci_preinitfunction qnap_ts209_pci_map_irqfunction qnap_ts209_pci_initfunction qnap_ts209_initmodule init qnap_ts209_pci_init
Annotated Snippet
subsys_initcall(qnap_ts209_pci_init);
/*****************************************************************************
* RTC S35390A on I2C bus
****************************************************************************/
#define TS209_RTC_GPIO 3
static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = {
I2C_BOARD_INFO("s35390a", 0x30),
.irq = 0,
};
/****************************************************************************
* GPIO Attached Keys
* Power button is attached to the PIC microcontroller
****************************************************************************/
#define QNAP_TS209_GPIO_KEY_MEDIA 1
#define QNAP_TS209_GPIO_KEY_RESET 2
static struct gpio_keys_button qnap_ts209_buttons[] = {
{
.code = KEY_COPY,
.gpio = QNAP_TS209_GPIO_KEY_MEDIA,
.desc = "USB Copy Button",
.active_low = 1,
}, {
.code = KEY_RESTART,
.gpio = QNAP_TS209_GPIO_KEY_RESET,
.desc = "Reset Button",
.active_low = 1,
},
};
static struct gpio_keys_platform_data qnap_ts209_button_data = {
.buttons = qnap_ts209_buttons,
.nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
};
static struct platform_device qnap_ts209_button_device = {
.name = "gpio-keys",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &qnap_ts209_button_data,
},
};
/*****************************************************************************
* SATA
****************************************************************************/
static struct mv_sata_platform_data qnap_ts209_sata_data = {
.n_ports = 2,
};
/*****************************************************************************
* General Setup
****************************************************************************/
static unsigned int ts209_mpp_modes[] __initdata = {
MPP0_UNUSED,
MPP1_GPIO, /* USB copy button */
MPP2_GPIO, /* Load defaults button */
MPP3_GPIO, /* GPIO RTC */
MPP4_UNUSED,
MPP5_UNUSED,
MPP6_GPIO, /* PCI Int A */
MPP7_GPIO, /* PCI Int B */
MPP8_UNUSED,
MPP9_UNUSED,
MPP10_UNUSED,
MPP11_UNUSED,
MPP12_SATA_LED, /* SATA 0 presence */
MPP13_SATA_LED, /* SATA 1 presence */
MPP14_SATA_LED, /* SATA 0 active */
MPP15_SATA_LED, /* SATA 1 active */
MPP16_UART, /* UART1 RXD */
MPP17_UART, /* UART1 TXD */
MPP18_GPIO, /* SW_RST */
MPP19_UNUSED,
0,
};
static void __init qnap_ts209_init(void)
{
/*
* Setup basic Orion functions. Need to be called early.
*/
orion5x_init();
Annotation
- Immediate include surface: `linux/gpio.h`, `linux/kernel.h`, `linux/init.h`, `linux/platform_device.h`, `linux/pci.h`, `linux/irq.h`, `linux/mtd/physmap.h`, `linux/mtd/rawnand.h`.
- Detected declarations: `function qnap_ts209_pci_preinit`, `function qnap_ts209_pci_map_irq`, `function qnap_ts209_pci_init`, `function qnap_ts209_init`, `module init qnap_ts209_pci_init`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.