aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/52xx/efika-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/52xx/efika-setup.c')
-rw-r--r--arch/powerpc/platforms/52xx/efika-setup.c121
1 files changed, 0 insertions, 121 deletions
diff --git a/arch/powerpc/platforms/52xx/efika-setup.c b/arch/powerpc/platforms/52xx/efika-setup.c
deleted file mode 100644
index b6945cbbfba6..000000000000
--- a/arch/powerpc/platforms/52xx/efika-setup.c
+++ /dev/null
@@ -1,121 +0,0 @@
1/*
2 *
3 * Efika 5K2 platform setup
4 * Some code really inspired from the lite5200b platform.
5 *
6 * Copyright (C) 2006 bplan GmbH
7 *
8 * This file is licensed under the terms of the GNU General Public License
9 * version 2. This program is licensed "as is" without any warranty of any
10 * kind, whether express or implied.
11 *
12 */
13
14#include <linux/errno.h>
15#include <linux/kernel.h>
16#include <linux/slab.h>
17#include <linux/reboot.h>
18#include <linux/init.h>
19#include <linux/utsrelease.h>
20#include <linux/seq_file.h>
21#include <linux/root_dev.h>
22#include <linux/initrd.h>
23#include <linux/timer.h>
24#include <linux/pci.h>
25
26#include <asm/pgtable.h>
27#include <asm/prom.h>
28#include <asm/time.h>
29#include <asm/machdep.h>
30#include <asm/rtas.h>
31#include <asm/of_device.h>
32#include <asm/of_platform.h>
33#include <asm/mpc52xx.h>
34
35#include "efika.h"
36
37static void efika_show_cpuinfo(struct seq_file *m)
38{
39 struct device_node *root;
40 const char *revision = NULL;
41 const char *codegendescription = NULL;
42 const char *codegenvendor = NULL;
43
44 root = of_find_node_by_path("/");
45 if (!root)
46 return;
47
48 revision = get_property(root, "revision", NULL);
49 codegendescription =
50 get_property(root, "CODEGEN,description", NULL);
51 codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
52
53 if (codegendescription)
54 seq_printf(m, "machine\t\t: %s\n", codegendescription);
55 else
56 seq_printf(m, "machine\t\t: Efika\n");
57
58 if (revision)
59 seq_printf(m, "revision\t: %s\n", revision);
60
61 if (codegenvendor)
62 seq_printf(m, "vendor\t\t: %s\n", codegenvendor);
63
64 of_node_put(root);
65}
66
67static void __init efika_setup_arch(void)
68{
69 rtas_initialize();
70
71#ifdef CONFIG_BLK_DEV_INITRD
72 initrd_below_start_ok = 1;
73
74 if (initrd_start)
75 ROOT_DEV = Root_RAM0;
76 else
77#endif
78 ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
79
80 efika_pcisetup();
81
82 if (ppc_md.progress)
83 ppc_md.progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
84}
85
86static int __init efika_probe(void)
87{
88 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
89 "model", NULL);
90
91 if (model == NULL)
92 return 0;
93 if (strcmp(model, "EFIKA5K2"))
94 return 0;
95
96 ISA_DMA_THRESHOLD = ~0L;
97 DMA_MODE_READ = 0x44;
98 DMA_MODE_WRITE = 0x48;
99
100 return 1;
101}
102
103define_machine(efika)
104{
105 .name = EFIKA_PLATFORM_NAME,
106 .probe = efika_probe,
107 .setup_arch = efika_setup_arch,
108 .init = mpc52xx_declare_of_platform_devices,
109 .show_cpuinfo = efika_show_cpuinfo,
110 .init_IRQ = mpc52xx_init_irq,
111 .get_irq = mpc52xx_get_irq,
112 .restart = rtas_restart,
113 .power_off = rtas_power_off,
114 .halt = rtas_halt,
115 .set_rtc_time = rtas_set_rtc_time,
116 .get_rtc_time = rtas_get_rtc_time,
117 .progress = rtas_progress,
118 .get_boot_time = rtas_get_boot_time,
119 .calibrate_decr = generic_calibrate_decr,
120 .phys_mem_access_prot = pci_phys_mem_access_prot,
121};