Merge branch 'davinci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci

* 'davinci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci:
  DaVinci: DM365: Add the device_enable for the DaVinci Keyscan
  davinci: enable ARCH_HAS_HOLES_MEMORYMODEL for DaVinci
  davinci: da8xx/omap-l1: mark RTC as a wakeup source
  davinci: cp_intc: provide set_wake function
  Davinci VPFE Capture: Take i2c adapter id through platform data
This commit is contained in:
Linus Torvalds 2010-01-06 10:46:27 -08:00
commit b1c0ec8966
7 changed files with 28 additions and 7 deletions

View File

@ -688,6 +688,7 @@ config ARCH_DAVINCI
select HAVE_IDE select HAVE_IDE
select COMMON_CLKDEV select COMMON_CLKDEV
select GENERIC_ALLOCATOR select GENERIC_ALLOCATOR
select ARCH_HAS_HOLES_MEMORYMODEL
help help
Support for TI's DaVinci platform. Support for TI's DaVinci platform.

View File

@ -236,6 +236,7 @@ static struct vpfe_subdev_info vpfe_sub_devs[] = {
static struct vpfe_config vpfe_cfg = { static struct vpfe_config vpfe_cfg = {
.num_subdevs = ARRAY_SIZE(vpfe_sub_devs), .num_subdevs = ARRAY_SIZE(vpfe_sub_devs),
.i2c_adapter_id = 1,
.sub_devs = vpfe_sub_devs, .sub_devs = vpfe_sub_devs,
.card_name = "DM355 EVM", .card_name = "DM355 EVM",
.ccdc = "DM355 CCDC", .ccdc = "DM355 CCDC",

View File

@ -192,7 +192,11 @@ static struct davinci_i2c_platform_data i2c_pdata = {
.bus_delay = 0 /* usec */, .bus_delay = 0 /* usec */,
}; };
#ifdef CONFIG_KEYBOARD_DAVINCI static int dm365evm_keyscan_enable(struct device *dev)
{
return davinci_cfg_reg(DM365_KEYSCAN);
}
static unsigned short dm365evm_keymap[] = { static unsigned short dm365evm_keymap[] = {
KEY_KP2, KEY_KP2,
KEY_LEFT, KEY_LEFT,
@ -214,6 +218,7 @@ static unsigned short dm365evm_keymap[] = {
}; };
static struct davinci_ks_platform_data dm365evm_ks_data = { static struct davinci_ks_platform_data dm365evm_ks_data = {
.device_enable = dm365evm_keyscan_enable,
.keymap = dm365evm_keymap, .keymap = dm365evm_keymap,
.keymapsize = ARRAY_SIZE(dm365evm_keymap), .keymapsize = ARRAY_SIZE(dm365evm_keymap),
.rep = 1, .rep = 1,
@ -222,7 +227,6 @@ static struct davinci_ks_platform_data dm365evm_ks_data = {
.interval = 0x2, .interval = 0x2,
.matrix_type = DAVINCI_KEYSCAN_MATRIX_4X4, .matrix_type = DAVINCI_KEYSCAN_MATRIX_4X4,
}; };
#endif
static int cpld_mmc_get_cd(int module) static int cpld_mmc_get_cd(int module)
{ {
@ -511,10 +515,7 @@ static __init void dm365_evm_init(void)
dm365_init_asp(&dm365_evm_snd_data); dm365_init_asp(&dm365_evm_snd_data);
dm365_init_rtc(); dm365_init_rtc();
#ifdef CONFIG_KEYBOARD_DAVINCI
dm365_init_ks(&dm365evm_ks_data); dm365_init_ks(&dm365evm_ks_data);
#endif
} }
static __init void dm365_evm_irq_init(void) static __init void dm365_evm_irq_init(void)

View File

@ -247,6 +247,7 @@ static struct vpfe_subdev_info vpfe_sub_devs[] = {
static struct vpfe_config vpfe_cfg = { static struct vpfe_config vpfe_cfg = {
.num_subdevs = ARRAY_SIZE(vpfe_sub_devs), .num_subdevs = ARRAY_SIZE(vpfe_sub_devs),
.i2c_adapter_id = 1,
.sub_devs = vpfe_sub_devs, .sub_devs = vpfe_sub_devs,
.card_name = "DM6446 EVM", .card_name = "DM6446 EVM",
.ccdc = "DM6446 CCDC", .ccdc = "DM6446 CCDC",

View File

@ -81,12 +81,23 @@ static int cp_intc_set_irq_type(unsigned int irq, unsigned int flow_type)
return 0; return 0;
} }
/*
* Faking this allows us to to work with suspend functions of
* generic drivers which call {enable|disable}_irq_wake for
* wake up interrupt sources (eg RTC on DA850).
*/
static int cp_intc_set_wake(unsigned int irq, unsigned int on)
{
return 0;
}
static struct irq_chip cp_intc_irq_chip = { static struct irq_chip cp_intc_irq_chip = {
.name = "cp_intc", .name = "cp_intc",
.ack = cp_intc_ack_irq, .ack = cp_intc_ack_irq,
.mask = cp_intc_mask_irq, .mask = cp_intc_mask_irq,
.unmask = cp_intc_unmask_irq, .unmask = cp_intc_unmask_irq,
.set_type = cp_intc_set_irq_type, .set_type = cp_intc_set_irq_type,
.set_wake = cp_intc_set_wake,
}; };
void __init cp_intc_init(void __iomem *base, unsigned short num_irq, void __init cp_intc_init(void __iomem *base, unsigned short num_irq,

View File

@ -481,11 +481,18 @@ static struct platform_device da8xx_rtc_device = {
int da8xx_register_rtc(void) int da8xx_register_rtc(void)
{ {
int ret;
/* Unlock the rtc's registers */ /* Unlock the rtc's registers */
__raw_writel(0x83e70b13, IO_ADDRESS(DA8XX_RTC_BASE + 0x6c)); __raw_writel(0x83e70b13, IO_ADDRESS(DA8XX_RTC_BASE + 0x6c));
__raw_writel(0x95a4f1e0, IO_ADDRESS(DA8XX_RTC_BASE + 0x70)); __raw_writel(0x95a4f1e0, IO_ADDRESS(DA8XX_RTC_BASE + 0x70));
return platform_device_register(&da8xx_rtc_device); ret = platform_device_register(&da8xx_rtc_device);
if (!ret)
/* Atleast on DA850, RTC is a wakeup source */
device_init_wakeup(&da8xx_rtc_device.dev, true);
return ret;
} }
static struct resource da8xx_cpuidle_resources[] = { static struct resource da8xx_cpuidle_resources[] = {

View File

@ -993,7 +993,6 @@ void __init dm365_init_asp(struct snd_platform_data *pdata)
void __init dm365_init_ks(struct davinci_ks_platform_data *pdata) void __init dm365_init_ks(struct davinci_ks_platform_data *pdata)
{ {
davinci_cfg_reg(DM365_KEYSCAN);
dm365_ks_device.dev.platform_data = pdata; dm365_ks_device.dev.platform_data = pdata;
platform_device_register(&dm365_ks_device); platform_device_register(&dm365_ks_device);
} }