CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: skrll Date: Sat Jul 9 06:49:03 UTC 2016 Modified Files: src/sys/arch/hpcmips/tx: tx3912video.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hpcmips/tx/tx3912video.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx3912video.c diff -u src/sys/arch/hpcmips/tx/tx3912video.c:1.43 src/sys/arch/hpcmips/tx/tx3912video.c:1.44 --- src/sys/arch/hpcmips/tx/tx3912video.c:1.43 Sat Jun 7 18:59:16 2014 +++ src/sys/arch/hpcmips/tx/tx3912video.c Sat Jul 9 06:49:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: tx3912video.c,v 1.43 2014/06/07 18:59:16 he Exp $ */ +/* $NetBSD: tx3912video.c,v 1.44 2016/07/09 06:49:03 skrll Exp $ */ /*- * Copyright (c) 1999-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tx3912video.c,v 1.43 2014/06/07 18:59:16 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tx3912video.c,v 1.44 2016/07/09 06:49:03 skrll Exp $"); #define TX3912VIDEO_DEBUG @@ -39,11 +39,10 @@ __KERNEL_RCSID(0, "$NetBSD: tx3912video. #include #include +#include #include #include - #include -#include #include
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: christos Date: Sun Sep 21 15:52:43 UTC 2014 Modified Files: src/sys/arch/hpcmips/tx: tx39icu.c Log Message: fix leak. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/hpcmips/tx/tx39icu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx39icu.c diff -u src/sys/arch/hpcmips/tx/tx39icu.c:1.33 src/sys/arch/hpcmips/tx/tx39icu.c:1.34 --- src/sys/arch/hpcmips/tx/tx39icu.c:1.33 Wed Mar 26 13:53:36 2014 +++ src/sys/arch/hpcmips/tx/tx39icu.c Sun Sep 21 11:52:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tx39icu.c,v 1.33 2014/03/26 17:53:36 christos Exp $ */ +/* $NetBSD: tx39icu.c,v 1.34 2014/09/21 15:52:43 christos Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.33 2014/03/26 17:53:36 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.34 2014/09/21 15:52:43 christos Exp $); #include opt_vr41xx.h #include opt_tx39xx.h @@ -634,11 +634,9 @@ tx39_poll_establish(tx_chipset_tag_t tc, s = splhigh(); sc = tc-tc_intrt; - if (!(p = malloc(sizeof(struct txpoll_entry), - M_DEVBUF, M_NOWAIT))) { + if (!(p = malloc(sizeof(*p), M_DEVBUF, M_NOWAIT | M_ZERO))) { panic (tx39_poll_establish: no memory.); } - memset(p, 0, sizeof(struct txpoll_entry)); p-p_fun = ih_fun; p-p_arg = ih_arg; @@ -647,13 +645,13 @@ tx39_poll_establish(tx_chipset_tag_t tc, if (!sc-sc_polling) { tx39clock_alarm_set(tc, 33); /* 33 msec */ - if (!(sc-sc_poll_ih = - tx_intr_establish( - tc, MAKEINTR(5, TX39_INTRSTATUS5_ALARMINT), - IST_EDGE, level, tx39_poll_intr, sc))) { + if (!(sc-sc_poll_ih = tx_intr_establish( + tc, MAKEINTR(5, TX39_INTRSTATUS5_ALARMINT), + IST_EDGE, level, tx39_poll_intr, sc))) { printf(tx39_poll_establish: can't hook\n); splx(s); + free(p, M_DEVBUF); return (0); } }
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: he Date: Sat Jun 7 18:59:16 UTC 2014 Modified Files: src/sys/arch/hpcmips/tx: tx3912video.c Log Message: Remove set-but-not-used variable bit8. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hpcmips/tx/tx3912video.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx3912video.c diff -u src/sys/arch/hpcmips/tx/tx3912video.c:1.42 src/sys/arch/hpcmips/tx/tx3912video.c:1.43 --- src/sys/arch/hpcmips/tx/tx3912video.c:1.42 Sat Oct 27 17:17:54 2012 +++ src/sys/arch/hpcmips/tx/tx3912video.c Sat Jun 7 18:59:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tx3912video.c,v 1.42 2012/10/27 17:17:54 chs Exp $ */ +/* $NetBSD: tx3912video.c,v 1.43 2014/06/07 18:59:16 he Exp $ */ /*- * Copyright (c) 1999-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tx3912video.c,v 1.42 2012/10/27 17:17:54 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: tx3912video.c,v 1.43 2014/06/07 18:59:16 he Exp $); #define TX3912VIDEO_DEBUG @@ -434,7 +434,7 @@ tx3912video_framebuffer_init(struct vide void tx3912video_resolution_init(struct video_chip *chip) { - int h, v, split, bit8, horzval, lineval; + int h, v, split, horzval, lineval; tx_chipset_tag_t tc = chip-vc_v; txreg_t reg; u_int32_t val; @@ -443,8 +443,6 @@ tx3912video_resolution_init(struct video v = chip-vc_fbheight; reg = tx_conf_read(tc, TX3912_VIDEOCTRL1_REG); split = reg TX3912_VIDEOCTRL1_DISPSPLIT; - bit8 = (TX3912_VIDEOCTRL1_BITSEL(reg) == - TX3912_VIDEOCTRL1_BITSEL_8BITCOLOR); val = TX3912_VIDEOCTRL1_BITSEL(reg); if ((val == TX3912_VIDEOCTRL1_BITSEL_8BITCOLOR) !split) {
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: shattered Date: Fri Dec 2 18:07:26 UTC 2011 Modified Files: src/sys/arch/hpcmips/tx: tx39.c Log Message: PR/32394 -- Don't define 'panic' label unconditionally, or minimal mobilepro 780 kernel configuration will not build. OK by wiz@ To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hpcmips/tx/tx39.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx39.c diff -u src/sys/arch/hpcmips/tx/tx39.c:1.43 src/sys/arch/hpcmips/tx/tx39.c:1.44 --- src/sys/arch/hpcmips/tx/tx39.c:1.43 Sat Feb 26 12:07:45 2011 +++ src/sys/arch/hpcmips/tx/tx39.c Fri Dec 2 18:07:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tx39.c,v 1.43 2011/02/26 12:07:45 tsutsui Exp $ */ +/* $NetBSD: tx39.c,v 1.44 2011/12/02 18:07:26 shattered Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tx39.c,v 1.43 2011/02/26 12:07:45 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: tx39.c,v 1.44 2011/12/02 18:07:26 shattered Exp $); #include opt_vr41xx.h #include opt_tx39xx.h @@ -285,7 +285,9 @@ tx_cons_init(void) } return; +#if (NM38813C 0) || (NTC5165BUF 0) panic: +#endif panic(tx_cons_init: can't init console); /* NOTREACHED */ }
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: matt Date: Mon Aug 8 17:45:13 UTC 2011 Modified Files: src/sys/arch/hpcmips/tx: tx39clock.c Log Message: Global inlines are not allowed. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hpcmips/tx/tx39clock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx39clock.c diff -u src/sys/arch/hpcmips/tx/tx39clock.c:1.25 src/sys/arch/hpcmips/tx/tx39clock.c:1.26 --- src/sys/arch/hpcmips/tx/tx39clock.c:1.25 Wed Mar 16 14:43:37 2011 +++ src/sys/arch/hpcmips/tx/tx39clock.c Mon Aug 8 17:45:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tx39clock.c,v 1.25 2011/03/16 14:43:37 tsutsui Exp $ */ +/* $NetBSD: tx39clock.c,v 1.26 2011/08/08 17:45:13 matt Exp $ */ /*- * Copyright (c) 1999-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tx39clock.c,v 1.25 2011/03/16 14:43:37 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: tx39clock.c,v 1.26 2011/08/08 17:45:13 matt Exp $); #include opt_tx39clock_debug.h @@ -92,8 +92,8 @@ void __tx39timer_rtcfreeze(tx_chipset_tag_t); void __tx39timer_rtcreset(tx_chipset_tag_t); -inline void __tx39timer_rtcget(struct txtime *); -inline time_t __tx39timer_rtc2sec(struct txtime *); +void __tx39timer_rtcget(struct txtime *); +time_t __tx39timer_rtc2sec(struct txtime *); uint32_t tx39_timecount(struct timecounter *); CFATTACH_DECL(tx39clock, sizeof(struct tx39clock_softc), @@ -190,7 +190,7 @@ tx_conf_write(tc, TX39_TIMERCONTROL_REG, reg); } -inline void +void __tx39timer_rtcget(struct txtime *t) { tx_chipset_tag_t tc;
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: tsutsui Date: Wed Mar 16 14:39:26 UTC 2011 Modified Files: src/sys/arch/hpcmips/tx: tx39clock.c Log Message: Some KNF. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/tx/tx39clock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx39clock.c diff -u src/sys/arch/hpcmips/tx/tx39clock.c:1.23 src/sys/arch/hpcmips/tx/tx39clock.c:1.24 --- src/sys/arch/hpcmips/tx/tx39clock.c:1.23 Mon Apr 28 20:23:21 2008 +++ src/sys/arch/hpcmips/tx/tx39clock.c Wed Mar 16 14:39:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tx39clock.c,v 1.23 2008/04/28 20:23:21 martin Exp $ */ +/* $NetBSD: tx39clock.c,v 1.24 2011/03/16 14:39:26 tsutsui Exp $ */ /*- * Copyright (c) 1999-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tx39clock.c,v 1.23 2008/04/28 20:23:21 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: tx39clock.c,v 1.24 2011/03/16 14:39:26 tsutsui Exp $); #include opt_tx39clock_debug.h @@ -59,7 +59,7 @@ #define ISSETPRINT(r, m) \ dbg_bitmask_print(r, TX39_CLOCK_EN ## m ## CLK, #m) -void tx39clock_init(struct device *); +void tx39clock_init(device_t); struct platform_clock tx39_clock = { #define CLOCK_RATE 100 @@ -67,8 +67,8 @@ }; struct txtime { - u_int32_t t_hi; - u_int32_t t_lo; + uint32_t t_hi; + uint32_t t_lo; }; struct tx39clock_softc { @@ -103,7 +103,7 @@ tx39clock_match(struct device *parent, struct cfdata *cf, void *aux) { - return (ATTACH_FIRST); + return ATTACH_FIRST; } void @@ -244,7 +244,7 @@ * always be consistent. This is much faster than the routine which * has to get both values, improving the quality. */ - return (tx_conf_read(tc, TX39_TIMERRTCLO_REG)); + return tx_conf_read(tc, TX39_TIMERRTCLO_REG); } void @@ -288,7 +288,7 @@ sc-sc_alarm = TX39_MSEC2RTC(msec); tx39clock_alarm_refill(tc); - return (0); + return 0; } void @@ -296,15 +296,15 @@ { struct tx39clock_softc *sc = tc-tc_clockt; struct txtime t; - u_int64_t mytime; + uint64_t mytime; __tx39timer_rtcget(t); - mytime = ((u_int64_t)t.t_hi 32) | (u_int64_t)t.t_lo; - mytime += (u_int64_t)sc-sc_alarm; + mytime = ((uint64_t)t.t_hi 32) | (uint64_t)t.t_lo; + mytime += (uint64_t)sc-sc_alarm; - t.t_hi = (u_int32_t)((mytime 32) TX39_TIMERALARMHI_MASK); - t.t_lo = (u_int32_t)(mytime 0x); + t.t_hi = (uint32_t)((mytime 32) TX39_TIMERALARMHI_MASK); + t.t_lo = (uint32_t)(mytime 0x); tx_conf_write(tc, TX39_TIMERALARMHI_REG, t.t_hi); tx_conf_write(tc, TX39_TIMERALARMLO_REG, t.t_lo);
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: tsutsui Date: Sat Feb 26 12:09:34 UTC 2011 Modified Files: src/sys/arch/hpcmips/tx: tx39icu.c Log Message: Explicitly include mips/locore.h for softint_process(). To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hpcmips/tx/tx39icu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx39icu.c diff -u src/sys/arch/hpcmips/tx/tx39icu.c:1.28 src/sys/arch/hpcmips/tx/tx39icu.c:1.29 --- src/sys/arch/hpcmips/tx/tx39icu.c:1.28 Sun Feb 20 07:58:14 2011 +++ src/sys/arch/hpcmips/tx/tx39icu.c Sat Feb 26 12:09:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tx39icu.c,v 1.28 2011/02/20 07:58:14 matt Exp $ */ +/* $NetBSD: tx39icu.c,v 1.29 2011/02/26 12:09:34 tsutsui Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.28 2011/02/20 07:58:14 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.29 2011/02/26 12:09:34 tsutsui Exp $); #include opt_vr41xx.h #include opt_tx39xx.h @@ -49,6 +49,7 @@ #include uvm/uvm_extern.h #include mips/cpuregs.h +#include mips/locore.h #include machine/bus.h #include hpcmips/tx/tx39var.h
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: tsutsui Date: Sat Feb 26 12:54:41 UTC 2011 Modified Files: src/sys/arch/hpcmips/tx: tx39icu.c Log Message: Mechanically adapt to new interrupt/spl framework. Untested. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hpcmips/tx/tx39icu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx39icu.c diff -u src/sys/arch/hpcmips/tx/tx39icu.c:1.29 src/sys/arch/hpcmips/tx/tx39icu.c:1.30 --- src/sys/arch/hpcmips/tx/tx39icu.c:1.29 Sat Feb 26 12:09:34 2011 +++ src/sys/arch/hpcmips/tx/tx39icu.c Sat Feb 26 12:54:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tx39icu.c,v 1.29 2011/02/26 12:09:34 tsutsui Exp $ */ +/* $NetBSD: tx39icu.c,v 1.30 2011/02/26 12:54:41 tsutsui Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.29 2011/02/26 12:09:34 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.30 2011/02/26 12:54:41 tsutsui Exp $); #include opt_vr41xx.h #include opt_tx39xx.h @@ -39,6 +39,8 @@ #include opt_tx39icu_debug.h #include opt_tx39_watchdogtimer.h +#define __INTR_PRIVATE + #include sys/param.h #include sys/systm.h #include sys/device.h @@ -49,8 +51,8 @@ #include uvm/uvm_extern.h #include mips/cpuregs.h -#include mips/locore.h #include machine/bus.h +#include machine/intr.h #include hpcmips/tx/tx39var.h #include hpcmips/tx/tx39icureg.h @@ -66,7 +68,7 @@ #else #define TX_INTR cpu_intr /* locore_mips3 directly call this */ #endif -void TX_INTR(u_int32_t, u_int32_t, u_int32_t, u_int32_t); +void TX_INTR(int, vaddr_t, uint32_t); #ifdef TX39ICU_DEBUG #define DPRINTF_ENABLE @@ -74,29 +76,26 @@ #endif #include machine/debug.h -u_int32_t tx39intrvec; +uint32_t tx39intrvec; /* * This is a mask of bits to clear in the SR when we go to a * given interrupt priority level. */ -const u_int32_t __ipl_sr_bits_tx[_IPL_N] = { - 0, /* IPL_NONE */ - - MIPS_SOFT_INT_MASK_0, /* IPL_SOFTCLOCK */ - - MIPS_SOFT_INT_MASK_0| - MIPS_SOFT_INT_MASK_1, /* IPL_SOFTNET */ - - MIPS_SOFT_INT_MASK_0| - MIPS_SOFT_INT_MASK_1| - MIPS_INT_MASK_2| - MIPS_INT_MASK_4, /* IPL_VM */ - - MIPS_SOFT_INT_MASK_0| - MIPS_SOFT_INT_MASK_1| - MIPS_INT_MASK_2| - MIPS_INT_MASK_4, /* IPL_SCHED */ +const struct ipl_sr_map __ipl_sr_map_tx = { +.sr_bits = { + [IPL_NONE] = 0, + [IPL_SOFTCLOCK] = MIPS_SOFT_INT_MASK_0, + [IPL_SOFTNET] = MIPS_SOFT_INT_MASK, + [IPL_VM] = MIPS_SOFT_INT_MASK +| MIPS_INT_MASK_2 +| MIPS_INT_MASK_4, + [IPL_SCHED] = MIPS_SOFT_INT_MASK +| MIPS_INT_MASK_2 +| MIPS_INT_MASK_4, + [IPL_DDB] = MIPS_INT_MASK, + [IPL_HIGH] = MIPS_INT_MASK, + }, }; /* IRQHIGH lines list */ @@ -201,14 +200,13 @@ int tx39icu_match(struct device *, struct cfdata *, void *); void tx39icu_attach(struct device *, struct device *, void *); -int tx39icu_intr(u_int32_t, u_int32_t, u_int32_t, u_int32_t); void tx39_intr_dump(struct tx39icu_softc *); void tx39_intr_decode(int, int *, int *); void tx39_irqhigh_disestablish(tx_chipset_tag_t, int, int, int); void tx39_irqhigh_establish(tx_chipset_tag_t, int, int, int, int (*)(void *), void *); -void tx39_irqhigh_intr(u_int32_t, u_int32_t, u_int32_t, u_int32_t); +void tx39_irqhigh_intr(uint32_t, uint32_t, uint32_t); int tx39_irqhigh(int, int); CFATTACH_DECL(tx39icu, sizeof(struct tx39icu_softc), @@ -306,23 +304,15 @@ } void -TX_INTR(u_int32_t status, u_int32_t cause, vaddr_t pc, u_int32_t ipending) +TX_INTR(int ppl, vaddr_t pc, uint32_t status) { + uint32_t ipending; + int ipl; struct tx39icu_softc *sc; tx_chipset_tag_t tc; - struct cpu_info *ci; txreg_t reg, pend, *regs; int i, j; - ci = curcpu(); - ci-ci_idepth++; - ci-ci_data.cpu_nintr++; - -#ifdef __HAVE_FAST_SOFTINTS - if ((ipending MIPS_HARD_INT_MASK) == 0) - goto softintr; -#endif - tc = tx_conf_get_tag(); sc = tc-tc_intrt; /* @@ -340,89 +330,92 @@ regs[8] = tx_conf_read(tc, TX39_INTRSTATUS8_REG); #endif + while (ppl (ipl = splintr(ipending))) { #ifdef TX39ICU_DEBUG - if (!(ipending MIPS_INT_MASK_4) !(ipending MIPS_INT_MASK_2)) { - dbg_bit_print(ipending); - panic(bogus HwInt); - } - if (tx39icu_debug 1) { - tx39_intr_dump(sc); - } + if (!(ipending MIPS_INT_MASK_4) + !(ipending MIPS_INT_MASK_2)) { + dbg_bit_print(ipending); + panic(bogus HwInt); + } + if (tx39icu_debug 1) { + tx39_intr_dump(sc); + } #endif /* TX39ICU_DEBUG */ - /* IRQHIGH */ - if (ipending MIPS_INT_MASK_4) { - tx39_irqhigh_intr(ipending, pc, status, cause); - -#ifdef __HAVE_FAST_SOFTINTS - goto softintr; -#endif - } + /* IRQHIGH */ + if (ipending MIPS_INT_MASK_4) { + tx39_irqhigh_intr(ipending, pc, status); + } - /* IRQLOW */ - if (ipending MIPS_INT_MASK_2) { - for (i = 1; i = TX39_INTRSET_MAX; i++) { - int ofs; + /* IRQLOW */ + if (ipending
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: uebayasi Date: Mon Nov 15 06:26:58 UTC 2010 Modified Files: src/sys/arch/hpcmips/tx: tx39icu.c Log Message: struct cpu_info * deref needs sys/cpu.h. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hpcmips/tx/tx39icu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx39icu.c diff -u src/sys/arch/hpcmips/tx/tx39icu.c:1.25 src/sys/arch/hpcmips/tx/tx39icu.c:1.26 --- src/sys/arch/hpcmips/tx/tx39icu.c:1.25 Mon Apr 28 20:23:21 2008 +++ src/sys/arch/hpcmips/tx/tx39icu.c Mon Nov 15 06:26:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: tx39icu.c,v 1.25 2008/04/28 20:23:21 martin Exp $ */ +/* $NetBSD: tx39icu.c,v 1.26 2010/11/15 06:26:58 uebayasi Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.25 2008/04/28 20:23:21 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.26 2010/11/15 06:26:58 uebayasi Exp $); #include opt_vr41xx.h #include opt_tx39xx.h @@ -44,6 +44,7 @@ #include sys/device.h #include sys/malloc.h #include sys/queue.h +#include sys/cpu.h #include uvm/uvm_extern.h
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: tsutsui Date: Tue Jul 20 15:03:53 UTC 2010 Modified Files: src/sys/arch/hpcmips/tx: txcom.c Log Message: Replace callout(9) with softint(9) which is more appropriate there. Inspired by PR port-hpcmips/43472 and tested by Risto Sainio. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hpcmips/tx/txcom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/txcom.c diff -u src/sys/arch/hpcmips/tx/txcom.c:1.43 src/sys/arch/hpcmips/tx/txcom.c:1.44 --- src/sys/arch/hpcmips/tx/txcom.c:1.43 Fri Jul 16 15:30:10 2010 +++ src/sys/arch/hpcmips/tx/txcom.c Tue Jul 20 15:03:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: txcom.c,v 1.43 2010/07/16 15:30:10 tsutsui Exp $ */ +/* $NetBSD: txcom.c,v 1.44 2010/07/20 15:03:53 tsutsui Exp $ */ /*- * Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.43 2010/07/16 15:30:10 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.44 2010/07/20 15:03:53 tsutsui Exp $); #include opt_tx39uart_debug.h @@ -99,8 +99,8 @@ struct tty *sc_tty; struct txcom_chip *sc_chip; - struct callout sc_txsoft_ch; - struct callout sc_rxsoft_ch; + void *sc_txsoft_cookie; + void *sc_rxsoft_cookie; u_int8_t *sc_tba; /* transmit buffer address */ int sc_tbc; /* transmit byte count */ @@ -249,10 +249,6 @@ printf(\n); - /* initialize callouts */ - callout_init(sc-sc_txsoft_ch, 0); - callout_init(sc-sc_rxsoft_ch, 0); - /* * Enable interrupt */ @@ -273,6 +269,11 @@ tx_intr_establish(tc, TXCOMINTR(BREAK, slot), IST_EDGE, IPL_TTY, txcom_break_intr, sc); + sc-sc_txsoft_cookie = + softint_establish(SOFTINT_SERIAL, txcom_txsoft, sc); + sc-sc_rxsoft_cookie = + softint_establish(SOFTINT_SERIAL, txcom_rxsoft, sc); + /* * UARTA has external signal line. (its wiring is platform dependent) */ @@ -700,7 +701,7 @@ sc-sc_rbuf[sc-sc_rbput] = c; sc-sc_rbput = (sc-sc_rbput + 1) % TXCOM_RING_MASK; - callout_reset(sc-sc_rxsoft_ch, 1, txcom_rxsoft, sc); + softint_schedule(sc-sc_rxsoft_cookie); return 0; } @@ -749,7 +750,7 @@ sc-sc_tbc--; sc-sc_tba++; } else { - callout_reset(sc-sc_txsoft_ch, 1, txcom_txsoft, sc); + softint_schedule(sc-sc_txsoft_cookie); } return 0;
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: tsutsui Date: Fri Jul 16 15:28:38 UTC 2010 Modified Files: src/sys/arch/hpcmips/tx: txcom.c Log Message: Add missing callout_init(9) calls. PR port-hpcmips/43472 To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/hpcmips/tx/txcom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/txcom.c diff -u src/sys/arch/hpcmips/tx/txcom.c:1.41 src/sys/arch/hpcmips/tx/txcom.c:1.42 --- src/sys/arch/hpcmips/tx/txcom.c:1.41 Sat Mar 14 15:36:07 2009 +++ src/sys/arch/hpcmips/tx/txcom.c Fri Jul 16 15:28:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: txcom.c,v 1.41 2009/03/14 15:36:07 dsl Exp $ */ +/* $NetBSD: txcom.c,v 1.42 2010/07/16 15:28:38 tsutsui Exp $ */ /*- * Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.41 2009/03/14 15:36:07 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.42 2010/07/16 15:28:38 tsutsui Exp $); #include opt_tx39uart_debug.h @@ -249,6 +249,10 @@ printf(\n); + /* initialize callouts */ + callout_init(sc-sc_txsoft_ch, 0); + callout_init(sc-sc_rxsoft_ch, 0); + /* * Enable interrupt */
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: tsutsui Date: Fri Jul 16 15:30:10 UTC 2010 Modified Files: src/sys/arch/hpcmips/tx: txcom.c Log Message: Fix a wrong arg for callout_reset(9) in txcom_txintr(). PR port-hpcmips/43474 To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hpcmips/tx/txcom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/txcom.c diff -u src/sys/arch/hpcmips/tx/txcom.c:1.42 src/sys/arch/hpcmips/tx/txcom.c:1.43 --- src/sys/arch/hpcmips/tx/txcom.c:1.42 Fri Jul 16 15:28:38 2010 +++ src/sys/arch/hpcmips/tx/txcom.c Fri Jul 16 15:30:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: txcom.c,v 1.42 2010/07/16 15:28:38 tsutsui Exp $ */ +/* $NetBSD: txcom.c,v 1.43 2010/07/16 15:30:10 tsutsui Exp $ */ /*- * Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.42 2010/07/16 15:28:38 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: txcom.c,v 1.43 2010/07/16 15:30:10 tsutsui Exp $); #include opt_tx39uart_debug.h @@ -749,7 +749,7 @@ sc-sc_tbc--; sc-sc_tba++; } else { - callout_reset(sc-sc_rxsoft_ch, 1, txcom_txsoft, sc); + callout_reset(sc-sc_txsoft_ch, 1, txcom_txsoft, sc); } return 0;