summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2020-11-28 22:39:26 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-12-07 11:27:11 +0100
commit33e6bdbe9e667766ebabc1ad754f7cca74021723 (patch)
treecac3a21c12df67cea3d8dc9f9741c8b4ad8f641d
parenta79f7ca0d7d5c194ab03219ae662e31aff5f49c9 (diff)
downloadbarebox-33e6bdbe9e667766ebabc1ad754f7cca74021723.tar.gz
barebox-33e6bdbe9e667766ebabc1ad754f7cca74021723.tar.xz
ARM: rpi: make functions in rpi-common.c static
They aren't (and arguably shouldn't) be used outside, so give them all internal linkage and drop the header. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/raspberry-pi/rpi-common.c22
-rw-r--r--arch/arm/boards/raspberry-pi/rpi.h24
2 files changed, 16 insertions, 30 deletions
diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index d5995fb86d..2535146af4 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -25,9 +25,19 @@
#include <mach/mbox.h>
#include <mach/platform.h>
-#include "rpi.h"
#include "lowlevel.h"
+struct rpi_model {
+ const char *name;
+ void (*init)(void);
+};
+
+#define RPI_MODEL(_id, _name, _init) \
+ [_id] = { \
+ .name = _name,\
+ .init = _init,\
+ }
+
struct msg_get_arm_mem {
struct bcm2835_mbox_hdr hdr;
struct bcm2835_mbox_tag_get_arm_mem get_arm_mem;
@@ -85,7 +95,7 @@ static struct clk *rpi_register_firmware_clock(u32 clock_id, const char *name)
return clk_fixed(name, msg->get_clock_rate.body.resp.rate_hz);
}
-void rpi_set_usbethaddr(void)
+static void rpi_set_usbethaddr(void)
{
BCM2835_MBOX_STACK_ALIGN(struct msg_get_mac_address, msg);
int ret;
@@ -103,7 +113,7 @@ void rpi_set_usbethaddr(void)
eth_register_ethaddr(0, msg->get_mac_address.body.resp.mac);
}
-struct gpio_led rpi_leds[] = {
+static struct gpio_led rpi_leds[] = {
{
.gpio = -EINVAL,
.led = {
@@ -149,7 +159,7 @@ static void rpi_b_plus_init(void)
}
/* See comments in mbox.h for data source */
-const struct rpi_model rpi_models_old_scheme[] = {
+static const struct rpi_model rpi_models_old_scheme[] = {
RPI_MODEL(0, "Unknown model", NULL),
RPI_MODEL(BCM2835_BOARD_REV_B_I2C0_2, "Model B (no P5)", rpi_b_init),
RPI_MODEL(BCM2835_BOARD_REV_B_I2C0_3, "Model B (no P5)", rpi_b_init),
@@ -170,7 +180,7 @@ const struct rpi_model rpi_models_old_scheme[] = {
RPI_MODEL(BCM2835_BOARD_REV_A_PLUS_15, "Model A+", NULL),
};
-const struct rpi_model rpi_models_new_scheme[] = {
+static const struct rpi_model rpi_models_new_scheme[] = {
RPI_MODEL(BCM2835_BOARD_REV_A, "Model A", NULL ),
RPI_MODEL(BCM2835_BOARD_REV_B, "Model B", rpi_b_init ),
RPI_MODEL(BCM2835_BOARD_REV_A_PLUS, "Model A+", NULL ),
@@ -191,7 +201,7 @@ const struct rpi_model rpi_models_new_scheme[] = {
};
static int rpi_board_rev = 0;
-const struct rpi_model *model = NULL;
+static const struct rpi_model *model = NULL;
static void rpi_get_board_rev(void)
{
diff --git a/arch/arm/boards/raspberry-pi/rpi.h b/arch/arm/boards/raspberry-pi/rpi.h
deleted file mode 100644
index b2a0401bd0..0000000000
--- a/arch/arm/boards/raspberry-pi/rpi.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __ARCH_ARM_BOARDS_RPI_H__
-#define __ARCH_ARM_BOARDS_RPI_H__
-
-#include <types.h>
-#include <led.h>
-
-#include <mach/mbox.h>
-
-#define RPI_MODEL(_id, _name, _init) \
- [_id] = { \
- .name = _name,\
- .init = _init,\
- }
-
-struct rpi_model {
- const char *name;
- void (*init)(void);
-};
-
-extern struct gpio_led rpi_leds[];
-
-void rpi_set_usbethaddr(void);
-
-#endif /* __ARCH_ARM_BOARDS_RPI_H__ */