From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98B5D2E8B65 for ; Wed, 3 Sep 2025 10:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756894159; cv=none; b=eCLF69yeaA1w+tVtcJGnnKZR+g98QBvpAZ16uwwP/RK8XjouCooADWiSl+TmrU5NsyA2Ld9cNgY0DliLegykVsJVIbBFx2YA+KGQ8FI7DNGm9w8k3a9VdTBCwyPfn0aiWvMN0M/LDHGKxMBT5JeiVIbsqnYw0rY35+d8ysVoIo4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756894159; c=relaxed/simple; bh=ADmSsgPB1RSSCcqtH44/pRvygy+Prw+U/Xp0b6LF5ik=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=shnSMieobsEXaXNH7Oqb0beE9hfuCMTRmWJnLZhf/lXrFmi3W2mX+0mP8Fcf/YZYC/UBiPpBrs6Z2rOBfIEJUsbdte4f+Jcq5NotCi6EyO341wGf1e5wVk1+fXHsyJX8+04GkgLI6efGuLqGnXvbbtexI63M8j0pQcfWIKPBrs8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hE0QQ1HK; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hE0QQ1HK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756894156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=DrImyOn3IcftgujaEiNSTzVv6qmXOv59oyPqtLU3t6c=; b=hE0QQ1HKnUcBI7BEALjCvNCuQpo2G8JJ2+z04dzfRUHnLWH3ri8FJ7VWBVL6JxRL4vceqw EZebNVq2k/yyIRZELYj+CwUsMVJ93UvdSb8KXfFTNF3sHZE/szFFhZl/nsSgOjLuo7VvGF 8brxNHOWffGoYtctUuYjba+l6BJXUEw= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-223-O_J33qBHOb2g7KyxzxWh7A-1; Wed, 03 Sep 2025 06:09:11 -0400 X-MC-Unique: O_J33qBHOb2g7KyxzxWh7A-1 X-Mimecast-MFC-AGG-ID: O_J33qBHOb2g7KyxzxWh7A_1756894148 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DEBE2195608C; Wed, 3 Sep 2025 10:09:07 +0000 (UTC) Received: from p16v.redhat.com (unknown [10.44.33.85]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 45DC01800578; Wed, 3 Sep 2025 10:09:02 +0000 (UTC) From: Ivan Vecera To: netdev@vger.kernel.org Cc: Jiri Pirko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Jonathan Corbet , Prathosh Satish , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Schmidt , Petr Oros , Przemek Kitszel Subject: [PATCH net-next v4 0/5] dpll: zl3073x: Add support for devlink flash Date: Wed, 3 Sep 2025 12:08:55 +0200 Message-ID: <20250903100900.8470-1-ivecera@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Add functionality for accessing device hardware registers, loading firmware bundles, and accessing the device's internal flash memory, and use it to implement the devlink flash functionality. Patch breakdown: Patch1: helpers to access hardware registers Patch2: low level functions to access flash memory Patch3: support to load firmware bundles Patch4: refactoring device initialization and helper functions for stopping and resuming device normal operation Patch5: devlink .flash_update callback implementation Changes: v4: * fixed issues reported by Jakub (see patches' changelogs) v3: * fixed issues reported by Przemek (see patches' changelogs) v2: * fixed several warnings found by patchwork bot * added includes into new .c files * fixed typos * fixed uninitialized variable Ivan Vecera (5): dpll: zl3073x: Add functions to access hardware registers dpll: zl3073x: Add low-level flash functions dpll: zl3073x: Add firmware loading functionality dpll: zl3073x: Refactor DPLL initialization dpll: zl3073x: Implement devlink flash callback Documentation/networking/devlink/zl3073x.rst | 14 + drivers/dpll/zl3073x/Makefile | 2 +- drivers/dpll/zl3073x/core.c | 362 +++++++--- drivers/dpll/zl3073x/core.h | 33 + drivers/dpll/zl3073x/devlink.c | 154 ++++- drivers/dpll/zl3073x/devlink.h | 3 + drivers/dpll/zl3073x/flash.c | 674 +++++++++++++++++++ drivers/dpll/zl3073x/flash.h | 29 + drivers/dpll/zl3073x/fw.c | 419 ++++++++++++ drivers/dpll/zl3073x/fw.h | 52 ++ drivers/dpll/zl3073x/regs.h | 51 ++ 11 files changed, 1702 insertions(+), 91 deletions(-) create mode 100644 drivers/dpll/zl3073x/flash.c create mode 100644 drivers/dpll/zl3073x/flash.h create mode 100644 drivers/dpll/zl3073x/fw.c create mode 100644 drivers/dpll/zl3073x/fw.h -- 2.49.1