Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Min Li and committed by
David S. Miller
46da4aa2 ad3cc776

-35
-34
drivers/ptp/ptp_idt82p33.c
··· 895 895 return idt82p33_write(idt82p33, OUT_MUX_CNFG(outn), &val, sizeof(val)); 896 896 } 897 897 898 - static int idt82p33_output_mask_enable(struct idt82p33_channel *channel, 899 - bool enable) 900 - { 901 - u16 mask; 902 - int err; 903 - u8 outn; 904 - 905 - mask = channel->output_mask; 906 - outn = 0; 907 - 908 - while (mask) { 909 - if (mask & 0x1) { 910 - err = idt82p33_output_enable(channel, enable, outn); 911 - if (err) 912 - return err; 913 - } 914 - 915 - mask >>= 0x1; 916 - outn++; 917 - } 918 - 919 - return 0; 920 - } 921 - 922 898 static int idt82p33_perout_enable(struct idt82p33_channel *channel, 923 899 bool enable, 924 900 struct ptp_perout_request *perout) 925 901 { 926 - unsigned int flags = perout->flags; 927 - 928 - /* Enable/disable output based on output_mask */ 929 - if (flags == PEROUT_ENABLE_OUTPUT_MASK) 930 - return idt82p33_output_mask_enable(channel, enable); 931 - 932 902 /* Enable/disable individual output instead */ 933 903 return idt82p33_output_enable(channel, enable, perout->index); 934 904 } ··· 908 938 struct idt82p33 *idt82p33 = channel->idt82p33; 909 939 struct timespec64 ts = {0, 0}; 910 940 int err; 911 - 912 - /* STEELAI-366 - Temporary workaround for ts2phc compatibility */ 913 - if (0) 914 - err = idt82p33_output_mask_enable(channel, false); 915 941 916 942 err = idt82p33_measure_tod_write_overhead(channel); 917 943
-1
drivers/ptp/ptp_idt82p33.h
··· 22 22 #define IMMEDIATE_SNAP_THRESHOLD_NS (50000) 23 23 #define DDCO_THRESHOLD_NS (5) 24 24 #define IDT82P33_MAX_WRITE_COUNT (512) 25 - #define PEROUT_ENABLE_OUTPUT_MASK (0xdeadbeef) 26 25 27 26 #define PLLMASK_ADDR_HI 0xFF 28 27 #define PLLMASK_ADDR_LO 0xA5