From: Jan-Benedict G. <jb...@us...> - 2005-10-03 13:43:36
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2789 Added Files: cpu_ka41.c cpu_ka52.c cpu_ka62.c Log Message: - Experimental "support", not yet anything fancy... --- NEW FILE: cpu_ka41.c --- /* * Copyright (C) 2005 by Jan-Benedict Glaw <jb...@lu...> * * This file contains generic machine vector handlers for the * KA41 CPU of the MicroVAX 3100. */ #include <linux/types.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/device.h> #include <linux/config.h> #include <asm/mtpr.h> #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/clock.h> #include <asm/bus/vsbus.h> static void ka41_post_vm_init(void) { #ifdef CONFIG_DZ init_dz11_console(0x200A0000, 3); dz_serial_console_init(); #endif } static const char *ka41_cpu_type_str(void) { return "KA41"; } struct vax_mv mv_ka41 = { .post_vm_init = ka41_post_vm_init, .pre_vm_putchar = ka4x_prom_putchar, .pre_vm_getchar = ka4x_prom_getchar, .post_vm_putchar = dz11_putchar, .post_vm_getchar = dz11_getchar, .cpu_type_str = ka41_cpu_type_str, .clock_init = ka4x_clock_init, }; static struct cpu_match __CPU_MATCH cpu_match_ka41 = { .mv = &mv_ka41, .sid_mask = VAX_SID_FAMILY_MASK, .sid_match = VAX_CVAX << VAX_SID_FAMILY_SHIFT, .sidex_addr = CVAX_SIDEX_ADDR, .sidex_mask = CVAX_SIDEX_TYPE_MASK, .sidex_match = CVAX_SIDEX_TYPE_VS3100 << CVAX_SIDEX_TYPE_SHIFT, }; static struct platform_device ka41_vsbus_device = { .name = "ka4x-vsbus" }; static struct platform_device ka41_diag_led_device = { .name = "diag_led" }; static int __init ka41_platform_device_init (void) { int retval; if (!is_ka41 ()) return -ENODEV; platform_device_register (&ka41_diag_led_device); retval = platform_device_register (&ka41_vsbus_device); if (!retval) { #ifdef CONFIG_VSBUS vsbus_add_fixed_device (&ka41_vsbus_device.dev, "lance", 0x200e0000, 5); vsbus_add_fixed_device (&ka41_vsbus_device.dev, "dz", 0x200a0000, 6); /* Register internal SCSI bus */ vsbus_add_fixed_device (&ka41_vsbus_device.dev, "vax-5380-int", 0x200c0080, 1); /* Register external SCSI bus */ vsbus_add_fixed_device (&ka41_vsbus_device.dev, "vax-5380-ext", 0x200c0180, 0); #endif } return retval; } arch_initcall (ka41_platform_device_init); --- NEW FILE: cpu_ka62.c --- /* * Experimental CPU vector for my 6000/320 */ #include <linux/types.h> /* For NULL */ #include <linux/kernel.h> /* For printk */ #include <asm/mtpr.h> #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/clock.h> /* For clock_init routines */ static const char *ka62_cpu_type_str(void) { return "KA62"; } struct vax_mv mv_ka62 = { .pre_vm_putchar = mtpr_putchar, .pre_vm_getchar = mtpr_getchar, .post_vm_putchar = mtpr_putchar, .post_vm_getchar = mtpr_getchar, .cpu_type_str = ka62_cpu_type_str, .clock_init = generic_clock_init, }; static struct cpu_match __CPU_MATCH cpumatch_ka62 = { .mv = &mv_ka62, .sid_mask = 0xffffffff, .sid_match = 0x0a000005, .sidex_addr = 0, }; --- NEW FILE: cpu_ka52.c --- /* * Copyright (C) 2005 by Jan-Benedict Glaw <jb...@lu...> * * This file contains generic machine vector handler for the * KA52 CPU (used in VAXstations 4000 Model 100A) */ #include <linux/types.h> /* For NULL */ #include <linux/kernel.h> /* For printk */ #include <linux/mm.h> #include <linux/config.h> #include <linux/init.h> #include <linux/device.h> #include <asm/mtpr.h> #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/ka46.h> #include <asm/clock.h> /* for clock_init routines */ #include <asm/bus/vsbus.h> /* From bootcons/ */ extern void ka52_prevm_putchar (unsigned char c); extern void ka52_console_init (unsigned long address); extern void ka52_postvm_putchar (unsigned char c); static void ka52_post_vm_init(void) { #if 0 //ka52_console_init (0x20140080); ka52_console_init (0x25000000); #endif #ifdef CONFIG_DZ init_dz11_console(0x25000000, 3); dz_serial_console_init(); #endif } static const char *ka52_cpu_type_str(void) { return "KA52"; } static void ka52_pre_vm_init(void) { //__mtpr(PR_ACCS, 2); /* Enable floating points */ } static void ka52_mcheck (void *stkframe) { return; } struct vax_mv mv_ka52 = { .pre_vm_init = ka52_pre_vm_init, .post_vm_init = ka52_post_vm_init, .pre_vm_putchar = ka52_prevm_putchar, .pre_vm_getchar = ka46_48_49_prom_getchar, .post_vm_putchar = ka46_48_49_prom_putchar /*ka52_postvm_putchar*/, .post_vm_getchar = dz11_getchar, .cpu_type_str = ka52_cpu_type_str, //.clock_init = ka4x_clock_init, .mcheck = ka52_mcheck, .nicr_required = 1, }; static struct cpu_match __CPU_MATCH cpumatch_ka52 = { .mv = &mv_ka52, .sid_mask = VAX_SID_FAMILY_MASK, .sid_match = VAX_NVAX << VAX_SID_FAMILY_SHIFT, .sidex_addr = NVAX_SIDEX_ADDR, .sidex_mask = 0x00000000, .sidex_match = 0x00000000, }; static struct platform_device ka52_vsbus_device = { .name = "ka4x-vsbus" }; static struct platform_device ka52_diag_led_device = { .name = "diag_led" }; static int __init ka52_platform_device_init(void) { int retval; if (!is_ka52 ()) return -ENODEV; platform_device_register (&ka52_diag_led_device); retval = platform_device_register (&ka52_vsbus_device); if (!retval) { #ifdef CONFIG_VSBUS vsbus_add_fixed_device (&ka52_vsbus_device.dev, "lance", 0x200e0000, 1); vsbus_add_fixed_device (&ka52_vsbus_device.dev, "dz", 0x200a0000, 4); #endif } return retval; } arch_initcall (ka52_platform_device_init); |