mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: linux-rtc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: [PATCH 41/45] rtc: tx4939: remove arch/mips dependency
Date: Mon, 12 Feb 2018 23:47:55 +0100	[thread overview]
Message-ID: <20180212224759.15999-42-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20180212224759.15999-1-alexandre.belloni@bootlin.com>

Copy RTC definitions from arch/mips/include/asm/txx9/tx4939.h to the RTC
driver so it doesn't depend on arch/mips anymore.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-tx4939.c | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c
index 560d9a5e0225..1f4013d8ae7b 100644
--- a/drivers/rtc/rtc-tx4939.c
+++ b/drivers/rtc/rtc-tx4939.c
@@ -14,7 +14,30 @@
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/gfp.h>
-#include <asm/txx9/tx4939.h>
+
+#define TX4939_RTCCTL_ALME	0x00000080
+#define TX4939_RTCCTL_ALMD	0x00000040
+#define TX4939_RTCCTL_BUSY	0x00000020
+
+#define TX4939_RTCCTL_COMMAND	0x00000007
+#define TX4939_RTCCTL_COMMAND_NOP	0x00000000
+#define TX4939_RTCCTL_COMMAND_GETTIME	0x00000001
+#define TX4939_RTCCTL_COMMAND_SETTIME	0x00000002
+#define TX4939_RTCCTL_COMMAND_GETALARM	0x00000003
+#define TX4939_RTCCTL_COMMAND_SETALARM	0x00000004
+
+#define TX4939_RTCTBC_PM	0x00000080
+#define TX4939_RTCTBC_COMP	0x0000007f
+
+#define TX4939_RTC_REG_RAMSIZE	0x00000100
+#define TX4939_RTC_REG_RWBSIZE	0x00000006
+
+struct tx4939_rtc_reg {
+	__u32 ctl;
+	__u32 adr;
+	__u32 dat;
+	__u32 tbc;
+};
 
 struct tx4939rtc_plat_data {
 	struct rtc_device *rtc;
-- 
2.16.1

  parent reply	other threads:[~2018-02-12 22:51 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 22:47 [PATCH 00/45] RTC: nvmem improvements Alexandre Belloni
2018-02-12 22:47 ` [PATCH 01/45] rtc: documentation: correct nvmem date and version Alexandre Belloni
2018-02-12 22:47 ` [PATCH 02/45] rtc: nvmem: pass nvmem_config to rtc_nvmem_register() Alexandre Belloni
2018-02-12 22:47 ` [PATCH 03/45] rtc: nvmem: return error values Alexandre Belloni
2018-02-12 22:47 ` [PATCH 04/45] rtc: nvmem: disallow registering nvmem more than once Alexandre Belloni
2018-02-12 22:47 ` [PATCH 05/45] rtc: export rtc_nvmem_register() to drivers Alexandre Belloni
2018-02-12 22:47 ` [PATCH 06/45] rtc: ds1305: call rtc_nvmem_register() Alexandre Belloni
2018-02-12 22:47 ` [PATCH 07/45] rtc: ds1305: put ds1305_nvmem_cfg on the stack Alexandre Belloni
2018-02-12 22:47 ` [PATCH 08/45] rtc: ds1307: call rtc_nvmem_register() Alexandre Belloni
2018-02-12 22:47 ` [PATCH 09/45] rtc: ds1307: put struct nvmem_config on the stack Alexandre Belloni
2018-02-12 22:47 ` [PATCH 10/45] rtc: ds1511: call rtc_nvmem_register() Alexandre Belloni
2018-02-12 22:47 ` [PATCH 11/45] rtc: ds1511: put ds1511_nvmem_cfg on the stack Alexandre Belloni
2018-02-12 22:47 ` [PATCH 12/45] rtc: m48t86: call rtc_nvmem_register() Alexandre Belloni
2018-02-12 22:47 ` [PATCH 13/45] rtc: m48t86: put m48t86_nvmem_cfg on the stack Alexandre Belloni
2018-02-12 22:47 ` [PATCH 14/45] rtc: omap: call rtc_nvmem_register() Alexandre Belloni
2018-02-12 22:47 ` [PATCH 15/45] rtc: pcf85363: " Alexandre Belloni
2018-02-12 22:47 ` [PATCH 16/45] rtc: pcf85363: put struct nvmem_config on the stack Alexandre Belloni
2018-02-12 22:47 ` [PATCH 17/45] rtc: rv8803: call rtc_nvmem_register() Alexandre Belloni
2018-02-12 22:47 ` [PATCH 18/45] rtc: rv8803: put struct nvmem_config on the stack Alexandre Belloni
2018-02-12 22:47 ` [PATCH 19/45] rtc: rv8803: fix possible race condition Alexandre Belloni
2018-02-12 22:47 ` [PATCH 20/45] rtc: remove nvmem_config Alexandre Belloni
2018-02-12 22:47 ` [PATCH 21/45] rtc: ds1343: simplify regmap initialization Alexandre Belloni
2018-02-12 22:47 ` [PATCH 22/45] rtc: ds1343: switch to rtc_register_device Alexandre Belloni
2018-02-12 22:47 ` [PATCH 23/45] rtc: ds1343: remove undocumented and useless sysfs files Alexandre Belloni
2018-02-12 22:47 ` [PATCH 24/45] rtc: ds1343: use generic nvmem Alexandre Belloni
2018-02-12 22:47 ` [PATCH 25/45] rtc: m48t59: switch to rtc_register_device Alexandre Belloni
2018-02-12 22:47 ` [PATCH 26/45] rtc: m48t59: use generic nvmem Alexandre Belloni
2018-02-12 22:47 ` [PATCH 27/45] rtc: sirfsoc: remove useless sirfsoc_rtc_ioctl Alexandre Belloni
2018-02-12 22:47 ` [PATCH 28/45] rtc: ds1553: switch to rtc_register_device Alexandre Belloni
2018-02-12 22:47 ` [PATCH 29/45] rtc: ds1553: use generic nvmem Alexandre Belloni
2018-02-12 22:47 ` [PATCH 30/45] rtc: ds1553: make alarms useful Alexandre Belloni
2018-02-12 22:47 ` [PATCH 31/45] rtc: cmos: fix possible race condition Alexandre Belloni
2018-02-12 22:47 ` [PATCH 32/45] rtc: cmos: use generic nvmem Alexandre Belloni
2018-02-12 22:47 ` [PATCH 33/45] rtc: ds1742: switch to rtc_register_device Alexandre Belloni
2018-02-12 22:47 ` [PATCH 34/45] rtc: ds1742: use generic nvmem Alexandre Belloni
2018-02-12 22:47 ` [PATCH 35/45] rtc: rp5c01: fix possible race condition Alexandre Belloni
2018-02-12 22:47 ` [PATCH 36/45] rtc: rp5c01: use generic nvmem Alexandre Belloni
2018-02-12 22:47 ` [PATCH 37/45] rtc: stk17ta8: make alarms useful Alexandre Belloni
2018-02-12 22:47 ` [PATCH 38/45] rtc: stk17ta8: switch to rtc_register_device Alexandre Belloni
2018-02-12 22:47 ` [PATCH 39/45] rtc: stk17ta8: fix possible race condition Alexandre Belloni
2018-02-12 22:47 ` [PATCH 40/45] rtc: stk17ta8: use generic nvmem Alexandre Belloni
2018-02-12 22:47 ` Alexandre Belloni [this message]
2018-02-12 22:47 ` [PATCH 42/45] rtc: tx4939: extend test coverage Alexandre Belloni
2018-02-12 22:47 ` [PATCH 43/45] rtc: tx4939: switch to rtc_register_device Alexandre Belloni
2018-02-12 22:47 ` [PATCH 44/45] rtc: tx4939: fix possible race condition Alexandre Belloni
2018-02-12 22:47 ` [PATCH 45/45] rtc: tx4939: use generic nvmem Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180212224759.15999-42-alexandre.belloni@bootlin.com \
    --to=alexandre.belloni@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®