Commit graph

23 commits

Author SHA1 Message Date
Paul Gortmaker 3b2663ca84 mips: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6320/
2014-01-24 22:39:56 +01:00
Viresh Kumar 5070158804 cpufreq: rename index as driver_data in cpufreq_frequency_table
The "index" field of struct cpufreq_frequency_table was never an
index and isn't used at all by the cpufreq core.  It only is useful
for cpufreq drivers for their internal purposes.

Many people nowadays blindly set it in ascending order with the
assumption that the core will use it, which is a mistake.

Rename it to "driver_data" as that's what its purpose is. All of its
users are updated accordingly.

[rjw: Changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-06-04 14:25:59 +02:00
Ralf Baechle 7034228792 MIPS: Whitespace cleanup.
Having received another series of whitespace patches I decided to do this
once and for all rather than dealing with this kind of patches trickling
in forever.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-02-01 10:00:22 +01:00
Ralf Baechle 95cf1468f7 MIPS: Loongson 2: Sort out clock managment.
For unexplainable reasons the Loongson 2 clock API was implemented in a
module so fixing this involved shifting large amounts of code around.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-08-01 18:10:06 +02:00
Wu Zhangjin 77cbece767 MIPS: Loongson: Mark cascade interrupts IRQF_NO_THREAD
There are two cascade interrupts in Loongson machines, one for bonito
northbridge, another for the 8259A controller in the southbridge. Both
want to be non threaded.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Cc: Wu Zhangjin <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/2638/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-09-21 17:52:22 +02:00
Ralf Baechle 98f4a2c27c MIPS: Remove pointless return statement from empty void functions.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
To: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2391/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-07-25 17:26:55 +01:00
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