summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/arch/mips/ralink/rt305x
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-08-31 18:53:34 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-08-31 18:53:34 +0000
commitbe7ba8de2fdef858152092df620fd82981659d50 (patch)
tree2971914b5bc003f8c4c869f601dfa41806714fb9 /target/linux/ramips/files/arch/mips/ralink/rt305x
parent789ea10d57657ce479bbdf3d0e2dd9264510faaa (diff)
[ramips] share machine registration code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17456 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/arch/mips/ralink/rt305x')
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-generic.c21
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c4
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/machine.h16
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c11
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c13
6 files changed, 6 insertions, 60 deletions
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile b/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile
index 981498e85..52231fdcc 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile
@@ -11,5 +11,4 @@ obj-y := prom.o irq.o setup.o devices.o rt305x.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-obj-$(CONFIG_RT305X_MACH_GENERIC) += mach-generic.o
obj-$(CONFIG_RT305X_MACH_WHR_G300N) += mach-whr-g300n.o
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-generic.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-generic.c
deleted file mode 100644
index 3b2b70298..000000000
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-generic.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Generic RT305x machine setup
- *
- * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
- */
-
-#include <linux/init.h>
-
-#include <asm/mips_machine.h>
-
-#include "machine.h"
-
-static void __init rt305x_generic_init(void)
-{
-}
-
-MIPS_MACHINE(RT305X_MACH_GENERIC, "Generic RT305x board", rt305x_generic_init);
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c
index a31fbea39..97fe85737 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c
@@ -16,9 +16,9 @@
#include <linux/leds.h>
#include <asm/mips_machine.h>
+#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev_gpio_leds.h>
-#include "machine.h"
#include "devices.h"
#define WHR_G300N_GPIO_LED_DIAG 7
@@ -93,4 +93,4 @@ static void __init whr_g300n_init(void)
whr_g300n_leds_gpio);
}
-MIPS_MACHINE(RT305X_MACH_WHR_G300N, "Buffalo WHR-G300N", whr_g300n_init);
+MIPS_MACHINE(RAMIPS_MACH_WHR_G300N, "Buffalo WHR-G300N", whr_g300n_init);
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/machine.h b/target/linux/ramips/files/arch/mips/ralink/rt305x/machine.h
deleted file mode 100644
index 4ce0fdeab..000000000
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/machine.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Ralink RT305x SoC specific setup
- *
- * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
- */
-
-enum rt305x_mach_type {
- RT305X_MACH_GENERIC,
- RT305X_MACH_WHR_G300N, /* Buffalo WHR-G300N */
-};
-
-extern enum rt305x_mach_type rt305x_mach;
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c
index 8f5ddf200..774291ab7 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c
@@ -14,14 +14,13 @@
#include <asm/bootinfo.h>
#include <asm/mach-ralink/common.h>
+#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/rt305x.h>
#include <asm/mach-ralink/rt305x_regs.h>
-#include "machine.h"
-
struct board_rec {
char *name;
- enum rt305x_mach_type mach_type;
+ enum ramips_mach_type mach_type;
};
static int rt305x_prom_argc __initdata;
@@ -31,7 +30,7 @@ static char **rt305x_prom_envp __initdata;
static struct board_rec boards[] __initdata = {
{
.name = "WHR-G300N",
- .mach_type = RT305X_MACH_WHR_G300N,
+ .mach_type = RAMIPS_MACH_WHR_G300N,
}
};
@@ -113,11 +112,9 @@ static __init void find_board_byname(char *name)
{
int i;
- rt305x_mach = RT305X_MACH_GENERIC;
-
for (i = 0; i < ARRAY_SIZE(boards); i++)
if (strcmp(name, boards[i].name) == 0) {
- rt305x_mach = boards[i].mach_type;
+ ramips_mach = boards[i].mach_type;
break;
}
}
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c
index ac945b8be..50a8be873 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c
@@ -23,10 +23,6 @@
#include <asm/mach-ralink/rt305x.h>
#include <asm/mach-ralink/rt305x_regs.h>
-#include "machine.h"
-
-enum rt305x_mach_type rt305x_mach;
-
static void rt305x_restart(char *command)
{
rt305x_sysc_wr(RT305X_RESET_SYSTEM, SYSC_REG_RESET_CTRL);
@@ -103,12 +99,3 @@ void __init plat_time_init(void)
{
mips_hpt_frequency = rt305x_cpu_freq / 2;
}
-
-static int __init rt305x_machine_setup(void)
-{
- mips_machine_setup(rt305x_mach);
-
- return 0;
-}
-
-arch_initcall(rt305x_machine_setup);