ocelot.h (40d3f295b5feda409784e569550057b5fbc2a295) ocelot.h (924ee317f72459a49ac4130272c7d33063e60339)
1/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
2/* Copyright (c) 2017 Microsemi Corporation
3 */
4
5#ifndef _SOC_MSCC_OCELOT_H
6#define _SOC_MSCC_OCELOT_H
7
8#include <linux/ptp_clock_kernel.h>

--- 727 unchanged lines hidden (view full) ---

736 u32 val, u32 reg, u32 offset);
737
738/* Packet I/O */
739#if IS_ENABLED(CONFIG_MSCC_OCELOT_SWITCH_LIB)
740
741bool ocelot_can_inject(struct ocelot *ocelot, int grp);
742void ocelot_port_inject_frame(struct ocelot *ocelot, int port, int grp,
743 u32 rew_op, struct sk_buff *skb);
1/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
2/* Copyright (c) 2017 Microsemi Corporation
3 */
4
5#ifndef _SOC_MSCC_OCELOT_H
6#define _SOC_MSCC_OCELOT_H
7
8#include <linux/ptp_clock_kernel.h>

--- 727 unchanged lines hidden (view full) ---

736 u32 val, u32 reg, u32 offset);
737
738/* Packet I/O */
739#if IS_ENABLED(CONFIG_MSCC_OCELOT_SWITCH_LIB)
740
741bool ocelot_can_inject(struct ocelot *ocelot, int grp);
742void ocelot_port_inject_frame(struct ocelot *ocelot, int port, int grp,
743 u32 rew_op, struct sk_buff *skb);
744int ocelot_xtr_poll_frame(struct ocelot *ocelot, int grp, struct sk_buff **skb);
744
745#else
746
747static inline bool ocelot_can_inject(struct ocelot *ocelot, int grp)
748{
749 return false;
750}
751
752static inline void ocelot_port_inject_frame(struct ocelot *ocelot, int port,
753 int grp, u32 rew_op,
754 struct sk_buff *skb)
755{
756}
757
745
746#else
747
748static inline bool ocelot_can_inject(struct ocelot *ocelot, int grp)
749{
750 return false;
751}
752
753static inline void ocelot_port_inject_frame(struct ocelot *ocelot, int port,
754 int grp, u32 rew_op,
755 struct sk_buff *skb)
756{
757}
758
759static inline int ocelot_xtr_poll_frame(struct ocelot *ocelot, int grp,
760 struct sk_buff **skb)
761{
762 return -EIO;
763}
764
758#endif
759
760/* Hardware initialization */
761int ocelot_regfields_init(struct ocelot *ocelot,
762 const struct reg_field *const regfields);
763struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res);
764int ocelot_init(struct ocelot *ocelot);
765void ocelot_deinit(struct ocelot *ocelot);

--- 100 unchanged lines hidden ---
765#endif
766
767/* Hardware initialization */
768int ocelot_regfields_init(struct ocelot *ocelot,
769 const struct reg_field *const regfields);
770struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res);
771int ocelot_init(struct ocelot *ocelot);
772void ocelot_deinit(struct ocelot *ocelot);

--- 100 unchanged lines hidden ---