From patchwork Fri May 1 14:55:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1281347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=dvUAc3rc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49DFfy2wX3z9sRY for ; Sat, 2 May 2020 00:55:38 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6198682292; Fri, 1 May 2020 16:55:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="dvUAc3rc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A30788228F; Fri, 1 May 2020 16:55:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0727.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::727]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4EB37821B6 for ; Fri, 1 May 2020 16:55:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fwMDzwGfA0s7ZydYzc+ZYsirSIK9oDdE71D2CO/cg/Y1TsNioTzBOh0S/WS0uqZ0wZlIw8DtwsZhCs/M+KmfePJcDEAsh5vq5dQkFsRNWYquEHLSfQjbbzsDuh72zyyO4L90CThrvmA4hbJHWbVz/3pZMvpvTLAFCDA7i5wK6QEE6NTP2JGtBoJCwItMeW8vqUIZz9ybPcaVLcH36wWGWOMslC3cekUNC4SRAHzEpBlpqOsf/JBhkqNlaBMt3ZxE9FBSSxuOCDmrjpJ9O5YeME/8CoHtUYOez/rvodOdSMiMURdfTOFhByH4UGskwgUXSRiVg92lAagGu0SguTjcug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SY6UV+u6Ag+yHEMQkaO73yZJCN2LLCWYEpOpZKKmgtA=; b=MB5JHL12paLAI3AIAdMHP2n9eWdSqG17dJ7L49V0MFvrcAjOmx8EOzCywxghewATGilfigksIr0NflFkMLW9DRbJxvNne5kx3RU91Xtr/FqaR6Fk3+aSHbQ1mCCPWIlQdDNcwiYlg9l6WiRlIHon7sPGC4TfISo5088dKpK97zgOBfeCZorDVn5yj88YgoHWwFCp04YmpY2ANDTCj3cHHrVge+q32sqHglfDUHmXFmB2QcA4Lt7U2zhZo2av9g35o/YRWreJmjKxyT9zhdKEhU9QEkScyYOrMZ/TOT7zvud1srDWMpUvw0L8AFETo1UISX0LeUv78aQhxlWsTZ5wWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SY6UV+u6Ag+yHEMQkaO73yZJCN2LLCWYEpOpZKKmgtA=; b=dvUAc3rcJVwpLyR3MRWRxDvF5uh7mmMDQ/WzNf0ITbpOU25xdxgBX5vreqAQoyPbxpS+G+JONkQ+u2A1h06o7ew03//BUO07gBdjhU02TLy9am0wFLyeN7afkLwwo8vFyuDQyFSx/yavUzVl3rBpqUI8oe/SvQTPdQznxTrxoBY= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=prevas.dk; Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) by VI1PR10MB1967.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:32::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.27; Fri, 1 May 2020 14:55:25 +0000 Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::f0ac:4e97:2536:faa]) by VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::f0ac:4e97:2536:faa%7]) with mapi id 15.20.2958.020; Fri, 1 May 2020 14:55:25 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Simon Glass , Mario Six , Bin Meng , Urja Rannikko , Rasmus Villemoes Subject: [PATCH 0/5] some sysreset patches (mostly for mpc83xx) Date: Fri, 1 May 2020 16:55:11 +0200 Message-Id: <20200501145516.18168-1-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.23.0 X-ClientProxiedBy: AM6PR0502CA0065.eurprd05.prod.outlook.com (2603:10a6:20b:56::42) To VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prevas-ravi.prevas.se (5.186.116.45) by AM6PR0502CA0065.eurprd05.prod.outlook.com (2603:10a6:20b:56::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Fri, 1 May 2020 14:55:24 +0000 X-Mailer: git-send-email 2.23.0 X-Originating-IP: [5.186.116.45] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e942cb09-14cb-4bb7-1d1b-08d7eddfae11 X-MS-TrafficTypeDiagnostic: VI1PR10MB1967: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3383; X-Forefront-PRVS: 0390DB4BDA X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q2fIhTvqM/bEmGtEEVY+p0yEVbtd6GcEr0SuJcQguI52BIJhxK1GIbDL7mc69CulZESkOQI0n7KJB+VqtaqN+NKaPno0Fr1FO70zN0ZgUjNUX+nwRM58bFCwk7ddQ1A6fddbx96E4PlUSUPgtzRp+16xorfqcn18U00womlwiWMFyvmTPP465PQ+xNDXu+yGOSDVXnVBDpoTAjSoaHPA+DIBYeYmPI5tPmE8GIovSDX84xftmuyKCCPgCXL8t1D1F0346MDriRS+5/PA69wtD1vBPdVnd2uUgewpPJQRTday4dboKIz2mOwPN/yNtGN+r0Ukk1ec5TX8uh5CjTgL+/Nx8t6SG72nG1OLA/CKIWEIPuiTkj6dS+EgC1+p62pDZymWsAVcFKMGTpKsG9NCC3fMinUOp6ZxUTlbHV/tl+oI4aCYgpI36+XUf8pzNqeX X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(396003)(376002)(39840400004)(136003)(346002)(366004)(52116002)(66946007)(8676002)(66556008)(66476007)(26005)(186003)(6486002)(6666004)(16526019)(316002)(6506007)(2906002)(54906003)(86362001)(107886003)(6916009)(8976002)(8936002)(4326008)(6512007)(478600001)(4744005)(2616005)(44832011)(1076003)(36756003)(956004)(5660300002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: Kkp6z4n/B/L0+3PlCOuUFHTm1OKaQ8HCXZPXiv8x7i5Zk7xRij/mocvoZY7aR6TxFkOY+rnd4ETcBPgNFY0pyXCYiALEJUdm6jOLfQM4NLZNDMcP9K6Jf/l1ogghU3a4VdpXi7WwuthtnCBaLWaljZXTnEt2uUCalVOun221hOkGETdohkLZSRqB0r5gbSFtZPOmFCMbEKmx69R3Nnr+/3x8Zt6TzOdLgaGgFbr7y3pwl33Dddc5r64sBss81xbV07sskBty19tH25Zr35lR5bflTF0hXtsKg0nj5J4qVJqdoatk0B9xAiBajzbFs9ThUIQMpTLWE6NoWxT4m6rHC4hDMC5NjfdOZmXwfcrrh1zQB7VLy9kECwh85RB8v9OUeH7OY7Mg5P1C3crXSwkD8jJbu2CTlgAjJXMPYDCTRicIgmFWUuhXU/FK/jqoGPkYyTvzeGOslDjiljwbvuESAZYaarpkKBVMhFR1mrEuBuDXd26u8/EJSPOTiGltLLbC8O54UdAcgo28UORtp2jk9dfoOcOHupAtwnrPRtq4LqUj49kHyhUw668PpFTGJ7yTXaX95GuLgcz2bWyZOBy6iiF4uGU2M3SoE9oPun6A5JJTOIZx4vxsVSYBpks982pFIuLXxD7vqgO2O9AJVkYQToHgsEij9att6DNVzBP+vtLmE8SdzO7/OJknwULJAn0eQLpczRd4xKYbjHxilc/gktl+Q8E+oxWhZRNsTO8+yyt21dfGnI8WnUwWDhmalqmgrhUzyqhxro/apKte5n6QFhXRiNwhfb2v1j9P2wMjmPA= X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: e942cb09-14cb-4bb7-1d1b-08d7eddfae11 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2020 14:55:25.2660 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: D8A0nqwyAvYfyBxEzfFD4I1o5U+pzovXT5uD9ztvU4TGYFFee/75nH9YWzETceZVCy2Yhrvzp2Z+jtbsML76SNdHkLcPRu0y385BQNOYgU4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB1967 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean The first four of these are some minor improvements to the sysreset_mpc83xx driver. Patch 5 is independent of the others, but included because I need to print the reset info in SPL - since, on the mpc8309, the reset status register gets cleared after reading, only SPL gets to know the actual reset cause; in U-Boot proper, gd->arch.reset_status is always clear. Rasmus Villemoes (5): sysreset: mpc83xx: use scnprintf instead of snprintf sysreset: mpc83xx: shuffle newline logic in mpc83xx_sysreset_get_status sysreset: mpc83xx: fix CONFIG_IS_ENABLED logic sysreset: mpc83xx: add output in case of cold boot sysreset: move print_resetinfo() to sysreset-uclass.c common/board_f.c | 24 -------- drivers/sysreset/sysreset-uclass.c | 22 ++++++++ drivers/sysreset/sysreset_mpc83xx.c | 88 ++++++++++++++--------------- include/sysreset.h | 5 ++ 4 files changed, 68 insertions(+), 71 deletions(-)