From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A9973E2ADA; Thu, 25 Jun 2026 12:19:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782389996; cv=none; b=CaB0Wc04I2ZLL7TePqr8X/xTS1tLC4TkRmSeKtVsqB7cqT6onJQgBK8zA+I1D1mqzXhHvJ8+QGq0l5FlGJU1A+bLLppTQHNyQrmjvXwMOcD+K0RZt4mqe+Oqy4OUEaQI/Ezha93d3tP/q5azMVgqWhfCq6I0iJpYe0OhbdeOPEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782389996; c=relaxed/simple; bh=upjm9w+/wSI8676/e4fSBgvD1BczjdUW8PBvux1DzMY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ctZ1f5iRlb25hqTB4iWpHLZWECZFKZNbcML+ftZa8XOD7uQTvRJNV/YulfW0nLc3p+G3n+6rV/XXxhxrK9jLhFzGEnNC7o/FLsxxKZMzIOnB9GA9VCcIC4Z8+j4kUnOIpeZnuuTEaMgTM2s/8mYUM5/E4FlIdwmjWMAwJPdlZuA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 556871F000E9; Thu, 25 Jun 2026 12:19:53 +0000 (UTC) From: Geert Uytterhoeven To: Thomas Bogendoerfer , Linus Walleij , Bartosz Golaszewski , Arnd Bergmann Cc: linux-mips@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 8/9] MIPS: TXX9: Convert gpio_txx9 to dynamic GPIO base allocation Date: Thu, 25 Jun 2026 14:19:29 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Static allocation of GPIO base is deprecated, use dynamic allocation. Signed-off-by: Geert Uytterhoeven --- arch/mips/include/asm/txx9pio.h | 3 +-- arch/mips/kernel/gpio_txx9.c | 5 ++--- arch/mips/txx9/rbtx4927/setup.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/mips/include/asm/txx9pio.h b/arch/mips/include/asm/txx9pio.h index 3d6fa9f8d5135411..c33a977244005479 100644 --- a/arch/mips/include/asm/txx9pio.h +++ b/arch/mips/include/asm/txx9pio.h @@ -23,7 +23,6 @@ struct txx9_pio_reg { __u32 maskext; }; -int txx9_gpio_init(unsigned long baseaddr, - unsigned int base, unsigned int num); +int txx9_gpio_init(unsigned long baseaddr, unsigned int num); #endif /* __ASM_TXX9PIO_H */ diff --git a/arch/mips/kernel/gpio_txx9.c b/arch/mips/kernel/gpio_txx9.c index 96ac40d20c238018..b2e73263d94c8419 100644 --- a/arch/mips/kernel/gpio_txx9.c +++ b/arch/mips/kernel/gpio_txx9.c @@ -76,13 +76,12 @@ static struct gpio_chip txx9_gpio_chip = { .label = "TXx9", }; -int __init txx9_gpio_init(unsigned long baseaddr, - unsigned int base, unsigned int num) +int __init txx9_gpio_init(unsigned long baseaddr, unsigned int num) { txx9_pioptr = ioremap(baseaddr, sizeof(struct txx9_pio_reg)); if (!txx9_pioptr) return -ENODEV; - txx9_gpio_chip.base = base; + txx9_gpio_chip.base = -1; txx9_gpio_chip.ngpio = num; return gpiochip_add_data(&txx9_gpio_chip, NULL); } diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c index 618f6a6ab3de08f1..5b69bff99510e214 100644 --- a/arch/mips/txx9/rbtx4927/setup.c +++ b/arch/mips/txx9/rbtx4927/setup.c @@ -178,7 +178,7 @@ static void __init rbtx4927_gpio_init(void) static void __init rbtx4927_arch_init(void) { - txx9_gpio_init(TX4927_PIO_REG & 0xfffffffffULL, 0, TX4927_NUM_PIO); + txx9_gpio_init(TX4927_PIO_REG & 0xfffffffffULL, TX4927_NUM_PIO); rbtx4927_gpio_init(); @@ -187,7 +187,7 @@ static void __init rbtx4927_arch_init(void) static void __init rbtx4937_arch_init(void) { - txx9_gpio_init(TX4938_PIO_REG & 0xfffffffffULL, 0, TX4938_NUM_PIO); + txx9_gpio_init(TX4938_PIO_REG & 0xfffffffffULL, TX4938_NUM_PIO); rbtx4927_gpio_init(); -- 2.43.0