Skip to content

irq-ts71xxweim: add IRQ ack and ack_mask functions#275

Open
anakin-childerhose-sfl wants to merge 4 commits intoembeddedTS:linux-6.6.yfrom
anakin-childerhose-sfl:linux-6.6.y
Open

irq-ts71xxweim: add IRQ ack and ack_mask functions#275
anakin-childerhose-sfl wants to merge 4 commits intoembeddedTS:linux-6.6.yfrom
anakin-childerhose-sfl:linux-6.6.y

Conversation

@anakin-childerhose-sfl
Copy link

@anakin-childerhose-sfl anakin-childerhose-sfl commented Feb 13, 2026

Changes made:

  • add ack and mask_ack functions
  • add spinlocks for read-modify-write transactions
  • add initialisation of priv->mask to value of mask register
  • minor fixes

These commits have been tested on a ts7250 v3 with FPGA firmware rev65 by jumping the RX and TX pins together for the three RS-232 UARTS and running them all at 115200 baud for a period of time:

  • ttyS8 on the DB9 connector
  • ttyS9 on COM2 header
  • ttyS10 on COM3 header

The output of linux-serial-test for each tty:

/dev/ttyS10: count for this session: rx=3919758, tx=3919814, rx err=0
/dev/ttyS10: TIOCGICOUNT: ret=0, rx=3997939, tx=3997939, frame = 0, overrun = 0, parity = 0, brk = 0, buf_overrun = 0
/dev/ttyS8: count for this session: rx=3923653, tx=3923653, rx err=0
/dev/ttyS8: TIOCGICOUNT: ret=0, rx=4009904, tx=4009904, frame = 0, overrun = 0, parity = 0, brk = 0, buf_overrun = 0
/dev/ttyS9: count for this session: rx=3929020, tx=3932100, rx err=0
/dev/ttyS9: TIOCGICOUNT: ret=0, rx=4018415, tx=4018415, frame = 0, overrun = 0, parity = 0, brk = 0, buf_overrun = 0

Support both rev56 and rev65 of FPGA firmware by checking
TSWEIM_IRQ_ACK_MODE_EN in TSWEIM_IRQ_ACK_MODE.
priv->mask by default will be initialized with 0. This may not
accurately reflect the value in TSWEIM_IRQ_MASK. Initialize priv->mask
with TSWEIM_IRQ_MASK to ensure the variable is synced with the register.
Since tsweim_intc_probe() uses platform_set_drvdata(),
tsweim_intc_remove() should use platform_get_drvdata() instead of
dev_get_platdata().
{
struct tsweim_intc *priv = irq_data_get_irq_chip_data(d);

if (priv->revision >= 65) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-    if (priv->revision >= 65) {
+    if (priv->revision >= 65 && priv->ack_mode_en) {


raw_spin_unlock(&priv->lock);

if (priv->revision >= 65) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-    if (priv->revision >= 65) {
+    if (priv->revision >= 65 && priv->ack_mode_en) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments