You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(47) |
Sep
(524) |
Oct
(365) |
Nov
(277) |
Dec
(178) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(431) |
Feb
(340) |
Mar
(249) |
Apr
(678) |
May
(407) |
Jun
(449) |
Jul
(712) |
Aug
(391) |
Sep
(205) |
Oct
(692) |
Nov
(45) |
Dec
(61) |
| 2002 |
Jan
(237) |
Feb
(28) |
Mar
(138) |
Apr
(59) |
May
(75) |
Jun
(65) |
Jul
|
Aug
(26) |
Sep
(3) |
Oct
(294) |
Nov
(193) |
Dec
(121) |
| 2003 |
Jan
(160) |
Feb
(2) |
Mar
(277) |
Apr
(71) |
May
(252) |
Jun
(82) |
Jul
(211) |
Aug
(184) |
Sep
(105) |
Oct
(129) |
Nov
(46) |
Dec
(13) |
| 2004 |
Jan
(37) |
Feb
(113) |
Mar
(115) |
Apr
(115) |
May
(45) |
Jun
(141) |
Jul
(13) |
Aug
(82) |
Sep
(12) |
Oct
(69) |
Nov
|
Dec
(37) |
| 2005 |
Jan
(18) |
Feb
(5) |
Mar
(79) |
Apr
(9) |
May
(47) |
Jun
(60) |
Jul
(10) |
Aug
(89) |
Sep
(28) |
Oct
(65) |
Nov
(54) |
Dec
(23) |
| 2006 |
Jan
(198) |
Feb
(51) |
Mar
(23) |
Apr
|
May
|
Jun
(6) |
Jul
(103) |
Aug
(217) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/linuxsh/linux/drivers/video/voyager In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18693/drivers/video/voyager Modified Files: voyager_alphafb.c voyager_crtcsrfb.c voyager_crtfb.c voyager_gxfb.c voyager_panelcsrfb.c voyager_valphafb.c voyager_videofb.c Log Message: Move voyagergx_reg.h somewhere sensible. Index: voyager_alphafb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/voyager/voyager_alphafb.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- voyager_alphafb.c 8 Feb 2006 22:08:10 -0000 1.2 +++ voyager_alphafb.c 18 Jul 2006 13:30:29 -0000 1.3 @@ -30,7 +30,7 @@ #include <linux/init.h> #include <asm/io.h> #include <asm/irq.h> -#include <asm/mach/voyagergx_reg.h> +#include <asm/voyagergx.h> #include <video/voyager.h> static struct fb_info voyafb_info; Index: voyager_crtcsrfb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/voyager/voyager_crtcsrfb.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- voyager_crtcsrfb.c 8 Feb 2006 22:08:10 -0000 1.2 +++ voyager_crtcsrfb.c 18 Jul 2006 13:30:29 -0000 1.3 @@ -30,7 +30,7 @@ #include <linux/init.h> #include <asm/io.h> #include <asm/irq.h> -#include <asm/mach/voyagergx_reg.h> +#include <asm/voyagergx.h> #include <video/voyager.h> static struct fb_info voyafb_info; Index: voyager_crtfb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/voyager/voyager_crtfb.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- voyager_crtfb.c 8 Feb 2006 22:08:10 -0000 1.2 +++ voyager_crtfb.c 18 Jul 2006 13:30:29 -0000 1.3 @@ -30,7 +30,7 @@ #include <linux/init.h> #include <asm/io.h> #include <asm/irq.h> -#include <asm/mach/voyagergx_reg.h> +#include <asm/voyagergx.h> #include <video/voyager.h> static struct fb_info voyafb_info; Index: voyager_gxfb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/voyager/voyager_gxfb.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- voyager_gxfb.c 8 Feb 2006 22:08:10 -0000 1.4 +++ voyager_gxfb.c 18 Jul 2006 13:30:29 -0000 1.5 @@ -30,7 +30,7 @@ #include <linux/init.h> #include <asm/io.h> #include <asm/irq.h> -#include <asm/mach/voyagergx_reg.h> +#include <asm/voyagergx.h> #include <video/voyager.h> #ifdef CONFIG_FB_VOYAGER_GX_MP Index: voyager_panelcsrfb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/voyager/voyager_panelcsrfb.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- voyager_panelcsrfb.c 8 Feb 2006 22:08:10 -0000 1.2 +++ voyager_panelcsrfb.c 18 Jul 2006 13:30:29 -0000 1.3 @@ -30,7 +30,7 @@ #include <linux/init.h> #include <asm/io.h> #include <asm/irq.h> -#include <asm/mach/voyagergx_reg.h> +#include <asm/voyagergx.h> #include <video/voyager.h> static struct fb_info voyafb_info; Index: voyager_valphafb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/voyager/voyager_valphafb.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- voyager_valphafb.c 8 Feb 2006 22:08:10 -0000 1.2 +++ voyager_valphafb.c 18 Jul 2006 13:30:29 -0000 1.3 @@ -30,7 +30,7 @@ #include <linux/init.h> #include <asm/io.h> #include <asm/irq.h> -#include <asm/mach/voyagergx_reg.h> +#include <asm/voyagergx.h> #include <video/voyager.h> static struct fb_info voyafb_info; Index: voyager_videofb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/voyager/voyager_videofb.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- voyager_videofb.c 8 Feb 2006 22:08:10 -0000 1.2 +++ voyager_videofb.c 18 Jul 2006 13:30:29 -0000 1.3 @@ -30,7 +30,7 @@ #include <linux/init.h> #include <asm/io.h> #include <asm/irq.h> -#include <asm/mach/voyagergx_reg.h> +#include <asm/voyagergx.h> #include <video/voyager.h> static struct fb_info voyafb_info; |
|
From: Paul M. <le...@us...> - 2006-07-12 10:54:11
|
Update of /cvsroot/linuxsh/linux/arch/sh In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27520/arch/sh Modified Files: Kconfig Log Message: Make FPU emulation depend on CONFIG_EXPERIMENTAL for now. Index: Kconfig =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/Kconfig,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- Kconfig 12 Jul 2006 10:35:55 -0000 1.99 +++ Kconfig 12 Jul 2006 10:54:07 -0000 1.100 @@ -341,7 +341,7 @@ config SH_FPU_EMU bool "FPU emulation support" - depends on !SH_FPU + depends on !SH_FPU && EXPERIMENTAL default n help Selecting this option will enable support for software FPU emulation. |
|
From: Paul M. <le...@us...> - 2006-07-12 10:36:00
|
Update of /cvsroot/linuxsh/linux/arch/sh In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19677/arch/sh Modified Files: Kconfig Makefile Log Message: First attempt at FPU emulation support, patch from Takashi YOSHII <tak...@op...>. Index: Kconfig =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/Kconfig,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- Kconfig 6 Jul 2006 08:19:31 -0000 1.98 +++ Kconfig 12 Jul 2006 10:35:55 -0000 1.99 @@ -339,6 +339,15 @@ This option must be set in order to enable the FPU. +config SH_FPU_EMU + bool "FPU emulation support" + depends on !SH_FPU + default n + help + Selecting this option will enable support for software FPU emulation. + Most SH-3 users will want to say Y here, whereas most SH-4 users will + want to say N. + config SH_DSP bool "DSP support" depends on !CPU_SH4 Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/Makefile,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- Makefile 5 Jul 2006 08:46:48 -0000 1.64 +++ Makefile 12 Jul 2006 10:35:55 -0000 1.65 @@ -79,6 +79,7 @@ LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) core-y += arch/sh/kernel/ arch/sh/mm/ +core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ # Boards machdir-$(CONFIG_SH_SOLUTION_ENGINE) := se/770x |
|
From: Paul M. <le...@us...> - 2006-07-12 10:35:59
|
Update of /cvsroot/linuxsh/linux/arch/sh/math-emu In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19677/arch/sh/math-emu Added Files: Makefile math.c sfp-util.h Log Message: First attempt at FPU emulation support, patch from Takashi YOSHII <tak...@op...>. --- NEW FILE: Makefile --- obj-y := math.o --- NEW FILE: math.c --- /* * arch/sh/math-emu/math.c * * Copyright (C) 2006 Takashi YOSHII <tak...@op...> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #include <linux/config.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/types.h> #include <linux/sched.h> #include <linux/signal.h> #include <asm/system.h> #include <asm/uaccess.h> #include <asm/processor.h> #include <asm/io.h> #include "sfp-util.h" #include <math-emu/soft-fp.h> #include <math-emu/single.h> #include <math-emu/double.h> #define FPUL (fregs->fpul) #define FPSCR (fregs->fpscr) #define FPSCR_RM (FPSCR&3) #define FPSCR_DN ((FPSCR>>18)&1) #define FPSCR_PR ((FPSCR>>19)&1) #define FPSCR_SZ ((FPSCR>>20)&1) #define FPSCR_FR ((FPSCR>>21)&1) #define FPSCR_MASK 0x003fffffUL #define BANK(n) (n^(FPSCR_FR?16:0)) #define FR ((unsigned long*)(fregs->fp_regs)) #define FR0 (FR[BANK(0)]) #define FRn (FR[BANK(n)]) #define FRm (FR[BANK(m)]) #define DR ((unsigned long long*)(fregs->fp_regs)) #define DRn (DR[BANK(n)/2]) #define DRm (DR[BANK(m)/2]) #define XREG(n) (n^16) #define XFn (FR[BANK(XREG(n))]) #define XFm (FR[BANK(XREG(m))]) #define XDn (DR[BANK(XREG(n))/2]) #define XDm (DR[BANK(XREG(m))/2]) #define R0 (regs->regs[0]) #define Rn (regs->regs[n]) #define Rm (regs->regs[m]) #define WRITE(d,a) ({if(put_user(d, (typeof (d)*)a)) return -EFAULT;}) #define READ(d,a) ({if(get_user(d, (typeof (d)*)a)) return -EFAULT;}) #define PACK_S(r,f) FP_PACK_SP(&r,f) #define UNPACK_S(f,r) FP_UNPACK_SP(f,&r) #define PACK_D(r,f) \ {u32 t[2]; FP_PACK_DP(t,f); ((u32*)&r)[0]=t[1]; ((u32*)&r)[1]=t[0];} #define UNPACK_D(f,r) \ {u32 t[2]; t[0]=((u32*)&r)[1]; t[1]=((u32*)&r)[0]; FP_UNPACK_DP(f,t);} // 2 args instructions. #define BOTH_PRmn(op,x) \ FP_DECL_EX; if(FPSCR_PR) op(D,x,DRm,DRn); else op(S,x,FRm,FRn); #define CMP_X(SZ,R,M,N) do{ \ FP_DECL_##SZ(Fm); FP_DECL_##SZ(Fn); \ UNPACK_##SZ(Fm, M); UNPACK_##SZ(Fn, N); \ FP_CMP_##SZ(R, Fn, Fm, 2); }while(0) #define EQ_X(SZ,R,M,N) do{ \ FP_DECL_##SZ(Fm); FP_DECL_##SZ(Fn); \ UNPACK_##SZ(Fm, M); UNPACK_##SZ(Fn, N); \ FP_CMP_EQ_##SZ(R, Fn, Fm); }while(0) #define CMP(OP) ({ int r; BOTH_PRmn(OP##_X,r); r; }) static int fcmp_gt(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { if (CMP(CMP) > 0) regs->sr |= 1; else regs->sr &= ~1; return 0; } static int fcmp_eq(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { if (CMP(CMP /*EQ*/) == 0) regs->sr |= 1; else regs->sr &= ~1; return 0; } #define ARITH_X(SZ,OP,M,N) do{ \ FP_DECL_##SZ(Fm); FP_DECL_##SZ(Fn); FP_DECL_##SZ(Fr); \ UNPACK_##SZ(Fm, M); UNPACK_##SZ(Fn, N); \ FP_##OP##_##SZ(Fr, Fn, Fm); \ PACK_##SZ(N, Fr); }while(0) static int fadd(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { BOTH_PRmn(ARITH_X, ADD); return 0; } static int fsub(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { BOTH_PRmn(ARITH_X, SUB); return 0; } static int fmul(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { BOTH_PRmn(ARITH_X, MUL); return 0; } static int fdiv(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { BOTH_PRmn(ARITH_X, DIV); return 0; } static int fmac(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { FP_DECL_EX; FP_DECL_S(Fr); FP_DECL_S(Ft); FP_DECL_S(F0); FP_DECL_S(Fm); FP_DECL_S(Fn); UNPACK_S(F0, FR0); UNPACK_S(Fm, FRm); UNPACK_S(Fn, FRn); FP_MUL_S(Ft, Fm, F0); FP_ADD_S(Fr, Fn, Ft); PACK_S(FRn, Fr); return 0; } // to process fmov's extention (odd n for DR access XD). #define FMOV_EXT(x) if(x&1) x+=16-1 static int fmov_idx_reg(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { if (FPSCR_SZ) { FMOV_EXT(n); READ(FRn, Rm + R0 + 4); n++; READ(FRn, Rm + R0); } else { READ(FRn, Rm + R0); } return 0; } static int fmov_mem_reg(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { if (FPSCR_SZ) { FMOV_EXT(n); READ(FRn, Rm + 4); n++; READ(FRn, Rm); } else { READ(FRn, Rm); } return 0; } static int fmov_inc_reg(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { if (FPSCR_SZ) { FMOV_EXT(n); READ(FRn, Rm + 4); n++; READ(FRn, Rm); Rm += 8; } else { READ(FRn, Rm); Rm += 4; } return 0; } static int fmov_reg_idx(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { if (FPSCR_SZ) { FMOV_EXT(m); WRITE(FRm, Rn + R0 + 4); m++; WRITE(FRm, Rn + R0); } else { WRITE(FRm, Rn + R0); } return 0; } static int fmov_reg_mem(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { if (FPSCR_SZ) { FMOV_EXT(m); WRITE(FRm, Rn + 4); m++; WRITE(FRm, Rn); } else { WRITE(FRm, Rn); } return 0; } static int fmov_reg_dec(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { if (FPSCR_SZ) { FMOV_EXT(m); Rn -= 8; WRITE(FRm, Rn + 4); m++; WRITE(FRm, Rn); } else { Rn -= 4; WRITE(FRm, Rn); } return 0; } static int fmov_reg_reg(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { if (FPSCR_SZ) { FMOV_EXT(m); FMOV_EXT(n); DRn = DRm; } else { FRn = FRm; } return 0; } static int fnop_mn(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { return -EINVAL; } // 1 arg instructions. #define NOTYETn(i) static int i(struct sh_fpu_soft_struct *fregs, int n) \ { printk( #i " not yet done.\n"); return 0; } NOTYETn(ftrv) NOTYETn(fsqrt) NOTYETn(fipr) NOTYETn(fsca) NOTYETn(fsrra) #define EMU_FLOAT_X(SZ,N) do { \ FP_DECL_##SZ(Fn); \ FP_FROM_INT_##SZ(Fn, FPUL, 32, int); \ PACK_##SZ(N, Fn); }while(0) static int ffloat(struct sh_fpu_soft_struct *fregs, int n) { FP_DECL_EX; if (FPSCR_PR) EMU_FLOAT_X(D, DRn); else EMU_FLOAT_X(S, FRn); return 0; } #define EMU_FTRC_X(SZ,N) do { \ FP_DECL_##SZ(Fn); \ UNPACK_##SZ(Fn, N); \ FP_TO_INT_##SZ(FPUL, Fn, 32, 1); }while(0) static int ftrc(struct sh_fpu_soft_struct *fregs, int n) { FP_DECL_EX; if (FPSCR_PR) EMU_FTRC_X(D, DRn); else EMU_FTRC_X(S, FRn); return 0; } static int fcnvsd(struct sh_fpu_soft_struct *fregs, int n) { FP_DECL_EX; FP_DECL_S(Fn); FP_DECL_D(Fr); UNPACK_S(Fn, FPUL); FP_CONV(D, S, 2, 1, Fr, Fn); PACK_D(DRn, Fr); return 0; } static int fcnvds(struct sh_fpu_soft_struct *fregs, int n) { FP_DECL_EX; FP_DECL_D(Fn); FP_DECL_S(Fr); UNPACK_D(Fn, DRn); FP_CONV(S, D, 1, 2, Fr, Fn); PACK_S(FPUL, Fr); return 0; } static int fxchg(struct sh_fpu_soft_struct *fregs, int flag) { FPSCR ^= flag; return 0; } static int fsts(struct sh_fpu_soft_struct *fregs, int n) { FRn = FPUL; return 0; } static int flds(struct sh_fpu_soft_struct *fregs, int n) { FPUL = FRn; return 0; } static int fneg(struct sh_fpu_soft_struct *fregs, int n) { FRn ^= (1 << (_FP_W_TYPE_SIZE - 1)); return 0; } static int fabs(struct sh_fpu_soft_struct *fregs, int n) { FRn &= ~(1 << (_FP_W_TYPE_SIZE - 1)); return 0; } static int fld0(struct sh_fpu_soft_struct *fregs, int n) { FRn = 0; return 0; } static int fld1(struct sh_fpu_soft_struct *fregs, int n) { FRn = (_FP_EXPBIAS_S << (_FP_FRACBITS_S - 1)); return 0; } static int fnop_n(struct sh_fpu_soft_struct *fregs, int n) { return -EINVAL; } /// Instruction decoders. static int id_fxfd(struct sh_fpu_soft_struct *, int); static int id_fnxd(struct sh_fpu_soft_struct *, struct pt_regs *, int, int); static int (*fnxd[])(struct sh_fpu_soft_struct *, int) = { fsts, flds, ffloat, ftrc, fneg, fabs, fsqrt, fsrra, fld0, fld1, fcnvsd, fcnvds, fnop_n, fnop_n, fipr, id_fxfd }; static int (*fnmx[])(struct sh_fpu_soft_struct *, struct pt_regs *, int, int) = { fadd, fsub, fmul, fdiv, fcmp_eq, fcmp_gt, fmov_idx_reg, fmov_reg_idx, fmov_mem_reg, fmov_inc_reg, fmov_reg_mem, fmov_reg_dec, fmov_reg_reg, id_fnxd, fmac, fnop_mn}; static int id_fxfd(struct sh_fpu_soft_struct *fregs, int x) { const int flag[] = { FPSCR_SZ, FPSCR_PR, FPSCR_FR, 0 }; switch (x & 3) { case 3: fxchg(fregs, flag[x >> 2]); break; case 1: ftrv(fregs, x - 1); break; default: fsca(fregs, x); } return 0; } static int id_fnxd(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int x, int n) { return (fnxd[x])(fregs, n); } static int id_fnmx(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, u16 code) { int n = (code >> 8) & 0xf, m = (code >> 4) & 0xf, x = code & 0xf; return (fnmx[x])(fregs, regs, m, n); } static int id_sys(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, u16 code) { int n = ((code >> 8) & 0xf); unsigned long *reg = (code & 0x0010) ? &FPUL : &FPSCR; switch (code & 0xf0ff) { case 0x005a: case 0x006a: Rn = *reg; break; case 0x405a: case 0x406a: *reg = Rn; break; case 0x4052: case 0x4062: Rn -= 4; WRITE(*reg, Rn); break; case 0x4056: case 0x4066: READ(*reg, Rn); Rn += 4; break; default: return -EINVAL; } return 0; } static int fpu_emulate(u16 code, struct sh_fpu_soft_struct *fregs, struct pt_regs *regs) { if ((code & 0xf000) == 0xf000) return id_fnmx(fregs, regs, code); else return id_sys(fregs, regs, code); } /** * denormal_to_double - Given denormalized float number, * store double float * * @fpu: Pointer to sh_fpu_hard structure * @n: Index to FP register */ static void denormal_to_double(struct sh_fpu_hard_struct *fpu, int n) { unsigned long du, dl; unsigned long x = fpu->fpul; int exp = 1023 - 126; if (x != 0 && (x & 0x7f800000) == 0) { du = (x & 0x80000000); while ((x & 0x00800000) == 0) { x <<= 1; exp--; } x &= 0x007fffff; du |= (exp << 20) | (x >> 3); dl = x << 29; fpu->fp_regs[n] = du; fpu->fp_regs[n+1] = dl; } } /** * ieee_fpe_handler - Handle denormalized number exception * * @regs: Pointer to register structure * * Returns 1 when it's handled (should not cause exception). */ static int ieee_fpe_handler(struct pt_regs *regs) { unsigned short insn = *(unsigned short *)regs->pc; unsigned short finsn; unsigned long nextpc; int nib[4] = { (insn >> 12) & 0xf, (insn >> 8) & 0xf, (insn >> 4) & 0xf, insn & 0xf}; if (nib[0] == 0xb || (nib[0] == 0x4 && nib[2] == 0x0 && nib[3] == 0xb)) /* bsr & jsr */ regs->pr = regs->pc + 4; if (nib[0] == 0xa || nib[0] == 0xb) { /* bra & bsr */ nextpc = regs->pc + 4 + ((short) ((insn & 0xfff) << 4) >> 3); finsn = *(unsigned short *) (regs->pc + 2); } else if (nib[0] == 0x8 && nib[1] == 0xd) { /* bt/s */ if (regs->sr & 1) nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); else nextpc = regs->pc + 4; finsn = *(unsigned short *) (regs->pc + 2); } else if (nib[0] == 0x8 && nib[1] == 0xf) { /* bf/s */ if (regs->sr & 1) nextpc = regs->pc + 4; else nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); finsn = *(unsigned short *) (regs->pc + 2); } else if (nib[0] == 0x4 && nib[3] == 0xb && (nib[2] == 0x0 || nib[2] == 0x2)) { /* jmp & jsr */ nextpc = regs->regs[nib[1]]; finsn = *(unsigned short *) (regs->pc + 2); } else if (nib[0] == 0x0 && nib[3] == 0x3 && (nib[2] == 0x0 || nib[2] == 0x2)) { /* braf & bsrf */ nextpc = regs->pc + 4 + regs->regs[nib[1]]; finsn = *(unsigned short *) (regs->pc + 2); } else if (insn == 0x000b) { /* rts */ nextpc = regs->pr; finsn = *(unsigned short *) (regs->pc + 2); } else { nextpc = regs->pc + 2; finsn = insn; } if ((finsn & 0xf1ff) == 0xf0ad) { /* fcnvsd */ struct task_struct *tsk = current; if ((tsk->thread.fpu.hard.fpscr & (1 << 17))) { /* FPU error */ denormal_to_double (&tsk->thread.fpu.hard, (finsn >> 8) & 0xf); tsk->thread.fpu.hard.fpscr &= ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); set_tsk_thread_flag(tsk, TIF_USEDFPU); } else { tsk->thread.trap_no = 11; tsk->thread.error_code = 0; force_sig(SIGFPE, tsk); } regs->pc = nextpc; return 1; } return 0; } asmlinkage void do_fpu_error(unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, struct pt_regs regs) { struct task_struct *tsk = current; if (ieee_fpe_handler (®s)) return; regs.pc += 2; tsk->thread.trap_no = 11; tsk->thread.error_code = 0; force_sig(SIGFPE, tsk); } /** * fpu_init - Initialize FPU registers * @fpu: Pointer to software emulated FPU registers. */ static void fpu_init(struct sh_fpu_soft_struct *fpu) { int i; fpu->fpscr = FPSCR_INIT; fpu->fpul = 0; for (i = 0; i < 16; i++) { fpu->fp_regs[i] = 0; fpu->xfp_regs[i]= 0; } } /** * do_fpu_inst - Handle reserved instructions for FPU emulation * @inst: instruction code. * @regs: registers on stack. */ int do_fpu_inst(unsigned short inst, struct pt_regs *regs) { struct task_struct *tsk = current; struct sh_fpu_soft_struct *fpu = &(tsk->thread.fpu.soft); if (!test_tsk_thread_flag(tsk, TIF_USEDFPU)) { /* initialize once. */ fpu_init(fpu); set_tsk_thread_flag(tsk, TIF_USEDFPU); } return fpu_emulate(inst, fpu, regs); } --- NEW FILE: sfp-util.h --- /* * These are copied from glibc/stdlib/longlong.h */ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ do { \ UWtype __x; \ __x = (al) + (bl); \ (sh) = (ah) + (bh) + (__x < (al)); \ (sl) = __x; \ } while (0) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ do { \ UWtype __x; \ __x = (al) - (bl); \ (sh) = (ah) - (bh) - (__x > (al)); \ (sl) = __x; \ } while (0) #define umul_ppmm(w1, w0, u, v) \ __asm__ ("dmulu.l %2,%3\n\tsts macl,%1\n\tsts mach,%0" \ : "=r" ((u32)(w1)), "=r" ((u32)(w0)) \ : "r" ((u32)(u)), "r" ((u32)(v)) \ : "macl", "mach") #define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2)) #define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1)) #define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2)) #define udiv_qrnnd(q, r, n1, n0, d) \ do { \ UWtype __d1, __d0, __q1, __q0; \ UWtype __r1, __r0, __m; \ __d1 = __ll_highpart (d); \ __d0 = __ll_lowpart (d); \ \ __r1 = (n1) % __d1; \ __q1 = (n1) / __d1; \ __m = (UWtype) __q1 * __d0; \ __r1 = __r1 * __ll_B | __ll_highpart (n0); \ if (__r1 < __m) \ { \ __q1--, __r1 += (d); \ if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\ if (__r1 < __m) \ __q1--, __r1 += (d); \ } \ __r1 -= __m; \ \ __r0 = __r1 % __d1; \ __q0 = __r1 / __d1; \ __m = (UWtype) __q0 * __d0; \ __r0 = __r0 * __ll_B | __ll_lowpart (n0); \ if (__r0 < __m) \ { \ __q0--, __r0 += (d); \ if (__r0 >= (d)) \ if (__r0 < __m) \ __q0--, __r0 += (d); \ } \ __r0 -= __m; \ \ (q) = (UWtype) __q1 * __ll_B | __q0; \ (r) = __r0; \ } while (0) #define abort() return 0 #define __BYTE_ORDER __LITTLE_ENDIAN |
|
From: Paul M. <le...@us...> - 2006-07-12 10:35:59
|
Update of /cvsroot/linuxsh/linux/arch/sh/kernel In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19677/arch/sh/kernel Modified Files: traps.c Log Message: First attempt at FPU emulation support, patch from Takashi YOSHII <tak...@op...>. Index: traps.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/traps.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- traps.c 17 Mar 2005 07:40:19 -0000 1.20 +++ traps.c 12 Jul 2006 10:35:55 -0000 1.21 @@ -37,40 +37,15 @@ #ifdef CONFIG_SH_KGDB #include <asm/kgdb.h> -#define CHK_REMOTE_DEBUG(regs) \ -{ \ - if ((kgdb_debug_hook != (kgdb_debug_hook_t *) NULL) && (!user_mode(regs))) \ - { \ - (*kgdb_debug_hook)(regs); \ - } \ +#define CHK_REMOTE_DEBUG(regs) \ +{ \ + if (kgdb_debug_hook && !user_mode(regs))\ + (*kgdb_debug_hook)(regs); \ } #else #define CHK_REMOTE_DEBUG(regs) #endif -#define DO_ERROR(trapnr, signr, str, name, tsk) \ -asmlinkage void do_##name(unsigned long r4, unsigned long r5, \ - unsigned long r6, unsigned long r7, \ - struct pt_regs regs) \ -{ \ - unsigned long error_code; \ - \ - /* Check if it's a DSP instruction */ \ - if (is_dsp_inst(®s)) { \ - /* Enable DSP mode, and restart instruction. */ \ - regs.sr |= SR_DSP; \ - return; \ - } \ - \ - asm volatile("stc r2_bank, %0": "=r" (error_code)); \ - local_irq_enable(); \ - tsk->thread.error_code = error_code; \ - tsk->thread.trap_no = trapnr; \ - CHK_REMOTE_DEBUG(®s); \ - force_sig(signr, tsk); \ - die_if_no_fixup(str,®s,error_code); \ -} - #ifdef CONFIG_CPU_SH2 #define TRAP_RESERVED_INST 4 #define TRAP_ILLEGAL_SLOT_INST 6 @@ -576,8 +551,117 @@ #define is_dsp_inst(regs) (0) #endif /* CONFIG_SH_DSP */ -DO_ERROR(TRAP_RESERVED_INST, SIGILL, "reserved instruction", reserved_inst, current) -DO_ERROR(TRAP_ILLEGAL_SLOT_INST, SIGILL, "illegal slot instruction", illegal_slot_inst, current) +extern int do_fpu_inst(unsigned short, struct pt_regs*); + +asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7, + struct pt_regs regs) +{ + unsigned long error_code; + struct task_struct *tsk = current; + +#ifdef CONFIG_SH_FPU_EMU + unsigned short inst; + int err; + + get_user(inst, (unsigned short*)regs.pc); + + err = do_fpu_inst(inst, ®s); + if (!err) { + regs.pc += 2; + return; + } + /* not a FPU inst. */ +#endif + +#ifdef CONFIG_SH_DSP + /* Check if it's a DSP instruction */ + if (is_dsp_inst(®s)) { + /* Enable DSP mode, and restart instruction. */ + regs.sr |= SR_DSP; + return; + } +#endif + + asm volatile("stc r2_bank, %0": "=r" (error_code)); + local_irq_enable(); + tsk->thread.error_code = error_code; + tsk->thread.trap_no = TRAP_RESERVED_INST; + CHK_REMOTE_DEBUG(®s); + force_sig(SIGILL, tsk); + die_if_no_fixup("reserved instruction", ®s, error_code); +} + +#ifdef CONFIG_SH_FPU_EMU +static int emulate_branch(unsigned short inst, struct pt_regs* regs) +{ + /* + * bfs: 8fxx: PC+=d*2+4; + * bts: 8dxx: PC+=d*2+4; + * bra: axxx: PC+=D*2+4; + * bsr: bxxx: PC+=D*2+4 after PR=PC+4; + * braf:0x23: PC+=Rn*2+4; + * bsrf:0x03: PC+=Rn*2+4 after PR=PC+4; + * jmp: 4x2b: PC=Rn; + * jsr: 4x0b: PC=Rn after PR=PC+4; + * rts: 000b: PC=PR; + */ + if ((inst & 0xfd00) == 0x8d00) { + regs->pc += SH_PC_8BIT_OFFSET(inst); + return 0; + } + + if ((inst & 0xe000) == 0xa000) { + regs->pc += SH_PC_12BIT_OFFSET(inst); + return 0; + } + + if ((inst & 0xf0df) == 0x0003) { + regs->pc += regs->regs[(inst & 0x0f00) >> 8] + 4; + return 0; + } + + if ((inst & 0xf0df) == 0x400b) { + regs->pc = regs->regs[(inst & 0x0f00) >> 8]; + return 0; + } + + if ((inst & 0xffff) == 0x000b) { + regs->pc = regs->pr; + return 0; + } + + return 1; +} +#endif + +asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7, + struct pt_regs regs) +{ + unsigned long error_code; + struct task_struct *tsk = current; +#ifdef CONFIG_SH_FPU_EMU + unsigned short inst; + + get_user(inst, (unsigned short *)regs.pc + 1); + if (!do_fpu_inst(inst, ®s)) { + get_user(inst, (unsigned short *)regs.pc); + if (!emulate_branch(inst, ®s)) + return; + /* fault in branch.*/ + } + /* not a FPU inst. */ +#endif + + asm volatile("stc r2_bank, %0": "=r" (error_code)); + local_irq_enable(); + tsk->thread.error_code = error_code; + tsk->thread.trap_no = TRAP_RESERVED_INST; + CHK_REMOTE_DEBUG(®s); + force_sig(SIGILL, tsk); + die_if_no_fixup("illegal slot instruction", ®s, error_code); +} asmlinkage void do_exception_error(unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, @@ -635,14 +719,16 @@ exception_handling_table[TRAP_ILLEGAL_SLOT_INST] = (void *)do_illegal_slot_inst; -#ifdef CONFIG_CPU_SH4 - if (!(cpu_data->flags & CPU_HAS_FPU)) { - /* For SH-4 lacking an FPU, treat floating point instructions - as reserved. */ - /* entry 64 corresponds to EXPEVT=0x800 */ - exception_handling_table[64] = (void *)do_reserved_inst; - exception_handling_table[65] = (void *)do_illegal_slot_inst; - } +#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_FPU) || \ + defined(CONFIG_SH_FPU_EMU) + /* + * For SH-4 lacking an FPU, treat floating point instructions as + * reserved. They'll be handled in the math-emu case, or faulted on + * otherwise. + */ + /* entry 64 corresponds to EXPEVT=0x800 */ + exception_handling_table[64] = (void *)do_reserved_inst; + exception_handling_table[65] = (void *)do_illegal_slot_inst; #endif /* Setup VBR for boot cpu */ |
|
From: Paul M. <le...@us...> - 2006-07-12 10:35:59
|
Update of /cvsroot/linuxsh/linux/include/asm-sh In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19677/include/asm-sh Added Files: sfp-machine.h Log Message: First attempt at FPU emulation support, patch from Takashi YOSHII <tak...@op...>. --- NEW FILE: sfp-machine.h --- /* Machine-dependent software floating-point definitions. SuperH kernel version. Copyright (C) 1997,1998,1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rt...@cy...), Jakub Jelinek (jj...@ul...), David S. Miller (da...@re...) and Peter Maydell (pma...@ch...). The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _SFP_MACHINE_H #define _SFP_MACHINE_H #include <linux/config.h> #define _FP_W_TYPE_SIZE 32 #define _FP_W_TYPE unsigned long #define _FP_WS_TYPE signed long #define _FP_I_TYPE long #define _FP_MUL_MEAT_S(R,X,Y) \ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) #define _FP_MUL_MEAT_D(R,X,Y) \ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) #define _FP_MUL_MEAT_Q(R,X,Y) \ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) #define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_udiv(S,R,X,Y) #define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) #define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) #define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) #define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 #define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 #define _FP_NANSIGN_S 0 #define _FP_NANSIGN_D 0 #define _FP_NANSIGN_Q 0 #define _FP_KEEPNANFRACP 1 /* * If one NaN is signaling and the other is not, * we choose that one, otherwise we choose X. */ #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ do { \ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \ { \ R##_s = Y##_s; \ _FP_FRAC_COPY_##wc(R,Y); \ } \ else \ { \ R##_s = X##_s; \ _FP_FRAC_COPY_##wc(R,X); \ } \ R##_c = FP_CLS_NAN; \ } while (0) //#define FP_ROUNDMODE FPSCR_RM #define FP_DENORM_ZERO 1/*FPSCR_DN*/ /* Exception flags. */ #define FP_EX_INVALID (1<<4) #define FP_EX_DIVZERO (1<<3) #define FP_EX_OVERFLOW (1<<2) #define FP_EX_UNDERFLOW (1<<1) #define FP_EX_INEXACT (1<<0) #endif |
|
From: Paul M. <le...@us...> - 2006-07-12 10:34:02
|
Update of /cvsroot/linuxsh/linux/arch/sh/math-emu In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18680/arch/sh/math-emu Log Message: Directory /cvsroot/linuxsh/linux/arch/sh/math-emu added to the repository |
|
From: Adrian M. <zx8...@us...> - 2006-07-11 21:29:13
|
Update of /cvsroot/linuxsh/linux/sound/sh In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19762/sound/sh Modified Files: aica.c aica.h Log Message: updated aica header file Index: aica.c =================================================================== RCS file: /cvsroot/linuxsh/linux/sound/sh/aica.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- aica.c 8 Jul 2006 22:08:28 -0000 1.4 +++ aica.c 11 Jul 2006 21:29:09 -0000 1.5 @@ -42,7 +42,6 @@ #include <sound/info.h> #include <asm/io.h> #include <asm/dma.h> -#include <asm/dreamcast/sysasic.h> #include "aica.h" MODULE_AUTHOR("Adrian McMenamin <ad...@mc...>"); @@ -50,6 +49,54 @@ MODULE_LICENSE("GPL"); MODULE_SUPPORTED_DEVICE("{{Yamaha/SEGA, AICA}}"); +/* Command values */ +#define AICA_CMD_KICK 0x80000000 +#define AICA_CMD_NONE 0 +#define AICA_CMD_START 1 +#define AICA_CMD_STOP 2 +#define AICA_CMD_VOL 3 + +/* Sound modes */ +#define SM_8BIT 1 +#define SM_16BIT 0 +#define SM_ADPCM 2 + +/* Buffer and period size */ +#define AICA_BUFFER_SIZE 0x8000 +#define AICA_PERIOD_SIZE 0x800 +#define AICA_PERIOD_NUMBER 16 + +#define AICA_CHANNEL0_OFFSET 0x11000 +#define AICA_CHANNEL1_OFFSET 0x21000 +#define CHANNEL_OFFSET 0x10000 + +#define AICA_DMA_CHANNEL 0 +#define AICA_DMA_MODE 5 + +#define SND_AICA_DRIVER "AICA" + +struct aica_channel { + uint32_t cmd; /* Command ID */ + uint32_t pos; /* Sample position */ + uint32_t length; /* Sample length */ + uint32_t freq; /* Frequency */ + uint32_t vol; /* Volume 0-255 */ + uint32_t pan; /* Pan 0-255 */ + uint32_t sfmt; /* Sound format */ + uint32_t flags; /* Bit flags */ +}; + +struct snd_card_aica { + struct snd_card *card; + struct aica_channel *channel; + snd_pcm_substream_t *substream; + int clicks; + int current_period; + struct timer_list timer; + int master_volume; + int dma_started; +}; + /* module parameters */ #define CARD_NAME "AICA" static int index = -1; @@ -77,9 +124,9 @@ }, { .name = "AICA Sound RAM", - .start = SPU_MEMORY_BASE, + .start = AICA_MEMORY_BASE, .flags = IORESOURCE_MEM, - .end = SPU_MEMORY_BASE + 0x200000 - 1, + .end = AICA_MEMORY_BASE + AICA_MEMORY_SIZE - 1, }, }; @@ -106,7 +153,7 @@ snd_assert(length % 4 == 0, return); spu_write_wait(); for (i = 0; i < length; i++) { - writel(what, toi + SPU_MEMORY_BASE); + writel(what, toi + AICA_MEMORY_BASE); toi++; if (i && !(i % 8)) spu_write_wait(); @@ -117,7 +164,7 @@ static void spu_memload(uint32_t toi, void __iomem * from, int length) { uint32_t __iomem *froml = from; - uint32_t __iomem *to = (uint32_t __iomem *) (SPU_MEMORY_BASE + toi); + uint32_t __iomem *to = (uint32_t __iomem *) (AICA_MEMORY_BASE + toi); int i, val; if (length % 4) length = (length / 4) + 1; @@ -146,10 +193,10 @@ writel(regval, ARM_RESET_REGISTER); for (i = 0; i < 64; i++) { spu_write_wait(); - regval = readl(SPU_REGISTER_BASE + (i * 0x80)); + regval = readl(AICA_REGISTER_BASE + (i * 0x80)); regval = (regval & ~0x4000) | 0x8000; spu_write_wait(); - writel(regval, SPU_REGISTER_BASE + (i * 0x80)); + writel(regval, AICA_REGISTER_BASE + (i * 0x80)); } } @@ -171,7 +218,7 @@ spu_disable(); spu_memset(0, 0, 0x200000 / 4); /* Put ARM7 in endless loop */ - ctrl_outl(0xea000002, SPU_MEMORY_BASE); + ctrl_outl(0xea000002, AICA_MEMORY_BASE); spu_enable(); } Index: aica.h =================================================================== RCS file: /cvsroot/linuxsh/linux/sound/sh/aica.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- aica.h 8 Jul 2006 22:08:28 -0000 1.3 +++ aica.h 11 Jul 2006 21:29:09 -0000 1.4 @@ -1,80 +1,44 @@ -/* aica.h - * Header file for ALSA driver for - * Sega Dreamcast Yamaha AICA sound - * Copyright Adrian McMenamin - * <ad...@mc...> - * 2006 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as published by - * the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ +/* +* This code is licenced under +* the General Public Licence +* version 2 +* +* Copyright Adrian McMenamin 2006 +* <ad...@mc...> +* See also http://newgolddream.dyndns.info/cgi-bin/cvsweb +* +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of version 2 of the GNU General Public License as published by +* the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +*/ +#ifndef _ASM_DREAMCAST_AICA +#define _ASM_DREAMCAST_AICA + +#ifdef MACH_DREAMCAST /* SPU memory and register constants etc */ #define G2_FIFO 0xa05f688c -#define SPU_MEMORY_BASE 0xA0800000 +#define AICA_MEMORY_BASE 0xA0800000 #define ARM_RESET_REGISTER 0xA0702C00 -#define SPU_REGISTER_BASE 0xA0700000 +#define AICA_REGISTER_BASE 0xA0700000 /* AICA channels stuff */ #define AICA_CONTROL_POINT 0xA0810000 #define AICA_CONTROL_CHANNEL_SAMPLE_NUMBER 0xA0810008 +#define AICA_MEMORY_SIZE 0x200000 #define AICA_CHANNEL0_CONTROL_OFFSET 0x10004 +#endif -/* Command values */ -#define AICA_CMD_KICK 0x80000000 -#define AICA_CMD_NONE 0 -#define AICA_CMD_START 1 -#define AICA_CMD_STOP 2 -#define AICA_CMD_VOL 3 - -/* Sound modes */ -#define SM_8BIT 1 -#define SM_16BIT 0 -#define SM_ADPCM 2 - -/* Buffer and period size */ -#define AICA_BUFFER_SIZE 0x8000 -#define AICA_PERIOD_SIZE 0x800 -#define AICA_PERIOD_NUMBER 16 - -#define AICA_CHANNEL0_OFFSET 0x11000 -#define AICA_CHANNEL1_OFFSET 0x21000 -#define CHANNEL_OFFSET 0x10000 - -#define AICA_DMA_CHANNEL 0 -#define AICA_DMA_MODE 5 - -#define SND_AICA_DRIVER "AICA" - -struct aica_channel { - uint32_t cmd; /* Command ID */ - uint32_t pos; /* Sample position */ - uint32_t length; /* Sample length */ - uint32_t freq; /* Frequency */ - uint32_t vol; /* Volume 0-255 */ - uint32_t pan; /* Pan 0-255 */ - uint32_t sfmt; /* Sound format */ - uint32_t flags; /* Bit flags */ -}; +#endif -struct snd_card_aica { - struct snd_card *card; - struct aica_channel *channel; - snd_pcm_substream_t *substream; - int clicks; - int current_period; - struct timer_list timer; - int master_volume; - int dma_started; -}; |
|
From: Paul M. <le...@us...> - 2006-07-11 08:11:21
|
Update of /cvsroot/linuxsh/linux/arch/sh/kernel In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19178/arch/sh/kernel Modified Files: sh_ksyms.c Log Message: Drop some now duplicated symbol exports. Index: sh_ksyms.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/sh_ksyms.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- sh_ksyms.c 5 Jul 2006 08:46:48 -0000 1.25 +++ sh_ksyms.c 11 Jul 2006 08:11:18 -0000 1.26 @@ -28,20 +28,11 @@ /* platform dependent support */ EXPORT_SYMBOL(dump_fpu); -EXPORT_SYMBOL(enable_irq); -EXPORT_SYMBOL(disable_irq); -EXPORT_SYMBOL(probe_irq_mask); EXPORT_SYMBOL(kernel_thread); -EXPORT_SYMBOL(disable_irq_nosync); EXPORT_SYMBOL(irq_desc); EXPORT_SYMBOL(no_irq_type); -EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(strlen); -EXPORT_SYMBOL(strnlen); -EXPORT_SYMBOL(strchr); -EXPORT_SYMBOL(strcat); -EXPORT_SYMBOL(strncat); /* PCI exports */ #ifdef CONFIG_PCI @@ -52,13 +43,8 @@ /* mem exports */ EXPORT_SYMBOL(memchr); EXPORT_SYMBOL(memcpy); -EXPORT_SYMBOL(memcpy_fromio); -EXPORT_SYMBOL(memcpy_toio); EXPORT_SYMBOL(memset); -EXPORT_SYMBOL(memset_io); EXPORT_SYMBOL(memmove); -EXPORT_SYMBOL(memcmp); -EXPORT_SYMBOL(memscan); EXPORT_SYMBOL(__copy_user); EXPORT_SYMBOL(boot_cpu_data); @@ -125,5 +111,4 @@ #ifdef CONFIG_IPV6 EXPORT_SYMBOL(csum_ipv6_magic); #endif -EXPORT_SYMBOL(consistent_sync); EXPORT_SYMBOL(clear_page); |
|
From: Paul M. <le...@us...> - 2006-07-11 07:57:43
|
Update of /cvsroot/linuxsh/linux/arch/sh/kernel/cpu/sh4 In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10755/arch/sh/kernel/cpu/sh4 Modified Files: Makefile Added Files: setup-sh7780.c Log Message: Add SH7780 setup code (for rtc platform device). --- NEW FILE: setup-sh7780.c --- /* * SH7780 Setup * * Copyright (C) 2006 Paul Mundt * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #include <linux/platform_device.h> #include <linux/init.h> static struct resource rtc_resources[] = { [0] = { .start = 0xffe80000, .end = 0xffe80000 + 0x58 - 1, .flags = IORESOURCE_IO, }, [1] = { /* Period IRQ */ .start = 21, .flags = IORESOURCE_IRQ, }, [2] = { /* Carry IRQ */ .start = 22, .flags = IORESOURCE_IRQ, }, [3] = { /* Alarm IRQ */ .start = 23, .flags = IORESOURCE_IRQ, }, }; static struct platform_device rtc_device = { .name = "sh-rtc", .id = -1, .num_resources = ARRAY_SIZE(rtc_resources), .resource = rtc_resources, }; static struct platform_device *sh7780_devices[] __initdata = { &rtc_device, }; static int __init sh7780_devices_setup(void) { return platform_add_devices(sh7780_devices, ARRAY_SIZE(sh7780_devices)); } __initcall(sh7780_devices_setup); Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/cpu/sh4/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile 7 Jan 2006 20:16:39 -0000 1.12 +++ Makefile 11 Jul 2006 07:57:40 -0000 1.13 @@ -7,6 +7,9 @@ obj-$(CONFIG_SH_FPU) += fpu.o obj-$(CONFIG_SH_STORE_QUEUES) += sq.o +# CPU subtype setup +obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o + # Primary on-chip clocks (common) clock-$(CONFIG_CPU_SH4) := clock-sh4.o clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o |
|
From: Paul M. <le...@us...> - 2006-07-11 07:54:48
|
Update of /cvsroot/linuxsh/linux/drivers/rtc In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv8332/drivers/rtc Added Files: Kconfig Makefile rtc-sh.c Log Message: New and more fully-featured driver for on-chip RTC. --- NEW FILE: Kconfig --- \# # RTC class/drivers configuration # menu "Real Time Clock" config RTC_LIB tristate config RTC_CLASS tristate "RTC class" depends on EXPERIMENTAL default n select RTC_LIB help Generic RTC class support. If you say yes here, you will be allowed to plug one or more RTCs to your system. You will probably want to enable one of more of the interfaces below. This driver can also be built as a module. If so, the module will be called rtc-class. config RTC_HCTOSYS bool "Set system time from RTC on startup" depends on RTC_CLASS = y default y help If you say yes here, the system time will be set using the value read from the specified RTC device. This is useful in order to avoid unnecessary fschk runs. config RTC_HCTOSYS_DEVICE string "The RTC to read the time from" depends on RTC_HCTOSYS = y default "rtc0" help The RTC device that will be used as the source for the system time, usually rtc0. comment "RTC interfaces" depends on RTC_CLASS config RTC_INTF_SYSFS tristate "sysfs" depends on RTC_CLASS && SYSFS default RTC_CLASS help Say yes here if you want to use your RTC using the sysfs interface, /sys/class/rtc/rtcX . This driver can also be built as a module. If so, the module will be called rtc-sysfs. config RTC_INTF_PROC tristate "proc" depends on RTC_CLASS && PROC_FS default RTC_CLASS help Say yes here if you want to use your RTC using the proc interface, /proc/driver/rtc . This driver can also be built as a module. If so, the module will be called rtc-proc. config RTC_INTF_DEV tristate "dev" depends on RTC_CLASS default RTC_CLASS help Say yes here if you want to use your RTC using the dev interface, /dev/rtc . This driver can also be built as a module. If so, the module will be called rtc-dev. comment "RTC drivers" depends on RTC_CLASS config RTC_DRV_X1205 tristate "Xicor/Intersil X1205" depends on RTC_CLASS && I2C help If you say yes here you get support for the Xicor/Intersil X1205 RTC chip. This driver can also be built as a module. If so, the module will be called rtc-x1205. config RTC_DRV_DS1672 tristate "Dallas/Maxim DS1672" depends on RTC_CLASS && I2C help If you say yes here you get support for the Dallas/Maxim DS1672 timekeeping chip. This driver can also be built as a module. If so, the module will be called rtc-ds1672. config RTC_DRV_PCF8563 tristate "Philips PCF8563/Epson RTC8564" depends on RTC_CLASS && I2C help If you say yes here you get support for the Philips PCF8563 RTC chip. The Epson RTC8564 should work as well. This driver can also be built as a module. If so, the module will be called rtc-pcf8563. config RTC_DRV_RS5C372 tristate "Ricoh RS5C372A/B" depends on RTC_CLASS && I2C help If you say yes here you get support for the Ricoh RS5C372A and RS5C372B RTC chips. This driver can also be built as a module. If so, the module will be called rtc-rs5c372. config RTC_DRV_M48T86 tristate "ST M48T86/Dallas DS12887" depends on RTC_CLASS help If you say Y here you will get support for the ST M48T86 and Dallas DS12887 RTC chips. This driver can also be built as a module. If so, the module will be called rtc-m48t86. config RTC_DRV_EP93XX tristate "Cirrus Logic EP93XX" depends on RTC_CLASS && ARCH_EP93XX help If you say yes here you get support for the RTC embedded in the Cirrus Logic EP93XX processors. This driver can also be built as a module. If so, the module will be called rtc-ep93xx. config RTC_DRV_SA1100 tristate "SA11x0/PXA2xx" depends on RTC_CLASS && (ARCH_SA1100 || ARCH_PXA) help If you say Y here you will get access to the real time clock built into your SA11x0 or PXA2xx CPU. To compile this driver as a module, choose M here: the module will be called rtc-sa1100. config RTC_DRV_SH tristate "SuperH On-Chip RTC" depends on RTC_CLASS && SUPERH help Say Y here to enable support for the on-chip RTC found in most SuperH processors. To compile this driver as a module, choose M here: the module will be called rtc-sh. config RTC_DRV_VR41XX tristate "NEC VR41XX" depends on RTC_CLASS && CPU_VR41XX help If you say Y here you will get access to the real time clock built into your NEC VR41XX CPU. To compile this driver as a module, choose M here: the module will be called rtc-vr41xx. config RTC_DRV_TEST tristate "Test driver/device" depends on RTC_CLASS help If you say yes here you get support for the RTC test driver. It's a software RTC which can be used to test the RTC subsystem APIs. It gets the time from the system clock. You want this driver only if you are doing development on the RTC subsystem. Please read the source code for further details. This driver can also be built as a module. If so, the module will be called rtc-test. endmenu --- NEW FILE: Makefile --- # # Makefile for RTC class/drivers. # obj-$(CONFIG_RTC_LIB) += rtc-lib.o obj-$(CONFIG_RTC_HCTOSYS) += hctosys.o obj-$(CONFIG_RTC_CLASS) += rtc-core.o rtc-core-y := class.o interface.o obj-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o obj-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o obj-$(CONFIG_RTC_INTF_DEV) += rtc-dev.o obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o obj-$(CONFIG_RTC_DRV_DS1672) += rtc-ds1672.o obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o obj-$(CONFIG_RTC_DRV_M48T86) += rtc-m48t86.o obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o obj-$(CONFIG_RTC_DRV_VR41XX) += rtc-vr41xx.o obj-$(CONFIG_RTC_DRV_SH) += rtc-sh.o --- NEW FILE: rtc-sh.c --- /* * SuperH On-Chip RTC Support * * Copyright (C) 2006 Paul Mundt * * Based on the old arch/sh/kernel/cpu/rtc.c by: * * Copyright (C) 2000 Philipp Rumpf <pr...@tu...> * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #include <linux/module.h> #include <linux/kernel.h> #include <linux/bcd.h> #include <linux/rtc.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/seq_file.h> #include <linux/interrupt.h> #include <linux/spinlock.h> #include <asm/io.h> #ifdef CONFIG_CPU_SH3 #define rtc_reg_size sizeof(u16) #define RTC_BIT_INVERTED 0 /* No bug on SH7708, SH7709A */ #elif defined(CONFIG_CPU_SH4) #define rtc_reg_size sizeof(u32) #define RTC_BIT_INVERTED 0x40 /* bug on SH7750, SH7750S */ #endif #define RTC_REG(r) ((r) * rtc_reg_size) #define R64CNT RTC_REG(0) #define RSECCNT RTC_REG(1) #define RMINCNT RTC_REG(2) #define RHRCNT RTC_REG(3) #define RWKCNT RTC_REG(4) #define RDAYCNT RTC_REG(5) #define RMONCNT RTC_REG(6) #define RYRCNT RTC_REG(7) #define RSECAR RTC_REG(8) #define RMINAR RTC_REG(9) #define RHRAR RTC_REG(10) #define RWKAR RTC_REG(11) #define RDAYAR RTC_REG(12) #define RMONAR RTC_REG(13) #define RCR1 RTC_REG(14) #define RCR2 RTC_REG(15) /* RCR1 Bits */ #define RCR1_CF 0x80 /* Carry Flag */ #define RCR1_CIE 0x10 /* Carry Interrupt Enable */ #define RCR1_AIE 0x08 /* Alarm Interrupt Enable */ #define RCR1_AF 0x01 /* Alarm Flag */ /* RCR2 Bits */ #define RCR2_PEF 0x80 /* PEriodic interrupt Flag */ #define RCR2_PESMASK 0x70 /* Periodic interrupt Set */ #define RCR2_RTCEN 0x08 /* ENable RTC */ #define RCR2_ADJ 0x04 /* ADJustment (30-second) */ #define RCR2_RESET 0x02 /* Reset bit */ #define RCR2_START 0x01 /* Start bit */ struct sh_rtc { void __iomem *regbase; unsigned long regsize; struct resource *res; unsigned int alarm_irq, periodic_irq, carry_irq; struct rtc_device *rtc_dev; spinlock_t lock; }; static irqreturn_t sh_rtc_interrupt(int irq, void *id, struct pt_regs *regs) { struct platform_device *pdev = id; struct sh_rtc *rtc = platform_get_drvdata(pdev); unsigned int tmp, events = 0; spin_lock(&rtc->lock); tmp = readb(rtc->regbase + RCR1); if (tmp & RCR1_AF) events |= RTC_AF | RTC_IRQF; tmp &= ~(RCR1_CF | RCR1_AF); writeb(tmp, rtc->regbase + RCR1); rtc_update_irq(&rtc->rtc_dev->class_dev, 1, events); spin_unlock(&rtc->lock); return IRQ_HANDLED; } static irqreturn_t sh_rtc_periodic(int irq, void *id, struct pt_regs *regs) { struct sh_rtc *rtc = dev_get_drvdata(id); spin_lock(&rtc->lock); rtc_update_irq(&rtc->rtc_dev->class_dev, 1, RTC_PF | RTC_IRQF); spin_unlock(&rtc->lock); return IRQ_HANDLED; } static inline void sh_rtc_setpie(struct device *dev, unsigned int enable) { struct sh_rtc *rtc = dev_get_drvdata(dev); unsigned int tmp; spin_lock_irq(&rtc->lock); tmp = readb(rtc->regbase + RCR2); if (enable) { tmp &= ~RCR2_PESMASK; tmp |= RCR2_PEF | (2 << 4); } else tmp &= ~(RCR2_PESMASK | RCR2_PEF); writeb(tmp, rtc->regbase + RCR2); spin_unlock_irq(&rtc->lock); } static inline void sh_rtc_setaie(struct device *dev, unsigned int enable) { struct sh_rtc *rtc = dev_get_drvdata(dev); unsigned int tmp; spin_lock_irq(&rtc->lock); tmp = readb(rtc->regbase + RCR1); if (enable) tmp |= RCR1_AIE; else tmp &= ~RCR1_AIE; writeb(tmp, rtc->regbase + RCR1); spin_unlock_irq(&rtc->lock); } static int sh_rtc_open(struct device *dev) { struct sh_rtc *rtc = dev_get_drvdata(dev); unsigned int tmp; int ret; tmp = readb(rtc->regbase + RCR1); tmp &= ~RCR1_CF; tmp |= RCR1_CIE; writeb(tmp, rtc->regbase + RCR1); ret = request_irq(rtc->periodic_irq, sh_rtc_periodic, SA_INTERRUPT, "sh-rtc period", dev); if (unlikely(ret)) { dev_err(dev, "request period IRQ failed with %d, IRQ %d\n", ret, rtc->periodic_irq); return ret; } ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, SA_INTERRUPT, "sh-rtc carry", dev); if (unlikely(ret)) { dev_err(dev, "request carry IRQ failed with %d, IRQ %d\n", ret, rtc->carry_irq); free_irq(rtc->periodic_irq, dev); goto err_bad_carry; } ret = request_irq(rtc->alarm_irq, sh_rtc_interrupt, SA_INTERRUPT, "sh-rtc alarm", dev); if (unlikely(ret)) { dev_err(dev, "request alarm IRQ failed with %d, IRQ %d\n", ret, rtc->alarm_irq); goto err_bad_alarm; } return 0; err_bad_alarm: free_irq(rtc->carry_irq, dev); err_bad_carry: free_irq(rtc->periodic_irq, dev); return ret; } static void sh_rtc_release(struct device *dev) { struct sh_rtc *rtc = dev_get_drvdata(dev); sh_rtc_setpie(dev, 0); free_irq(rtc->periodic_irq, dev); free_irq(rtc->carry_irq, dev); free_irq(rtc->alarm_irq, dev); } static int sh_rtc_proc(struct device *dev, struct seq_file *seq) { struct sh_rtc *rtc = dev_get_drvdata(dev); unsigned int tmp; tmp = readb(rtc->regbase + RCR1); seq_printf(seq, "alarm_IRQ\t: %s\n", (tmp & RCR1_AIE) ? "yes" : "no"); seq_printf(seq, "carry_IRQ\t: %s\n", (tmp & RCR1_CIE) ? "yes" : "no"); tmp = readb(rtc->regbase + RCR2); seq_printf(seq, "periodic_IRQ\t: %s\n", (tmp & RCR2_PEF) ? "yes" : "no"); return 0; } static int sh_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) { unsigned int ret = -ENOIOCTLCMD; switch (cmd) { case RTC_PIE_OFF: case RTC_PIE_ON: sh_rtc_setpie(dev, cmd == RTC_PIE_ON); ret = 0; break; case RTC_AIE_OFF: case RTC_AIE_ON: sh_rtc_setaie(dev, cmd == RTC_AIE_ON); ret = 0; break; } return ret; } static int sh_rtc_read_time(struct device *dev, struct rtc_time *tm) { struct platform_device *pdev = to_platform_device(dev); struct sh_rtc *rtc = platform_get_drvdata(pdev); unsigned int sec128, sec2, yr, yr100, cf_bit; do { unsigned int tmp; spin_lock_irq(&rtc->lock); tmp = readb(rtc->regbase + RCR1); tmp &= ~RCR1_CF; /* Clear CF-bit */ tmp |= RCR1_CIE; writeb(tmp, rtc->regbase + RCR1); sec128 = readb(rtc->regbase + R64CNT); tm->tm_sec = BCD2BIN(readb(rtc->regbase + RSECCNT)); tm->tm_min = BCD2BIN(readb(rtc->regbase + RMINCNT)); tm->tm_hour = BCD2BIN(readb(rtc->regbase + RHRCNT)); tm->tm_wday = BCD2BIN(readb(rtc->regbase + RWKCNT)); tm->tm_mday = BCD2BIN(readb(rtc->regbase + RDAYCNT)); tm->tm_mon = BCD2BIN(readb(rtc->regbase + RMONCNT)); #if defined(CONFIG_CPU_SH4) yr = readw(rtc->regbase + RYRCNT); yr100 = BCD2BIN(yr >> 8); yr &= 0xff; #else yr = readb(rtc->regbase + RYRCNT); yr100 = BCD2BIN((yr == 0x99) ? 0x19 : 0x20); #endif tm->tm_year = (yr100 * 100 + BCD2BIN(yr)) - 1900; sec2 = readb(rtc->regbase + R64CNT); cf_bit = readb(rtc->regbase + RCR1) & RCR1_CF; spin_unlock_irq(&rtc->lock); } while (cf_bit != 0 || ((sec128 ^ sec2) & RTC_BIT_INVERTED) != 0); #if RTC_BIT_INVERTED != 0 if ((sec128 & RTC_BIT_INVERTED)) tm->tm_sec--; #endif dev_dbg(&dev, "%s: tm is secs=%d, mins=%d, hours=%d, " "mday=%d, mon=%d, year=%d, wday=%d\n", __FUNCTION__, tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); if (rtc_valid_tm(tm) < 0) dev_err(dev, "invalid date\n"); return 0; } static int sh_rtc_set_time(struct device *dev, struct rtc_time *tm) { struct platform_device *pdev = to_platform_device(dev); struct sh_rtc *rtc = platform_get_drvdata(pdev); unsigned int tmp; int year; spin_lock_irq(&rtc->lock); /* Reset pre-scaler & stop RTC */ tmp = readb(rtc->regbase + RCR2); tmp |= RCR2_RESET; writeb(tmp, rtc->regbase + RCR2); writeb(BIN2BCD(tm->tm_sec), rtc->regbase + RSECCNT); writeb(BIN2BCD(tm->tm_min), rtc->regbase + RMINCNT); writeb(BIN2BCD(tm->tm_hour), rtc->regbase + RHRCNT); writeb(BIN2BCD(tm->tm_wday), rtc->regbase + RWKCNT); writeb(BIN2BCD(tm->tm_mday), rtc->regbase + RDAYCNT); writeb(BIN2BCD(tm->tm_mon), rtc->regbase + RMONCNT); #ifdef CONFIG_CPU_SH3 year = tm->tm_year % 100; writeb(BIN2BCD(year), rtc->regbase + RYRCNT); #else year = (BIN2BCD((tm->tm_year + 1900) / 100) << 8) | BIN2BCD(tm->tm_year % 100); writew(year, rtc->regbase + RYRCNT); #endif /* Start RTC */ tmp = readb(rtc->regbase + RCR2); tmp &= ~RCR2_RESET; tmp |= RCR2_RTCEN | RCR2_START; writeb(tmp, rtc->regbase + RCR2); spin_unlock_irq(&rtc->lock); return 0; } static struct rtc_class_ops sh_rtc_ops = { .open = sh_rtc_open, .release = sh_rtc_release, .ioctl = sh_rtc_ioctl, .read_time = sh_rtc_read_time, .set_time = sh_rtc_set_time, .proc = sh_rtc_proc, }; static int __devinit sh_rtc_probe(struct platform_device *pdev) { struct sh_rtc *rtc; struct resource *res; int ret = -ENOENT; rtc = kzalloc(sizeof(struct sh_rtc), GFP_KERNEL); if (unlikely(!rtc)) return -ENOMEM; spin_lock_init(&rtc->lock); rtc->periodic_irq = platform_get_irq(pdev, 0); if (unlikely(rtc->periodic_irq < 0)) { dev_err(&pdev->dev, "No IRQ for period\n"); goto err_badres; } rtc->carry_irq = platform_get_irq(pdev, 1); if (unlikely(rtc->carry_irq < 0)) { dev_err(&pdev->dev, "No IRQ for carry\n"); goto err_badres; } rtc->alarm_irq = platform_get_irq(pdev, 2); if (unlikely(rtc->alarm_irq < 0)) { dev_err(&pdev->dev, "No IRQ for alarm\n"); goto err_badres; } res = platform_get_resource(pdev, IORESOURCE_IO, 0); if (unlikely(res == NULL)) { dev_err(&pdev->dev, "No IO resource\n"); goto err_badres; } rtc->regsize = res->end - res->start + 1; rtc->res = request_mem_region(res->start, rtc->regsize, pdev->name); if (unlikely(!rtc->res)) { ret = -EBUSY; goto err_badres; } rtc->regbase = (void __iomem *)rtc->res->start; if (unlikely(!rtc->regbase)) { ret = -EINVAL; goto err_badmap; } rtc->rtc_dev = rtc_device_register("sh", &pdev->dev, &sh_rtc_ops, THIS_MODULE); if (IS_ERR(rtc)) { ret = PTR_ERR(rtc->rtc_dev); goto err_badmap; } platform_set_drvdata(pdev, rtc); return 0; err_badmap: release_resource(rtc->res); err_badres: kfree(rtc); return ret; } static int __devexit sh_rtc_remove(struct platform_device *pdev) { struct sh_rtc *rtc = platform_get_drvdata(pdev); if (likely(rtc->rtc_dev)) rtc_device_unregister(rtc->rtc_dev); sh_rtc_setpie(&pdev->dev, 0); sh_rtc_setaie(&pdev->dev, 0); release_resource(rtc->res); platform_set_drvdata(pdev, NULL); kfree(rtc); return 0; } static struct platform_driver sh_rtc_platform_driver = { .driver = { .name = "sh-rtc", .owner = THIS_MODULE, }, .probe = sh_rtc_probe, .remove = __devexit_p(sh_rtc_remove), }; static int __init sh_rtc_init(void) { return platform_driver_register(&sh_rtc_platform_driver); } static void __exit sh_rtc_exit(void) { platform_driver_unregister(&sh_rtc_platform_driver); } module_init(sh_rtc_init); module_exit(sh_rtc_exit); MODULE_DESCRIPTION("SuperH on-chip RTC driver"); MODULE_AUTHOR("Paul Mundt <le...@li...>"); MODULE_LICENSE("GPL"); |
|
From: Paul M. <le...@us...> - 2006-07-11 07:52:47
|
Update of /cvsroot/linuxsh/linux/drivers/rtc In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7645/drivers/rtc Log Message: Directory /cvsroot/linuxsh/linux/drivers/rtc added to the repository |
|
From: Paul M. <le...@us...> - 2006-07-11 07:47:05
|
Update of /cvsroot/linuxsh/linux/arch/sh/kernel/cpu/irq In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4050/arch/sh/kernel/cpu/irq Modified Files: intc2.c Log Message: Fixup SH7780 RTC IRQ definitions. Index: intc2.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/cpu/irq/intc2.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- intc2.c 7 Jan 2006 20:16:39 -0000 1.1 +++ intc2.c 11 Jul 2006 07:47:01 -0000 1.2 @@ -241,9 +241,9 @@ /* 110-111 reserved/unused */ #elif defined(CONFIG_CPU_SUBTYPE_SH7780) { TIMER_IRQ, 0, 24, 0, INTC_TMU0_MSK, 2}, -#ifdef CONFIG_SH_RTC - { RTC_IRQ, 4, 0, 0, INTC_RTC_MSK, TIMER_PRIORITY }, -#endif + { 21, 1, 0, 0, INTC_RTC_MSK, TIMER_PRIORITY }, + { 22, 1, 1, 0, INTC_RTC_MSK, TIMER_PRIORITY }, + { 23, 1, 2, 0, INTC_RTC_MSK, TIMER_PRIORITY }, { SCIF0_ERI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, { SCIF0_RXI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, { SCIF0_BRI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, |
|
From: Paul M. <le...@us...> - 2006-07-11 07:47:05
|
Update of /cvsroot/linuxsh/linux/include/asm-sh In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4050/include/asm-sh Modified Files: irq-sh7780.h irq.h Log Message: Fixup SH7780 RTC IRQ definitions. Index: irq-sh7780.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/irq-sh7780.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- irq-sh7780.h 18 Jan 2006 01:27:08 -0000 1.2 +++ irq-sh7780.h 11 Jul 2006 07:47:01 -0000 1.3 @@ -145,11 +145,6 @@ #define TMU_CH5_IPR_POS 1 #define TMU_CH5_PRIORITY 2 -#define RTC_IRQ 22 -#define RTC_IPR_ADDR INTC_INT2PRI1 -#define RTC_IPR_POS 0 -#define RTC_PRIORITY TIMER_PRIORITY - /* SCIF0 */ #define SCIF0_ERI_IRQ 40 #define SCIF0_RXI_IRQ 41 Index: irq.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/irq.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- irq.h 30 Jan 2006 16:12:21 -0000 1.30 +++ irq.h 11 Jul 2006 07:47:01 -0000 1.31 @@ -583,7 +583,7 @@ #define NR_INTC2_IRQS 64 #elif defined(CONFIG_CPU_SUBTYPE_SH7780) #define INTC2_BASE 0xffd40000 -#define INTC2_FIRST_IRQ 22 +#define INTC2_FIRST_IRQ 21 #define INTC2_INTMSK_OFFSET (0x38) #define INTC2_INTMSKCLR_OFFSET (0x3c) #define NR_INTC2_IRQS 60 |
|
From: Andriy S. <ask...@us...> - 2006-07-10 20:51:30
|
Update of /cvsroot/linuxsh/linux/drivers/video/backlight In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2485/drivers/video/backlight Modified Files: hp680_bl.c Log Message: Fix hp6xx backlight compilation problem Index: hp680_bl.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/backlight/hp680_bl.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- hp680_bl.c 5 Jul 2006 08:46:49 -0000 1.5 +++ hp680_bl.c 10 Jul 2006 20:51:22 -0000 1.6 @@ -64,38 +64,6 @@ current_intensity = intensity; } -static void hp680bl_blank(int blank) -{ - u16 v; - - switch(blank) { - - case FB_BLANK_NORMAL: - case FB_BLANK_VSYNC_SUSPEND: - case FB_BLANK_HSYNC_SUSPEND: - case FB_BLANK_POWERDOWN: - if (hp680bl_powermode == FB_BLANK_UNBLANK) { - hp680bl_send_intensity(0); - hp680bl_powermode = blank; - sh_dac_disable(DAC_LCD_BRIGHTNESS); - v = inw(HD64461_GPBDR); - v |= HD64461_GPBDR_LCDOFF; - outw(v, HD64461_GPBDR); - } - break; - case FB_BLANK_UNBLANK: - if (hp680bl_powermode != FB_BLANK_UNBLANK) { - sh_dac_enable(DAC_LCD_BRIGHTNESS); - v = inw(HD64461_GPBDR); - v &= ~HD64461_GPBDR_LCDOFF; - outw(v, HD64461_GPBDR); - hp680bl_powermode = blank; - hp680bl_send_intensity(current_intensity); - } - break; - } -} - #ifdef CONFIG_PM static int hp680bl_suspend(struct platform_device *dev, pm_message_t state) { @@ -189,7 +157,7 @@ static void __exit hp680bl_exit(void) { - platform_device_unregister(&hp680bl_device); + platform_device_unregister(hp680bl_device); platform_driver_unregister(&hp680bl_driver); } |
|
From: Adrian M. <zx8...@us...> - 2006-07-08 22:08:33
|
Update of /cvsroot/linuxsh/linux/sound/sh In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12199/sound/sh Modified Files: aica.c aica.h Log Message: fix aica module unloading problem Index: aica.c =================================================================== RCS file: /cvsroot/linuxsh/linux/sound/sh/aica.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- aica.c 8 Jul 2006 13:30:38 -0000 1.3 +++ aica.c 8 Jul 2006 22:08:28 -0000 1.4 @@ -276,7 +276,6 @@ } - static void aica_period_elapsed(unsigned long timer_var) { /*timer fuction - so cannot sleep */ @@ -574,7 +573,6 @@ static int snd_aica_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); - kfree(devptr->dev.driver_data); platform_set_drvdata(devptr, NULL); return 0; } @@ -601,9 +599,7 @@ err = snd_aicapcmchip(dreamcastcard, 0); if (unlikely(err < 0)) goto freedreamcast; - snd_card_set_dev(dreamcastcard->card, &devptr->dev); - dreamcastcard->timer.data = 0; dreamcastcard->channel = NULL; /* Add basic controls */ err = add_aicamixer_controls(dreamcastcard); @@ -626,13 +622,9 @@ return err; } - - static struct platform_driver snd_aica_driver = { .probe = snd_aica_probe, .remove = snd_aica_remove, - //.suspend = snd_aica_suspend, - //.resume = snd_aica_resume, .driver = { .name = SND_AICA_DRIVER }, @@ -640,27 +632,26 @@ static int __init aica_init(void) { int err; - err = platform_driver_register(&snd_aica_driver); - if (unlikely(err < 0)) - return err; + if (unlikely(err < 0)) return err; pd = platform_device_register_simple(SND_AICA_DRIVER, -1, aica_memory_space, 2); if (unlikely(IS_ERR(pd))) { platform_driver_unregister(&snd_aica_driver); return PTR_ERR(pd); } - /* Load the firmware */ err = load_aica_firmware(); - if (unlikely(err < 0)) return err; - + if (unlikely(err < 0)) { + platform_driver_unregister(&snd_aica_driver); + platform_device_unregister(pd); + return err; + } return 0; } static void __exit aica_exit(void) { /* Flush and destroy the aica kernel thread */ - flush_workqueue(aica_queue); destroy_workqueue(aica_queue); platform_device_unregister(pd); platform_driver_unregister(&snd_aica_driver); Index: aica.h =================================================================== RCS file: /cvsroot/linuxsh/linux/sound/sh/aica.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- aica.h 8 Jul 2006 13:30:53 -0000 1.2 +++ aica.h 8 Jul 2006 22:08:28 -0000 1.3 @@ -77,5 +77,4 @@ struct timer_list timer; int master_volume; int dma_started; - int wq_init; }; |
|
From: Adrian M. <zx8...@us...> - 2006-07-08 13:31:05
|
Update of /cvsroot/linuxsh/linux/sound/sh In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv23819/sound/sh Modified Files: aica.c aica.h Log Message: aica driver tidy up Index: aica.c =================================================================== RCS file: /cvsroot/linuxsh/linux/sound/sh/aica.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- aica.c 5 Jun 2006 15:29:08 -0000 1.2 +++ aica.c 8 Jul 2006 13:30:38 -0000 1.3 @@ -162,12 +162,11 @@ writel(regval, ARM_RESET_REGISTER); } -/* Halt the sound processor, - clear the memory, - load some default ARM7 code, - and then restart ARM7 +/* + * Halt the sound processor, clear the memory, + * load some default ARM7 code, and then restart ARM7 */ -static void spu_init(void) +static void spu_reset(void) { spu_disable(); spu_memset(0, 0, 0x200000 / 4); @@ -236,22 +235,48 @@ return err; } -static void more_spu_dma(void *sstream) +static void startup_aica(struct snd_card_aica *dreamcastcard) +{ + spu_memload(AICA_CHANNEL0_CONTROL_OFFSET, + (uint8_t *) dreamcastcard->channel, + sizeof(struct aica_channel)); + aica_chn_start(); +} + + +static void execute_spu_dma(void *sstream) { + int buffer_size; struct snd_pcm_substream *substream; struct snd_pcm_runtime *runtime; struct snd_card_aica *dreamcastcard; substream = sstream; dreamcastcard = substream->pcm->private_data; runtime = substream->runtime; - aica_dma_transfer(runtime->channels, + if (unlikely(dreamcastcard->dma_started == 0)) + { + buffer_size = frames_to_bytes(runtime, runtime->buffer_size); + if (runtime->channels > 1) + dreamcastcard->channel->flags |= 0x01; + aica_dma_transfer(runtime->channels, buffer_size, substream); + startup_aica(dreamcastcard); + dreamcastcard->clicks = + buffer_size / (AICA_PERIOD_SIZE * runtime->channels); + dreamcastcard->dma_started = 1; + } + else + { + aica_dma_transfer(runtime->channels, AICA_PERIOD_SIZE * runtime->channels, substream); - snd_pcm_period_elapsed(dreamcastcard->substream); - dreamcastcard->clicks++; - dreamcastcard->clicks %= AICA_PERIOD_NUMBER; - mod_timer(&dreamcastcard->timer, jiffies + 1); + snd_pcm_period_elapsed(dreamcastcard->substream); + dreamcastcard->clicks++; + dreamcastcard->clicks %= AICA_PERIOD_NUMBER; + mod_timer(&dreamcastcard->timer, jiffies+1); + } + } + static void aica_period_elapsed(unsigned long timer_var) { /*timer fuction - so cannot sleep */ @@ -270,13 +295,11 @@ AICA_PERIOD_SIZE; if (play_period == dreamcastcard->current_period) { /* reschedule the timer */ - dreamcastcard->timer.expires = jiffies + 1; - add_timer(&(dreamcastcard->timer)); + mod_timer(&dreamcastcard->timer, jiffies+1); return; } if (runtime->channels > 1) dreamcastcard->current_period = play_period; - PREPARE_WORK(&spu_dma_work, more_spu_dma, substream); queue_work(aica_queue, &spu_dma_work); } @@ -305,6 +328,7 @@ spu_enable(); dreamcastcard->clicks = 0; dreamcastcard->current_period = 0; + dreamcastcard->dma_started = 0; return 0; } @@ -345,31 +369,7 @@ return 0; } -static void startup_aica(struct snd_card_aica *dreamcastcard) -{ - spu_memload(AICA_CHANNEL0_CONTROL_OFFSET, - (uint8_t *) dreamcastcard->channel, - sizeof(struct aica_channel)); - aica_chn_start(); -} -static void start_spu_dma(void *sstream) -{ - int buffer_size; - struct snd_pcm_substream *substream; - struct snd_pcm_runtime *runtime; - struct snd_card_aica *dreamcastcard; - substream = sstream; - dreamcastcard = substream->pcm->private_data; - runtime = substream->runtime; - buffer_size = frames_to_bytes(runtime, runtime->buffer_size); - if (runtime->channels > 1) - dreamcastcard->channel->flags |= 0x01; - aica_dma_transfer(runtime->channels, buffer_size, substream); - startup_aica(dreamcastcard); - dreamcastcard->clicks = - buffer_size / (AICA_PERIOD_SIZE * runtime->channels); -} static void spu_begin_dma(struct snd_pcm_substream *substream) { @@ -379,13 +379,8 @@ runtime = substream->runtime; dreamcastcard = substream->pcm->private_data; /* Use queue to do the heavy lifting */ - INIT_WORK(&spu_dma_work, start_spu_dma, substream); + INIT_WORK(&spu_dma_work, execute_spu_dma, substream); queue_work(aica_queue, &spu_dma_work); - /* Timer may already be running */ - if (unlikely(dreamcastcard->timer.data)) { - mod_timer(&dreamcastcard->timer, jiffies + 4); - return; - } init_timer(&(dreamcastcard->timer)); dreamcastcard->timer.data = (unsigned long)substream; dreamcastcard->timer.function = aica_period_elapsed; @@ -438,7 +433,7 @@ int err; /* AICA has no capture ability */ err = - snd_pcm_new(dreamcastcard->card, "AICA PCM", pcm_index, 1, 0, &pcm) + snd_pcm_new(dreamcastcard->card, "AICA PCM", pcm_index, 1, 0, &pcm); if (unlikely(err < 0)) return err; pcm->private_data = dreamcastcard; @@ -542,35 +537,12 @@ .put = aica_pcmvolume_put }; -static int remove_dreamcastcard(struct device *dreamcast_device) -{ - struct snd_card_aica *dreamcastcard = dreamcast_device->driver_data; - snd_card_free(dreamcastcard->card); - kfree(dreamcastcard); - return 0; -} - -static struct device_driver aica_driver = { - .name = "AICA", - .bus = &platform_bus_type, - .remove = remove_dreamcastcard, -}; - -/* Fill up the members of the embedded device structure */ -static void populate_dreamcastaicadev(struct device *dev) -{ - dev->bus = &platform_bus_type; - dev->driver = &aica_driver; - driver_register(dev->driver); - device_bind_driver(dev); -} - static int load_aica_firmware(void) { int err; const struct firmware *fw_entry; err = 0; - spu_init(); + spu_reset(); err = request_firmware(&fw_entry, "aica_firmware.bin", &pd->dev); if (unlikely(err)) return err; @@ -599,44 +571,40 @@ return 0; } -static int __init aica_init(void) +static int snd_aica_remove(struct platform_device *devptr) +{ + snd_card_free(platform_get_drvdata(devptr)); + kfree(devptr->dev.driver_data); + platform_set_drvdata(devptr, NULL); + return 0; +} + +static int __init snd_aica_probe(struct platform_device *devptr) { int err; struct snd_card_aica *dreamcastcard; - /* Are we in a Dreamcast at all? */ - if (unlikely(!mach_is_dreamcast())) - return -ENODEV; + dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL); if (unlikely(!dreamcastcard)) return -ENOMEM; - dreamcastcard->card = snd_card_new(index, "AICA", THIS_MODULE, 0); + dreamcastcard->card = + snd_card_new(index, SND_AICA_DRIVER, THIS_MODULE, 0); if (unlikely(!dreamcastcard->card)) { kfree(dreamcastcard); return -ENODEV; } strcpy(dreamcastcard->card->driver, "snd_aica"); - strcpy(dreamcastcard->card->shortname, "AICA"); + strcpy(dreamcastcard->card->shortname, SND_AICA_DRIVER); strcpy(dreamcastcard->card->longname, "Yamaha AICA Super Intelligent Sound Processor for SEGA Dreamcast"); /* Load the PCM 'chip' */ err = snd_aicapcmchip(dreamcastcard, 0); if (unlikely(err < 0)) goto freedreamcast; - pd = platform_device_register_simple(dreamcastcard->card->driver, - -1, aica_memory_space, 2); - if (unlikely(IS_ERR(pd))) { - err = PTR_ERR(pd); - goto freepcm; - } - populate_dreamcastaicadev(&pd->dev); - snd_card_set_dev(dreamcastcard->card, &pd->dev); - pd->dev.driver_data = dreamcastcard; + + snd_card_set_dev(dreamcastcard->card, &devptr->dev); dreamcastcard->timer.data = 0; dreamcastcard->channel = NULL; - /* Load the firmware */ - err = load_aica_firmware(); - if (unlikely(err < 0)) - goto freedreamcast; /* Add basic controls */ err = add_aicamixer_controls(dreamcastcard); if (unlikely(err < 0)) @@ -645,37 +613,61 @@ err = snd_card_register(dreamcastcard->card); if (unlikely(err < 0)) goto freedreamcast; + platform_set_drvdata(devptr, dreamcastcard->card); aica_queue = create_workqueue("aica"); if (unlikely(!aica_queue)) goto freedreamcast; snd_printk ("ALSA Driver for Yamaha AICA Super Intelligent Sound Processor\n"); return 0; - freepcm: freedreamcast: snd_card_free(dreamcastcard->card); - if (pd) { - struct device_driver *drv = (&pd->dev)->driver; - device_release_driver(&pd->dev); - driver_unregister(drv); - platform_device_unregister(pd); - pd = NULL; - } kfree(dreamcastcard); return err; } + + +static struct platform_driver snd_aica_driver = { + .probe = snd_aica_probe, + .remove = snd_aica_remove, + //.suspend = snd_aica_suspend, + //.resume = snd_aica_resume, + .driver = { + .name = SND_AICA_DRIVER + }, +}; + +static int __init aica_init(void) { + int err; + + err = platform_driver_register(&snd_aica_driver); + if (unlikely(err < 0)) + return err; + pd = platform_device_register_simple(SND_AICA_DRIVER, -1, + aica_memory_space, 2); + if (unlikely(IS_ERR(pd))) { + platform_driver_unregister(&snd_aica_driver); + return PTR_ERR(pd); + } + /* Load the firmware */ + err = load_aica_firmware(); + if (unlikely(err < 0)) return err; + + return 0; +} + static void __exit aica_exit(void) { - struct device_driver *drv = (&pd->dev)->driver; + /* Flush and destroy the aica kernel thread */ flush_workqueue(aica_queue); destroy_workqueue(aica_queue); - device_release_driver(&pd->dev); - driver_unregister(drv); platform_device_unregister(pd); + platform_driver_unregister(&snd_aica_driver); /* Kill any sound still playing and reset ARM7 to safe state */ - spu_init(); + spu_reset(); } module_init(aica_init); module_exit(aica_exit); + Index: aica.h =================================================================== RCS file: /cvsroot/linuxsh/linux/sound/sh/aica.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- aica.h 4 Jun 2006 12:13:05 -0000 1.1 +++ aica.h 8 Jul 2006 13:30:53 -0000 1.2 @@ -26,10 +26,7 @@ #define ARM_RESET_REGISTER 0xA0702C00 #define SPU_REGISTER_BASE 0xA0700000 - - /* AICA channels stuff */ - #define AICA_CONTROL_POINT 0xA0810000 #define AICA_CONTROL_CHANNEL_SAMPLE_NUMBER 0xA0810008 #define AICA_CHANNEL0_CONTROL_OFFSET 0x10004 @@ -58,6 +55,7 @@ #define AICA_DMA_CHANNEL 0 #define AICA_DMA_MODE 5 +#define SND_AICA_DRIVER "AICA" struct aica_channel { uint32_t cmd; /* Command ID */ @@ -70,7 +68,6 @@ uint32_t flags; /* Bit flags */ }; - struct snd_card_aica { struct snd_card *card; struct aica_channel *channel; @@ -79,9 +76,6 @@ int current_period; struct timer_list timer; int master_volume; - struct work_struct work; - struct work_struct work2; - struct workqueue_struct *workqueue; + int dma_started; + int wq_init; }; - - |
|
From: Paul M. <le...@us...> - 2006-07-07 10:55:54
|
Update of /cvsroot/linuxsh/linux/arch/sh/kernel In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25632/arch/sh/kernel Modified Files: setup.c Log Message: Fixup combined cache flag testing, spotted by Sato-san. Index: setup.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/setup.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- setup.c 5 Jul 2006 08:46:48 -0000 1.52 +++ setup.c 7 Jul 2006 10:55:47 -0000 1.53 @@ -493,7 +493,7 @@ * unified cache on the SH-2 and SH-3, as well as the harvard * style cache on the SH-4. */ - if (test_bit(SH_CACHE_COMBINED, &(boot_cpu_data.icache.flags))) { + if (boot_cpu_data.icache.flags & SH_CACHE_COMBINED) { seq_printf(m, "unified\n"); show_cacheinfo(m, "cache", boot_cpu_data.icache); } else { |
|
From: Paul M. <le...@us...> - 2006-07-07 10:45:11
|
Update of /cvsroot/linuxsh/linux/include/asm-sh In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19538/include/asm-sh Modified Files: rtc.h Log Message: Rename rtc_get_time/rtc_set_time to avoid namespace conflict with RTC subsystem. Index: rtc.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/rtc.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- rtc.h 24 Sep 2004 14:58:00 -0000 1.5 +++ rtc.h 7 Jul 2006 10:45:05 -0000 1.6 @@ -8,8 +8,8 @@ extern void sh_rtc_gettimeofday(struct timespec *ts); extern int sh_rtc_settimeofday(const time_t secs); extern void (*board_time_init)(void); -extern void (*rtc_get_time)(struct timespec *); -extern int (*rtc_set_time)(const time_t); +extern void (*rtc_sh_get_time)(struct timespec *); +extern int (*rtc_sh_set_time)(const time_t); /* RCR1 Bits */ #define RCR1_CF 0x80 /* Carry Flag */ |
|
From: Paul M. <le...@us...> - 2006-07-07 10:45:10
|
Update of /cvsroot/linuxsh/linux/arch/sh/kernel In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19538/arch/sh/kernel Modified Files: time.c Log Message: Rename rtc_get_time/rtc_set_time to avoid namespace conflict with RTC subsystem. Index: time.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/time.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- time.c 29 Jan 2006 17:46:23 -0000 1.37 +++ time.c 7 Jul 2006 10:45:05 -0000 1.38 @@ -30,11 +30,11 @@ /* XXX: Can we initialize this in a routine somewhere? Dreamcast doesn't want * these routines anywhere... */ #ifdef CONFIG_SH_RTC -void (*rtc_get_time)(struct timespec *) = sh_rtc_gettimeofday; -int (*rtc_set_time)(const time_t) = sh_rtc_settimeofday; +void (*rtc_sh_get_time)(struct timespec *) = sh_rtc_gettimeofday; +int (*rtc_sh_set_time)(const time_t) = sh_rtc_settimeofday; #else -void (*rtc_get_time)(struct timespec *); -int (*rtc_set_time)(const time_t); +void (*rtc_sh_get_time)(struct timespec *); +int (*rtc_sh_set_time)(const time_t); #endif /* @@ -136,7 +136,7 @@ xtime.tv_sec > last_rtc_update + 660 && (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) { - if (rtc_set_time(xtime.tv_sec) == 0) + if (rtc_sh_set_time(xtime.tv_sec) == 0) last_rtc_update = xtime.tv_sec; else /* do it again in 60s */ @@ -194,8 +194,8 @@ clk_init(); - if (rtc_get_time) { - rtc_get_time(&xtime); + if (rtc_sh_get_time) { + rtc_sh_get_time(&xtime); } else { xtime.tv_sec = mktime(2000, 1, 1, 0, 0, 0); xtime.tv_nsec = 0; |
|
From: Paul M. <le...@us...> - 2006-07-07 10:45:10
|
Update of /cvsroot/linuxsh/linux/arch/sh/boards/sh03 In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19538/arch/sh/boards/sh03 Modified Files: rtc.c Log Message: Rename rtc_get_time/rtc_set_time to avoid namespace conflict with RTC subsystem. Index: rtc.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/boards/sh03/rtc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rtc.c 5 Jul 2006 08:46:48 -0000 1.3 +++ rtc.c 7 Jul 2006 10:45:04 -0000 1.4 @@ -10,9 +10,10 @@ #include <linux/sched.h> #include <linux/time.h> #include <linux/bcd.h> -#include <asm/io.h> #include <linux/rtc.h> #include <linux/spinlock.h> +#include <asm/io.h> +#include <asm/rtc.h> #define RTC_BASE 0xb0000000 #define RTC_SEC1 (RTC_BASE + 0) @@ -34,8 +35,6 @@ #define RTC_BUSY 1 #define RTC_STOP 2 -extern void (*rtc_get_time)(struct timespec *); -extern int (*rtc_set_time)(const time_t); extern spinlock_t rtc_lock; unsigned long get_cmos_time(void) @@ -128,6 +127,6 @@ void sh03_time_init(void) { - rtc_get_time = sh03_rtc_gettimeofday; - rtc_set_time = sh03_rtc_settimeofday; + rtc_sh_get_time = sh03_rtc_gettimeofday; + rtc_sh_set_time = sh03_rtc_settimeofday; } |
|
From: Paul M. <le...@us...> - 2006-07-07 10:45:10
|
Update of /cvsroot/linuxsh/linux/arch/sh/boards/landisk In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19538/arch/sh/boards/landisk Modified Files: rtc.c Log Message: Rename rtc_get_time/rtc_set_time to avoid namespace conflict with RTC subsystem. Index: rtc.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/boards/landisk/rtc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- rtc.c 12 Nov 2005 13:02:45 -0000 1.2 +++ rtc.c 7 Jul 2006 10:45:04 -0000 1.3 @@ -16,17 +16,9 @@ #include <linux/time.h> #include <linux/delay.h> #include <linux/spinlock.h> +#include <linux/bcd.h> +#include <asm/rtc.h> -#ifndef BCD_TO_BIN -#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10) -#endif - -#ifndef BIN_TO_BCD -#define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10) -#endif - -extern void (*rtc_get_time) (struct timespec *); -extern int (*rtc_set_time) (const time_t); extern spinlock_t rtc_lock; extern void @@ -94,9 +86,8 @@ return retval; } - void landisk_time_init(void) { - rtc_get_time = landisk_rtc_gettimeofday; - rtc_set_time = landisk_rtc_settimeofday; + rtc_sh_get_time = landisk_rtc_gettimeofday; + rtc_sh_set_time = landisk_rtc_settimeofday; } |
|
From: Paul M. <le...@us...> - 2006-07-07 10:45:10
|
Update of /cvsroot/linuxsh/linux/arch/sh/boards/mpc1211 In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19538/arch/sh/boards/mpc1211 Modified Files: rtc.c Log Message: Rename rtc_get_time/rtc_set_time to avoid namespace conflict with RTC subsystem. Index: rtc.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/boards/mpc1211/rtc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rtc.c 5 Jul 2006 08:46:48 -0000 1.3 +++ rtc.c 7 Jul 2006 10:45:04 -0000 1.4 @@ -130,7 +130,7 @@ void mpc1211_time_init(void) { - rtc_get_time = mpc1211_rtc_gettimeofday; - rtc_set_time = mpc1211_rtc_settimeofday; + rtc_sh_get_time = mpc1211_rtc_gettimeofday; + rtc_sh_set_time = mpc1211_rtc_settimeofday; } |
|
From: Paul M. <le...@us...> - 2006-07-07 10:45:10
|
Update of /cvsroot/linuxsh/linux/arch/sh/kernel/timers In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19538/arch/sh/kernel/timers Modified Files: timer-tmu.c Log Message: Rename rtc_get_time/rtc_set_time to avoid namespace conflict with RTC subsystem. Index: timer-tmu.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/timers/timer-tmu.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- timer-tmu.c 29 Jan 2006 17:46:24 -0000 1.3 +++ timer-tmu.c 7 Jul 2006 10:45:05 -0000 1.4 @@ -132,17 +132,17 @@ ctrl_outl(0xffffffff, TMU0_TCOR); ctrl_outl(0xffffffff, TMU0_TCNT); - rtc_get_time(&ts2); + rtc_sh_get_time(&ts2); do { - rtc_get_time(&ts1); + rtc_sh_get_time(&ts1); } while (ts1.tv_nsec == ts2.tv_nsec && ts1.tv_sec == ts2.tv_sec); /* actually start the timer */ ctrl_outb(TMU_TSTR_INIT, TMU_TSTR); do { - rtc_get_time(&ts2); + rtc_sh_get_time(&ts2); } while (ts1.tv_nsec == ts2.tv_nsec && ts1.tv_sec == ts2.tv_sec); freq = 0xffffffff - ctrl_inl(TMU0_TCNT); |
|
From: Paul M. <le...@us...> - 2006-07-07 10:45:08
|
Update of /cvsroot/linuxsh/linux/arch/sh/boards/snapgear In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19538/arch/sh/boards/snapgear Modified Files: rtc.c Log Message: Rename rtc_get_time/rtc_set_time to avoid namespace conflict with RTC subsystem. Index: rtc.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/boards/snapgear/rtc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- rtc.c 4 Jan 2006 18:42:42 -0000 1.2 +++ rtc.c 7 Jul 2006 10:45:04 -0000 1.3 @@ -165,11 +165,11 @@ } if (use_ds1302) { - rtc_get_time = snapgear_rtc_gettimeofday; - rtc_set_time = snapgear_rtc_settimeofday; + rtc_sh_get_time = snapgear_rtc_gettimeofday; + rtc_sh_set_time = snapgear_rtc_settimeofday; } else { - rtc_get_time = sh_rtc_gettimeofday; - rtc_set_time = sh_rtc_settimeofday; + rtc_sh_get_time = sh_rtc_gettimeofday; + rtc_sh_set_time = sh_rtc_settimeofday; } printk("SnapGear RTC: using %s rtc.\n", use_ds1302 ? "ds1302" : "internal"); |