aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-05-17 09:06:31 -0400
committerArnd Bergmann <arnd@arndb.de>2016-05-17 09:06:31 -0400
commit2e629ebc24d463ffb6c17b15daf908e6f968a1de (patch)
tree49c44ffee62d06955bff6c928b5d349078f3a12c
parent3b9d78a4f3886f84db0a58dc986fbabb937799c6 (diff)
parentff628a4dbdc4867ef9706b306fb1e8b1abbe8062 (diff)
Merge branches 'next/cleanup' and 'next/fixes-non-critical' into next/cleanups-fixes
This is a merge of the cleanup and fixes-non-critical branches for the 4.7 merge window. It seems more appropriate to send a single pull request for these than two separate ones, as both branches really contain both fixes and cleanups. * next/cleanup: ARM: debug: remove extraneous DEBUG_HI3716_UART option ARM: davinci: use IRQCHIP_DECLARE for cp_intc ARM: davinci: remove unused DA8XX_NUM_UARTS ARM: davinci: simplify call to of populate ARM: DaVinci USB: removed deprecated properties from MUSB config ARM: rockchip: Fix use of plain integer as NULL pointer ARM: realview: hide unused 'pmu_device' object soc: versatile: dynamically detect RealView HBI numbers * next/fixes-non-critical: ARM: dts: exynos: Add interrupt line to MAX8997 PMIC on exynos4210-trats ARM: dts: exynos: Fix regulator name to avoid forbidden character on exynos4210-trats ARM: dts: exynos: Add MFC memory banks for Peach boards ARM: OMAP2+: n900 needs MMC slot names for legacy user space ARM: OMAP2+: Add more functions to pwm pdata for ir-rx51 ARM: EXYNOS: Properly skip unitialized parent clock in power domain on ARM: OMAP2+: Simplify auxdata by using the generic match of/platform: Allow secondary compatible match in of_dev_lookup
-rw-r--r--arch/arm/boot/dts/exynos4210-trats.dts4
-rw-r--r--arch/arm/boot/dts/exynos5420-peach-pit.dts5
-rw-r--r--arch/arm/boot/dts/exynos5800-peach-pi.dts5
-rw-r--r--arch/arm/mach-exynos/pm_domains.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c35
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c57
-rw-r--r--drivers/of/platform.c28
-rw-r--r--include/linux/platform_data/media/ir-rx51.h1
-rw-r--r--include/linux/platform_data/pwm_omap_dmtimer.h21
9 files changed, 133 insertions, 25 deletions
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
index 1df2f0bc1d76..79d983036560 100644
--- a/arch/arm/boot/dts/exynos4210-trats.dts
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -298,6 +298,8 @@
298 compatible = "maxim,max8997-pmic"; 298 compatible = "maxim,max8997-pmic";
299 299
300 reg = <0x66>; 300 reg = <0x66>;
301 interrupt-parent = <&gpx0>;
302 interrupts = <7 0>;
301 303
302 max8997,pmic-buck1-uses-gpio-dvs; 304 max8997,pmic-buck1-uses-gpio-dvs;
303 max8997,pmic-buck2-uses-gpio-dvs; 305 max8997,pmic-buck2-uses-gpio-dvs;
@@ -359,7 +361,7 @@
359 }; 361 };
360 362
361 vusbdac_reg: LDO8 { 363 vusbdac_reg: LDO8 {
362 regulator-name = "VUSB/VDAC_3.3V_C210"; 364 regulator-name = "VUSB+VDAC_3.3V_C210";
363 regulator-min-microvolt = <3300000>; 365 regulator-min-microvolt = <3300000>;
364 regulator-max-microvolt = <3300000>; 366 regulator-max-microvolt = <3300000>;
365 }; 367 };
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 3981ddb25036..e036e6467a7b 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -696,6 +696,11 @@
696 status = "okay"; 696 status = "okay";
697}; 697};
698 698
699&mfc {
700 samsung,mfc-r = <0x43000000 0x800000>;
701 samsung,mfc-l = <0x51000000 0x800000>;
702};
703
699&mmc_0 { 704&mmc_0 {
700 status = "okay"; 705 status = "okay";
701 num-slots = <1>; 706 num-slots = <1>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index 6e9edc1610c4..f95992520a77 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -671,6 +671,11 @@
671 status = "okay"; 671 status = "okay";
672}; 672};
673 673
674&mfc {
675 samsung,mfc-r = <0x43000000 0x800000>;
676 samsung,mfc-l = <0x51000000 0x800000>;
677};
678
674&mmc_0 { 679&mmc_0 {
675 status = "okay"; 680 status = "okay";
676 num-slots = <1>; 681 num-slots = <1>;
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 7c21760f590f..875a2bab64f6 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -92,7 +92,7 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
92 if (IS_ERR(pd->clk[i])) 92 if (IS_ERR(pd->clk[i]))
93 break; 93 break;
94 94
95 if (IS_ERR(pd->clk[i])) 95 if (IS_ERR(pd->pclk[i]))
96 continue; /* Skip on first power up */ 96 continue; /* Skip on first power up */
97 if (clk_set_parent(pd->clk[i], pd->pclk[i])) 97 if (clk_set_parent(pd->clk[i], pd->pclk[i]))
98 pr_err("%s: error setting parent to clock%d\n", 98 pr_err("%s: error setting parent to clock%d\n",
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index da174c0d603b..9a7073949d1d 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -30,6 +30,8 @@
30#include <linux/platform_data/spi-omap2-mcspi.h> 30#include <linux/platform_data/spi-omap2-mcspi.h>
31#include <linux/platform_data/mtd-onenand-omap2.h> 31#include <linux/platform_data/mtd-onenand-omap2.h>
32 32
33#include <plat/dmtimer.h>
34
33#include <asm/system_info.h> 35#include <asm/system_info.h>
34 36
35#include "common.h" 37#include "common.h"
@@ -47,9 +49,8 @@
47 49
48#include <video/omap-panel-data.h> 50#include <video/omap-panel-data.h>
49 51
50#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE) 52#include <linux/platform_data/pwm_omap_dmtimer.h>
51#include <linux/platform_data/media/ir-rx51.h> 53#include <linux/platform_data/media/ir-rx51.h>
52#endif
53 54
54#include "mux.h" 55#include "mux.h"
55#include "omap-pm.h" 56#include "omap-pm.h"
@@ -1212,10 +1213,40 @@ static void __init rx51_init_tsc2005(void)
1212 gpio_to_irq(RX51_TSC2005_IRQ_GPIO); 1213 gpio_to_irq(RX51_TSC2005_IRQ_GPIO);
1213} 1214}
1214 1215
1216#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
1217static struct pwm_omap_dmtimer_pdata __maybe_unused pwm_dmtimer_pdata = {
1218 .request_by_node = omap_dm_timer_request_by_node,
1219 .request_specific = omap_dm_timer_request_specific,
1220 .request = omap_dm_timer_request,
1221 .set_source = omap_dm_timer_set_source,
1222 .get_irq = omap_dm_timer_get_irq,
1223 .set_int_enable = omap_dm_timer_set_int_enable,
1224 .set_int_disable = omap_dm_timer_set_int_disable,
1225 .free = omap_dm_timer_free,
1226 .enable = omap_dm_timer_enable,
1227 .disable = omap_dm_timer_disable,
1228 .get_fclk = omap_dm_timer_get_fclk,
1229 .start = omap_dm_timer_start,
1230 .stop = omap_dm_timer_stop,
1231 .set_load = omap_dm_timer_set_load,
1232 .set_match = omap_dm_timer_set_match,
1233 .set_pwm = omap_dm_timer_set_pwm,
1234 .set_prescaler = omap_dm_timer_set_prescaler,
1235 .read_counter = omap_dm_timer_read_counter,
1236 .write_counter = omap_dm_timer_write_counter,
1237 .read_status = omap_dm_timer_read_status,
1238 .write_status = omap_dm_timer_write_status,
1239};
1240#endif
1241
1215#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE) 1242#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE)
1216static struct lirc_rx51_platform_data rx51_lirc_data = { 1243static struct lirc_rx51_platform_data rx51_lirc_data = {
1217 .set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat, 1244 .set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat,
1218 .pwm_timer = 9, /* Use GPT 9 for CIR */ 1245 .pwm_timer = 9, /* Use GPT 9 for CIR */
1246#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
1247 .dmtimer = &pwm_dmtimer_pdata,
1248#endif
1249
1219}; 1250};
1220 1251
1221static struct platform_device rx51_lirc_device = { 1252static struct platform_device rx51_lirc_device = {
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index a935d28443da..6571ad959908 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -21,9 +21,11 @@
21#include <linux/regulator/fixed.h> 21#include <linux/regulator/fixed.h>
22 22
23#include <linux/platform_data/pinctrl-single.h> 23#include <linux/platform_data/pinctrl-single.h>
24#include <linux/platform_data/hsmmc-omap.h>
24#include <linux/platform_data/iommu-omap.h> 25#include <linux/platform_data/iommu-omap.h>
25#include <linux/platform_data/wkup_m3.h> 26#include <linux/platform_data/wkup_m3.h>
26#include <linux/platform_data/pwm_omap_dmtimer.h> 27#include <linux/platform_data/pwm_omap_dmtimer.h>
28#include <linux/platform_data/media/ir-rx51.h>
27#include <plat/dmtimer.h> 29#include <plat/dmtimer.h>
28 30
29#include "common.h" 31#include "common.h"
@@ -31,10 +33,13 @@
31#include "dss-common.h" 33#include "dss-common.h"
32#include "control.h" 34#include "control.h"
33#include "omap_device.h" 35#include "omap_device.h"
36#include "omap-pm.h"
34#include "omap-secure.h" 37#include "omap-secure.h"
35#include "soc.h" 38#include "soc.h"
36#include "hsmmc.h" 39#include "hsmmc.h"
37 40
41static struct omap_hsmmc_platform_data __maybe_unused mmc_pdata[2];
42
38struct pdata_init { 43struct pdata_init {
39 const char *compatible; 44 const char *compatible;
40 void (*fn)(void); 45 void (*fn)(void);
@@ -268,9 +273,13 @@ static struct platform_device omap3_rom_rng_device = {
268 }, 273 },
269}; 274};
270 275
276static struct platform_device rx51_lirc_device;
277
271static void __init nokia_n900_legacy_init(void) 278static void __init nokia_n900_legacy_init(void)
272{ 279{
273 hsmmc2_internal_input_clk(); 280 hsmmc2_internal_input_clk();
281 mmc_pdata[0].name = "external";
282 mmc_pdata[1].name = "internal";
274 283
275 if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { 284 if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
276 if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) { 285 if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
@@ -286,6 +295,8 @@ static void __init nokia_n900_legacy_init(void)
286 platform_device_register(&omap3_rom_rng_device); 295 platform_device_register(&omap3_rom_rng_device);
287 296
288 } 297 }
298
299 platform_device_register(&rx51_lirc_device);
289} 300}
290 301
291static void __init omap3_tao3530_legacy_init(void) 302static void __init omap3_tao3530_legacy_init(void)
@@ -453,8 +464,14 @@ void omap_auxdata_legacy_init(struct device *dev)
453 464
454/* Dual mode timer PWM callbacks platdata */ 465/* Dual mode timer PWM callbacks platdata */
455#if IS_ENABLED(CONFIG_OMAP_DM_TIMER) 466#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
456struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = { 467static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
457 .request_by_node = omap_dm_timer_request_by_node, 468 .request_by_node = omap_dm_timer_request_by_node,
469 .request_specific = omap_dm_timer_request_specific,
470 .request = omap_dm_timer_request,
471 .set_source = omap_dm_timer_set_source,
472 .get_irq = omap_dm_timer_get_irq,
473 .set_int_enable = omap_dm_timer_set_int_enable,
474 .set_int_disable = omap_dm_timer_set_int_disable,
458 .free = omap_dm_timer_free, 475 .free = omap_dm_timer_free,
459 .enable = omap_dm_timer_enable, 476 .enable = omap_dm_timer_enable,
460 .disable = omap_dm_timer_disable, 477 .disable = omap_dm_timer_disable,
@@ -465,10 +482,29 @@ struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
465 .set_match = omap_dm_timer_set_match, 482 .set_match = omap_dm_timer_set_match,
466 .set_pwm = omap_dm_timer_set_pwm, 483 .set_pwm = omap_dm_timer_set_pwm,
467 .set_prescaler = omap_dm_timer_set_prescaler, 484 .set_prescaler = omap_dm_timer_set_prescaler,
485 .read_counter = omap_dm_timer_read_counter,
468 .write_counter = omap_dm_timer_write_counter, 486 .write_counter = omap_dm_timer_write_counter,
487 .read_status = omap_dm_timer_read_status,
488 .write_status = omap_dm_timer_write_status,
469}; 489};
470#endif 490#endif
471 491
492static struct lirc_rx51_platform_data __maybe_unused rx51_lirc_data = {
493 .set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat,
494 .pwm_timer = 9, /* Use GPT 9 for CIR */
495#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
496 .dmtimer = &pwm_dmtimer_pdata,
497#endif
498};
499
500static struct platform_device __maybe_unused rx51_lirc_device = {
501 .name = "lirc_rx51",
502 .id = -1,
503 .dev = {
504 .platform_data = &rx51_lirc_data,
505 },
506};
507
472/* 508/*
473 * Few boards still need auxdata populated before we populate 509 * Few boards still need auxdata populated before we populate
474 * the dev entries in of_platform_populate(). 510 * the dev entries in of_platform_populate().
@@ -492,11 +528,10 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
492 OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data), 528 OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data),
493#endif 529#endif
494#ifdef CONFIG_ARCH_OMAP3 530#ifdef CONFIG_ARCH_OMAP3
495 OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata),
496 OF_DEV_AUXDATA("ti,omap3-padconf", 0x480025a0, "480025a0.pinmux", &pcs_pdata),
497 OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
498 OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu", 531 OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
499 &omap3_iommu_pdata), 532 &omap3_iommu_pdata),
533 OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x4809c000, "4809c000.mmc", &mmc_pdata[0]),
534 OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x480b4000, "480b4000.mmc", &mmc_pdata[1]),
500 /* Only on am3517 */ 535 /* Only on am3517 */
501 OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL), 536 OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
502 OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0", 537 OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0",
@@ -506,19 +541,7 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
506 OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3", 541 OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
507 &wkup_m3_data), 542 &wkup_m3_data),
508#endif 543#endif
509#ifdef CONFIG_ARCH_OMAP4
510 OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata),
511 OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata),
512#endif
513#ifdef CONFIG_SOC_OMAP5
514 OF_DEV_AUXDATA("ti,omap5-padconf", 0x4a002840, "4a002840.pinmux", &pcs_pdata),
515 OF_DEV_AUXDATA("ti,omap5-padconf", 0x4ae0c840, "4ae0c840.pinmux", &pcs_pdata),
516#endif
517#ifdef CONFIG_SOC_DRA7XX
518 OF_DEV_AUXDATA("ti,dra7-padconf", 0x4a003400, "4a003400.pinmux", &pcs_pdata),
519#endif
520#ifdef CONFIG_SOC_AM43XX 544#ifdef CONFIG_SOC_AM43XX
521 OF_DEV_AUXDATA("ti,am437-padconf", 0x44e10800, "44e10800.pinmux", &pcs_pdata),
522 OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3", 545 OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
523 &wkup_m3_data), 546 &wkup_m3_data),
524#endif 547#endif
@@ -531,6 +554,8 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
531 OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu", 554 OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu",
532 &omap4_iommu_pdata), 555 &omap4_iommu_pdata),
533#endif 556#endif
557 /* Common auxdata */
558 OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
534 { /* sentinel */ }, 559 { /* sentinel */ },
535}; 560};
536 561
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 8d103e4968be..16e8daffac06 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -297,19 +297,37 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
297static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *lookup, 297static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *lookup,
298 struct device_node *np) 298 struct device_node *np)
299{ 299{
300 const struct of_dev_auxdata *auxdata;
300 struct resource res; 301 struct resource res;
302 int compatible = 0;
301 303
302 if (!lookup) 304 if (!lookup)
303 return NULL; 305 return NULL;
304 306
305 for(; lookup->compatible != NULL; lookup++) { 307 auxdata = lookup;
306 if (!of_device_is_compatible(np, lookup->compatible)) 308 for (; auxdata->compatible; auxdata++) {
309 if (!of_device_is_compatible(np, auxdata->compatible))
307 continue; 310 continue;
311 compatible++;
308 if (!of_address_to_resource(np, 0, &res)) 312 if (!of_address_to_resource(np, 0, &res))
309 if (res.start != lookup->phys_addr) 313 if (res.start != auxdata->phys_addr)
310 continue; 314 continue;
311 pr_debug("%s: devname=%s\n", np->full_name, lookup->name); 315 pr_debug("%s: devname=%s\n", np->full_name, auxdata->name);
312 return lookup; 316 return auxdata;
317 }
318
319 if (!compatible)
320 return NULL;
321
322 /* Try compatible match if no phys_addr and name are specified */
323 auxdata = lookup;
324 for (; auxdata->compatible; auxdata++) {
325 if (!of_device_is_compatible(np, auxdata->compatible))
326 continue;
327 if (!auxdata->phys_addr && !auxdata->name) {
328 pr_debug("%s: compatible match\n", np->full_name);
329 return auxdata;
330 }
313 } 331 }
314 332
315 return NULL; 333 return NULL;
diff --git a/include/linux/platform_data/media/ir-rx51.h b/include/linux/platform_data/media/ir-rx51.h
index 104aa892f31b..3038120ca46e 100644
--- a/include/linux/platform_data/media/ir-rx51.h
+++ b/include/linux/platform_data/media/ir-rx51.h
@@ -5,6 +5,7 @@ struct lirc_rx51_platform_data {
5 int pwm_timer; 5 int pwm_timer;
6 6
7 int(*set_max_mpu_wakeup_lat)(struct device *dev, long t); 7 int(*set_max_mpu_wakeup_lat)(struct device *dev, long t);
8 struct pwm_omap_dmtimer_pdata *dmtimer;
8}; 9};
9 10
10#endif 11#endif
diff --git a/include/linux/platform_data/pwm_omap_dmtimer.h b/include/linux/platform_data/pwm_omap_dmtimer.h
index 59384217208f..e7d521e48855 100644
--- a/include/linux/platform_data/pwm_omap_dmtimer.h
+++ b/include/linux/platform_data/pwm_omap_dmtimer.h
@@ -35,6 +35,16 @@
35#ifndef __PWM_OMAP_DMTIMER_PDATA_H 35#ifndef __PWM_OMAP_DMTIMER_PDATA_H
36#define __PWM_OMAP_DMTIMER_PDATA_H 36#define __PWM_OMAP_DMTIMER_PDATA_H
37 37
38/* clock sources */
39#define PWM_OMAP_DMTIMER_SRC_SYS_CLK 0x00
40#define PWM_OMAP_DMTIMER_SRC_32_KHZ 0x01
41#define PWM_OMAP_DMTIMER_SRC_EXT_CLK 0x02
42
43/* timer interrupt enable bits */
44#define PWM_OMAP_DMTIMER_INT_CAPTURE (1 << 2)
45#define PWM_OMAP_DMTIMER_INT_OVERFLOW (1 << 1)
46#define PWM_OMAP_DMTIMER_INT_MATCH (1 << 0)
47
38/* trigger types */ 48/* trigger types */
39#define PWM_OMAP_DMTIMER_TRIGGER_NONE 0x00 49#define PWM_OMAP_DMTIMER_TRIGGER_NONE 0x00
40#define PWM_OMAP_DMTIMER_TRIGGER_OVERFLOW 0x01 50#define PWM_OMAP_DMTIMER_TRIGGER_OVERFLOW 0x01
@@ -45,15 +55,23 @@ typedef struct omap_dm_timer pwm_omap_dmtimer;
45 55
46struct pwm_omap_dmtimer_pdata { 56struct pwm_omap_dmtimer_pdata {
47 pwm_omap_dmtimer *(*request_by_node)(struct device_node *np); 57 pwm_omap_dmtimer *(*request_by_node)(struct device_node *np);
58 pwm_omap_dmtimer *(*request_specific)(int timer_id);
59 pwm_omap_dmtimer *(*request)(void);
60
48 int (*free)(pwm_omap_dmtimer *timer); 61 int (*free)(pwm_omap_dmtimer *timer);
49 62
50 void (*enable)(pwm_omap_dmtimer *timer); 63 void (*enable)(pwm_omap_dmtimer *timer);
51 void (*disable)(pwm_omap_dmtimer *timer); 64 void (*disable)(pwm_omap_dmtimer *timer);
52 65
66 int (*get_irq)(pwm_omap_dmtimer *timer);
67 int (*set_int_enable)(pwm_omap_dmtimer *timer, unsigned int value);
68 int (*set_int_disable)(pwm_omap_dmtimer *timer, u32 mask);
69
53 struct clk *(*get_fclk)(pwm_omap_dmtimer *timer); 70 struct clk *(*get_fclk)(pwm_omap_dmtimer *timer);
54 71
55 int (*start)(pwm_omap_dmtimer *timer); 72 int (*start)(pwm_omap_dmtimer *timer);
56 int (*stop)(pwm_omap_dmtimer *timer); 73 int (*stop)(pwm_omap_dmtimer *timer);
74 int (*set_source)(pwm_omap_dmtimer *timer, int source);
57 75
58 int (*set_load)(pwm_omap_dmtimer *timer, int autoreload, 76 int (*set_load)(pwm_omap_dmtimer *timer, int autoreload,
59 unsigned int value); 77 unsigned int value);
@@ -63,7 +81,10 @@ struct pwm_omap_dmtimer_pdata {
63 int toggle, int trigger); 81 int toggle, int trigger);
64 int (*set_prescaler)(pwm_omap_dmtimer *timer, int prescaler); 82 int (*set_prescaler)(pwm_omap_dmtimer *timer, int prescaler);
65 83
84 unsigned int (*read_counter)(pwm_omap_dmtimer *timer);
66 int (*write_counter)(pwm_omap_dmtimer *timer, unsigned int value); 85 int (*write_counter)(pwm_omap_dmtimer *timer, unsigned int value);
86 unsigned int (*read_status)(pwm_omap_dmtimer *timer);
87 int (*write_status)(pwm_omap_dmtimer *timer, unsigned int value);
67}; 88};
68 89
69#endif /* __PWM_OMAP_DMTIMER_PDATA_H */ 90#endif /* __PWM_OMAP_DMTIMER_PDATA_H */