12 #include <linux/compiler.h>
13 #include <linux/errno.h>
16 #include <linux/kernel.h>
17 #include <linux/list.h>
18 #include <linux/module.h>
19 #include <linux/slab.h>
20 #include <linux/string.h>
22 #include <linux/types.h>
27 .
name =
"TURBOchannel",
33 static void __init tc_bus_add_devices(
struct tc_bus *tbus)
47 slotaddr = tbus->
slot_base + slot * slotsize;
62 if (pattern[0] != 0x55 || pattern[1] != 0x00 ||
63 pattern[2] != 0xaa || pattern[3] != 0xff) {
79 if (pattern[0] != 0x55 || pattern[1] != 0x00 ||
80 pattern[2] != 0xaa || pattern[3] != 0xff)
92 tdev->
dev.parent = &tbus->
dev;
96 for (i = 0; i < 8; i++) {
113 if (devsize <= slotsize) {
115 tdev->
resource.end = slotaddr + devsize - 1;
116 }
else if (devsize <= extslotsize) {
118 tdev->
resource.end = extslotaddr + devsize - 1;
121 "(%dMiB required, up to %dMiB supported)\n",
122 dev_name(&tdev->
dev), devsize >> 20,
123 max(slotsize, extslotsize) >> 20);
143 static int __init tc_init(
void)
149 INIT_LIST_HEAD(&tc_bus.
devices);
153 if (tc_bus.
info.slot_size) {
154 unsigned int tc_clock = tc_get_speed(&tc_bus) / 100000;
156 pr_info(
"tc: TURBOchannel rev. %d at %d.%d MHz "
157 "(with%s parity)\n", tc_bus.
info.revision,
158 tc_clock / 10, tc_clock % 10,
159 tc_bus.
info.parity ?
"" :
"out");
163 (tc_bus.
info.slot_size << 20) *
182 "tc: Cannot reserve resource\n");
188 tc_bus_add_devices(&tc_bus);