diff options
author | Byron Bradley <byron.bbradley@gmail.com> | 2008-02-10 16:31:09 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-02-17 05:42:06 -0500 |
commit | 59e8ce574445c5e7a65ec36f47a54803de704e96 (patch) | |
tree | d322066c320f02fa4b969027d0ecff120aca9a53 /arch/arm/mach-orion/ts209-setup.c | |
parent | a0dd005d1d9f4c3beab52086f3844ef9342d1e67 (diff) |
[ARM] 4826/1: Orion: Register the RTC interrupt on the TS-209
The QNAP TS-209 has its RTC interrupt on GPIO 3. Setup this
as an interrupt and pass it to the i2c_board_info.
Signed-off-by: Byron Bradley <byron.bbradley@gmail.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-orion/ts209-setup.c')
-rw-r--r-- | arch/arm/mach-orion/ts209-setup.c | 15 |
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 | |||
195 | static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = { | 198 | static 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 | } |