#include <linux/clk.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
-#include <linux/i2c/twl4030-rtc.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
},
};
-static int twl4030_rtc_init(void)
+static int __init msecure_init(void)
{
int ret = 0;
- ret = omap_request_gpio(TWL4030_MSECURE_GPIO);
+#ifdef CONFIG_RTC_DRV_TWL4030
+ ret = gpio_request(TWL4030_MSECURE_GPIO, "msecure");
if (ret < 0) {
- printk(KERN_ERR "twl4030_rtc_init: can't reserve GPIO:%d !\n",
+ printk(KERN_ERR "msecure_init: can't reserve GPIO:%d !\n",
TWL4030_MSECURE_GPIO);
goto out;
}
* Make msecure line high in order to change the TWL4030 RTC time
* and calender registers.
*/
- omap_set_gpio_direction(TWL4030_MSECURE_GPIO, 0); /*dir out */
- omap_set_gpio_dataout(TWL4030_MSECURE_GPIO, 1);
+ gpio_direction_output(TWL4030_MSECURE_GPIO, 1);
out:
- return ret;
-}
+#endif
-static void twl4030_rtc_exit(void)
-{
- omap_free_gpio(TWL4030_MSECURE_GPIO);
+ return ret;
}
-static struct twl4030rtc_platform_data sdp2430_twl4030rtc_data = {
- .init = &twl4030_rtc_init,
- .exit = &twl4030_rtc_exit,
-};
-
-static struct platform_device sdp2430_twl4030rtc_device = {
- .name = "twl4030_rtc",
- .id = -1,
- .dev = {
- .platform_data = &sdp2430_twl4030rtc_data,
- },
-};
-
static struct platform_device *sdp2430_devices[] __initdata = {
&sdp2430_smc91x_device,
&sdp2430_flash_device,
&sdp2430_kp_device,
&sdp2430_lcd_device,
- &sdp2430_twl4030rtc_device,
};
static void ads7846_dev_init(void)
omap_board_config_size = ARRAY_SIZE(sdp2430_config);
omap_serial_init();
+ msecure_init();
+
sdp2430_flash_init();
usb_musb_init();