linux/drivers/ssb/pci.c

/*
 * Sonics Silicon Backplane PCI-Hostbus related functions.
 *
 * Copyright (C) 2005-2006 Michael Buesch <[email protected]>
 * Copyright (C) 2005 Martin Langer <[email protected]>
 * Copyright (C) 2005 Stefano Brivio <[email protected]>
 * Copyright (C) 2005 Danny van Dyk <[email protected]>
 * Copyright (C) 2005 Andreas Jaggi <[email protected]>
 *
 * Derived from the Broadcom 4400 device driver.
 * Copyright (C) 2002 David S. Miller ([email protected])
 * Fixed by Pekka Pietikainen ([email protected])
 * Copyright (C) 2006 Broadcom Corporation.
 *
 * Licensed under the GNU/GPL. See COPYING for details.
 */

#include "ssb_private.h"

#include <linux/ssb/ssb.h>
#include <linux/ssb/ssb_regs.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/delay.h>


/* Define the following to 1 to enable a printk on each coreswitch. */
#define SSB_VERBOSE_PCICORESWITCH_DEBUG


/* Lowlevel coreswitching */
int ssb_pci_switch_coreidx(struct ssb_bus *bus, u8 coreidx)
{}

int ssb_pci_switch_core(struct ssb_bus *bus,
			struct ssb_device *dev)
{}

/* Enable/disable the on board crystal oscillator and/or PLL. */
int ssb_pci_xtal(struct ssb_bus *bus, u32 what, int turn_on)
{}

/* Get the word-offset for a SSB_SPROM_XXX define. */
#define SPOFF(offset)
/* Helper to extract some _offset, which is one of the SSB_SPROM_XXX defines. */
#define SPEX16(_outvar, _offset, _mask, _shift)
#define SPEX32(_outvar, _offset, _mask, _shift)
#define SPEX(_outvar, _offset, _mask, _shift)

#define SPEX_ARRAY8(_field, _offset, _mask, _shift)


static inline u8 ssb_crc8(u8 crc, u8 data)
{}

static void sprom_get_mac(char *mac, const u16 *in)
{}

static u8 ssb_sprom_crc(const u16 *sprom, u16 size)
{}

static int sprom_check_crc(const u16 *sprom, size_t size)
{}

static int sprom_do_read(struct ssb_bus *bus, u16 *sprom)
{}

static int sprom_do_write(struct ssb_bus *bus, const u16 *sprom)
{}

static s8 sprom_extract_antgain(u8 sprom_revision, const u16 *in, u16 offset,
				u16 mask, u16 shift)
{}

static void sprom_extract_r23(struct ssb_sprom *out, const u16 *in)
{}

static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in)
{}

/* Revs 4 5 and 8 have partially shared layout */
static void sprom_extract_r458(struct ssb_sprom *out, const u16 *in)
{}

static void sprom_extract_r45(struct ssb_sprom *out, const u16 *in)
{}

static void sprom_extract_r8(struct ssb_sprom *out, const u16 *in)
{}

static int sprom_extract(struct ssb_bus *bus, struct ssb_sprom *out,
			 const u16 *in, u16 size)
{}

static int ssb_pci_sprom_get(struct ssb_bus *bus,
			     struct ssb_sprom *sprom)
{}

static void ssb_pci_get_boardinfo(struct ssb_bus *bus,
				  struct ssb_boardinfo *bi)
{}

int ssb_pci_get_invariants(struct ssb_bus *bus,
			   struct ssb_init_invariants *iv)
{}

static int ssb_pci_assert_buspower(struct ssb_bus *bus)
{}

static u8 ssb_pci_read8(struct ssb_device *dev, u16 offset)
{}

static u16 ssb_pci_read16(struct ssb_device *dev, u16 offset)
{}

static u32 ssb_pci_read32(struct ssb_device *dev, u16 offset)
{}

#ifdef CONFIG_SSB_BLOCKIO
static void ssb_pci_block_read(struct ssb_device *dev, void *buffer,
			       size_t count, u16 offset, u8 reg_width)
{}
#endif /* CONFIG_SSB_BLOCKIO */

static void ssb_pci_write8(struct ssb_device *dev, u16 offset, u8 value)
{}

static void ssb_pci_write16(struct ssb_device *dev, u16 offset, u16 value)
{}

static void ssb_pci_write32(struct ssb_device *dev, u16 offset, u32 value)
{}

#ifdef CONFIG_SSB_BLOCKIO
static void ssb_pci_block_write(struct ssb_device *dev, const void *buffer,
				size_t count, u16 offset, u8 reg_width)
{}
#endif /* CONFIG_SSB_BLOCKIO */

/* Not "static", as it's used in main.c */
const struct ssb_bus_ops ssb_pci_ops =;

static ssize_t ssb_sprom_show(struct device *pcidev,
			      struct device_attribute *attr,
			      char *buf)
{}

static ssize_t ssb_sprom_store(struct device *pcidev,
			       struct device_attribute *attr,
			       const char *buf, size_t count)
{}

static DEVICE_ATTR_ADMIN_RW(ssb_sprom);

void ssb_pci_exit(struct ssb_bus *bus)
{}

int ssb_pci_init(struct ssb_bus *bus)
{}