lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221021155000.4108406-5-arnd@kernel.org>
Date:   Fri, 21 Oct 2022 17:49:34 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     linux-arm-kernel@...ts.infradead.org,
        Russell King <linux@...linux.org.uk>,
        Linus Walleij <linus.walleij@...aro.org>,
        Lubomir Rintel <lkundrak@...sk>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Viresh Kumar <viresh.kumar@...aro.org>
Cc:     linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        linux-pm@...r.kernel.org
Subject: [PATCH 04/11] ARM: sa1100: make cpufreq driver build standalone

From: Arnd Bergmann <arnd@...db.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@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ