drivers/pinctrl/renesas/pfc-r8a779h0.c
Source file repositories/reference/linux-study-clean/drivers/pinctrl/renesas/pfc-r8a779h0.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/renesas/pfc-r8a779h0.c- Extension
.c- Size
- 145275 bytes
- Lines
- 4117
- Domain
- Driver Families
- Bucket
- drivers/pinctrl
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/errno.hlinux/io.hlinux/kernel.hsh_pfc.h
Detected Declarations
enum ioctrl_regsfunction r8a779h0_pin_to_pocctrl
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* R8A779H0 processor support - PFC hardware block.
*
* Copyright (C) 2023 Renesas Electronics Corp.
*
* This file is based on the drivers/pinctrl/renesas/pfc-r8a779a0.c
*/
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include "sh_pfc.h"
#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN)
#define CPU_ALL_GP(fn, sfx) \
PORT_GP_CFG_19(0, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33), \
PORT_GP_CFG_29(1, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33), \
PORT_GP_CFG_1(1, 29, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_16(2, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(2, 17, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(2, 19, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_13(3, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33), \
PORT_GP_CFG_1(3, 13, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 14, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 15, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 16, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 17, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 18, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 19, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 20, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 21, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 22, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 23, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 24, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 25, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 26, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 27, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 28, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 29, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 30, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(3, 31, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_14(4, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33), \
PORT_GP_CFG_1(4, 14, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(4, 15, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(4, 21, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(4, 23, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_1(4, 24, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_21(5, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_21(6, fn, sfx, CFG_FLAGS), \
PORT_GP_CFG_21(7, fn, sfx, CFG_FLAGS)
#define CPU_ALL_NOGP(fn) \
PIN_NOGP_CFG(VDDQ_AVB0, "VDDQ_AVB0", fn, SH_PFC_PIN_CFG_IO_VOLTAGE_18_25), \
PIN_NOGP_CFG(VDDQ_AVB1, "VDDQ_AVB1", fn, SH_PFC_PIN_CFG_IO_VOLTAGE_18_25), \
PIN_NOGP_CFG(VDDQ_AVB2, "VDDQ_AVB2", fn, SH_PFC_PIN_CFG_IO_VOLTAGE_18_25)
/*
* F_() : just information
* FM() : macro for FN_xxx / xxx_MARK
*/
/* GPSR0 */
#define GPSR0_18 F_(MSIOF2_RXD, IP2SR0_11_8)
#define GPSR0_17 F_(MSIOF2_SCK, IP2SR0_7_4)
#define GPSR0_16 F_(MSIOF2_TXD, IP2SR0_3_0)
#define GPSR0_15 F_(MSIOF2_SYNC, IP1SR0_31_28)
#define GPSR0_14 F_(MSIOF2_SS1, IP1SR0_27_24)
#define GPSR0_13 F_(MSIOF2_SS2, IP1SR0_23_20)
#define GPSR0_12 F_(MSIOF5_RXD, IP1SR0_19_16)
#define GPSR0_11 F_(MSIOF5_SCK, IP1SR0_15_12)
#define GPSR0_10 F_(MSIOF5_TXD, IP1SR0_11_8)
#define GPSR0_9 F_(MSIOF5_SYNC, IP1SR0_7_4)
#define GPSR0_8 F_(MSIOF5_SS1, IP1SR0_3_0)
#define GPSR0_7 F_(MSIOF5_SS2, IP0SR0_31_28)
#define GPSR0_6 F_(IRQ0_A, IP0SR0_27_24)
#define GPSR0_5 F_(IRQ1_A, IP0SR0_23_20)
#define GPSR0_4 F_(IRQ2_A, IP0SR0_19_16)
#define GPSR0_3 F_(IRQ3_A, IP0SR0_15_12)
#define GPSR0_2 F_(GP0_02, IP0SR0_11_8)
#define GPSR0_1 F_(GP0_01, IP0SR0_7_4)
#define GPSR0_0 F_(GP0_00, IP0SR0_3_0)
/* GPSR1 */
#define GPSR1_29 F_(ERROROUTC_N_A, IP3SR1_23_20)
#define GPSR1_28 F_(HTX3, IP3SR1_19_16)
#define GPSR1_27 F_(HCTS3_N, IP3SR1_15_12)
#define GPSR1_26 F_(HRTS3_N, IP3SR1_11_8)
Annotation
- Immediate include surface: `linux/errno.h`, `linux/io.h`, `linux/kernel.h`, `sh_pfc.h`.
- Detected declarations: `enum ioctrl_regs`, `function r8a779h0_pin_to_pocctrl`.
- Atlas domain: Driver Families / drivers/pinctrl.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.