blob: e88b4494beaaa169d21eabcc6b78c6a16bf5680b [file] [log] [blame]
Rafał Miłecki482f0532011-05-18 02:06:36 +02001#ifndef B43_BUS_H_
2#define B43_BUS_H_
3
4enum b43_bus_type {
5 B43_BUS_SSB,
6};
7
8struct b43_bus_dev {
9 enum b43_bus_type bus_type;
10 union {
11 struct ssb_device *sdev;
12 };
Rafał Miłeckic0b4c002011-05-18 02:06:37 +020013
14 u16 (*read16)(struct b43_bus_dev *dev, u16 offset);
15 u32 (*read32)(struct b43_bus_dev *dev, u16 offset);
16 void (*write16)(struct b43_bus_dev *dev, u16 offset, u16 value);
17 void (*write32)(struct b43_bus_dev *dev, u16 offset, u32 value);
18 void (*block_read)(struct b43_bus_dev *dev, void *buffer,
19 size_t count, u16 offset, u8 reg_width);
20 void (*block_write)(struct b43_bus_dev *dev, const void *buffer,
21 size_t count, u16 offset, u8 reg_width);
Rafał Miłecki21d889d2011-05-18 02:06:38 +020022
Rafał Miłeckia18c7152011-05-18 02:06:40 +020023 struct device *dev;
24 struct device *dma_dev;
25 unsigned int irq;
26
Rafał Miłecki79d22322011-05-18 02:06:42 +020027 u16 board_vendor;
28 u16 board_type;
29 u16 board_rev;
30
Rafał Miłeckic244e082011-05-18 02:06:41 +020031 u16 chip_id;
32 u8 chip_rev;
33 u8 chip_pkg;
34
Rafał Miłecki05814832011-05-18 02:06:39 +020035 struct ssb_sprom *bus_sprom;
36
Rafał Miłecki21d889d2011-05-18 02:06:38 +020037 u16 core_id;
38 u8 core_rev;
Rafał Miłecki482f0532011-05-18 02:06:36 +020039};
40
41struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev);
42
43#endif /* B43_BUS_H_ */