serial: qcom_geni_serial: To correct QUP Version detection logic
authorParas Sharma <parashar@codeaurora.org>
Wed, 30 Sep 2020 06:05:26 +0000 (11:35 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Nov 2020 11:45:42 +0000 (12:45 +0100)
commite3f6c126a3f72b9dbe53bf3e96c27b4dc346e07c
treedf5b8ab5afccf098cba4d5f32479dffc9a78bfa6
parent8f924c0a5665a74fc74ea50f71999914095aaf88
serial: qcom_geni_serial: To correct QUP Version detection logic

commit c9ca43d42ed8d5fd635d327a664ed1d8579eb2af upstream.

For QUP IP versions 2.5 and above the oversampling rate is
halved from 32 to 16.

Commit ce734600545f ("tty: serial: qcom_geni_serial: Update
the oversampling rate") is pushed to handle this scenario.
But the existing logic is failing to classify QUP Version 3.0
into the correct group ( 2.5 and above).

As result Serial Engine clocks are not configured properly for
baud rate and garbage data is sampled to FIFOs from the line.

So, fix the logic to detect QUP with versions 2.5 and above.

Fixes: ce734600545f ("tty: serial: qcom_geni_serial: Update the oversampling rate")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Paras Sharma <parashar@codeaurora.org>
Reviewed-by: Akash Asthana <akashast@codeaurora.org>
Link: https://lore.kernel.org/r/1601445926-23673-1-git-send-email-parashar@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/qcom_geni_serial.c
include/linux/qcom-geni-se.h