summaryrefslogtreecommitdiff
path: root/target/linux/brcm47xx-2.6/files/include
diff options
context:
space:
mode:
authornoz <noz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-25 19:51:09 +0000
committernoz <noz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-25 19:51:09 +0000
commit77c9f26cec5d6c35766b5426af980a52fb1fd822 (patch)
tree2de6e1c70d24aebfdb8ffd71705570a88bcf7bcd /target/linux/brcm47xx-2.6/files/include
parent6a140db1329a973e671bc2fa23c61a2cf0374cdc (diff)
Merge SSB driver from tree at bu3sch.de, pulled 24/6
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7732 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx-2.6/files/include')
-rw-r--r--target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb.h43
-rw-r--r--target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb_regs.h12
2 files changed, 37 insertions, 18 deletions
diff --git a/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb.h b/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb.h
index 1ed3cbc1e5..a3d1f5114b 100644
--- a/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb.h
+++ b/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb.h
@@ -100,6 +100,13 @@ struct ssb_sprom {
};
};
+/* Information about the PCB the circuitry is soldered on. */
+struct ssb_boardinfo {
+ u16 vendor;
+ u16 type;
+ u16 rev;
+};
+
struct ssb_device;
/* Lowlevel read/write operations on the device MMIO.
@@ -292,19 +299,11 @@ struct ssb_bus {
struct mutex pci_sprom_mutex;
#endif
- /* ID information about the PCB. */
- u16 board_vendor;
- u16 board_type;
- u16 board_rev;
/* ID information about the Chip. */
u16 chip_id;
u16 chip_rev;
u8 chip_package;
- /* Contents of the SPROM.
- * If there is no sprom (not on PCI-bus), this is emulated. */
- struct ssb_sprom sprom;
-
/* List of devices (cores) on the backplane. */
struct ssb_device devices[SSB_MAX_NR_CORES];
u8 nr_devices;
@@ -313,7 +312,7 @@ struct ssb_bus {
u8 suspend_cnt;
/* Software ID number for this bus. */
- int busnumber;
+ unsigned int busnumber;
/* The ChipCommon device (if available). */
struct ssb_chipcommon chipco;
@@ -324,13 +323,34 @@ struct ssb_bus {
/* The EXTif-core device (if available). */
struct ssb_extif extif;
+ /* The following structure elements are not available in early
+ * SSB initialization. Though, they are available for regular
+ * registered drivers at any stage. So be careful when
+ * using them in the ssb core code. */
+
+ /* ID information about the PCB. */
+ struct ssb_boardinfo boardinfo;
+ /* Contents of the SPROM. */
+ struct ssb_sprom sprom;
+
/* Internal. */
struct list_head list;
};
+/* The initialization-invariants. */
+struct ssb_init_invariants {
+ struct ssb_boardinfo boardinfo;
+ struct ssb_sprom sprom;
+};
+
+/* Register a SSB system bus. get_invariants() is called after the
+ * basic system devices are initialized.
+ * The invariants are usually fetched from some NVRAM.
+ * Put the invariants into the struct pointed to by iv. */
extern int ssb_bus_ssbbus_register(struct ssb_bus *bus,
unsigned long baseaddr,
- void (*fill_sprom)(struct ssb_sprom *sprom));
+ int (*get_invariants)(struct ssb_bus *bus,
+ struct ssb_init_invariants *iv));
#ifdef CONFIG_SSB_PCIHOST
extern int ssb_bus_pcibus_register(struct ssb_bus *bus,
struct pci_dev *host_pci);
@@ -338,8 +358,7 @@ extern int ssb_bus_pcibus_register(struct ssb_bus *bus,
#ifdef CONFIG_SSB_PCMCIAHOST
extern int ssb_bus_pcmciabus_register(struct ssb_bus *bus,
struct pcmcia_device *pcmcia_dev,
- unsigned long baseaddr,
- void (*fill_sprom)(struct ssb_sprom *sprom));
+ unsigned long baseaddr);
#endif /* CONFIG_SSB_PCMCIAHOST */
extern void ssb_bus_unregister(struct ssb_bus *bus);
diff --git a/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb_regs.h b/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb_regs.h
index e1c7ff78a8..1fa4bf8a9d 100644
--- a/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb_regs.h
+++ b/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb_regs.h
@@ -201,16 +201,16 @@
#define SSB_SPROM1_GPIOB_P3 0xFF00 /* Pin 3 */
#define SSB_SPROM1_GPIOB_P3_SHIFT 8
#define SSB_SPROM1_MAXPWR 0x1068 /* Power Amplifier Max Power */
-#define SSB_SPROM1_MAXPWR_A 0x00FF /* A-PHY (in dBm Q5.2) */
-#define SSB_SPROM1_MAXPWR_BG 0xFF00 /* B-PHY and G-PHY (in dBm Q5.2) */
-#define SSB_SPROM1_MAXPWR_BG_SHIFT 8
+#define SSB_SPROM1_MAXPWR_BG 0x00FF /* B-PHY and G-PHY (in dBm Q5.2) */
+#define SSB_SPROM1_MAXPWR_A 0xFF00 /* A-PHY (in dBm Q5.2) */
+#define SSB_SPROM1_MAXPWR_A_SHIFT 8
#define SSB_SPROM1_PA1B0 0x106A
#define SSB_SPROM1_PA1B1 0x106C
#define SSB_SPROM1_PA1B2 0x106E
#define SSB_SPROM1_ITSSI 0x1070 /* Idle TSSI Target */
-#define SSB_SPROM1_ITSSI_A 0x00FF /* A-PHY */
-#define SSB_SPROM1_ITSSI_BG 0xFF00 /* B-PHY and G-PHY */
-#define SSB_SPROM1_ITSSI_BG_SHIFT 8
+#define SSB_SPROM1_ITSSI_BG 0x00FF /* B-PHY and G-PHY*/
+#define SSB_SPROM1_ITSSI_A 0xFF00 /* A-PHY */
+#define SSB_SPROM1_ITSSI_A_SHIFT 8
#define SSB_SPROM1_BFLLO 0x1072 /* Boardflags (low 16 bits) */
#define SSB_SPROM1_AGAIN 0x1074 /* Antenna Gain (in dBm Q5.2) */
#define SSB_SPROM1_AGAIN_A 0x00FF /* A-PHY */