1 diff -urN linux.old/Makefile linux.dev/Makefile
2 --- linux.old/Makefile 2005-10-21 16:43:16.316951500 +0200
3 +++ linux.dev/Makefile 2005-11-10 01:10:45.771570000 +0100
6 CPPFLAGS := -D__KERNEL__ -I$(HPATH)
8 -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
9 +CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
10 -fno-strict-aliasing -fno-common
11 ifndef CONFIG_FRAME_POINTER
12 CFLAGS += -fomit-frame-pointer
13 diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
14 --- linux.old/arch/mips/Makefile 2005-10-21 16:43:16.316951500 +0200
15 +++ linux.dev/arch/mips/Makefile 2005-11-10 01:10:45.775570250 +0100
20 +# Texas Instruments AR7
24 +LIBS += arch/mips/ar7/ar7.o
25 +SUBDIRS += arch/mips/ar7
26 +LOADADDR += 0x94020000
32 ifdef CONFIG_DECSTATION
33 diff -urN linux.old/arch/mips/ar7/Makefile linux.dev/arch/mips/ar7/Makefile
34 --- linux.old/arch/mips/ar7/Makefile 1970-01-01 01:00:00.000000000 +0100
35 +++ linux.dev/arch/mips/ar7/Makefile 2005-11-10 01:13:51.443173750 +0100
38 + $(CPP) $(AFLAGS) $< -o $*.s
41 + $(CC) $(AFLAGS) -c $< -o $*.o
43 +EXTRA_CFLAGS := -I$(TOPDIR)/include/asm/ar7 -DLITTLE_ENDIAN -D_LINK_KSEG0_
46 +obj-y := tnetd73xx_misc.o misc.o
47 +export-objs := misc.o irq.o init.o
48 +obj-y += setup.o irq.o int-handler.o reset.o init.o psp_env.o memory.o promlib.o cmdline.o
50 +include $(TOPDIR)/Rules.make
51 diff -urN linux.old/arch/mips/ar7/cmdline.c linux.dev/arch/mips/ar7/cmdline.c
52 --- linux.old/arch/mips/ar7/cmdline.c 1970-01-01 01:00:00.000000000 +0100
53 +++ linux.dev/arch/mips/ar7/cmdline.c 2005-11-10 01:14:16.372731750 +0100
56 + * Carsten Langgaard, carstenl@mips.com
57 + * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
59 + * This program is free software; you can distribute it and/or modify it
60 + * under the terms of the GNU General Public License (Version 2) as
61 + * published by the Free Software Foundation.
63 + * This program is distributed in the hope it will be useful, but WITHOUT
64 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
65 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
68 + * You should have received a copy of the GNU General Public License along
69 + * with this program; if not, write to the Free Software Foundation, Inc.,
70 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
72 + * Kernel command line creation using the prom monitor (YAMON) argc/argv.
74 +#include <linux/init.h>
75 +#include <linux/string.h>
77 +#include <asm/bootinfo.h>
79 +extern int prom_argc;
80 +extern int *_prom_argv;
83 + * YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer.
84 + * This macro take care of sign extension.
86 +#define prom_argv(index) ((char *)(((int *)(int)_prom_argv)[(index)]))
88 +char arcs_cmdline[CL_SIZE];
89 +#ifdef CONFIG_CMDLINE_BOOL
90 +char __initdata cfg_cmdline[] = CONFIG_CMDLINE;
93 +char * __init prom_getcmdline(void)
95 + return &(arcs_cmdline[0]);
99 +void __init prom_init_cmdline(void)
103 + char *env_cmdline = prom_getenv("kernel_args");
106 + actr = 1; /* Always ignore argv[0] */
108 + cp = end = &(arcs_cmdline[0]);
109 + end += sizeof(arcs_cmdline);
112 + len = strlen(env_cmdline);
113 + if (len > end - cp - 1)
114 + len = end - cp - 1;
115 + strncpy(cp, env_cmdline, len);
119 +#ifdef CONFIG_CMDLINE_BOOL
121 + len = strlen(cfg_cmdline);
122 + if (len > end - cp - 1)
123 + len = end - cp - 1;
124 + strncpy(cp, cfg_cmdline, len);
130 + while(actr < prom_argc) {
131 + len = strlen(prom_argv(actr));
132 + if (len > end - cp - 1)
134 + strncpy(cp, prom_argv(actr), len);
139 + if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
143 diff -urN linux.old/arch/mips/ar7/init.c linux.dev/arch/mips/ar7/init.c
144 --- linux.old/arch/mips/ar7/init.c 1970-01-01 01:00:00.000000000 +0100
145 +++ linux.dev/arch/mips/ar7/init.c 2005-11-10 01:10:45.795571500 +0100
148 + * Carsten Langgaard, carstenl@mips.com
149 + * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
151 + * This program is free software; you can distribute it and/or modify it
152 + * under the terms of the GNU General Public License (Version 2) as
153 + * published by the Free Software Foundation.
155 + * This program is distributed in the hope it will be useful, but WITHOUT
156 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
157 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
158 + * for more details.
160 + * You should have received a copy of the GNU General Public License along
161 + * with this program; if not, write to the Free Software Foundation, Inc.,
162 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
164 + * PROM library initialisation code.
166 +#include <linux/config.h>
167 +#include <linux/init.h>
168 +#include <linux/string.h>
169 +#include <linux/kernel.h>
170 +#include <linux/module.h>
173 +#include <asm/mips-boards/prom.h>
174 +#include <asm/mips-boards/generic.h>
176 +#include <asm/ar7/adam2_env.h>
179 +int *_prom_argv, *_prom_envp;
181 +/* max # of Adam2 environment variables */
182 +#define MAX_ENV_ENTRY 80
184 +static t_env_var local_envp[MAX_ENV_ENTRY];
185 +static int env_type = 0;
188 +unsigned int max_env_entry;
190 +extern char *prom_psp_getenv(char *envname);
192 +static inline char *prom_adam2_getenv(char *envname)
195 + * Return a pointer to the given environment variable.
196 + * In 64-bit mode: we're using 64-bit pointers, but all pointers
197 + * in the PROM structures are only 32-bit, so we need some
198 + * workarounds, if we are running in 64-bit mode.
201 + t_env_var *env = (t_env_var *) local_envp;
203 + if (strcmp("bootloader", envname) == 0)
206 + i = strlen(envname);
207 + while (env->name) {
208 + if(strncmp(envname, env->name, i) == 0) {
217 +/* XXX "bootloader" won't be returned.
218 + * Better make it an element of local_envp */
219 +static inline t_env_var *
220 +prom_adam2_iterenv(t_env_var *env) {
225 + if (env - local_envp > MAX_ENV_ENTRY || !env->name)
230 +char *prom_getenv(char *envname)
233 + return prom_psp_getenv(envname);
235 + return prom_adam2_getenv(envname);
239 +prom_iterenv(t_env_var *last)
242 + return 0; /* not yet implemented */
243 + return prom_adam2_iterenv(last);
246 +static inline unsigned char str2hexnum(unsigned char c)
248 + if (c >= '0' && c <= '9')
250 + if (c >= 'a' && c <= 'f')
251 + return c - 'a' + 10;
252 + return 0; /* foo */
255 +static inline void str2eaddr(unsigned char *ea, unsigned char *str)
259 + for (i = 0; i < 6; i++) {
262 + if((*str == '.') || (*str == ':'))
264 + num = str2hexnum(*str++) << 4;
265 + num |= (str2hexnum(*str++));
270 +int get_ethernet_addr(char *ethernet_addr)
274 + ethaddr_str = prom_getenv("ethaddr");
275 + if (!ethaddr_str) {
276 + printk("ethaddr not set in boot prom\n");
279 + str2eaddr(ethernet_addr, ethaddr_str);
281 + if (init_debug > 1) {
283 + printk("get_ethernet_addr: ");
284 + for (i=0; i<5; i++)
285 + printk("%02x:", (unsigned char)*(ethernet_addr+i));
286 + printk("%02x\n", *(ethernet_addr+i));
293 + unsigned int psbl_size;
294 + unsigned int env_base;
295 + unsigned int env_size;
296 + unsigned int ffs_base;
297 + unsigned int ffs_size;
300 +static const char psp_env_version[] = "TIENV0.8";
302 +int __init prom_init(int argc, char **argv, char **envp)
306 + t_env_var *env = (t_env_var *) envp;
307 + struct psbl_rec *psbl = (struct psbl_rec *)(KSEG1ADDR(0x94000300));
308 + void *psp_env = (void *)KSEG1ADDR(psbl->env_base);
311 + _prom_argv = (int *)argv;
312 + _prom_envp = (int *)envp;
314 + if(strcmp(psp_env, psp_env_version) == 0) {
318 + _prom_envp = psp_env;
319 + max_env_entry = (psbl->env_size / 16) - 1;
321 + /* Copy what we need locally so we are not dependent on
322 + * bootloader RAM. In Adam2, the environment parameters
323 + * are in flash but the table that references them is in
327 + for(i=0; i < MAX_ENV_ENTRY; i++, env++) {
329 + local_envp[i].name = env->name;
330 + local_envp[i].val = env->val;
332 + local_envp[i].name = NULL;
333 + local_envp[i].val = NULL;
338 + set_io_port_base(0);
340 + prom_printf("\nLINUX started...\n");
341 + prom_init_cmdline();
346 diff -urN linux.old/arch/mips/ar7/int-handler.S linux.dev/arch/mips/ar7/int-handler.S
347 --- linux.old/arch/mips/ar7/int-handler.S 1970-01-01 01:00:00.000000000 +0100
348 +++ linux.dev/arch/mips/ar7/int-handler.S 2005-11-10 01:12:43.938955000 +0100
351 + * Copyright 2004 PMC-Sierra Inc.
352 + * Author: Manish Lachwani (lachwani@pmc-sierra.com)
353 + * Adaption for AR7: Enrik Berkhan <enrik@akk.org>
355 + * First-level interrupt dispatcher for the TI AR7
357 + * This program is free software; you can redistribute it and/or modify it
358 + * under the terms of the GNU General Public License as published by the
359 + * Free Software Foundation; either version 2 of the License, or (at your
360 + * option) any later version.
362 +#define __ASSEMBLY__
363 +#include <linux/config.h>
364 +#include <asm/asm.h>
365 +#include <asm/mipsregs.h>
366 +#include <asm/addrspace.h>
367 +#include <asm/regdef.h>
368 +#include <asm/stackframe.h>
371 + * First level interrupt dispatcher for TI AR7 based boards
375 + NESTED(ar7IRQ, PT_SIZE, sp)
381 + mfc0 t2, CP0_STATUS
385 + andi t1, t0, STATUSF_IP2 /* hw0 hardware interrupt */
386 + bnez t1, ll_hw0_irq
388 + andi t1, t0, STATUSF_IP7 /* R4k CPU timer */
389 + bnez t1, ll_timer_irq
393 + /* wrong alarm or masked ... */
394 + j spurious_interrupt
413 diff -urN linux.old/arch/mips/ar7/irq.c linux.dev/arch/mips/ar7/irq.c
414 --- linux.old/arch/mips/ar7/irq.c 1970-01-01 01:00:00.000000000 +0100
415 +++ linux.dev/arch/mips/ar7/irq.c 2005-11-10 01:12:43.938955000 +0100
418 + * Nitin Dhingra, iamnd@ti.com
419 + * Copyright (C) 2002 Texas Instruments, Inc. All rights reserved.
421 + * ########################################################################
423 + * This program is free software; you can distribute it and/or modify it
424 + * under the terms of the GNU General Public License (Version 2) as
425 + * published by the Free Software Foundation.
427 + * This program is distributed in the hope it will be useful, but WITHOUT
428 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
429 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
430 + * for more details.
432 + * You should have received a copy of the GNU General Public License along
433 + * with this program; if not, write to the Free Software Foundation, Inc.,
434 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
436 + * ########################################################################
438 + * Routines for generic manipulation of the interrupts found on the Texas
439 + * Instruments avalanche board
443 +#include <linux/init.h>
444 +#include <linux/interrupt.h>
446 +#include <asm/irq.h>
447 +#include <asm/mipsregs.h>
448 +#include <asm/ar7/ar7.h>
449 +#include <asm/ar7/avalanche_intc.h>
451 +#define shutdown_avalanche_irq disable_avalanche_irq
452 +#define mask_and_ack_avalanche_irq disable_avalanche_irq
454 +static unsigned int startup_avalanche_irq(unsigned int irq);
455 +static void end_avalanche_irq(unsigned int irq);
456 +void enable_avalanche_irq(unsigned int irq_nr);
457 +void disable_avalanche_irq(unsigned int irq_nr);
458 +void ar7_hw0_interrupt(int interrupt, void *dev, struct pt_regs *regs);
460 +static struct hw_interrupt_type avalanche_irq_type = {
462 + startup_avalanche_irq,
463 + shutdown_avalanche_irq,
464 + enable_avalanche_irq,
465 + disable_avalanche_irq,
466 + mask_and_ack_avalanche_irq,
471 +static int ar7_irq_base;
473 +static struct irqaction ar7_hw0_action = {
474 + ar7_hw0_interrupt, 0, 0, "AR7 on hw0", NULL, NULL
477 +struct avalanche_ictrl_regs *avalanche_hw0_icregs; /* Interrupt control regs (primary) */
478 +struct avalanche_exctrl_regs *avalanche_hw0_ecregs; /* Exception control regs (secondary) */
479 +struct avalanche_ipace_regs *avalanche_hw0_ipaceregs;
480 +struct avalanche_channel_int_number *avalanche_hw0_chregs; /* Channel control registers */
483 + This remaps interrupts to exist on other channels than the default
484 + channels. essentially we can use the line # as the index for this
488 +static unsigned long line_to_channel[AVINTNUM(AVALANCHE_INT_END_PRIMARY)];
489 +unsigned long uni_secondary_interrupt = 0;
491 +static void end_avalanche_irq(unsigned int irq)
493 + if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
494 + enable_avalanche_irq(irq);
497 +void disable_avalanche_irq(unsigned int irq_nr)
499 + unsigned long flags;
500 + unsigned long chan_nr=0;
502 + save_and_cli(flags);
504 + /* irq_nr represents the line number for the interrupt. We must
505 + * disable the channel number associated with that line number.
508 + if(irq_nr > AVALANCHE_INT_END_PRIMARY_REG2)
509 + chan_nr = AVINTNUM(irq_nr); /*CHECK THIS ALSO*/
511 + chan_nr = line_to_channel[AVINTNUM(irq_nr)];/* WE NEED A LINE TO CHANNEL MAPPING FUNCTION HERE*/
513 + /* disable the interrupt channel bit */
515 + /* primary interrupt #'s 0-31 */
517 + if(chan_nr <= AVINTNUM(AVALANCHE_INT_END_PRIMARY_REG1))
518 + avalanche_hw0_icregs->intecr1 = (1 << chan_nr);
520 + /* primary interrupt #'s 32-39 */
522 + else if ((chan_nr <= AVINTNUM(AVALANCHE_INT_END_PRIMARY_REG2)) &&
523 + (chan_nr > AVINTNUM(AVALANCHE_INT_END_PRIMARY_REG1)))
524 + avalanche_hw0_icregs->intecr2 = (1 << (chan_nr - AVINTNUM(AVALANCHE_INT_END_SECONDARY)));
526 + else /* secondary interrupt #'s 0-31 */
527 + avalanche_hw0_ecregs->exiecr = (1 << (chan_nr - AVINTNUM(AVALANCHE_INT_END_PRIMARY)));
529 + restore_flags(flags);
532 +void enable_avalanche_irq(unsigned int irq_nr)
534 + unsigned long flags;
535 + unsigned long chan_nr=0;
537 + save_and_cli(flags);
539 + /* irq_nr represents the line number for the interrupt. We must
540 + * disable the channel number associated with that line number.
543 + if(irq_nr > AVALANCHE_INT_END_PRIMARY_REG2)
544 + chan_nr = AVINTNUM(irq_nr);
546 + chan_nr = line_to_channel[AVINTNUM(irq_nr)];
548 + /* enable the interrupt channel bit */
550 + /* primary interrupt #'s 0-31 */
551 + if(chan_nr <= AVINTNUM(AVALANCHE_INT_END_PRIMARY_REG1))
552 + avalanche_hw0_icregs->intesr1 = (1 << chan_nr);
554 + /* primary interrupt #'s 32 throuth 39 */
555 + else if ((chan_nr <= AVINTNUM(AVALANCHE_INT_END_PRIMARY_REG2)) &&
556 + (chan_nr > AVINTNUM(AVALANCHE_INT_END_PRIMARY_REG1)))
557 + avalanche_hw0_icregs->intesr2 = (1 << (chan_nr - AVINTNUM(AVALANCHE_INT_END_SECONDARY)));
559 + else /* secondary interrupt #'s 0-31 */
560 + avalanche_hw0_ecregs->exiesr = (1 << (chan_nr - AVINTNUM(AVALANCHE_INT_END_PRIMARY)));
562 + restore_flags(flags);
565 +static unsigned int startup_avalanche_irq(unsigned int irq)
567 + enable_avalanche_irq(irq);
568 + return 0; /* never anything pending */
571 +void __init ar7_irq_init(int base)
575 + avalanche_hw0_icregs = (struct avalanche_ictrl_regs *)AVALANCHE_ICTRL_REGS_BASE;
576 + avalanche_hw0_ecregs = (struct avalanche_exctrl_regs *)AVALANCHE_ECTRL_REGS_BASE;
577 + avalanche_hw0_ipaceregs = (struct avalanche_ipace_regs *)AVALANCHE_IPACE_REGS_BASE;
578 + avalanche_hw0_chregs = (struct avalanche_channel_int_number *)AVALANCHE_CHCTRL_REGS_BASE;
580 + /* Disable interrupts and clear pending
583 + avalanche_hw0_icregs->intecr1 = 0xffffffff; /* disable interrupts 0:31 */
584 + avalanche_hw0_icregs->intcr1 = 0xffffffff; /* clear interrupts 0:31 */
585 + avalanche_hw0_icregs->intecr2 = 0xff; /* disable interrupts 32:39 */
586 + avalanche_hw0_icregs->intcr2 = 0xff; /* clear interrupts 32:39 */
587 + avalanche_hw0_ecregs->exiecr = 0xffffffff; /* disable secondary interrupts 0:31 */
588 + avalanche_hw0_ecregs->excr = 0xffffffff; /* clear secondary interrupts 0:31 */
591 + // avalanche_hw0_ipaceregs->ipacep = (2*get_avalanche_vbus_freq()/1000000)*4;
592 + /* hack for speeding up the pacing. */
593 + printk("the pacing pre-scalar has been set as 600.\n");
594 + avalanche_hw0_ipaceregs->ipacep = 600;
595 + /* Channel to line mapping, Line to Channel mapping */
597 + for(i = 0; i < 40; i++)
598 + avalanche_int_set(i,i);
600 + ar7_irq_base = base;
601 + for (i = base; i <= base+40; i++)
603 + irq_desc[i].status = IRQ_DISABLED;
604 + irq_desc[i].action = 0;
605 + irq_desc[i].depth = 1;
606 + irq_desc[i].handler = &avalanche_irq_type;
609 + setup_irq(2, &ar7_hw0_action);
610 + set_c0_status(IE_IRQ0);
615 +void ar7_hw0_interrupt(int interrupt, void *dev, struct pt_regs *regs)
618 + unsigned long int_line_number, status;
619 + int i, chan_nr = 0;
621 + int_line_number = ((avalanche_hw0_icregs->pintir >> 16) & 0x3F);
622 + chan_nr = ((avalanche_hw0_icregs->pintir) & 0x3F);
624 + if(chan_nr < 32) /* primary 0-31 */
626 + if( chan_nr != uni_secondary_interrupt)
627 + avalanche_hw0_icregs->intcr1 = (1<<chan_nr);
631 + if((chan_nr < 40) && (chan_nr > 31)) /* primary 32-39 */
633 + avalanche_hw0_icregs->intcr2 = (1<<(chan_nr-32));
637 + /* If the Priority Interrupt Index Register returns 40 then no
638 + * interrupts are pending
644 + if(chan_nr == uni_secondary_interrupt) /* secondary 0-31 */
646 + status = avalanche_hw0_ecregs->exsr;
647 + for(i=0; i < 32; i++)
651 + /* clear secondary interrupt */
652 + avalanche_hw0_ecregs->excr = 1 << i;
658 + /* clear the universal secondary interrupt */
659 + avalanche_hw0_icregs->intcr1 = 1 << uni_secondary_interrupt;
665 + do_IRQ(irq + ar7_irq_base, regs);
669 +void avalanche_int_set(int channel, int line)
674 + avalanche_hw0_chregs->cintnr0 = line;
677 + avalanche_hw0_chregs->cintnr1 = line;
680 + avalanche_hw0_chregs->cintnr2 = line;
683 + avalanche_hw0_chregs->cintnr3 = line;
686 + avalanche_hw0_chregs->cintnr4 = line;
689 + avalanche_hw0_chregs->cintnr5 = line;
692 + avalanche_hw0_chregs->cintnr6 = line;
695 + avalanche_hw0_chregs->cintnr7 = line;
698 + avalanche_hw0_chregs->cintnr8 = line;
701 + avalanche_hw0_chregs->cintnr9 = line;
704 + avalanche_hw0_chregs->cintnr10 = line;
707 + avalanche_hw0_chregs->cintnr11 = line;
710 + avalanche_hw0_chregs->cintnr12 = line;
713 + avalanche_hw0_chregs->cintnr13 = line;
716 + avalanche_hw0_chregs->cintnr14 = line;
719 + avalanche_hw0_chregs->cintnr15 = line;
722 + avalanche_hw0_chregs->cintnr16 = line;
725 + avalanche_hw0_chregs->cintnr17 = line;
728 + avalanche_hw0_chregs->cintnr18 = line;
731 + avalanche_hw0_chregs->cintnr19 = line;
734 + avalanche_hw0_chregs->cintnr20 = line;
737 + avalanche_hw0_chregs->cintnr21 = line;
740 + avalanche_hw0_chregs->cintnr22 = line;
743 + avalanche_hw0_chregs->cintnr23 = line;
746 + avalanche_hw0_chregs->cintnr24 = line;
749 + avalanche_hw0_chregs->cintnr25 = line;
752 + avalanche_hw0_chregs->cintnr26 = line;
755 + avalanche_hw0_chregs->cintnr27 = line;
758 + avalanche_hw0_chregs->cintnr28 = line;
761 + avalanche_hw0_chregs->cintnr29 = line;
764 + avalanche_hw0_chregs->cintnr30 = line;
767 + avalanche_hw0_chregs->cintnr31 = line;
770 + avalanche_hw0_chregs->cintnr32 = line;
773 + avalanche_hw0_chregs->cintnr33 = line;
776 + avalanche_hw0_chregs->cintnr34 = line;
779 + avalanche_hw0_chregs->cintnr35 = line;
782 + avalanche_hw0_chregs->cintnr36 = line;
785 + avalanche_hw0_chregs->cintnr37 = line;
788 + avalanche_hw0_chregs->cintnr38 = line;
791 + avalanche_hw0_chregs->cintnr39 = line;
794 + printk("Error: Unknown Avalanche interrupt channel\n");
797 + line_to_channel[line] = channel; /* Suraj check */
799 + if (channel == UNIFIED_SECONDARY_INTERRUPT)
800 + uni_secondary_interrupt = line;
805 +#define AVALANCHE_MAX_PACING_BLK 3
806 +#define AVALANCHE_PACING_LOW_VAL 2
807 +#define AVALANCHE_PACING_HIGH_VAL 63
809 +int avalanche_request_pacing(int irq_nr, unsigned int blk_num,
810 + unsigned int pace_value)
812 + unsigned int blk_offset;
813 + unsigned long flags;
815 + if(irq_nr < MIPS_EXCEPTION_OFFSET &&
816 + irq_nr >= AVALANCHE_INT_END_PRIMARY)
819 + if(blk_num > AVALANCHE_MAX_PACING_BLK)
822 + if(pace_value > AVALANCHE_PACING_HIGH_VAL &&
823 + pace_value < AVALANCHE_PACING_LOW_VAL)
826 + blk_offset = blk_num*8;
828 + save_and_cli(flags);
830 + /* disable the interrupt pacing, if enabled previously */
831 + avalanche_hw0_ipaceregs->ipacemax &= ~(0xff << blk_offset);
833 + /* clear the pacing map */
834 + avalanche_hw0_ipaceregs->ipacemap &= ~(0xff << blk_offset);
836 + /* setup the new values */
837 + avalanche_hw0_ipaceregs->ipacemap |= ((AVINTNUM(irq_nr)) << blk_offset);
838 + avalanche_hw0_ipaceregs->ipacemax |= ((0x80 | pace_value) << blk_offset);
840 + restore_flags(flags);
844 diff -urN linux.old/arch/mips/ar7/memory.c linux.dev/arch/mips/ar7/memory.c
845 --- linux.old/arch/mips/ar7/memory.c 1970-01-01 01:00:00.000000000 +0100
846 +++ linux.dev/arch/mips/ar7/memory.c 2005-11-10 01:14:16.372731750 +0100
849 + * Carsten Langgaard, carstenl@mips.com
850 + * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
852 + * ########################################################################
854 + * This program is free software; you can distribute it and/or modify it
855 + * under the terms of the GNU General Public License (Version 2) as
856 + * published by the Free Software Foundation.
858 + * This program is distributed in the hope it will be useful, but WITHOUT
859 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
860 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
861 + * for more details.
863 + * You should have received a copy of the GNU General Public License along
864 + * with this program; if not, write to the Free Software Foundation, Inc.,
865 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
867 + * ########################################################################
871 +#include <linux/config.h>
872 +#include <linux/init.h>
873 +#include <linux/mm.h>
874 +#include <linux/bootmem.h>
876 +#include <asm/bootinfo.h>
877 +#include <asm/page.h>
878 +#include <asm/mips-boards/prom.h>
881 +extern int preserve_adam2;
883 +void __init prom_meminit(void)
886 + unsigned long memsize, adam2size;
888 + /* assume block before kernel is used by bootloader */
889 + adam2size = __pa(&_ftext) - PHYS_OFFSET;
891 + memsize_str = prom_getenv("memsize");
892 + if (!memsize_str) {
893 + memsize = 0x02000000;
895 + memsize = simple_strtol(memsize_str, NULL, 0);
899 + add_memory_region(0x00000000, PHYS_OFFSET, BOOT_MEM_RESERVED);
901 + add_memory_region(PHYS_OFFSET, adam2size, BOOT_MEM_ROM_DATA);
902 + add_memory_region(PHYS_OFFSET+adam2size, memsize-adam2size,
906 +unsigned long __init prom_free_prom_memory (void)
909 + unsigned long freed = 0;
910 + unsigned long addr;
912 + if (preserve_adam2) {
913 + char *firstfree_str = prom_getenv("firstfreeaddress");
914 + unsigned long firstfree = 0;
917 + firstfree = simple_strtol(firstfree_str, NULL, 0);
919 + if (firstfree && firstfree < (unsigned long)&_ftext) {
920 + printk("Preserving ADAM2 memory.\n");
921 + } else if (firstfree) {
922 + printk("Can't preserve ADAM2 memory, "
923 + "firstfreeaddress = %08lx.\n", firstfree);
924 + preserve_adam2 = 0;
926 + printk("Can't preserve ADAM2 memory, "
927 + "firstfreeaddress unknown!\n");
928 + preserve_adam2 = 0;
932 + if (!preserve_adam2) {
933 + for (i = 0; i < boot_mem_map.nr_map; i++) {
934 + if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
937 + addr = boot_mem_map.map[i].addr;
938 + while (addr < boot_mem_map.map[i].addr
939 + + boot_mem_map.map[i].size) {
940 + ClearPageReserved(virt_to_page(__va(addr)));
941 + set_page_count(virt_to_page(__va(addr)), 1);
942 + free_page((unsigned long)__va(addr));
944 + freed += PAGE_SIZE;
947 + printk("Freeing prom memory: %ldkb freed\n", freed >> 10);
949 + return freed >> PAGE_SHIFT;
951 diff -urN linux.old/arch/mips/ar7/misc.c linux.dev/arch/mips/ar7/misc.c
952 --- linux.old/arch/mips/ar7/misc.c 1970-01-01 01:00:00.000000000 +0100
953 +++ linux.dev/arch/mips/ar7/misc.c 2005-11-10 01:12:43.946955500 +0100
955 +#include <asm/ar7/sangam.h>
956 +#include <asm/ar7/avalanche_misc.h>
957 +#include <linux/module.h>
958 +#include <linux/spinlock.h>
962 +static unsigned int avalanche_vbus_freq;
964 +REMOTE_VLYNQ_DEV_RESET_CTRL_FN p_remote_vlynq_dev_reset_ctrl = NULL;
966 +/*****************************************************************************
967 + * Reset Control Module.
968 + *****************************************************************************/
969 +void avalanche_reset_ctrl(unsigned int module_reset_bit,
970 + AVALANCHE_RESET_CTRL_T reset_ctrl)
972 + volatile unsigned int *reset_reg = (unsigned int*) AVALANCHE_RST_CTRL_PRCR;
974 + if(module_reset_bit >= 32 && module_reset_bit < 64)
977 + if(module_reset_bit >= 64)
979 + if(p_remote_vlynq_dev_reset_ctrl) {
980 + p_remote_vlynq_dev_reset_ctrl(module_reset_bit - 64, reset_ctrl);
987 + if(reset_ctrl == OUT_OF_RESET)
988 + *reset_reg |= 1 << module_reset_bit;
990 + *reset_reg &= ~(1 << module_reset_bit);
994 +AVALANCHE_RESET_CTRL_T avalanche_get_reset_status(unsigned int module_reset_bit)
996 + volatile unsigned int *reset_reg = (unsigned int*) AVALANCHE_RST_CTRL_PRCR;
998 + return (((*reset_reg) & (1 << module_reset_bit)) ? OUT_OF_RESET : IN_RESET );
1001 +void avalanche_sys_reset(AVALANCHE_SYS_RST_MODE_T mode)
1003 + volatile unsigned int *sw_reset_reg = (unsigned int*) AVALANCHE_RST_CTRL_SWRCR;
1004 + *sw_reset_reg = mode;
1007 +#define AVALANCHE_RST_CTRL_RSR_MASK 0x3
1009 +AVALANCHE_SYS_RESET_STATUS_T avalanche_get_sys_last_reset_status()
1011 + volatile unsigned int *sys_reset_status = (unsigned int*) AVALANCHE_RST_CTRL_RSR;
1013 + return ( (AVALANCHE_SYS_RESET_STATUS_T) (*sys_reset_status & AVALANCHE_RST_CTRL_RSR_MASK) );
1017 +/*****************************************************************************
1018 + * Power Control Module
1019 + *****************************************************************************/
1020 +#define AVALANCHE_GLOBAL_POWER_DOWN_MASK 0x3FFFFFFF /* bit 31, 30 masked */
1021 +#define AVALANCHE_GLOBAL_POWER_DOWN_BIT 30 /* shift to bit 30, 31 */
1024 +void avalanche_power_ctrl(unsigned int module_power_bit, AVALANCHE_POWER_CTRL_T power_ctrl)
1026 + volatile unsigned int *power_reg = (unsigned int*)AVALANCHE_POWER_CTRL_PDCR;
1028 + if (power_ctrl == POWER_CTRL_POWER_DOWN)
1029 + /* power down the module */
1030 + *power_reg |= (1 << module_power_bit);
1032 + /* power on the module */
1033 + *power_reg &= (~(1 << module_power_bit));
1036 +AVALANCHE_POWER_CTRL_T avalanche_get_power_status(unsigned int module_power_bit)
1038 + volatile unsigned int *power_status_reg = (unsigned int*)AVALANCHE_POWER_CTRL_PDCR;
1040 + return (((*power_status_reg) & (1 << module_power_bit)) ? POWER_CTRL_POWER_DOWN : POWER_CTRL_POWER_UP);
1043 +void avalanche_set_global_power_mode(AVALANCHE_SYS_POWER_MODE_T power_mode)
1045 + volatile unsigned int *power_status_reg = (unsigned int*)AVALANCHE_POWER_CTRL_PDCR;
1047 + *power_status_reg &= AVALANCHE_GLOBAL_POWER_DOWN_MASK;
1048 + *power_status_reg |= ( power_mode << AVALANCHE_GLOBAL_POWER_DOWN_BIT);
1051 +AVALANCHE_SYS_POWER_MODE_T avalanche_get_global_power_mode(void)
1053 + volatile unsigned int *power_status_reg = (unsigned int*)AVALANCHE_POWER_CTRL_PDCR;
1055 + return((AVALANCHE_SYS_POWER_MODE_T) (((*power_status_reg) & (~AVALANCHE_GLOBAL_POWER_DOWN_MASK))
1056 + >> AVALANCHE_GLOBAL_POWER_DOWN_BIT));
1059 +/*****************************************************************************
1061 + *****************************************************************************/
1063 +/****************************************************************************
1064 + * FUNCTION: avalanche_gpio_init
1065 + ***************************************************************************/
1066 +void avalanche_gpio_init(void)
1068 + spinlock_t closeLock;
1069 + unsigned int closeFlag;
1070 + volatile unsigned int *reset_reg = (unsigned int*) AVALANCHE_RST_CTRL_PRCR;
1071 + spin_lock_irqsave(&closeLock, closeFlag);
1072 + *reset_reg |= (1 << AVALANCHE_GPIO_RESET_BIT);
1073 + spin_unlock_irqrestore(&closeLock, closeFlag);
1076 +/****************************************************************************
1077 + * FUNCTION: avalanche_gpio_ctrl
1078 + ***************************************************************************/
1079 +int avalanche_gpio_ctrl(unsigned int gpio_pin,
1080 + AVALANCHE_GPIO_PIN_MODE_T pin_mode,
1081 + AVALANCHE_GPIO_PIN_DIRECTION_T pin_direction)
1083 + spinlock_t closeLock;
1084 + unsigned int closeFlag;
1085 + volatile unsigned int *gpio_ctrl = (unsigned int*)AVALANCHE_GPIO_ENBL;
1087 + if(gpio_pin >= 32)
1090 + spin_lock_irqsave(&closeLock, closeFlag);
1092 + if(pin_mode == GPIO_PIN)
1094 + *gpio_ctrl |= (1 << gpio_pin);
1096 + gpio_ctrl = (unsigned int*)AVALANCHE_GPIO_DIR;
1098 + if(pin_direction == GPIO_INPUT_PIN)
1099 + *gpio_ctrl |= (1 << gpio_pin);
1101 + *gpio_ctrl &= ~(1 << gpio_pin);
1103 + else /* FUNCTIONAL PIN */
1105 + *gpio_ctrl &= ~(1 << gpio_pin);
1108 + spin_unlock_irqrestore(&closeLock, closeFlag);
1113 +/****************************************************************************
1114 + * FUNCTION: avalanche_gpio_out
1115 + ***************************************************************************/
1116 +int avalanche_gpio_out_bit(unsigned int gpio_pin, int value)
1118 + spinlock_t closeLock;
1119 + unsigned int closeFlag;
1120 + volatile unsigned int *gpio_out = (unsigned int*) AVALANCHE_GPIO_DATA_OUT;
1122 + if(gpio_pin >= 32)
1125 + spin_lock_irqsave(&closeLock, closeFlag);
1127 + *gpio_out |= 1 << gpio_pin;
1129 + *gpio_out &= ~(1 << gpio_pin);
1130 + spin_unlock_irqrestore(&closeLock, closeFlag);
1135 +/****************************************************************************
1136 + * FUNCTION: avalanche_gpio_in
1137 + ***************************************************************************/
1138 +int avalanche_gpio_in_bit(unsigned int gpio_pin)
1140 + spinlock_t closeLock;
1141 + unsigned int closeFlag;
1142 + volatile unsigned int *gpio_in = (unsigned int*) AVALANCHE_GPIO_DATA_IN;
1145 + if(gpio_pin >= 32)
1148 + spin_lock_irqsave(&closeLock, closeFlag);
1149 + ret_val = ((*gpio_in) & (1 << gpio_pin));
1150 + spin_unlock_irqrestore(&closeLock, closeFlag);
1155 +/****************************************************************************
1156 + * FUNCTION: avalanche_gpio_out_val
1157 + ***************************************************************************/
1158 +int avalanche_gpio_out_value(unsigned int out_val, unsigned int out_mask,
1159 + unsigned int reg_index)
1161 + spinlock_t closeLock;
1162 + unsigned int closeFlag;
1163 + volatile unsigned int *gpio_out = (unsigned int*) AVALANCHE_GPIO_DATA_OUT;
1168 + spin_lock_irqsave(&closeLock, closeFlag);
1169 + *gpio_out &= ~out_mask;
1170 + *gpio_out |= out_val;
1171 + spin_unlock_irqrestore(&closeLock, closeFlag);
1176 +/****************************************************************************
1177 + * FUNCTION: avalanche_gpio_in_value
1178 + ***************************************************************************/
1179 +int avalanche_gpio_in_value(unsigned int* in_val, unsigned int reg_index)
1181 + spinlock_t closeLock;
1182 + unsigned int closeFlag;
1183 + volatile unsigned int *gpio_in = (unsigned int*) AVALANCHE_GPIO_DATA_IN;
1188 + spin_lock_irqsave(&closeLock, closeFlag);
1189 + *in_val = *gpio_in;
1190 + spin_unlock_irqrestore(&closeLock, closeFlag);
1195 +/***********************************************************************
1197 + * Wakeup Control Module for TNETV1050 Communication Processor
1199 + ***********************************************************************/
1201 +#define AVALANCHE_WAKEUP_POLARITY_BIT 16
1203 +void avalanche_wakeup_ctrl(AVALANCHE_WAKEUP_INTERRUPT_T wakeup_int,
1204 + AVALANCHE_WAKEUP_CTRL_T wakeup_ctrl,
1205 + AVALANCHE_WAKEUP_POLARITY_T wakeup_polarity)
1207 + volatile unsigned int *wakeup_status_reg = (unsigned int*) AVALANCHE_WAKEUP_CTRL_WKCR;
1209 + /* enable/disable */
1210 + if (wakeup_ctrl == WAKEUP_ENABLED)
1211 + /* enable wakeup */
1212 + *wakeup_status_reg |= wakeup_int;
1214 + /* disable wakeup */
1215 + *wakeup_status_reg &= (~wakeup_int);
1217 + /* set polarity */
1218 + if (wakeup_polarity == WAKEUP_ACTIVE_LOW)
1219 + *wakeup_status_reg |= (wakeup_int << AVALANCHE_WAKEUP_POLARITY_BIT);
1221 + *wakeup_status_reg &= ~(wakeup_int << AVALANCHE_WAKEUP_POLARITY_BIT);
1224 +void avalanche_set_vbus_freq(unsigned int new_vbus_freq)
1226 + avalanche_vbus_freq = new_vbus_freq;
1229 +unsigned int avalanche_get_vbus_freq()
1231 + return(avalanche_vbus_freq);
1234 +unsigned int avalanche_get_chip_version_info()
1236 + return(*(volatile unsigned int*)AVALANCHE_CVR);
1239 +SET_MDIX_ON_CHIP_FN_T p_set_mdix_on_chip_fn = NULL;
1241 +int avalanche_set_mdix_on_chip(unsigned int base_addr, unsigned int operation)
1243 + if(p_set_mdix_on_chip_fn)
1244 + return (p_set_mdix_on_chip_fn(base_addr, operation));
1249 +unsigned int avalanche_is_mdix_on_chip(void)
1251 + return(p_set_mdix_on_chip_fn ? 1:0);
1254 +EXPORT_SYMBOL(avalanche_reset_ctrl);
1255 +EXPORT_SYMBOL(avalanche_get_reset_status);
1256 +EXPORT_SYMBOL(avalanche_sys_reset);
1257 +EXPORT_SYMBOL(avalanche_get_sys_last_reset_status);
1258 +EXPORT_SYMBOL(avalanche_power_ctrl);
1259 +EXPORT_SYMBOL(avalanche_get_power_status);
1260 +EXPORT_SYMBOL(avalanche_set_global_power_mode);
1261 +EXPORT_SYMBOL(avalanche_get_global_power_mode);
1262 +EXPORT_SYMBOL(avalanche_set_mdix_on_chip);
1263 +EXPORT_SYMBOL(avalanche_is_mdix_on_chip);
1265 +EXPORT_SYMBOL(avalanche_gpio_init);
1266 +EXPORT_SYMBOL(avalanche_gpio_ctrl);
1267 +EXPORT_SYMBOL(avalanche_gpio_out_bit);
1268 +EXPORT_SYMBOL(avalanche_gpio_in_bit);
1269 +EXPORT_SYMBOL(avalanche_gpio_out_value);
1270 +EXPORT_SYMBOL(avalanche_gpio_in_value);
1272 +EXPORT_SYMBOL(avalanche_set_vbus_freq);
1273 +EXPORT_SYMBOL(avalanche_get_vbus_freq);
1275 +EXPORT_SYMBOL(avalanche_get_chip_version_info);
1277 diff -urN linux.old/arch/mips/ar7/platform.h linux.dev/arch/mips/ar7/platform.h
1278 --- linux.old/arch/mips/ar7/platform.h 1970-01-01 01:00:00.000000000 +0100
1279 +++ linux.dev/arch/mips/ar7/platform.h 2005-11-10 01:10:45.799571750 +0100
1281 +#ifndef _PLATFORM_H_
1282 +#define _PLATFORM_H_
1284 +#include <linux/config.h>
1287 +/* Important: The definition of ENV_SPACE_SIZE should match with that in
1288 + * PSPBoot. (/psp_boot/inc/psbl/env.h)
1290 +#ifdef CONFIG_MIPS_AVALANCHE_TICFG
1291 +#define ENV_SPACE_SIZE (10 * 1024)
1294 +#ifdef CONFIG_MIPS_TNETV1050SDB
1295 +#define TNETV1050SDB
1299 +#ifdef CONFIG_MIPS_AR7DB
1300 +#define TNETD73XX_BOARD
1304 +#ifdef CONFIG_MIPS_AR7RD
1305 +#define TNETD73XX_BOARD
1309 +#ifdef CONFIG_AR7WRD
1310 +#define TNETD73XX_BOARD
1314 +#ifdef CONFIG_MIPS_AR7VWI
1315 +#define TNETD73XX_BOARD
1319 +/* Merging from the DEV_DSL-PSPL4.3.2.7_Patch release. */
1320 +#ifdef CONFIG_MIPS_AR7VW
1321 +#define TNETD73XX_BOARD
1325 +#ifdef CONFIG_MIPS_AR7WI
1326 +#define TNETD73XX_BOARD
1330 +#ifdef CONFIG_MIPS_AR7V
1331 +#define TNETD73XX_BOARD
1335 +#ifdef CONFIG_MIPS_AR7V
1336 +#define TNETD73XX_BOARD
1340 +#ifdef CONFIG_MIPS_WA1130
1346 diff -urN linux.old/arch/mips/ar7/promlib.c linux.dev/arch/mips/ar7/promlib.c
1347 --- linux.old/arch/mips/ar7/promlib.c 1970-01-01 01:00:00.000000000 +0100
1348 +++ linux.dev/arch/mips/ar7/promlib.c 2005-11-10 01:14:16.372731750 +0100
1351 + * Carsten Langgaard, carstenl@mips.com
1352 + * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
1354 + * This program is free software; you can distribute it and/or modify it
1355 + * under the terms of the GNU General Public License (Version 2) as
1356 + * published by the Free Software Foundation.
1358 + * This program is distributed in the hope it will be useful, but WITHOUT
1359 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1360 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1361 + * for more details.
1363 + * You should have received a copy of the GNU General Public License along
1364 + * with this program; if not, write to the Free Software Foundation, Inc.,
1365 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
1367 + * Putting things on the screen/serial line using Adam2 facilities.
1370 +#include <linux/types.h>
1371 +#include <asm/addrspace.h>
1373 +#define AVALANCHE_YAMON_FUNCTION_BASE (KSEG1ADDR(0x10000500))
1374 +#define AVALANCHE_YAMON_PROM_PRINT_COUNT_ADDR \
1375 + (AVALANCHE_YAMON_FUNCTION_BASE + 1 * 0x4)
1376 +#define AVALANCHE_YAMON_PROM_EXIT \
1377 + (AVALANCHE_YAMON_FUNCTION_BASE + 8 * 0x4)
1379 +void prom_putchar(char c)
1381 + static char buf[1];
1382 + void (*prom_print_str)(unsigned int dummy, char *s, int len) =
1383 + (void *)(*(uint32_t *)AVALANCHE_YAMON_PROM_PRINT_COUNT_ADDR);
1386 + prom_print_str(1, buf, 1);
1390 +void adam2_exit(int retval)
1392 + void (*yamon_exit)(int retval) =
1393 + (void *)(*(uint32_t *)AVALANCHE_YAMON_PROM_EXIT);
1395 + yamon_exit(retval);
1398 diff -urN linux.old/arch/mips/ar7/psp_env.c linux.dev/arch/mips/ar7/psp_env.c
1399 --- linux.old/arch/mips/ar7/psp_env.c 1970-01-01 01:00:00.000000000 +0100
1400 +++ linux.dev/arch/mips/ar7/psp_env.c 2005-11-10 01:10:45.799571750 +0100
1402 +#include <linux/config.h>
1403 +#include <linux/init.h>
1404 +#include <linux/string.h>
1405 +#include <linux/kernel.h>
1406 +#include <linux/module.h>
1407 +#include <asm/io.h>
1409 +#include "platform.h"
1411 +#define ENV_CELL_SIZE 16
1413 +/* control field decode */
1414 +#define ENV_GARBAGE_BIT 0x01 /* Env is garbage if this bit is off */
1415 +#define ENV_DYNAMIC_BIT 0x02 /* Env is dynamic if this bit is off */
1417 +#define ENV_CTRL_MASK 0x03
1418 +#define ENV_PREFINED (ENV_GARBAGE_BIT | ENV_DYNAMIC_BIT)
1419 +#define ENV_DYNAMIC (ENV_GARBAGE_BIT)
1421 +struct env_variable {
1422 + unsigned char varNum;
1423 + unsigned char ctrl;
1424 + unsigned short chksum;
1425 + unsigned char numCells;
1426 + unsigned char data[ENV_CELL_SIZE - 5]; /* The data section starts
1427 + * here, continues for
1432 +extern unsigned int max_env_entry;
1434 +/* Internal macros */
1435 +#define get_next_block(var) ((struct env_variable *)( (char*)(var) + (var)->numCells * ENV_CELL_SIZE))
1437 +typedef enum ENV_VARS {
1438 + env_vars_start = 0,
1447 +#if !defined (AVALANCHE) || defined(TNETC401B)
1450 +#if !defined(TNETV1020_BOARD)
1453 +#if defined (TNETD73XX_BOARD)
1459 +#if !defined (AVALANCHE) || defined(TNETC401B)
1462 +#if !defined(TNETV1020_BOARD)
1465 +#if defined (TNETD73XX_BOARD)
1468 +#if !defined(TNETV1020_BOARD)
1475 +#if defined (TNETV1050_BOARD)
1478 +#if !defined(TNETV1020_BOARD)
1480 + HWA_HRNDIS, /* Host (PC) side RNDIS address */
1487 +#ifndef AVALANCHE /* Avalanche boards use only one mac port */
1500 +#if defined (TNETV1050_BOARD)
1504 + * Add new env variables here.
1505 + * NOTE: New environment variables should always be placed at the end, ie
1506 + * just before env_vars_end.
1513 +struct env_description {
1519 +#define ENVSTR(x) #x
1520 +#define _ENV_ENTRY(x) {.idx = x, .nm = ENVSTR(x), .alias = NULL}
1522 +struct env_description env_ns[] = {
1523 + _ENV_ENTRY(env_vars_start), /* start. */
1524 + _ENV_ENTRY(CPUFREQ),
1525 + _ENV_ENTRY(MEMSZ),
1526 + _ENV_ENTRY(FLASHSZ),
1527 + _ENV_ENTRY(MODETTY0),
1528 + _ENV_ENTRY(MODETTY1),
1529 + _ENV_ENTRY(PROMPT),
1530 + _ENV_ENTRY(BOOTCFG),
1531 + _ENV_ENTRY(HWA_0),
1532 +#if !defined (AVALANCHE) || defined(TNETC401B)
1533 + _ENV_ENTRY(HWA_1),
1535 +#if !defined(TNETV1020_BOARD)
1536 + _ENV_ENTRY(HWA_RNDIS),
1538 +#if defined (TNETD73XX_BOARD)
1539 + _ENV_ENTRY(HWA_3),
1542 + _ENV_ENTRY(IPA_SVR),
1543 + _ENV_ENTRY(IPA_GATEWAY),
1544 + _ENV_ENTRY(SUBNET_MASK),
1545 + _ENV_ENTRY(BLINE_MAC0),
1546 +#if !defined (AVALANCHE) || defined(TNETC401B)
1547 + _ENV_ENTRY(BLINE_MAC1),
1549 +#if !defined(TNETV1020_BOARD)
1550 + _ENV_ENTRY(BLINE_RNDIS),
1552 +#if defined (TNETD73XX_BOARD)
1553 + _ENV_ENTRY(BLINE_ATM),
1555 +#if !defined(TNETV1020_BOARD)
1556 + _ENV_ENTRY(USB_PID),
1557 + _ENV_ENTRY(USB_VID),
1558 + _ENV_ENTRY(USB_EPPOLLI),
1560 +#if defined (TNETV1050_BOARD)
1561 + _ENV_ENTRY(BLINE_ESWITCH),
1563 +#if !defined(TNETV1020_BOARD)
1564 + _ENV_ENTRY(USB_SERIAL),
1565 + _ENV_ENTRY(HWA_HRNDIS),
1567 + _ENV_ENTRY(REMOTE_USER),
1568 + _ENV_ENTRY(REMOTE_PASS),
1569 + _ENV_ENTRY(REMOTE_DIR),
1570 + _ENV_ENTRY(SYSFREQ),
1571 + _ENV_ENTRY(LINK_TIMEOUT),
1572 +#ifndef AVALANCHE /* Avalanche boards use only one mac port */
1573 + _ENV_ENTRY(MAC_PORT),
1576 + _ENV_ENTRY(HOSTNAME),
1578 + _ENV_ENTRY(HW_REV_MAJOR),
1579 + _ENV_ENTRY(HW_REV_MINOR),
1580 + _ENV_ENTRY(HW_PATCH),
1581 + _ENV_ENTRY(SW_PATCH),
1582 + _ENV_ENTRY(SERIAL_NUMBER),
1584 + _ENV_ENTRY(TFTPCFG),
1585 +#if defined (TNETV1050_BOARD)
1586 + _ENV_ENTRY(HWA_ESWITCH),
1589 + * Add new entries below this.
1591 + /* Adam2 environment name alias. */
1592 + { .idx = IPA, .nm = "my_ipaddress" },
1593 + { .idx = CPUFREQ, .nm = "cpufrequency" },
1594 + { .idx = SYSFREQ, .nm = "sysfrequency" },
1595 + { .idx = HWA_0, .nm = "maca" },
1597 + { .idx = HWA_1, .nm = "macb" },
1599 + { .idx = MODETTY0, .nm = "modetty0" },
1600 + { .idx = MODETTY1, .nm = "modetty1" },
1601 + { .idx = MEMSZ, .nm = "memsize" },
1603 + _ENV_ENTRY(env_vars_end) /* delimiter. */
1606 +static inline int var_to_idx(const char* var)
1610 + /* go over the list of pre-defined environment variables */
1611 + for (ii = env_vars_start; env_ns[ii].idx != env_vars_end; ii++){
1612 + /* check if the env variable is listed */
1613 + if (strcmp(env_ns[ii].nm, var) == 0) {
1614 + return env_ns[ii].idx;
1617 + /* if an alias is present, check if the alias matches
1620 + if (env_ns[ii].alias != NULL) {
1621 + if (strcmp(env_ns[ii].alias, var) == 0) {
1622 + return env_ns[ii].idx;
1629 +extern int *_prom_envp;
1631 +/* FIXME: reading from the flash is extremly unstable. Sometime a read returns garbage,
1632 + * the next read some seconds later is ok. It looks like something is hidding or
1633 + * overlay the flash address at 0xb0000000. Is this possible?
1635 + * The readb() and while() usage below is a attempt of a workarround - with limited success.
1638 +static inline struct env_variable* get_var_by_number(int index)
1640 + struct env_variable *env_var = (struct env_variable *)_prom_envp;
1641 + volatile unsigned char nr;
1644 + env_var++; /* skip signature */
1647 + nr = readb(&(env_var->varNum));
1649 + while (i < max_env_entry && nr != 0xFF) {
1650 + if ((env_var->ctrl & ENV_CTRL_MASK) == ENV_PREFINED) {
1651 + if (nr == index) {
1656 + env_var = get_next_block(env_var);
1657 + nr = readb(&(env_var->varNum));
1663 +static inline struct env_variable* get_var_by_name(char *var)
1665 + struct env_variable *env_var = (struct env_variable *)_prom_envp;
1666 + volatile unsigned char nr;
1669 + env_var++; /* skip signature */
1671 + nr = readb(&(env_var->varNum));
1674 + while (i < max_env_entry && nr != 0xFF) {
1675 + if ((env_var->ctrl & ENV_CTRL_MASK) == ENV_DYNAMIC) {
1676 + if (strcmp(var, env_var->data) == 0)
1680 + env_var = get_next_block(env_var);
1681 + nr = readb(&(env_var->varNum));
1686 +static inline struct env_variable* get_var(char *var)
1688 + int index = var_to_idx(var);
1691 + return get_var_by_number(index);
1693 + return get_var_by_name(var);
1698 +static inline char *get_value(struct env_variable* env_var)
1700 + unsigned char *name;
1701 + unsigned char *value;
1702 + unsigned short chksum;
1705 + chksum = env_var->varNum + env_var->ctrl + env_var->numCells;
1707 + if ((env_var->ctrl & ENV_CTRL_MASK) == ENV_DYNAMIC) {
1708 + name = env_var->data;
1709 + value = env_var->data + strlen(name) + 1;
1711 + for(i = 0; i < strlen(name); i++)
1712 + chksum += name[i];
1714 + value = env_var->data;
1716 + for (i = 0; i < strlen(value); i++)
1717 + chksum += value[i];
1719 + chksum += env_var->chksum;
1720 + chksum = ~(chksum);
1730 + unsigned int psbl_size;
1731 + unsigned int env_base;
1732 + unsigned int env_size;
1733 + unsigned int ffs_base;
1734 + unsigned int ffs_size;
1737 +char *prom_psp_getenv(char *envname)
1739 + struct env_variable* env_var;
1742 + if (strcmp("bootloader", envname) == 0)
1745 + if (!(env_var = get_var(envname)))
1748 + value = get_value(env_var);
1752 diff -urN linux.old/arch/mips/ar7/reset.c linux.dev/arch/mips/ar7/reset.c
1753 --- linux.old/arch/mips/ar7/reset.c 1970-01-01 01:00:00.000000000 +0100
1754 +++ linux.dev/arch/mips/ar7/reset.c 2005-11-10 01:14:16.372731750 +0100
1757 + * Carsten Langgaard, carstenl@mips.com
1758 + * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
1760 + * ########################################################################
1762 + * This program is free software; you can distribute it and/or modify it
1763 + * under the terms of the GNU General Public License (Version 2) as
1764 + * published by the Free Software Foundation.
1766 + * This program is distributed in the hope it will be useful, but WITHOUT
1767 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1768 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1769 + * for more details.
1771 + * You should have received a copy of the GNU General Public License along
1772 + * with this program; if not, write to the Free Software Foundation, Inc.,
1773 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
1775 + * ########################################################################
1777 + * Reset the AR7 boards.
1781 +#include <linux/init.h>
1782 +#include <linux/kernel.h>
1783 +#include <linux/string.h>
1784 +#include <linux/types.h>
1786 +#include <asm/mipsregs.h>
1787 +#include <asm/reboot.h>
1788 +#include <asm/addrspace.h>
1790 +int preserve_adam2 = 1;
1792 +extern void adam2_exit(int retval);
1794 +static void ar7_machine_restart(char *command);
1795 +static void ar7_machine_halt(void);
1796 +static void ar7_machine_power_off(void);
1798 +static void ar7_machine_restart(char *command)
1800 + volatile uint32_t *softres_reg = (void *)(KSEG1ADDR(0x08611600 + 0x4));
1805 +static void ar7_machine_halt(void)
1808 + if (preserve_adam2) {
1809 + set_c0_status(ST0_BEV);
1812 + /* I'd like to have Alt-SysRq-b work in this state.
1813 + * What's missing here? The timer interrupt is still running.
1814 + * Why doesn't the UART work anymore? */
1816 + __asm__(".set\tmips3\n\t"
1823 +static void ar7_machine_power_off(void)
1825 + volatile uint32_t *power_reg = (void *)(KSEG1ADDR(0x08610A00));
1826 + uint32_t power_state = *power_reg;
1828 + /* add something to turn LEDs off? */
1830 + power_state &= ~(3 << 30);
1831 + power_state |= (3 << 30); /* power down */
1832 + *power_reg = power_state;
1834 + printk("after power down?\n");
1837 +void ar7_reboot_setup(void)
1839 + _machine_restart = ar7_machine_restart;
1840 + _machine_halt = ar7_machine_halt;
1841 + _machine_power_off = ar7_machine_power_off;
1844 +static int __init ar7_do_preserve_adam2(char *s)
1846 + if (!strcmp(s, "no") || !strcmp(s, "0"))
1847 + preserve_adam2 = 0;
1849 + preserve_adam2 = 1;
1853 +__setup("adam2=", ar7_do_preserve_adam2);
1854 diff -urN linux.old/arch/mips/ar7/setup.c linux.dev/arch/mips/ar7/setup.c
1855 --- linux.old/arch/mips/ar7/setup.c 1970-01-01 01:00:00.000000000 +0100
1856 +++ linux.dev/arch/mips/ar7/setup.c 2005-11-10 01:12:43.946955500 +0100
1859 + * Carsten Langgaard, carstenl@mips.com
1860 + * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
1862 + * This program is free software; you can distribute it and/or modify it
1863 + * under the terms of the GNU General Public License (Version 2) as
1864 + * published by the Free Software Foundation.
1866 + * This program is distributed in the hope it will be useful, but WITHOUT
1867 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1868 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1869 + * for more details.
1871 + * You should have received a copy of the GNU General Public License along
1872 + * with this program; if not, write to the Free Software Foundation, Inc.,
1873 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
1876 +#include <linux/config.h>
1877 +#include <linux/init.h>
1878 +#include <linux/string.h>
1879 +#include <linux/irq.h>
1881 +#include <asm/processor.h>
1882 +#include <asm/irq.h>
1883 +#include <asm/irq_cpu.h>
1884 +#include <asm/time.h>
1885 +#include <asm/mipsregs.h>
1886 +#include <asm/mips-boards/prom.h>
1889 +extern void rs_kgdb_hook(int);
1890 +extern void breakpoint(void);
1891 +int remote_debug = 0;
1894 +extern void ar7_reboot_setup(void);
1895 +extern void ar7_irq_init(int);
1896 +extern asmlinkage void ar7IRQ(void);
1898 +void ar7_time_init(void)
1901 + mips_hpt_frequency = CONFIG_AR7_CPU * 500000;
1904 +void ar7_timer_setup(struct irqaction *irq)
1906 + setup_irq(7, irq);
1907 + set_c0_status(IE_IRQ5);
1910 +void __init init_IRQ(void)
1912 + init_generic_irq();
1913 + mips_cpu_irq_init(0);
1916 + /* Now safe to set the exception vector. */
1917 + set_except_vector(0, ar7IRQ);
1922 + set_debug_traps();
1928 +const char *get_system_type(void)
1930 + return "Texas Instruments AR7";
1933 +void __init ar7_setup(void)
1936 + int rs_putDebugChar(char);
1937 + char rs_getDebugChar(void);
1938 + extern int (*generic_putDebugChar)(char);
1939 + extern char (*generic_getDebugChar)(void);
1942 +#ifdef CONFIG_SERIAL_CONSOLE
1943 + argptr = prom_getcmdline();
1944 + if ((argptr = strstr(argptr, "console=")) == NULL) {
1949 + s = prom_getenv("modetty0");
1950 + strcpy(console, "38400");
1953 + while (s[i] >= '0' && s[i] <= '9')
1957 + strncpy(console, s, i);
1962 + argptr = prom_getcmdline();
1963 + strcat(argptr, " console=ttyS0,");
1964 + strcat(argptr, console);
1969 + argptr = prom_getcmdline();
1970 + if ((argptr = strstr(argptr, "kgdb=ttyS")) != NULL) {
1972 + argptr += strlen("kgdb=ttyS");
1973 + if (*argptr != '0' && *argptr != '1')
1974 + printk("KGDB: Uknown serial line /dev/ttyS%c, "
1975 + "falling back to /dev/ttyS1\n", *argptr);
1976 + line = *argptr == '0' ? 0 : 1;
1977 + printk("KGDB: Using serial line /dev/ttyS%d for session\n",
1980 + rs_kgdb_hook(line);
1981 + generic_putDebugChar = rs_putDebugChar;
1982 + generic_getDebugChar = rs_getDebugChar;
1984 + prom_printf("KGDB: Using serial line /dev/ttyS%d for session, "
1985 + "please connect your debugger\n", line ? 1 : 0);
1988 + /* Breakpoints are in init_IRQ() */
1992 + argptr = prom_getcmdline();
1993 + if ((argptr = strstr(argptr, "nofpu")) != NULL)
1994 + cpu_data[0].options &= ~MIPS_CPU_FPU;
1996 + ar7_reboot_setup();
1998 + board_time_init = ar7_time_init;
1999 + board_timer_setup = ar7_timer_setup;
2001 diff -urN linux.old/arch/mips/ar7/tnetd73xx_misc.c linux.dev/arch/mips/ar7/tnetd73xx_misc.c
2002 --- linux.old/arch/mips/ar7/tnetd73xx_misc.c 1970-01-01 01:00:00.000000000 +0100
2003 +++ linux.dev/arch/mips/ar7/tnetd73xx_misc.c 2005-11-10 01:12:43.946955500 +0100
2005 +/******************************************************************************
2006 + * FILE PURPOSE: TNETD73xx Misc modules API Source
2007 + ******************************************************************************
2008 + * FILE NAME: tnetd73xx_misc.c
2010 + * DESCRIPTION: Clock Control, Reset Control, Power Management, GPIO
2011 + * FSER Modules API
2012 + * As per TNETD73xx specifications
2014 + * REVISION HISTORY:
2015 + * 27 Nov 02 - Sharath Kumar PSP TII
2016 + * 14 Feb 03 - Anant Gole PSP TII
2018 + * (C) Copyright 2002, Texas Instruments, Inc
2019 + *******************************************************************************/
2021 +#include <linux/types.h>
2022 +#include <asm/ar7/tnetd73xx.h>
2023 +#include <asm/ar7/tnetd73xx_misc.h>
2025 +/* TNETD73XX Revision */
2026 +u32 tnetd73xx_get_revision(void)
2028 + /* Read Chip revision register - This register is from GPIO module */
2029 + return ( (u32) REG32_DATA(TNETD73XX_CVR));
2032 +/*****************************************************************************
2033 + * Reset Control Module
2034 + *****************************************************************************/
2037 +void tnetd73xx_reset_ctrl(TNETD73XX_RESET_MODULE_T reset_module, TNETD73XX_RESET_CTRL_T reset_ctrl)
2041 + /* read current reset register */
2042 + REG32_READ(TNETD73XX_RST_CTRL_PRCR, reset_status);
2044 + if (reset_ctrl == OUT_OF_RESET)
2046 + /* bring module out of reset */
2047 + reset_status |= (1 << reset_module);
2051 + /* put module in reset */
2052 + reset_status &= (~(1 << reset_module));
2055 + /* write to the reset register */
2056 + REG32_WRITE(TNETD73XX_RST_CTRL_PRCR, reset_status);
2060 +TNETD73XX_RESET_CTRL_T tnetd73xx_get_reset_status (TNETD73XX_RESET_MODULE_T reset_module)
2064 + REG32_READ(TNETD73XX_RST_CTRL_PRCR, reset_status);
2065 + return ( (reset_status & (1 << reset_module)) ? OUT_OF_RESET : IN_RESET );
2068 +void tnetd73xx_sys_reset(TNETD73XX_SYS_RST_MODE_T mode)
2070 + REG32_WRITE(TNETD73XX_RST_CTRL_SWRCR, mode);
2073 +#define TNETD73XX_RST_CTRL_RSR_MASK 0x3
2075 +TNETD73XX_SYS_RESET_STATUS_T tnetd73xx_get_sys_last_reset_status()
2077 + u32 sys_reset_status;
2079 + REG32_READ(TNETD73XX_RST_CTRL_RSR, sys_reset_status);
2081 + return ( (TNETD73XX_SYS_RESET_STATUS_T) (sys_reset_status & TNETD73XX_RST_CTRL_RSR_MASK) );
2085 +/*****************************************************************************
2086 + * Power Control Module
2087 + *****************************************************************************/
2088 +#define TNETD73XX_GLOBAL_POWER_DOWN_MASK 0x3FFFFFFF /* bit 31, 30 masked */
2089 +#define TNETD73XX_GLOBAL_POWER_DOWN_BIT 30 /* shift to bit 30, 31 */
2092 +void tnetd73xx_power_ctrl(TNETD73XX_POWER_MODULE_T power_module, TNETD73XX_POWER_CTRL_T power_ctrl)
2096 + /* read current power down control register */
2097 + REG32_READ(TNETD73XX_POWER_CTRL_PDCR, power_status);
2099 + if (power_ctrl == POWER_CTRL_POWER_DOWN)
2101 + /* power down the module */
2102 + power_status |= (1 << power_module);
2106 + /* power on the module */
2107 + power_status &= (~(1 << power_module));
2110 + /* write to the reset register */
2111 + REG32_WRITE(TNETD73XX_POWER_CTRL_PDCR, power_status);
2114 +TNETD73XX_POWER_CTRL_T tnetd73xx_get_pwr_status(TNETD73XX_POWER_MODULE_T power_module)
2118 + /* read current power down control register */
2119 + REG32_READ(TNETD73XX_POWER_CTRL_PDCR, power_status);
2121 + return ( (power_status & (1 << power_module)) ? POWER_CTRL_POWER_DOWN : POWER_CTRL_POWER_UP );
2124 +void tnetd73xx_set_global_pwr_mode(TNETD73XX_SYS_POWER_MODE_T power_mode)
2128 + /* read current power down control register */
2129 + REG32_READ(TNETD73XX_POWER_CTRL_PDCR, power_status);
2131 + power_status &= TNETD73XX_GLOBAL_POWER_DOWN_MASK;
2132 + power_status |= ( power_mode << TNETD73XX_GLOBAL_POWER_DOWN_BIT);
2134 + /* write to power down control register */
2135 + REG32_WRITE(TNETD73XX_POWER_CTRL_PDCR, power_status);
2138 +TNETD73XX_SYS_POWER_MODE_T tnetd73xx_get_global_pwr_mode()
2142 + /* read current power down control register */
2143 + REG32_READ(TNETD73XX_POWER_CTRL_PDCR, power_status);
2145 + power_status &= (~TNETD73XX_GLOBAL_POWER_DOWN_MASK);
2146 + power_status = ( power_status >> TNETD73XX_GLOBAL_POWER_DOWN_BIT);
2148 + return ( (TNETD73XX_SYS_POWER_MODE_T) power_status );
2152 +/*****************************************************************************
2154 + *****************************************************************************/
2156 +#define TNETD73XX_WAKEUP_POLARITY_BIT 16
2158 +void tnetd73xx_wakeup_ctrl(TNETD73XX_WAKEUP_INTERRUPT_T wakeup_int,
2159 + TNETD73XX_WAKEUP_CTRL_T wakeup_ctrl,
2160 + TNETD73XX_WAKEUP_POLARITY_T wakeup_polarity)
2162 + u32 wakeup_status;
2164 + /* read the wakeup control register */
2165 + REG32_READ(TNETD73XX_POWER_CTRL_WKCR, wakeup_status);
2167 + /* enable/disable */
2168 + if (wakeup_ctrl == WAKEUP_ENABLED)
2170 + /* enable wakeup */
2171 + wakeup_status |= wakeup_int;
2175 + /* disable wakeup */
2176 + wakeup_status &= (~wakeup_int);
2179 + /* set polarity */
2180 + if (wakeup_polarity == WAKEUP_ACTIVE_LOW)
2182 + wakeup_status |= (wakeup_int << TNETD73XX_WAKEUP_POLARITY_BIT);
2186 + wakeup_status &= ~(wakeup_int << TNETD73XX_WAKEUP_POLARITY_BIT);
2189 + /* write the wakeup control register */
2190 + REG32_WRITE(TNETD73XX_POWER_CTRL_WKCR, wakeup_status);
2194 +/*****************************************************************************
2196 + *****************************************************************************/
2198 +void tnetd73xx_fser_ctrl(TNETD73XX_FSER_MODE_T fser_mode)
2200 + REG32_WRITE(TNETD73XX_FSER_BASE, fser_mode);
2203 +/*****************************************************************************
2205 + *****************************************************************************/
2207 +#define MIN(x,y) ( ((x) < (y)) ? (x) : (y) )
2208 +#define MAX(x,y) ( ((x) > (y)) ? (x) : (y) )
2209 +#define ABS(x) ( ((signed)(x) > 0) ? (x) : (-(x)) )
2210 +#define CEIL(x,y) ( ((x) + (y) / 2) / (y) )
2212 +#define CLKC_CLKCR(x) (TNETD73XX_CLOCK_CTRL_BASE + 0x20 + (0x20 * (x)))
2213 +#define CLKC_CLKPLLCR(x) (TNETD73XX_CLOCK_CTRL_BASE + 0x30 + (0x20 * (x)))
2215 +#define CLKC_PRE_DIVIDER 0x0000001F
2216 +#define CLKC_POST_DIVIDER 0x001F0000
2218 +#define CLKC_PLL_STATUS 0x1
2219 +#define CLKC_PLL_FACTOR 0x0000F000
2221 +#define BOOTCR_PLL_BYPASS (1 << 5)
2222 +#define BOOTCR_MIPS_ASYNC_MODE (1 << 25)
2224 +#define MIPS_PLL_SELECT 0x00030000
2225 +#define SYSTEM_PLL_SELECT 0x0000C000
2226 +#define USB_PLL_SELECT 0x000C0000
2227 +#define ADSLSS_PLL_SELECT 0x00C00000
2229 +#define MIPS_AFECLKI_SELECT 0x00000000
2230 +#define MIPS_REFCLKI_SELECT 0x00010000
2231 +#define MIPS_XTAL3IN_SELECT 0x00020000
2233 +#define SYSTEM_AFECLKI_SELECT 0x00000000
2234 +#define SYSTEM_REFCLKI_SELECT 0x00004000
2235 +#define SYSTEM_XTAL3IN_SELECT 0x00008000
2236 +#define SYSTEM_MIPSPLL_SELECT 0x0000C000
2238 +#define USB_SYSPLL_SELECT 0x00000000
2239 +#define USB_REFCLKI_SELECT 0x00040000
2240 +#define USB_XTAL3IN_SELECT 0x00080000
2241 +#define USB_MIPSPLL_SELECT 0x000C0000
2243 +#define ADSLSS_AFECLKI_SELECT 0x00000000
2244 +#define ADSLSS_REFCLKI_SELECT 0x00400000
2245 +#define ADSLSS_XTAL3IN_SELECT 0x00800000
2246 +#define ADSLSS_MIPSPLL_SELECT 0x00C00000
2248 +#define SYS_MAX CLK_MHZ(150)
2249 +#define SYS_MIN CLK_MHZ(1)
2251 +#define MIPS_SYNC_MAX SYS_MAX
2252 +#define MIPS_ASYNC_MAX CLK_MHZ(160)
2253 +#define MIPS_MIN CLK_MHZ(1)
2255 +#define USB_MAX CLK_MHZ(100)
2256 +#define USB_MIN CLK_MHZ(1)
2258 +#define ADSL_MAX CLK_MHZ(180)
2259 +#define ADSL_MIN CLK_MHZ(1)
2261 +#define PLL_MUL_MAXFACTOR 15
2262 +#define MAX_DIV_VALUE 32
2263 +#define MIN_DIV_VALUE 1
2265 +#define MIN_PLL_INP_FREQ CLK_MHZ(8)
2266 +#define MAX_PLL_INP_FREQ CLK_MHZ(100)
2268 +#define DIVIDER_LOCK_TIME 10100
2269 +#define PLL_LOCK_TIME 10100 * 75
2273 + /****************************************************************************
2274 + * DATA PURPOSE: PRIVATE Variables
2275 + **************************************************************************/
2276 + static u32 *clk_src[4];
2277 + static u32 mips_pll_out;
2278 + static u32 sys_pll_out;
2279 + static u32 afeclk_inp;
2280 + static u32 refclk_inp;
2281 + static u32 xtal_inp;
2282 + static u32 present_min;
2283 + static u32 present_max;
2285 + /* Forward References */
2286 + static u32 find_gcd(u32 min, u32 max);
2287 + static u32 compute_prediv( u32 divider, u32 min, u32 max);
2288 + static void get_val(u32 base_freq, u32 output_freq,u32 *multiplier, u32 *divider);
2289 + static u32 get_base_frequency(TNETD73XX_CLKC_ID_T clk_id);
2290 + static void find_approx(u32 *,u32 *,u32);
2292 + /****************************************************************************
2293 + * FUNCTION: tnetd73xx_clkc_init
2294 + ****************************************************************************
2295 + * Description: The routine initializes the internal variables depending on
2296 + * on the sources selected for different clocks.
2297 + ***************************************************************************/
2298 +void tnetd73xx_clkc_init(u32 afeclk, u32 refclk, u32 xtal3in)
2303 + afeclk_inp = afeclk;
2304 + refclk_inp = refclk;
2305 + xtal_inp = xtal3in;
2307 + choice = REG32_DATA(TNETD73XX_DCL_BOOTCR) & MIPS_PLL_SELECT;
2310 + case MIPS_AFECLKI_SELECT:
2311 + clk_src[CLKC_MIPS] = &afeclk_inp;
2314 + case MIPS_REFCLKI_SELECT:
2315 + clk_src[CLKC_MIPS] = &refclk_inp;
2318 + case MIPS_XTAL3IN_SELECT:
2319 + clk_src[CLKC_MIPS] = &xtal_inp;
2323 + clk_src[CLKC_MIPS] = 0;
2327 + choice = REG32_DATA(TNETD73XX_DCL_BOOTCR) & SYSTEM_PLL_SELECT;
2330 + case SYSTEM_AFECLKI_SELECT:
2331 + clk_src[CLKC_SYS] = &afeclk_inp;
2334 + case SYSTEM_REFCLKI_SELECT:
2335 + clk_src[CLKC_SYS] = &refclk_inp;
2338 + case SYSTEM_XTAL3IN_SELECT:
2339 + clk_src[CLKC_SYS] = &xtal_inp;
2342 + case SYSTEM_MIPSPLL_SELECT:
2343 + clk_src[CLKC_SYS] = &mips_pll_out;
2347 + clk_src[CLKC_SYS] = 0;
2352 + choice = REG32_DATA(TNETD73XX_DCL_BOOTCR) & ADSLSS_PLL_SELECT;
2355 + case ADSLSS_AFECLKI_SELECT:
2356 + clk_src[CLKC_ADSLSS] = &afeclk_inp;
2359 + case ADSLSS_REFCLKI_SELECT:
2360 + clk_src[CLKC_ADSLSS] = &refclk_inp;
2363 + case ADSLSS_XTAL3IN_SELECT:
2364 + clk_src[CLKC_ADSLSS] = &xtal_inp;
2367 + case ADSLSS_MIPSPLL_SELECT:
2368 + clk_src[CLKC_ADSLSS] = &mips_pll_out;
2372 + clk_src[CLKC_ADSLSS] = 0;
2377 + choice = REG32_DATA(TNETD73XX_DCL_BOOTCR) & USB_PLL_SELECT;
2380 + case USB_SYSPLL_SELECT:
2381 + clk_src[CLKC_USB] = &sys_pll_out ;
2384 + case USB_REFCLKI_SELECT:
2385 + clk_src[CLKC_USB] = &refclk_inp;
2388 + case USB_XTAL3IN_SELECT:
2389 + clk_src[CLKC_USB] = &xtal_inp;
2392 + case USB_MIPSPLL_SELECT:
2393 + clk_src[CLKC_USB] = &mips_pll_out;
2397 + clk_src[CLKC_USB] = 0;
2404 +/****************************************************************************
2405 + * FUNCTION: tnetd73xx_clkc_set_freq
2406 + ****************************************************************************
2407 + * Description: The above routine is called to set the output_frequency of the
2408 + * selected clock(using clk_id) to the required value given
2409 + * by the variable output_freq.
2410 + ***************************************************************************/
2411 +TNETD73XX_ERR tnetd73xx_clkc_set_freq
2413 + TNETD73XX_CLKC_ID_T clk_id,
2426 + /* check if PLLs are bypassed*/
2427 + if(REG32_DATA(TNETD73XX_DCL_BOOTCR) & BOOTCR_PLL_BYPASS)
2429 + return TNETD73XX_ERR_ERROR;
2432 + /*check if the requested output_frequency is in valid range*/
2436 + if( output_freq < SYS_MIN || output_freq > SYS_MAX)
2438 + return TNETD73XX_ERR_ERROR;
2440 + present_min = SYS_MIN;
2441 + present_max = SYS_MAX;
2445 + if((output_freq < MIPS_MIN) ||
2446 + (output_freq > ((REG32_DATA(TNETD73XX_DCL_BOOTCR) & BOOTCR_MIPS_ASYNC_MODE) ? MIPS_ASYNC_MAX: MIPS_SYNC_MAX)))
2448 + return TNETD73XX_ERR_ERROR;
2450 + present_min = MIPS_MIN;
2451 + present_max = (REG32_DATA(TNETD73XX_DCL_BOOTCR) & BOOTCR_MIPS_ASYNC_MODE) ? MIPS_ASYNC_MAX: MIPS_SYNC_MAX;
2455 + if( output_freq < USB_MIN || output_freq > USB_MAX)
2457 + return TNETD73XX_ERR_ERROR;
2459 + present_min = USB_MIN;
2460 + present_max = USB_MAX;
2464 + if( output_freq < ADSL_MIN || output_freq > ADSL_MAX)
2466 + return TNETD73XX_ERR_ERROR;
2468 + present_min = ADSL_MIN;
2469 + present_max = ADSL_MAX;
2474 + base_freq = get_base_frequency(clk_id);
2477 + /* check for minimum base frequency value */
2478 + if( base_freq < MIN_PLL_INP_FREQ)
2480 + return TNETD73XX_ERR_ERROR;
2483 + get_val(output_freq, base_freq, &multiplier, ÷r);
2485 + /* check multiplier range */
2486 + if( (multiplier > PLL_MUL_MAXFACTOR) || (multiplier <= 0) )
2488 + return TNETD73XX_ERR_ERROR;
2491 + /* check divider value */
2492 + if( divider == 0 )
2494 + return TNETD73XX_ERR_ERROR;
2497 + /*compute minimum and maximum predivider values */
2498 + min_prediv = MAX(base_freq / MAX_PLL_INP_FREQ + 1, divider / MAX_DIV_VALUE + 1);
2499 + max_prediv = MIN(base_freq / MIN_PLL_INP_FREQ, MAX_DIV_VALUE);
2501 + /*adjust the value of divider so that it not less than minimum predivider value*/
2502 + if (divider < min_prediv)
2504 + temp = CEIL(min_prediv, divider);
2505 + if ((temp * multiplier) > PLL_MUL_MAXFACTOR)
2507 + return TNETD73XX_ERR_ERROR ;
2511 + multiplier = temp * multiplier;
2512 + divider = min_prediv;
2517 + /* compute predivider and postdivider values */
2518 + prediv = compute_prediv (divider, min_prediv, max_prediv);
2519 + postdiv = CEIL(divider,prediv);
2521 + /*return fail if postdivider value falls out of range */
2522 + if(postdiv > MAX_DIV_VALUE)
2524 + return TNETD73XX_ERR_ERROR;
2528 + /*write predivider and postdivider values*/
2529 + /* pre-Divider and post-divider are 5 bit N+1 dividers */
2530 + REG32_WRITE(CLKC_CLKCR(clk_id), ((postdiv -1) & 0x1F) << 16 | ((prediv -1) & 0x1F) );
2532 + /*wait for divider output to stabilise*/
2533 + for(temp =0; temp < DIVIDER_LOCK_TIME; temp++);
2535 + /*write to PLL clock register*/
2537 + if(clk_id == CLKC_SYS)
2539 + /* but before writing put DRAM to hold mode */
2540 + REG32_DATA(TNETD73XX_EMIF_SDRAM_CFG) |= 0x80000000;
2542 + /*Bring PLL into div mode */
2543 + REG32_WRITE(CLKC_CLKPLLCR(clk_id), 0x4);
2545 + /*compute the word to be written to PLLCR
2546 + *corresponding to multiplier value
2548 + multiplier = (((multiplier - 1) & 0xf) << 12)| ((255 <<3) | 0x0e);
2550 + /* wait till PLL enters div mode */
2551 + while(REG32_DATA(CLKC_CLKPLLCR(clk_id)) & CLKC_PLL_STATUS)
2554 + REG32_WRITE(CLKC_CLKPLLCR(clk_id), multiplier);
2556 + while(!REG32_DATA(CLKC_CLKPLLCR(clk_id)) & CLKC_PLL_STATUS)
2560 + /*wait for External pll to lock*/
2561 + for(temp =0; temp < PLL_LOCK_TIME; temp++);
2563 + if(clk_id == CLKC_SYS)
2565 + /* Bring DRAM out of hold */
2566 + REG32_DATA(TNETD73XX_EMIF_SDRAM_CFG) &= ~0x80000000;
2569 + return TNETD73XX_ERR_OK ;
2572 +/****************************************************************************
2573 + * FUNCTION: tnetd73xx_clkc_get_freq
2574 + ****************************************************************************
2575 + * Description: The above routine is called to get the output_frequency of the
2576 + * selected clock( clk_id)
2577 + ***************************************************************************/
2578 +u32 tnetd73xx_clkc_get_freq
2580 + TNETD73XX_CLKC_ID_T clk_id
2584 + u32 clk_ctrl_register;
2585 + u32 clk_pll_setting;
2586 + u32 clk_predivider;
2587 + u32 clk_postdivider;
2592 + base_freq = get_base_frequency(clk_id);
2594 + clk_ctrl_register = REG32_DATA(CLKC_CLKCR(clk_id));
2596 + /* pre-Divider and post-divider are 5 bit N+1 dividers */
2597 + clk_predivider = (CLKC_PRE_DIVIDER & clk_ctrl_register) + 1;
2598 + clk_postdivider = ((CLKC_POST_DIVIDER & clk_ctrl_register) >> 16) + 1;
2600 + divider = clk_predivider * clk_postdivider;
2603 + if( (REG32_DATA(TNETD73XX_DCL_BOOTCR) & BOOTCR_PLL_BYPASS))
2605 + return (CEIL(base_freq, divider)); /* PLLs bypassed.*/
2611 + /* return the current clock speed based upon the PLL setting */
2612 + clk_pll_setting = REG32_DATA(CLKC_CLKPLLCR(clk_id));
2614 + /* Get the PLL multiplication factor */
2615 + pll_factor = ((clk_pll_setting & CLKC_PLL_FACTOR) >> 12) + 1;
2617 + /* Check if we're in divide mode or multiply mode */
2618 + if((clk_pll_setting & 0x1) == 0)
2620 + /* We're in divide mode */
2621 + if(pll_factor < 0x10)
2622 + return (CEIL(base_freq >> 1, divider));
2624 + return (CEIL(base_freq >> 2, divider));
2627 + else /* We're in PLL mode */
2629 + /* See if PLLNDIV & PLLDIV are set */
2630 + if((clk_pll_setting & 0x0800) && (clk_pll_setting & 0x2))
2632 + if(clk_pll_setting & 0x1000)
2634 + /* clk = base_freq * k/2 */
2635 + return(CEIL((base_freq * pll_factor) >> 1, divider));
2639 + /* clk = base_freq * (k-1) / 4)*/
2640 + return(CEIL((base_freq * (pll_factor - 1)) >>2, divider));
2645 + if(pll_factor < 0x10)
2647 + /* clk = base_freq * k */
2648 + return(CEIL(base_freq * pll_factor, divider));
2653 + /* clk = base_freq */
2654 + return(CEIL(base_freq, divider));
2658 + return(0); /* Should never reach here */
2665 +/* local helper functions */
2667 +/****************************************************************************
2668 + * FUNCTION: get_base_frequency
2669 + ****************************************************************************
2670 + * Description: The above routine is called to get base frequency of the clocks.
2671 + ***************************************************************************/
2673 +static u32 get_base_frequency(TNETD73XX_CLKC_ID_T clk_id)
2675 + /* update the current MIPs PLL output value, if the required
2676 + * source is MIPS PLL
2678 + if ( clk_src[clk_id] == &mips_pll_out)
2680 + *clk_src[clk_id] = tnetd73xx_clkc_get_freq(CLKC_MIPS);
2684 + /* update the current System PLL output value, if the required
2685 + * source is system PLL
2687 + if ( clk_src[clk_id] == &sys_pll_out)
2689 + *clk_src[clk_id] = tnetd73xx_clkc_get_freq(CLKC_SYS);
2692 + return (*clk_src[clk_id]);
2698 +/****************************************************************************
2699 + * FUNCTION: find_gcd
2700 + ****************************************************************************
2701 + * Description: The above routine is called to find gcd of 2 numbers.
2702 + ***************************************************************************/
2703 +static u32 find_gcd
2709 + if (max % min == 0)
2715 + return find_gcd(max % min, min);
2719 +/****************************************************************************
2720 + * FUNCTION: compute_prediv
2721 + ****************************************************************************
2722 + * Description: The above routine is called to compute predivider value
2723 + ***************************************************************************/
2724 +static u32 compute_prediv(u32 divider, u32 min, u32 max)
2728 + /* return the divider itself it it falls within the range of predivider*/
2729 + if (min <= divider && divider <= max)
2734 + /* find a value for prediv such that it is a factor of divider */
2735 + for (prediv = max; prediv >= min ; prediv--)
2737 + if ( (divider % prediv) == 0 )
2743 + /* No such factor exists, return min as prediv */
2747 +/****************************************************************************
2748 + * FUNCTION: get_val
2749 + ****************************************************************************
2750 + * Description: This routine is called to get values of divider and multiplier.
2751 + ***************************************************************************/
2753 +static void get_val(u32 output_freq, u32 base_freq,u32 *multiplier, u32 *divider)
2761 + /* find gcd of base_freq, output_freq */
2762 + min_freq = (base_freq < output_freq) ? base_freq : output_freq;
2763 + max_freq = (base_freq > output_freq) ? base_freq : output_freq;
2764 + gcd = find_gcd(min_freq , max_freq);
2767 + return; /* ERROR */
2769 + /* compute values of multiplier and divider */
2770 + temp_mul = output_freq / gcd;
2771 + temp_div = base_freq / gcd;
2774 + /* set multiplier such that 1 <= multiplier <= PLL_MUL_MAXFACTOR */
2775 + if( temp_mul > PLL_MUL_MAXFACTOR )
2777 + if((temp_mul / temp_div) > PLL_MUL_MAXFACTOR)
2780 + find_approx(&temp_mul,&temp_div,base_freq);
2783 + *multiplier = temp_mul;
2784 + *divider = temp_div;
2787 +/****************************************************************************
2788 + * FUNCTION: find_approx
2789 + ****************************************************************************
2790 + * Description: This function gets the approx value of num/denom.
2791 + ***************************************************************************/
2793 +static void find_approx(u32 *num,u32 *denom,u32 base_freq)
2800 + int32_t prev_closest;
2810 + prev_closest = 0x7fffffff; /* maximum possible value */
2814 + /* start with max */
2815 + for(temp_num = 15; temp_num >=1; temp_num--)
2818 + temp_denom = CEIL(temp_num * denom1, num1);
2819 + output_freq = (temp_num * base_freq) / temp_denom;
2821 + if(temp_denom < 1)
2827 + normalize = CEIL(num1,temp_num);
2828 + closest = (ABS((num1 * (temp_denom) ) - (temp_num * denom1))) * normalize;
2829 + if(closest < prev_closest && output_freq > present_min && output_freq <present_max)
2831 + prev_closest = closest;
2833 + denom2 = temp_denom;
2840 + gcd = find_gcd(num2,denom2);
2841 + num2 = num2 / gcd;
2842 + denom2 = denom2 /gcd;
2849 +/*****************************************************************************
2851 + *****************************************************************************/
2853 +/****************************************************************************
2854 + * FUNCTION: tnetd73xx_gpio_init
2855 + ***************************************************************************/
2856 +void tnetd73xx_gpio_init()
2858 + /* Bring module out of reset */
2859 + tnetd73xx_reset_ctrl(RESET_MODULE_GPIO, OUT_OF_RESET);
2860 + REG32_WRITE(TNETD73XX_GPIOENR, 0xFFFFFFFF);
2863 +/****************************************************************************
2864 + * FUNCTION: tnetd73xx_gpio_ctrl
2865 + ***************************************************************************/
2866 +void tnetd73xx_gpio_ctrl(TNETD73XX_GPIO_PIN_T gpio_pin,
2867 + TNETD73XX_GPIO_PIN_MODE_T pin_mode,
2868 + TNETD73XX_GPIO_PIN_DIRECTION_T pin_direction)
2871 + REG32_READ(TNETD73XX_GPIOENR, pin_status);
2872 + if (pin_mode == GPIO_PIN)
2874 + pin_status |= (1 << gpio_pin);
2875 + REG32_WRITE(TNETD73XX_GPIOENR, pin_status);
2877 + /* Set pin direction */
2878 + REG32_READ(TNETD73XX_GPIOPDIRR, pin_status);
2879 + if (pin_direction == GPIO_INPUT_PIN)
2881 + pin_status |= (1 << gpio_pin);
2883 + else /* GPIO_OUTPUT_PIN */
2885 + pin_status &= (~(1 << gpio_pin));
2887 + REG32_WRITE(TNETD73XX_GPIOPDIRR, pin_status);
2889 + else /* FUNCTIONAL PIN */
2891 + pin_status &= (~(1 << gpio_pin));
2892 + REG32_WRITE(TNETD73XX_GPIOENR, pin_status);
2897 +/****************************************************************************
2898 + * FUNCTION: tnetd73xx_gpio_out
2899 + ***************************************************************************/
2900 +void tnetd73xx_gpio_out(TNETD73XX_GPIO_PIN_T gpio_pin, int value)
2904 + REG32_READ(TNETD73XX_GPIODOUTR, pin_value);
2907 + pin_value |= (1 << gpio_pin);
2911 + pin_value &= (~(1 << gpio_pin));
2913 + REG32_WRITE(TNETD73XX_GPIODOUTR, pin_value);
2916 +/****************************************************************************
2917 + * FUNCTION: tnetd73xx_gpio_in
2918 + ***************************************************************************/
2919 +int tnetd73xx_gpio_in(TNETD73XX_GPIO_PIN_T gpio_pin)
2922 + REG32_READ(TNETD73XX_GPIODINR, pin_value);
2923 + return ( (pin_value & (1 << gpio_pin)) ? 1 : 0 );
2926 diff -urN linux.old/arch/mips/config-shared.in linux.dev/arch/mips/config-shared.in
2927 --- linux.old/arch/mips/config-shared.in 2005-10-21 16:43:18.917114000 +0200
2928 +++ linux.dev/arch/mips/config-shared.in 2005-11-10 01:12:43.950955750 +0100
2930 mainmenu_option next_comment
2931 comment 'Machine selection'
2932 dep_bool 'Support for Acer PICA 1 chipset (EXPERIMENTAL)' CONFIG_ACER_PICA_61 $CONFIG_EXPERIMENTAL
2933 +dep_bool 'Support for Texas Instruments AR7 (EXPERIMENTAL)' CONFIG_AR7 $CONFIG_MIPS32 $CONFIG_EXPERIMENTAL
2934 +if [ "$CONFIG_AR7" = "y" ]; then
2935 + choice 'Texas Instruments Reference Platform' \
2936 + "AR7DB CONFIG_AR7DB \
2937 + AR7RD CONFIG_AR7RD \
2938 + AR7WRD CONFIG_AR7WRD" AR7DB
2939 + int 'Texas Instruments AR7 CPU Frequency' CONFIG_AR7_CPU 150
2940 + int 'Texas Instruments AR7 System Frequency' CONFIG_AR7_SYS 125
2941 + hex 'Texas Instruments AR7 SDRAM Start' CONFIG_AR7_MEMORY 0x14000000
2943 dep_bool 'Support for Alchemy Bosporus board' CONFIG_MIPS_BOSPORUS $CONFIG_MIPS32
2944 dep_bool 'Support for FIC Multimedia Player board' CONFIG_MIPS_FICMMP $CONFIG_MIPS32
2945 dep_bool 'Support for Alchemy Mirage board' CONFIG_MIPS_MIRAGE $CONFIG_MIPS32
2946 @@ -239,6 +249,11 @@
2947 define_bool CONFIG_NONCOHERENT_IO y
2948 define_bool CONFIG_PC_KEYB y
2950 +if [ "$CONFIG_AR7" = "y" ]; then
2951 + define_bool CONFIG_IRQ_CPU y
2952 + define_bool CONFIG_NONCOHERENT_IO y
2953 + define_bool CONFIG_SWAP_IO_SPACE y
2955 if [ "$CONFIG_CASIO_E55" = "y" ]; then
2956 define_bool CONFIG_IRQ_CPU y
2957 define_bool CONFIG_NONCOHERENT_IO y
2959 mainmenu_option next_comment
2960 comment 'General setup'
2961 if [ "$CONFIG_ACER_PICA_61" = "y" -o \
2962 + "$CONFIG_AR7" = "y" -o \
2963 "$CONFIG_CASIO_E55" = "y" -o \
2964 "$CONFIG_DDB5074" = "y" -o \
2965 "$CONFIG_DDB5476" = "y" -o \
2967 bool 'Networking support' CONFIG_NET
2969 if [ "$CONFIG_ACER_PICA_61" = "y" -o \
2970 + "$CONFIG_AR7" = "y" -o \
2971 "$CONFIG_CASIO_E55" = "y" -o \
2972 "$CONFIG_DECSTATION" = "y" -o \
2973 "$CONFIG_IBM_WORKPAD" = "y" -o \
2974 diff -urN linux.old/arch/mips/kernel/head.S linux.dev/arch/mips/kernel/head.S
2975 --- linux.old/arch/mips/kernel/head.S 2005-10-21 16:43:16.396956500 +0200
2976 +++ linux.dev/arch/mips/kernel/head.S 2005-11-10 01:10:45.807572250 +0100
2980 NESTED(except_vec4, 0, sp)
2983 -1: j 1b /* Dummy, will be replaced */
2994 diff -urN linux.old/arch/mips/kernel/mips_ksyms.c linux.dev/arch/mips/kernel/mips_ksyms.c
2995 --- linux.old/arch/mips/kernel/mips_ksyms.c 2004-02-18 14:36:30.000000000 +0100
2996 +++ linux.dev/arch/mips/kernel/mips_ksyms.c 2005-11-10 01:10:45.811572500 +0100
2998 extern long __strnlen_user_nocheck_asm(const char *s);
2999 extern long __strnlen_user_asm(const char *s);
3002 +#include <asm/ar7/adam2_env.h>
3003 +int avalanche_request_pacing(int irq_nr, unsigned int blk_num, unsigned int pace_value);
3007 EXPORT_SYMBOL(mips_machtype);
3009 EXPORT_SYMBOL(EISA_bus);
3010 @@ -103,3 +109,10 @@
3013 EXPORT_SYMBOL(get_wchan);
3016 +EXPORT_SYMBOL_NOVERS(avalanche_request_pacing);
3017 +EXPORT_SYMBOL_NOVERS(prom_getenv);
3018 +EXPORT_SYMBOL_NOVERS(prom_iterenv);
3021 diff -urN linux.old/arch/mips/kernel/setup.c linux.dev/arch/mips/kernel/setup.c
3022 --- linux.old/arch/mips/kernel/setup.c 2005-10-21 16:43:16.396956500 +0200
3023 +++ linux.dev/arch/mips/kernel/setup.c 2005-11-10 01:14:16.376732000 +0100
3026 #include <asm/ptrace.h>
3027 #include <asm/system.h>
3028 +#include <asm/addrspace.h>
3030 struct cpuinfo_mips cpu_data[NR_CPUS];
3031 EXPORT_SYMBOL(cpu_data);
3033 struct boot_mem_map boot_mem_map;
3035 unsigned char aux_device_present;
3036 -extern char _ftext, _etext, _fdata, _edata, _end;
3037 +extern char _ftext, _etext, _fdata, _edata, _fbss, _end;
3039 static char command_line[CL_SIZE];
3040 char saved_command_line[CL_SIZE];
3043 static struct resource code_resource = { "Kernel code" };
3044 static struct resource data_resource = { "Kernel data" };
3045 +static struct resource bss_resource = { "Kernel bss" };
3047 asmlinkage void __init
3048 init_arch(int argc, char **argv, char **envp, int *prom_vec)
3050 for (i = 0; i < boot_mem_map.nr_map; i++) {
3051 unsigned long start, end;
3053 - if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
3054 + if (boot_mem_map.map[i].type == BOOT_MEM_RESERVED)
3057 start = PFN_UP(boot_mem_map.map[i].addr);
3061 /* Initialize the boot-time allocator with low memory only. */
3062 - bootmap_size = init_bootmem(first_usable_pfn, max_low_pfn);
3063 + bootmap_size = init_bootmem_node(NODE_DATA(0), first_usable_pfn,
3064 + PFN_UP(PHYS_OFFSET), max_low_pfn);
3067 * Register fully available low RAM pages with the bootmem allocator.
3068 @@ -371,11 +374,12 @@
3071 /* Register lowmem ranges */
3072 - free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size));
3073 + free_bootmem_node(NODE_DATA(0), PFN_PHYS(curr_pfn),
3074 + size<<PAGE_SHIFT);
3077 /* Reserve the bootmap memory. */
3078 - reserve_bootmem(PFN_PHYS(first_usable_pfn), bootmap_size);
3079 + reserve_bootmem_node(NODE_DATA(0), PFN_PHYS(first_usable_pfn), bootmap_size);
3081 #ifdef CONFIG_BLK_DEV_INITRD
3082 /* Board specific code should have set up initrd_start and initrd_end */
3084 code_resource.end = virt_to_bus(&_etext) - 1;
3085 data_resource.start = virt_to_bus(&_fdata);
3086 data_resource.end = virt_to_bus(&_edata) - 1;
3087 + bss_resource.start = virt_to_bus(&_fbss);
3088 + bss_resource.end = virt_to_bus(&_end) - 1;
3091 * Request address space for all standard RAM.
3094 request_resource(res, &code_resource);
3095 request_resource(res, &data_resource);
3096 + request_resource(res, &bss_resource);
3101 void hp_setup(void);
3102 void au1x00_setup(void);
3103 void frame_info_init(void);
3104 + void ar7_setup(void);
3107 #if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE)
3108 @@ -691,6 +699,11 @@
3109 pmc_yosemite_setup();
3113 + case MACH_GROUP_UNKNOWN:
3118 panic("Unsupported architecture");
3120 diff -urN linux.old/arch/mips/kernel/time.c linux.dev/arch/mips/kernel/time.c
3121 --- linux.old/arch/mips/kernel/time.c 2005-01-19 15:09:29.000000000 +0100
3122 +++ linux.dev/arch/mips/kernel/time.c 2005-11-10 01:12:43.950955750 +0100
3124 expirelo = (count / cycles_per_jiffy + 1) * cycles_per_jiffy;
3125 write_c0_count(expirelo - cycles_per_jiffy);
3126 write_c0_compare(expirelo);
3127 - write_c0_count(count);
3130 int (*mips_timer_state)(void);
3131 diff -urN linux.old/arch/mips/kernel/traps.c linux.dev/arch/mips/kernel/traps.c
3132 --- linux.old/arch/mips/kernel/traps.c 2005-10-21 16:43:16.400956750 +0200
3133 +++ linux.dev/arch/mips/kernel/traps.c 2005-11-10 01:13:28.301727500 +0100
3134 @@ -869,9 +869,24 @@
3136 exception_handlers[n] = handler;
3137 if (n == 0 && cpu_has_divec) {
3138 + printk(KERN_DEBUG "%s: using long jump via k0 to reach %08x\n",
3139 + __FUNCTION__, handler);
3140 + /* where does the 8 byte limit mentioned in head.S come from??? */
3141 + if (handler > 0x0fffffff) { /* maximum for single J instruction */
3142 + /* lui k0, 0x0000 */
3143 + *(volatile u32 *)(KSEG0+0x200) = 0x3c1a0000 | (handler >> 16);
3144 + /* ori k0, 0x0000 */
3145 + *(volatile u32 *)(KSEG0+0x204) = 0x375a0000 | (handler & 0xffff);
3147 + *(volatile u32 *)(KSEG0+0x208) = 0x03400008;
3149 + *(volatile u32 *)(KSEG0+0x20C) = 0x00000000;
3150 + flush_icache_range(KSEG0+0x200, KSEG0+0x210);
3152 *(volatile u32 *)(KSEG0+0x200) = 0x08000000 |
3153 (0x03ffffff & (handler >> 2));
3154 - flush_icache_range(KSEG0+0x200, KSEG0 + 0x204);
3155 + flush_icache_range(KSEG0+0x200, KSEG0+0x204);
3158 return (void *)old_handler;
3160 diff -urN linux.old/arch/mips/mm/init.c linux.dev/arch/mips/mm/init.c
3161 --- linux.old/arch/mips/mm/init.c 2004-02-18 14:36:30.000000000 +0100
3162 +++ linux.dev/arch/mips/mm/init.c 2005-11-10 01:14:16.376732000 +0100
3163 @@ -235,10 +235,13 @@
3167 +#define START_PFN (NODE_DATA(0)->bdata->node_boot_start >> PAGE_SHIFT)
3168 +#define MAX_LOW_PFN (NODE_DATA(0)->bdata->node_low_pfn)
3170 void __init paging_init(void)
3172 unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
3173 - unsigned long max_dma, high, low;
3174 + unsigned long max_dma, high, low, start;
3181 max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
3182 - low = max_low_pfn;
3183 + start = START_PFN;
3184 + low = MAX_LOW_PFN - start;
3189 zones_size[ZONE_HIGHMEM] = high - low;
3192 - free_area_init(zones_size);
3193 + free_area_init_node(0, NODE_DATA(0), 0, zones_size,
3194 + start << PAGE_SHIFT, 0);
3197 #define PFN_UP(x) (((x) + PAGE_SIZE - 1) >> PAGE_SHIFT)
3199 for (i = 0; i < boot_mem_map.nr_map; i++) {
3200 unsigned long addr, end;
3202 - if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
3203 + if (boot_mem_map.map[i].type == BOOT_MEM_RESERVED)
3204 /* not usable memory */
3207 @@ -313,16 +318,17 @@
3208 max_mapnr = num_physpages = highend_pfn;
3209 num_mappedpages = max_low_pfn;
3211 - max_mapnr = num_mappedpages = num_physpages = max_low_pfn;
3212 + max_mapnr = num_mappedpages = num_physpages = MAX_LOW_PFN - START_PFN;
3214 - high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
3216 - totalram_pages += free_all_bootmem();
3218 + high_memory = (void *) __va(MAX_LOW_PFN * PAGE_SIZE);
3220 + totalram_pages += free_all_bootmem_node(NODE_DATA(0));
3221 totalram_pages -= setup_zero_pages(); /* Setup zeroed pages. */
3223 reservedpages = ram = 0;
3224 - for (tmp = 0; tmp < max_low_pfn; tmp++)
3225 - if (page_is_ram(tmp)) {
3226 + for (tmp = 0; tmp < max_mapnr; tmp++)
3227 + if (page_is_ram(START_PFN + tmp)) {
3229 if (PageReserved(mem_map+tmp))
3231 @@ -377,13 +383,13 @@
3234 extern char __init_begin, __init_end;
3235 -extern void prom_free_prom_memory(void) __init;
3236 +extern unsigned long prom_free_prom_memory(void) __init;
3238 void free_initmem(void)
3242 - prom_free_prom_memory ();
3243 + totalram_pages += prom_free_prom_memory ();
3245 addr = (unsigned long) &__init_begin;
3246 while (addr < (unsigned long) &__init_end) {
3247 diff -urN linux.old/drivers/char/Config.in linux.dev/drivers/char/Config.in
3248 --- linux.old/drivers/char/Config.in 2005-10-21 16:43:16.440959250 +0200
3249 +++ linux.dev/drivers/char/Config.in 2005-11-10 01:10:45.843574500 +0100
3250 @@ -188,6 +188,14 @@
3251 tristate 'Total Impact briQ front panel driver' CONFIG_BRIQ_PANEL
3254 +if [ "$CONFIG_AR7" = "y" ]; then
3255 + bool 'VLYNQ support for the TI SOC' CONFIG_AR7_VLYNQ
3256 + dep_bool 'VLYNQ clock source Internal' CONFIG_VLYNQ_CLK_LOCAL $CONFIG_AR7_VLYNQ
3258 + define_int CONFIG_AR7_VLYNQ_PORTS 2
3259 + tristate 'ADAM2 environment support (read-only)' CONFIG_AR7_ADAM2
3262 source drivers/i2c/Config.in
3264 mainmenu_option next_comment
3265 diff -urN linux.old/drivers/char/Config.in.orig linux.dev/drivers/char/Config.in.orig
3266 --- linux.old/drivers/char/Config.in.orig 1970-01-01 01:00:00.000000000 +0100
3267 +++ linux.dev/drivers/char/Config.in.orig 2005-11-10 01:10:45.863575750 +0100
3270 +# Character device configuration
3272 +mainmenu_option next_comment
3273 +comment 'Character devices'
3275 +bool 'Virtual terminal' CONFIG_VT
3276 +if [ "$CONFIG_VT" = "y" ]; then
3277 + bool ' Support for console on virtual terminal' CONFIG_VT_CONSOLE
3278 + if [ "$CONFIG_GSC_LASI" = "y" ]; then
3279 + bool ' Support for Lasi/Dino PS2 port' CONFIG_GSC_PS2
3282 +tristate 'Standard/generic (8250/16550 and compatible UARTs) serial support' CONFIG_SERIAL
3283 +if [ "$CONFIG_SERIAL" = "y" ]; then
3284 + bool ' Support for console on serial port' CONFIG_SERIAL_CONSOLE
3285 + if [ "$CONFIG_GSC_LASI" = "y" ]; then
3286 + bool ' serial port on GSC support' CONFIG_SERIAL_GSC
3288 + if [ "$CONFIG_IA64" = "y" ]; then
3289 + bool ' Support for serial port described by EFI HCDP table' CONFIG_SERIAL_HCDP
3291 + if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
3292 + tristate ' Atomwide serial port support' CONFIG_ATOMWIDE_SERIAL
3293 + tristate ' Dual serial port support' CONFIG_DUALSP_SERIAL
3296 +dep_mbool 'Extended dumb serial driver options' CONFIG_SERIAL_EXTENDED $CONFIG_SERIAL
3297 +if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
3298 + bool ' Support more than 4 serial ports' CONFIG_SERIAL_MANY_PORTS
3299 + bool ' Support for sharing serial interrupts' CONFIG_SERIAL_SHARE_IRQ
3300 + bool ' Autodetect IRQ on standard ports (unsafe)' CONFIG_SERIAL_DETECT_IRQ
3301 + bool ' Support special multiport boards' CONFIG_SERIAL_MULTIPORT
3302 + bool ' Support the Bell Technologies HUB6 card' CONFIG_HUB6
3304 +bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD
3305 +if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
3306 + tristate ' Computone IntelliPort Plus serial support' CONFIG_COMPUTONE
3307 + tristate ' Comtrol Rocketport support' CONFIG_ROCKETPORT
3308 + tristate ' Cyclades async mux support' CONFIG_CYCLADES
3309 + if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_CYCLADES" != "n" ]; then
3310 + bool ' Cyclades-Z interrupt mode operation (EXPERIMENTAL)' CONFIG_CYZ_INTR
3312 + if [ "$CONFIG_X86_64" != "y" ]; then
3313 + tristate ' Digiboard Intelligent Async Support' CONFIG_DIGIEPCA
3314 + if [ "$CONFIG_DIGIEPCA" = "n" ]; then
3315 + tristate ' Digiboard PC/Xx Support' CONFIG_DIGI
3318 + dep_tristate ' Hayes ESP serial port support' CONFIG_ESPSERIAL $CONFIG_ISA
3319 + tristate ' Moxa Intellio support' CONFIG_MOXA_INTELLIO
3320 + tristate ' Moxa SmartIO support' CONFIG_MOXA_SMARTIO
3321 + if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
3322 + dep_tristate ' Multi-Tech multiport card support (EXPERIMENTAL)' CONFIG_ISI m
3324 + tristate ' Microgate SyncLink card support' CONFIG_SYNCLINK
3325 + tristate ' SyncLink Multiport support' CONFIG_SYNCLINKMP
3326 + tristate ' HDLC line discipline support' CONFIG_N_HDLC
3327 + tristate ' SDL RISCom/8 card support' CONFIG_RISCOM8
3328 + if [ "$CONFIG_X86_64" != "y" ]; then
3329 + tristate ' Specialix IO8+ card support' CONFIG_SPECIALIX
3330 + if [ "$CONFIG_SPECIALIX" != "n" ]; then
3331 + bool ' Specialix DTR/RTS pin is RTS' CONFIG_SPECIALIX_RTSCTS
3333 + tristate ' Specialix SX (and SI) card support' CONFIG_SX
3334 + tristate ' Specialix RIO system support' CONFIG_RIO
3335 + if [ "$CONFIG_RIO" != "n" ]; then
3336 + bool ' Support really old RIO/PCI cards' CONFIG_RIO_OLDPCI
3339 + bool ' Stallion multiport serial support' CONFIG_STALDRV
3340 + if [ "$CONFIG_STALDRV" = "y" ]; then
3341 + tristate ' Stallion EasyIO or EC8/32 support' CONFIG_STALLION
3342 + tristate ' Stallion EC8/64, ONboard, Brumby support' CONFIG_ISTALLION
3344 + if [ "$CONFIG_PARISC" = "y" ]; then
3345 + if [ "$CONFIG_PDC_CONSOLE" != "y" ]; then
3346 + bool ' Serial MUX support' CONFIG_SERIAL_MUX CONFIG_SERIAL_NONSTANDARD
3348 + if [ "$CONFIG_SERIAL_MUX" != "y" ]; then
3349 + bool ' PDC software console support' CONFIG_PDC_CONSOLE CONFIG_SERIAL_NONSTANDARD
3352 + if [ "$CONFIG_MIPS" = "y" ]; then
3353 + bool ' TX3912/PR31700 serial port support' CONFIG_SERIAL_TX3912
3354 + dep_bool ' Console on TX3912/PR31700 serial port' CONFIG_SERIAL_TX3912_CONSOLE $CONFIG_SERIAL_TX3912
3355 + bool ' TMPTX39XX/49XX serial port support' CONFIG_SERIAL_TXX9
3356 + dep_bool ' Console on TMPTX39XX/49XX serial port' CONFIG_SERIAL_TXX9_CONSOLE $CONFIG_SERIAL_TXX9
3357 + if [ "$CONFIG_SOC_AU1X00" = "y" ]; then
3358 + bool ' Enable Au1x00 UART Support' CONFIG_AU1X00_UART
3359 + if [ "$CONFIG_AU1X00_UART" = "y" ]; then
3360 + bool ' Enable Au1x00 serial console' CONFIG_AU1X00_SERIAL_CONSOLE
3362 + dep_tristate ' Au1x00 USB TTY Device support' CONFIG_AU1X00_USB_TTY $CONFIG_SOC_AU1X00
3363 + if [ "$CONFIG_AU1000_USB_TTY" != "y" ]; then
3364 + dep_tristate ' Au1x00 USB Raw Device support' CONFIG_AU1X00_USB_RAW $CONFIG_SOC_AU1X00
3366 + if [ "$CONFIG_AU1X00_USB_TTY" != "n" -o \
3367 + "$CONFIG_AU1X00_USB_RAW" != "n" ]; then
3368 + define_bool CONFIG_AU1X00_USB_DEVICE y
3371 + bool ' TXx927 SIO support' CONFIG_TXX927_SERIAL
3372 + if [ "$CONFIG_TXX927_SERIAL" = "y" ]; then
3373 + bool ' TXx927 SIO Console support' CONFIG_TXX927_SERIAL_CONSOLE
3375 + if [ "$CONFIG_SIBYTE_SB1xxx_SOC" = "y" ]; then
3376 + bool ' Support for BCM1xxx onchip DUART' CONFIG_SIBYTE_SB1250_DUART
3377 + if [ "$CONFIG_SIBYTE_SB1250_DUART" = "y" ]; then
3378 + bool ' Console on BCM1xxx DUART' CONFIG_SIBYTE_SB1250_DUART_CONSOLE
3379 + if [ "$CONFIG_SIBYTE_SB1250_DUART_CONSOLE" = "y" ]; then
3380 + define_bool CONFIG_SERIAL_CONSOLE y
3385 + if [ "$CONFIG_DECSTATION" = "y" ]; then
3386 + bool ' DECstation serial support' CONFIG_SERIAL_DEC
3387 + dep_bool ' Support for console on a DECstation serial port' CONFIG_SERIAL_DEC_CONSOLE $CONFIG_SERIAL_DEC
3388 + dep_bool ' DZ11 serial support' CONFIG_DZ $CONFIG_SERIAL_DEC $CONFIG_MIPS32
3389 + dep_bool ' Z85C30 serial support' CONFIG_ZS $CONFIG_SERIAL_DEC $CONFIG_TC
3391 + if [ "$CONFIG_SGI_IP22" = "y" ]; then
3392 + bool ' SGI Zilog85C30 serial support' CONFIG_IP22_SERIAL
3394 + if [ "$CONFIG_IA64" = "y" ]; then
3395 + bool ' SGI SN2 l1 serial port support' CONFIG_SGI_L1_SERIAL
3396 + if [ "$CONFIG_SGI_L1_SERIAL" = "y" ]; then
3397 + bool ' SGI SN2 l1 Console support' CONFIG_SGI_L1_SERIAL_CONSOLE
3399 + if [ "$CONFIG_IA64_GENERIC" = "y" -o "$CONFIG_IA64_SGI_SN2" = "y" ]; then
3400 + bool ' SGI SN2 IOC4 serial port support' CONFIG_SGI_IOC4_SERIAL
3404 +if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_ZORRO" = "y" ]; then
3405 + tristate 'Commodore A2232 serial support (EXPERIMENTAL)' CONFIG_A2232
3407 +if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then
3408 + bool 'DC21285 serial port support' CONFIG_SERIAL_21285
3409 + if [ "$CONFIG_SERIAL_21285" = "y" ]; then
3410 + if [ "$CONFIG_OBSOLETE" = "y" ]; then
3411 + bool ' Use /dev/ttyS0 device (OBSOLETE)' CONFIG_SERIAL_21285_OLD
3413 + bool ' Console on DC21285 serial port' CONFIG_SERIAL_21285_CONSOLE
3415 + if [ "$CONFIG_PARISC" = "y" ]; then
3416 + bool ' PDC software console support' CONFIG_PDC_CONSOLE
3419 +if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
3420 + bool 'Enable Qtronix 990P Keyboard Support' CONFIG_QTRONIX_KEYBOARD
3421 + if [ "$CONFIG_QTRONIX_KEYBOARD" = "y" ]; then
3422 + define_bool CONFIG_IT8172_CIR y
3424 + bool ' Enable PS2 Keyboard Support' CONFIG_PC_KEYB
3426 + bool 'Enable Smart Card Reader 0 Support ' CONFIG_IT8172_SCR0
3427 + bool 'Enable Smart Card Reader 1 Support ' CONFIG_IT8172_SCR1
3429 +if [ "$CONFIG_MIPS_IVR" = "y" ]; then
3430 + bool 'Enable Qtronix 990P Keyboard Support' CONFIG_QTRONIX_KEYBOARD
3431 + if [ "$CONFIG_QTRONIX_KEYBOARD" = "y" ]; then
3432 + define_bool CONFIG_IT8172_CIR y
3434 + bool 'Enable Smart Card Reader 0 Support ' CONFIG_IT8172_SCR0
3436 +if [ "$CONFIG_CPU_VR41XX" = "y" ]; then
3437 + bool 'NEC VR4100 series Keyboard Interface Unit Support ' CONFIG_VR41XX_KIU
3439 +bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
3440 +if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
3441 + int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
3443 +if [ "$CONFIG_PARPORT" != "n" ]; then
3444 + dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
3445 + if [ "$CONFIG_PRINTER" != "n" ]; then
3446 + bool ' Support for console on line printer' CONFIG_LP_CONSOLE
3448 + dep_tristate 'Support for user-space parallel port device drivers' CONFIG_PPDEV $CONFIG_PARPORT
3449 + dep_tristate 'Texas Instruments parallel link cable support' CONFIG_TIPAR $CONFIG_PARPORT
3452 +if [ "$CONFIG_PPC64" = "y" ] ; then
3453 + bool 'pSeries Hypervisor Virtual Console support' CONFIG_HVC_CONSOLE
3455 +if [ "$CONFIG_ALL_PPC" = "y" ]; then
3456 + tristate 'Total Impact briQ front panel driver' CONFIG_BRIQ_PANEL
3459 +if [ "$CONFIG_AR7" = "y" ]; then
3460 + bool 'VLYNQ support for the TI SOC' CONFIG_AR7_VLYNQ
3461 + dep_bool 'VLYNQ clock source Internal' CONFIG_VLYNQ_CLK_LOCAL $CONFIG_AR7_VLYNQ
3463 + define_int CONFIG_AR7_VLYNQ_PORTS 2
3466 +source drivers/i2c/Config.in
3468 +mainmenu_option next_comment
3470 +tristate 'Bus Mouse Support' CONFIG_BUSMOUSE
3471 +if [ "$CONFIG_BUSMOUSE" != "n" ]; then
3472 + dep_tristate ' ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE $CONFIG_BUSMOUSE
3473 + dep_tristate ' Logitech busmouse support' CONFIG_LOGIBUSMOUSE $CONFIG_BUSMOUSE
3474 + dep_tristate ' Microsoft busmouse support' CONFIG_MS_BUSMOUSE $CONFIG_BUSMOUSE
3475 + if [ "$CONFIG_ADB" = "y" -a "$CONFIG_ADB_KEYBOARD" = "y" ]; then
3476 + dep_tristate ' Apple Desktop Bus mouse support (old driver)' CONFIG_ADBMOUSE $CONFIG_BUSMOUSE
3478 +# if [ "$CONFIG_DECSTATION" = "y" ]; then
3479 +# dep_bool ' MAXINE Access.Bus mouse (VSXXX-BB/GB) support' CONFIG_DTOP_MOUSE $CONFIG_ACCESSBUS
3483 +tristate 'Mouse Support (not serial and bus mice)' CONFIG_MOUSE
3484 +if [ "$CONFIG_MOUSE" != "n" ]; then
3485 + bool ' PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE
3486 + tristate ' C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE
3487 + tristate ' PC110 digitizer pad support' CONFIG_PC110_PAD
3488 + tristate ' MK712 touch screen support' CONFIG_MK712_MOUSE
3492 +source drivers/char/joystick/Config.in
3494 +tristate 'QIC-02 tape support' CONFIG_QIC02_TAPE
3495 +if [ "$CONFIG_QIC02_TAPE" != "n" ]; then
3496 + bool ' Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF
3497 + if [ "$CONFIG_QIC02_DYNCONF" != "y" ]; then
3498 + comment ' Edit configuration parameters in ./include/linux/tpqic02.h!'
3500 + comment ' Setting runtime QIC-02 configuration is done with qic02conf'
3501 + comment ' from the tpqic02-support package. It is available at'
3502 + comment ' metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/'
3506 +tristate 'IPMI top-level message handler' CONFIG_IPMI_HANDLER
3507 +dep_mbool ' Generate a panic event to all BMCs on a panic' CONFIG_IPMI_PANIC_EVENT $CONFIG_IPMI_HANDLER
3508 +dep_tristate ' Device interface for IPMI' CONFIG_IPMI_DEVICE_INTERFACE $CONFIG_IPMI_HANDLER
3509 +dep_tristate ' IPMI KCS handler' CONFIG_IPMI_KCS $CONFIG_IPMI_HANDLER
3510 +dep_tristate ' IPMI Watchdog Timer' CONFIG_IPMI_WATCHDOG $CONFIG_IPMI_HANDLER
3512 +mainmenu_option next_comment
3513 +comment 'Watchdog Cards'
3514 +bool 'Watchdog Timer Support' CONFIG_WATCHDOG
3515 +if [ "$CONFIG_WATCHDOG" != "n" ]; then
3516 + bool ' Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT
3517 + tristate ' Acquire SBC Watchdog Timer' CONFIG_ACQUIRE_WDT
3518 + tristate ' Advantech SBC Watchdog Timer' CONFIG_ADVANTECH_WDT
3519 + tristate ' ALi M7101 PMU on ALi 1535D+ Watchdog Timer' CONFIG_ALIM1535_WDT
3520 + tristate ' ALi M7101 PMU Watchdog Timer' CONFIG_ALIM7101_WDT
3521 + tristate ' AMD "Elan" SC520 Watchdog Timer' CONFIG_SC520_WDT
3522 + tristate ' Berkshire Products PC Watchdog' CONFIG_PCWATCHDOG
3523 + if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then
3524 + tristate ' DC21285 watchdog' CONFIG_21285_WATCHDOG
3525 + if [ "$CONFIG_ARCH_NETWINDER" = "y" ]; then
3526 + tristate ' NetWinder WB83C977 watchdog' CONFIG_977_WATCHDOG
3529 + tristate ' Eurotech CPU-1220/1410 Watchdog Timer' CONFIG_EUROTECH_WDT
3530 + tristate ' IB700 SBC Watchdog Timer' CONFIG_IB700_WDT
3531 + tristate ' ICP ELectronics Wafer 5823 Watchdog' CONFIG_WAFER_WDT
3532 + tristate ' Intel i810 TCO timer / Watchdog' CONFIG_I810_TCO
3533 + tristate ' Mixcom Watchdog' CONFIG_MIXCOMWD
3534 + tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT
3535 + dep_tristate ' SC1200 Watchdog Timer (EXPERIMENTAL)' CONFIG_SC1200_WDT $CONFIG_EXPERIMENTAL
3536 + tristate ' NatSemi SCx200 Watchdog' CONFIG_SCx200_WDT
3537 + tristate ' Software Watchdog' CONFIG_SOFT_WATCHDOG
3538 + tristate ' W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT
3539 + tristate ' WDT Watchdog timer' CONFIG_WDT
3540 + tristate ' WDT PCI Watchdog timer' CONFIG_WDTPCI
3541 + if [ "$CONFIG_WDT" != "n" ]; then
3542 + bool ' WDT501 features' CONFIG_WDT_501
3543 + if [ "$CONFIG_WDT_501" = "y" ]; then
3544 + bool ' Fan Tachometer' CONFIG_WDT_501_FAN
3547 + tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT
3548 + if [ "$CONFIG_SGI_IP22" = "y" ]; then
3549 + dep_tristate ' Indy/I2 Hardware Watchdog' CONFIG_INDYDOG $CONFIG_SGI_IP22
3551 + if [ "$CONFIG_8xx" = "y" ]; then
3552 + tristate ' MPC8xx Watchdog Timer' CONFIG_8xx_WDT
3557 +if [ "$CONFIG_ARCH_NETWINDER" = "y" ]; then
3558 + tristate 'NetWinder thermometer support' CONFIG_DS1620
3559 + tristate 'NetWinder Button' CONFIG_NWBUTTON
3560 + if [ "$CONFIG_NWBUTTON" != "n" ]; then
3561 + bool ' Reboot Using Button' CONFIG_NWBUTTON_REBOOT
3563 + tristate 'NetWinder flash support' CONFIG_NWFLASH
3565 +tristate 'NatSemi SCx200 Support' CONFIG_SCx200
3566 +dep_tristate ' NatSemi SCx200 GPIO Support' CONFIG_SCx200_GPIO $CONFIG_SCx200
3568 +if [ "$CONFIG_IA64_GENERIC" = "y" -o "$CONFIG_IA64_SGI_SN2" = "y" ] ; then
3569 + bool 'SGI SN2 fetchop support' CONFIG_FETCHOP
3572 +if [ "$CONFIG_X86" = "y" -o "$CONFIG_X86_64" = "y" ]; then
3573 + dep_tristate 'AMD 768/8111 Random Number Generator support' CONFIG_AMD_RNG $CONFIG_PCI
3575 +if [ "$CONFIG_X86" = "y" -o "$CONFIG_IA64" = "y" ]; then
3576 + dep_tristate 'Intel i8x0 Random Number Generator support' CONFIG_INTEL_RNG $CONFIG_PCI
3578 +if [ "$CONFIG_X86" = "y" -o "$CONFIG_IA64" = "y" -o \
3579 + "$CONFIG_X86_64" = "y" ]; then
3580 + dep_tristate 'Intel/AMD/VIA HW Random Number Generator support' CONFIG_HW_RANDOM $CONFIG_PCI
3582 +dep_tristate 'AMD 76x native power management (Experimental)' CONFIG_AMD_PM768 $CONFIG_PCI
3583 +tristate '/dev/nvram support' CONFIG_NVRAM
3584 +tristate 'Enhanced Real Time Clock Support' CONFIG_RTC
3585 +if [ "$CONFIG_IA64" = "y" ]; then
3586 + bool 'EFI Real Time Clock Services' CONFIG_EFI_RTC
3588 +if [ "$CONFIG_OBSOLETE" = "y" -a "$CONFIG_ALPHA_BOOK1" = "y" ]; then
3589 + bool 'Tadpole ANA H8 Support (OBSOLETE)' CONFIG_H8
3591 +if [ "$CONFIG_SGI_IP22" = "y" ]; then
3592 + tristate 'Dallas DS1286 RTC support' CONFIG_DS1286
3594 +if [ "$CONFIG_SGI_IP27" = "y" ]; then
3595 + tristate 'SGI M48T35 RTC support' CONFIG_SGI_IP27_RTC
3597 +if [ "$CONFIG_TOSHIBA_RBTX4927" = "y" -o "$CONFIG_TOSHIBA_JMR3927" = "y" ]; then
3598 + tristate 'Dallas DS1742 RTC support' CONFIG_DS1742
3601 +tristate 'Double Talk PC internal speech card support' CONFIG_DTLK
3602 +tristate 'Siemens R3964 line discipline' CONFIG_R3964
3603 +tristate 'Applicom intelligent fieldbus card support' CONFIG_APPLICOM
3604 +if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_X86" = "y" -a "$CONFIG_X86_64" != "y" ]; then
3605 + dep_tristate 'Sony Vaio Programmable I/O Control Device support (EXPERIMENTAL)' CONFIG_SONYPI $CONFIG_PCI
3608 +mainmenu_option next_comment
3609 +comment 'Ftape, the floppy tape device driver'
3610 +tristate 'Ftape (QIC-80/Travan) support' CONFIG_FTAPE
3611 +if [ "$CONFIG_FTAPE" != "n" ]; then
3612 + source drivers/char/ftape/Config.in
3617 +if [ "$CONFIG_GART_IOMMU" = "y" ]; then
3618 + bool '/dev/agpgart (AGP Support)' CONFIG_AGP
3619 + define_bool CONFIG_AGP_AMD_K8 y
3621 + tristate '/dev/agpgart (AGP Support)' CONFIG_AGP
3623 +if [ "$CONFIG_AGP" != "n" ]; then
3624 + bool ' Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support' CONFIG_AGP_INTEL
3625 + bool ' Intel I810/I815/I830M (on-board) support' CONFIG_AGP_I810
3626 + bool ' VIA chipset support' CONFIG_AGP_VIA
3627 + bool ' AMD Irongate, 761, and 762 support' CONFIG_AGP_AMD
3628 + if [ "$CONFIG_GART_IOMMU" != "y" ]; then
3629 + bool ' AMD Opteron/Athlon64 on-CPU GART support' CONFIG_AGP_AMD_K8
3631 + bool ' Generic SiS support' CONFIG_AGP_SIS
3632 + bool ' ALI chipset support' CONFIG_AGP_ALI
3633 + bool ' Serverworks LE/HE support' CONFIG_AGP_SWORKS
3634 + if [ "$CONFIG_X86" = "y" ]; then
3635 + bool ' NVIDIA chipset support' CONFIG_AGP_NVIDIA
3637 + if [ "$CONFIG_IA64" = "y" ]; then
3638 + bool ' Intel 460GX support' CONFIG_AGP_I460
3639 + bool ' HP ZX1 AGP support' CONFIG_AGP_HP_ZX1
3641 + bool ' ATI IGP chipset support' CONFIG_AGP_ATI
3644 +mainmenu_option next_comment
3645 +comment 'Direct Rendering Manager (XFree86 DRI support)'
3646 +bool 'Direct Rendering Manager (XFree86 DRI support)' CONFIG_DRM
3647 +if [ "$CONFIG_DRM" = "y" ]; then
3648 + bool ' Build drivers for old (XFree 4.0) DRM' CONFIG_DRM_OLD
3649 + if [ "$CONFIG_DRM_OLD" = "y" ]; then
3650 + comment 'DRM 4.0 drivers'
3651 + source drivers/char/drm-4.0/Config.in
3653 + comment 'DRM 4.1 drivers'
3654 + define_bool CONFIG_DRM_NEW y
3655 + source drivers/char/drm/Config.in
3659 +if [ "$CONFIG_X86" = "y" ]; then
3660 + tristate 'ACP Modem (Mwave) support' CONFIG_MWAVE
3665 +if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
3666 + source drivers/char/pcmcia/Config.in
3668 +if [ "$CONFIG_SOC_AU1X00" = "y" ]; then
3669 + tristate ' Alchemy Au1x00 GPIO device support' CONFIG_AU1X00_GPIO
3670 + tristate ' Au1000/ADS7846 touchscreen support' CONFIG_TS_AU1X00_ADS7846
3671 + #tristate ' Alchemy Au1550 PSC SPI support' CONFIG_AU1550_PSC_SPI
3673 +if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
3674 + tristate ' ITE GPIO' CONFIG_ITE_GPIO
3677 +if [ "$CONFIG_X86" = "y" ]; then
3678 + tristate 'ACP Modem (Mwave) support' CONFIG_MWAVE
3679 + dep_tristate 'HP OB600 C/CT Pop-up mouse support' CONFIG_OBMOUSE $CONFIG_INPUT_MOUSEDEV
3683 diff -urN linux.old/drivers/char/Makefile linux.dev/drivers/char/Makefile
3684 --- linux.old/drivers/char/Makefile 2005-10-21 16:43:16.460960500 +0200
3685 +++ linux.dev/drivers/char/Makefile 2005-11-10 01:10:45.871576250 +0100
3686 @@ -240,6 +240,13 @@
3687 obj-y += joystick/js.o
3691 +# Texas Intruments VLYNQ driver
3694 +subdir-$(CONFIG_AR7_VLYNQ) += avalanche_vlynq
3695 +obj-$(CONFIG_AR7_VLYNQ) += avalanche_vlynq/avalanche_vlynq.o
3697 obj-$(CONFIG_FETCHOP) += fetchop.o
3698 obj-$(CONFIG_BUSMOUSE) += busmouse.o
3699 obj-$(CONFIG_DTLK) += dtlk.o
3700 @@ -340,6 +347,11 @@
3701 obj-y += ipmi/ipmi.o
3704 +subdir-$(CONFIG_AR7_ADAM2) += ticfg
3705 +ifeq ($(CONFIG_AR7_ADAM2),y)
3706 + obj-y += ticfg/ticfg.o
3709 include $(TOPDIR)/Rules.make
3712 diff -urN linux.old/drivers/char/Makefile.orig linux.dev/drivers/char/Makefile.orig
3713 --- linux.old/drivers/char/Makefile.orig 1970-01-01 01:00:00.000000000 +0100
3714 +++ linux.dev/drivers/char/Makefile.orig 2005-11-10 01:10:45.871576250 +0100
3717 +# Makefile for the kernel character device drivers.
3719 +# Note! Dependencies are done automagically by 'make dep', which also
3720 +# removes any old dependencies. DON'T put your own dependencies here
3721 +# unless it's something special (ie not a .c file).
3723 +# Note 2! The CFLAGS definitions are now inherited from the
3728 +# This file contains the font map for the default (hardware) font
3730 +FONTMAPFILE = cp437.uni
3734 +obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o raw.o pty.o misc.o random.o
3736 +# All of the (potential) objects that export symbols.
3737 +# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
3739 +export-objs := busmouse.o console.o keyboard.o sysrq.o \
3740 + misc.o pty.o random.o selection.o serial.o \
3741 + sonypi.o tty_io.o tty_ioctl.o generic_serial.o \
3742 + au1000_gpio.o vac-serial.o hp_psaux.o nvram.o \
3743 + scx200.o fetchop.o
3745 +mod-subdirs := joystick ftape drm drm-4.0 pcmcia
3749 +KEYMAP =defkeymap.o
3754 +ifeq ($(ARCH),s390)
3761 +ifeq ($(ARCH),mips)
3762 + ifneq ($(CONFIG_PC_KEYB),y)
3765 + ifeq ($(CONFIG_VR41XX_KIU),y)
3766 + ifeq ($(CONFIG_IBM_WORKPAD),y)
3767 + KEYMAP = ibm_workpad_keymap.o
3769 + ifeq ($(CONFIG_VICTOR_MPC30X),y)
3770 + KEYMAP = victor_mpc30x_keymap.o
3772 + KEYBD = vr41xx_keyb.o
3776 +ifeq ($(ARCH),s390x)
3783 +ifeq ($(ARCH),m68k)
3784 + ifdef CONFIG_AMIGA
3794 +ifeq ($(ARCH),parisc)
3795 + ifdef CONFIG_GSC_PS2
3796 + KEYBD = hp_psaux.o hp_keyb.o
3800 + ifdef CONFIG_SERIAL_MUX
3803 + ifdef CONFIG_PDC_CONSOLE
3804 + CONSOLE += pdc_console.o
3809 + KEYBD += q40_keyb.o
3813 +ifdef CONFIG_APOLLO
3814 + KEYBD += dn_keyb.o
3817 +ifeq ($(ARCH),parisc)
3818 + ifdef CONFIG_GSC_PS2
3819 + KEYBD = hp_psaux.o hp_keyb.o
3823 + ifdef CONFIG_PDC_CONSOLE
3824 + CONSOLE += pdc_console.o
3829 + ifneq ($(CONFIG_PC_KEYMAP),y)
3832 + ifneq ($(CONFIG_PC_KEYB),y)
3841 + ifeq ($(CONFIG_SH_HP600),y)
3842 + KEYMAP = defkeymap.o
3843 + KEYBD = scan_keyb.o hp600_keyb.o
3844 + CONSOLE = console.o
3846 + ifeq ($(CONFIG_SH_DMIDA),y)
3847 + # DMIDA does not connect the HD64465 PS/2 keyboard port
3848 + # but we allow for USB keyboards to be plugged in.
3849 + KEYMAP = defkeymap.o
3850 + KEYBD = # hd64465_keyb.o pc_keyb.o
3851 + CONSOLE = console.o
3853 + ifeq ($(CONFIG_SH_EC3104),y)
3854 + KEYMAP = defkeymap.o
3855 + KEYBD = ec3104_keyb.o
3856 + CONSOLE = console.o
3858 + ifeq ($(CONFIG_SH_DREAMCAST),y)
3859 + KEYMAP = defkeymap.o
3861 + CONSOLE = console.o
3865 +ifeq ($(CONFIG_DECSTATION),y)
3870 +ifeq ($(CONFIG_BAGET_MIPS),y)
3872 + SERIAL = vac-serial.o
3875 +ifeq ($(CONFIG_NINO),y)
3879 +ifneq ($(CONFIG_SUN_SERIAL),)
3883 +ifeq ($(CONFIG_QTRONIX_KEYBOARD),y)
3885 + KEYMAP = qtronixmap.o
3888 +ifeq ($(CONFIG_DUMMY_KEYB),y)
3889 + KEYBD = dummy_keyb.o
3892 +obj-$(CONFIG_VT) += vt.o vc_screen.o consolemap.o consolemap_deftbl.o $(CONSOLE) selection.o
3893 +obj-$(CONFIG_SERIAL) += $(SERIAL)
3894 +obj-$(CONFIG_PARPORT_SERIAL) += parport_serial.o
3895 +obj-$(CONFIG_SERIAL_HCDP) += hcdp_serial.o
3896 +obj-$(CONFIG_SERIAL_21285) += serial_21285.o
3897 +obj-$(CONFIG_SERIAL_SA1100) += serial_sa1100.o
3898 +obj-$(CONFIG_SERIAL_AMBA) += serial_amba.o
3899 +obj-$(CONFIG_TS_AU1X00_ADS7846) += au1000_ts.o
3900 +obj-$(CONFIG_SERIAL_DEC) += decserial.o
3902 +ifndef CONFIG_SUN_KEYBOARD
3903 + obj-$(CONFIG_VT) += keyboard.o $(KEYMAP) $(KEYBD)
3905 + obj-$(CONFIG_PCI) += keyboard.o $(KEYMAP)
3908 +obj-$(CONFIG_HIL) += hp_keyb.o
3909 +obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o
3910 +obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o
3911 +obj-$(CONFIG_ROCKETPORT) += rocket.o
3912 +obj-$(CONFIG_MOXA_SMARTIO) += mxser.o
3913 +obj-$(CONFIG_MOXA_INTELLIO) += moxa.o
3914 +obj-$(CONFIG_DIGI) += pcxx.o
3915 +obj-$(CONFIG_DIGIEPCA) += epca.o
3916 +obj-$(CONFIG_CYCLADES) += cyclades.o
3917 +obj-$(CONFIG_STALLION) += stallion.o
3918 +obj-$(CONFIG_ISTALLION) += istallion.o
3919 +obj-$(CONFIG_SIBYTE_SB1250_DUART) += sb1250_duart.o
3920 +obj-$(CONFIG_COMPUTONE) += ip2.o ip2main.o
3921 +obj-$(CONFIG_RISCOM8) += riscom8.o
3922 +obj-$(CONFIG_ISI) += isicom.o
3923 +obj-$(CONFIG_ESPSERIAL) += esp.o
3924 +obj-$(CONFIG_SYNCLINK) += synclink.o
3925 +obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o
3926 +obj-$(CONFIG_N_HDLC) += n_hdlc.o
3927 +obj-$(CONFIG_SPECIALIX) += specialix.o
3928 +obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
3929 +obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o
3930 +obj-$(CONFIG_SX) += sx.o generic_serial.o
3931 +obj-$(CONFIG_RIO) += rio/rio.o generic_serial.o
3932 +obj-$(CONFIG_SH_SCI) += sh-sci.o generic_serial.o
3933 +obj-$(CONFIG_SERIAL167) += serial167.o
3934 +obj-$(CONFIG_MVME147_SCC) += generic_serial.o vme_scc.o
3935 +obj-$(CONFIG_MVME162_SCC) += generic_serial.o vme_scc.o
3936 +obj-$(CONFIG_BVME6000_SCC) += generic_serial.o vme_scc.o
3937 +obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o
3938 +obj-$(CONFIG_SERIAL_TX3912) += generic_serial.o serial_tx3912.o
3939 +obj-$(CONFIG_TXX927_SERIAL) += serial_txx927.o
3940 +obj-$(CONFIG_SERIAL_TXX9) += generic_serial.o serial_txx9.o
3941 +obj-$(CONFIG_IP22_SERIAL) += sgiserial.o
3942 +obj-$(CONFIG_AU1X00_UART) += au1x00-serial.o
3943 +obj-$(CONFIG_SGI_L1_SERIAL) += sn_serial.o
3945 +subdir-$(CONFIG_RIO) += rio
3946 +subdir-$(CONFIG_INPUT) += joystick
3948 +obj-$(CONFIG_ATIXL_BUSMOUSE) += atixlmouse.o
3949 +obj-$(CONFIG_LOGIBUSMOUSE) += logibusmouse.o
3950 +obj-$(CONFIG_PRINTER) += lp.o
3951 +obj-$(CONFIG_TIPAR) += tipar.o
3952 +obj-$(CONFIG_OBMOUSE) += obmouse.o
3954 +ifeq ($(CONFIG_INPUT),y)
3955 +obj-y += joystick/js.o
3959 +# Texas Intruments VLYNQ driver
3962 +subdir-$(CONFIG_AR7_VLYNQ) += avalanche_vlynq
3963 +obj-$(CONFIG_AR7_VLYNQ) += avalanche_vlynq/avalanche_vlynq.o
3965 +obj-$(CONFIG_FETCHOP) += fetchop.o
3966 +obj-$(CONFIG_BUSMOUSE) += busmouse.o
3967 +obj-$(CONFIG_DTLK) += dtlk.o
3968 +obj-$(CONFIG_R3964) += n_r3964.o
3969 +obj-$(CONFIG_APPLICOM) += applicom.o
3970 +obj-$(CONFIG_SONYPI) += sonypi.o
3971 +obj-$(CONFIG_MS_BUSMOUSE) += msbusmouse.o
3972 +obj-$(CONFIG_82C710_MOUSE) += qpmouse.o
3973 +obj-$(CONFIG_AMIGAMOUSE) += amigamouse.o
3974 +obj-$(CONFIG_ATARIMOUSE) += atarimouse.o
3975 +obj-$(CONFIG_ADBMOUSE) += adbmouse.o
3976 +obj-$(CONFIG_PC110_PAD) += pc110pad.o
3977 +obj-$(CONFIG_MK712_MOUSE) += mk712.o
3978 +obj-$(CONFIG_RTC) += rtc.o
3979 +obj-$(CONFIG_GEN_RTC) += genrtc.o
3980 +obj-$(CONFIG_EFI_RTC) += efirtc.o
3981 +obj-$(CONFIG_MIPS_RTC) += mips_rtc.o
3982 +obj-$(CONFIG_SGI_IP27_RTC) += ip27-rtc.o
3983 +ifeq ($(CONFIG_PPC),)
3984 + obj-$(CONFIG_NVRAM) += nvram.o
3986 +obj-$(CONFIG_TOSHIBA) += toshiba.o
3987 +obj-$(CONFIG_I8K) += i8k.o
3988 +obj-$(CONFIG_DS1286) += ds1286.o
3989 +obj-$(CONFIG_DS1620) += ds1620.o
3990 +obj-$(CONFIG_DS1742) += ds1742.o
3991 +obj-$(CONFIG_INTEL_RNG) += i810_rng.o
3992 +obj-$(CONFIG_AMD_RNG) += amd768_rng.o
3993 +obj-$(CONFIG_HW_RANDOM) += hw_random.o
3994 +obj-$(CONFIG_AMD_PM768) += amd76x_pm.o
3995 +obj-$(CONFIG_BRIQ_PANEL) += briq_panel.o