Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp194128img; Mon, 18 Mar 2019 00:37:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxa5kQ7DKcZTRdmkNwXcdNIOXMoH0o8ES2O6Kzc+XfQo/jKblR7rZXAp0Wyjn2KaAHvymql X-Received: by 2002:a65:6105:: with SMTP id z5mr16499271pgu.434.1552894657419; Mon, 18 Mar 2019 00:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552894657; cv=none; d=google.com; s=arc-20160816; b=k1JmaMxpdnBUYxEj1WIxUzrVA4f418VgiMDzUTufs2+T2Cqc/oNXLmd41Cd6nmwZw6 6TgqPVyxs3R5Tney4LfIempqUtqjoSOEOuJ6u26+617OJyILxGKVBnFfs/jWrrBBM4VN fpHsObqZucyM2O7KcPs+h/gsQ5cIgOdxcUp553lCgKgoOUL43a2o6j1ZS4Tuayy1lVN+ 6DhuxI92tUZGgBl09mz8Z7df8246fDL15ubEiRj3m/RVjWZQtauMALFBWDsn73qjuOjG PWeuESeORxb2oSOjDteQebJjr0KnM4fKwkw1r1DW0E4TfkU7rHQNrl4zH5EQi401TQSB GZIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=QLExzYsR+vRbLd8nfnpkKGCWUW4JgoctVrG2TPUt/N8=; b=gFyquCtYplHKZBOa86xfcRmYI8M8dAx06pVSAQf5OTSA7Ydkov/IW5pbhuQlK+LCol V3sZ3OPQ5Z4gXyBe2Kx3zn1BxKV0sRzRSF/fLVVqvlx2Zd6WclfybyLP2HMo47mBQ/pT LUSYshxuxPT+3VF/jRULrBxIDoO6Yv+ATZdEBSAHpQwPVlpNzGrlEdj1B/fjrivSHTHy VNNiTs8Q5xQ2/ki7PefgnMk+0D2nOvwABLOLgxHMtKtyRHaZDP+AjKjvfSfbM5pZvJLi 7iVqaWB87JcjEGRyauxb6j/tX8UhSawj/x+dqW1zNp8P33awu8+6/K5PW2Z4X52j1gD3 675g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si4304788pfd.204.2019.03.18.00.37.21; Mon, 18 Mar 2019 00:37:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727130AbfCRHeO (ORCPT + 99 others); Mon, 18 Mar 2019 03:34:14 -0400 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76]:40872 "EHLO wens.csie.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726916AbfCRHeN (ORCPT ); Mon, 18 Mar 2019 03:34:13 -0400 Received: by wens.csie.org (Postfix, from userid 1000) id E6EE25FD14; Mon, 18 Mar 2019 15:34:11 +0800 (CST) From: Chen-Yu Tsai To: Srinivas Kandagatla , Maxime Ripard Cc: linux-sunxi@googlegroups.com, Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/6] nvmem: sunxi_sid: native format and A83T/H5 support Date: Mon, 18 Mar 2019 15:33:48 +0800 Message-Id: <20190318073354.12151-1-wens@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai Hi everyone, This series converts the sunxi_sid driver to read out data in native endianness for all Allwinner SoCs. It was already the case for the H3, which used a different read-out method. The endianness for this hardware was found to be either native or little endian [1], based on the data layout for the thermal sensor calibration data stored within. Some SoCs have either 1 or 3 sensors, and calibration data for each sensor is 2 bytes wide, with data for 2 sensors packed into 1 word. The first three patches do some clean-up and improvements of the code overall. The fourth patch converts the driver to reading out data in native endianness. The fifth adds support for the A83T and H5. These two were already listed in the device tree bindings. The last patch adds a device node for it on H3 and H5. Please have a look. Regards ChenYu [1] https://lkml.org/lkml/2019/2/18/134 Chen-Yu Tsai (6): nvmem: sunxi_sid: Read out SID for randomness without looping nvmem: sunxi_sid: Optimize register read-out method nvmem: sunxi_sid: Dynamically allocate nvmem_config structure nvmem: sunxi_sid: Read out data in native format nvmem: sunxi_sid: Support SID on A83T and H5 ARM: dts: sunxi: h3/h5: Add device node for SID arch/arm/boot/dts/sun8i-h3.dtsi | 4 + arch/arm/boot/dts/sunxi-h3-h5.dtsi | 5 + arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 4 + drivers/nvmem/sunxi_sid.c | 98 ++++++++------------ 4 files changed, 52 insertions(+), 59 deletions(-) -- 2.20.1