Wu Zhangjin
e608aadd17
MIPS: Loongson: Remove unused macro LOONGSON_PERFCNT_IRQ
...
LOONGSON2_PERFCNT_IRQ is used for the irq number of the performance
overflow interrupts; LOONGSON_PERFCNT_IRQ is unused so remove it.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1494/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-08-05 13:26:26 +01:00
Wu Zhangjin
de3bc0e7ba
MIPS: Loongson: Oprofile: add a new do_perfcnt_IRQ()
...
On FuLoong-2F IP6 is shared by the performance counter overflow interrupt
and the Bonito northbridge interrupt. To reduce overhead only call
do_IRQ() when oprofile is enabled to reduce overhead.
This patch adds an inline function do_perfcnt_IRQ() to hide the #if's ,
which can be shared by the other Loongson machines, i.e. gdium.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1492/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-08-05 13:26:24 +01:00
Wu Zhangjin
b8c7428af0
MIPS: Loongson: Remove set_irq_trigger_mode()
...
set_irq_trigger_mode() is not needed on all platforms so remove it
and move the related source code to mach_init_irq().
This will allow gdium to share the common irq.c without adding an empty
set_irq_trigger_mode().
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1493/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-08-05 13:26:23 +01:00
Wu Zhangjin
922010ff7b
MIPS: oprofile: Fix breakage when CONFIG_OPROFILE=m
...
When the oprofile is compiled as a module do_IRQ() is not called in
arch/mips/loongson/lemote-2f/irq.c due to a wrong #ifdef there.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1143/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-04-30 20:52:54 +01:00
Ralf Baechle
3b439470e3
MIPS: Lemote 2F: Move printks out of port_access_lock.
...
No point in protecting them and printks are sloow.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-02-27 12:53:41 +01:00
Ralf Baechle
8965087055
MIPS: i8259: Convert IRQ controller lock to raw spinlock.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-02-27 12:53:38 +01:00
Wu Zhangjin
f7a904dffe
MIPS: Loongson: Change the Email address of Wu Zhangjin
...
Currently wuzj@lemote.com is not usable; change it to wuzhangjin@gmail.com .
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: yanh@lemote.com
Cc: huhb@lemote.com
Cc: zhangfx@lemote.com
Patchwork: http://patchwork.linux-mips.org/patch/829/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-02-27 12:53:12 +01:00
Wu Zhangjin
1b39a0bad5
MIPS: Loongson: Lemote-2F: Get the machine type from PMON_VER
...
Lemote have used the PMON_VER strings to indicate the loongson-2f
machine series:
PMON_VER=LM8089 Lemote 8.9'' netbook
LM8101 Lemote 10.1'' netbook
(The above two netbooks have the same kernel support)
LM6XXX Lemote FuLoong(2F) box series
LM9XXX Lemote LynLoong PC series
Before the machtype is supported by the PMON, we can get the machine
type from the PMON_VER for these machines, this will help the users a
lot.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: yanh@lemote.com
Cc: huhb@lemote.com
Cc: zhangfx@lemote.com
Cc: Wu Zhangjin <wuzhangjin@gmail.com >
Patchwork: http://patchwork.linux-mips.org/patch/821/
Patchwork: http://patchwork.linux-mips.org/patch/908/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-02-27 12:53:09 +01:00
Wu Zhangjin
c47a48d83a
MIPS: Lemote 2F: Suspend CS5536 MFGPT Timer
...
Before putting the Loongson 2F into wait mode, suspend the MFGPT Timer and
after wake-up resume it. This may save some power.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/706/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-12-17 01:57:33 +00:00
Wu Zhangjin
70ab711df4
MIPS: Yeeloong 2F: Cleanup reset logic using the new ec_write function
...
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/683/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-12-17 01:57:29 +00:00
Wu Zhangjin
cb1ed9e117
MIPS: Yeeloong 2F: Add LID open event as the wakeup event
...
Yeeloong 2F netbook has an KB3310B embedded controller to manage the LID
action. When the LID is closed or opened a SCI interrupt is sent out and
the corresponding event is saved to an EC register for later query.
Allow the LID open interrupt to wake the processor from wait mode if it is
in the suspend mode.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/685/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-12-17 01:57:28 +00:00
Wu Zhangjin
ec614d80b5
MIPS: Yeeloong 2F: Add basic EC operations
...
YeeLoong2F has a KB3310b embedded controller. Add basic operations for
future related drivers and board support.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/684/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-12-17 01:57:27 +00:00
Wu Zhangjin
6e552c9b3a
MIPS: Lemote 2F: Add Lynloong support
...
Add a new machtype and kernel options for the Lynloong.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/657/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-12-17 01:57:18 +00:00
Wu Zhangjin
e13fb77661
MIPS: Lemote 2F: Add NAS support
...
Kernel support for this machine is almost the same as Fuloong 2F; the only
difference is that it uses the serial port provided by Loongson 2F processor
as Yeeloong 2F does.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/656/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-12-17 01:57:18 +00:00
Wu Zhangjin
a9e8641f4c
MIPS: Yeeloong 2F: Add board specific suspend support
...
Lemote Loongson 2F family machines need an external interrupt to wake the
system from the suspend mode.
For YeeLoong 2F and Mengloong 2F setup the keyboard interrupt as the wakeup
interrupt.
The new Fuloong 2F and LingLoong 2F have a button to directly send an
interrupt to the CPU so there is no need to setup an interrupt.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: yanh@lemote.com
Cc: huhb@lemote.com
Cc: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: Len Brown <len.brown@intel.com >
Cc: Rafael J. Wysocki <rjw@sisk.pl >
Cc: linux-pm@lists.linux-foundation.org
Patchwork: http://patchwork.linux-mips.org/patch/630/
Acked-by: Pavel Machek <pavel@ucw.cz >
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-12-17 01:57:16 +00:00
Wu Zhangjin
2ee98e0f46
MIPS: Lemote 2F: Add reset support
...
Fuloong 2F, Yeeloong 2F and Menglong 2F have different reset / shutdown
logic.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: zhangfx@lemote.com
Cc: yanh@lemote.com
Cc: huhb@lemote.com
Cc: Nicholas Mc Guire <hofrat@hofr.at >
Cc: Arnaud Patard <apatard@mandriva.com >
Cc: loongson-dev@googlegroups.com
Cc: linux-mips@linux-mips.org
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-12-17 01:57:14 +00:00
Wu Zhangjin
6616db78ee
MIPS: Lemote 2F: Add IRQ support
...
The generic i8259_irq() will make kernel hang on booting, so Loongson 2F
needs its own polling method.
IP6 is shared by the bonito interrupt and perfcounter interrupts.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com >
Cc: zhangfx@lemote.com
Cc: yanh@lemote.com
Cc: huhb@lemote.com
Cc: Nicholas Mc Guire <hofrat@hofr.at >
Cc: Arnaud Patard <apatard@mandriva.com >
Cc: loongson-dev@googlegroups.com
Cc: linux-mips@linux-mips.org
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-12-17 01:57:13 +00:00