Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next
This commit is contained in:
parent
3bcbc14911
8fc39b5166
3a44623d5e
3d8c869796
5c5989ccd3
cdd1945bde
fb534f1075
14c48ab2d9
7984b5ca5c
commit
6e07b9179a
30 changed files with 29 additions and 146 deletions
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/of_address.h>
|
||||
|
@ -466,10 +465,8 @@ static void mpc512x_spi_cs_control(struct spi_device *spi, bool onoff)
|
|||
gpio_set_value(spi->cs_gpio, onoff);
|
||||
}
|
||||
|
||||
/* bus_num is used only for the case dev->platform_data == NULL */
|
||||
static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
|
||||
u32 size, unsigned int irq,
|
||||
s16 bus_num)
|
||||
u32 size, unsigned int irq)
|
||||
{
|
||||
struct fsl_spi_platform_data *pdata = dev_get_platdata(dev);
|
||||
struct mpc512x_psc_spi *mps;
|
||||
|
@ -488,7 +485,6 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
|
|||
|
||||
if (pdata == NULL) {
|
||||
mps->cs_control = mpc512x_spi_cs_control;
|
||||
master->bus_num = bus_num;
|
||||
} else {
|
||||
mps->cs_control = pdata->cs_control;
|
||||
master->bus_num = pdata->bus_num;
|
||||
|
@ -574,7 +570,6 @@ static int mpc512x_psc_spi_of_probe(struct platform_device *op)
|
|||
{
|
||||
const u32 *regaddr_p;
|
||||
u64 regaddr64, size64;
|
||||
s16 id = -1;
|
||||
|
||||
regaddr_p = of_get_address(op->dev.of_node, 0, &size64, NULL);
|
||||
if (!regaddr_p) {
|
||||
|
@ -583,16 +578,8 @@ static int mpc512x_psc_spi_of_probe(struct platform_device *op)
|
|||
}
|
||||
regaddr64 = of_translate_address(op->dev.of_node, regaddr_p);
|
||||
|
||||
/* get PSC id (0..11, used by port_config) */
|
||||
id = of_alias_get_id(op->dev.of_node, "spi");
|
||||
if (id < 0) {
|
||||
dev_err(&op->dev, "no alias id for %s\n",
|
||||
op->dev.of_node->full_name);
|
||||
return id;
|
||||
}
|
||||
|
||||
return mpc512x_psc_spi_do_probe(&op->dev, (u32) regaddr64, (u32) size64,
|
||||
irq_of_parse_and_map(op->dev.of_node, 0), id);
|
||||
irq_of_parse_and_map(op->dev.of_node, 0));
|
||||
}
|
||||
|
||||
static int mpc512x_psc_spi_of_remove(struct platform_device *op)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue