Skip to content

Commit 04b86dd

Browse files
authored
Configurable GPIO option ARCH_NR_GPIO for x86 architecture (sonic-net#232)
The x86 platform did not allow configuring the maximum number of GPIOs supported, although the ARM platform did. For cisco-8000 platform, each FPGA gpio IP block can support 1K pins. Distributed chassis with Route processor and Fabric card can have 10 such IP blocks, along with additional pins through i2c gpio extenders. This patch supports configurable number of GPIO's at kernel config time similar to ARM platform. Signed-off-by: Madhava Reddy Siddareddygari <msiddare@cisco.com>
1 parent 06a3811 commit 04b86dd

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

patch/cisco-x86-gpio-config.patch

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From 7106f3961be1dc0d921efe5c719ada6096307227 Mon Sep 17 00:00:00 2001
2+
From: Madhava Reddy Siddareddygari <msiddare@cisco.com>
3+
Date: Tue, 10 Aug 2021 12:51:47 -0700
4+
Subject: [PATCH] x86/Kconfig: Introduce ARCH_NR_GPIO
5+
6+
The x86 platform did not allow configuring the maximum number of GPIOs
7+
supported, although the ARM platform did. For cisco-8000 platform,
8+
each FPGA gpio IP block can support 1K pins. Distributed chassis with
9+
Route Processor and Fabric cards can have 10 such IP blocks, along with
10+
additional pins through i2c gpio extenders.
11+
12+
This patch supports configurable number of GPIO's at kernel config time
13+
similar to ARM platform.
14+
15+
Signed-off-by: Madhava Reddy Siddareddygari <msiddare@cisco.com>
16+
---
17+
arch/x86/Kconfig | 9 +++++++++
18+
1 file changed, 9 insertions(+)
19+
20+
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
21+
index d2453b251..e894cd71d 100644
22+
--- a/arch/x86/Kconfig
23+
+++ b/arch/x86/Kconfig
24+
@@ -1033,6 +1033,15 @@ config SCHED_MC_PRIO
25+
26+
If unsure say Y here.
27+
28+
+config ARCH_NR_GPIO
29+
+ int
30+
+ prompt "Maximum number of GPIO's"
31+
+ default 512
32+
+ help
33+
+ Maximum number of GPIOs in the system.
34+
+
35+
+ If unsure, leave the default value.
36+
+
37+
config UP_LATE_INIT
38+
def_bool y
39+
depends on !SMP && X86_LOCAL_APIC
40+
--
41+
2.26.2
42+

patch/series

+4
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,15 @@ net-sch_generic-fix-the-missing-new-qdisc-assignment.patch
8585
0031-backport-nvme-Add-hardware-monitoring-support.patch
8686
0032-platform-mellanox-mlxreg-hotplug-Use-capability-regi.patch
8787

88+
8889
# Cisco patches for 4.19 kernel
8990
cisco-mtd-part.patch
91+
cisco-x86-gpio-config.patch
9092
#
9193
# Marvell platform patches for 4.19
9294
armhf_secondary_boot_online.patch
95+
#
96+
#
9397
############################################################
9498
#
9599
# Internal patches will be added below (placeholder)

0 commit comments

Comments
 (0)