summaryrefslogtreecommitdiffstats
path: root/arch/mips/rb532/devices.c
Commit message (Collapse)AuthorAgeFilesLines
* MIPS: RB532: Fix devices.c compilation.Florian Fainelli2009-12-021-1/+2
| | | | | | | | We should now use dev_set_drvdata to set the driver driver_data field. Signed-off-by: Florian Fainelli <florian@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/747/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Input: add driver for S1 button of rb532Phil Sutter2009-03-091-18/+1
| | | | | | | | | | | | | | | | | | | Mikrotik's Routerboard 532 has two builtin buttons, from which one triggers a hardware reset. The other one is accessible through GPIO pin 1. Sadly, this pin is being multiplexed with UART0 input, so enabling it as interrupt source (as implied by the gpio-keys driver) is not possible unless UART0 has been turned off. The later one though is a rather bad idea as the Routerboard is an embedded device with only a single serial port, so it's almost always used as serial console device. This patch adds a driver based on INPUT_POLLDEV, which disables the UART and reconfigures GPIO pin 1 temporarily while reading the button state. This procedure works fine and has been tested as part of another, unpublished driver for this device. Signed-off-by: Phil Sutter <n0-1@freewrt.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* MIPS: RB532: Simplify dev3 initPhil Sutter2009-01-301-12/+2
| | | | | | | | | | | | As rb532_dev3_ctl_res is not used by any platform device, it can be dropped when not used for holding the physical address of the device 3 controller. Also a size of one byte should suffice when ioremapping the physical address mentioned above, as only a single byte is being read from and written to it. Signed-off-by: Phil Sutter <n0-1@freewrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: RB532: Move dev3 init code to devices.cPhil Sutter2009-01-301-0/+39
| | | | | | | | | This code doesn't belong to gpio.c, as it's completely unrelated to GPIO. As dev1 and dev2 init code is in devices.c, it seems to be a more adequate place. Signed-off-by: Phil Sutter <n0-1@freewrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: RB532: Use driver_data instead of platform_dataPhil Sutter2009-01-301-1/+1
| | | | | | | | | As the korina ethernet driver uses platform_get_drvdata() to extract the driver specific data from the platform device, driver_data has to be used here. Signed-off-by: Phil Sutter <n0-1@freewrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: RB532: Detect uart type, add platform devicePhil Sutter2009-01-301-0/+26
| | | | | | | | | Auto-detection works just fine, so use it instead of specifying the type manually. Also define a platform device for the uart, as suggested by David Daney. Signed-off-by: Phil Sutter <n0-1@freewrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: RB532: GPIO register offsets are relative to GPIOBASEFlorian Fainelli2008-11-201-1/+1
| | | | | | | | | | | | | This patch fixes the wrong use of GPIO register offsets in devices.c. To avoid further problems, use gpio_get_value to return the NAND status instead of our own expanded code. Also define the zero offset of the alternate function register to allow consistent access. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Phil Sutter <n0-1@freewrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: RB532: Disable the right devicePhil Sutter2008-10-271-1/+1
| | | | | Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: RB532: Fix id usage in platform devicesFlorian Fainelli2008-10-111-3/+3
| | | | | | | | When there is only platform device of the same type, id = -1 should be used, fix this. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: RB532: Cleanup and group definitions to their right placesFlorian Fainelli2008-10-111-14/+2
| | | | | | | | This patch moves GPIO related definitions to gpio.h and IRQ related to irq.h Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] RB532: Do not define registers that are already definedFlorian Fainelli2008-08-261-13/+3
| | | | | | | | Use the register definitions of the MPMC controller from mach-rc32434/rb.h instead of redefining them. Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Routerboard 532: Support for base systemRalf Baechle2008-07-201-0/+331
Signed-off-by: Phil Sutter <n0-1@freewrt.org> Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>