Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6] / arch / sparc / kernel / sun4setup.c
1 /* sun4setup.c: Setup the hardware address of various items in the sun4
2  *              architecture. Called from idprom_init
3  *
4  * Copyright (C) 1998 Chris G. Davis (cdavis@cois.on.ca)
5  */
6
7 #include <asm/page.h>
8 #include <asm/oplib.h>
9 #include <asm/idprom.h>
10 #include <asm/sun4paddr.h>
11 #include <asm/machines.h>
12
13 int sun4_memreg_physaddr;
14 int sun4_ie_physaddr;
15 int sun4_clock_physaddr;
16 int sun4_timer_physaddr;
17 int sun4_eth_physaddr;
18 int sun4_si_physaddr;
19 int sun4_bwtwo_physaddr;
20 int sun4_zs0_physaddr;
21 int sun4_zs1_physaddr;
22 int sun4_dma_physaddr;
23 int sun4_esp_physaddr;
24 int sun4_ie_physaddr; 
25
26 void __init sun4setup(void)
27 {
28         printk("Sun4 Hardware Setup v1.0 18/May/98 Chris Davis (cdavis@cois.on.ca). ");
29         /*
30           setup standard sun4 info
31           */
32         sun4_ie_physaddr=SUN4_IE_PHYSADDR;
33
34         /*
35           setup model specific info
36           */
37         switch(idprom->id_machtype) {
38                 case (SM_SUN4 | SM_4_260 ):
39                         printk("Setup for a SUN4/260\n");
40                         sun4_memreg_physaddr=SUN4_200_MEMREG_PHYSADDR;
41                         sun4_clock_physaddr=SUN4_200_CLOCK_PHYSADDR;
42                         sun4_timer_physaddr=SUN4_UNUSED_PHYSADDR;
43                         sun4_eth_physaddr=SUN4_200_ETH_PHYSADDR;
44                         sun4_si_physaddr=SUN4_200_SI_PHYSADDR;
45                         sun4_bwtwo_physaddr=SUN4_200_BWTWO_PHYSADDR;
46                         sun4_dma_physaddr=SUN4_UNUSED_PHYSADDR;
47                         sun4_esp_physaddr=SUN4_UNUSED_PHYSADDR;
48                         break;
49                 case (SM_SUN4 | SM_4_330 ):
50                         printk("Setup for a SUN4/330\n");
51                         sun4_memreg_physaddr=SUN4_300_MEMREG_PHYSADDR;
52                         sun4_clock_physaddr=SUN4_300_CLOCK_PHYSADDR;
53                         sun4_timer_physaddr=SUN4_300_TIMER_PHYSADDR;
54                         sun4_eth_physaddr=SUN4_300_ETH_PHYSADDR;
55                         sun4_si_physaddr=SUN4_UNUSED_PHYSADDR;
56                         sun4_bwtwo_physaddr=SUN4_300_BWTWO_PHYSADDR;
57                         sun4_dma_physaddr=SUN4_300_DMA_PHYSADDR;
58                         sun4_esp_physaddr=SUN4_300_ESP_PHYSADDR;
59                         break;
60                 case (SM_SUN4 | SM_4_470 ):
61                         printk("Setup for a SUN4/470\n");
62                         sun4_memreg_physaddr=SUN4_400_MEMREG_PHYSADDR;
63                         sun4_clock_physaddr=SUN4_400_CLOCK_PHYSADDR;
64                         sun4_timer_physaddr=SUN4_400_TIMER_PHYSADDR;
65                         sun4_eth_physaddr=SUN4_400_ETH_PHYSADDR;
66                         sun4_si_physaddr=SUN4_UNUSED_PHYSADDR;
67                         sun4_bwtwo_physaddr=SUN4_400_BWTWO_PHYSADDR;
68                         sun4_dma_physaddr=SUN4_400_DMA_PHYSADDR;
69                         sun4_esp_physaddr=SUN4_400_ESP_PHYSADDR;
70                         break;
71                 default:
72                         ;
73         }
74 }
75