aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion/ts209-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-orion/ts209-setup.c')
-rw-r--r--arch/arm/mach-orion/ts209-setup.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-orion/ts209-setup.c b/arch/arm/mach-orion/ts209-setup.c
index 306dbcd1e37b..b8cfe6813e9d 100644
--- a/arch/arm/mach-orion/ts209-setup.c
+++ b/arch/arm/mach-orion/ts209-setup.c
@@ -192,9 +192,13 @@ static struct mv643xx_eth_platform_data qnap_ts209_eth_data = {
192/***************************************************************************** 192/*****************************************************************************
193 * RTC S35390A on I2C bus 193 * RTC S35390A on I2C bus
194 ****************************************************************************/ 194 ****************************************************************************/
195
196#define TS209_RTC_GPIO 3
197
195static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = { 198static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = {
196 .driver_name = "rtc-s35390a", 199 .driver_name = "rtc-s35390a",
197 .addr = 0x30, 200 .addr = 0x30,
201 .irq = 0,
198}; 202};
199 203
200/**************************************************************************** 204/****************************************************************************
@@ -328,7 +332,18 @@ static void __init qnap_ts209_init(void)
328 332
329 platform_add_devices(qnap_ts209_devices, 333 platform_add_devices(qnap_ts209_devices,
330 ARRAY_SIZE(qnap_ts209_devices)); 334 ARRAY_SIZE(qnap_ts209_devices));
335
336 /* Get RTC IRQ and register the chip */
337 if (gpio_request(TS209_RTC_GPIO, "rtc") == 0) {
338 if (gpio_direction_input(TS209_RTC_GPIO) == 0)
339 qnap_ts209_i2c_rtc.irq = gpio_to_irq(TS209_RTC_GPIO);
340 else
341 gpio_free(TS209_RTC_GPIO);
342 }
343 if (qnap_ts209_i2c_rtc.irq == 0)
344 pr_warning("qnap_ts209_init: failed to get RTC IRQ\n");
331 i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1); 345 i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
346
332 orion_eth_init(&qnap_ts209_eth_data); 347 orion_eth_init(&qnap_ts209_eth_data);
333 orion_sata_init(&qnap_ts209_sata_data); 348 orion_sata_init(&qnap_ts209_sata_data);
334} 349}