aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mv64x60_dev.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-03-02powerpc/mv64x60: Suspected typo in assignmentNicolas Kaiser1-1/+1
Untested, but looks like an obvious typo to me. [BenH: No feedback, but it's obviously wrong] Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-11-01of/net: Move of_get_mac_address() to a common source file.David Daney1-0/+1
There are two identical implementations of of_get_mac_address(), one each in arch/powerpc/kernel/prom_parse.c and arch/microblaze/kernel/prom_parse.c. Move this function to a new common file of_net.{c,h} and adjust all the callers to include the new header. Signed-off-by: David Daney <ddaney@caviumnetworks.com> [grant.likely@secretlab.ca: protect header with #ifdef] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-07-24of: Merge of_platform_bus_type with platform_bus_typeGrant Likely1-6/+1
of_platform_bus was being used in the same manner as the platform_bus. The only difference being that of_platform_bus devices are generated from data in the device tree, and platform_bus devices are usually statically allocated in platform code. Having them separate causes the problem of device drivers having to be registered twice if it was possible for the same device to appear on either bus. This patch removes of_platform_bus_type and registers all of_platform bus devices and drivers on the platform bus instead. A previous patch made the of_device structure an alias for the platform_device structure, and a shim is used to adapt of_platform_drivers to the platform bus. After all of of_platform_bus drivers are converted to be normal platform drivers, the shim code can be removed. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net>
2010-02-17powerpc: Add coherent_dma_mask to mv64x60 devicesCorey Minyard1-0/+3
DMA ops requires that coherent_dma_mask be set properly for a device, but this was not being done for devices on the MV64x60 that use DMA. Both the serial and ethernet devices need this or they won't be able to allocate memory. Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-09-05mv643xx_eth: remove force_phy_addr fieldLennert Buytenhek1-4/+2
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-05-14[POWERPC] Create of_buses for MV64x60 devicesRemi Machet1-0/+10
For each mv64360 entry in the OpenFirmware database, add the registration of an of_bus to take care of devices connected to the MV64x60 asynchronous devices controller. This change makes it possible for those devices to be detected by drivers that support the of_platform without having a custom call for each of them in the board file. Signed-off-by: Remi Machet <rmachet@slac.stanford.edu> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-28mv643xx_eth: get rid of static variables, allow multiple instancesLennert Buytenhek1-0/+2
Move mv643xx_eth's static state (ethernet register block base address and MII management interface spinlock) into a struct hanging off the shared platform device. This is necessary to support chips that contain multiple mv643xx_eth silicon blocks. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2008-04-24[POWERPC] Initialize all mv64x60 devices even if one failsRemi Machet1-16/+26
If one of the devices of the mv64x60 init fails, the remaining devices are not initialized. This changes the code to display an error and continue the initialization. Signed-off-by: Remi Machet (rmachet@slac.stanford.edu) Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-24[POWERPC] Use default values if necessary in mv64x60 I2C initializationRemi Machet1-6/+4
I2C parameters freq_m and freq_n are assigned defaults in the code, but if properties for those parameters are not found in the open firmware description the init routine returns an error and doesn't create the platform device. This changes the code so that it doesn't return an error if the properties are not found but instead uses the default values. Signed-off-by: Remi Machet (rmachet@slac.stanford.edu) Acked-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-15[POWERPC] mv643xx_eth: Prepare to support multiple silicon blocksDale Farnsworth1-23/+29
The mv643xx_eth driver is being modified to support multiple instances of the ethernet silicon block on the same platform. Each block contains a single register bank containing the registers for up to three ports interleaved within that bank. This patch updates the PowerPC OF to platform_device glue code to support multiple silicon blocks, each with up to three ethernet ports. The main difference is that we now allow multiple mv64x60_shared platform_devices to be registered and we provide each port platform_device with a pointer to its associated shared platform_device. The pointer will not be used until the mv643xx_eth driver changes are committed. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Acked-by: Mark Greer <mgreer@mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-15[POWERPC] prpmc2800: Clean up dts propertiesMark A. Greer1-11/+7
Remove several unused (or software config only) properties. Rename marvel node to "system-controller". Also, rename the "block-index" property to "cell-index" to conform to current practice. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-15[POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360Mark A. Greer1-5/+5
Compatible names should refer to a specific version of the hardware, without wildcards. Change each instance of mv64x60 to mv64360, which is the oldest version we currently support. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-01-31Merge branch 'linux-2.6'Paul Mackerras1-6/+0
2008-01-26[I2C] i2c-mv64xxx: Don't set i2c_adapter.retriesJean Delvare1-6/+0
I2C adapter drivers are supposed to handle retries on nack by themselves if they do, so there's no point in setting .retries if they don't. As this retry mechanism is going away (at least in its current form), clean this up now so that we don't get build failures later. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mark A. Greer <mgreer@mvista.com>
2008-01-17[POWERPC] Use for_each macros in arch/powerpc/sysdevCyrill Gorcunov1-14/+10
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-24[WATCHDOG] mv64x60_wdt: Add arch/powerpc platform supportDale Farnsworth1-0/+64
Add support for arch/powerpc, specifically for the prpmc2800 platform. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-06-25[POWERPC] Call add_preferred_console when MPSC is consoleMark A. Greer1-0/+28
When a Marvell MPSC (serial controller) port is the specified /chosen/stdout-path device, call 'add_preferred_console()' so the user doesn't have to specify a 'console=ttyMMx' cmdline argument. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Acked-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Create Marvell mv64x60 I2C platform_dataDale Farnsworth1-0/+72
This patch creates platform_device entries for the Marvell mv64x60 I2C ports, based on information contained in device tree. This driver (like the other mv64x60 drivers) are unusual in that it works on both the MIPS and PowerPC architectures. Because of that, the drivers do not support the normal PowerPC of_platform_bus_type. They support platform_bus_type instead. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Create Marvell mv64x60 ethernet platform_dataDale Farnsworth1-0/+129
This patch creates platform_device entries for the Marvell mv64x60 ethernet controller ports, based on information contained in the device tree. This driver (like the other mv64x60 drivers) are unusual in that it works on both the MIPS and PowerPC architectures. Because of that, the drivers do not support the normal PowerPC of_platform_bus_type. They support platform_bus_type instead. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Create Marvell mv64x60 MPSC (serial) platform_dataDale Farnsworth1-0/+221
This patch creates platform_device entries for the Marvell mv64x60 MPSC (multi-protocol serial controller) ports, based on information contained in the device tree. This driver (like the other mv64x60 drivers) are unusual in that it works on both the MIPS and PowerPC architectures. Because of that, the drivers do not support the normal PowerPC of_platform_bus_type. They support platform_bus_type instead. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>