Paul Gortmaker
361d0f78ac
MIPS: ATH25: Remove legacy __cpuinit section that crept in
...
We removed __cpuinit support (leaving no-op stubs) quite some time ago.
However this one crept back in as of commit 43cc739fd9
("MIPS: ath25: add common parts")
Since we want to clobber the stubs soon, get this removed now.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com >
Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9891/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:42 +02:00
Andrew Bresticker
644238ae81
MIPS: Pistachio: Enable USB PHY driver in defconfig
...
Update pistachio_defconfig to enable Pistachio's USB PHY driver.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Cc: Kishon Vijay Abraham I <kishon@ti.com >
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: James Hartley <james.hartley@imgtec.com >
Cc: Damien Horsley <Damien.Horsley@imgtec.com >
Patchwork: https://patchwork.linux-mips.org/patch/9729/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:39 +02:00
Ezequiel Garcia
018f62ee20
MIPS: Pistachio: Support 8250-based early printk
...
Pistachio SoCs are capable of early printk with generic 8250 support,
so let's select the options to enable it.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com >
Cc: linux-mips@linux-mips.org
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: James Hartley <james.hartley@imgtec.com >
Patchwork: https://patchwork.linux-mips.org/patch/9913/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:36 +02:00
Jaedon Shin
8bac078c5d
MIPS: BMIPS: dts: Add uart device nodes to bcm7xxx platforms
...
Add two uart device nodes known as the uart1 and uart2 for the bcm7xxx
platforms.
Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com >
Cc: Kevin Cernekee <cernekee@gmail.com >
Cc: Florian Fainelli <f.fainelli@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9991/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:35 +02:00
Florian Fainelli
380e4270f5
MIPS: BMIPS: Add support for Broadcom BCM97435SVMB
...
Add a DTS file and Kconfig entry for the BCM97435SVMB evaluation board
using bcm7435.dtsi as an example.
The current code needs some tweaking to allow us to use the
dual-threaded dual BMIPS5200 CPUs, so for now we limit ourselves to
allowing just a single CPU to be booted.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: cernekee@chromium.org
Cc: Steven.Hill@imgtec.com
Patchwork: https://patchwork.linux-mips.org/patch/9972/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:34 +02:00
Florian Fainelli
e4c7d00965
MIPS: BMIPS: Add BCM7435 dtsi
...
Add the bare minimum required to boot a BCM7435-based system:
- BMIPS5200 CPU nodes
- Level 1 and 2 interrupt controllers
- UARTs
- EHCI/OHCI controllers
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: cernekee@chromium.org
Cc: Steven.Hill@imgtec.com
Patchwork: https://patchwork.linux-mips.org/patch/9971/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:32 +02:00
Florian Fainelli
3fbbb2ee36
MIPS: BCM63xx: Utilize asm/bmips-spaces.h
...
Since BCM63xx runs on BMIPS3300 which requires the use of a FIXADDR_TOP
to avoid collisions with the SBR, utilize asm/bmips-spaces.h which
defines FIXADDR_TOP for us now.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: cernekee@chromium.org
Cc: jogo@openwrt.org
Patchwork: https://patchwork.linux-mips.org/patch/9969/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:32 +02:00
Florian Fainelli
09a50cc727
MIPS: BMIPS: Define BMIPS_FIXADDR_TOP in asm/bmips-spaces.h
...
The FIXADDR_TOP value used by mach-bmips is in fact required whenever we
run on BMIPS3300 BMIPS CPUs, and is not machine, but CPU-specific, move
this constant to asm/bmips-spaces.h and use it in mach-bmips/spaces.h.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: cernekee@chromium.org
Cc: jogo@openwrt.org
Patchwork: https://patchwork.linux-mips.org/patch/9968/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:30 +02:00
Paul Burton
0752f92934
MIPS: ingenic: Initial MIPS Creator CI20 support
...
Add an initial device tree for the Ingenic JZ4780 based MIPS Creator
CI20 board.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk >
Cc: Kumar Gala <galak@codeaurora.org >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Pawel Moll <pawel.moll@arm.com >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10162/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:28 +02:00
Paul Burton
5b9cdd2449
MIPS: ingenic: Initial JZ4780 support
...
Support the Ingenic JZ4780 SoC using the existing code under
arch/mips/jz4740 now that it has been generalised sufficiently.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk >
Cc: Kumar Gala <galak@codeaurora.org >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Pawel Moll <pawel.moll@arm.com >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Joshua Kinard <kumba@gentoo.org >
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com >
Cc: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com >
Cc: linux-kernel@vger.kernel.org
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Andreas Herrmann <andreas.herrmann@caviumnetworks.com >
Patchwork: https://patchwork.linux-mips.org/patch/10164/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:26 +02:00
Paul Burton
8838245d76
MIPS: JZ4740: use Ingenic SoC UART driver
...
Remove the serial support from arch/mips/jz4740 & make use of the new
Ingenic SoC UART driver. This is done for both regular & early console
output.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk >
Cc: Kumar Gala <galak@codeaurora.org >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Pawel Moll <pawel.moll@arm.com >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Linus Walleij <linus.walleij@linaro.org >
Cc: Stephen Warren <swarren@wwwdotorg.org >
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Cc: Apelete Seketeli <apelete@seketeli.net >
Cc: Alexandre Courbot <gnurou@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10160/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:26 +02:00
Paul Burton
6ec127fb3c
MIPS: JZ4740: only detect RAM size if not specified in DT
...
Allow a devicetree to specify the memory present in the system rather
than probing it from the memory controller. This both saves the probing
for systems where the amount of memory is fixed, and will simplify the
bringup of later Ingenic SoCs where the memory controller register
layout differs.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10163/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:22 +02:00
Paul Burton
1237496af3
MIPS: JZ4740: remove clock.h
...
The only thing remaining in arch/mips/jz4740/clock.h is declarations of
the jz4740_clock_{suspend,resume} functions. Move these to
arch/mips/include/asm/mach-jz4740/clock.h for consistency with similar
functions, and remove the redundant arch/mips/jz4740/clock.h header.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10156/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:21 +02:00
Paul Burton
50d893ff72
MIPS, clk: move jz4740 clock suspend, resume functions to jz4740-cgu
...
The jz4740-cgu driver already has access to the CGU, so it makes sense
to move the few remaining accesses to the CGU from arch/mips/jz4740
there too. Move the jz4740_clock_{suspend,resume} functions there for
such consistency. The arch/mips/jz4740/clock.c file now contains nothing
more of use & so is removed.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mike Turquette <mturquette@linaro.org >
Cc: Stephen Boyd <sboyd@codeaurora.org >
Cc: linux-clk@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com >
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10158/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:19 +02:00
Paul Burton
ed286ca5d6
MIPS, clk: move jz4740 UDC auto suspend functions to jz4740-cgu
...
The jz4740-cgu driver already has access to the CGU, so it makes sense
to move the few remaining accesses to the CGU from arch/mips/jz4740
there too. Move the jz4740_clock_udc_{dis,en}able_auto_suspend functions
there for such consistency.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mike Turquette <mturquette@linaro.org >
Cc: Stephen Boyd <sboyd@codeaurora.org >
Cc: linux-clk@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10154/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:18 +02:00
Paul Burton
41dd641e9a
MIPS,clk: move jz4740_clock_set_wait_mode to jz4740-cgu
...
The jz4740-cgu driver already has access to the CGU, so it makes sense
to move the few remaining accesses to the CGU from arch/mips/jz4740
there too. Move jz4740_clock_set_wait_mode for such consistency.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mike Turquette <mturquette@linaro.org >
Cc: Stephen Boyd <sboyd@codeaurora.org >
Cc: linux-clk@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10153/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:17 +02:00
Paul Burton
ff1930c6bd
MIPS,clk: migrate JZ4740 to common clock framework
...
Migrate the JZ4740 & the qi_lb60 board to use common clock framework
via the new Ingenic SoC CGU driver. Note that the JZ4740-specific
debugfs code is removed since common clock framework provides its own
debug capabilities.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Co-authored-by: Paul Cercueil <paul@crapouillou.net >
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk >
Cc: Kumar Gala <galak@codeaurora.org >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Turquette <mturquette@linaro.org >
Cc: Pawel Moll <pawel.moll@arm.com >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: Stephen Boyd <sboyd@codeaurora.org >
Cc: devicetree@vger.kernel.org
Cc: linux-clk@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Fabian Frederick <fabf@skynet.be >
Cc: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com >
Cc: Linus Walleij <linus.walleij@linaro.org >
Cc: Stephen Warren <swarren@wwwdotorg.org >
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10151/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:15 +02:00
Paul Burton
e06b86a33a
MIPS: JZ4740: replace use of jz4740_clock_bdata
...
Replace uses of the jz4740_clock_bdata struct with calls to clk_get_rate
for the appropriate clock. This is in preparation for migrating the
clocks towards common clock framework & devicetree.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: linux-mips@linux-mips.org
Cc: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com >
Cc: linux-kernel@vger.kernel.org
Cc: Apelete Seketeli <apelete@seketeli.net >
Patchwork: https://patchwork.linux-mips.org/patch/10149/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:12 +02:00
Paul Burton
1f4b840983
MIPS: JZ4740: Call jz4740_clock_init earlier
...
Call jz4740_clock_init before any uses of jz4740_clock_bdata occur. This
is in preparation for replacing uses of that struct with calls to
clk_get_rate, which will allow the clocks to be migrated towards common
clock framework & devicetree.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: linux-mips@linux-mips.org
Cc: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com >
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10148/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:11 +02:00
Paul Burton
44e08e7099
MIPS/IRQCHIP: Move Ingenic SoC intc driver to drivers/irqchip
...
Move the driver for Ingenic SoC interrupt controllers into
drivers/irqchip where it belongs.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10147/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:10 +02:00
Paul Burton
24ccfa06b7
MIPS: JZ4740: support newer SoC interrupt controllers
...
Allow the interrupt controllers of the JZ4770, JZ4775 & JZ4780 SoCs to
be probed via devicetree, supporting the 64 interrupts they provide.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10155/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:07 +02:00
Paul Burton
2da018849f
MIPS: JZ4740: Avoid JZ4740-specific naming
...
Rename the functions including jz4740 in their names to be more generic
in preparation for supporting further SoCs, and for moving this
interrupt controller code to drivers/irqchip.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Patchwork: https://patchwork.linux-mips.org/patch/10146/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:06 +02:00
Paul Burton
3aa94590e7
MIPS: JZ4740: read intc base address from DT
...
Read the base address of the SoC interrupt controller from the device
tree rather than relying upon the JZ4740_INTC_BASE_ADDR macro, in order
to remove the dependency on the asm/mach-jz4740/base.h header.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10145/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:05 +02:00
Paul Burton
ad68f8d3c2
MIPS: JZ4740: define IRQ numbers based on number of intc IRQs
...
For interrupts numbered after those of the interrupt controller, define
their numbers based upon the number of interrupts provided by the SoC
interrupt controller. This is in preparation for supporting newer
Ingenic SoCs which provide more interrupts.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10143/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:04 +02:00
Paul Burton
943d69c6c2
MIPS: JZ4740: support >32 interrupts
...
On newer Ingenic SoCs the interrupt controller supports more than 32
interrupts, which it does by duplicating the registers at intervals
of 0x20 bytes within its address space. Add support for an arbitrary
number of interrupts using multiple generic chips, and provide the
number of chips to register from the interrupt controller probe
function.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10141/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:03 +02:00
Paul Burton
fe778ece8e
MIPS: JZ4740: Remove jz_intc_base global
...
Avoid the need for the global variable jz_intc_base by introducing a
struct ingenic_intc_data and passing it around as the IRQ handler data.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10144/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:02 +02:00
Paul Burton
2aabd281d6
MIPS: JZ4740: drop intc debugfs code
...
The debugfs code becomes a nuisance when attempting to avoid globals,
since the interrupt controller probe function run too early for it to be
safe to create the debugfs files. Drop it.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10139/
Acked-by: Lars-Peter Clausen <lars@metafoo.de >
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:02 +02:00
Paul Burton
638c885185
MIPS: JZ4740: register an irq_domain for the interrupt controller
...
When probing the interrupt controller, register an IRQ domain such
that the interrupts can be translated by devicetree code & thus used
from devicetree.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10140/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:53:00 +02:00
Paul Burton
69ce4b2288
MIPS: JZ4740: parse SoC interrupt controller parent IRQ from DT
...
Rather than hardcoding the IRQ number used to cascade interrupts from
the SoC interrupt controller to the CPU interrupt controller, read that
IRQ number from the DT describing the system.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10137/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:59 +02:00
Paul Burton
adbdce77cc
MIPS: JZ4740: probe interrupt controller via DT
...
Declare the JZ4740 interrupt controller for probe via DT using the
standard irqchip_init function, and make use of that function to probe
the controller by adding the appropriate node to the JZ4740 dtsi.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Kumar Gala <galak@codeaurora.org >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Pawel Moll <pawel.moll@arm.com >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10135/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:58 +02:00
Paul Burton
0e81db8f5b
MIPS: JZ4740: Move arch_init_irq out of arch/mips/jz4740/irq.c
...
In preparation for moving the JZ4740 interrupt controller driver to
drivers/irqchip, move arch_init_irq into setup.c such that everything
remaining in irq.c is related to said JZ4740 interrupt controller.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10136/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:56 +02:00
Paul Burton
2974a35657
MIPS: JZ4740: use generic plat_irq_dispatch
...
Make use of the generic plat_irq_dispatch function introduced by commit
85f7cdacbb "MIPS: Provide a generic plat_irq_dispatch", in order to
reduce unnecessary code duplication.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Patchwork: https://patchwork.linux-mips.org/patch/10138/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:55 +02:00
Paul Burton
8e8261eb6a
MIPS: JZ4740: probe CPU interrupt controller via DT
...
Use the generic irqchip_init function to probe irqchip drivers using DT,
and add the appropriate node to the JZ4740 devicetree in place of the
call to mips_cpu_irq_init.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk >
Cc: Kumar Gala <galak@codeaurora.org >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Pawel Moll <pawel.moll@arm.com >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com >
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com >
Patchwork: https://patchwork.linux-mips.org/patch/10166/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:54 +02:00
Ralf Baechle
67e38cf293
MIPS/IRQCHIP: Move irq_chip from arch/mips to drivers/irqchip.
...
While at it, rename it because in drivers/irqchip no longer every CPU is
a MIPS.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:50 +02:00
Paul Burton
ffb1843d05
MIPS: JZ4740: require & include DT
...
Require a DT for JZ4740 based systems, and add a stub one for the
qi_lb60 (Ben NanoNote) board. Devices will be migrated to being probed
via this DT over time.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk >
Cc: Kumar Gala <galak@codeaurora.org >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Pawel Moll <pawel.moll@arm.com >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10132/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:49 +02:00
Paul Burton
252617a4ab
MIPS: ingenic: Add newer vendor IDs
...
Ingenic have actually varied the vendor/company ID of the XBurst cores
across their range of SoCs, whilst keeping the product ID & revision
constant... Add definitions for vendor IDs known to be used in some of
Ingenic's newer SoCs, and handle them in the same way as the existing
Ingenic vendor ID from the JZ4740.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Co-authored-by: Paul Cercueil <paul@crapouillou.net >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: linux-mips@linux-mips.org
Cc: Steven J. Hill <Steven.Hill@imgtec.com >
Cc: Joshua Kinard <kumba@gentoo.org >
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com >
Cc: Maciej W. Rozycki <macro@linux-mips.org >
Cc: linux-kernel@vger.kernel.org
Cc: Huacai Chen <chenhc@lemote.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Patchwork: https://patchwork.linux-mips.org/patch/10128/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:48 +02:00
Paul Burton
de361e8bb9
MIPS: JZ4740: introduce CONFIG_MACH_INGENIC
...
In preparation for supporting Ingenic SoCs other than the JZ4740,
introduce MACH_INGENIC to Kconfig & move MACH_JZ4740 to a separate
entry selected by the board when appropriate. This allows MACH_INGENIC
to be used to enable things generic across Ingenic SoCs.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Andrew Bresticker <abrestic@chromium.org >
Patchwork: https://patchwork.linux-mips.org/patch/10130/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:47 +02:00
Maciej W. Rozycki
bc4f12e639
MIPS: DEC: Update CPU overrides
...
Update CPU overrides for the DEC port with the recent additions, shaving
off some effectively dead code:
text data bss dec hex filename
5586952 233132 5990368 11810452 b43694 vmlinux.32-old
5581248 233140 5990368 11804756 b42054 vmlinux.32-new
text data bss dec hex filename
6036936 356648 10756544 17150128 105b0b0 vmlinux.64-old
6029896 360752 10756544 17147192 105a538 vmlinux.64-new
The data size increase is due to the special alignment requirement of
`init_thread_union' aka `.data..init_task' moving it up to the nearest
page boundary and making the amount of padding at its front rely on how
far within a page text ends.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10197/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:44 +02:00
Brian Norris
cc23cafe2b
MIPS: netlogic: remove unnecessary MTD partition probe specification
...
The cmdlinepart parser is already supported in the default probe.
Signed-off-by: Brian Norris <computersforpeace@gmail.com >
Cc: linux-mtd@lists.infradead.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10071/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:43 +02:00
Maciej W. Rozycki
9a20b09285
MIPS: tlb-r3k: Optimise a TLBWI barrier in TLB invalidation
...
Replace an explicit barrier with a useful processor instruction in TLB
invalidation, following several other such cases elsewhere in
`tlb-r3k.c'.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org >
Cc: James Hogan <james.hogan@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10196/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:41 +02:00
Maciej W. Rozycki
3bcb03f3a7
MIPS: tlb-r3k: Move CP0.Wired register initialisation to `tlb_init'
...
Move the initialisation of the CP0.Wired register implemented by Toshiba
TX3922 and TX3927 processors from `tx39_cache_init' to `tlb_init' where
it belongs, correcting code structure and making sure initialisation
does not rely on `tx39_cache_init' being called before `tlb_init' to
work correctly.
Make `r3k_have_wired_reg' static as it's no longer externally referred
to; remove a stale declaration too.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org >
Cc: James Hogan <james.hogan@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10195/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:41 +02:00
Maciej W. Rozycki
dbfbf60f4a
MIPS: tlb-r3k: Also invalidate wired TLB entries on boot
...
Most R3k processor implementations have their 8 first TLB entries fixed
as wired, so we always skip them in TLB invalidation. That however
means any leftover entries present there at boot will stay throughout
the life of the kernel, unless replaced with new ones.
So rename `local_flush_tlb_all' to `local_flush_tlb_from' and make it
accept the TLB entry to start from. Then use 0 initially at bootstrap,
and the first regular entry later on, bypassing any wired entries.
Wrap the latter arrangement into a new `local_flush_tlb_all' entry
point.
There is no need to disable interrupts in the call made from `tlb_init'
because it's made before the interrupt subsystem has been initialised;
this is also true for secondary processors, should we ever support R3k
SMP. So move this piece of code to new `local_flush_tlb_all'.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org >
Cc: James Hogan <james.hogan@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10194/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:39 +02:00
James Hogan
24ca1d9896
MIPS: dump_tlb: Take XPA into account
...
XPA extends the physical addresses on MIPS32, including the EntryLo
registers. Update dump_tlb() to concatenate the PFNX field from the high
end of the EntryLo registers (as read by mfhc0).
The width of physical and virtual addresses are also separated to show
only 8 nibbles of virtual but 11 nibbles of physical with XPA.
Signed-off-by: James Hogan <james.hogan@imgtec.com >
Cc: Steven J. Hill <Steven.Hill@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10077/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:39 +02:00
James Hogan
c2bc435e4f
MIPS: dump_tlb: Take RI/XI bits into account
...
The RI/XI bits when present are above the PFN field in the EntryLo
registers, at bits 63,62 when read with dmfc0, and bits 31,30 when read
with mfc0. This makes them appear as part of the physical address, since
the other bits are masked with PAGE_MASK, for example:
Index: 253 pgmask=16kb va=77b18000 asid=75
[pa=1000744000 c=5 d=1 v=1 g=0] [pa=100134c000 c=5 d=1 v=1 g=0]
The physical addresses have bit 36 set, which corresponds to bit 30 of
EntryLo1, the XI bit.
Explicitly mask off the RI and XI bits from the printed physical
address, and print the RI and XI bits separately if they exist, giving
output more like this:
Index: 226 pgmask=16kb va=77be0000 asid=79
[ri=0 xi=1 pa=01288000 c=5 d=1 v=1 g=0] [ri=0 xi=0 pa=010e4000 c=5 d=0 v=1 g=0]
Cc: linux-mips@linux-mips.org
Cc: James Hogan <james.hogan@imgtec.com >
Cc: David Daney <ddaney@caviumnetworks.com >
Patchwork: https://patchwork.linux-mips.org/patch/10080/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:38 +02:00
James Hogan
decebccd76
MIPS: dump_tlb: Take EHINV bit into account
...
The EHINV bit in EntryHi allows a TLB entry to be properly marked
invalid so that EntryHi doesn't have to be set to a unique value to
avoid machine check exceptions due to multiple matching entries.
Unfortunately dump_tlb() doesn't take this into account so it will print
all the uninteresting invalid TLB entries if the current ASID happens to
be 00. Therefore add a condition to skip entries which are marked
invalid with the EHINV bit.
Signed-off-by: James Hogan <james.hogan@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10076/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:36 +02:00
James Hogan
48269c78fb
MIPS: dump_tlb: Take global bit into account
...
The TLB only matches the ASID when the global bit isn't set, so
dump_tlb() shouldn't really be skipping global entries just because the
ASID doesn't match. Fix the condition to read the TLB entry's global bit
from EntryLo0. Note that after a TLB read the global bits in both
EntryLo registers reflect the same global bit in the TLB entry.
Signed-off-by: James Hogan <james.hogan@imgtec.com >
Cc: Maciej W. Rozycki <macro@linux-mips.org >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10079/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:35 +02:00
James Hogan
d7f5499dc2
MIPS: dump_tlb: Make use of EntryLo bit definitions
...
Make use of recently added EntryLo bit definitions in mipsregs.h when
dumping TLB contents.
Signed-off-by: James Hogan <james.hogan@imgtec.com >
Cc: Maciej W. Rozycki <macro@linux-mips.org >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10075/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:34 +02:00
James Hogan
d1ce483e45
MIPS: dump_tlb: Refactor TLB matching
...
Refactor the TLB matching code in dump_tlb() slightly so that the
conditions which can cause a TLB entry to be skipped can be more easily
extended. This should prevent the match condition getting unwieldy once
it is updated to take further conditions into account.
Signed-off-by: James Hogan <james.hogan@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10081/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:33 +02:00
James Hogan
137877e432
MIPS: dump_tlb: Use tlbr hazard macros
...
Use the new tlb read hazard macros from <asm/hazards.h> rather than the
local BARRIER() macro which uses 7 ops regardless of the kernel
configuration.
We use mtc0_tlbr_hazard for the hazard between mtc0 to the index
register and the tlbr, and tlb_read_hazard for the hazard between the
tlbr and the mfc0 of the TLB registers written by tlbr.
Signed-off-by: James Hogan <james.hogan@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10074/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:32 +02:00
James Hogan
8ab6abcb6a
MIPS: mipsregs.h: Add EntryLo bit definitions
...
Add definitions for EntryLo register bits in mipsregs.h. The R4000
compatible ones are prefixed MIPS_ENTRYLO_ and the R3000 compatible ones
are prefixed R3K_ENTRYLO_.
These will be used in later patches.
Signed-off-by: James Hogan <james.hogan@imgtec.com >
Cc: linux-mips@linux-mips.org
Cc: Maciej W. Rozycki <macro@linux-mips.org >
Patchwork: https://patchwork.linux-mips.org/patch/10073/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-06-21 21:52:31 +02:00