aboutsummaryrefslogtreecommitdiffstats
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 29d6f8178bad..316722ee8cf5 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)
251} 251}
252 252
253 253
254static struct hw_interrupt_type rise_edge_irq_type = { 254static struct irq_chip rise_edge_irq_type = {
255 .typename = "Au1000 Rise Edge", 255 .typename = "Au1000 Rise Edge",
256 .startup = startup_irq, 256 .startup = startup_irq,
257 .shutdown = shutdown_irq, 257 .shutdown = shutdown_irq,
@@ -261,7 +261,7 @@ static struct hw_interrupt_type rise_edge_irq_type = {
261 .end = end_irq, 261 .end = end_irq,
262}; 262};
263 263
264static struct hw_interrupt_type fall_edge_irq_type = { 264static struct irq_chip fall_edge_irq_type = {
265 .typename = "Au1000 Fall Edge", 265 .typename = "Au1000 Fall Edge",
266 .startup = startup_irq, 266 .startup = startup_irq,
267 .shutdown = shutdown_irq, 267 .shutdown = shutdown_irq,
@@ -271,7 +271,7 @@ static struct hw_interrupt_type fall_edge_irq_type = {
271 .end = end_irq, 271 .end = end_irq,
272}; 272};
273 273
274static struct hw_interrupt_type either_edge_irq_type = { 274static struct irq_chip either_edge_irq_type = {
275 .typename = "Au1000 Rise or Fall Edge", 275 .typename = "Au1000 Rise or Fall Edge",
276 .startup = startup_irq, 276 .startup = startup_irq,
277 .shutdown = shutdown_irq, 277 .shutdown = shutdown_irq,
@@ -281,7 +281,7 @@ static struct hw_interrupt_type either_edge_irq_type = {
281 .end = end_irq, 281 .end = end_irq,
282}; 282};
283 283
284static struct hw_interrupt_type level_irq_type = { 284static struct irq_chip level_irq_type = {
285 .typename = "Au1000 Level", 285 .typename = "Au1000 Level",
286 .startup = startup_irq, 286 .startup = startup_irq,
287 .shutdown = shutdown_irq, 287 .shutdown = shutdown_irq,
diff --git a/arch/mips/au1000/common/prom.c b/arch/mips/au1000/common/prom.c
index ae7d8c57bf3f..b4b010a2fe36 100644
--- a/arch/mips/au1000/common/prom.c
+++ b/arch/mips/au1000/common/prom.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * 2 *
3 * BRIEF MODULE DESCRIPTION 3 * BRIEF MODULE DESCRIPTION
4 * PROM library initialisation code, assuming YAMON is the boot loader. 4 * PROM library initialisation code, supports YAMON and U-Boot.
5 * 5 *
6 * Copyright 2000, 2001, 2006 MontaVista Software Inc. 6 * Copyright 2000, 2001, 2006 MontaVista Software Inc.
7 * Author: MontaVista Software, Inc. 7 * Author: MontaVista Software, Inc.
@@ -46,12 +46,6 @@
46extern int prom_argc; 46extern int prom_argc;
47extern char **prom_argv, **prom_envp; 47extern char **prom_argv, **prom_envp;
48 48
49typedef struct
50{
51 char *name;
52 char *val;
53} t_env_var;
54
55 49
56char * prom_getcmdline(void) 50char * prom_getcmdline(void)
57{ 51{
@@ -84,13 +78,21 @@ char *prom_getenv(char *envname)
84{ 78{
85 /* 79 /*
86 * Return a pointer to the given environment variable. 80 * Return a pointer to the given environment variable.
81 * YAMON uses "name", "value" pairs, while U-Boot uses "name=value".
87 */ 82 */
88 83
89 t_env_var *env = (t_env_var *)prom_envp; 84 char **env = prom_envp;
90 85 int i = strlen(envname);
91 while (env->name) { 86 int yamon = (*env && strchr(*env, '=') == NULL);
92 if (strcmp(envname, env->name) == 0) 87
93 return env->val; 88 while (*env) {
89 if (yamon) {
90 if (strcmp(envname, *env++) == 0)
91 return *env;
92 } else {
93 if (strncmp(envname, *env, i) == 0 && (*env)[i] == '=')
94 return *env + i + 1;
95 }
94 env++; 96 env++;
95 } 97 }
96 return NULL; 98 return NULL;
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c
index cc5138ce9c95..377ae0d8ff00 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);
51extern void au1x_time_init(void); 51extern void au1x_time_init(void);
52extern void au1x_timer_setup(struct irqaction *irq); 52extern void au1x_timer_setup(struct irqaction *irq);
53extern void au1xxx_time_init(void); 53extern void au1xxx_time_init(void);
54extern void au1xxx_timer_setup(struct irqaction *irq);
55extern void set_cpuspec(void); 54extern void set_cpuspec(void);
56 55
57void __init plat_mem_setup(void) 56void __init plat_mem_setup(void)
@@ -123,7 +122,6 @@ void __init plat_mem_setup(void)
123 _machine_halt = au1000_halt; 122 _machine_halt = au1000_halt;
124 pm_power_off = au1000_power_off; 123 pm_power_off = au1000_power_off;
125 board_time_init = au1xxx_time_init; 124 board_time_init = au1xxx_time_init;
126 board_timer_setup = au1xxx_timer_setup;
127 125
128 /* IO/MEM resources. */ 126 /* IO/MEM resources. */
129 set_io_port_base(0); 127 set_io_port_base(0);
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c
index 7e988b0b0130..7fbea1bf7b48 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)
383} 383}
384#endif 384#endif
385 385
386void __init au1xxx_timer_setup(struct irqaction *irq) 386void __init plat_timer_setup(struct irqaction *irq)
387{ 387{
388 unsigned int est_freq; 388 unsigned int est_freq;
389 389