From: Arnd Bergmann <arnd@kernel.org>
To: linux-arm-kernel@lists.infradead.org,
Russell King <linux@armlinux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
Lubomir Rintel <lkundrak@v3.sk>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
linux-pm@vger.kernel.org
Subject: [PATCH 04/11] ARM: sa1100: make cpufreq driver build standalone
Date: Fri, 21 Oct 2022 17:49:34 +0200 [thread overview]
Message-ID: <20221021155000.4108406-5-arnd@kernel.org> (raw)
In-Reply-To: <20221021155000.4108406-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
Commit 59a2e613d07f ("cpufreq: sa11x0: move cpufreq driver
to drivers/cpufreq") added an unnecessary reference to
mach/generic.h. Just remove it again after moving the code
into the corresponding driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-sa1100/generic.c | 32 ---------------------
arch/arm/mach-sa1100/generic.h | 4 ---
arch/arm/mach-sa1100/include/mach/generic.h | 1 -
drivers/cpufreq/sa1110-cpufreq.c | 32 +++++++++++++++++++++
4 files changed, 32 insertions(+), 37 deletions(-)
delete mode 100644 arch/arm/mach-sa1100/include/mach/generic.h
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 6c21f214cd60..424f08eece20 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -39,38 +39,6 @@
#include "generic.h"
#include <clocksource/pxa.h>
-#define NR_FREQS 16
-
-/*
- * This table is setup for a 3.6864MHz Crystal.
- */
-struct cpufreq_frequency_table sa11x0_freq_table[NR_FREQS+1] = {
- { .frequency = 59000, /* 59.0 MHz */},
- { .frequency = 73700, /* 73.7 MHz */},
- { .frequency = 88500, /* 88.5 MHz */},
- { .frequency = 103200, /* 103.2 MHz */},
- { .frequency = 118000, /* 118.0 MHz */},
- { .frequency = 132700, /* 132.7 MHz */},
- { .frequency = 147500, /* 147.5 MHz */},
- { .frequency = 162200, /* 162.2 MHz */},
- { .frequency = 176900, /* 176.9 MHz */},
- { .frequency = 191700, /* 191.7 MHz */},
- { .frequency = 206400, /* 206.4 MHz */},
- { .frequency = 221200, /* 221.2 MHz */},
- { .frequency = 235900, /* 235.9 MHz */},
- { .frequency = 250700, /* 250.7 MHz */},
- { .frequency = 265400, /* 265.4 MHz */},
- { .frequency = 280200, /* 280.2 MHz */},
- { .frequency = CPUFREQ_TABLE_END, },
-};
-
-unsigned int sa11x0_getspeed(unsigned int cpu)
-{
- if (cpu)
- return 0;
- return sa11x0_freq_table[PPCR & 0xf].frequency;
-}
-
/*
* Default power-off for SA1100
*/
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index 158a4fd5ca24..cc891c57d306 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -4,7 +4,6 @@
*
* Author: Nicolas Pitre
*/
-#include <linux/cpufreq.h>
#include <linux/reboot.h>
extern void sa1100_timer_init(void);
@@ -21,9 +20,6 @@ extern void sa11x0_init_late(void);
extern void sa1110_mb_enable(void);
extern void sa1110_mb_disable(void);
-extern struct cpufreq_frequency_table sa11x0_freq_table[];
-extern unsigned int sa11x0_getspeed(unsigned int cpu);
-
struct flash_platform_data;
struct resource;
diff --git a/arch/arm/mach-sa1100/include/mach/generic.h b/arch/arm/mach-sa1100/include/mach/generic.h
deleted file mode 100644
index 665542e0c9e2..000000000000
--- a/arch/arm/mach-sa1100/include/mach/generic.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../generic.h"
diff --git a/drivers/cpufreq/sa1110-cpufreq.c b/drivers/cpufreq/sa1110-cpufreq.c
index bb7f591a8b05..ce636c1147a6 100644
--- a/drivers/cpufreq/sa1110-cpufreq.c
+++ b/drivers/cpufreq/sa1110-cpufreq.c
@@ -29,6 +29,38 @@
#undef DEBUG
+#define NR_FREQS 16
+
+/*
+ * This table is setup for a 3.6864MHz Crystal.
+ */
+static struct cpufreq_frequency_table sa11x0_freq_table[NR_FREQS+1] = {
+ { .frequency = 59000, /* 59.0 MHz */},
+ { .frequency = 73700, /* 73.7 MHz */},
+ { .frequency = 88500, /* 88.5 MHz */},
+ { .frequency = 103200, /* 103.2 MHz */},
+ { .frequency = 118000, /* 118.0 MHz */},
+ { .frequency = 132700, /* 132.7 MHz */},
+ { .frequency = 147500, /* 147.5 MHz */},
+ { .frequency = 162200, /* 162.2 MHz */},
+ { .frequency = 176900, /* 176.9 MHz */},
+ { .frequency = 191700, /* 191.7 MHz */},
+ { .frequency = 206400, /* 206.4 MHz */},
+ { .frequency = 221200, /* 221.2 MHz */},
+ { .frequency = 235900, /* 235.9 MHz */},
+ { .frequency = 250700, /* 250.7 MHz */},
+ { .frequency = 265400, /* 265.4 MHz */},
+ { .frequency = 280200, /* 280.2 MHz */},
+ { .frequency = CPUFREQ_TABLE_END, },
+};
+
+static unsigned int sa11x0_getspeed(unsigned int cpu)
+{
+ if (cpu)
+ return 0;
+ return sa11x0_freq_table[PPCR & 0xf].frequency;
+}
+
struct sdram_params {
const char name[20];
u_char rows; /* bits */
--
2.29.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-21 15:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 15:49 [PATCH 00/11] ARM: sa1100, mmp: drop unused board files Arnd Bergmann
2022-10-21 15:49 ` [PATCH 01/11] ARM: sa1100: un-deprecate jornada720 Arnd Bergmann
2022-10-21 15:49 ` [PATCH 02/11] ARM: sa1100: remove unused board files Arnd Bergmann
2022-10-22 10:31 ` Greg Kroah-Hartman
2022-10-25 5:10 ` Viresh Kumar
2022-10-31 15:18 ` Lee Jones
2022-10-31 19:55 ` Linus Walleij
2022-10-21 15:49 ` [PATCH 03/11] ARM: sa1100: remove irda references Arnd Bergmann
2022-10-21 15:49 ` Arnd Bergmann [this message]
2022-10-25 5:07 ` [PATCH 04/11] ARM: sa1100: make cpufreq driver build standalone Viresh Kumar
2022-10-25 8:28 ` Russell King (Oracle)
2022-10-25 10:14 ` Arnd Bergmann
2022-10-25 12:12 ` Russell King (Oracle)
2022-10-21 15:49 ` [PATCH 05/11] cpufreq: remove sa1100 driver Arnd Bergmann
2022-10-25 5:07 ` Viresh Kumar
2022-10-21 15:49 ` [PATCH 06/11] mtd: remove lart flash driver Arnd Bergmann
2022-11-07 16:22 ` Miquel Raynal
2022-10-21 15:49 ` [PATCH 07/11] ARM: mmp: select specific CPU implementation Arnd Bergmann
2022-10-21 15:49 ` [PATCH 08/11] ARM: mmp: remove all board files Arnd Bergmann
2022-10-21 15:49 ` [PATCH 09/11] ARM: mmp: remove custom sram code Arnd Bergmann
2022-11-04 14:07 ` Vinod Koul
2022-10-21 15:49 ` [PATCH 10/11] ARM: mmp: remove device definitions Arnd Bergmann
2022-10-21 15:49 ` [PATCH 11/11] ARM: mmp: remove old PM support Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221021155000.4108406-5-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lkundrak@v3.sk \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).