From patchwork Mon Mar 16 15:26:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tretter X-Patchwork-Id: 11440623 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43FB66CA for ; Mon, 16 Mar 2020 15:27:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23E9B2051A for ; Mon, 16 Mar 2020 15:27:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731853AbgCPP06 (ORCPT ); Mon, 16 Mar 2020 11:26:58 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:34989 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731713AbgCPP0n (ORCPT ); Mon, 16 Mar 2020 11:26:43 -0400 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jDrdZ-0000lE-GK; Mon, 16 Mar 2020 16:26:41 +0100 Received: from mtr by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1jDrdY-000551-IR; Mon, 16 Mar 2020 16:26:40 +0100 From: Michael Tretter To: linux-media@vger.kernel.org Cc: hverkuil-cisco@xs4all.nl, kernel@pengutronix.de, Michael Tretter Subject: [PATCH v2 04/18] media: allegro: remove unknown39 field from create_channel Date: Mon, 16 Mar 2020 16:26:24 +0100 Message-Id: <20200316152638.19457-5-m.tretter@pengutronix.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200316152638.19457-1-m.tretter@pengutronix.de> References: <20200316152638.19457-1-m.tretter@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mtr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The subframe_latency and lda_control_mode fields directly follow freq_golden_ref field and there is no unknown field in between. The unknown field it at the end of the message. Reorder the fields accordingly. This further allows to drop the hard coded value from the lda_control_mode field and set the mode to 0. Signed-off-by: Michael Tretter --- Changelog: v1 -> v2: None --- drivers/staging/media/allegro-dvt/allegro-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/allegro-dvt/allegro-core.c b/drivers/staging/media/allegro-dvt/allegro-core.c index 6e3f28e637af..d67f84bf38d3 100644 --- a/drivers/staging/media/allegro-dvt/allegro-core.c +++ b/drivers/staging/media/allegro-dvt/allegro-core.c @@ -397,10 +397,9 @@ struct mcu_msg_create_channel { u8 num_b; u8 freq_golden_ref; - u32 unknown39; - u32 subframe_latency; u32 lda_control_mode; + u32 unknown41; } __attribute__ ((__packed__)); struct mcu_msg_create_channel_response { @@ -1121,7 +1120,6 @@ static int allegro_mcu_send_create_channel(struct allegro_dev *dev, msg.gdr_mode = 0x00000000; msg.gop_length = channel->gop_size; msg.subframe_latency = 0x00000000; - msg.lda_control_mode = 0x700d0000; allegro_mbox_write(dev, &dev->mbox_command, &msg, sizeof(msg)); allegro_mcu_interrupt(dev);