Skip to contentSkip to conversation

ARM: shmobile: kzm9g: Support Real Time Clock

PATCH In review Tetsuyuki Kobayashi 3 participants 3 messages Jun 19, 2012 – Jun 20, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: shmobile: kzm9g: Support Real Time Clock

Hello, this is my first patch to this ML.

This depends on Morimoto-san's
[PATCH 0/27] ARM: shmobile: resend patch set

KZM-A9-GT board has RTC device r2025d at I2C channel 0 with slave address 0x64.

This patch enables reading and writing hardware real time clock on KZM-A9-GT board. Interrupt is not yet supported.

How to test this patch using user space command.

Read RTC

 # hwclock -r

Copy system clock to RTC

 # hwclock -w

Shutdown and power off the board, and wait a while, then power on again. Check RTC still keeps correct date.

---
 arch/arm/configs/kzm9g_defconfig     |    1 +
 arch/arm/mach-shmobile/board-kzm9g.c |    3 +++
 2 files changed, 4 insertions(+)
arch/arm/configs/kzm9g_defconfig +1 -0
index eeeb29f..7b2eecd 100644
@@ -113,6 +113,7 @@ CONFIG_MMC_SH_MMCIF=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_RS5C372=y
 CONFIG_DMADEVICES=y
 CONFIG_SH_DMAE=y
 CONFIG_ASYNC_TX_DMA=y
arch/arm/mach-shmobile/board-kzm9g.c +3 -0
index 3687f3b..ab6207b 100644
@@ -531,6 +531,9 @@ static struct pcf857x_platform_data pcf8575_pdata = {
 static struct i2c_board_info i2c0_devices[] = {
 	{
 		I2C_BOARD_INFO("ak4648", 0x12),
+	},
+	{
+		I2C_BOARD_INFO("r2025sd", 0x32),
 	}
 };
 
Signature · 1 line
1.7.9.5
Tested-by on v1 1/1
#1 lore raw
Quoted 19 lines · Tetsuyuki Kobayashi

Hello, this is my first patch to this ML.

This depends on Morimoto-san's
[PATCH 0/27] ARM: shmobile: resend patch set

KZM-A9-GT board has RTC device r2025d at I2C channel 0 with slave address 0x64.

This patch enables reading and writing hardware real time clock on KZM-A9-GT board. Interrupt is not yet supported.

How to test this patch using user space command.

Read RTC

 # hwclock -r
Quoted 7 lines

Copy system clock to RTC

 # hwclock -w

Shutdown and power off the board, and wait a while, then power on again. Check RTC still keeps correct date.

Hi Kobayashi-san,

I have verified that your patch works using the hwclock commands above.

Acked-by on v1 1/1
#2 lore raw
In reply to Tetsuyuki Kobayashi

Hi

Quoted 11 lines

KZM-A9-GT board has RTC device r2025d at I2C channel 0 with slave address 0x64.

This patch enables reading and writing hardware real time clock on KZM-A9-GT board. Interrupt is not yet supported.

How to test this patch using user space command.

Read RTC

 # hwclock -r
Quoted 8 lines

Copy system clock to RTC

 # hwclock -w

Shutdown and power off the board, and wait a while, then power on again. Check RTC still keeps correct date.

---

Best regards
---
Kuninori Morimoto