rtc-msm6242.c (4ba24fef3eb3b142197135223b90ced2f319cd53) rtc-msm6242.c (a737e835e5769ef22897179ed7f82b1fc50bfa58)
1/*
2 * Oki MSM6242 RTC Driver
3 *
4 * Copyright 2009 Geert Uytterhoeven
5 *
6 * Based on the A2000 TOD code in arch/m68k/amiga/config.c
7 * Copyright (C) 1993 Hamish Macdonald
8 */
9
1/*
2 * Oki MSM6242 RTC Driver
3 *
4 * Copyright 2009 Geert Uytterhoeven
5 *
6 * Based on the A2000 TOD code in arch/m68k/amiga/config.c
7 * Copyright (C) 1993 Hamish Macdonald
8 */
9
10#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
11
10#include <linux/delay.h>
11#include <linux/io.h>
12#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/platform_device.h>
15#include <linux/rtc.h>
16#include <linux/slab.h>
17

--- 88 unchanged lines hidden (view full) ---

106 while ((msm6242_read(priv, MSM6242_CD) & MSM6242_CD_BUSY) && cnt) {
107 msm6242_clear(priv, MSM6242_CD_HOLD, MSM6242_CD);
108 udelay(70);
109 msm6242_set(priv, MSM6242_CD_HOLD, MSM6242_CD);
110 cnt--;
111 }
112
113 if (!cnt)
12#include <linux/delay.h>
13#include <linux/io.h>
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/platform_device.h>
17#include <linux/rtc.h>
18#include <linux/slab.h>
19

--- 88 unchanged lines hidden (view full) ---

108 while ((msm6242_read(priv, MSM6242_CD) & MSM6242_CD_BUSY) && cnt) {
109 msm6242_clear(priv, MSM6242_CD_HOLD, MSM6242_CD);
110 udelay(70);
111 msm6242_set(priv, MSM6242_CD_HOLD, MSM6242_CD);
112 cnt--;
113 }
114
115 if (!cnt)
114 pr_warn("msm6242: timed out waiting for RTC (0x%x)\n",
116 pr_warn("timed out waiting for RTC (0x%x)\n",
115 msm6242_read(priv, MSM6242_CD));
116}
117
118static void msm6242_unlock(struct msm6242_priv *priv)
119{
120 msm6242_clear(priv, MSM6242_CD_HOLD, MSM6242_CD);
121}
122

--- 114 unchanged lines hidden ---
117 msm6242_read(priv, MSM6242_CD));
118}
119
120static void msm6242_unlock(struct msm6242_priv *priv)
121{
122 msm6242_clear(priv, MSM6242_CD_HOLD, MSM6242_CD);
123}
124

--- 114 unchanged lines hidden ---