3 * Efika 5K2 platform setup
4 * Some code really inspired from the lite5200b platform.
6 * Copyright (C) 2006 bplan GmbH
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.
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>
26 #include <asm/pgtable.h>
29 #include <asm/machdep.h>
31 #include <asm/of_device.h>
32 #include <asm/of_platform.h>
33 #include <asm/mpc52xx.h>
37 static void efika_show_cpuinfo(struct seq_file
*m
)
39 struct device_node
*root
;
40 const char *revision
= NULL
;
41 const char *codegendescription
= NULL
;
42 const char *codegenvendor
= NULL
;
44 root
= of_find_node_by_path("/");
46 revision
= get_property(root
, "revision", NULL
);
48 get_property(root
, "CODEGEN,description", NULL
);
49 codegenvendor
= get_property(root
, "CODEGEN,vendor", NULL
);
54 if (codegendescription
)
55 seq_printf(m
, "machine\t\t: %s\n", codegendescription
);
57 seq_printf(m
, "machine\t\t: Efika\n");
60 seq_printf(m
, "revision\t: %s\n", revision
);
63 seq_printf(m
, "vendor\t\t: %s\n", codegenvendor
);
68 static void __init
efika_setup_arch(void)
72 #ifdef CONFIG_BLK_DEV_INITRD
73 initrd_below_start_ok
= 1;
79 ROOT_DEV
= Root_SDA2
; /* sda2 (sda1 is for the kernel) */
84 ppc_md
.progress("Linux/PPC " UTS_RELEASE
" running on Efika ;-)\n", 0x0);
87 static int __init
efika_probe(void)
89 char *model
= of_get_flat_dt_prop(of_get_flat_dt_root(),
94 if (strcmp(model
, "EFIKA5K2"))
97 ISA_DMA_THRESHOLD
= ~0L;
99 DMA_MODE_WRITE
= 0x48;
104 define_machine(efika
)
106 .name
= EFIKA_PLATFORM_NAME
,
107 .probe
= efika_probe
,
108 .setup_arch
= efika_setup_arch
,
109 .init
= mpc52xx_declare_of_platform_devices
,
110 .show_cpuinfo
= efika_show_cpuinfo
,
111 .init_IRQ
= mpc52xx_init_irq
,
112 .get_irq
= mpc52xx_get_irq
,
113 .restart
= rtas_restart
,
114 .power_off
= rtas_power_off
,
116 .set_rtc_time
= rtas_set_rtc_time
,
117 .get_rtc_time
= rtas_get_rtc_time
,
118 .progress
= rtas_progress
,
119 .get_boot_time
= rtas_get_boot_time
,
120 .calibrate_decr
= generic_calibrate_decr
,
121 .phys_mem_access_prot
= pci_phys_mem_access_prot
,