[MIPS] signal: Fix warnings in o32 compat code.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dd02f06aa96ab4590da12704366450a2d4753d3c Commit: dd02f06aa96ab4590da12704366450a2d4753d3c Parent: af3d10d52d38d2c56a8bca9943c07b00031fc718 Author: Ralf Baechle [EMAIL PROTECTED] AuthorDate: Tue Feb 13 00:50:57 2007 + Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:50 2007 + [MIPS] signal: Fix warnings in o32 compat code. Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- arch/mips/kernel/signal32.c | 26 +++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 183fc7e..1b9262d 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -139,8 +139,20 @@ struct ucontext32 { sigset_t32 uc_sigmask; /* mask last for extensibility */ }; +/* + * Horribly complicated - with the bloody RM9000 workarounds enabled + * the signal trampolines is moving to the end of the structure so we can + * increase the alignment without breaking software compatibility. + */ #if ICACHE_REFILLS_WORKAROUND_WAR == 0 +struct sigframe32 { + u32 sf_ass[4]; /* argument save space for o32 */ + u32 sf_code[2]; /* signal trampoline */ + struct sigcontext32 sf_sc; + sigset_t sf_mask; +}; + struct rt_sigframe32 { u32 rs_ass[4]; /* argument save space for o32 */ u32 rs_code[2]; /* signal trampoline */ @@ -150,6 +162,14 @@ struct rt_sigframe32 { #else /* ICACHE_REFILLS_WORKAROUND_WAR */ +struct sigframe32 { + u32 sf_ass[4]; /* argument save space for o32 */ + u32 sf_pad[2]; + struct sigcontext32 sf_sc; /* hw context */ + sigset_t sf_mask; + u32 sf_code[8] cacheline_aligned; /* signal trampoline */ +}; + struct rt_sigframe32 { u32 rs_ass[4]; /* argument save space for o32 */ u32 rs_pad[2]; @@ -493,10 +513,10 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs) { - struct sigframe __user *frame; + struct sigframe32 __user *frame; sigset_t blocked; - frame = (struct sigframe __user *) regs.regs[29]; + frame = (struct sigframe32 __user *) regs.regs[29]; if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__copy_from_user(blocked, frame-sf_mask, sizeof(blocked))) @@ -581,7 +601,7 @@ badframe: int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, int signr, sigset_t *set) { - struct sigframe __user *frame; + struct sigframe32 __user *frame; int err = 0; frame = get_sigframe(ka, regs, sizeof(*frame)); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[MIPS] signal: Move {restore,setup}_sigcontext prototypes to their user
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=205d84aaea380bbd1cc1079d44086cd50c2c2dad Commit: 205d84aaea380bbd1cc1079d44086cd50c2c2dad Parent: dd02f06aa96ab4590da12704366450a2d4753d3c Author: Ralf Baechle [EMAIL PROTECTED] AuthorDate: Tue Feb 13 01:28:09 2007 + Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:50 2007 + [MIPS] signal: Move {restore,setup}_sigcontext prototypes to their user Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- arch/mips/kernel/signal-common.h |6 -- arch/mips/kernel/signal_n32.c|4 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h index 9a8abd6..d9a832f 100644 --- a/arch/mips/kernel/signal-common.h +++ b/arch/mips/kernel/signal-common.h @@ -46,12 +46,6 @@ struct sigframe { #endif /* !ICACHE_REFILLS_WORKAROUND_WAR */ /* - * handle hardware context - */ -extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *); -extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); - -/* * Determine which stack to use.. */ extern void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index 57456e6..b17ef04 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c @@ -49,6 +49,10 @@ #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) +extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *); +extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); + + /* IRIX compatible stack_t */ typedef struct sigaltstack32 { s32 ss_sp; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[MIPS] signal: Move sigframe definition for native O32/N64 into signal.c
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=66680583461d7cae281cef63c050c9b6371e3286 Commit: 66680583461d7cae281cef63c050c9b6371e3286 Parent: 205d84aaea380bbd1cc1079d44086cd50c2c2dad Author: Ralf Baechle [EMAIL PROTECTED] AuthorDate: Tue Feb 13 01:31:48 2007 + Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:50 2007 + [MIPS] signal: Move sigframe definition for native O32/N64 into signal.c Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- arch/mips/kernel/signal-common.h | 26 -- arch/mips/kernel/signal.c| 20 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h index d9a832f..b95e542 100644 --- a/arch/mips/kernel/signal-common.h +++ b/arch/mips/kernel/signal-common.h @@ -20,32 +20,6 @@ #endif /* - * Horribly complicated - with the bloody RM9000 workarounds enabled - * the signal trampolines is moving to the end of the structure so we can - * increase the alignment without breaking software compatibility. - */ -#if ICACHE_REFILLS_WORKAROUND_WAR == 0 - -struct sigframe { - u32 sf_ass[4]; /* argument save space for o32 */ - u32 sf_code[2]; /* signal trampoline */ - struct sigcontext sf_sc; - sigset_t sf_mask; -}; - -#else /* ICACHE_REFILLS_WORKAROUND_WAR */ - -struct sigframe { - u32 sf_ass[4]; /* argument save space for o32 */ - u32 sf_pad[2]; - struct sigcontext sf_sc;/* hw context */ - sigset_t sf_mask; - u32 sf_code[8] cacheline_aligned; /* signal trampoline */ -}; - -#endif /* !ICACHE_REFILLS_WORKAROUND_WAR */ - -/* * Determine which stack to use.. */ extern void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 54398af..e7b0492 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -36,8 +36,20 @@ #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) +/* + * Horribly complicated - with the bloody RM9000 workarounds enabled + * the signal trampolines is moving to the end of the structure so we can + * increase the alignment without breaking software compatibility. + */ #if ICACHE_REFILLS_WORKAROUND_WAR == 0 +struct sigframe { + u32 sf_ass[4]; /* argument save space for o32 */ + u32 sf_code[2]; /* signal trampoline */ + struct sigcontext sf_sc; + sigset_t sf_mask; +}; + struct rt_sigframe { u32 rs_ass[4]; /* argument save space for o32 */ u32 rs_code[2]; /* signal trampoline */ @@ -47,6 +59,14 @@ struct rt_sigframe { #else +struct sigframe { + u32 sf_ass[4]; /* argument save space for o32 */ + u32 sf_pad[2]; + struct sigcontext sf_sc;/* hw context */ + sigset_t sf_mask; + u32 sf_code[8] cacheline_aligned; /* signal trampoline */ +}; + struct rt_sigframe { u32 rs_ass[4]; /* argument save space for o32 */ u32 rs_pad[2]; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[MIPS] signals: make common _BLOCKABLE macro
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=24c556e99ec8a61ce1fbc75bee61dc19edf2c4df Commit: 24c556e99ec8a61ce1fbc75bee61dc19edf2c4df Parent: 66680583461d7cae281cef63c050c9b6371e3286 Author: Franck Bui-Huu [EMAIL PROTECTED] AuthorDate: Fri Feb 9 16:07:37 2007 +0100 Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:51 2007 + [MIPS] signals: make common _BLOCKABLE macro Signed-off-by: Franck Bui-Huu [EMAIL PROTECTED] Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- arch/mips/kernel/signal-common.h |2 ++ arch/mips/kernel/signal.c|2 -- arch/mips/kernel/signal32.c |2 -- arch/mips/kernel/signal_n32.c|2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h index b95e542..fdbdbdc 100644 --- a/arch/mips/kernel/signal-common.h +++ b/arch/mips/kernel/signal-common.h @@ -19,6 +19,8 @@ # define DEBUGP(fmt, args...) #endif +#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) + /* * Determine which stack to use.. */ diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index e7b0492..b2e9ab1 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -34,8 +34,6 @@ #include signal-common.h -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) - /* * Horribly complicated - with the bloody RM9000 workarounds enabled * the signal trampolines is moving to the end of the structure so we can diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 1b9262d..db00c33 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -104,8 +104,6 @@ typedef struct compat_siginfo { #define __NR_O32_rt_sigreturn 4193 #define __NR_O32_restart_syscall 4253 -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) - /* 32-bit compatibility types */ #define _NSIG_BPW3232 diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index b17ef04..1a5f248 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c @@ -47,8 +47,6 @@ #define __NR_N32_rt_sigreturn 6211 #define __NR_N32_restart_syscall 6214 -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) - extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *); extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[MIPS] DECstation: Fix irq handling
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d01f06ef0c783eceb53030fc5407caa94586bd6a Commit: d01f06ef0c783eceb53030fc5407caa94586bd6a Parent: 24c556e99ec8a61ce1fbc75bee61dc19edf2c4df Author: Atsushi Nemoto [EMAIL PROTECTED] AuthorDate: Mon Feb 12 23:48:26 2007 +0900 Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:51 2007 + [MIPS] DECstation: Fix irq handling When I post a patch (commit f431baa55abf8adeed0c718b51deacbc151f58f1), I just tried to not change behavior of existing codes, but it seems dec/int-handler.S had been broken since its previous commit 937a801576f954bd030d7c4a5a94571710d87c0b. The caller of plat_irq_dispatch do setup/restore TI_REGS($28), so dec's plat_irq_dispatch should not do it, and there is no need to adjust RA. Signed-off-by: Atsushi Nemoto [EMAIL PROTECTED] Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- arch/mips/dec/int-handler.S |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S index b251ef8..00cecdc 100644 --- a/arch/mips/dec/int-handler.S +++ b/arch/mips/dec/int-handler.S @@ -264,9 +264,6 @@ srlv t3,t1,t2 handle_it: - LONG_L s0, TI_REGS($28) - LONG_S sp, TI_REGS($28) - PTR_LA ra, ret_from_irq j dec_irq_dispatch nop @@ -277,7 +274,6 @@ fpu: #endif spurious: - PTR_LA ra, _ret_from_irq j spurious_interrupt nop END(plat_irq_dispatch) - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[MIPS] 32-bit: Fix warning about cast for fetching pointer from userspace.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb66fb3f156b485b22db97db22e96db4786dc68b Commit: cb66fb3f156b485b22db97db22e96db4786dc68b Parent: d01f06ef0c783eceb53030fc5407caa94586bd6a Author: Ralf Baechle [EMAIL PROTECTED] AuthorDate: Tue Feb 13 11:45:24 2007 + Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:51 2007 + [MIPS] 32-bit: Fix warning about cast for fetching pointer from userspace. Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- include/asm-mips/uaccess.h | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index c12ebc5..36b3a42 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h @@ -265,7 +265,10 @@ do { \ */ #define __get_user_asm_ll32(val, addr) \ { \ -unsigned long long __gu_tmp; \ + union { \ + unsigned long long l; \ + __typeof__(*(addr)) t; \ + } __gu_tmp; \ \ __asm__ __volatile__( \ 1: lw %1, (%3)\n \ @@ -281,9 +284,10 @@ do { \ __UA_ADDR1b, 4b \n \ __UA_ADDR2b, 4b \n \ .previous \n \ - : =r (__gu_err), =r (__gu_tmp) \ + : =r (__gu_err), =r (__gu_tmp.l) \ : 0 (0), r (addr), i (-EFAULT)); \ - (val) = (__typeof__(*(addr))) __gu_tmp; \ + \ + (val) = __gu_tmp.t; \ } /* - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[MIPS] Remove stray instruction from __get_user_asm_ll32.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6f3aa38e191326a82d5dcae1f6cdc88b1d9a8d32 Commit: 6f3aa38e191326a82d5dcae1f6cdc88b1d9a8d32 Parent: cb66fb3f156b485b22db97db22e96db4786dc68b Author: Ralf Baechle [EMAIL PROTECTED] AuthorDate: Tue Feb 13 15:01:21 2007 + Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:51 2007 + [MIPS] Remove stray instruction from __get_user_asm_ll32. This did result in double clearing of the error return value on success only but should make a meassurable overhead for sigreturn. Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- include/asm-mips/uaccess.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 36b3a42..3eff8d8 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h @@ -273,7 +273,6 @@ do { \ __asm__ __volatile__( \ 1: lw %1, (%3)\n \ 2: lw %D1, 4(%3) \n \ - move%0, $0 \n \ 3: .section.fixup,\ax\ \n \ 4: li %0, %4 \n \ move%1, $0 \n \ - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[MIPS] Make entry.S a little more readable.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7da8a581f5ec0ecac5f0afc9ec26ce13b780d48d Commit: 7da8a581f5ec0ecac5f0afc9ec26ce13b780d48d Parent: 6f3aa38e191326a82d5dcae1f6cdc88b1d9a8d32 Author: Franck Bui-Huu [EMAIL PROTECTED] AuthorDate: Tue Feb 13 14:50:18 2007 +0100 Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:51 2007 + [MIPS] Make entry.S a little more readable. When CONFIG_PREEMPT is not set, it also moves one branch instruction from ret_from_irq() to ret_from_exception(). Therefore we favour the return from irq case which should be more common than the other one. Signed-off-by: Franck Bui-Huu [EMAIL PROTECTED] Acked-by: Atsushi Nemoto [EMAIL PROTECTED] Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- arch/mips/kernel/entry.S | 19 --- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index f10b6a1..0b78fcb 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S @@ -21,24 +21,21 @@ #endif #ifndef CONFIG_PREEMPT - .macro preempt_stop - local_irq_disable - .endm #define resume_kernel restore_all +#else +#define __ret_from_irq ret_from_exception #endif .text .align 5 -FEXPORT(ret_from_irq) - LONG_S s0, TI_REGS($28) -#ifdef CONFIG_PREEMPT -FEXPORT(ret_from_exception) -#else - b _ret_from_irq +#ifndef CONFIG_PREEMPT FEXPORT(ret_from_exception) - preempt_stop + local_irq_disable # preempt stop + b __ret_from_irq #endif -FEXPORT(_ret_from_irq) +FEXPORT(ret_from_irq) + LONG_S s0, TI_REGS($28) +FEXPORT(__ret_from_irq) LONG_L t0, PT_STATUS(sp) # returning to kernel mode? andit0, t0, KU_USER beqzt0, resume_kernel - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[MIPS] Fix uniprocessor Sibyte builds.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=366d6aef281a670b32a51d289fc07bf0e5e72d9a Commit: 366d6aef281a670b32a51d289fc07bf0e5e72d9a Parent: 7da8a581f5ec0ecac5f0afc9ec26ce13b780d48d Author: Andrew Sharp [EMAIL PROTECTED] AuthorDate: Fri Feb 9 17:35:28 2007 -0800 Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:51 2007 + [MIPS] Fix uniprocessor Sibyte builds. Signed-off-by: Andrew Sharp [EMAIL PROTECTED] Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- arch/mips/mm/c-sb1.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c index 3a8afd4..9ea460b 100644 --- a/arch/mips/mm/c-sb1.c +++ b/arch/mips/mm/c-sb1.c @@ -259,6 +259,12 @@ static void sb1_flush_cache_data_page(unsigned long addr) on_each_cpu(sb1_flush_cache_data_page_ipi, (void *) addr, 1, 1); } #else + +static void local_sb1_flush_cache_data_page(unsigned long addr) +{ + __sb1_writeback_inv_dcache_range(addr, addr + PAGE_SIZE); +} + void sb1_flush_cache_data_page(unsigned long) __attribute__((alias(local_sb1_flush_cache_data_page))); #endif - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=431dc8040354db65e4f8d4d4e21ae4fab41f5bc3 Commit: 431dc8040354db65e4f8d4d4e21ae4fab41f5bc3 Parent: 366d6aef281a670b32a51d289fc07bf0e5e72d9a Author: Ralf Baechle [EMAIL PROTECTED] AuthorDate: Tue Feb 13 00:05:11 2007 + Committer: Ralf Baechle [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:40:51 2007 + [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code. Signed-off-by: Ralf Baechle [EMAIL PROTECTED] --- arch/mips/kernel/linux32.c | 47 arch/mips/kernel/scall64-64.S|2 +- arch/mips/kernel/scall64-n32.S |2 +- arch/mips/kernel/signal32.c | 11 +--- arch/mips/kernel/signal_n32.c|7 +++-- include/asm-mips/compat-signal.h | 55 ++ 6 files changed, 115 insertions(+), 9 deletions(-) diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index ca7ad78..fc4dd6c 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c @@ -39,6 +39,7 @@ #include net/sock.h #include net/scm.h +#include asm/compat-signal.h #include asm/ipc.h #include asm/sim.h #include asm/uaccess.h @@ -736,3 +737,49 @@ _sys32_clone(nabi_no_regargs struct pt_regs regs) return do_fork(clone_flags, newsp, regs, 0, parent_tidptr, child_tidptr); } + +/* + * Implement the event wait interface for the eventpoll file. It is the kernel + * part of the user space epoll_pwait(2). + */ +asmlinkage long compat_sys_epoll_pwait(int epfd, + struct epoll_event __user *events, int maxevents, int timeout, + const compat_sigset_t __user *sigmask, size_t sigsetsize) +{ + int error; + sigset_t ksigmask, sigsaved; + + /* +* If the caller wants a certain signal mask to be set during the wait, +* we apply it here. +*/ + if (sigmask) { + if (sigsetsize != sizeof(sigset_t)) + return -EINVAL; + if (!access_ok(VERIFY_READ, sigmask, sizeof(ksigmask))) + return -EFAULT; + if (__copy_conv_sigset_from_user(ksigmask, sigmask)) + return -EFAULT; + sigdelsetmask(ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP)); + sigprocmask(SIG_SETMASK, ksigmask, sigsaved); + } + + error = sys_epoll_wait(epfd, events, maxevents, timeout); + + /* +* If we changed the signal mask, we need to restore the original one. +* In case we've got a signal while waiting, we do not restore the +* signal mask yet, and we allow do_signal() to deliver the signal on +* the way back to userspace, before the signal mask is restored. +*/ + if (sigmask) { + if (error == -EINTR) { + memcpy(current-saved_sigmask, sigsaved, + sizeof(sigsaved)); + set_thread_flag(TIF_RESTORE_SIGMASK); + } else + sigprocmask(SIG_SETMASK, sigsaved, NULL); + } + + return error; +} diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index e569b84..10e9a18 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S @@ -470,4 +470,4 @@ sys_call_table: PTR sys_get_robust_list PTR sys_kexec_load /* 5270 */ PTR sys_getcpu - PTR sys_epoll_pwait + PTR compat_sys_epoll_pwait diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index ee8802b..2ceda46 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S @@ -396,4 +396,4 @@ EXPORT(sysn32_call_table) PTR compat_sys_get_robust_list PTR compat_sys_kexec_load PTR sys_getcpu - PTR sys_epoll_pwait + PTR compat_sys_epoll_pwait diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index db00c33..c28cb21 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -8,6 +8,7 @@ * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ #include linux/cache.h +#include linux/compat.h #include linux/sched.h #include linux/mm.h #include linux/smp.h @@ -24,6 +25,7 @@ #include asm/abi.h #include asm/asm.h +#include asm/compat-signal.h #include linux/bitops.h #include asm/cacheflush.h #include asm/sim.h @@ -517,7 +519,7 @@ asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs) frame = (struct sigframe32 __user *) regs.regs[29]; if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) goto badframe; - if (__copy_from_user(blocked, frame-sf_mask, sizeof(blocked))) + if (__copy_conv_sigset_from_user(blocked, frame-sf_mask)) goto badframe; sigdelsetmask(blocked, ~_BLOCKABLE); @@ -554,7
i2c-ali1563: Improve the status messages
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=69735698312f6f5e47001cf62dc678f591b6a6de Commit: 69735698312f6f5e47001cf62dc678f591b6a6de Parent: ec2f9d1331f658433411c58077871e1eef4ee1b4 Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:08:57 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:08:57 2007 +0100 i2c-ali1563: Improve the status messages Improve the status messages printed by the i2c-ali1563 driver. Signed-off-by: Jean Delvare [EMAIL PROTECTED] Cc: Rudolf Marek [EMAIL PROTECTED] --- drivers/i2c/busses/i2c-ali1563.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-ali1563.c b/drivers/i2c/busses/i2c-ali1563.c index 8e1e3f8..3b0e79b 100644 --- a/drivers/i2c/busses/i2c-ali1563.c +++ b/drivers/i2c/busses/i2c-ali1563.c @@ -328,7 +328,6 @@ static int __devinit ali1563_setup(struct pci_dev * dev) u16 ctrl; pci_read_config_word(dev,ALI1563_SMBBA,ctrl); - printk(ali1563: SMBus control = %04x\n,ctrl); /* Check if device is even enabled first */ if (!(ctrl ALI1563_SMB_IOEN)) { @@ -353,9 +352,11 @@ static int __devinit ali1563_setup(struct pci_dev * dev) } if (!request_region(ali1563_smba, ALI1563_SMB_IOSIZE, ali1563_pci_driver.name)) { - dev_warn(dev-dev,Could not allocate I/O space); + dev_err(dev-dev, Could not allocate I/O space at 0x%04x\n, + ali1563_smba); goto Err; } + dev_info(dev-dev, Found ALi1563 SMBus at 0x%04x\n, ali1563_smba); return 0; Err: @@ -384,13 +385,18 @@ static int __devinit ali1563_probe(struct pci_dev * dev, int error; if ((error = ali1563_setup(dev))) - return error; + goto exit; ali1563_adapter.dev.parent = dev-dev; sprintf(ali1563_adapter.name,SMBus ALi 1563 Adapter @ %04x, ali1563_smba); if ((error = i2c_add_adapter(ali1563_adapter))) - ali1563_shutdown(dev); - printk(%s: Returning %d\n,__FUNCTION__,error); + goto exit_shutdown; + return 0; + +exit_shutdown: + ali1563_shutdown(dev); +exit: + dev_warn(dev-dev, ALi1563 SMBus probe failed (%d)\n, error); return error; } - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c/vt8231: Remove superfluous initialization
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bbeaeef73a0b0a5c43ad2657b61857167d914a55 Commit: bbeaeef73a0b0a5c43ad2657b61857167d914a55 Parent: 849be516c57501ec4729bde51babc25a7b073b65 Author: David Brownell [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:08:58 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:08:58 2007 +0100 i2c/vt8231: Remove superfluous initialization Remove a superfluous initialization from the vt8231 hwmon driver; the i2c core does this, and the source field will be vanishing soon. Signed-off-by: David Brownell [EMAIL PROTECTED] Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- drivers/hwmon/vt8231.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/hwmon/vt8231.c b/drivers/hwmon/vt8231.c index 93f93d4..a6a4aa0 100644 --- a/drivers/hwmon/vt8231.c +++ b/drivers/hwmon/vt8231.c @@ -727,7 +727,6 @@ int vt8231_detect(struct i2c_adapter *adapter) client-addr = isa_address; client-adapter = adapter; client-driver = vt8231_driver; - client-dev.parent = adapter-dev; /* Fill in the remaining client fields and put into the global list */ strlcpy(client-name, vt8231, I2C_NAME_SIZE); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c-nforce2: Drop unused reference to pci_dev
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4ef0ce90df3763e277b5307fb580ff1cdaaad7b2 Commit: 4ef0ce90df3763e277b5307fb580ff1cdaaad7b2 Parent: bbeaeef73a0b0a5c43ad2657b61857167d914a55 Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:08:58 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:08:58 2007 +0100 i2c-nforce2: Drop unused reference to pci_dev Signed-off-by: Jean Delvare [EMAIL PROTECTED] Cc: Hans-Frieder Vogt [EMAIL PROTECTED] --- drivers/i2c/busses/i2c-nforce2.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index ad37c10..69d0730 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c @@ -57,7 +57,6 @@ MODULE_DESCRIPTION(nForce2/3/4/5xx SMBus driver); struct nforce2_smbus { - struct pci_dev *dev; struct i2c_adapter adapter; int base; int size; @@ -230,7 +229,6 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar, smbus-base = iobase PCI_BASE_ADDRESS_IO_MASK; smbus-size = 64; } - smbus-dev = dev; if (!request_region(smbus-base, smbus-size, nforce2_driver.name)) { dev_err(smbus-adapter.dev, Error requesting region %02x .. %02X for %s\n, - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c-piix4: Add support for the ATI SB600
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e6697fcc194db8b45559a9863947c6cbfeea363 Commit: 4e6697fcc194db8b45559a9863947c6cbfeea363 Parent: 4ef0ce90df3763e277b5307fb580ff1cdaaad7b2 Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:08:59 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:08:59 2007 +0100 i2c-piix4: Add support for the ATI SB600 Add support for the ATI SB600 SMBus controller. Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- Documentation/i2c/busses/i2c-piix4 |2 +- drivers/i2c/busses/Kconfig |1 + drivers/i2c/busses/i2c-piix4.c |3 +++ include/linux/pci_ids.h|1 + 4 files changed, 6 insertions(+), 1 deletions(-) diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4 index 9214763..7cbe43f 100644 --- a/Documentation/i2c/busses/i2c-piix4 +++ b/Documentation/i2c/busses/i2c-piix4 @@ -6,7 +6,7 @@ Supported adapters: Datasheet: Publicly available at the Intel website * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges Datasheet: Only available via NDA from ServerWorks - * ATI IXP southbridges IXP200, IXP300, IXP400 + * ATI IXP200, IXP300, IXP400 and SB600 southbridges Datasheet: Not publicly available * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge Datasheet: Publicly available at the SMSC website http://www.smsc.com diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 9367c4c..f2894de 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -183,6 +183,7 @@ config I2C_PIIX4 ATI IXP200 ATI IXP300 ATI IXP400 + ATI SB600 Serverworks OSB4 Serverworks CSB5 Serverworks CSB6 diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 30c7a1b..07546c2 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -23,6 +23,7 @@ Supports: Intel PIIX4, 440MX Serverworks OSB4, CSB5, CSB6, HT-1000 + ATI IXP200, IXP300, IXP400, SB600 SMSC Victory66 Note: we assume there can only be one device, with one SMBus interface. @@ -396,6 +397,8 @@ static struct pci_device_id piix4_ids[] = { .driver_data = 0 }, { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS), .driver_data = 0 }, + { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SMBUS), + .driver_data = 0 }, { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4), .driver_data = 0 }, { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5), diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 8fb9c3e..182a96f 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -369,6 +369,7 @@ #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 #define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381 +#define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c #define PCI_VENDOR_ID_VLSI 0x1004 - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c: Fix typo in SMBus Write Word Data description
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3f9a4790a3818af1228c7fb4286afd66f3201fd0 Commit: 3f9a4790a3818af1228c7fb4286afd66f3201fd0 Parent: 4e6697fcc194db8b45559a9863947c6cbfeea363 Author: Mike Frysinger [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:08:59 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:08:59 2007 +0100 i2c: Fix typo in SMBus Write Word Data description Write data, don't read it. Signed-off-by: Mike Frysinger [EMAIL PROTECTED] Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- Documentation/i2c/smbus-protocol |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/i2c/smbus-protocol b/Documentation/i2c/smbus-protocol index 09f5e5c..8a653c6 100644 --- a/Documentation/i2c/smbus-protocol +++ b/Documentation/i2c/smbus-protocol @@ -97,7 +97,7 @@ SMBus Write Word Data = This is the opposite operation of the Read Word Data command. 16 bits -of data is read from a device, from a designated register that is +of data is written to a device, to the designated register that is specified through the Comm byte. S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c-i801: Spelling fix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fcdd96ecaf04fb4f229ac1a64fe77fda890dffd5 Commit: fcdd96ecaf04fb4f229ac1a64fe77fda890dffd5 Parent: 3f9a4790a3818af1228c7fb4286afd66f3201fd0 Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:08:59 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:08:59 2007 +0100 i2c-i801: Spelling fix Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- drivers/i2c/busses/i2c-i801.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index ae625b8..de5e23a 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -123,7 +123,7 @@ static int i801_transaction(void) dev_dbg(I801_dev-dev, Failed! (%02x)\n, temp); return -1; } else { - dev_dbg(I801_dev-dev, Successfull!\n); + dev_dbg(I801_dev-dev, Successful!\n); } } - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c-i801: Document the SMBus unhiding quirk
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=099ab118b6b194ad43865f62776a0d36d4b1c7d2 Commit: 099ab118b6b194ad43865f62776a0d36d4b1c7d2 Parent: fcdd96ecaf04fb4f229ac1a64fe77fda890dffd5 Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:00 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:00 2007 +0100 i2c-i801: Document the SMBus unhiding quirk This is a frequently asked question so it deserves a paragraph in the driver documentation. Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- Documentation/i2c/busses/i2c-i801 | 60 +--- 1 files changed, 55 insertions(+), 5 deletions(-) diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801 index 3db69a0..c34f0db 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 @@ -48,14 +48,9 @@ following: The SMBus controller is function 3 in device 1f. Class 0c05 is SMBus Serial Controller. -If you do NOT see the 24x3 device at function 3, and you can't figure out -any way in the BIOS to enable it, - The ICH chips are quite similar to Intel's PIIX4 chip, at least in the SMBus controller. -See the file i2c-piix4 for some additional information. - Process Call Support @@ -74,6 +69,61 @@ SMBus 2.0 Support The 82801DB (ICH4) and later chips support several SMBus 2.0 features. + +Hidden ICH SMBus + + +If your system has an Intel ICH south bridge, but you do NOT see the +SMBus device at 00:1f.3 in lspci, and you can't figure out any way in the +BIOS to enable it, it means it has been hidden by the BIOS code. Asus is +well known for first doing this on their P4B motherboard, and many other +boards after that. Some vendor machines are affected as well. + +The first thing to try is the i2c_ec ACPI driver. It could be that the +SMBus was hidden on purpose because it'll be driven by ACPI. If the +i2c_ec driver works for you, just forget about the i2c-i801 driver and +don't try to unhide the ICH SMBus. Even if i2c_ec doesn't work, you +better make sure that the SMBus isn't used by the ACPI code. Try loading +the fan and thermal drivers, and check in /proc/acpi/fan and +/proc/acpi/thermal_zone. If you find anything there, it's likely that +the ACPI is accessing the SMBus and it's safer not to unhide it. Only +once you are certain that ACPI isn't using the SMBus, you can attempt +to unhide it. + +In order to unhide the SMBus, we need to change the value of a PCI +register before the kernel enumerates the PCI devices. This is done in +drivers/pci/quirks.c, where all affected boards must be listed (see +function asus_hides_smbus_hostbridge.) If the SMBus device is missing, +and you think there's something interesting on the SMBus (e.g. a +hardware monitoring chip), you need to add your board to the list. + +The motherboard is identified using the subvendor and subdevice IDs of the +host bridge PCI device. Get yours with lspci -n -v -s 00:00.0: + +00:00.0 Class 0600: 8086:2570 (rev 02) +Subsystem: 1043:80f2 +Flags: bus master, fast devsel, latency 0 +Memory at fc00 (32-bit, prefetchable) [size=32M] +Capabilities: [e4] #09 [2106] +Capabilities: [a0] AGP version 3.0 + +Here the host bridge ID is 2570 (82865G/PE/P), the subvendor ID is 1043 +(Asus) and the subdevice ID is 80f2 (P4P800-X). You can find the symbolic +names for the bridge ID and the subvendor ID in include/linux/pci_ids.h, +and then add a case for your subdevice ID at the right place in +drivers/pci/quirks.c. Then please give it very good testing, to make sure +that the unhidden SMBus doesn't conflict with e.g. ACPI. + +If it works, proves useful (i.e. there are usable chips on the SMBus) +and seems safe, please submit a patch for inclusion into the kernel. + +Note: There's a useful script in lm_sensors 2.10.2 and later, named +unhide_ICH_SMBus (in prog/hotplug), which uses the fakephp driver to +temporarily unhide the SMBus without having to patch and recompile your +kernel. It's very convenient if you just want to check if there's +anything interesting on your hidden ICH SMBus. + + ** The lm_sensors project gratefully acknowledges the support of Texas Instruments in the initial development of this driver. - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c: completion header cleanups
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b8d6f45b32f6fe72bf7304183275e99332544ce1 Commit: b8d6f45b32f6fe72bf7304183275e99332544ce1 Parent: 099ab118b6b194ad43865f62776a0d36d4b1c7d2 Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:00 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:00 2007 +0100 i2c: completion header cleanups i2c-core and i2c-isa use completions without including linux/completion.h. Fix it. i2c-powermac includes linux/completion.h but doesn't use any completion. Fix it. Signed-off-by: Jean Delvare [EMAIL PROTECTED] Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Cc: David Brownell [EMAIL PROTECTED] --- drivers/i2c/busses/i2c-isa.c |1 + drivers/i2c/busses/i2c-powermac.c |1 - drivers/i2c/i2c-core.c|1 + 3 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c index 8ed59a2..5f33bc9 100644 --- a/drivers/i2c/busses/i2c-isa.c +++ b/drivers/i2c/busses/i2c-isa.c @@ -39,6 +39,7 @@ #include linux/i2c.h #include linux/i2c-isa.h #include linux/platform_device.h +#include linux/completion.h static u32 isa_func(struct i2c_adapter *adapter); diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 648d555..1425d22 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c @@ -25,7 +25,6 @@ #include linux/types.h #include linux/i2c.h #include linux/init.h -#include linux/completion.h #include linux/device.h #include linux/platform_device.h #include asm/prom.h diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index b05378a..60f6eb1 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -32,6 +32,7 @@ #include linux/seq_file.h #include linux/platform_device.h #include linux/mutex.h +#include linux/completion.h #include asm/uaccess.h - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c: Add driver suspend/resume/shutdown support
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f37dd80ac2a67e4e4e921f99d34a1ceeb2488abb Commit: f37dd80ac2a67e4e4e921f99d34a1ceeb2488abb Parent: b8d6f45b32f6fe72bf7304183275e99332544ce1 Author: David Brownell [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:00 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:00 2007 +0100 i2c: Add driver suspend/resume/shutdown support Driver model updates for the I2C core: - Add new suspend(), resume(), and shutdown() methods. Use them in the standard driver model style; document them. - Minor doc updates to highlight zero-initialized fields in drivers, and the driver model accessors for clientdata. If any i2c drivers were previously using the old suspend/resume calls in struct driver, they were getting warning messages ... and will now no longer work. Other than that, this patch changes no behaviors; and it lets I2C drivers use conventional PM and shutdown support. Signed-off-by: David Brownell [EMAIL PROTECTED] Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- Documentation/i2c/porting-clients |6 +++ Documentation/i2c/writing-clients | 58 - drivers/i2c/i2c-core.c| 65 + include/linux/i2c.h |7 +++- 4 files changed, 105 insertions(+), 31 deletions(-) diff --git a/Documentation/i2c/porting-clients b/Documentation/i2c/porting-clients index f03c2a0..ca272b2 100644 --- a/Documentation/i2c/porting-clients +++ b/Documentation/i2c/porting-clients @@ -129,6 +129,12 @@ Technical changes: structure, those name member should be initialized to a driver name string. i2c_driver itself has no name member anymore. +* [Driver model] Instead of shutdown or reboot notifiers, provide a + shutdown() method in your driver. + +* [Power management] Use the driver model suspend() and resume() + callbacks instead of the obsolete pm_register() calls. + Coding policy: * [Copyright] Use (C), not (c), for copyright. diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 3a057c8..fbcff96 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients @@ -21,20 +21,26 @@ The driver structure Usually, you will implement a single driver structure, and instantiate all clients from it. Remember, a driver structure contains general access -routines, a client structure specific information like the actual I2C -address. +routines, and should be zero-initialized except for fields with data you +provide. A client structure holds device-specific information like the +driver model device node, and its I2C address. static struct i2c_driver foo_driver = { .driver = { .name = foo, }, - .attach_adapter = foo_attach_adapter, - .detach_client = foo_detach_client, - .command= foo_command /* may be NULL */ + .attach_adapter = foo_attach_adapter, + .detach_client = foo_detach_client, + .shutdown = foo_shutdown, /* optional */ + .suspend= foo_suspend, /* optional */ + .resume = foo_resume, /* optional */ + .command= foo_command, /* optional */ } -The name field must match the driver name, including the case. It must not -contain spaces, and may be up to 31 characters long. +The name field is the driver name, and must not contain spaces. It +should match the module name (if the driver can be compiled as a module), +although you can use MODULE_ALIAS (passing foo in this example) to add +another name for the module. All other fields are for call-back functions which will be explained below. @@ -43,11 +49,18 @@ below. Extra client data = -The client structure has a special `data' field that can point to any -structure at all. You can use this to keep client-specific data. You +Each client structure has a special `data' field that can point to any +structure at all. You should use this to keep device-specific data, +especially in drivers that handle multiple I2C or SMBUS devices. You do not always need this, but especially for `sensors' drivers, it can be very useful. + /* store the value */ + void i2c_set_clientdata(struct i2c_client *client, void *data); + + /* retrieve the value */ + void *i2c_get_clientdata(struct i2c_client *client); + An example structure is below. struct foo_data { @@ -493,6 +506,33 @@ by `__init_data'. Hose functions and structures can be removed after kernel booting (or module loading) is completed. +Power Management + + +If your I2C device needs special handling when entering a system low +power state -- like putting a transceiver into a low power mode, or +activating a system wakeup mechanism -- do that in the suspend()
i2c: Update the list of bus IDs
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a394ae15427f215b43fca21f3c9370b0e63ba252 Commit: a394ae15427f215b43fca21f3c9370b0e63ba252 Parent: f37dd80ac2a67e4e4e921f99d34a1ceeb2488abb Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:01 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:01 2007 +0100 i2c: Update the list of bus IDs * The Voodoo3 has no SMBus, it has two bit-banged busses which already have an ID assigned (I2C_HW_B_VOO). * The i2c-ipmi bus driver was a non-sense, it'll never be ported to Linux 2.6. Signed-off-by: Jean Delvare [EMAIL PROTECTED] Acked-by: Yani Ioannou [EMAIL PROTECTED] --- include/linux/i2c-id.h |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 6e7ec4c..b65c1c9 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -232,7 +232,6 @@ #define I2C_HW_SMBUS_PIIX4 0x04 #define I2C_HW_SMBUS_ALI15X3 0x040001 #define I2C_HW_SMBUS_VIA2 0x040002 -#define I2C_HW_SMBUS_VOODOO3 0x040003 #define I2C_HW_SMBUS_I801 0x040004 #define I2C_HW_SMBUS_AMD7560x040005 #define I2C_HW_SMBUS_SIS5595 0x040006 @@ -252,9 +251,6 @@ /* --- ISA pseudo-adapter */ #define I2C_HW_ISA 0x05 -/* --- IPMI pseudo-adapter */ -#define I2C_HW_IPMI0x0b - /* --- IPMB adapter*/ #define I2C_HW_IPMB0x0c - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c: Add IDs to adapters
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ace555d7d87c55ceab6999be444c9a17e0e79b4 Commit: 9ace555d7d87c55ceab6999be444c9a17e0e79b4 Parent: a394ae15427f215b43fca21f3c9370b0e63ba252 Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:01 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:01 2007 +0100 i2c: Add IDs to adapters IDs have been defined but not used by most of the I2C adapters. By having a unique ID, clients can check for correct connection during probe. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- drivers/i2c/busses/i2c-ali1535.c |1 + drivers/i2c/busses/i2c-ali1563.c |1 + drivers/i2c/busses/i2c-ali15x3.c |1 + drivers/i2c/busses/i2c-amd756.c |1 + drivers/i2c/busses/i2c-amd8111.c |1 + drivers/i2c/busses/i2c-i801.c|1 + drivers/i2c/busses/i2c-i810.c|2 ++ drivers/i2c/busses/i2c-nforce2.c |1 + drivers/i2c/busses/i2c-piix4.c |1 + drivers/i2c/busses/i2c-savage4.c |1 + drivers/i2c/busses/i2c-sis5595.c |1 + drivers/i2c/busses/i2c-sis630.c |1 + drivers/i2c/busses/i2c-sis96x.c |1 + drivers/i2c/busses/i2c-via.c |1 + drivers/i2c/busses/i2c-viapro.c |1 + drivers/i2c/busses/i2c-voodoo3.c |2 ++ drivers/i2c/busses/scx200_i2c.c |1 + include/linux/i2c-id.h |1 + 18 files changed, 20 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c index e75d339..0b0a87b 100644 --- a/drivers/i2c/busses/i2c-ali1535.c +++ b/drivers/i2c/busses/i2c-ali1535.c @@ -475,6 +475,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter ali1535_adapter = { .owner = THIS_MODULE, + .id = I2C_HW_SMBUS_ALI1535, .class = I2C_CLASS_HWMON, .algo = smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-ali1563.c b/drivers/i2c/busses/i2c-ali1563.c index 55ebbef..6b68074 100644 --- a/drivers/i2c/busses/i2c-ali1563.c +++ b/drivers/i2c/busses/i2c-ali1563.c @@ -370,6 +370,7 @@ static const struct i2c_algorithm ali1563_algorithm = { static struct i2c_adapter ali1563_adapter = { .owner = THIS_MODULE, + .id = I2C_HW_SMBUS_ALI1563, .class = I2C_CLASS_HWMON, .algo = ali1563_algorithm, }; diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c index 3f11b6e..c537441 100644 --- a/drivers/i2c/busses/i2c-ali15x3.c +++ b/drivers/i2c/busses/i2c-ali15x3.c @@ -470,6 +470,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter ali15x3_adapter = { .owner = THIS_MODULE, + .id = I2C_HW_SMBUS_ALI15X3, .class = I2C_CLASS_HWMON, .algo = smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c index 2d21afd..91fbc0e 100644 --- a/drivers/i2c/busses/i2c-amd756.c +++ b/drivers/i2c/busses/i2c-amd756.c @@ -301,6 +301,7 @@ static const struct i2c_algorithm smbus_algorithm = { struct i2c_adapter amd756_smbus = { .owner = THIS_MODULE, + .id = I2C_HW_SMBUS_AMD756, .class = I2C_CLASS_HWMON, .algo = smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c index 0fbc718..21f8a82 100644 --- a/drivers/i2c/busses/i2c-amd8111.c +++ b/drivers/i2c/busses/i2c-amd8111.c @@ -351,6 +351,7 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_ smbus-adapter.owner = THIS_MODULE; snprintf(smbus-adapter.name, I2C_NAME_SIZE, SMBus2 AMD8111 adapter at %04x, smbus-base); + smbus-adapter.id = I2C_HW_SMBUS_AMD8111; smbus-adapter.class = I2C_CLASS_HWMON; smbus-adapter.algo = smbus_algorithm; smbus-adapter.algo_data = smbus; diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index de5e23a..8c3569a 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -442,6 +442,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter i801_adapter = { .owner = THIS_MODULE, + .id = I2C_HW_SMBUS_I801, .class = I2C_CLASS_HWMON, .algo = smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-i810.c b/drivers/i2c/busses/i2c-i810.c index 10c98bc..42e8d94 100644 --- a/drivers/i2c/busses/i2c-i810.c +++ b/drivers/i2c/busses/i2c-i810.c @@ -171,6 +171,7 @@ static struct i2c_algo_bit_data i810_i2c_bit_data = { static struct i2c_adapter i810_i2c_adapter = { .owner = THIS_MODULE, + .id = I2C_HW_B_I810, .name = I810/I815 I2C Adapter,
i2c-viapro: Add support for the VIA CX700 south bridge
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab6a6ed271c757b429ddc68f5b93a41f9592ab8b Commit: ab6a6ed271c757b429ddc68f5b93a41f9592ab8b Parent: 9ace555d7d87c55ceab6999be444c9a17e0e79b4 Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:02 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:02 2007 +0100 i2c-viapro: Add support for the VIA CX700 south bridge We do not have any documentation for the CX700, but it was reported to work fine. Thanks to Claas Langbehn for testing. Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- Documentation/i2c/busses/i2c-viapro |7 +++ drivers/i2c/busses/Kconfig |5 +++-- drivers/i2c/busses/i2c-viapro.c |6 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/i2c/busses/i2c-viapro b/Documentation/i2c/busses/i2c-viapro index 2568034..775f489 100644 --- a/Documentation/i2c/busses/i2c-viapro +++ b/Documentation/i2c/busses/i2c-viapro @@ -13,6 +13,9 @@ Supported adapters: * VIA Technologies, Inc. VT8235, VT8237R, VT8237A, VT8251 Datasheet: available on request and under NDA from VIA + * VIA Technologies, Inc. CX700 +Datasheet: available on request and under NDA from VIA + Authors: Ky�sti M�lkki [EMAIL PROTECTED], Mark D. Studebaker [EMAIL PROTECTED], @@ -44,6 +47,7 @@ Your lspci -n listing must show one of these : device 1106:3227 (VT8237R) device 1106:3337 (VT8237A) device 1106:3287 (VT8251) + device 1106:8324 (CX700) If none of these show up, you should look in the BIOS for settings like enable ACPI / SMBus or even USB. @@ -51,3 +55,6 @@ enable ACPI / SMBus or even USB. Except for the oldest chips (VT82C596A/B, VT82C686A and most probably VT8231), this driver supports I2C block transactions. Such transactions are mainly useful to read from and write to EEPROMs. + +The CX700 additionally appears to support SMBus PEC, although this driver +doesn't implement it yet. diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index f2894de..25d52e0 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -500,11 +500,11 @@ config I2C_VIA will be called i2c-via. config I2C_VIAPRO - tristate VIA 82C596/82C686/82xx + tristate VIA VT82C596/82C686/82xx and CX700 depends on I2C PCI help If you say yes to this option, support will be included for the VIA - 82C596/82C686/82xx I2C interfaces. Specifically, the following + VT82C596 and later SMBus interface. Specifically, the following chipsets are supported: VT82C596A/B VT82C686A/B @@ -513,6 +513,7 @@ config I2C_VIAPRO VT8235 VT8237R/A VT8251 + CX700 This driver can also be built as a module. If so, the module will be called i2c-viapro. diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index 43a081f..03c5fc8 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c @@ -4,7 +4,7 @@ Copyright (c) 1998 - 2002 Frodo Looijaard [EMAIL PROTECTED], Philip Edelbrock [EMAIL PROTECTED], Ky�sti M�lkki [EMAIL PROTECTED], Mark D. Studebaker [EMAIL PROTECTED] -Copyright (C) 2005 Jean Delvare [EMAIL PROTECTED] +Copyright (C) 2005 - 2007 Jean Delvare [EMAIL PROTECTED] This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,6 +36,7 @@ VT8237R0x3227 yes VT8237A0x3337 yes VT8251 0x3287 yes + CX700 0x8324 yes Note: we assume there can only be one device, with one SMBus interface. */ @@ -384,6 +385,7 @@ found: dev_dbg(pdev-dev, VT596_smba = 0x%X\n, vt596_smba); switch (pdev-device) { + case PCI_DEVICE_ID_VIA_CX700: case PCI_DEVICE_ID_VIA_8251: case PCI_DEVICE_ID_VIA_8237: case PCI_DEVICE_ID_VIA_8237A: @@ -443,6 +445,8 @@ static struct pci_device_id vt596_ids[] = { .driver_data = SMBBA1 }, { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8251), .driver_data = SMBBA3 }, + { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_CX700), + .driver_data = SMBBA3 }, { 0, } }; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c-parport: Add support for One For All remote JP1 interface
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=55249cf750e4d9be19c7f8afd502c9ca42de8858 Commit: 55249cf750e4d9be19c7f8afd502c9ca42de8858 Parent: ab6a6ed271c757b429ddc68f5b93a41f9592ab8b Author: Jonathan McDowell [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:02 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:02 2007 +0100 i2c-parport: Add support for One For All remote JP1 interface This simple patch adds support to i2c-parport for the One For All remote JP1 parallel port interfaces which can be found detailed at: http://www.hifi-remote.com/jp1/hardware.shtml These allow access to the internal configuration EEPROM on various remote controls and there are a variety of Windows tools that make use of this hardware. I have tested this patch with the simple parallel port device and a One For All URC-7562 and confirmed that the data read using the eeprom i2c driver matches that returned by the Windows IR JP1 tool. Signed-off-by: Jonathan McDowell [EMAIL PROTECTED] Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- Documentation/i2c/busses/i2c-parport | 15 +++ drivers/i2c/busses/i2c-parport.h |8 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/Documentation/i2c/busses/i2c-parport b/Documentation/i2c/busses/i2c-parport index 77b995d..dceaba1 100644 --- a/Documentation/i2c/busses/i2c-parport +++ b/Documentation/i2c/busses/i2c-parport @@ -19,6 +19,7 @@ It currently supports the following devices: * (type=4) Analog Devices ADM1032 evaluation board * (type=5) Analog Devices evaluation boards: ADM1025, ADM1030, ADM1031 * (type=6) Barco LPT-DVI (K5800236) adapter + * (type=7) One For All JP1 parallel port adapter These devices use different pinout configurations, so you have to tell the driver what you have, using the type module parameter. There is no @@ -157,3 +158,17 @@ many more, using /dev/velleman. http://home.wanadoo.nl/hihihi/libk8005.htm http://struyve.mine.nu:8080/index.php?block=k8000 http://sourceforge.net/projects/libk8005/ + + +One For All JP1 parallel port adapter +- + +The JP1 project revolves around a set of remote controls which expose +the I2C bus their internal configuration EEPROM lives on via a 6 pin +jumper in the battery compartment. More details can be found at: + +http://www.hifi-remote.com/jp1/ + +Details of the simple parallel port hardware can be found at: + +http://www.hifi-remote.com/jp1/hardware.shtml diff --git a/drivers/i2c/busses/i2c-parport.h b/drivers/i2c/busses/i2c-parport.h index 9ddd816..ed69d84 100644 --- a/drivers/i2c/busses/i2c-parport.h +++ b/drivers/i2c/busses/i2c-parport.h @@ -88,6 +88,13 @@ static struct adapter_parm adapter_parm[] = { .getscl = { 0x40, STAT, 0 }, .init = { 0xfc, DATA, 0 }, }, + /* type 7: One For All JP1 parallel port adapter */ + { + .setsda = { 0x01, DATA, 0 }, + .setscl = { 0x02, DATA, 0 }, + .getsda = { 0x80, STAT, 1 }, + .init = { 0x04, DATA, 1 }, + }, }; static int type = -1; @@ -101,4 +108,5 @@ MODULE_PARM_DESC(type, 4 = ADM1032 evaluation board\n 5 = ADM1025, ADM1030 and ADM1031 evaluation boards\n 6 = Barco LPT-DVI (K5800236) adapter\n +7 = One For All JP1 parallel port adapter\n ); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c: PA Semi SMBus driver
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=beb58aa39e6e5a52875defe12c7697b0bfa95d4c Commit: beb58aa39e6e5a52875defe12c7697b0bfa95d4c Parent: 88b9e750e974febd9128fc622109c526a9d22c10 Author: Olof Johansson [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:03 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:03 2007 +0100 i2c: PA Semi SMBus driver New driver for the PA Semi SMBus interfaces. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- MAINTAINERS |6 + drivers/i2c/busses/Kconfig |7 + drivers/i2c/busses/Makefile |1 + drivers/i2c/busses/i2c-pasemi.c | 426 +++ 4 files changed, 440 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f85c603..93a338d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2523,6 +2523,12 @@ M: [EMAIL PROTECTED] L: netdev@vger.kernel.org S: Maintained +PA SEMI SMBUS DRIVER +P: Olof Johansson +M: [EMAIL PROTECTED] +L: [EMAIL PROTECTED] +S: Maintained + PARALLEL PORT SUPPORT P: Phil Blundell M: [EMAIL PROTECTED] diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 25d52e0..4d44a2d 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -342,6 +342,13 @@ config I2C_PARPORT_LIGHT This support is also available as a module. If so, the module will be called i2c-parport-light. +config I2C_PASEMI + tristate PA Semi SMBus interface +# depends on PPC_PASEMI I2C PCI + depends on I2C PCI + help + Supports the PA Semi PWRficient on-chip SMBus interfaces. + config I2C_PROSAVAGE tristate S3/VIA (Pro)Savage depends on I2C PCI diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile index 37196c1..03505aa 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -27,6 +27,7 @@ obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o obj-$(CONFIG_I2C_OMAP) += i2c-omap.o obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o obj-$(CONFIG_I2C_PARPORT_LIGHT)+= i2c-parport-light.o +obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi.o obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o obj-$(CONFIG_I2C_PIIX4)+= i2c-piix4.o obj-$(CONFIG_I2C_PNX) += i2c-pnx.o diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c new file mode 100644 index 000..f54fb5d --- /dev/null +++ b/drivers/i2c/busses/i2c-pasemi.c @@ -0,0 +1,426 @@ +/* + * Copyright (C) 2006-2007 PA Semi, Inc + * + * SMBus host driver for PA Semi PWRficient + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 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 + */ + +#include linux/module.h +#include linux/pci.h +#include linux/kernel.h +#include linux/stddef.h +#include linux/sched.h +#include linux/i2c.h +#include linux/delay.h +#include asm/io.h + +static struct pci_driver pasemi_smb_driver; + +struct pasemi_smbus { + struct pci_dev *dev; + struct i2c_adapter adapter; + unsigned longbase; + int size; +}; + +/* Register offsets */ +#define REG_MTXFIFO0x00 +#define REG_MRXFIFO0x04 +#define REG_SMSTA 0x14 +#define REG_CTL0x1c + +/* Register defs */ +#define MTXFIFO_READ 0x0400 +#define MTXFIFO_STOP 0x0200 +#define MTXFIFO_START 0x0100 +#define MTXFIFO_DATA_M 0x00ff + +#define MRXFIFO_EMPTY 0x0100 +#define MRXFIFO_DATA_M 0x00ff + +#define SMSTA_XEN 0x0800 + +#define CTL_MRR0x0400 +#define CTL_MTR0x0200 +#define CTL_CLK_M 0x00ff + +#define CLK_100K_DIV 84 +#define CLK_400K_DIV 21 + +static inline void reg_write(struct pasemi_smbus *smbus, int reg, int val) +{ + dev_dbg(smbus-dev-dev, smbus write reg %lx val %08x\n, + smbus-base + reg, val); + outl(val, smbus-base + reg); +} + +static inline int reg_read(struct pasemi_smbus *smbus, int reg) +{ + int ret; + ret = inl(smbus-base + reg); + dev_dbg(smbus-dev-dev, smbus read reg %lx val %08x\n, + smbus-base + reg, ret); + return ret; +} + +#define TXFIFO_WR(smbus, reg) reg_write((smbus), REG_MTXFIFO,
i2c: Declare more i2c_adapter parent devices
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=12a917f69d1468c91d646dbad8408dd0d39d6207 Commit: 12a917f69d1468c91d646dbad8408dd0d39d6207 Parent: beb58aa39e6e5a52875defe12c7697b0bfa95d4c Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:03 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:03 2007 +0100 i2c: Declare more i2c_adapter parent devices Declare the parent device of i2c_adapter devices each time we can easily do so. It makes the i2c_adapter appear at the right place in the device tree, rather than as a platform device. Signed-off-by: Jean Delvare [EMAIL PROTECTED] Cc: David Brownell [EMAIL PROTECTED] Cc: Len Brown [EMAIL PROTECTED] Cc: Jordan Crouse [EMAIL PROTECTED] Cc: Jody McIntyre [EMAIL PROTECTED] Cc: Stefan Richter [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Cc: Petr Vandrovec [EMAIL PROTECTED] --- drivers/acpi/i2c_ec.c |1 + drivers/i2c/busses/i2c-amd756-s4882.c |2 ++ drivers/i2c/busses/i2c-ibm_iic.c |1 + drivers/i2c/busses/i2c-mv64xxx.c |1 + drivers/i2c/busses/scx200_acb.c |7 --- drivers/ieee1394/pcilynx.c|1 + drivers/media/dvb/b2c2/flexcop-i2c.c |1 + drivers/media/dvb/dvb-usb/dvb-usb-i2c.c |1 + drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c |1 + drivers/media/video/cafe_ccic.c |1 + drivers/media/video/pvrusb2/pvrusb2-i2c-core.c|1 + drivers/media/video/usbvision/usbvision-i2c.c |1 + drivers/media/video/w9968cf.c |1 + drivers/media/video/zoran_card.c |1 + drivers/video/matrox/i2c-matroxfb.c |1 + 15 files changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/i2c_ec.c b/drivers/acpi/i2c_ec.c index 8338be0..bb54b6c 100644 --- a/drivers/acpi/i2c_ec.c +++ b/drivers/acpi/i2c_ec.c @@ -340,6 +340,7 @@ static int acpi_ec_hc_add(struct acpi_device *device) smbus-adapter.owner = THIS_MODULE; smbus-adapter.algo = acpi_ec_smbus_algorithm; smbus-adapter.algo_data = smbus; + smbus-adapter.dev.parent = device-dev; if (i2c_add_adapter(smbus-adapter)) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c index 08e9157..e5e96c8 100644 --- a/drivers/i2c/busses/i2c-amd756-s4882.c +++ b/drivers/i2c/busses/i2c-amd756-s4882.c @@ -184,12 +184,14 @@ static int __init amd756_s4882_init(void) s4882_algo[0].smbus_xfer = amd756_access_virt0; s4882_adapter[0] = amd756_smbus; s4882_adapter[0].algo = s4882_algo; + s4882_adapter[0].dev.parent = amd756_smbus.dev.parent; for (i = 1; i 5; i++) { s4882_algo[i] = *(amd756_smbus.algo); s4882_adapter[i] = amd756_smbus; sprintf(s4882_adapter[i].name, SMBus 8111 adapter (CPU%d), i-1); s4882_adapter[i].algo = s4882_algo+i; + s4882_adapter[i].dev.parent = amd756_smbus.dev.parent; } s4882_algo[1].smbus_xfer = amd756_access_virt1; s4882_algo[2].smbus_xfer = amd756_access_virt2; diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 1898e99..8b14d14 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -727,6 +727,7 @@ static int __devinit iic_probe(struct ocp_device *ocp){ /* Register it with i2c layer */ adap = dev-adap; + adap-dev.parent = ocp-dev; strcpy(adap-name, IBM IIC); i2c_set_adapdata(adap, dev); adap-id = I2C_HW_OCP; diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index 4901736..a3283b9 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -520,6 +520,7 @@ mv64xxx_i2c_probe(struct platform_device *pd) rc = -ENXIO; goto exit_unmap_regs; } + drv_data-adapter.dev.parent = pd-dev; drv_data-adapter.id = I2C_HW_MV64XXX; drv_data-adapter.algo = mv64xxx_i2c_algo; drv_data-adapter.owner = THIS_MODULE; diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index 714bae7..0b082c5 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -428,7 +428,7 @@ static __init int scx200_acb_probe(struct scx200_acb_iface *iface) } static __init struct scx200_acb_iface *scx200_create_iface(const char *text, - int index) + struct device *dev, int index) { struct scx200_acb_iface *iface; struct i2c_adapter *adapter; @@ -446,6 +446,7 @@ static __init struct scx200_acb_iface
i2c: Remove the warning on missing adapter device
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fe2c8d51af96ef7b8ec0bfd70ec62bbe32c0696e Commit: fe2c8d51af96ef7b8ec0bfd70ec62bbe32c0696e Parent: 12a917f69d1468c91d646dbad8408dd0d39d6207 Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:04 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:04 2007 +0100 i2c: Remove the warning on missing adapter device Now that the i2c_adapter migration plan changed and we are going to keep i2c_adapter.dev, it's no longer that urgent to add a proper device to all i2c_adapter drivers. Thus is seems resonable to degrade the warning asking authors to migrate their driver to a debug message. Signed-off-by: Jean Delvare [EMAIL PROTECTED] --- drivers/i2c/i2c-core.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 9653f7f..21fe140 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -217,9 +217,8 @@ int i2c_add_adapter(struct i2c_adapter *adap) */ if (adap-dev.parent == NULL) { adap-dev.parent = platform_bus; - printk(KERN_WARNING **WARNING** I2C adapter driver [%s] - forgot to specify physical device; fix it!\n, - adap-name); + pr_debug(I2C adapter driver [%s] forgot to specify +physical device\n, adap-name); } sprintf(adap-dev.bus_id, i2c-%d, adap-nr); adap-dev.driver = i2c_adapter_driver; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
i2c: Stop using i2c_adapter.class_dev
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5dd3ffae0afe355738eca14da1b47284bdae6240 Commit: 5dd3ffae0afe355738eca14da1b47284bdae6240 Parent: fe2c8d51af96ef7b8ec0bfd70ec62bbe32c0696e Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Tue Feb 13 22:09:04 2007 +0100 Committer: Jean Delvare [EMAIL PROTECTED] CommitDate: Tue Feb 13 22:09:04 2007 +0100 i2c: Stop using i2c_adapter.class_dev Stop using i2c_adapter.class_dev, as it is going to be removed soon. Luckily, there are only 4 RTC drivers affected. Signed-off-by: Jean Delvare [EMAIL PROTECTED] Cc: Alessandro Zummo [EMAIL PROTECTED] --- drivers/rtc/rtc-ds1672.c |2 +- drivers/rtc/rtc-pcf8563.c |2 +- drivers/rtc/rtc-rs5c372.c |2 +- drivers/rtc/rtc-x1205.c |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-ds1672.c b/drivers/rtc/rtc-ds1672.c index 205fa28..dfef163 100644 --- a/drivers/rtc/rtc-ds1672.c +++ b/drivers/rtc/rtc-ds1672.c @@ -199,7 +199,7 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind) struct i2c_client *client; struct rtc_device *rtc; - dev_dbg(adapter-class_dev.dev, %s\n, __FUNCTION__); + dev_dbg(adapter-dev, %s\n, __FUNCTION__); if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { err = -ENODEV; diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index 038118b..0242d80 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c @@ -279,7 +279,7 @@ static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind) int err = 0; - dev_dbg(adapter-class_dev.dev, %s\n, __FUNCTION__); + dev_dbg(adapter-dev, %s\n, __FUNCTION__); if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { err = -ENODEV; diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index e7851e3..09bbe57 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -499,7 +499,7 @@ static int rs5c372_probe(struct i2c_adapter *adapter, int address, int kind) struct rs5c372 *rs5c372; struct rtc_time tm; - dev_dbg(adapter-class_dev.dev, %s\n, __FUNCTION__); + dev_dbg(adapter-dev, %s\n, __FUNCTION__); if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { err = -ENODEV; diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c index 019ae25..513d1a6 100644 --- a/drivers/rtc/rtc-x1205.c +++ b/drivers/rtc/rtc-x1205.c @@ -506,7 +506,7 @@ static int x1205_probe(struct i2c_adapter *adapter, int address, int kind) struct i2c_client *client; struct rtc_device *rtc; - dev_dbg(adapter-class_dev.dev, %s\n, __FUNCTION__); + dev_dbg(adapter-dev, %s\n, __FUNCTION__); if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { err = -ENODEV; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] 83xx: Add base support for the MPC8313E RDB
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b359049f270dcaab8a5bbdbb966594c16caba16c Commit: b359049f270dcaab8a5bbdbb966594c16caba16c Parent: 8423200553113cc031caa9b147f6150a8e26545c Author: Kim Phillips [EMAIL PROTECTED] AuthorDate: Wed Feb 7 22:19:12 2007 -0600 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Wed Feb 7 23:44:05 2007 -0600 [POWERPC] 83xx: Add base support for the MPC8313E RDB Add support for the MPC8313E Reference Development Board (RDB). The board is a mini-ITX reference board with 128M DDR2, 8M flash, 32M NAND, USB, PCI, gigabit ethernet, and serial. Signed-off-by: Wilson Lo [EMAIL PROTECTED] Signed-off-by: Scott Wood [EMAIL PROTECTED] Signed-off-by: Kim Phillips [EMAIL PROTECTED] Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mpc8313erdb.dts | 219 + arch/powerpc/platforms/83xx/Kconfig | 12 ++ arch/powerpc/platforms/83xx/Makefile |1 + arch/powerpc/platforms/83xx/mpc8313_rdb.c | 99 + 4 files changed, 331 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts new file mode 100644 index 000..3d2f5a0 --- /dev/null +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts @@ -0,0 +1,219 @@ +/* + * MPC8313E RDB Device Tree Source + * + * Copyright 2005, 2006, 2007 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +/ { + model = MPC8313ERDB; + compatible = MPC83xx; + #address-cells = 1; + #size-cells = 1; + + cpus { + #cpus = 1; + #address-cells = 1; + #size-cells = 0; + + PowerPC,[EMAIL PROTECTED] { + device_type = cpu; + reg = 0; + d-cache-line-size = 20; // 32 bytes + i-cache-line-size = 20; // 32 bytes + d-cache-size = 4000; // L1, 16K + i-cache-size = 4000; // L1, 16K + timebase-frequency = 0; // from bootloader + bus-frequency = 0;// from bootloader + clock-frequency = 0; // from bootloader + 32-bit; + }; + }; + + memory { + device_type = memory; + reg = 0800; // 128MB at 0 + }; + + [EMAIL PROTECTED] { + #address-cells = 1; + #size-cells = 1; + #interrupt-cells = 2; + device_type = soc; + ranges = 0 e000 0010; + reg = e000 0200; + bus-frequency = 0; + + [EMAIL PROTECTED] { + device_type = watchdog; + compatible = mpc83xx_wdt; + reg = 200 100; + }; + + [EMAIL PROTECTED] { + device_type = i2c; + compatible = fsl-i2c; + reg = 3000 100; + interrupts = e 8; + interrupt-parent = 700; + dfsrr; + }; + + [EMAIL PROTECTED] { + device_type = i2c; + compatible = fsl-i2c; + reg = 3100 100; + interrupts = f 8; + interrupt-parent = 700; + dfsrr; + }; + + [EMAIL PROTECTED] { + device_type = spi; + compatible = mpc83xx_spi; + reg = 7000 1000; + interrupts = 10 8; + interrupt-parent = 700; + mode = 0; + }; + + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ + [EMAIL PROTECTED] { + device_type = usb; + compatible = fsl-usb2-dr; + reg = 23000 1000; + #address-cells = 1; + #size-cells = 0; + interrupt-parent = 700; + interrupts = 26 2; + phy_type = utmi_wide; + }; + + [EMAIL PROTECTED] { + device_type = mdio; + compatible = gianfar; + reg = 24520 20; + #address-cells = 1; + #size-cells = 0; + linux,phandle = 24520; +
[POWERPC] 83xx: add the mpc8313erdb defconfig
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fd9aeb85273e9eb4d1a0b83487576a2e22da67fc Commit: fd9aeb85273e9eb4d1a0b83487576a2e22da67fc Parent: b359049f270dcaab8a5bbdbb966594c16caba16c Author: Kim Phillips [EMAIL PROTECTED] AuthorDate: Wed Feb 7 22:19:45 2007 -0600 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Wed Feb 7 23:45:21 2007 -0600 [POWERPC] 83xx: add the mpc8313erdb defconfig Add the mpc8313erdb defconfig Signed-off-by: Wilson Lo [EMAIL PROTECTED] Signed-off-by: Scott Wood [EMAIL PROTECTED] Signed-off-by: Kim Phillips [EMAIL PROTECTED] Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- arch/powerpc/configs/mpc8313_rdb_defconfig | 1409 1 files changed, 1409 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/mpc8313_rdb_defconfig new file mode 100644 index 000..f875237 --- /dev/null +++ b/arch/powerpc/configs/mpc8313_rdb_defconfig @@ -0,0 +1,1409 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.20 +# Wed Feb 7 22:08:04 2007 +# +# CONFIG_PPC64 is not set +CONFIG_PPC32=y +CONFIG_PPC_MERGE=y +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_IRQ_PER_CPU=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ARCH_HAS_ILOG2_U32=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_PPC=y +CONFIG_EARLY_PRINTK=y +CONFIG_GENERIC_NVRAM=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_PPC_OF=y +CONFIG_PPC_UDBG_16550=y +# CONFIG_GENERIC_TBSYNC is not set +CONFIG_AUDIT_ARCH=y +CONFIG_GENERIC_BUG=y +CONFIG_DEFAULT_UIMAGE=y + +# +# Processor support +# +# CONFIG_CLASSIC32 is not set +# CONFIG_PPC_82xx is not set +CONFIG_PPC_83xx=y +# CONFIG_PPC_85xx is not set +# CONFIG_PPC_86xx is not set +# CONFIG_PPC_8xx is not set +# CONFIG_40x is not set +# CONFIG_44x is not set +# CONFIG_E200 is not set +CONFIG_6xx=y +CONFIG_83xx=y +CONFIG_PPC_FPU=y +# CONFIG_PPC_DCR_NATIVE is not set +# CONFIG_PPC_DCR_MMIO is not set +CONFIG_PPC_STD_MMU=y +CONFIG_PPC_STD_MMU_32=y +# CONFIG_SMP is not set +CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION= +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_SYSFS_DEPRECATED=y +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE= +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +# CONFIG_EPOLL is not set +CONFIG_SHMEM=y +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_KMOD is not set + +# +# Block layer +# +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED=anticipatory +CONFIG_PPC_GEN550=y +# CONFIG_WANT_EARLY_SERIAL is not set + +# +# Platform support +# +CONFIG_MPC8313_RDB=y +# CONFIG_MPC832x_MDS is not set +# CONFIG_MPC834x_SYS is not set +# CONFIG_MPC834x_ITX is not set +# CONFIG_MPC8360E_PB is not set +CONFIG_PPC_MPC831x=y +# CONFIG_MPIC is not set + +# +# Kernel options +# +# CONFIG_HIGHMEM is not set +# CONFIG_HZ_100 is not set +CONFIG_HZ_250=y +# CONFIG_HZ_300 is not set +# CONFIG_HZ_1000 is not set +CONFIG_HZ=250 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_PROC_DEVICETREE=y +# CONFIG_CMDLINE_BOOL is not set +# CONFIG_PM is not set +CONFIG_SECCOMP=y +CONFIG_ISA_DMA_API=y + +# +# Bus options +# +CONFIG_GENERIC_ISA_DMA=y +#
[POWERPC] 83xx: Add USB setup code for MPC8349E MDS-PB
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c161698287f501e7ea229672383af7aefe8a2056 Commit: c161698287f501e7ea229672383af7aefe8a2056 Parent: ea5b7a61b606854bd17272cb0a751b6d0a8bfa6b Author: Li Yang [EMAIL PROTECTED] AuthorDate: Wed Feb 7 13:47:56 2007 +0800 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Thu Feb 8 00:40:56 2007 -0600 [POWERPC] 83xx: Add USB setup code for MPC8349E MDS-PB Add board specific initialization code for USB to work in both MPH and DR mode for MPC8349E MDS-PB board. Signed-off-by: Li Yang [EMAIL PROTECTED] Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- arch/powerpc/platforms/83xx/mpc834x_sys.c | 73 + arch/powerpc/platforms/83xx/mpc83xx.h | 18 +++ 2 files changed, 91 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index f30393f..873ec54 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c @@ -43,6 +43,76 @@ unsigned long isa_io_base = 0; unsigned long isa_mem_base = 0; #endif +#define BCSR5_INT_USB 0x02 +/* Note: This is only for PB, not for PB+PIB + * On PB only port0 is connected using ULPI */ +static int mpc834x_usb_cfg(void) +{ + unsigned long sccr, sicrl; + void __iomem *immap; + void __iomem *bcsr_regs = NULL; + u8 bcsr5; + struct device_node *np = NULL; + int port0_is_dr = 0; + + if ((np = of_find_compatible_node(np, usb, fsl-usb2-dr)) != NULL) + port0_is_dr = 1; + if ((np = of_find_compatible_node(np, usb, fsl-usb2-mph)) != NULL){ + if (port0_is_dr) { + printk(KERN_WARNING + There is only one USB port on PB board! \n); + return -1; + } else if (!port0_is_dr) + /* No usb port enabled */ + return -1; + } + + immap = ioremap(get_immrbase(), 0x1000); + if (!immap) + return -1; + + /* Configure clock */ + sccr = in_be32(immap + MPC83XX_SCCR_OFFS); + if (port0_is_dr) + sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */ + else + sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */ + out_be32(immap + MPC83XX_SCCR_OFFS, sccr); + + /* Configure Pin */ + sicrl = in_be32(immap + MPC83XX_SICRL_OFFS); + /* set port0 only */ + if (port0_is_dr) + sicrl |= MPC83XX_SICRL_USB0; + else + sicrl = ~(MPC83XX_SICRL_USB0); + out_be32(immap + MPC83XX_SICRL_OFFS, sicrl); + + iounmap(immap); + + /* Map BCSR area */ + np = of_find_node_by_name(NULL, bcsr); + if (np != 0) { + struct resource res; + + of_address_to_resource(np, 0, res); + bcsr_regs = ioremap(res.start, res.end - res.start + 1); + of_node_put(np); + } + if (!bcsr_regs) + return -1; + + /* +* if SYS board is plug into PIB board, +* force to use the PHY on SYS board +*/ + bcsr5 = in_8(bcsr_regs + 5); + if (!(bcsr5 BCSR5_INT_USB)) + out_8(bcsr_regs + 5, (bcsr5 | BCSR5_INT_USB)); + iounmap(bcsr_regs); + return 0; +} + /* * * Setup the architecture @@ -65,6 +135,7 @@ static void __init mpc834x_sys_setup_arch(void) loops_per_jiffy = 5000 / HZ; of_node_put(np); } + #ifdef CONFIG_PCI for (np = NULL; (np = of_find_node_by_type(np, pci)) != NULL;) add_bridge(np); @@ -72,6 +143,8 @@ static void __init mpc834x_sys_setup_arch(void) ppc_md.pci_exclude_device = mpc83xx_exclude_device; #endif + mpc834x_usb_cfg(); + #ifdef CONFIG_ROOT_NFS ROOT_DEV = Root_NFS; #else diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index 01cae10..9cd03b5 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h @@ -4,6 +4,24 @@ #include linux/init.h #include linux/device.h +/* System Clock Control Register */ +#define MPC83XX_SCCR_OFFS 0xA08 +#define MPC83XX_SCCR_USB_MPHCM_11 0x00c0 +#define MPC83XX_SCCR_USB_MPHCM_01 0x0040 +#define MPC83XX_SCCR_USB_MPHCM_10 0x0080 +#define MPC83XX_SCCR_USB_DRCM_11 0x0030 +#define MPC83XX_SCCR_USB_DRCM_01 0x0010 +#define MPC83XX_SCCR_USB_DRCM_10 0x0020 + +/* system i/o configuration register low */ +#define MPC83XX_SICRL_OFFS 0x114 +#define MPC83XX_SICRL_USB0 0x4000 +#define MPC83XX_SICRL_USB1 0x2000 + +/* system i/o configuration register high */ +#define MPC83XX_SICRH_OFFS 0x118 +#define
[POWERPC] 83xx: Added new dr_mode property for usb controller on 83xx
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ea5b7a61b606854bd17272cb0a751b6d0a8bfa6b Commit: ea5b7a61b606854bd17272cb0a751b6d0a8bfa6b Parent: fd9aeb85273e9eb4d1a0b83487576a2e22da67fc Author: Li Yang [EMAIL PROTECTED] AuthorDate: Wed Feb 7 13:51:09 2007 +0800 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Thu Feb 8 00:40:00 2007 -0600 [POWERPC] 83xx: Added new dr_mode property for usb controller on 83xx Added a new dr_mode property to describe what mode the DR controller is being used in (host, device, OTG). Updated the MPC8349E MDS dts with this new property. Signed-off-by: Li Yang [EMAIL PROTECTED] Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- Documentation/powerpc/booting-without-of.txt |4 arch/powerpc/boot/dts/mpc8349emds.dts|6 ++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 3399427..3b51467 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -1334,6 +1334,9 @@ platforms are moved over to use the flattened-device-tree model. fsl-usb2-mph compatible controllers. Either this property or port0 (or both) must be defined for fsl-usb2-mph compatible controllers. +- dr_mode : indicates the working mode for fsl-usb2-dr compatible + controllers. Can be host, peripheral, or otg. Default to + host if not defined for backward compatibility. Recommended properties : - interrupts : a b where a is the interrupt number and b is a @@ -1367,6 +1370,7 @@ platforms are moved over to use the flattened-device-tree model. #size-cells = 0; interrupt-parent = 700; interrupts = 26 1; + dr_mode = otg; phy = ulpi; }; diff --git a/arch/powerpc/boot/dts/mpc8349emds.dts b/arch/powerpc/boot/dts/mpc8349emds.dts index efceb34..dc121b3 100644 --- a/arch/powerpc/boot/dts/mpc8349emds.dts +++ b/arch/powerpc/boot/dts/mpc8349emds.dts @@ -39,6 +39,11 @@ reg = 1000; // 256MB at 0 }; + [EMAIL PROTECTED] { + device_type = board-control; + reg = e240 8000; + }; + [EMAIL PROTECTED] { #address-cells = 1; #size-cells = 1; @@ -103,6 +108,7 @@ #size-cells = 0; interrupt-parent = 700; interrupts = 26 2; + dr_mode = otg; phy_type = ulpi; }; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] 83xx: Add platform_device for USB DR peripheral driver
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97c5a20ae68774b4c9246c4657be0d88317f103f Commit: 97c5a20ae68774b4c9246c4657be0d88317f103f Parent: c161698287f501e7ea229672383af7aefe8a2056 Author: Li Yang [EMAIL PROTECTED] AuthorDate: Wed Feb 7 13:49:24 2007 +0800 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Thu Feb 8 00:41:05 2007 -0600 [POWERPC] 83xx: Add platform_device for USB DR peripheral driver Add platform_device setup code for OTG/peripheral mode of 834x DR module. It is needed for USB client driver to work. Signed-off-by: Li Yang [EMAIL PROTECTED] Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- arch/powerpc/sysdev/fsl_soc.c | 78 +++-- 1 files changed, 59 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 9f2a9a4..34161bc 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -441,7 +441,8 @@ static int __init fsl_usb_of_init(void) { struct device_node *np; unsigned int i; - struct platform_device *usb_dev_mph = NULL, *usb_dev_dr = NULL; + struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL, + *usb_dev_dr_client = NULL; int ret; for (np = NULL, i = 0; @@ -507,33 +508,72 @@ static int __init fsl_usb_of_init(void) of_irq_to_resource(np, 0, r[1]); - usb_dev_dr = - platform_device_register_simple(fsl-ehci, i, r, 2); - if (IS_ERR(usb_dev_dr)) { - ret = PTR_ERR(usb_dev_dr); + prop = get_property(np, dr_mode, NULL); + + if (!prop || !strcmp(prop, host)) { + usb_data.operating_mode = FSL_USB2_DR_HOST; + usb_dev_dr_host = platform_device_register_simple( + fsl-ehci, i, r, 2); + if (IS_ERR(usb_dev_dr_host)) { + ret = PTR_ERR(usb_dev_dr_host); + goto err; + } + } else if (prop !strcmp(prop, peripheral)) { + usb_data.operating_mode = FSL_USB2_DR_DEVICE; + usb_dev_dr_client = platform_device_register_simple( + fsl-usb2-udc, i, r, 2); + if (IS_ERR(usb_dev_dr_client)) { + ret = PTR_ERR(usb_dev_dr_client); + goto err; + } + } else if (prop !strcmp(prop, otg)) { + usb_data.operating_mode = FSL_USB2_DR_OTG; + usb_dev_dr_host = platform_device_register_simple( + fsl-ehci, i, r, 2); + if (IS_ERR(usb_dev_dr_host)) { + ret = PTR_ERR(usb_dev_dr_host); + goto err; + } + usb_dev_dr_client = platform_device_register_simple( + fsl-usb2-udc, i, r, 2); + if (IS_ERR(usb_dev_dr_client)) { + ret = PTR_ERR(usb_dev_dr_client); + goto err; + } + } else { + ret = -EINVAL; goto err; } - usb_dev_dr-dev.coherent_dma_mask = 0xUL; - usb_dev_dr-dev.dma_mask = usb_dev_dr-dev.coherent_dma_mask; - - usb_data.operating_mode = FSL_USB2_DR_HOST; - prop = get_property(np, phy_type, NULL); usb_data.phy_mode = determine_usb_phy(prop); - ret = - platform_device_add_data(usb_dev_dr, usb_data, -sizeof(struct - fsl_usb2_platform_data)); - if (ret) - goto unreg_dr; + if (usb_dev_dr_host) { + usb_dev_dr_host-dev.coherent_dma_mask = 0xUL; + usb_dev_dr_host-dev.dma_mask = usb_dev_dr_host- + dev.coherent_dma_mask; + if ((ret = platform_device_add_data(usb_dev_dr_host, + usb_data, sizeof(struct + fsl_usb2_platform_data + goto unreg_dr; + } + if (usb_dev_dr_client) { + usb_dev_dr_client-dev.coherent_dma_mask = 0xUL; + usb_dev_dr_client-dev.dma_mask = usb_dev_dr_client- + dev.coherent_dma_mask; + if ((ret =
[POWERPC] 83xx: Updated and renamed MPC834x SYS to MPC834x MDS
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=49baa91d6863df480fa05eb57524a274f77fa886 Commit: 49baa91d6863df480fa05eb57524a274f77fa886 Parent: 135637aa781a0480ba4ef2d3ad18fae408ace874 Author: Kumar Gala [EMAIL PROTECTED] AuthorDate: Thu Feb 8 01:11:00 2007 -0600 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Fri Feb 9 11:39:46 2007 -0600 [POWERPC] 83xx: Updated and renamed MPC834x SYS to MPC834x MDS The MPC834x SYS board has always been called the MPC834x MDS since its public release. Removed all references to SYS and replaced with MDS. Additionally renamed the .dts to match the defconfig (mpc834x_mds*). Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mpc8349emds.dts | 334 arch/powerpc/boot/dts/mpc834x_mds.dts | 334 arch/powerpc/configs/mpc834x_mds_defconfig |9 +- arch/powerpc/platforms/83xx/Kconfig| 12 +- arch/powerpc/platforms/83xx/Makefile |2 +- arch/powerpc/platforms/83xx/mpc834x_itx.c |2 - arch/powerpc/platforms/83xx/mpc834x_mds.c | 213 ++ arch/powerpc/platforms/83xx/mpc834x_sys.c | 213 -- arch/powerpc/platforms/83xx/mpc834x_sys.h | 23 -- 9 files changed, 559 insertions(+), 583 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8349emds.dts b/arch/powerpc/boot/dts/mpc8349emds.dts deleted file mode 100644 index dc121b3..000 --- a/arch/powerpc/boot/dts/mpc8349emds.dts +++ /dev/null @@ -1,334 +0,0 @@ -/* - * MPC8349E MDS Device Tree Source - * - * Copyright 2005, 2006 Freescale Semiconductor Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -/ { - model = MPC8349EMDS; - compatible = MPC834xMDS; - #address-cells = 1; - #size-cells = 1; - - cpus { - #cpus = 1; - #address-cells = 1; - #size-cells = 0; - - PowerPC,[EMAIL PROTECTED] { - device_type = cpu; - reg = 0; - d-cache-line-size = 20; // 32 bytes - i-cache-line-size = 20; // 32 bytes - d-cache-size = 8000; // L1, 32K - i-cache-size = 8000; // L1, 32K - timebase-frequency = 0; // from bootloader - bus-frequency = 0;// from bootloader - clock-frequency = 0; // from bootloader - 32-bit; - }; - }; - - memory { - device_type = memory; - reg = 1000; // 256MB at 0 - }; - - [EMAIL PROTECTED] { - device_type = board-control; - reg = e240 8000; - }; - - [EMAIL PROTECTED] { - #address-cells = 1; - #size-cells = 1; - #interrupt-cells = 2; - device_type = soc; - ranges = 0 e000 0010; - reg = e000 0200; - bus-frequency = 0; - - [EMAIL PROTECTED] { - device_type = watchdog; - compatible = mpc83xx_wdt; - reg = 200 100; - }; - - [EMAIL PROTECTED] { - device_type = i2c; - compatible = fsl-i2c; - reg = 3000 100; - interrupts = e 8; - interrupt-parent = 700; - dfsrr; - }; - - [EMAIL PROTECTED] { - device_type = i2c; - compatible = fsl-i2c; - reg = 3100 100; - interrupts = f 8; - interrupt-parent = 700; - dfsrr; - }; - - [EMAIL PROTECTED] { - device_type = spi; - compatible = mpc83xx_spi; - reg = 7000 1000; - interrupts = 10 8; - interrupt-parent = 700; - mode = 0; - }; - - /* phy type (ULPI or SERIAL) are only types supportted for MPH */ - /* port = 0 or 1 */ - [EMAIL PROTECTED] { - device_type = usb; - compatible = fsl-usb2-mph; - reg = 22000 1000; - #address-cells = 1; - #size-cells = 0; - interrupt-parent = 700; - interrupts
[POWERPC] Fix is_power_of_4(x) compile error
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8dabba5d1a8f1893bc3db9bf66007de2020c8b62 Commit: 8dabba5d1a8f1893bc3db9bf66007de2020c8b62 Parent: d003e7a1a569501cbe9a5ca14748177498c4893a Author: Kumar Gala [EMAIL PROTECTED] AuthorDate: Fri Feb 9 09:30:05 2007 -0600 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Fri Feb 9 09:30:05 2007 -0600 [POWERPC] Fix is_power_of_4(x) compile error When building an 85xx kernel we get: CC arch/powerpc/mm/pgtable_32.o arch/powerpc/mm/pgtable_32.c: In function 'io_block_mapping': arch/powerpc/mm/pgtable_32.c:330: error: expected identifier before '(' token arch/powerpc/mm/pgtable_32.c:330: error: expected statement before ')' token The is_power_of_2(x) fixup patch left an extra ')' on the is_power_of_4 macro. There is a similiar issue on the arch/ppc side. Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- arch/powerpc/mm/pgtable_32.c |2 +- arch/ppc/mm/pgtable.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index bd02272..c284bda 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c @@ -295,7 +295,7 @@ void __init mapin_ram(void) } /* is x a power of 4? */ -#define is_power_of_4(x) is_power_of_2(x) (ffs(x) 1)) +#define is_power_of_4(x) is_power_of_2(x) (ffs(x) 1) /* * Set up a mapping for a block of I/O. diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c index 82b06a1..c023b72 100644 --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c @@ -314,7 +314,7 @@ void __init mapin_ram(void) } /* is x a power of 4? */ -#define is_power_of_4(x) is_power_of_2(x) (ffs(x) 1)) +#define is_power_of_4(x) is_power_of_2(x) (ffs(x) 1) /* * Set up a mapping for a block of I/O. - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] 85xx: Marked functions static
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=27630bec9478a2dd387c68b5e435ed3fdd3a513e Commit: 27630bec9478a2dd387c68b5e435ed3fdd3a513e Parent: 8dabba5d1a8f1893bc3db9bf66007de2020c8b62 Author: Kumar Gala [EMAIL PROTECTED] AuthorDate: Fri Feb 9 09:30:45 2007 -0600 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Fri Feb 9 09:30:45 2007 -0600 [POWERPC] 85xx: Marked functions static Marked a number of functions in 85xx board code as static. Also, some minor whitespace cleanup Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- arch/powerpc/platforms/85xx/mpc85xx_ads.c |7 +++ arch/powerpc/platforms/85xx/mpc85xx_cds.c | 17 + 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index bda2e55..c56fce5 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c @@ -45,8 +45,7 @@ unsigned long isa_mem_base = 0; #endif #ifdef CONFIG_PCI -int -mpc85xx_exclude_device(u_char bus, u_char devfn) +static int mpc85xx_exclude_device(u_char bus, u_char devfn) { if (bus == 0 PCI_SLOT(devfn) == 0) return PCIBIOS_DEVICE_NOT_FOUND; @@ -69,7 +68,7 @@ static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) #endif /* CONFIG_CPM2 */ -void __init mpc85xx_ads_pic_init(void) +static void __init mpc85xx_ads_pic_init(void) { struct mpic *mpic; struct resource r; @@ -254,7 +253,7 @@ static void __init mpc85xx_ads_setup_arch(void) #endif } -void mpc85xx_ads_show_cpuinfo(struct seq_file *m) +static void mpc85xx_ads_show_cpuinfo(struct seq_file *m) { uint pvid, svid, phid1; uint memsize = total_memory; diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 953cd5d..abc0aca 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c @@ -56,7 +56,6 @@ unsigned long isa_mem_base = 0; static int cds_pci_slot = 2; static volatile u8 *cadmus; - #ifdef CONFIG_PCI #define ARCADIA_HOST_BRIDGE_IDSEL 17 @@ -64,8 +63,7 @@ static volatile u8 *cadmus; extern int mpc85xx_pci2_busno; -int -mpc85xx_exclude_device(u_char bus, u_char devfn) +static int mpc85xx_exclude_device(u_char bus, u_char devfn) { if (bus == 0 PCI_SLOT(devfn) == 0) return PCIBIOS_DEVICE_NOT_FOUND; @@ -81,8 +79,7 @@ mpc85xx_exclude_device(u_char bus, u_char devfn) return PCIBIOS_SUCCESSFUL; } -void __init -mpc85xx_cds_pcibios_fixup(void) +static void __init mpc85xx_cds_pcibios_fixup(void) { struct pci_dev *dev; u_char c; @@ -144,7 +141,7 @@ static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc) #endif /* PPC_I8259 */ #endif /* CONFIG_PCI */ -void __init mpc85xx_cds_pic_init(void) +static void __init mpc85xx_cds_pic_init(void) { struct mpic *mpic; struct resource r; @@ -224,12 +221,10 @@ void __init mpc85xx_cds_pic_init(void) #endif /* CONFIG_PPC_I8259 */ } - /* * Setup the architecture */ -static void __init -mpc85xx_cds_setup_arch(void) +static void __init mpc85xx_cds_setup_arch(void) { struct device_node *cpu; #ifdef CONFIG_PCI @@ -276,9 +271,7 @@ mpc85xx_cds_setup_arch(void) #endif } - -void -mpc85xx_cds_show_cpuinfo(struct seq_file *m) +static void mpc85xx_cds_show_cpuinfo(struct seq_file *m) { uint pvid, svid, phid1; uint memsize = total_memory; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] Remove ibm4{xx,4x}.h from arch/powerpc
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1f1fec94589ed0b14c749eb9494bb690dbdf8d5a Commit: 1f1fec94589ed0b14c749eb9494bb690dbdf8d5a Parent: fe6af6faec078ec8137631f24cb541f9918244f0 Author: David Gibson [EMAIL PROTECTED] AuthorDate: Tue Feb 6 12:48:31 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 14:59:52 2007 +1100 [POWERPC] Remove ibm4{xx,4x}.h from arch/powerpc ARCH=powerpc should not use the ghastly un-multiplatformable tangle of includes that starts with asm-ppc/ibm4xx.h. This patch removes a compile-breaking include of it from head_44x.S. Signed-off-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/head_44x.S |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index accb39d..a15d4b8 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S @@ -32,8 +32,6 @@ #include asm/page.h #include asm/mmu.h #include asm/pgtable.h -#include asm/ibm4xx.h -#include asm/ibm44x.h #include asm/cputable.h #include asm/thread_info.h #include asm/ppc_asm.h - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] Celleb: improve MMU hashtable locking
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cbca567ea5b337eaa2685606cbb9183e79b8f97f Commit: cbca567ea5b337eaa2685606cbb9183e79b8f97f Parent: 1f1fec94589ed0b14c749eb9494bb690dbdf8d5a Author: Akira Iguchi [EMAIL PROTECTED] AuthorDate: Fri Feb 9 16:53:59 2007 +0900 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:51 2007 +1100 [POWERPC] Celleb: improve MMU hashtable locking Disabling IRQ is required only in invalidation. This changes spin_lock_irqsave to spin_lock in other ops. Signed-off-by: Kou Ishizaki [EMAIL PROTECTED] Signed-off-by: Akira Iguchi [EMAIL PROTECTED] Acked-by: Arnd Bergmann [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/celleb/htab.c | 19 --- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/platforms/celleb/htab.c b/arch/powerpc/platforms/celleb/htab.c index ffa7c2c..279d733 100644 --- a/arch/powerpc/platforms/celleb/htab.c +++ b/arch/powerpc/platforms/celleb/htab.c @@ -95,7 +95,6 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group, unsigned long lpar_rc; unsigned long slot; unsigned long hpte_v, hpte_r; - unsigned long flags; /* same as iseries */ if (vflags HPTE_V_SECONDARY) @@ -115,17 +114,17 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group, if (rflags (_PAGE_GUARDED|_PAGE_NO_CACHE)) hpte_r = ~_PAGE_COHERENT; - spin_lock_irqsave(beat_htab_lock, flags); + spin_lock(beat_htab_lock); if ((lpar_rc = beat_read_mask(hpte_group)) == 0) { if (!(vflags HPTE_V_BOLTED)) DBG_LOW( full\n); - spin_unlock_irqrestore(beat_htab_lock, flags); + spin_unlock(beat_htab_lock); return -1; } lpar_rc = beat_insert_htab_entry(0, hpte_group, lpar_rc 48, hpte_v, hpte_r, slot); - spin_unlock_irqrestore(beat_htab_lock, flags); + spin_unlock(beat_htab_lock); /* * Since we try and ioremap PHBs we don't own, the pte insert @@ -189,7 +188,6 @@ static long beat_lpar_hpte_updatepp(unsigned long slot, { unsigned long lpar_rc; unsigned long dummy0, dummy1, want_v; - unsigned long flags; want_v = hpte_encode_v(va, psize); @@ -197,17 +195,17 @@ static long beat_lpar_hpte_updatepp(unsigned long slot, avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... , want_v HPTE_V_AVPN, slot, psize, newpp); - spin_lock_irqsave(beat_htab_lock, flags); + spin_lock(beat_htab_lock); dummy0 = beat_lpar_hpte_getword0(slot); if ((dummy0 ~0x7FUL) != (want_v ~0x7FUL)) { DBG_LOW(not found !\n); - spin_unlock_irqrestore(beat_htab_lock, flags); + spin_unlock(beat_htab_lock); return -1; } lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, dummy0, dummy1); - spin_unlock_irqrestore(beat_htab_lock, flags); + spin_unlock(beat_htab_lock); if (lpar_rc != 0 || dummy0 == 0) { DBG_LOW(not found !\n); return -1; @@ -256,18 +254,17 @@ static void beat_lpar_hpte_updateboltedpp(unsigned long newpp, int psize) { unsigned long lpar_rc, slot, vsid, va, dummy0, dummy1; - unsigned long flags; vsid = get_kernel_vsid(ea); va = (vsid 28) | (ea 0x0fff); - spin_lock_irqsave(beat_htab_lock, flags); + spin_lock(beat_htab_lock); slot = beat_lpar_hpte_find(va, psize); BUG_ON(slot == -1); lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, dummy0, dummy1); - spin_unlock_irqrestore(beat_htab_lock, flags); + spin_unlock(beat_htab_lock); BUG_ON(lpar_rc != 0); } - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] Virtual DMA support for floppy driver for new powerpc architecture
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ea8b7c96f64f68548976ba65062cee2f2b7d831 Commit: 9ea8b7c96f64f68548976ba65062cee2f2b7d831 Parent: cbca567ea5b337eaa2685606cbb9183e79b8f97f Author: Pavel Fedin [EMAIL PROTECTED] AuthorDate: Mon Jan 29 15:13:03 2007 +0300 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:52 2007 +1100 [POWERPC] Virtual DMA support for floppy driver for new powerpc architecture During ppc64+ppc merge virtual DMA code for floppy driver was not ported. This patch restores virtual DMA support for floppy in new powerpc target. It is necessary at least on Pegasos and AmigaOne machines for the floppy drive to function. ISA DMA controller works incorrectly there due to its addressing limitations. Virtual DMA mode is activated by floppy=nodma option passed to the kernel (or module). There's no automatic switch like on i386. Signed-off-by: Pavel Fedin [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- include/asm-powerpc/floppy.h | 135 ++ 1 files changed, 122 insertions(+), 13 deletions(-) diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h index fd242a2..a0f14ee 100644 --- a/include/asm-powerpc/floppy.h +++ b/include/asm-powerpc/floppy.h @@ -17,28 +17,115 @@ #define fd_outb(value,port)outb_p(value,port) #define fd_enable_dma() enable_dma(FLOPPY_DMA) -#define fd_disable_dma()disable_dma(FLOPPY_DMA) -#define fd_request_dma()request_dma(FLOPPY_DMA, floppy) -#define fd_free_dma() free_dma(FLOPPY_DMA) +#define fd_disable_dma()fd_ops-_disable_dma(FLOPPY_DMA) +#define fd_free_dma() fd_ops-_free_dma(FLOPPY_DMA) #define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) #define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, mode) #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count) +#define fd_get_dma_residue()fd_ops-_get_dma_residue(FLOPPY_DMA) #define fd_enable_irq() enable_irq(FLOPPY_IRQ) #define fd_disable_irq()disable_irq(FLOPPY_IRQ) #define fd_cacheflush(addr,size) /* nothing */ -#define fd_request_irq()request_irq(FLOPPY_IRQ, floppy_interrupt, \ - IRQF_DISABLED, floppy, NULL) #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); -#ifdef CONFIG_PCI - #include linux/pci.h #include asm/ppc-pci.h /* for ppc64_isabridge_dev */ -#define fd_dma_setup(addr,size,mode,io) powerpc_fd_dma_setup(addr,size,mode,io) +#define fd_dma_setup(addr,size,mode,io) fd_ops-_dma_setup(addr,size,mode,io) + +static int fd_request_dma(void); + +struct fd_dma_ops { + void (*_disable_dma)(unsigned int dmanr); + void (*_free_dma)(unsigned int dmanr); + int (*_get_dma_residue)(unsigned int dummy); + int (*_dma_setup)(char *addr, unsigned long size, int mode, int io); +}; + +static int virtual_dma_count; +static int virtual_dma_residue; +static char *virtual_dma_addr; +static int virtual_dma_mode; +static int doing_vdma; +static struct fd_dma_ops *fd_ops; + +static irqreturn_t floppy_hardint(int irq, void *dev_id) +{ + unsigned char st; + int lcount; + char *lptr; + + if (!doing_vdma) + return floppy_interrupt(irq, dev_id); + + + st = 1; + for (lcount=virtual_dma_count, lptr=virtual_dma_addr; +lcount; lcount--, lptr++) { + st=inb(virtual_dma_port+4) 0xa0 ; + if (st != 0xa0) + break; + if (virtual_dma_mode) + outb_p(*lptr, virtual_dma_port+5); + else + *lptr = inb_p(virtual_dma_port+5); + } + virtual_dma_count = lcount; + virtual_dma_addr = lptr; + st = inb(virtual_dma_port+4); + + if (st == 0x20) + return IRQ_HANDLED; + if (!(st 0x20)) { + virtual_dma_residue += virtual_dma_count; + virtual_dma_count=0; + doing_vdma = 0; + floppy_interrupt(irq, dev_id); + return IRQ_HANDLED; + } + return IRQ_HANDLED; +} -static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, - int mode, int io) +static void vdma_disable_dma(unsigned int dummy) +{ + doing_vdma = 0; + virtual_dma_residue += virtual_dma_count; + virtual_dma_count=0; +} + +static void vdma_nop(unsigned int dummy) +{ +} + + +static int vdma_get_dma_residue(unsigned int dummy) +{ + return virtual_dma_count + virtual_dma_residue; +} + + +static int fd_request_irq(void) +{ + if (can_use_virtual_dma) + return request_irq(FLOPPY_IRQ, floppy_hardint, + IRQF_DISABLED, floppy, NULL); + else + return
[POWERPC] move variables in drivers/macintosh to bss
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=872758563d7f132d25fc06857bd19df06c5c70c7 Commit: 872758563d7f132d25fc06857bd19df06c5c70c7 Parent: 9ea8b7c96f64f68548976ba65062cee2f2b7d831 Author: Olaf Hering [EMAIL PROTECTED] AuthorDate: Sat Feb 10 21:35:12 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:52 2007 +1100 [POWERPC] move variables in drivers/macintosh to bss Move all the initialized variables to bss. Mark a version string as const. Signed-off-by: Olaf Hering [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- drivers/macintosh/adbhid.c|4 ++-- drivers/macintosh/apm_emu.c |2 +- drivers/macintosh/mac_hid.c |4 ++-- drivers/macintosh/therm_adt746x.c |6 +++--- drivers/macintosh/via-cuda.c |2 +- drivers/macintosh/via-macii.c | 10 +- drivers/macintosh/via-maciisi.c |6 +++--- drivers/macintosh/via-pmu.c | 11 +-- drivers/macintosh/via-pmu68k.c|4 ++-- 9 files changed, 24 insertions(+), 25 deletions(-) diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index 1c7d6f2..b77ef51 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c @@ -574,8 +574,8 @@ static struct adb_request led_request; static int leds_pending[16]; static int leds_req_pending; static int pending_devs[16]; -static int pending_led_start=0; -static int pending_led_end=0; +static int pending_led_start; +static int pending_led_end; static DEFINE_SPINLOCK(leds_lock); static void leds_done(struct adb_request *req) diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c index a6d50f4..c5e4d43 100644 --- a/drivers/macintosh/apm_emu.c +++ b/drivers/macintosh/apm_emu.c @@ -102,7 +102,7 @@ static struct pmu_sleep_notifier apm_sleep_notifier = { SLEEP_LEVEL_USERLAND, }; -static chardriver_version[] = 0.5; /* no spaces */ +static const char driver_version[] = 0.5;/* no spaces */ #ifdef DEBUG static char * apm_event_name[] = { diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index ee6b4ca..f632cec 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -17,10 +17,10 @@ static struct input_dev *emumousebtn; static int emumousebtn_input_register(void); -static int mouse_emulate_buttons = 0; +static int mouse_emulate_buttons; static int mouse_button2_keycode = KEY_RIGHTCTRL; /* right control key */ static int mouse_button3_keycode = KEY_RIGHTALT; /* right option key */ -static int mouse_last_keycode = 0; +static int mouse_last_keycode; #if defined(CONFIG_SYSCTL) /* file(s) in /proc/sys/dev/mac_hid */ diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 3d3bf16..a7ce559 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c @@ -48,11 +48,11 @@ static u8 FAN_SPD_SET[2] = {0x30, 0x31}; static u8 default_limits_local[3] = {70, 50, 70};/* local, sensor1, sensor2 */ static u8 default_limits_chip[3] = {80, 65, 80};/* local, sensor1, sensor2 */ -static const char *sensor_location[3] = {NULL, NULL, NULL}; +static const char *sensor_location[3]; -static int limit_adjust = 0; +static int limit_adjust; static int fan_speed = -1; -static int verbose = 0; +static int verbose; MODULE_AUTHOR(Colin Leroy [EMAIL PROTECTED]); MODULE_DESCRIPTION(Driver for ADT746x thermostat in iBook G4 and diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c index df66291..3797f50 100644 --- a/drivers/macintosh/via-cuda.c +++ b/drivers/macintosh/via-cuda.c @@ -86,7 +86,7 @@ static int data_index; #ifdef CONFIG_PPC static struct device_node *vias; #endif -static int cuda_fully_inited = 0; +static int cuda_fully_inited; #ifdef CONFIG_ADB static int cuda_probe(void); diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index 5d88d5b..175b3e5 100644 --- a/drivers/macintosh/via-macii.c +++ b/drivers/macintosh/via-macii.c @@ -107,10 +107,10 @@ static enum macii_state { awaiting_reply } macii_state; -static int need_poll= 0; -static int command_byte = 0; -static int last_reply = 0; -static int last_active = 0; +static int need_poll; +static int command_byte; +static int last_reply; +static int last_active; static struct adb_request *current_req; static struct adb_request *last_req; @@ -124,7 +124,7 @@ static int first_byte; static int prefix_len; static int status = ST_IDLE|TREQ; static int last_status; -static int driver_running = 0; +static int driver_running; /* debug level 10 required for ADB logging (should be debug_adb, ideally) */ diff --git a/drivers/macintosh/via-maciisi.c b/drivers/macintosh/via-maciisi.c index 1f0aa5d..10051db 100644 --- a/drivers/macintosh/via-maciisi.c +++ b/drivers/macintosh/via-maciisi.c @@
[POWERPC] Mark winbond IDE PCI resources with start 0 as unassigned
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2d99c41f05fc2a26737aacf943db03ca89841199 Commit: 2d99c41f05fc2a26737aacf943db03ca89841199 Parent: 872758563d7f132d25fc06857bd19df06c5c70c7 Author: Olaf Hering [EMAIL PROTECTED] AuthorDate: Sat Feb 10 21:38:37 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:52 2007 +1100 [POWERPC] Mark winbond IDE PCI resources with start 0 as unassigned libata calls pci_request_regions to claim PCI BAR 0 - 5 pci_request_regions fails if one of the regions cant be claimed. bar 5 has start == 0, __request_resource will fail. Tested on a p630 in SMP mode with pata_sl82c105 00:03.1 IDE interface: Symphony Labs SL82c105 (rev 05) (prog-if 8f [Master SecP SecO PriP PriO]) Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- TAbort- MAbort- SERR- PERR- Interrupt: pin A routed to IRQ 86 Region 0: I/O ports at 3fd3000f000 [size=8] Region 1: I/O ports at 3fd3000f010 [size=4] Region 2: I/O ports at 3fd3000f020 [size=8] Region 3: I/O ports at 3fd3000f030 [size=4] Region 4: I/O ports at 3fd3000f040 [size=16] Region 5: I/O ports at 3fd3000 [size=16] 00: ad 10 05 01 41 01 80 02 05 8f 01 01 08 48 80 00 10: 01 f0 00 00 11 f0 00 00 21 f0 00 00 31 f0 00 00 20: 41 f0 00 00 01 00 00 00 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 00 00 00 00 56 01 02 28 40: b3 08 ff 00 09 09 00 00 09 09 00 00 09 09 00 00 50: 09 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70: 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 name ide linux,phandle00d5cdc0 (14011840) assigned-addresses 81001910 f000 0008 81001914 f010 0004 81001918 f020 0008 8100191c f030 0004 81001920 f040 0010 81001924 0010 interrupts 0003 built-in #size-cells #address-cells 0001 device_type ide reg 1900 41001910 0008 41001914 0004 41001918 0008 4100191c 0004 41001920 0010 41001924 0010 compatible pci10ad,105 pciclass,01018f ibm,fw-slot-number fast-back-to-back devsel-speed 0001 max-latency 0028 (40) min-grant0002 class-code 0001018f (65935) revision-id 0005 device-id0105 (261) vendor-id10ad (4269) ibm,loc-code U0.1-P1/Q6 Signed-off-by: Olaf Hering [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/pci.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index c69bd15..fa59124 100644 --- a/arch/powerpc/platforms/pseries/pci.c +++ b/arch/powerpc/platforms/pseries/pci.c @@ -98,6 +98,10 @@ static void fixup_winbond_82c105(struct pci_dev* dev) if (dev-resource[i].flags IORESOURCE_IO dev-bus-number == 0 dev-devfn == 0x81) dev-resource[i].flags = ~IORESOURCE_IO; + if (dev-resource[i].start == 0 dev-resource[i].end) { + dev-resource[i].flags = 0; + dev-resource[i].end = 0; + } } } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] Fix vDSO page count calculation
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7ac9a13717c10c5ee074a6b23096c8d277fa5712 Commit: 7ac9a13717c10c5ee074a6b23096c8d277fa5712 Parent: a334bdbdda9659b8f50a8620a11249fde62ccfde Author: Benjamin Herrenschmidt [EMAIL PROTECTED] AuthorDate: Mon Feb 12 13:31:08 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:52 2007 +1100 [POWERPC] Fix vDSO page count calculation The recent vDSO consolidation patches broke powerpc due to a mistake in the definition of MAXPAGES constants. This fixes it by moving to a dynamically allocated array of pages instead as I don't like much hard coded size limits. Also move the vdso initialisation to an initcall since it doesn't really need to be done -that- early. Applogies for not catching the breakage earlier, Roland _did_ CC me on his patches a while ago, I got busy with other things and forgot to test them. Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/vdso.c | 34 +++--- arch/powerpc/mm/mem.c |3 --- include/asm-powerpc/vdso.h |5 - 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 50149ec..e46c31b 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c @@ -49,24 +49,23 @@ /* Max supported size for symbol names */ #define MAX_SYMNAME64 -#define VDSO32_MAXPAGES(((0x3000 + PAGE_MASK) PAGE_SHIFT) + 2) -#define VDSO64_MAXPAGES(((0x3000 + PAGE_MASK) PAGE_SHIFT) + 2) - extern char vdso32_start, vdso32_end; static void *vdso32_kbase = vdso32_start; -unsigned int vdso32_pages; -static struct page *vdso32_pagelist[VDSO32_MAXPAGES]; +static unsigned int vdso32_pages; +static struct page **vdso32_pagelist; unsigned long vdso32_sigtramp; unsigned long vdso32_rt_sigtramp; #ifdef CONFIG_PPC64 extern char vdso64_start, vdso64_end; static void *vdso64_kbase = vdso64_start; -unsigned int vdso64_pages; -static struct page *vdso64_pagelist[VDSO64_MAXPAGES]; +static unsigned int vdso64_pages; +static struct page **vdso64_pagelist; unsigned long vdso64_rt_sigtramp; #endif /* CONFIG_PPC64 */ +static int vdso_ready; + /* * The vdso data page (aka. systemcfg for old ppc64 fans) is here. * Once the early boot kernel code no longer needs to muck around @@ -182,6 +181,9 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, unsigned long vdso_base; int rc; + if (!vdso_ready) + return 0; + #ifdef CONFIG_PPC64 if (test_thread_flag(TIF_32BIT)) { vdso_pagelist = vdso32_pagelist; @@ -661,7 +663,7 @@ static void __init vdso_setup_syscall_map(void) } -void __init vdso_init(void) +static int __init vdso_init(void) { int i; @@ -716,11 +718,13 @@ void __init vdso_init(void) #ifdef CONFIG_PPC64 vdso64_pages = 0; #endif - return; + return 0; } /* Make sure pages are in the correct state */ - BUG_ON(vdso32_pages + 2 VDSO32_MAXPAGES); + vdso32_pagelist = kzalloc(sizeof(struct page *) * (vdso32_pages + 2), + GFP_KERNEL); + BUG_ON(vdso32_pagelist == NULL); for (i = 0; i vdso32_pages; i++) { struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE); ClearPageReserved(pg); @@ -731,7 +735,9 @@ void __init vdso_init(void) vdso32_pagelist[i] = NULL; #ifdef CONFIG_PPC64 - BUG_ON(vdso64_pages + 2 VDSO64_MAXPAGES); + vdso64_pagelist = kzalloc(sizeof(struct page *) * (vdso64_pages + 2), + GFP_KERNEL); + BUG_ON(vdso64_pagelist == NULL); for (i = 0; i vdso64_pages; i++) { struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE); ClearPageReserved(pg); @@ -743,7 +749,13 @@ void __init vdso_init(void) #endif /* CONFIG_PPC64 */ get_page(virt_to_page(vdso_data)); + + smp_wmb(); + vdso_ready = 1; + + return 0; } +arch_initcall(vdso_init); int in_gate_area_no_task(unsigned long addr) { diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 77b4637..52f397c 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -384,9 +384,6 @@ void __init mem_init(void) initsize 10); mem_init_done = 1; - - /* Initialize the vDSO */ - vdso_init(); } /* diff --git a/include/asm-powerpc/vdso.h b/include/asm-powerpc/vdso.h index b9f9118..26fc449 100644 --- a/include/asm-powerpc/vdso.h +++ b/include/asm-powerpc/vdso.h @@ -18,16 +18,11 @@ #ifndef __ASSEMBLY__ -extern unsigned int vdso64_pages; -extern unsigned int vdso32_pages; - /* Offsets relative to thread-vdso_base */ extern unsigned long
[POWERPC] ppc: Add support for AMCC Taishan 440GX eval board
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab9367e38fa97c2ed7f72fd5fa29d0d70d58df89 Commit: ab9367e38fa97c2ed7f72fd5fa29d0d70d58df89 Parent: 7ac9a13717c10c5ee074a6b23096c8d277fa5712 Author: Stefan Roese [EMAIL PROTECTED] AuthorDate: Mon Feb 12 11:29:04 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:52 2007 +1100 [POWERPC] ppc: Add support for AMCC Taishan 440GX eval board This patch adds support for the AMCC Taishan PPC440GX evaluation board. This is still an arch/ppc port. I'm aware that the move of 4xx to arch/powerpc is making good progress right now. So this patch is mainly intended to make the Taishan support available for the community right now. Signed-off-by: Stefan Roese [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/ppc/configs/taishan_defconfig | 1077 arch/ppc/platforms/4xx/Kconfig | 10 +- arch/ppc/platforms/4xx/Makefile|1 + arch/ppc/platforms/4xx/taishan.c | 395 + arch/ppc/platforms/4xx/taishan.h | 67 +++ arch/ppc/syslib/Makefile |1 + include/asm-ppc/ibm4xx.h |4 + 7 files changed, 1553 insertions(+), 2 deletions(-) diff --git a/arch/ppc/configs/taishan_defconfig b/arch/ppc/configs/taishan_defconfig new file mode 100644 index 000..1ca0204 --- /dev/null +++ b/arch/ppc/configs/taishan_defconfig @@ -0,0 +1,1077 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.20 +# Mon Feb 12 11:11:58 2007 +# +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ARCH_HAS_ILOG2_U32=y +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION= +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_SYSFS_DEPRECATED=y +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE= +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +# CONFIG_HOTPLUG is not set +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED=anticipatory + +# +# Processor +# +# CONFIG_6xx is not set +# CONFIG_40x is not set +CONFIG_44x=y +# CONFIG_8xx is not set +# CONFIG_E200 is not set +# CONFIG_E500 is not set +CONFIG_PPC_DCR_NATIVE=y +CONFIG_PPC_DCR=y +CONFIG_BOOKE=y +CONFIG_PTE_64BIT=y +CONFIG_PHYS_64BIT=y +# CONFIG_MATH_EMULATION is not set +# CONFIG_KEXEC is not set +# CONFIG_CPU_FREQ is not set +CONFIG_4xx=y +CONFIG_WANT_EARLY_SERIAL=y + +# +# IBM 4xx options +# +# CONFIG_BAMBOO is not set +# CONFIG_EBONY is not set +# CONFIG_LUAN is not set +# CONFIG_YUCCA is not set +# CONFIG_OCOTEA is not set +CONFIG_TAISHAN=y +CONFIG_440GX=y +CONFIG_440A=y +CONFIG_IBM_OCP=y +CONFIG_IBM_EMAC4=y +CONFIG_PPC4xx_DMA=y +CONFIG_PPC4xx_EDMA=y +CONFIG_PPC_GEN550=y +CONFIG_NOT_COHERENT_CACHE=y + +# +# Platform options +# +# CONFIG_PC_KEYBOARD is not set +# CONFIG_HIGHMEM is not set +CONFIG_ARCH_POPULATES_NODE_MAP=y +# CONFIG_HZ_100 is not set +CONFIG_HZ_250=y +# CONFIG_HZ_300 is not set +# CONFIG_HZ_1000 is not set +CONFIG_HZ=250 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC
[POWERPC] Wire up sys_getcpu
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9b96ea662b404b9ed882c78cb844510d804a83e6 Commit: 9b96ea662b404b9ed882c78cb844510d804a83e6 Parent: ab9367e38fa97c2ed7f72fd5fa29d0d70d58df89 Author: Stephen Rothwell [EMAIL PROTECTED] AuthorDate: Mon Feb 12 22:09:18 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:52 2007 +1100 [POWERPC] Wire up sys_getcpu Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- include/asm-powerpc/systbl.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index 97b4354..418e5c7 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h @@ -305,3 +305,4 @@ SYSCALL_SPU(faccessat) COMPAT_SYS_SPU(get_robust_list) COMPAT_SYS_SPU(set_robust_list) COMPAT_SYS(move_pages) +SYSCALL_SPU(getcpu) - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] correct a prototype
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=40d244d69a3871dd05a5fdae29f36823a6ee3e33 Commit: 40d244d69a3871dd05a5fdae29f36823a6ee3e33 Parent: 9b96ea662b404b9ed882c78cb844510d804a83e6 Author: Stephen Rothwell [EMAIL PROTECTED] AuthorDate: Mon Feb 12 22:10:48 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:52 2007 +1100 [POWERPC] correct a prototype This rids us of a warning. Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/cputable.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index dd17dff..7ec4ac7 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -44,7 +44,7 @@ extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec); -extern void __restore_cpu_pa6t(unsigned long offset, struct cpu_spec* spec); +extern void __restore_cpu_pa6t(void); extern void __restore_cpu_ppc970(void); #endif /* CONFIG_PPC64 */ - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] Fixup mp5200 drivers to match device tree changes
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e3aba81d154c53a82e2a7e0ff5e7f1162a53cf27 Commit: e3aba81d154c53a82e2a7e0ff5e7f1162a53cf27 Parent: 40d244d69a3871dd05a5fdae29f36823a6ee3e33 Author: Grant Likely [EMAIL PROTECTED] AuthorDate: Mon Feb 12 13:36:55 2007 -0700 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:53 2007 +1100 [POWERPC] Fixup mp5200 drivers to match device tree changes Signed-off-by: Grant Likely [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/52xx/lite5200.c | 29 + arch/powerpc/platforms/52xx/mpc52xx_common.c |4 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c| 10 drivers/ata/pata_mpc52xx.c |6 +--- drivers/serial/mpc52xx_uart.c|5 +-- 5 files changed, 26 insertions(+), 28 deletions(-) diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index cdb16bf..cc3b40d 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c @@ -51,13 +51,13 @@ */ static void __init -lite52xx_setup_cpu(void) +lite5200_setup_cpu(void) { struct mpc52xx_gpio __iomem *gpio; u32 port_config; /* Map zones */ - gpio = mpc52xx_find_and_map(mpc52xx-gpio); + gpio = mpc52xx_find_and_map(mpc5200-gpio); if (!gpio) { printk(KERN_ERR __FILE__ : Error while mapping GPIO register for port config. @@ -85,12 +85,12 @@ error: iounmap(gpio); } -static void __init lite52xx_setup_arch(void) +static void __init lite5200_setup_arch(void) { struct device_node *np; if (ppc_md.progress) - ppc_md.progress(lite52xx_setup_arch(), 0); + ppc_md.progress(lite5200_setup_arch(), 0); np = of_find_node_by_type(NULL, cpu); if (np) { @@ -105,7 +105,7 @@ static void __init lite52xx_setup_arch(void) /* CPU Port mux setup */ mpc52xx_setup_cpu();/* Generic */ - lite52xx_setup_cpu(); /* Platorm specific */ + lite5200_setup_cpu(); /* Platorm specific */ #ifdef CONFIG_PCI np = of_find_node_by_type(np, pci); @@ -126,7 +126,7 @@ static void __init lite52xx_setup_arch(void) } -void lite52xx_show_cpuinfo(struct seq_file *m) +void lite5200_show_cpuinfo(struct seq_file *m) { struct device_node* np = of_find_all_nodes(NULL); const char *model = NULL; @@ -143,25 +143,26 @@ void lite52xx_show_cpuinfo(struct seq_file *m) /* * Called very early, MMU is off, device-tree isn't unflattened */ -static int __init lite52xx_probe(void) +static int __init lite5200_probe(void) { unsigned long node = of_get_flat_dt_root(); const char *model = of_get_flat_dt_prop(node, model, NULL); - if (!of_flat_dt_is_compatible(node, lite52xx)) + if (!of_flat_dt_is_compatible(node, fsl,lite5200) + !of_flat_dt_is_compatible(node, fsl,lite5200b)) return 0; - pr_debug(%s board w/ mpc52xx found\n, model ? model : unknown); + pr_debug(%s board found\n, model ? model : unknown); return 1; } -define_machine(lite52xx) { - .name = lite52xx, - .probe = lite52xx_probe, - .setup_arch = lite52xx_setup_arch, +define_machine(lite5200) { + .name = lite5200, + .probe = lite5200_probe, + .setup_arch = lite5200_setup_arch, .init = mpc52xx_declare_of_platform_devices, .init_IRQ = mpc52xx_init_irq, .get_irq= mpc52xx_get_irq, - .show_cpuinfo = lite52xx_show_cpuinfo, + .show_cpuinfo = lite5200_show_cpuinfo, .calibrate_decr = generic_calibrate_decr, }; diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c index cc40889..ed0cb69 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c @@ -83,8 +83,8 @@ mpc52xx_setup_cpu(void) struct mpc52xx_xlb __iomem *xlb; /* Map zones */ - cdm = mpc52xx_find_and_map(mpc52xx-cdm); - xlb = mpc52xx_find_and_map(mpc52xx-xlb); + cdm = mpc52xx_find_and_map(mpc5200-cdm); + xlb = mpc52xx_find_and_map(mpc5200-xlb); if (!cdm || !xlb) { printk(KERN_ERR __FILE__ : diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index cd91a6c..c751925 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c @@ -383,16 +383,16 @@ void __init mpc52xx_init_irq(void) struct device_node *picnode; /* Remap the necessary zones */ - picnode = of_find_compatible_node(NULL, NULL, mpc52xx-pic); + picnode =
[POWERPC] mpc5200 device tree bindings refinement
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=05cbbc692f513c0e62372abeab01b04b07096582 Commit: 05cbbc692f513c0e62372abeab01b04b07096582 Parent: e3aba81d154c53a82e2a7e0ff5e7f1162a53cf27 Author: Grant Likely [EMAIL PROTECTED] AuthorDate: Mon Feb 12 13:36:54 2007 -0700 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:53 2007 +1100 [POWERPC] mpc5200 device tree bindings refinement Much needed refinement of mpc5200 device tree binding specifications. Short list: - drop mpc52xx designator; only two supported chips exist, 5200 and 5200b. It's premature to refer to them as '52xx'. - Specify optional 'model' and 'revision' properties in the soc5200 node - Specify reqiured 'cell-index' property to identify between multiple SOC devices of the same type. (Useful for arbitrating shared register access) - Specify optional 'port-number' property for adjusting the logical serial port assignments. - Specify optional 'has-wdt' property for gpt0 node. - Add system-frequency property to soc5200 node Signed-off-by: Grant Likely [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- .../powerpc/mpc52xx-device-tree-bindings.txt | 183 +--- arch/powerpc/boot/dts/lite5200.dts | 135 +-- arch/powerpc/boot/dts/lite5200b.dts| 135 +-- 3 files changed, 279 insertions(+), 174 deletions(-) diff --git a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt index 69f016f..e59fcbb 100644 --- a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt +++ b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt @@ -1,7 +1,7 @@ -MPC52xx Device Tree Bindings +MPC5200 Device Tree Bindings -(c) 2006 Secret Lab Technologies Ltd +(c) 2006-2007 Secret Lab Technologies Ltd Grant Likely grant.likely at secretlab.ca ** DRAFT *** @@ -20,11 +20,11 @@ described in Documentation/powerpc/booting-without-of.txt), or passed by Open Firmare (IEEE 1275) compatible firmware using an OF compatible client interface API. -This document specifies the requirements on the device-tree for mpc52xx +This document specifies the requirements on the device-tree for mpc5200 based boards. These requirements are above and beyond the details specified in either the OpenFirmware spec or booting-without-of.txt -All new mpc52xx-based boards are expected to match this document. In +All new mpc5200-based boards are expected to match this document. In cases where this document is not sufficient to support a new board port, this document should be updated as part of adding the new board support. @@ -32,26 +32,26 @@ II - Philosophy === The core of this document is naming convention. The whole point of defining this convention is to reduce or eliminate the number of -special cases required to support a 52xx board. If all 52xx boards -follow the same convention, then generic 52xx support code will work +special cases required to support a 5200 board. If all 5200 boards +follow the same convention, then generic 5200 support code will work rather than coding special cases for each new board. This section tries to capture the thought process behind why the naming convention is what it is. -1. Node names -- +1. names +- There is strong convention/requirements already established for children of the root node. 'cpus' describes the processor cores, 'memory' describes memory, and 'chosen' provides boot configuration. Other nodes are added to describe devices attached to the processor local bus. + Following convention already established with other system-on-chip -processors, MPC52xx boards must have an 'soc5200' node as a child of the -root node. +processors, 5200 device trees should use the name 'soc5200' for the +parent node of on chip devices, and the root node should be its parent. -The soc5200 node holds child nodes for all on chip devices. Child nodes -are typically named after the configured function. ie. the FEC node is -named 'ethernet', and a PSC in uart mode is named 'serial'. +Child nodes are typically named after the configured function. ie. +the FEC node is named 'ethernet', and a PSC in uart mode is named 'serial'. 2. device_type property --- @@ -66,28 +66,47 @@ exactly. Since device_type isn't enough to match devices to drivers, there also needs to be a naming convention for the compatible property. Compatible is an list of device descriptions sorted from specific to generic. For -the mpc52xx, the required format for each compatible value is -chip-device[-mode]. At the minimum, the list shall contain two -items; the first specifying the exact chip, and the second specifying -mpc52xx for the chip. - -ie. ethernet
[POWERPC] Add device tree fixups for the EFIKA
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88fd2a9d681f261ebd55a6843a03ea2a1bb9eb39 Commit: 88fd2a9d681f261ebd55a6843a03ea2a1bb9eb39 Parent: 05cbbc692f513c0e62372abeab01b04b07096582 Author: Sylvain Munaut [EMAIL PROTECTED] AuthorDate: Mon Feb 12 23:13:20 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:53 2007 +1100 [POWERPC] Add device tree fixups for the EFIKA We make the efika device tree compliant with the defined bindings (at least compliant enough). This is mostly done by mangling the device_type and compatible properties, but also adding some missing bits. Signed-off-by: Sylvain Munaut [EMAIL PROTECTED] Acked-by: Grant Likely [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/prom_init.c | 81 +++ 1 files changed, 81 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 520ef42..4fb5938 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -2117,11 +2117,92 @@ static void __init fixup_device_tree_pmac(void) #define fixup_device_tree_pmac() #endif +#ifdef CONFIG_PPC_EFIKA +/* The current fw of the Efika has a device tree needs quite a few + * fixups to be compliant with the mpc52xx bindings. It's currently + * unknown if it will ever be compliant (come on bPlan ...) so we do fixups. + * NOTE that we (barely) tolerate it because the EFIKA was out before + * the bindings were finished, for any new boards - RTFM ! */ + +struct subst_entry { + char *path; + char *property; + void *value; + int value_len; +}; + +static void __init fixup_device_tree_efika(void) +{ + /* Substitution table */ + #define prop_cstr(x) x, sizeof(x) + int prop_sound_irq[3] = { 2, 2, 0 }; + int prop_bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0, +3,4,0, 3,5,0, 3,6,0, 3,7,0, +3,8,0, 3,9,0, 3,10,0, 3,11,0, +3,12,0, 3,13,0, 3,14,0, 3,15,0 }; + struct subst_entry efika_subst_table[] = { + { /, device_type, prop_cstr(efika) }, + { /builtin, compatible, prop_cstr(soc) }, + { /builtin/ata, compatible, prop_cstr(mpc5200b-ata\0mpc5200-ata), }, + { /builtin/bestcomm, compatible, prop_cstr(mpc5200b-bestcomm\0mpc5200-bestcomm) }, + { /builtin/bestcomm, interrupts, prop_bcomm_irq, sizeof(prop_bcomm_irq) }, + { /builtin/ethernet, compatible, prop_cstr(mpc5200b-fec\0mpc5200-fec) }, + { /builtin/pic, compatible, prop_cstr(mpc5200b-pic\0mpc5200-pic) }, + { /builtin/serial,compatible, prop_cstr(mpc5200b-psc-uart\0mpc5200-psc-uart) }, + { /builtin/sound, compatible, prop_cstr(mpc5200b-psc-ac97\0mpc5200-psc-ac97) }, + { /builtin/sound, interrupts, prop_sound_irq, sizeof(prop_sound_irq) }, + { /builtin/sram, compatible, prop_cstr(mpc5200b-sram\0mpc5200-sram) }, + { /builtin/sram, device_type, prop_cstr(sram) }, + {} + }; + #undef prop_cstr + + /* Vars */ + u32 node; + char prop[64]; + int rv, i; + + /* Check if we're really running on a EFIKA */ + node = call_prom(finddevice, 1, 1, ADDR(/)); + if (!PHANDLE_VALID(node)) + return; + + rv = prom_getprop(node, model, prop, sizeof(prop)); + if (rv == PROM_ERROR) + return; + if (strcmp(prop, EFIKA5K2)) + return; + + prom_printf(Applying EFIKA device tree fixups\n); + + /* Process substitution table */ + for (i=0; efika_subst_table[i].path; i++) { + struct subst_entry *se = efika_subst_table[i]; + + node = call_prom(finddevice, 1, 1, ADDR(se-path)); + if (!PHANDLE_VALID(node)) { + prom_printf(fixup_device_tree_efika: , + skipped entry %x - not found\n, i); + continue; + } + + rv = prom_setprop(node, se-path, se-property, + se-value, se-value_len ); + if (rv == PROM_ERROR) + prom_printf(fixup_device_tree_efika: , + skipped entry %x - setprop error\n, i); + } +} +#else +#define fixup_device_tree_efika() +#endif + static void __init fixup_device_tree(void) { fixup_device_tree_maple(); fixup_device_tree_chrp(); fixup_device_tree_pmac(); + fixup_device_tree_efika(); } static void __init prom_find_boot_cpu(void) - To unsubscribe from this list: send the
[POWERPC] Use common 52xx of_platform probe code for EFIKA
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82a03b92279f2ea80e11dc2c419fdaa3800401a2 Commit: 82a03b92279f2ea80e11dc2c419fdaa3800401a2 Parent: b6a591b2c59935eef5dd31790323ca6014e28f01 Author: Sylvain Munaut [EMAIL PROTECTED] AuthorDate: Mon Feb 12 23:13:22 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:53 2007 +1100 [POWERPC] Use common 52xx of_platform probe code for EFIKA Now that the device tree has the good properties, we can remove all the efika_init code by a single call to common code. While we're modifying that file, a few whitespaces/alignement/typo fixes are made (nothing significant). Signed-off-by: Sylvain Munaut [EMAIL PROTECTED] Acked-by: Grant Likely [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/52xx/efika-setup.c | 64 - 1 files changed, 18 insertions(+), 46 deletions(-) diff --git a/arch/powerpc/platforms/52xx/efika-setup.c b/arch/powerpc/platforms/52xx/efika-setup.c index 110c980..d61ce84 100644 --- a/arch/powerpc/platforms/52xx/efika-setup.c +++ b/arch/powerpc/platforms/52xx/efika-setup.c @@ -2,7 +2,7 @@ * * Efika 5K2 platform setup * Some code really inspired from the lite5200b platform. - * + * * Copyright (C) 2006 bplan GmbH * * This file is licensed under the terms of the GNU General Public License @@ -81,35 +81,7 @@ static void __init efika_setup_arch(void) efika_pcisetup(); if (ppc_md.progress) - ppc_md.progress(Linux/PPC UTS_RELEASE runnung on Efika ;-)\n, 0x0); -} - -static void __init efika_init(void) -{ - struct device_node *np; - struct device_node *cnp = NULL; - const u32 *base; - - /* Find every child of the SOC node and add it to of_platform */ - np = of_find_node_by_name(NULL, builtin); - if (np) { - char name[BUS_ID_SIZE]; - while ((cnp = of_get_next_child(np, cnp))) { - strcpy(name, cnp-name); - - base = get_property(cnp, reg, NULL); - if (base == NULL) - continue; - - snprintf(name+strlen(name), BUS_ID_SIZE, @%x, *base); - of_platform_device_create(cnp, name, NULL); - - printk(KERN_INFO EFIKA_PLATFORM_NAME : Added %s (type '%s' at '%s') to the known devices\n, name, cnp-type, cnp-full_name); - } - } - - if (ppc_md.progress) - ppc_md.progress( Have fun with your Efika!, 0x); + ppc_md.progress(Linux/PPC UTS_RELEASE running on Efika ;-)\n, 0x0); } static int __init efika_probe(void) @@ -131,20 +103,20 @@ static int __init efika_probe(void) define_machine(efika) { - .name = EFIKA_PLATFORM_NAME, - .probe = efika_probe, - .setup_arch = efika_setup_arch, - .init = efika_init, - .show_cpuinfo = efika_show_cpuinfo, - .init_IRQ = mpc52xx_init_irq, - .get_irq = mpc52xx_get_irq, - .restart = rtas_restart, - .power_off = rtas_power_off, - .halt = rtas_halt, - .set_rtc_time = rtas_set_rtc_time, - .get_rtc_time = rtas_get_rtc_time, - .progress = rtas_progress, - .get_boot_time = rtas_get_boot_time, - .calibrate_decr = generic_calibrate_decr, - .phys_mem_access_prot = pci_phys_mem_access_prot, + .name = EFIKA_PLATFORM_NAME, + .probe = efika_probe, + .setup_arch = efika_setup_arch, + .init = mpc52xx_declare_of_platform_devices, + .show_cpuinfo = efika_show_cpuinfo, + .init_IRQ = mpc52xx_init_irq, + .get_irq= mpc52xx_get_irq, + .restart= rtas_restart, + .power_off = rtas_power_off, + .halt = rtas_halt, + .set_rtc_time = rtas_set_rtc_time, + .get_rtc_time = rtas_get_rtc_time, + .progress = rtas_progress, + .get_boot_time = rtas_get_boot_time, + .calibrate_decr = generic_calibrate_decr, + .phys_mem_access_prot = pci_phys_mem_access_prot, }; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] Fix unbalanced of_node_{get,put} in efika-setup.c
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=46e4cf6c14e0a5b8916a1236a7079ccad3f4352a Commit: 46e4cf6c14e0a5b8916a1236a7079ccad3f4352a Parent: 82a03b92279f2ea80e11dc2c419fdaa3800401a2 Author: Sylvain Munaut [EMAIL PROTECTED] AuthorDate: Mon Feb 12 23:13:23 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:53 2007 +1100 [POWERPC] Fix unbalanced of_node_{get,put} in efika-setup.c Signed-off-by: Sylvain Munaut [EMAIL PROTECTED] Acked-by: Grant Likely [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/52xx/efika-setup.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/platforms/52xx/efika-setup.c b/arch/powerpc/platforms/52xx/efika-setup.c index d61ce84..b6945cb 100644 --- a/arch/powerpc/platforms/52xx/efika-setup.c +++ b/arch/powerpc/platforms/52xx/efika-setup.c @@ -42,14 +42,13 @@ static void efika_show_cpuinfo(struct seq_file *m) const char *codegenvendor = NULL; root = of_find_node_by_path(/); - if (root) { - revision = get_property(root, revision, NULL); - codegendescription = - get_property(root, CODEGEN,description, NULL); - codegenvendor = get_property(root, CODEGEN,vendor, NULL); + if (!root) + return; - of_node_put(root); - } + revision = get_property(root, revision, NULL); + codegendescription = + get_property(root, CODEGEN,description, NULL); + codegenvendor = get_property(root, CODEGEN,vendor, NULL); if (codegendescription) seq_printf(m, machine\t\t: %s\n, codegendescription); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] Small cleanup of EFIKA platform
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9724b86f0706ca9b552d82e013cb0c208b4f5529 Commit: 9724b86f0706ca9b552d82e013cb0c208b4f5529 Parent: 46e4cf6c14e0a5b8916a1236a7079ccad3f4352a Author: Sylvain Munaut [EMAIL PROTECTED] AuthorDate: Mon Feb 12 23:13:24 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:53 2007 +1100 [POWERPC] Small cleanup of EFIKA platform The efika platform used three files efika-pci.c efika-setup.c and a 2 line efika.h to link the two. The total of code in those is really not much and therefore, I think they're better merged in a single file. There is absolutely _no_code_change_ at all, just merged the files. Signed-off-by: Sylvain Munaut [EMAIL PROTECTED] Acked-by: Grant Likely [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/52xx/Makefile |2 +- arch/powerpc/platforms/52xx/efika-pci.c | 119 -- arch/powerpc/platforms/52xx/efika-setup.c | 121 -- arch/powerpc/platforms/52xx/efika.c | 243 + arch/powerpc/platforms/52xx/efika.h | 19 --- 5 files changed, 244 insertions(+), 260 deletions(-) diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile index 795b713..07cdbca 100644 --- a/arch/powerpc/platforms/52xx/Makefile +++ b/arch/powerpc/platforms/52xx/Makefile @@ -6,5 +6,5 @@ obj-y += mpc52xx_pic.o mpc52xx_common.o obj-$(CONFIG_PCI) += mpc52xx_pci.o endif -obj-$(CONFIG_PPC_EFIKA)+= efika-setup.o efika-pci.o +obj-$(CONFIG_PPC_EFIKA)+= efika.o obj-$(CONFIG_PPC_LITE5200) += lite5200.o diff --git a/arch/powerpc/platforms/52xx/efika-pci.c b/arch/powerpc/platforms/52xx/efika-pci.c deleted file mode 100644 index 62e05b2..000 --- a/arch/powerpc/platforms/52xx/efika-pci.c +++ /dev/null @@ -1,119 +0,0 @@ - -#include linux/kernel.h -#include linux/pci.h -#include linux/string.h -#include linux/init.h - -#include asm/io.h -#include asm/irq.h -#include asm/prom.h -#include asm/machdep.h -#include asm/sections.h -#include asm/pci-bridge.h -#include asm/rtas.h - -#include efika.h - -#ifdef CONFIG_PCI -/* - * Access functions for PCI config space using RTAS calls. - */ -static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset, - int len, u32 * val) -{ - struct pci_controller *hose = bus-sysdata; - unsigned long addr = (offset 0xff) | ((devfn 0xff) 8) - | (((bus-number - hose-first_busno) 0xff) 16) - | (hose-index 24); - int ret = -1; - int rval; - - rval = rtas_call(rtas_token(read-pci-config), 2, 2, ret, addr, len); - *val = ret; - return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; -} - -static int rtas_write_config(struct pci_bus *bus, unsigned int devfn, -int offset, int len, u32 val) -{ - struct pci_controller *hose = bus-sysdata; - unsigned long addr = (offset 0xff) | ((devfn 0xff) 8) - | (((bus-number - hose-first_busno) 0xff) 16) - | (hose-index 24); - int rval; - - rval = rtas_call(rtas_token(write-pci-config), 3, 1, NULL, -addr, len, val); - return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; -} - -static struct pci_ops rtas_pci_ops = { - rtas_read_config, - rtas_write_config -}; - -void __init efika_pcisetup(void) -{ - const int *bus_range; - int len; - struct pci_controller *hose; - struct device_node *root; - struct device_node *pcictrl; - - root = of_find_node_by_path(/); - if (root == NULL) { - printk(KERN_WARNING EFIKA_PLATFORM_NAME - : Unable to find the root node\n); - return; - } - - for (pcictrl = NULL;;) { - pcictrl = of_get_next_child(root, pcictrl); - if ((pcictrl == NULL) || (strcmp(pcictrl-name, pci) == 0)) - break; - } - - of_node_put(root); - - if (pcictrl == NULL) { - printk(KERN_WARNING EFIKA_PLATFORM_NAME - : Unable to find the PCI bridge node\n); - return; - } - - bus_range = get_property(pcictrl, bus-range, len); - if (bus_range == NULL || len 2 * sizeof(int)) { - printk(KERN_WARNING EFIKA_PLATFORM_NAME - : Can't get bus-range for %s\n, pcictrl-full_name); - return; - } - - if (bus_range[1] == bus_range[0]) - printk(KERN_INFO EFIKA_PLATFORM_NAME : PCI bus %d, - bus_range[0]); - else - printk(KERN_INFO EFIKA_PLATFORM_NAME : PCI buses %d..%d, - bus_range[0],
[POWERPC] spufs: remove need for struct page for SPEs
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d Commit: 78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d Parent: 9724b86f0706ca9b552d82e013cb0c208b4f5529 Author: Benjamin Herrenschmidt [EMAIL PROTECTED] AuthorDate: Tue Feb 13 11:46:06 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:53 2007 +1100 [POWERPC] spufs: remove need for struct page for SPEs This patch removes the need for struct page for SPE local store and registers from spufs. It also makes the locking much more obvious and no longer relying on the truncate logic black magic for protecting against races between unmap_mapping_range() and new pages faulted in. It does so by switching to a nopfn() handler and using the new vm_insert_pfn() to setup the PTEs itself while holding a lock on the SPE. The nice thing is that this patch actually removes a lot more code than it adds :-) Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/Kconfig |2 +- arch/powerpc/platforms/cell/spu_manage.c | 102 ++--- arch/powerpc/platforms/cell/spufs/file.c | 121 ++ 3 files changed, 80 insertions(+), 145 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 0088c5e..340d9be 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -876,7 +876,7 @@ config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_DEFAULT def_bool y - depends on (SMP PPC_PSERIES) || PPC_CELL + depends on (SMP PPC_PSERIES) || PPC_PS3 config ARCH_POPULATES_NODE_MAP def_bool y diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index d8b39fe..e34599f 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c @@ -59,63 +59,6 @@ static u64 __init find_spu_unit_number(struct device_node *spe) return 0; } -static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe, - const char *prop) -{ - const struct address_prop { - unsigned long address; - unsigned int len; - } __attribute__((packed)) *p; - int proplen; - - unsigned long start_pfn, nr_pages; - struct pglist_data *pgdata; - struct zone *zone; - int ret; - - p = get_property(spe, prop, proplen); - WARN_ON(proplen != sizeof (*p)); - - start_pfn = p-address PAGE_SHIFT; - nr_pages = ((unsigned long)p-len + PAGE_SIZE - 1) PAGE_SHIFT; - - pgdata = NODE_DATA(spu-node); - zone = pgdata-node_zones; - - ret = __add_pages(zone, start_pfn, nr_pages); - - return ret; -} - -static void __iomem * __init map_spe_prop(struct spu *spu, - struct device_node *n, const char *name) -{ - const struct address_prop { - unsigned long address; - unsigned int len; - } __attribute__((packed)) *prop; - - const void *p; - int proplen; - void __iomem *ret = NULL; - int err = 0; - - p = get_property(n, name, proplen); - if (proplen != sizeof (struct address_prop)) - return NULL; - - prop = p; - - err = cell_spuprop_present(spu, n, name); - if (err (err != -EEXIST)) - goto out; - - ret = ioremap(prop-address, prop-len); - - out: - return ret; -} - static void spu_unmap(struct spu *spu) { if (!firmware_has_feature(FW_FEATURE_LPAR)) @@ -157,6 +100,23 @@ static int __init spu_map_interrupts_old(struct spu *spu, return spu-irqs[2] == NO_IRQ ? -EINVAL : 0; } +static void __iomem * __init spu_map_prop_old(struct spu *spu, + struct device_node *n, + const char *name) +{ + const struct address_prop { + unsigned long address; + unsigned int len; + } __attribute__((packed)) *prop; + int proplen; + + prop = get_property(n, name, proplen); + if (prop == NULL || proplen != sizeof (struct address_prop)) + return NULL; + + return ioremap(prop-address, prop-len); +} + static int __init spu_map_device_old(struct spu *spu) { struct device_node *node = spu-devnode; @@ -175,7 +135,7 @@ static int __init spu_map_device_old(struct spu *spu) /* we use local store as ram, not io memory */ spu-local_store = (void __force *) - map_spe_prop(spu, node, local-store); + spu_map_prop_old(spu, node, local-store); if (!spu-local_store) goto out; @@ -184,16 +144,16 @@ static int __init spu_map_device_old(struct spu *spu) goto out_unmap;
[POWERPC] spufs: Fix bitrot of the SPU mmap facility
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17e0e27020d028a790d97699aff85a43af5be472 Commit: 17e0e27020d028a790d97699aff85a43af5be472 Parent: 44430e0d3916ab6aaf0451fdb811f4f1803b741e Author: Benjamin Herrenschmidt [EMAIL PROTECTED] AuthorDate: Tue Feb 13 11:46:08 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Feb 13 15:35:54 2007 +1100 [POWERPC] spufs: Fix bitrot of the SPU mmap facility It looks like we've had some serious bitrot there mostly due to tracking of address_space's of mmap'ed files getting out of sync with the actual mmap code. The mfc, mss and psmap were not tracked properly and thus not invalidated on context switches (oops !) I also removed the various file-f_mapping = inode-i_mapping; assignments that were done in the other open() routines since that is already done for us by __dentry_open. One improvement we might want to do later is to assign the various ctx- fields at mmap time instead of file open/close time so that we don't call unmap_mapping_range() on thing that have not been mmap'ed Finally, I added some smp_wmb's after assigning the ctx- fields to make sure they are visible to other CPUs. I don't think this is really necessary as I suspect locking in the fs layer will make that happen anyway but better safe than sorry. Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/cell/spufs/context.c | 12 arch/powerpc/platforms/cell/spufs/file.c| 16 arch/powerpc/platforms/cell/spufs/spufs.h |2 ++ 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 0870009..28c718c 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c @@ -111,13 +111,17 @@ void spu_unmap_mappings(struct spu_context *ctx) if (ctx-local_store) unmap_mapping_range(ctx-local_store, 0, LS_SIZE, 1); if (ctx-mfc) - unmap_mapping_range(ctx-mfc, 0, 0x4000, 1); + unmap_mapping_range(ctx-mfc, 0, 0x1000, 1); if (ctx-cntl) - unmap_mapping_range(ctx-cntl, 0, 0x4000, 1); + unmap_mapping_range(ctx-cntl, 0, 0x1000, 1); if (ctx-signal1) - unmap_mapping_range(ctx-signal1, 0, 0x4000, 1); + unmap_mapping_range(ctx-signal1, 0, PAGE_SIZE, 1); if (ctx-signal2) - unmap_mapping_range(ctx-signal2, 0, 0x4000, 1); + unmap_mapping_range(ctx-signal2, 0, PAGE_SIZE, 1); + if (ctx-mss) + unmap_mapping_range(ctx-mss, 0, 0x1000, 1); + if (ctx-psmap) + unmap_mapping_range(ctx-psmap, 0, 0x2, 1); } int spu_acquire_exclusive(struct spu_context *ctx) diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 7fb9a6d..a528020 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c @@ -45,8 +45,8 @@ spufs_mem_open(struct inode *inode, struct file *file) struct spufs_inode_info *i = SPUFS_I(inode); struct spu_context *ctx = i-i_ctx; file-private_data = ctx; - file-f_mapping = inode-i_mapping; ctx-local_store = inode-i_mapping; + smp_wmb(); return 0; } @@ -232,8 +232,8 @@ static int spufs_cntl_open(struct inode *inode, struct file *file) struct spu_context *ctx = i-i_ctx; file-private_data = ctx; - file-f_mapping = inode-i_mapping; ctx-cntl = inode-i_mapping; + smp_wmb(); return simple_attr_open(inode, file, spufs_cntl_get, spufs_cntl_set, 0x%08lx); } @@ -717,8 +717,8 @@ static int spufs_signal1_open(struct inode *inode, struct file *file) struct spufs_inode_info *i = SPUFS_I(inode); struct spu_context *ctx = i-i_ctx; file-private_data = ctx; - file-f_mapping = inode-i_mapping; ctx-signal1 = inode-i_mapping; + smp_wmb(); return nonseekable_open(inode, file); } @@ -824,8 +824,8 @@ static int spufs_signal2_open(struct inode *inode, struct file *file) struct spufs_inode_info *i = SPUFS_I(inode); struct spu_context *ctx = i-i_ctx; file-private_data = ctx; - file-f_mapping = inode-i_mapping; ctx-signal2 = inode-i_mapping; + smp_wmb(); return nonseekable_open(inode, file); } @@ -1021,8 +1021,11 @@ static int spufs_mss_mmap(struct file *file, struct vm_area_struct *vma) static int spufs_mss_open(struct inode *inode, struct file *file) { struct spufs_inode_info *i = SPUFS_I(inode); + struct spu_context *ctx = i-i_ctx; file-private_data =
[POWERPC] 85xx: Don't write reserved values to MAS1[TSIZE]
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8ce0a7df6e6117d8814e976d4b7ce6a6b2c9cf93 Commit: 8ce0a7df6e6117d8814e976d4b7ce6a6b2c9cf93 Parent: edacf6bb7e7e1b75f2937966a50119439ff78ccb Author: Becky Bruce [EMAIL PROTECTED] AuthorDate: Mon Feb 12 17:43:46 2007 -0600 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Mon Feb 12 21:32:38 2007 -0600 [POWERPC] 85xx: Don't write reserved values to MAS1[TSIZE] Some of the current tlbwe instructions early on in head_fsl_booke.S take advantage of unarchitected behavior that allows the writing of reserved values to the TSIZE field. This patch corrects that, as well as an error where an uninitialized (by linux) value was written into a MAS register and used for a tlbwe. Correct this for both arch/ppc and arch/powerpc. Signed-off-by: Becky Bruce [EMAIL PROTECTED] Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- arch/powerpc/kernel/head_fsl_booke.S |5 - arch/ppc/kernel/head_fsl_booke.S |5 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 66877bd..54f40d9 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S @@ -206,7 +206,8 @@ skpinv: addir6,r6,1 /* Increment */ rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ mtspr SPRN_MAS0,r7 tlbre - li r6,0 + mfspr r6,SPRN_MAS1 + rlwinm r6,r6,0,2,0 /* clear IPROT */ mtspr SPRN_MAS1,r6 tlbwe /* Invalidate TLB1 */ @@ -248,6 +249,8 @@ skpinv: addir6,r6,1 /* Increment */ rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */ mtspr SPRN_MAS0,r7 tlbre + mfspr r8,SPRN_MAS1 + rlwinm r8,r8,0,2,0 /* clear IPROT */ mtspr SPRN_MAS1,r8 tlbwe /* Invalidate TLB1 */ diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index 66877bd..54f40d9 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S @@ -206,7 +206,8 @@ skpinv: addir6,r6,1 /* Increment */ rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ mtspr SPRN_MAS0,r7 tlbre - li r6,0 + mfspr r6,SPRN_MAS1 + rlwinm r6,r6,0,2,0 /* clear IPROT */ mtspr SPRN_MAS1,r6 tlbwe /* Invalidate TLB1 */ @@ -248,6 +249,8 @@ skpinv: addir6,r6,1 /* Increment */ rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */ mtspr SPRN_MAS0,r7 tlbre + mfspr r8,SPRN_MAS1 + rlwinm r8,r8,0,2,0 /* clear IPROT */ mtspr SPRN_MAS1,r8 tlbwe /* Invalidate TLB1 */ - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] 85xx: Add support for the 8568 MDS board
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c2882bb12cbd8a4170e673e6a33c6be047b75bc1 Commit: c2882bb12cbd8a4170e673e6a33c6be047b75bc1 Parent: 54c66f6d781e03dc0b23956234963c4911e6d1c0 Author: Andy Fleming [EMAIL PROTECTED] AuthorDate: Fri Feb 9 17:28:31 2007 -0600 Committer: Kumar Gala [EMAIL PROTECTED] CommitDate: Tue Feb 13 12:36:23 2007 -0600 [POWERPC] 85xx: Add support for the 8568 MDS board Add support for the MPC8568 MDS reference board Signed-off-by: Andrew Fleming [EMAIL PROTECTED] Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mpc8568mds.dts | 380 + arch/powerpc/platforms/85xx/Kconfig | 13 + arch/powerpc/platforms/85xx/Makefile |1 + arch/powerpc/platforms/85xx/mpc8568_mds.c | 246 +++ 4 files changed, 640 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts new file mode 100644 index 000..06d2465 --- /dev/null +++ b/arch/powerpc/boot/dts/mpc8568mds.dts @@ -0,0 +1,380 @@ +/* + * MPC8568E MDS Device Tree Source + * + * Copyright 2007 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + + +/* +/memreserve/ 100; +*/ + +/ { + model = MPC8568EMDS; + compatible = MPC85xxMDS; + #address-cells = 1; + #size-cells = 1; + linux,phandle = 100; + + cpus { + #cpus = 1; + #address-cells = 1; + #size-cells = 0; + linux,phandle = 200; + + PowerPC,[EMAIL PROTECTED] { + device_type = cpu; + reg = 0; + d-cache-line-size = 20; // 32 bytes + i-cache-line-size = 20; // 32 bytes + d-cache-size = 8000; // L1, 32K + i-cache-size = 8000; // L1, 32K + timebase-frequency = 0; + bus-frequency = 0; + clock-frequency = 0; + 32-bit; + linux,phandle = 201; + }; + }; + + memory { + device_type = memory; + linux,phandle = 300; + reg = 1000; + }; + + [EMAIL PROTECTED] { + device_type = board-control; + reg = f800 8000; + }; + + [EMAIL PROTECTED] { + #address-cells = 1; + #size-cells = 1; + #interrupt-cells = 2; + device_type = soc; + ranges = 0 e000 0010; + reg = e000 0010; + bus-frequency = 0; + + [EMAIL PROTECTED] { + device_type = i2c; + compatible = fsl-i2c; + reg = 3000 100; + interrupts = 1b 2; + interrupt-parent = 4; + dfsrr; + }; + + [EMAIL PROTECTED] { + device_type = i2c; + compatible = fsl-i2c; + reg = 3100 100; + interrupts = 1b 2; + interrupt-parent = 4; + dfsrr; + }; + + [EMAIL PROTECTED] { + #address-cells = 1; + #size-cells = 0; + device_type = mdio; + compatible = gianfar; + reg = 24520 20; + linux,phandle = 24520; + [EMAIL PROTECTED] { + linux,phandle = 2452000; + interrupt-parent = 4; + interrupts = 31 1; + reg = 0; + device_type = ethernet-phy; + }; + [EMAIL PROTECTED] { + linux,phandle = 2452001; + interrupt-parent = 4; + interrupts = 32 1; + reg = 1; + device_type = ethernet-phy; + }; + + [EMAIL PROTECTED] { + linux,phandle = 2452002; + interrupt-parent = 4; + interrupts = 31 1; + reg = 2; + device_type = ethernet-phy; + }; +