patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / ppc / platforms / 4xx / ebony.c
1 /*
2  * arch/ppc/platforms/ebony.c
3  *
4  * Ebony board specific routines
5  *
6  * Matt Porter <mporter@mvista.com>
7  *
8  * Copyright 2002 MontaVista Software Inc.
9  *
10  * This program is free software; you can redistribute  it and/or modify it
11  * under  the terms of  the GNU General  Public License as published by the
12  * Free Software Foundation;  either version 2 of the  License, or (at your
13  * option) any later version.
14  */
15
16 #include <linux/config.h>
17 #include <linux/stddef.h>
18 #include <linux/kernel.h>
19 #include <linux/init.h>
20 #include <linux/errno.h>
21 #include <linux/reboot.h>
22 #include <linux/pci.h>
23 #include <linux/kdev_t.h>
24 #include <linux/types.h>
25 #include <linux/major.h>
26 #include <linux/blkdev.h>
27 #include <linux/console.h>
28 #include <linux/delay.h>
29 #include <linux/ide.h>
30 #include <linux/initrd.h>
31 #include <linux/irq.h>
32 #include <linux/seq_file.h>
33 #include <linux/root_dev.h>
34 #include <linux/tty.h>
35 #include <linux/serial.h>
36 #include <linux/serial_core.h>
37
38 #include <asm/system.h>
39 #include <asm/pgtable.h>
40 #include <asm/page.h>
41 #include <asm/dma.h>
42 #include <asm/io.h>
43 #include <asm/machdep.h>
44 #include <asm/ocp.h>
45 #include <asm/pci-bridge.h>
46 #include <asm/time.h>
47 #include <asm/todc.h>
48 #include <asm/bootinfo.h>
49 #include <asm/ppc4xx_pic.h>
50
51 /*
52  * Ebony IRQ triggering/polarity settings
53  */
54 static u_char ebony_IRQ_initsenses[] __initdata = {
55         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 0: UART 0 */
56         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 1: UART 1 */
57         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 2: IIC 0 */
58         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 3: IIC 1 */
59         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 4: PCI Inb Mess */
60         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 5: PCI Cmd Wrt */
61         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 6: PCI PM */
62         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 7: PCI MSI 0 */
63         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 8: PCI MSI 1 */
64         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 9: PCI MSI 2 */
65         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 10: MAL TX EOB */
66         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 11: MAL RX EOB */
67         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 12: DMA Chan 0 */
68         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 13: DMA Chan 1 */
69         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 14: DMA Chan 2 */
70         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 15: DMA Chan 3 */
71         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 16: Reserved */
72         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 17: Reserved */
73         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 18: GPT Timer 0 */
74         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 19: GPT Timer 1 */
75         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 20: GPT Timer 2 */
76         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 21: GPT Timer 3 */
77         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 22: GPT Timer 4 */
78         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 23: Ext Int 0 */
79         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 24: Ext Int 1 */
80         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 25: Ext Int 2 */
81         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 26: Ext Int 3 */
82         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 27: Ext Int 4 */
83         (IRQ_SENSE_EDGE  | IRQ_POLARITY_NEGATIVE),      /* 28: Ext Int 5 */
84         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 29: Ext Int 6 */
85         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 30: UIC1 NC Int */
86         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 31: UIC1 Crit Int */
87         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 32: MAL SERR */
88         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 33: MAL TXDE */
89         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 34: MAL RXDE */
90         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 35: ECC Unc Err */
91         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 36: ECC Corr Err */
92         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 37: Ext Bus Ctrl */
93         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 38: Ext Bus Mstr */
94         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 39: OPB->PLB */
95         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 40: PCI MSI 3 */
96         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 41: PCI MSI 4 */
97         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 42: PCI MSI 5 */
98         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 43: PCI MSI 6 */
99         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 44: PCI MSI 7 */
100         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 45: PCI MSI 8 */
101         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 46: PCI MSI 9 */
102         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 47: PCI MSI 10 */
103         (IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),      /* 48: PCI MSI 11 */
104         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 49: PLB Perf Mon */
105         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 50: Ext Int 7 */
106         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 51: Ext Int 8 */
107         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 52: Ext Int 9 */
108         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 53: Ext Int 10 */
109         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 54: Ext Int 11 */
110         (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* 55: Ext Int 12 */
111         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 56: Ser ROM Err */
112         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 57: Reserved */
113         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 58: Reserved */
114         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 59: PCI Async Err */
115         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 60: EMAC 0 */
116         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 61: EMAC 0 WOL */
117         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 62: EMAC 1 */
118         (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* 63: EMAC 1 WOL */
119 };
120
121 extern void abort(void);
122
123 static void __init
124 ebony_calibrate_decr(void)
125 {
126         unsigned int freq;
127
128         /*
129          * Determine system clock speed
130          *
131          * If we are on Rev. B silicon, then use
132          * default external system clock.  If we are
133          * on Rev. C silicon then errata forces us to
134          * use the internal clock.
135          */
136         switch (PVR_REV(mfspr(PVR))) {
137                 case PVR_REV(PVR_440GP_RB):
138                         freq = EBONY_440GP_RB_SYSCLK;
139                         break;
140                 case PVR_REV(PVR_440GP_RC1):
141                 default:
142                         freq = EBONY_440GP_RC_SYSCLK;
143                         break;
144         }
145
146         tb_ticks_per_jiffy = freq / HZ;
147         tb_to_us = mulhwu_scale_factor(freq, 1000000);
148
149         /* Set the time base to zero */
150         mtspr(SPRN_TBWL, 0);
151         mtspr(SPRN_TBWU, 0);
152
153         /* Clear any pending timer interrupts */
154         mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
155
156         /* Enable decrementer interrupt */
157         mtspr(SPRN_TCR, TCR_DIE);
158 }
159
160 static int
161 ebony_show_cpuinfo(struct seq_file *m)
162 {
163         seq_printf(m, "vendor\t\t: IBM\n");
164         seq_printf(m, "machine\t\t: Ebony\n");
165
166         return 0;
167 }
168
169 static inline int
170 ebony_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
171 {
172         static char pci_irq_table[][4] =
173         /*
174          *      PCI IDSEL/INTPIN->INTLINE
175          *         A   B   C   D
176          */
177         {
178                 { 23, 23, 23, 23 },     /* IDSEL 1 - PCI Slot 0 */
179                 { 24, 24, 24, 24 },     /* IDSEL 2 - PCI Slot 1 */
180                 { 25, 25, 25, 25 },     /* IDSEL 3 - PCI Slot 2 */
181                 { 26, 26, 26, 26 },     /* IDSEL 4 - PCI Slot 3 */
182         };
183
184         const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4;
185         return PCI_IRQ_TABLE_LOOKUP;
186 }
187
188 #define PCIX_WRITEL(value, offset) \
189         (writel(value, (u32)pcix_reg_base+offset))
190
191 /*
192  * FIXME: This is only here to "make it work".  This will move
193  * to a ibm_pcix.c which will contain a generic IBM PCIX bridge
194  * configuration library. -Matt
195  */
196 static void __init
197 ebony_setup_pcix(void)
198 {
199         void *pcix_reg_base;
200
201         pcix_reg_base = ioremap64(PCIX0_REG_BASE, PCIX0_REG_SIZE);
202
203         /* Disable all windows */
204         PCIX_WRITEL(0, PCIX0_POM0SA);
205         PCIX_WRITEL(0, PCIX0_POM1SA);
206         PCIX_WRITEL(0, PCIX0_POM2SA);
207         PCIX_WRITEL(0, PCIX0_PIM0SA);
208         PCIX_WRITEL(0, PCIX0_PIM1SA);
209         PCIX_WRITEL(0, PCIX0_PIM2SA);
210
211         /* Setup 2GB PLB->PCI outbound mem window (3_8000_0000->0_8000_0000) */
212         PCIX_WRITEL(0x00000003, PCIX0_POM0LAH);
213         PCIX_WRITEL(0x80000000, PCIX0_POM0LAL);
214         PCIX_WRITEL(0x00000000, PCIX0_POM0PCIAH);
215         PCIX_WRITEL(0x80000000, PCIX0_POM0PCIAL);
216         PCIX_WRITEL(0x80000001, PCIX0_POM0SA);
217
218         /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */
219         PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH);
220         PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL);
221         PCIX_WRITEL(0x80000007, PCIX0_PIM0SA);
222
223         eieio();
224 }
225
226 static void __init
227 ebony_setup_hose(void)
228 {
229         struct pci_controller *hose;
230
231         /* Configure windows on the PCI-X host bridge */
232         ebony_setup_pcix();
233
234         hose = pcibios_alloc_controller();
235
236         if (!hose)
237                 return;
238
239         hose->first_busno = 0;
240         hose->last_busno = 0xff;
241
242         hose->pci_mem_offset = EBONY_PCI_MEM_OFFSET;
243
244         pci_init_resource(&hose->io_resource,
245                         EBONY_PCI_LOWER_IO,
246                         EBONY_PCI_UPPER_IO,
247                         IORESOURCE_IO,
248                         "PCI host bridge");
249
250         pci_init_resource(&hose->mem_resources[0],
251                         EBONY_PCI_LOWER_MEM,
252                         EBONY_PCI_UPPER_MEM,
253                         IORESOURCE_MEM,
254                         "PCI host bridge");
255
256         hose->io_space.start = EBONY_PCI_LOWER_IO;
257         hose->io_space.end = EBONY_PCI_UPPER_IO;
258         hose->mem_space.start = EBONY_PCI_LOWER_MEM;
259         hose->mem_space.end = EBONY_PCI_UPPER_MEM;
260         isa_io_base =
261                 (unsigned long)ioremap64(EBONY_PCI_IO_BASE, EBONY_PCI_IO_SIZE);
262         hose->io_base_virt = (void *)isa_io_base;
263
264         setup_indirect_pci(hose,
265                         EBONY_PCI_CFGA_PLB32,
266                         EBONY_PCI_CFGD_PLB32);
267         hose->set_cfg_type = 1;
268
269         hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
270
271         ppc_md.pci_swizzle = common_swizzle;
272         ppc_md.pci_map_irq = ebony_map_irq;
273 }
274
275 TODC_ALLOC();
276
277 static void __init
278 ebony_early_serial_map(void)
279 {
280         struct uart_port port;
281
282         /* Setup ioremapped serial port access */
283         memset(&port, 0, sizeof(port));
284         port.membase = ioremap64(PPC440GP_UART0_ADDR, 8);
285         port.irq = 0;
286         port.uartclk = BASE_BAUD * 16;
287         port.regshift = 0;
288         port.iotype = SERIAL_IO_MEM;
289         port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
290         port.line = 0;
291
292         if (early_serial_setup(&port) != 0) {
293                 printk("Early serial init of port 0 failed\n");
294         }
295
296         port.membase = ioremap64(PPC440GP_UART1_ADDR, 8);
297         port.irq = 1;
298         port.line = 1;
299
300         if (early_serial_setup(&port) != 0) {
301                 printk("Early serial init of port 1 failed\n");
302         }
303 }
304
305 static void __init
306 ebony_setup_arch(void)
307 {
308         unsigned char * vpd_base;
309         struct ibm44x_clocks clocks;
310         struct ocp_def *def;
311         struct ocp_func_emac_data *emacdata;
312
313 #if !defined(CONFIG_BDI_SWITCH)
314         /*
315          * The Abatron BDI JTAG debugger does not tolerate others
316          * mucking with the debug registers.
317          */
318         mtspr(SPRN_DBCR0, (DBCR0_TDE | DBCR0_IDM));
319 #endif
320
321         /* Set mac_addr for each EMAC */
322         vpd_base = ioremap64(EBONY_VPD_BASE, EBONY_VPD_SIZE);
323         def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0);
324         emacdata = def->additions;
325         memcpy(emacdata->mac_addr, EBONY_NA0_ADDR(vpd_base), 6);
326         def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 1);
327         emacdata = def->additions;
328         memcpy(emacdata->mac_addr, EBONY_NA1_ADDR(vpd_base), 6);
329         iounmap(vpd_base);
330
331         /*
332          * Determine various clocks.
333          * To be completely correct we should get SysClk
334          * from FPGA, because it can be changed by on-board switches
335          * --ebs
336          */
337         ibm440gp_get_clocks(&clocks, 33333333, 6 * 1843200);
338         ocp_sys_info.opb_bus_freq = clocks.opb;
339
340         /* Setup TODC access */
341         TODC_INIT(TODC_TYPE_DS1743,
342                         0,
343                         0,
344                         ioremap64(EBONY_RTC_ADDR, EBONY_RTC_SIZE),
345                         8);
346
347         /* init to some ~sane value until calibrate_delay() runs */
348         loops_per_jiffy = 50000000/HZ;
349
350         /* Setup PCI host bridge */
351         ebony_setup_hose();
352
353 #ifdef CONFIG_BLK_DEV_INITRD
354         if (initrd_start)
355                 ROOT_DEV = Root_RAM0;
356         else
357 #endif
358 #ifdef CONFIG_ROOT_NFS
359                 ROOT_DEV = Root_NFS;
360 #else
361                 ROOT_DEV = Root_HDA1;
362 #endif
363
364 #ifdef CONFIG_VT
365         conswitchp = &dummy_con;
366 #endif
367
368         ebony_early_serial_map();
369
370         ibm4xxPIC_InitSenses = ebony_IRQ_initsenses;
371         ibm4xxPIC_NumInitSenses = sizeof(ebony_IRQ_initsenses);
372
373         /* Identify the system */
374         printk("IBM Ebony port (MontaVista Software, Inc. (source@mvista.com))\n");
375 }
376
377 static void
378 ebony_restart(char *cmd)
379 {
380         local_irq_disable();
381         abort();
382 }
383
384 static void
385 ebony_power_off(void)
386 {
387         local_irq_disable();
388         for(;;);
389 }
390
391 static void
392 ebony_halt(void)
393 {
394         local_irq_disable();
395         for(;;);
396 }
397
398 /*
399  * Read the 440GP memory controller to get size of system memory.
400  */
401 static unsigned long __init
402 ebony_find_end_of_memory(void)
403 {
404         u32 i, bank_config;
405         u32 mem_size = 0;
406
407         for (i=0; i<4; i++)
408         {
409                 switch (i)
410                 {
411                         case 0:
412                                 mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B0CR);
413                                 break;
414                         case 1:
415                                 mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B1CR);
416                                 break;
417                         case 2:
418                                 mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B2CR);
419                                 break;
420                         case 3:
421                                 mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B3CR);
422                                 break;
423                 }
424
425                 bank_config = mfdcr(DCRN_SDRAM0_CFGDATA);
426
427                 if (!(bank_config & SDRAM_CONFIG_BANK_ENABLE))
428                         continue;
429                 switch (SDRAM_CONFIG_BANK_SIZE(bank_config))
430                 {
431                         case SDRAM_CONFIG_SIZE_8M:
432                                 mem_size += PPC44x_MEM_SIZE_8M;
433                                 break;
434                         case SDRAM_CONFIG_SIZE_16M:
435                                 mem_size += PPC44x_MEM_SIZE_16M;
436                                 break;
437                         case SDRAM_CONFIG_SIZE_32M:
438                                 mem_size += PPC44x_MEM_SIZE_32M;
439                                 break;
440                         case SDRAM_CONFIG_SIZE_64M:
441                                 mem_size += PPC44x_MEM_SIZE_64M;
442                                 break;
443                         case SDRAM_CONFIG_SIZE_128M:
444                                 mem_size += PPC44x_MEM_SIZE_128M;
445                                 break;
446                         case SDRAM_CONFIG_SIZE_256M:
447                                 mem_size += PPC44x_MEM_SIZE_256M;
448                                 break;
449                         case SDRAM_CONFIG_SIZE_512M:
450                                 mem_size += PPC44x_MEM_SIZE_512M;
451                                 break;
452                 }
453         }
454         return mem_size;
455 }
456
457 static void __init
458 ebony_init_irq(void)
459 {
460         int i;
461
462         ppc4xx_pic_init();
463
464         for (i = 0; i < NR_IRQS; i++)
465                 irq_desc[i].handler = ppc4xx_pic;
466 }
467
468 #ifdef CONFIG_SERIAL_TEXT_DEBUG
469 #include <linux/serialP.h>
470 #include <linux/serial_reg.h>
471 #include <asm/serial.h>
472
473 static struct serial_state rs_table[RS_TABLE_SIZE] = {
474         SERIAL_PORT_DFNS        /* Defined in <asm/serial.h> */
475 };
476
477 static void
478 ebony_progress(char *s, unsigned short hex)
479 {
480         volatile char c;
481         volatile unsigned long com_port;
482         u16 shift;
483
484         com_port = (unsigned long)rs_table[0].iomem_base;
485         shift = rs_table[0].iomem_reg_shift;
486
487         while ((c = *s++) != 0) {
488                 while ((*((volatile unsigned char *)com_port +
489                                 (UART_LSR << shift)) & UART_LSR_THRE) == 0)
490                         ;
491                 *(volatile unsigned char *)com_port = c;
492
493         }
494
495         /* Send LF/CR to pretty up output */
496         while ((*((volatile unsigned char *)com_port +
497                 (UART_LSR << shift)) & UART_LSR_THRE) == 0)
498                 ;
499         *(volatile unsigned char *)com_port = '\r';
500         while ((*((volatile unsigned char *)com_port +
501                 (UART_LSR << shift)) & UART_LSR_THRE) == 0)
502                 ;
503         *(volatile unsigned char *)com_port = '\n';
504 }
505 #endif /* CONFIG_SERIAL_TEXT_DEBUG */
506
507 void __init platform_init(unsigned long r3, unsigned long r4,
508                 unsigned long r5, unsigned long r6, unsigned long r7)
509 {
510         parse_bootinfo((struct bi_record *) (r3 + KERNELBASE));
511
512         ppc_md.setup_arch = ebony_setup_arch;
513         ppc_md.show_cpuinfo = ebony_show_cpuinfo;
514         ppc_md.init_IRQ = ebony_init_irq;
515         ppc_md.get_irq = NULL;          /* Set in ppc4xx_pic_init() */
516
517         ppc_md.find_end_of_memory = ebony_find_end_of_memory;
518
519         ppc_md.restart = ebony_restart;
520         ppc_md.power_off = ebony_power_off;
521         ppc_md.halt = ebony_halt;
522
523         ppc_md.calibrate_decr = ebony_calibrate_decr;
524         ppc_md.time_init = todc_time_init;
525         ppc_md.set_rtc_time = todc_set_rtc_time;
526         ppc_md.get_rtc_time = todc_get_rtc_time;
527
528         ppc_md.nvram_read_val = todc_direct_read_val;
529         ppc_md.nvram_write_val = todc_direct_write_val;
530
531 #ifdef CONFIG_SERIAL_TEXT_DEBUG
532         ppc_md.progress = ebony_progress;
533 #endif /* CONFIG_SERIAL_TEXT_DEBUG */
534 #ifdef CONFIG_KGDB
535         ppc_md.early_serial_map = ebony_early_serial_map;
536 #endif
537 }
538