int (*write32)(struct b53_device *dev, u8 page, u8 reg, u32 value);
int (*write48)(struct b53_device *dev, u8 page, u8 reg, u64 value);
int (*write64)(struct b53_device *dev, u8 page, u8 reg, u64 value);
+ int (*phy_read16)(struct b53_device *dev, int addr, u8 reg, u16 *value);
+ int (*phy_write16)(struct b53_device *dev, int addr, u8 reg, u16 value);
};
enum {
return dev->sw_dev.cpu_port == port;
}
+static inline int is_imp_port(struct b53_device *dev, int port)
+{
+ if (is5325(dev) || is5365(dev))
+ return port == B53_CPU_PORT_25;
+ else
+ return port == B53_CPU_PORT;
+}
+
static inline struct b53_device *sw_to_b53(struct switch_dev *sw)
{
return container_of(sw, struct b53_device, sw_dev);
}
#ifdef CONFIG_BCM47XX
-
-#include <bcm47xx_nvram.h>
#include <bcm47xx_board.h>
+#endif
+
+#include <linux/version.h>
+#include <linux/bcm47xx_nvram.h>
+
static inline int b53_switch_get_reset_gpio(struct b53_device *dev)
{
+#ifdef CONFIG_BCM47XX
enum bcm47xx_board board = bcm47xx_board_get();
switch (board) {
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
return 8;
default:
- return bcm47xx_nvram_gpio_pin("robo_reset");
+ break;
}
-}
-#else
-static inline int b53_switch_get_reset_gpio(struct b53_device *dev)
-{
- return -ENOENT;
-}
#endif
+
+ return bcm47xx_nvram_gpio_pin("robo_reset");
+}
+
#endif