diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-10-14 02:47:36 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-10-14 02:47:36 +0000 |
commit | 532249b5072aacee71b437b5be6de44840dc6e00 (patch) | |
tree | 2458e4ed779fe626b1c5335f2f5f411e277300a6 /target/linux/generic-2.6/files/drivers/ssb/ssb_private.h | |
parent | d124ab28a821a801862dba6d4e87a3facc140df5 (diff) |
sync ssb with upstream
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9302 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/files/drivers/ssb/ssb_private.h')
-rw-r--r-- | target/linux/generic-2.6/files/drivers/ssb/ssb_private.h | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/target/linux/generic-2.6/files/drivers/ssb/ssb_private.h b/target/linux/generic-2.6/files/drivers/ssb/ssb_private.h index d00d186074..a789364264 100644 --- a/target/linux/generic-2.6/files/drivers/ssb/ssb_private.h +++ b/target/linux/generic-2.6/files/drivers/ssb/ssb_private.h @@ -3,7 +3,6 @@ #include <linux/ssb/ssb.h> #include <linux/types.h> -#include <asm/io.h> #define PFX "ssb: " @@ -16,32 +15,20 @@ /* dprintk: Debugging printk; vanishes for non-debug compilation */ #ifdef CONFIG_SSB_DEBUG -# define ssb_dprintk(fmt, x...) ssb_printk(fmt ,##x) +# define ssb_dprintk(fmt, x...) ssb_printk(fmt , ##x) #else # define ssb_dprintk(fmt, x...) do { /* nothing */ } while (0) #endif -/* printkl: Rate limited printk */ -#define ssb_printkl(fmt, x...) do { \ - if (printk_ratelimit()) \ - ssb_printk(fmt ,##x); \ - } while (0) - -/* dprintkl: Rate limited debugging printk */ #ifdef CONFIG_SSB_DEBUG -# define ssb_dprintkl ssb_printkl +# define SSB_WARN_ON(x) WARN_ON(x) +# define SSB_BUG_ON(x) BUG_ON(x) #else -# define ssb_dprintkl(fmt, x...) do { /* nothing */ } while (0) +static inline int __ssb_do_nothing(int x) { return x; } +# define SSB_WARN_ON(x) __ssb_do_nothing(unlikely(!!(x))) +# define SSB_BUG_ON(x) __ssb_do_nothing(unlikely(!!(x))) #endif -#define assert(cond) do { \ - if (unlikely(!(cond))) { \ - ssb_dprintk(KERN_ERR PFX "BUG: Assertion failed (%s) " \ - "at: %s:%d:%s()\n", \ - #cond, __FILE__, __LINE__, __func__); \ - } \ - } while (0) - /* pci.c */ #ifdef CONFIG_SSB_PCIHOST @@ -120,7 +107,7 @@ static inline int ssb_pcmcia_init(struct ssb_bus *bus) /* scan.c */ -extern const char * ssb_core_name(u16 coreid); +extern const char *ssb_core_name(u16 coreid); extern int ssb_bus_scan(struct ssb_bus *bus, unsigned long baseaddr); extern void ssb_iounmap(struct ssb_bus *ssb); @@ -128,10 +115,22 @@ extern void ssb_iounmap(struct ssb_bus *ssb); /* core.c */ extern u32 ssb_calc_clock_rate(u32 plltype, u32 n, u32 m); -#ifdef CONFIG_SSB_PCIHOST extern int ssb_devices_freeze(struct ssb_bus *bus); extern int ssb_devices_thaw(struct ssb_bus *bus); -extern struct ssb_bus * ssb_pci_dev_to_bus(struct pci_dev *pdev); +extern struct ssb_bus *ssb_pci_dev_to_bus(struct pci_dev *pdev); + +/* b43_pci_bridge.c */ +#ifdef CONFIG_SSB_PCIHOST +extern int __init b43_pci_ssb_bridge_init(void); +extern void __exit b43_pci_ssb_bridge_exit(void); +#else /* CONFIG_SSB_PCIHOST */ +static inline int b43_pci_ssb_bridge_init(void) +{ + return 0; +} +static inline void b43_pci_ssb_bridge_exit(void) +{ +} #endif /* CONFIG_SSB_PCIHOST */ #endif /* LINUX_SSB_PRIVATE_H_ */ |