aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v10/kernel/head.S
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-09 11:51:35 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-09 11:51:35 -0400
commitc973b112c76c9d8fd042991128f218a738cc8d0a (patch)
treee813b0da5d0a0e19e06de6462d145a29ad683026 /arch/cris/arch-v10/kernel/head.S
parentc5fbc3966f48279dbebfde10248c977014aa9988 (diff)
parent00dd1e433967872f3997a45d5adf35056fdf2f56 (diff)
Merge with /shiny/git/linux-2.6/.git
Diffstat (limited to 'arch/cris/arch-v10/kernel/head.S')
-rw-r--r--arch/cris/arch-v10/kernel/head.S126
1 files changed, 55 insertions, 71 deletions
diff --git a/arch/cris/arch-v10/kernel/head.S b/arch/cris/arch-v10/kernel/head.S
index 2c1dd1184a8f..f00c145b43f1 100644
--- a/arch/cris/arch-v10/kernel/head.S
+++ b/arch/cris/arch-v10/kernel/head.S
@@ -1,4 +1,4 @@
1/* $Id: head.S,v 1.7 2004/05/14 07:58:01 starvik Exp $ 1/* $Id: head.S,v 1.10 2005/06/20 05:12:54 starvik Exp $
2 * 2 *
3 * Head of the kernel - alter with care 3 * Head of the kernel - alter with care
4 * 4 *
@@ -7,6 +7,16 @@
7 * Authors: Bjorn Wesen (bjornw@axis.com) 7 * Authors: Bjorn Wesen (bjornw@axis.com)
8 * 8 *
9 * $Log: head.S,v $ 9 * $Log: head.S,v $
10 * Revision 1.10 2005/06/20 05:12:54 starvik
11 * Remove unnecessary diff to kernel.org tree
12 *
13 * Revision 1.9 2004/12/13 12:21:51 starvik
14 * Added I/O and DMA allocators from Linux 2.4
15 *
16 * Revision 1.8 2004/11/22 11:41:14 starvik
17 * Kernel command line may be supplied to kernel. Not used by Axis but may
18 * be used by customers.
19 *
10 * Revision 1.7 2004/05/14 07:58:01 starvik 20 * Revision 1.7 2004/05/14 07:58:01 starvik
11 * Merge of changes from 2.4 21 * Merge of changes from 2.4
12 * 22 *
@@ -181,6 +191,7 @@
181 191
182#define CRAMFS_MAGIC 0x28cd3d45 192#define CRAMFS_MAGIC 0x28cd3d45
183#define RAM_INIT_MAGIC 0x56902387 193#define RAM_INIT_MAGIC 0x56902387
194#define COMMAND_LINE_MAGIC 0x87109563
184 195
185#define START_ETHERNET_CLOCK IO_STATE(R_NETWORK_GEN_CONFIG, enable, on) |\ 196#define START_ETHERNET_CLOCK IO_STATE(R_NETWORK_GEN_CONFIG, enable, on) |\
186 IO_STATE(R_NETWORK_GEN_CONFIG, phy, mii_clk) 197 IO_STATE(R_NETWORK_GEN_CONFIG, phy, mii_clk)
@@ -490,6 +501,23 @@ _no_romfs_in_flash:
490 501
491_start_it: 502_start_it:
492 503
504 ;; Check if kernel command line is supplied
505 cmp.d COMMAND_LINE_MAGIC, $r10
506 bne no_command_line
507 nop
508
509 move.d 256, $r13
510 move.d cris_command_line, $r10
511 or.d 0x80000000, $r11 ; Make it virtual
5121:
513 move.b [$r11+], $r12
514 move.b $r12, [$r10+]
515 subq 1, $r13
516 bne 1b
517 nop
518
519no_command_line:
520
493 ;; the kernel stack is overlayed with the task structure for each 521 ;; the kernel stack is overlayed with the task structure for each
494 ;; task. thus the initial kernel stack is in the same page as the 522 ;; task. thus the initial kernel stack is in the same page as the
495 ;; init_task (but starts in the top of the page, size 8192) 523 ;; init_task (but starts in the top of the page, size 8192)
@@ -567,76 +595,32 @@ _start_it:
567 ;; Etrax product HW genconfig setup 595 ;; Etrax product HW genconfig setup
568 596
569 moveq 0,$r0 597 moveq 0,$r0
570#if (!defined(CONFIG_ETRAX_KGDB) || !defined(CONFIG_ETRAX_DEBUG_PORT0)) \ 598
571 && !defined(CONFIG_DMA_MEMCPY) 599 ;; Init interfaces (disable them).
572 ; DMA channels 6 and 7 to ser0, kgdb doesnt want DMA 600 or.d IO_STATE (R_GEN_CONFIG, scsi0, disable) \
573 or.d IO_STATE (R_GEN_CONFIG, dma7, serial0) \ 601 | IO_STATE (R_GEN_CONFIG, ata, disable) \
574 | IO_STATE (R_GEN_CONFIG, dma6, serial0),$r0 602 | IO_STATE (R_GEN_CONFIG, par0, disable) \
575#endif 603 | IO_STATE (R_GEN_CONFIG, ser2, disable) \
576#if !defined(CONFIG_ETRAX_KGDB) || !defined(CONFIG_ETRAX_DEBUG_PORT1) 604 | IO_STATE (R_GEN_CONFIG, mio, disable) \
577 ; DMA channels 8 and 9 to ser1, kgdb doesnt want DMA 605 | IO_STATE (R_GEN_CONFIG, scsi1, disable) \
578 or.d IO_STATE (R_GEN_CONFIG, dma9, serial1) \ 606 | IO_STATE (R_GEN_CONFIG, scsi0w, disable) \
579 | IO_STATE (R_GEN_CONFIG, dma8, serial1),$r0 607 | IO_STATE (R_GEN_CONFIG, par1, disable) \
580#endif 608 | IO_STATE (R_GEN_CONFIG, ser3, disable) \
581#ifdef CONFIG_DMA_MEMCPY 609 | IO_STATE (R_GEN_CONFIG, mio_w, disable) \
582 ; 6/7 memory-memory DMA 610 | IO_STATE (R_GEN_CONFIG, usb1, disable) \
583 or.d IO_STATE (R_GEN_CONFIG, dma7, intdma6) \ 611 | IO_STATE (R_GEN_CONFIG, usb2, disable) \
584 | IO_STATE (R_GEN_CONFIG, dma6, intdma7),$r0 612 | IO_STATE (R_GEN_CONFIG, par_w, disable),$r0
585#endif 613
586#ifdef CONFIG_ETRAX_SERIAL_PORT2 614 ;; Init DMA channel muxing (set to unused clients).
587 ; Enable serial port 2 615 or.d IO_STATE (R_GEN_CONFIG, dma2, ata) \
588 or.w IO_STATE (R_GEN_CONFIG, ser2, select),$r0 616 | IO_STATE (R_GEN_CONFIG, dma3, ata) \
589#if !defined(CONFIG_ETRAX_KGDB) || !defined(CONFIG_ETRAX_DEBUG_PORT2) 617 | IO_STATE (R_GEN_CONFIG, dma4, scsi1) \
590 ; DMA channels 2 and 3 to ser2, kgdb doesnt want DMA 618 | IO_STATE (R_GEN_CONFIG, dma5, scsi1) \
591 or.d IO_STATE (R_GEN_CONFIG, dma3, serial2) \ 619 | IO_STATE (R_GEN_CONFIG, dma6, unused) \
592 | IO_STATE (R_GEN_CONFIG, dma2, serial2),$r0 620 | IO_STATE (R_GEN_CONFIG, dma7, unused) \
593#endif 621 | IO_STATE (R_GEN_CONFIG, dma8, usb) \
594#endif 622 | IO_STATE (R_GEN_CONFIG, dma9, usb),$r0
595#if defined(CONFIG_ETRAX_SERIAL_PORT3) || defined(CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT1) 623
596 ; Enable serial port 3
597 or.w IO_STATE (R_GEN_CONFIG, ser3, select),$r0
598#if !defined(CONFIG_ETRAX_KGDB) || !defined(CONFIG_ETRAX_DEBUG_PORT3)
599 ; DMA channels 4 and 5 to ser3, kgdb doesnt want DMA
600 or.d IO_STATE (R_GEN_CONFIG, dma5, serial3) \
601 | IO_STATE (R_GEN_CONFIG, dma4, serial3),$r0
602#endif
603#endif
604#if defined(CONFIG_ETRAX_PARALLEL_PORT0) || defined(CONFIG_ETRAX_ETHERNET_LPSLAVE)
605 ; parport 0 enabled using DMA 2/3
606 or.w IO_STATE (R_GEN_CONFIG, par0, select),$r0
607#endif
608#if defined(CONFIG_ETRAX_PARALLEL_PORT1) || defined(CONFIG_ETRAX_ETHERNET_LPSLAVE)
609 ; parport 1 enabled using DMA 4/5
610 or.w IO_STATE (R_GEN_CONFIG, par1, select),$r0
611#endif
612#ifdef CONFIG_ETRAX_IDE
613 ; DMA channels 2 and 3 to ATA, ATA enabled
614 or.d IO_STATE (R_GEN_CONFIG, dma3, ata) \
615 | IO_STATE (R_GEN_CONFIG, dma2, ata) \
616 | IO_STATE (R_GEN_CONFIG, ata, select),$r0
617#endif
618
619#ifdef CONFIG_ETRAX_USB_HOST_PORT1
620 ; Set the USB port 1 enable bit
621 or.d IO_STATE (R_GEN_CONFIG, usb1, select),$r0
622#endif
623#ifdef CONFIG_ETRAX_USB_HOST_PORT2
624 ; Set the USB port 2 enable bit
625 or.d IO_STATE (R_GEN_CONFIG, usb2, select),$r0
626#endif
627#ifdef CONFIG_ETRAX_USB_HOST
628 ; Connect DMA channels 8 and 9 to USB
629 and.d (~(IO_MASK (R_GEN_CONFIG, dma9) \
630 | IO_MASK (R_GEN_CONFIG, dma8))) \
631 | IO_STATE (R_GEN_CONFIG, dma9, usb) \
632 | IO_STATE (R_GEN_CONFIG, dma8, usb),$r0
633#endif
634
635#ifdef CONFIG_JULIETTE
636 ; DMA channels 4 and 5 to EXTDMA0, for Juliette
637 or.d IO_STATE (R_GEN_CONFIG, dma5, extdma0) \
638 | IO_STATE (R_GEN_CONFIG, dma4, extdma0),$r0
639#endif
640 624
641#if defined(CONFIG_ETRAX_DEF_R_PORT_G0_DIR_OUT) 625#if defined(CONFIG_ETRAX_DEF_R_PORT_G0_DIR_OUT)
642 or.d IO_STATE (R_GEN_CONFIG, g0dir, out),$r0 626 or.d IO_STATE (R_GEN_CONFIG, g0dir, out),$r0