Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172456
b: refs/heads/master
c: 2097abc
h: refs/heads/master
v: v3
  • Loading branch information
Alberto Panizzo authored and Sascha Hauer committed Nov 14, 2009
1 parent 1db5017 commit 0aa8597
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9a6c5d0c8c3f7f4d4ed5c5b1514327d58b76df3
refs/heads/master: 2097abcb8c5a1ccd8c126f6680df28ff6b6b96d0
20 changes: 20 additions & 0 deletions trunk/arch/arm/mach-mx3/armadillo5x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <linux/io.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/i2c.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
Expand Down Expand Up @@ -104,6 +105,13 @@ static int armadillo5x0_pins[] = {
MX31_PIN_CSPI2_MISO__SDA,
};

/* RTC over I2C*/
#define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4)

static struct i2c_board_info armadillo5x0_i2c_rtc = {
I2C_BOARD_INFO("s35390a", 0x30),
};

/* GPIO BUTTONS */
static struct gpio_keys_button armadillo5x0_buttons[] = {
{
Expand Down Expand Up @@ -373,6 +381,18 @@ static void __init armadillo5x0_init(void)

/* set NAND page size to 2k if not configured via boot mode pins */
__raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR);

/* RTC */
/* Get RTC IRQ and register the chip */
if (gpio_request(ARMADILLO5X0_RTC_GPIO, "rtc") == 0) {
if (gpio_direction_input(ARMADILLO5X0_RTC_GPIO) == 0)
armadillo5x0_i2c_rtc.irq = gpio_to_irq(ARMADILLO5X0_RTC_GPIO);
else
gpio_free(ARMADILLO5X0_RTC_GPIO);
}
if (armadillo5x0_i2c_rtc.irq == 0)
pr_warning("armadillo5x0_init: failed to get RTC IRQ\n");
i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1);
}

static void __init armadillo5x0_timer_init(void)
Expand Down

0 comments on commit 0aa8597

Please sign in to comment.