summaryrefslogtreecommitdiff
path: root/arch/arm/mach-orion5x/dns323-setup.c
AgeCommit message (Collapse)Author
2011-08-25arm: fix compile failure in orion5x/dns323-setup.cPaul Gortmaker
Upstream commit d5341942d784134f2997b3ff82cd63cf71d1f932 "PCI: Make the struct pci_dev * argument of pci_fixup_irqs const." leaked an extra "const" into an actual call site (vs a proto/decl) which causes this: arch/arm/mach-orion5x/dns323-setup.c: In function 'dns323_pci_map_irq': arch/arm/mach-orion5x/dns323-setup.c:80: error: expected expression before 'const' arch/arm/mach-orion5x/dns323-setup.c:80: error: too few arguments to function 'orion5x_pci_map_irq' make[3]: *** [arch/arm/mach-orion5x/dns323-setup.o] Error 1 Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Nicolas Pitre <nico@fluxnic.net> Acked-by: Ralf Baechle <ralf@linux-mips.org>
2011-07-22PCI: Make the struct pci_dev * argument of pci_fixup_irqs const.Ralf Baechle
Aside of the usual motivation for constification, this function has a history of being abused a hook for interrupt and other fixups so I turned this function const ages ago in the MIPS code but it should be done treewide. Due to function pointer passing in varous places a few other functions had to be constified as well. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> To: Anton Vorontsov <avorontsov@mvista.com> To: Chris Metcalf <cmetcalf@tilera.com> To: Colin Cross <ccross@android.com> Acked-by: "David S. Miller" <davem@davemloft.net> To: Eric Miao <eric.y.miao@gmail.com> To: Erik Gilling <konkers@android.com> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> To: "H. Peter Anvin" <hpa@zytor.com> To: Imre Kaloz <kaloz@openwrt.org> To: Ingo Molnar <mingo@redhat.com> To: Ivan Kokshaysky <ink@jurassic.park.msu.ru> To: Jesse Barnes <jbarnes@virtuousgeek.org> To: Krzysztof Halasa <khc@pm.waw.pl> To: Lennert Buytenhek <kernel@wantstofly.org> To: Matt Turner <mattst88@gmail.com> To: Nicolas Pitre <nico@fluxnic.net> To: Olof Johansson <olof@lixom.net> Acked-by: Paul Mundt <lethal@linux-sh.org> To: Richard Henderson <rth@twiddle.net> To: Russell King <linux@arm.linux.org.uk> To: Thomas Gleixner <tglx@linutronix.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-alpha@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-pci@vger.kernel.org Cc: linux-sh@vger.kernel.org Cc: linux-tegra@vger.kernel.org Cc: sparclinux@vger.kernel.org Cc: x86@kernel.org Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-05-16ARM: orion5x: Refactor mpp code to use common orion platform mpp.Andrew Lunn
Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2011-03-03ARM: Remove dependency of plat-orion time code on mach directory includes.Lennert Buytenhek
This patch makes the various mach dirs that use the plat-orion time code pass in timer and bridge addresses explicitly, instead of having plat-orion get those values by including a mach dir include file -- the latter mechanism is problematic if you want to support multiple ARM platforms in the same kernel image. Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2010-10-20arm: remove machine_desc.io_pg_offst and .phys_ioNicolas Pitre
Since we're now using addruart to establish the debug mapping, we can remove the io_pg_offst and phys_io members of struct machine_desc. The various declarations were removed using the following script: grep -rl MACHINE_START arch/arm | xargs \ sed -i '/MACHINE_START/,/MACHINE_END/ { /\.\(phys_io\|io_pg_offst\)/d }' [ Initial patch was from Jeremy Kerr, example script from Russell King ] Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Eric Miao <eric.miao at canonical.com>
2010-07-16[ARM] orion5x: Base support for DNS-323 rev C1Benjamin Herrenschmidt
This patch adds the base support for this new HW revision to the existing dns323-setup.c file. The SoC seems to be the same as rev B1, the GPIOs are all wired differently though and the fan control isn't i2c based anymore. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2010-07-16[ARM] orion5x: Set links to solid on D-Link DNS-323Martin Michlmayr
Among other changes, commit b2a731aa ("D-link DNS-323 revision A1 power LED") changed the default behaviour of the power LED from solid to blinking. This was done to match the original DNS-323 firmware which blinks during the boot process and sets the LED to solid when booting has completed. However, the downside of this behaviour is that it requires userland code to change the LED, even for those who don't care about the behaviour of the original firmware. Therefore, change it to solid again and let those who care about the original behaviour change the behaviour from userland. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2010-05-26leds: leds-gpio: Change blink_set callback to be able to turn off blinkingBenjamin Herrenschmidt
The leds-gpio blink_set() callback follows the same prototype as the main leds subsystem blink_set() one. The problem is that to stop blink, normally, a leds driver does it in the brightness_set() callback when asked to set a new fixed value. However, with leds-gpio, the platform has no hook to do so, as this later callback results in a standard GPIO manipulation. This changes the leds-gpio specific callback to take a new argument that indicates whether the LED should be blinking or not and in what state it should be set if not. We also update the dns323 platform which seems to be the only user of this so far. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-03[ARM] dns323-setup.c: fix WARN() when bootingArnaud Patard
Since commit b2a731aa5cbca7e0252da75e16de7ae5feb1313a, dns323_init() is setting the power led gpio direction with gpio_direction_output() but doesn't request the gpio before (which is not permitted by the gpio layer afaik). This behaviour is triggering a WARN() at boot time. Tested-by: Christian Samsel <csamsel@gmxpro.de> Cc: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Nicolas Pitre <nico@marvell.com> [ Part 2: "Attached Text" ]
2010-02-10[ARM] orion5x: D-link DNS-323 revision A1 power LEDLaurie Bradshaw
This patch fixes the power LED on DNS-323 revision A1, and adds timer support for (hopefully) both A1 and B1 revisions. Power LED on revision A1 is active low and also requires GPIO 4 to be low to work. Tested on my DNS-323 revision A1. I have set the default trigger to timer as that replicates the behaviour of the original firmware, userspace can change the trigger at the end of the boot process providing a useful indication that booting has completed. Signed-off-by: Nicolas Pitre <nico@marvell.com>
2010-01-24[ARM] orion5x: D-link DNS-323 rev. B1 power-offErik Benada
This patch fixes power LED blinking and power-off on DNS-323 rev. B1. GPIO pin 3 has to be set to 1 to stop power LED blinking and to allow the LED to be controlled via leds-gpio. This pin has to be also set to 1 for power-off to work. To power-off the rev. B1 machine, pin 8 has to be set to 1 and then set to 0 to do actual power-off. Tested on my DNS-323 rev. B1 Signed-off-by: Erik Benada <erikbenada@yahoo.ca> Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-03-10[ARM] Orion: Fix some typos in the DNS-323 support codeMartin Michlmayr
Fix some typos in the DNS-323 support code. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-12-11[ARM] DNS323: Initialise 88F5182 correctlyMatt Palmer
The 88F5182 found in the DNS-323 rev B1 (and some other devices, such as the CH3SNAS) require different initialisation of the SATA controller and MPP registers. Tested on a DNS-323 rev B1. Signed-off-by: Matt Palmer <mpalmer@hezmatt.org>
2008-12-11[ARM] DNS323: Read MAC address from flashMatt Palmer
Based on similar code from the tsx09 series of machines, just rips the MAC address out of flash and stuffs it into the NIC. Tested on a DNS323 rev B1. It's possible (though unlikely) that an A1 will have the MAC in a different location in flash. Signed-off-by: Matt Palmer <mpalmer@hezmatt.org>
2008-09-05mv643xx_eth: remove force_phy_addr fieldLennert Buytenhek
Currently, there are two different fields in the mv643xx_eth_platform_data struct that together describe the PHY address -- one field (phy_addr) has the address of the PHY, but if that address is zero, a second field (force_phy_addr) needs to be set to distinguish the actual address zero from a zero due to not having filled in the PHY address explicitly (which should mean 'use the default PHY address'). If we are a bit smarter about the encoding of the phy_addr field, we can avoid the need for a second field -- this patch does that. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-21[ARM] Orion: activate lm75 driver on DNS-323Martin Michlmayr
The lm75 driver was recently converted to the new-style binding, so now it can be loaded from the DNS-323 support code. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Tested-by: Tobias Poschwatta <tp@fonz.de> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-07[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King
This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-06-22[ARM] Orion: nuke orion5x_{read,write}Lennert Buytenhek
Nuke the Orion-specific orion5x_{read,write} wrappers. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-22[ARM] Orion: avoid setting ->force_phy_addrLennert Buytenhek
The mv643xx_eth platform data field ->force_phy_addr only needs to be set if the passed-in ->phy_addr field is zero (to distinguish the case of not having specified a phy address (force_phy_addr = 0) from the case where a phy address of zero needs to be used (force_phy_addr = 1.)) Also, the ->force_phy_addr field will hopefully disappear in a future mv643xx_eth reorganisation. Therefore, this patch deletes the ->force_phy_addr field initialiser from all Orion board code. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-22[ARM] Orion: remove error printks in ->map_irq() implementationsLennert Buytenhek
If all PCI devices are working as expected, the error printks in the various implementations of ->map_irq() doesn't really provide any useful info. And if something is not working as expected, turning on pci=debug gives you more useful information than the printk calls in ->map_irq(), since the former also tells you which devices _did_ get IRQs successfully assigned. Therefore, delete these printks entirely. Spotted by Russell King. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Russell King <linux@arm.linux.org.uk>
2008-06-22[ARM] Orion: rework MPP handlingLennert Buytenhek
Instead of having board code poke directly into the MPP configuration registers, and separately calling orion5x_gpio_set_valid_pins() to indicate which MPP pins can be used as GPIO pins, introduce a helper function for configuring the roles of each of the MPP pins, and have that helper function handle gpio validity internally. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Sylver Bruneau <sylver.bruneau@googlemail.com> Acked-by: Russell King <linux@arm.linux.org.uk>
2008-06-22[ARM] Orion: move setting up PCIe WA window into PCIe setup pathLennert Buytenhek
It makes no sense to do PCIe WA window setup in the individual board support files while the decision whether or not to use the PCIe WA access method is made in a different place, in the PCIe support code. This patch moves the configuration of a PCIe WA window from the individual Orion board support files to the central Orion PCIe support code. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Russell King <linux@arm.linux.org.uk>
2008-06-22[ARM] Orion: move EHCI/I2C/UART peripheral init into board codeLennert Buytenhek
This patch moves initialisation of EHCI/I2C/UART platform devices from the common orion5x_init() into the board support code. The rationale behind this is that only the board support code knows whether certain peripherals have been brought out on the board, and not initialising peripherals that haven't been brought out is desirable for example: - to reduce user confusion (e.g. seeing both 'eth0' and 'eth1' appear while there is only one ethernet port on the board); and - to allow for future power savings (peripherals that have not been brought out can be clock gated off entirely). Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Russell King <linux@arm.linux.org.uk>
2008-06-22[ARM] Orion: fix various whitespace and coding style issuesLennert Buytenhek
More cosmetic cleanup: - Replace 8-space indents by proper tab indents. - In structure initialisers, use a trailing comma for every member. - Collapse "},\n{" in structure initialiers to "}, {". Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Russell King <linux@arm.linux.org.uk>
2008-05-17[ARM] 5037/1: Orion: fix DNS323/Kurobox Pro PCI initialisationLennert Buytenhek
Whereas most Orion 5x machine support code would initialise the PCI subsystem with nr_controllers in their struct hw_pci set to 2, the DNS323 and Kurobox Pro machine support code had nr_controllers set to 1. This was presumably done because on those two machines, the PCI(-X) controller (nr == 1) isn't used, requiring initialisation of only the PCIe controller (nr == 0.) However, not initialising the PCI(-X) controller on boards that don't use it leads to a situation where both the PCIe and the PCI(-X) controller think that their root bus is zero, and it messes up IRQ assignment. This patch changes the DNS323 and Kurobox Pro support code to always use nr_controllers == 2. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-29Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: (26 commits) [ARM] pxa: fix 1c104e0e4f6ab396960c058e95e18bdedcac945b [ARM] serial: s3c2410: platform_get_irq() may return signed unnoticed [ARM] am79c961a: platform_get_irq() may return signed unnoticed [ARM] Feroceon: Feroceon-specific WA-cache compatible {copy,clear}_user_page() [ARM] Feroceon: fix function alignment in proc-feroceon.S [ARM] Orion: catch a couple more alternative spellings of PCIe [ARM] Orion: fix orion-ehci platform resource end addresses [ARM] Orion: fix ->map_irq() PCIe bus number check [ARM] Orion: fix ioremap() optimization [ARM] feroceon: remove CONFIG_CPU_CACHE_ROUND_ROBIN check [ARM] feroceon: remove CONFIG_CPU_DCACHE_WRITETHROUGH check kprobes/arm: fix decoding of arithmetic immediate instructions kprobes/arm: fix cache flush address for instruction stub [ARM] 5022/1: Race in ARM MMCI PL18x driver, V2 [ARM] 5021/1: at91: buildfix for sam9263 + PM [ARM] 5018/1: RealView: Fix the ARM11MPCore Oprofile compilation [ARM] 5016/1: AT91: typo in mci configuration for at91cap at91sam9263 [ARM] 5017/1: pxa3xx: Report unsupported wakeup sources in pxa3xx_set_wake() [ARM] 5020/1: magician: remove __devinit marker from pasic3_leds_info [ARM] 5014/1: Cleanup reset state before entering suspend or resetting. ...
2008-04-29i2c: Convert most new-style drivers to use module aliasingJean Delvare
Based on earlier work by Jon Smirl and Jochen Friedrich. Update most new-style i2c drivers to use standard module aliasing instead of the old driver_name/type driver matching scheme. I've left the video drivers apart (except for SoC camera drivers) as they're a bit more diffcult to deal with, they'll have their own patch later. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jon Smirl <jonsmirl@gmail.com> Cc: Jochen Friedrich <jochen@scram.de>
2008-04-28[ARM] Orion: catch a couple more alternative spellings of PCIeLennert Buytenhek
Unify a couple more spellings of "PCIe" ("PCI-E", "PCIE".) Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-04-28[ARM] Orion: fix ->map_irq() PCIe bus number checkLennert Buytenhek
The current orion5x board ->map_irq() routines check whether a given bus number lives on the PCIe controller by comparing it with the PCIe controller's primary bus number. This doesn't work in case there are multiple buses in the PCIe domain, i.e. if there exists a PCIe bridge on the primary PCIe bus. This patch adds a helper function (orion5x_pci_map_irq()) that returns the IRQ number for the given PCI device if that device has a hard-wired IRQ, or -1 otherwise, and makes each board's ->map_irq() function use this helper function. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-03-27Orion: orion -> orion5x renameLennert Buytenhek
Do a global s/orion/orion5x/ of the Orion 5x-specific bits (i.e. not the plat-orion bits.) Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Reviewed-by: Tzachi Perelstein <tzachi@marvell.com> Acked-by: Saeed Bishara <saeed@marvell.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Nicolas Pitre <nico@marvell.com>