mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
ptp: idt82p33: remove PEROUT_ENABLE_OUTPUT_MASK
PEROUT_ENABLE_OUTPUT_MASK was there to allow us to enable/disable all the perout pins. But it is not standard procedure, we will have to discard it. Signed-off-by: Min Li <min.li.xe@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -895,40 +895,10 @@ static int idt82p33_output_enable(struct idt82p33_channel *channel,
|
|||||||
return idt82p33_write(idt82p33, OUT_MUX_CNFG(outn), &val, sizeof(val));
|
return idt82p33_write(idt82p33, OUT_MUX_CNFG(outn), &val, sizeof(val));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int idt82p33_output_mask_enable(struct idt82p33_channel *channel,
|
|
||||||
bool enable)
|
|
||||||
{
|
|
||||||
u16 mask;
|
|
||||||
int err;
|
|
||||||
u8 outn;
|
|
||||||
|
|
||||||
mask = channel->output_mask;
|
|
||||||
outn = 0;
|
|
||||||
|
|
||||||
while (mask) {
|
|
||||||
if (mask & 0x1) {
|
|
||||||
err = idt82p33_output_enable(channel, enable, outn);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
mask >>= 0x1;
|
|
||||||
outn++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int idt82p33_perout_enable(struct idt82p33_channel *channel,
|
static int idt82p33_perout_enable(struct idt82p33_channel *channel,
|
||||||
bool enable,
|
bool enable,
|
||||||
struct ptp_perout_request *perout)
|
struct ptp_perout_request *perout)
|
||||||
{
|
{
|
||||||
unsigned int flags = perout->flags;
|
|
||||||
|
|
||||||
/* Enable/disable output based on output_mask */
|
|
||||||
if (flags == PEROUT_ENABLE_OUTPUT_MASK)
|
|
||||||
return idt82p33_output_mask_enable(channel, enable);
|
|
||||||
|
|
||||||
/* Enable/disable individual output instead */
|
/* Enable/disable individual output instead */
|
||||||
return idt82p33_output_enable(channel, enable, perout->index);
|
return idt82p33_output_enable(channel, enable, perout->index);
|
||||||
}
|
}
|
||||||
@@ -939,10 +909,6 @@ static int idt82p33_enable_tod(struct idt82p33_channel *channel)
|
|||||||
struct timespec64 ts = {0, 0};
|
struct timespec64 ts = {0, 0};
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* STEELAI-366 - Temporary workaround for ts2phc compatibility */
|
|
||||||
if (0)
|
|
||||||
err = idt82p33_output_mask_enable(channel, false);
|
|
||||||
|
|
||||||
err = idt82p33_measure_tod_write_overhead(channel);
|
err = idt82p33_measure_tod_write_overhead(channel);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
#define IMMEDIATE_SNAP_THRESHOLD_NS (50000)
|
#define IMMEDIATE_SNAP_THRESHOLD_NS (50000)
|
||||||
#define DDCO_THRESHOLD_NS (5)
|
#define DDCO_THRESHOLD_NS (5)
|
||||||
#define IDT82P33_MAX_WRITE_COUNT (512)
|
#define IDT82P33_MAX_WRITE_COUNT (512)
|
||||||
#define PEROUT_ENABLE_OUTPUT_MASK (0xdeadbeef)
|
|
||||||
|
|
||||||
#define PLLMASK_ADDR_HI 0xFF
|
#define PLLMASK_ADDR_HI 0xFF
|
||||||
#define PLLMASK_ADDR_LO 0xA5
|
#define PLLMASK_ADDR_LO 0xA5
|
||||||
|
|||||||
Reference in New Issue
Block a user