// SPDX-License-Identifier: GPL-2.0+ /* * drivers/net/phy/cicada.c * * Driver for Cicada PHYs * * Author: Andy Fleming * * Copyright (c) 2004 Freescale Semiconductor, Inc. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Cicada Extended Control Register 1 */ #define MII_CIS8201_EXT_CON1 0x17 #define MII_CIS8201_EXTCON1_INIT 0x0000 /* Cicada Interrupt Mask Register */ #define MII_CIS8201_IMASK 0x19 #define MII_CIS8201_IMASK_IEN 0x8000 #define MII_CIS8201_IMASK_SPEED 0x4000 #define MII_CIS8201_IMASK_LINK 0x2000 #define MII_CIS8201_IMASK_DUPLEX 0x1000 #define MII_CIS8201_IMASK_MASK 0xf000 /* Cicada Interrupt Status Register */ #define MII_CIS8201_ISTAT 0x1a #define MII_CIS8201_ISTAT_STATUS 0x8000 #define MII_CIS8201_ISTAT_SPEED 0x4000 #define MII_CIS8201_ISTAT_LINK 0x2000 #define MII_CIS8201_ISTAT_DUPLEX 0x1000 /* Cicada Auxiliary Control/Status Register */ #define MII_CIS8201_AUX_CONSTAT 0x1c #define MII_CIS8201_AUXCONSTAT_INIT 0x0004 #define MII_CIS8201_AUXCONSTAT_DUPLEX 0x0020 #define MII_CIS8201_AUXCONSTAT_SPEED 0x0018 #define MII_CIS8201_AUXCONSTAT_GBIT 0x0010 #define MII_CIS8201_AUXCONSTAT_100 0x0008 MODULE_DESCRIPTION("Cicadia PHY driver"); MODULE_AUTHOR("Andy Fleming"); MODULE_LICENSE("GPL"); static int cis820x_config_init(struct phy_device *phydev) { int err; err = phy_write(phydev, MII_CIS8201_AUX_CONSTAT, MII_CIS8201_AUXCONSTAT_INIT); if (err < 0) return err; err = phy_write(phydev, MII_CIS8201_EXT_CON1, MII_CIS8201_EXTCON1_INIT); return err; } static int cis820x_ack_interrupt(struct phy_device *phydev) { int err = phy_read(phydev, MII_CIS8201_ISTAT); return (err < 0) ? err : 0; } static int cis820x_config_intr(struct phy_device *phydev) { int err; if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { err = cis820x_ack_interrupt(phydev); if (err) return err; err = phy_write(phydev, MII_CIS8201_IMASK, MII_CIS8201_IMASK_MASK); } else { err = phy_write(phydev, MII_CIS8201_IMASK, 0); if (err) return err; err = cis820x_ack_interrupt(phydev); } return err; } static irqreturn_t cis820x_handle_interrupt(struct phy_device *phydev) { int irq_status; irq_status = phy_read(phydev, MII_CIS8201_ISTAT); if (irq_status < 0) { phy_error(phydev); return IRQ_NONE; } if (!(irq_status & MII_CIS8201_IMASK_MASK)) return IRQ_NONE; phy_trigger_machine(phydev); return IRQ_HANDLED; } /* Cicada 8201, a.k.a Vitesse VSC8201 */ static struct phy_driver cis820x_driver[] = { { .phy_id = 0x000fc410, .name = "Cicada Cis8201", .phy_id_mask = 0x000ffff0, /* PHY_GBIT_FEATURES */ .config_init = &cis820x_config_init, .config_intr = &cis820x_config_intr, .handle_interrupt = &cis820x_handle_interrupt, }, { .phy_id = 0x000fc440, .name = "Cicada Cis8204", .phy_id_mask = 0x000fffc0, /* PHY_GBIT_FEATURES */ .config_init = &cis820x_config_init, .config_intr = &cis820x_config_intr, .handle_interrupt = &cis820x_handle_interrupt, } }; module_phy_driver(cis820x_driver); static struct mdio_device_id __maybe_unused cicada_tbl[] = { { 0x000fc410, 0x000ffff0 }, { 0x000fc440, 0x000fffc0 }, { } }; MODULE_DEVICE_TABLE(mdio, cicada_tbl); on value='distro/nisz/libreoffice-7-1'>distro/nisz/libreoffice-7-1 Unnamed repository; edit this file to name it for gitweb.root
summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Expand)AuthorFilesLines
2024-08-23update translations for 24.8.1 rc1Christian Lohmaier464-7996/+9278
2024-08-20Updated Slovenian translationMartin Srebotnjak15-50/+60
2024-08-08update translations for 24.8.0 rc3Christian Lohmaier330-7999/+7194
2024-07-26update translations for 24.8.0 rc2/masterChristian Lohmaier78-778/+848
2024-07-24update translations for 24.8.0 rc2Christian Lohmaier334-5629/+5300
2024-07-15Updated Slovenian translationMartin Srebotnjak51-1774/+2251
2024-07-15update translations for master/24-8Christian Lohmaier449-6941/+7245
2024-07-08update translations for 24.8.0 rc1/masterChristian Lohmaier752-13300/+15854
2024-06-28update translations for 24.8/masterChristian Lohmaier1401-55124/+51822
2024-06-28update translations for 24-8/masterChristian Lohmaier696-19429/+27757
2024-06-17update translations for 24-8/masterChristian Lohmaier888-57427/+58764
2024-06-11update translations for master / 24.8.0 beta1libreoffice-24-8-branch-pointChristian Lohmaier1034-10831/+33947
2024-06-06update translations for master / 24.8.0 beta1Christian Lohmaier897-61626/+70322
2024-06-03update translations for masterChristian Lohmaier1417-43940/+50260
2024-06-01add files for Sundanese (sun)Christian Lohmaier158-0/+274687
2024-06-01update translations for masterChristian Lohmaier1170-22698/+27401
2024-06-01Fix "\n" mismatch in Slovenian translationJulien Nabet1-3/+3
2024-05-31Updated Slovenian translationMartin Srebotnjak63-9627/+16272
2024-05-23update translations for masterChristian Lohmaier1646-115717/+156491
2024-05-14update translations for masterChristian Lohmaier1752-153873/+229855
2024-05-01tdf#151830: Fix RID_SVXSTR_TEXTENCODING_TABLE nb translationsMike Kaganski1-52/+52
2024-04-30update translations for masterChristian Lohmaier1576-148583/+131351
2024-04-22update translations for masterChristian Lohmaier1913-105941/+117841
2024-04-15update translations for masterChristian Lohmaier1243-83895/+99069
2024-04-09update translations for masterChristian Lohmaier1278-92518/+96935
2024-04-02update translations for masterChristian Lohmaier