summaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/common
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/au1000/common')
-rw-r--r--arch/mips/au1000/common/irq.c8
-rw-r--r--arch/mips/au1000/common/prom.c26
-rw-r--r--arch/mips/au1000/common/setup.c2
-rw-r--r--arch/mips/au1000/common/time.c2
4 files changed, 19 insertions, 19 deletions
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c
index 29d6f8178ba..316722ee8cf 100644
--- a/arch/mips/au1000/common/irq.c
+++ b/arch/mips/au1000/common/irq.c
@@ -251,7 +251,7 @@ void restore_local_and_enable(int controller, unsigned long mask)
}
-static struct hw_interrupt_type rise_edge_irq_type = {
+static struct irq_chip rise_edge_irq_type = {
.typename = "Au1000 Rise Edge",
.startup = startup_irq,
.shutdown = shutdown_irq,
@@ -261,7 +261,7 @@ static struct hw_interrupt_type rise_edge_irq_type = {
.end = end_irq,
};
-static struct hw_interrupt_type fall_edge_irq_type = {
+static struct irq_chip fall_edge_irq_type = {
.typename = "Au1000 Fall Edge",
.startup = startup_irq,
.shutdown = shutdown_irq,
@@ -271,7 +271,7 @@ static struct hw_interrupt_type fall_edge_irq_type = {
.end = end_irq,
};
-static struct hw_interrupt_type either_edge_irq_type = {
+static struct irq_chip either_edge_irq_type = {
.typename = "Au1000 Rise or Fall Edge",
.startup = startup_irq,
.shutdown = shutdown_irq,
@@ -281,7 +281,7 @@ static struct hw_interrupt_type either_edge_irq_type = {
.end = end_irq,
};
-static struct hw_interrupt_type level_irq_type = {
+static struct irq_chip level_irq_type = {
.typename = "Au1000 Level",
.startup = startup_irq,
.shutdown = shutdown_irq,
diff --git a/arch/mips/au1000/common/prom.c b/arch/mips/au1000/common/prom.c
index ae7d8c57bf3..b4b010a2fe3 100644
--- a/arch/mips/au1000/common/prom.c
+++ b/arch/mips/au1000/common/prom.c
@@ -1,7 +1,7 @@
/*
*
* BRIEF MODULE DESCRIPTION
- * PROM library initialisation code, assuming YAMON is the boot loader.
+ * PROM library initialisation code, supports YAMON and U-Boot.
*
* Copyright 2000, 2001, 2006 MontaVista Software Inc.
* Author: MontaVista Software, Inc.
@@ -46,12 +46,6 @@
extern int prom_argc;
extern char **prom_argv, **prom_envp;
-typedef struct
-{
- char *name;
- char *val;
-} t_env_var;
-
char * prom_getcmdline(void)
{
@@ -84,13 +78,21 @@ char *prom_getenv(char *envname)
{
/*
* Return a pointer to the given environment variable.
+ * YAMON uses "name", "value" pairs, while U-Boot uses "name=value".
*/
- t_env_var *env = (t_env_var *)prom_envp;
-
- while (env->name) {
- if (strcmp(envname, env->name) == 0)
- return env->val;
+ char **env = prom_envp;
+ int i = strlen(envname);
+ int yamon = (*env && strchr(*env, '=') == NULL);
+
+ while (*env) {
+ if (yamon) {
+ if (strcmp(envname, *env++) == 0)
+ return *env;
+ } else {
+ if (strncmp(envname, *env, i) == 0 && (*env)[i] == '=')
+ return *env + i + 1;
+ }
env++;
}
return NULL;
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c
index cc5138ce9c9..377ae0d8ff0 100644
--- a/arch/mips/au1000/common/setup.c
+++ b/arch/mips/au1000/common/setup.c
@@ -51,7 +51,6 @@ extern void au1000_power_off(void);
extern void au1x_time_init(void);
extern void au1x_timer_setup(struct irqaction *irq);
extern void au1xxx_time_init(void);
-extern void au1xxx_timer_setup(struct irqaction *irq);
extern void set_cpuspec(void);
void __init plat_mem_setup(void)
@@ -123,7 +122,6 @@ void __init plat_mem_setup(void)
_machine_halt = au1000_halt;
pm_power_off = au1000_power_off;
board_time_init = au1xxx_time_init;
- board_timer_setup = au1xxx_timer_setup;
/* IO/MEM resources. */
set_io_port_base(0);
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c
index 7e988b0b013..7fbea1bf7b4 100644
--- a/arch/mips/au1000/common/time.c
+++ b/arch/mips/au1000/common/time.c
@@ -383,7 +383,7 @@ static unsigned long do_fast_pm_gettimeoffset(void)
}
#endif
-void __init au1xxx_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
{
unsigned int est_freq;