Alban Bedel
832f5dacfa
MIPS: Remove all the uses of custom gpio.h
...
Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS
machines, and each machine type provides its own gpio.h. However
only a handful really implement the GPIO API, most just forward
everythings to gpiolib.
The Alchemy machine is notable as it provides a system to allow
implementing the GPIO API at the board level. But it is not used by
any board currently supported, so it can also be removed.
For most machine types we can just remove the custom gpio.h, as well
as the custom wrappers if some exists. Some of the code found in
the wrappers must be moved to the respective GPIO driver.
A few more fixes are need in some drivers as they rely on linux/gpio.h
to provides some machine specific definitions, or used asm/gpio.h
instead of linux/gpio.h for the gpio API.
Signed-off-by: Alban Bedel <albeu@free.fr >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Cc: linux-mips@linux-mips.org
Cc: Hauke Mehrtens <hauke@hauke-m.de >
Cc: Rafał Miłecki <zajec5@gmail.com >
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
Cc: Tejun Heo <tj@kernel.org >
Cc: Alexandre Courbot <gnurou@gmail.com >
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Cc: Florian Fainelli <florian@openwrt.org >
Cc: Manuel Lauss <manuel.lauss@gmail.com >
Cc: Joe Perches <joe@perches.com >
Cc: Daniel Walter <dwalter@google.com >
Cc: Sergey Ryazanov <ryazanov.s.a@gmail.com >
Cc: Huacai Chen <chenhc@lemote.com >
Cc: James Hartley <james.hartley@imgtec.com >
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jiri Kosina <jkosina@suse.cz >
Cc: Bjorn Helgaas <bhelgaas@google.com >
Cc: Wolfram Sang <wsa@the-dreams.de >
Cc: Randy Dunlap <rdunlap@infradead.org >
Cc: Varka Bhadram <varkabhadram@gmail.com >
Cc: Masanari Iida <standby24x7@gmail.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Michael Buesch <m@bues.ch >
Cc: abdoulaye berthe <berthe.ab@gmail.com >
Cc: linux-kernel@vger.kernel.org
Cc: linux-ide@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: netdev@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10828/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-09-03 12:08:02 +02:00
Kevin Cernekee
d631fc6070
MIPS: Create a common <asm/mach-generic/war.h>
...
11 platforms require at least one of these workarounds to be enabled; 22
platforms do not. In the latter case we can fall back to a generic version.
Note that this also deletes an orphaned reference to RM9000_CDEX_SMP_WAR.
Suggested-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Kevin Cernekee <cernekee@gmail.com >
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: James Hogan <james.hogan@imgtec.com >
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com >
Cc: James Hartley <james.hartley@imgtec.com >
Cc: James Hogan <james.hogan@imgtec.com >
Patchwork: https://patchwork.linux-mips.org/patch/9567/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2015-03-31 11:59:40 +02:00
Leonid Yegoshin
ed3ce16c3d
Revert "MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET"
...
This reverts commit 3f4579252aa166641861a64f1c2883365ca126c2. It is
invalid because the macros CAC_ADDR and UNCAC_ADDR have a kernel
virtual address as an argument and also returns a kernel virtual
address. Using and physical address PHYS_OFFSET is blatantly wrong
for a macro common to multiple platforms.
Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com >
Acked-by: Steven J. Hill <Steven.Hill@imgtec.com >
Cc: linux-mips@linux-mips.org
Cc: Florian Fainelli <florian@openwrt.org >
Patchwork: https://patchwork.linux-mips.org/patch/5528/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2013-07-01 15:10:58 +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
bdf20507da
MIPS: PMC-Sierra Yosemite: Remove support.
...
Nobody seems to be interested anymore and upstream also never had an
ethernet driver.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2012-12-13 18:15:30 +01:00
Florian Fainelli
0bc6791707
MIPS: AR7: Fix loops per jiffies on TNETD7200 devices
...
TNETD7200 run their CPU clock faster than the default CPU clock we assume.
In order to have the correct loops per jiffies settings, initialize clocks right
before setting mips_hpt_frequency. As a side effect, we can no longer use
msleep in clocks.c which requires other parts of the kernel to be initialized,
so replace these with mdelay.
Signed-off-by: Florian Fainelli <florian@openwrt.org >
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1749/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-12-16 18:10:56 +00:00
Florian Fainelli
ff42d62047
MIPS: AR7: Fix double ar7_gpio_init declaration
...
Signed-off-by: Florian Fainelli <florian@openwrt.org >
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1748/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-12-16 18:10:56 +00:00
Florian Fainelli
238dd317f7
MIPS: AR7: Add support for Titan (TNETV10xx) SoC variant
...
Add support for Titan TNETV1050,1055,1056,1060 variants. This SoC is almost
completely identical to AR7 except on a few points:
- a second bank of gpios is available
- vlynq0 on titan is vlynq1 on ar7
- different PHY addresses for cpmac0
This SoC can be found on commercial products like the Linksys WRTP54G
Original patch by Xin with improvments by Florian.
Signed-off-by: Xin Zhen <xlonestar2000@aim.com >
Signed-off-by: Florian Fainelli <florian@openwrt.org >
Patchwork: http://patchwork.linux-mips.org/patch/1563/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
---
2010-10-29 19:08:46 +01:00
Florian Fainelli
3bc6968adc
MIPS: AR7: Initialize GPIO earlier
...
In order to detect the Titan variant, we must initialize GPIOs earlier since
detection relies on some GPIO values to be set.
Signed-off-by: Florian Fainelli <florian@openwrt.org >
Patchwork: http://patchwork.linux-mips.org/patch/1562/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
---
2010-10-29 19:08:46 +01:00
Yoichi Yuasa
cdf22a4e90
MIPS: AR7, BCM63xx: fix gpio_to_irq() return value
...
The return value of gpio_to_irq() is not a pointer but an integer.
Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org >
Cc: linux-mips <linux-mips@linux-mips.org >
Patchwork: http://patchwork.linux-mips.org/patch/1280/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-07-05 17:17:26 +01:00
Florian Fainelli
e1df057df8
MIPS: AR7: Fix typo in ar7.h
...
This fixes a typo on the AR7_RESET_PERIPHERAL define.
Signed-off-by: Florian Fainelli <florian@openwrt.org >
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1247/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-07-05 17:17:18 +01:00
Florian Fainelli
780019ddf0
MIPS: AR7: Implement clock API
...
This patch makes the ar7 clock code implement the Linux clk API. Drivers
using the various clocks available in the SoC are updated accordingly.
Signed-off-by: Florian Fainelli <florian@openwrt.org >
Acked-by: Wim Van Sebroeck <wim@iguana.be >
To: linux-mips@linux-mips.org
Cc: Wim Van Sebroeck <wim@iguana.be >
Cc: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net >
Patchwork: http://patchwork.linux-mips.org/patch/881/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-02-27 12:53:16 +01:00
Florian Fainelli
5f3c909881
MIPS: AR7: Implement gpiolib
...
This patch implements gpiolib for the AR7 SoC.
Signed-off-by: Florian Fainelli <florian@openwrt.org >
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/816/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-02-27 12:53:16 +01:00
Florian Fainelli
72838a1703
MIPS: AR7: register watchdog device only if enabled in hw configuration
...
This patch checks if the watchdog enable bit is set in the DCL register
meaning that the hardware watchdog actually works and if so, register the
ar7_wdt platform_device.
Signed-off-by: Florian Fainelli <florian@openwrt.org >
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-11-02 12:00:03 +01:00
Florian Fainelli
7ca5dc145b
MIPS: Add support for Texas Instruments AR7 System-on-a-Chip
...
This patch adds support for the Texas Instruments AR7 System-on-a-Chip.
It supports the TNETD7100, 7200 and 7300 versions of the SoC.
Signed-off-by: Matteo Croce <matteo@openwrt.org >
Signed-off-by: Felix Fietkau <nbd@openwrt.org >
Signed-off-by: Eugene Konev <ejka@openwrt.org >
Signed-off-by: Nicolas Thill <nico@openwrt.org >
Signed-off-by: Florian Fainelli <florian@openwrt.org >
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-07-03 15:45:23 +01:00