diff options
Diffstat (limited to 'arch/arm/mach-omap2/pdata-quirks.c')
-rw-r--r-- | arch/arm/mach-omap2/pdata-quirks.c | 57 |
1 files changed, 41 insertions, 16 deletions
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 @@ #include <linux/regulator/fixed.h> #include <linux/platform_data/pinctrl-single.h> +#include <linux/platform_data/hsmmc-omap.h> #include <linux/platform_data/iommu-omap.h> #include <linux/platform_data/wkup_m3.h> #include <linux/platform_data/pwm_omap_dmtimer.h> +#include <linux/platform_data/media/ir-rx51.h> #include <plat/dmtimer.h> #include "common.h" @@ -31,10 +33,13 @@ #include "dss-common.h" #include "control.h" #include "omap_device.h" +#include "omap-pm.h" #include "omap-secure.h" #include "soc.h" #include "hsmmc.h" +static struct omap_hsmmc_platform_data __maybe_unused mmc_pdata[2]; + struct pdata_init { const char *compatible; void (*fn)(void); @@ -268,9 +273,13 @@ static struct platform_device omap3_rom_rng_device = { }, }; +static struct platform_device rx51_lirc_device; + static void __init nokia_n900_legacy_init(void) { hsmmc2_internal_input_clk(); + mmc_pdata[0].name = "external"; + mmc_pdata[1].name = "internal"; if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) { @@ -286,6 +295,8 @@ static void __init nokia_n900_legacy_init(void) platform_device_register(&omap3_rom_rng_device); } + + platform_device_register(&rx51_lirc_device); } static void __init omap3_tao3530_legacy_init(void) @@ -453,8 +464,14 @@ void omap_auxdata_legacy_init(struct device *dev) /* Dual mode timer PWM callbacks platdata */ #if IS_ENABLED(CONFIG_OMAP_DM_TIMER) -struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = { +static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = { .request_by_node = omap_dm_timer_request_by_node, + .request_specific = omap_dm_timer_request_specific, + .request = omap_dm_timer_request, + .set_source = omap_dm_timer_set_source, + .get_irq = omap_dm_timer_get_irq, + .set_int_enable = omap_dm_timer_set_int_enable, + .set_int_disable = omap_dm_timer_set_int_disable, .free = omap_dm_timer_free, .enable = omap_dm_timer_enable, .disable = omap_dm_timer_disable, @@ -465,10 +482,29 @@ struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = { .set_match = omap_dm_timer_set_match, .set_pwm = omap_dm_timer_set_pwm, .set_prescaler = omap_dm_timer_set_prescaler, + .read_counter = omap_dm_timer_read_counter, .write_counter = omap_dm_timer_write_counter, + .read_status = omap_dm_timer_read_status, + .write_status = omap_dm_timer_write_status, }; #endif +static struct lirc_rx51_platform_data __maybe_unused rx51_lirc_data = { + .set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat, + .pwm_timer = 9, /* Use GPT 9 for CIR */ +#if IS_ENABLED(CONFIG_OMAP_DM_TIMER) + .dmtimer = &pwm_dmtimer_pdata, +#endif +}; + +static struct platform_device __maybe_unused rx51_lirc_device = { + .name = "lirc_rx51", + .id = -1, + .dev = { + .platform_data = &rx51_lirc_data, + }, +}; + /* * Few boards still need auxdata populated before we populate * the dev entries in of_platform_populate(). @@ -492,11 +528,10 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data), #endif #ifdef CONFIG_ARCH_OMAP3 - OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata), - OF_DEV_AUXDATA("ti,omap3-padconf", 0x480025a0, "480025a0.pinmux", &pcs_pdata), - OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata), OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu", &omap3_iommu_pdata), + OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x4809c000, "4809c000.mmc", &mmc_pdata[0]), + OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x480b4000, "480b4000.mmc", &mmc_pdata[1]), /* Only on am3517 */ OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL), OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0", @@ -506,19 +541,7 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3", &wkup_m3_data), #endif -#ifdef CONFIG_ARCH_OMAP4 - OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata), - OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata), -#endif -#ifdef CONFIG_SOC_OMAP5 - OF_DEV_AUXDATA("ti,omap5-padconf", 0x4a002840, "4a002840.pinmux", &pcs_pdata), - OF_DEV_AUXDATA("ti,omap5-padconf", 0x4ae0c840, "4ae0c840.pinmux", &pcs_pdata), -#endif -#ifdef CONFIG_SOC_DRA7XX - OF_DEV_AUXDATA("ti,dra7-padconf", 0x4a003400, "4a003400.pinmux", &pcs_pdata), -#endif #ifdef CONFIG_SOC_AM43XX - OF_DEV_AUXDATA("ti,am437-padconf", 0x44e10800, "44e10800.pinmux", &pcs_pdata), OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3", &wkup_m3_data), #endif @@ -531,6 +554,8 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu", &omap4_iommu_pdata), #endif + /* Common auxdata */ + OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata), { /* sentinel */ }, }; |