From 873049ff64e943297c357f9a1c2c7781c1ebbb0e Mon Sep 17 00:00:00 2001 From: Byron Bradley Date: Sun, 10 Feb 2008 22:31:09 +0100 Subject: [PATCH] --- yaml --- r: 86046 b: refs/heads/master c: 59e8ce574445c5e7a65ec36f47a54803de704e96 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-orion/ts209-setup.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 86a1e120df96..de1556a3e1ea 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a0dd005d1d9f4c3beab52086f3844ef9342d1e67 +refs/heads/master: 59e8ce574445c5e7a65ec36f47a54803de704e96 diff --git a/trunk/arch/arm/mach-orion/ts209-setup.c b/trunk/arch/arm/mach-orion/ts209-setup.c index 306dbcd1e37b..b8cfe6813e9d 100644 --- a/trunk/arch/arm/mach-orion/ts209-setup.c +++ b/trunk/arch/arm/mach-orion/ts209-setup.c @@ -192,9 +192,13 @@ static struct mv643xx_eth_platform_data qnap_ts209_eth_data = { /***************************************************************************** * RTC S35390A on I2C bus ****************************************************************************/ + +#define TS209_RTC_GPIO 3 + static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = { .driver_name = "rtc-s35390a", .addr = 0x30, + .irq = 0, }; /**************************************************************************** @@ -328,7 +332,18 @@ static void __init qnap_ts209_init(void) platform_add_devices(qnap_ts209_devices, ARRAY_SIZE(qnap_ts209_devices)); + + /* Get RTC IRQ and register the chip */ + if (gpio_request(TS209_RTC_GPIO, "rtc") == 0) { + if (gpio_direction_input(TS209_RTC_GPIO) == 0) + qnap_ts209_i2c_rtc.irq = gpio_to_irq(TS209_RTC_GPIO); + else + gpio_free(TS209_RTC_GPIO); + } + if (qnap_ts209_i2c_rtc.irq == 0) + pr_warning("qnap_ts209_init: failed to get RTC IRQ\n"); i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1); + orion_eth_init(&qnap_ts209_eth_data); orion_sata_init(&qnap_ts209_sata_data); }