wl12xx: move common init code from bus modules to main
Move all common parts from sdio.c and spi.c to main.c, since they now can be handled as part of the platform driver. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported, cleaned-up and rephrased commit message] [added a bunch of fixes and a new pdata element] [moved some new code into main.c as well] Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
committed by
Luciano Coelho
parent
ce2a217c82
commit
a390e85cfe
@@ -24,6 +24,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include "wl12xx.h"
|
||||
#include "wl12xx_80211.h"
|
||||
@@ -46,7 +47,7 @@
|
||||
bool wl1271_set_block_size(struct wl1271 *wl)
|
||||
{
|
||||
if (wl->if_ops->set_block_size) {
|
||||
wl->if_ops->set_block_size(wl, WL12XX_BUS_BLOCK_SIZE);
|
||||
wl->if_ops->set_block_size(wl->dev, WL12XX_BUS_BLOCK_SIZE);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -55,12 +56,12 @@ bool wl1271_set_block_size(struct wl1271 *wl)
|
||||
|
||||
void wl1271_disable_interrupts(struct wl1271 *wl)
|
||||
{
|
||||
wl->if_ops->disable_irq(wl);
|
||||
disable_irq(wl->irq);
|
||||
}
|
||||
|
||||
void wl1271_enable_interrupts(struct wl1271 *wl)
|
||||
{
|
||||
wl->if_ops->enable_irq(wl);
|
||||
enable_irq(wl->irq);
|
||||
}
|
||||
|
||||
/* Set the SPI partitions to access the chip addresses
|
||||
@@ -128,13 +129,13 @@ EXPORT_SYMBOL_GPL(wl1271_set_partition);
|
||||
void wl1271_io_reset(struct wl1271 *wl)
|
||||
{
|
||||
if (wl->if_ops->reset)
|
||||
wl->if_ops->reset(wl);
|
||||
wl->if_ops->reset(wl->dev);
|
||||
}
|
||||
|
||||
void wl1271_io_init(struct wl1271 *wl)
|
||||
{
|
||||
if (wl->if_ops->init)
|
||||
wl->if_ops->init(wl);
|
||||
wl->if_ops->init(wl->dev);
|
||||
}
|
||||
|
||||
void wl1271_top_reg_write(struct wl1271 *wl, int addr, u16 val)
|
||||
|
||||
Reference in New Issue
Block a user