From: Jan-Benedict G. <jb...@us...> - 2005-04-25 10:40:04
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9088 Modified Files: cpu_ka42.c cpu_ka43.c cpu_ka46.c cpu_ka48.c cpu_ka49.c cpu_ka630.c cpu_ka650.c cpu_vxt.c Log Message: - Use is_kaXXX() instead of manual mv comparison. Index: cpu_ka650.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka650.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- cpu_ka650.c 2 Oct 2004 11:42:47 -0000 1.15 +++ cpu_ka650.c 25 Apr 2005 10:39:55 -0000 1.16 @@ -17,7 +17,7 @@ #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/clock.h> /* For clock_init routines */ - + static unsigned int *ka650_cacr = (unsigned int *)0x20084000; static void ka650_pre_vm_init(void) @@ -26,7 +26,7 @@ * Disable the level 1 and level 2 caches. My docs say that the * caches are disabled automatically at power up and when DCOK * is negated when the processor is halted. The firmware BOOT - * command might also do this, but I can't find any docs to + * command might also do this, but I can't find any docs to * prove this. */ __mtpr(0, PR_CADR); @@ -112,9 +112,8 @@ static int __init ka650_platform_device_init(void) { - if (mv != &mv_ka650) { + if (!is_ka650()) return -ENODEV; - } platform_device_register(&ka650_cqbic_device); platform_device_register(&ka650_iprcons_device); Index: cpu_vxt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_vxt.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- cpu_vxt.c 4 Oct 2004 06:51:50 -0000 1.18 +++ cpu_vxt.c 25 Apr 2005 10:39:55 -0000 1.19 @@ -3,9 +3,9 @@ * VXT CPU in the VXT2000 machines. * * From mailing list messages the SID is 14000006 but NetBSD uses 14000008. - * + * * This may work for other ka48 based systems, - * + * * may 2002. It looks as if the 20040058 address is right for prom output. */ @@ -66,12 +66,13 @@ static int __init vxt_platform_device_init (void) { - if (!is_vxt ()) + if (!is_vxt()) return -ENODEV; platform_device_register (&vxt_diag_led_device); return 0; } + arch_initcall (vxt_platform_device_init); Index: cpu_ka630.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka630.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- cpu_ka630.c 2 Oct 2004 11:42:47 -0000 1.12 +++ cpu_ka630.c 25 Apr 2005 10:39:55 -0000 1.13 @@ -14,7 +14,7 @@ #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/clock.h> /* For clock_init routines */ - + static const char *ka630_cpu_type_str(void) { return "KA630"; Index: cpu_ka49.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka49.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cpu_ka49.c 8 Oct 2004 19:40:19 -0000 1.6 +++ cpu_ka49.c 25 Apr 2005 10:39:55 -0000 1.7 @@ -16,7 +16,7 @@ #include <asm/vaxcpu.h> #include <asm/clock.h> /* for clock_init routines */ #include <asm/bus/vsbus.h> - + static void ka49_post_vm_init(void) { int start, slut; @@ -93,11 +93,11 @@ /* * Flush The Pipe (via REI) */ - asm ( - "movpsl -(%sp);" - "movab 1f,-(%sp);" - "rei;" - "1:;"); + __asm__ __volatile__ ( + " movpsl -(%sp) \n" + " movab 1f,-(%sp) \n" + " rei \n" + "1: \n"); /* * Enable Primary Cache @@ -162,7 +162,7 @@ { int retval; - if (mv != &mv_ka49) + if (!is_ka49()) return -ENODEV; platform_device_register (&ka49_diag_led_device); Index: cpu_ka42.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka42.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- cpu_ka42.c 25 Apr 2005 10:30:55 -0000 1.18 +++ cpu_ka42.c 25 Apr 2005 10:39:55 -0000 1.19 @@ -71,9 +71,8 @@ { int retval; - if (mv != &mv_ka42) { + if (!is_ka42()) return -ENODEV; - } platform_device_register(&ka42_diag_led_device); Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- cpu_ka46.c 25 Apr 2005 08:12:56 -0000 1.23 +++ cpu_ka46.c 25 Apr 2005 10:39:55 -0000 1.24 @@ -155,9 +155,8 @@ { int retval; - if (mv != &mv_ka46) { + if (!is_ka46()) return -ENODEV; - } platform_device_register(&ka46_diag_led_device); Index: cpu_ka43.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka43.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- cpu_ka43.c 25 Apr 2005 08:16:15 -0000 1.22 +++ cpu_ka43.c 25 Apr 2005 10:39:55 -0000 1.23 @@ -252,9 +252,8 @@ { int retval; - if (mv != &mv_ka43) { + if (!is_ka43()) return -ENODEV; - } platform_device_register(&ka43_diag_led_device); Index: cpu_ka48.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka48.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- cpu_ka48.c 25 Apr 2005 09:18:48 -0000 1.9 +++ cpu_ka48.c 25 Apr 2005 10:39:55 -0000 1.10 @@ -47,7 +47,7 @@ static void ka48_cache_clear(void) { int *tmp, i; - + /* Clear caches */ tmp = (void *)KA48_INVFLT; /* Inv filter */ for (i = 0; i < KA48_INVFLTSZ / sizeof(int); i++) @@ -78,7 +78,7 @@ __mtpr(PR_ACCS, 2); /* Enable floating points */ } -static void ka48_dma_init(void) +static void ka48_dma_init(void) { int i; unsigned int __iomem *base_addr; @@ -146,9 +146,8 @@ { int retval; - if (mv != &mv_ka48) { + if (!is_ka48()) return -ENODEV; - } retval = platform_device_register(&ka48_vsbus_device); if (!retval) { @@ -157,5 +156,6 @@ return retval; } - + arch_initcall(ka48_platform_device_init); + |