From patchwork Mon Jan 6 14:09:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1218170 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=85.214.62.61; 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.b="GCsSM+CY"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47ry7r6tNYz9sQp for ; Tue, 7 Jan 2020 01:09:57 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 474BB8170F; Mon, 6 Jan 2020 15:09:52 +0100 (CET) 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="GCsSM+CY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EE23D8170E; Mon, 6 Jan 2020 15:09:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FORGED_SPF_HELO, SPF_HELO_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2070a.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::70a]) (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 94F2C80507 for ; Mon, 6 Jan 2020 15:09:47 +0100 (CET) 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=PAC1A7Z+u+jfxmDASPi3mG2PSnhlevFVDUBqK15fSRcOSH+bqkaUdPScP+TKSh1GRcmNq9JRun2olOupkYbF/7kvCaLwFMfISJjMz0ci1xeOcZ0os3LZbj9BU9qpRCjoZpqgdOMyvQP4tthjnFZ3PIYRfaqX9LSQSFAV7elOA8Eaip4ncYwOHg+GeUQmec/hgEy/Iyr/yVWm5pDZJOMG4bTlqLs9gsrDEOzFPXmQCiHEaqmHtZqWTL4Wovf3DfAsON12UbCKy0VMF3+NNKkkaCaZKgySc4dsci4qMYEcifcjHN12Yx20IM3p7ium/rDJJRKxuTfs5YG9323xoP9k6w== 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=Y2uft1sCBLCdgaCVE3y/3sVDtMPp7R6RVwZ0T8xNRq0=; b=G40HBXIkA/hWQeipH4qsl6FV5nc43A+703rI34LXfL+8ITUUxZ/TZpkyAnXBPyNoRKCARPd/dqbraAWmY8xLTLPh21+BhuoSj32remz+CeIeXVcRPyx7Y9OihgH4Rw7P4Ot7afT/G1L3uehcQSG219vX8sRONDoRyYHaK/BOxg/H3rO53du/36k35F0zVghJSOHWX19LjGgD6CVp4yULmw9MQ12OjKzg114lx4i1MSX5pSiq7p44JEkuODqECSDL0RlJQFDH8yKOCJ6okFS/i+1x718PodoJz0A4qX06ZVZmAVxm37OEtKHSO/9nkCFiG8U6SO3uVsXOcocB+UgbQQ== 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=Y2uft1sCBLCdgaCVE3y/3sVDtMPp7R6RVwZ0T8xNRq0=; b=GCsSM+CYJ8TBhnLysjuD6odGXqXEV11pxGZnIOV0o5EyEWPISNkIUpdhi2g19f4OeNHZKr2xduO54spt0aarqoMs18VrLTJmtImPwVNDDoGy0EwGmaRg/1tpl7hzaXn7zY6NLXvq+zZCV6E44/DCh1dvB8ls3oAE1AMnK+TQOOw= Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (20.178.126.85) by VI1PR10MB2144.EURPRD10.PROD.OUTLOOK.COM (20.177.62.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.15; Mon, 6 Jan 2020 14:09:45 +0000 Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::8175:5aa2:2870:766d]) by VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::8175:5aa2:2870:766d%6]) with mapi id 15.20.2602.015; Mon, 6 Jan 2020 14:09:45 +0000 Received: from prevas-ravi.prevas.se (81.216.59.226) by HE1P192CA0016.EURP192.PROD.OUTLOOK.COM (2603:10a6:3:fe::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.12 via Frontend Transport; Mon, 6 Jan 2020 14:09:44 +0000 From: Rasmus Villemoes To: "u-boot@lists.denx.de" Subject: [PATCH 0/4] spi: mpc8xxx_spi: bug fixes and real ->set_speed Thread-Topic: [PATCH 0/4] spi: mpc8xxx_spi: bug fixes and real ->set_speed Thread-Index: AQHVxJryEKPQt4KPwkOILYqScJIgCA== Date: Mon, 6 Jan 2020 14:09:45 +0000 Message-ID: <20200106140931.1136-1-rasmus.villemoes@prevas.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P192CA0016.EURP192.PROD.OUTLOOK.COM (2603:10a6:3:fe::26) To VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) x-mailer: git-send-email 2.23.0 authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasmus.villemoes@prevas.dk; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [81.216.59.226] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a494b754-1e69-4b1d-f8ee-08d792b214fd x-ms-traffictypediagnostic: VI1PR10MB2144: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2733; x-forefront-prvs: 0274272F87 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(346002)(136003)(366004)(39850400004)(376002)(189003)(199004)(66476007)(8676002)(64756008)(66446008)(66556008)(66946007)(54906003)(86362001)(6486002)(81166006)(81156014)(4744005)(16526019)(52116002)(186003)(26005)(6506007)(316002)(4326008)(36756003)(5660300002)(71200400001)(2906002)(44832011)(6916009)(1076003)(2616005)(6512007)(107886003)(8976002)(8936002)(956004)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR10MB2144; H:VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: prevas.dk does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bK7B1wWRtdZ20vi1DoVwhxW/51a2QkL5z7SNO5Kwtx9P6JuygcJbkN831YlMvkYTy8eES/AKcbuFXT/pNYAC0mnCk2HI51bqGWdWM6gljLFUITMliMBmEuP4Q/mYdLRlQjUDwz2RFOouJ6mS8f63RTp/Q7SptnY9+HxIfo4g9hN7HASL2fVYA23PDLU2rahe7v0XG7OqCHh09esfWmmvtXZz0jsGN5RYYUl4h+zy1Bala+CEXOPxamjaumnGed85En7u9xLHxjYh3iqsnZRNO82kvBGDWWVdM44R6zKlHNb5w0md9xWwsYdce9JsDf6NTJy9BG+OMBttxRgG7HZj3+zpP37UtC6F6dyQnKuEeIf5kzgSQCd4lFhLHK8RAAXzRc1/IGUqHcp3kZ1D/nNF2FMSFnXNVKoOBc6IuUVIgfMw9aB66UESbyt/QxPegw6I Content-ID: MIME-Version: 1.0 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: a494b754-1e69-4b1d-f8ee-08d792b214fd X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jan 2020 14:09:45.6053 (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: HBmoLmJ5aj0i17O2LW35j41gzcvjMSFCFCT8Lg9DImYPMmSu92iEeNERHZWR//XvPMjN8GT4PzWj2mrZHI9oB2s41QBGqpRE6ZFG4OV+qxg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB2144 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Klaus_Henning_S=C3=B8rensen?= Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Patch 3/4 is the important one. Without it, reads and writes of certain lengths from spi-nor fails, and stuff at physical address 0x0 gets overwritten even if no input buffer is supplied (e.g. when sending a command). Tested on an mpc8309-derived board. It would be nice if someone with access to the gazerbeam board can test that this doesn't break that - in particular, the "only do transfers that are multiple of 8 bits" part. Rasmus Villemoes (4): gazerbeam: add clocks property to SPI node mpc8xxx_spi: put max_cs to use mpc8xxx_spi: always use 8-bit characters, don't read or write garbage mpc8xxx_spi: implement real ->set_speed arch/powerpc/dts/gdsys/mpc8308.dtsi | 7 ++ drivers/spi/mpc8xxx_spi.c | 141 ++++++++++++++++------------ 2 files changed, 88 insertions(+), 60 deletions(-)