diff options
author | Olof Johansson <olof@lixom.net> | 2017-06-18 23:46:30 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2017-06-18 23:46:30 -0400 |
commit | 2b1ee3061f09bd90a5c659b9cb45fcbf49c5fd4c (patch) | |
tree | 37fc6c42bc227468e0c60869fd60e59685726135 /arch/arm/mach-omap2/mcbsp.c | |
parent | 6198c74939c085fbd31fab3ba6f1eb2ce2820b39 (diff) | |
parent | 1df5eaa6bced2d8a9de305d4a5f587adf57ddf35 (diff) |
Merge tag 'omap-for-v4.13/soc-v4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
SoC changes for omap variants for v4.13 merge window:
- PM clean-up in preparation of adding am335x/am437x PM support
- Fixes for issues found by Coccinelle
- Legacy code removal now that everything boots in device
tree only mode
- Interconnect changes in preparation of moving clkctrl clocks
to be managed by clkctrl clock driver
- Interconnect changes to add omap4 crypto acceclerator
support
* tag 'omap-for-v4.13/soc-v4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (27 commits)
ARM: OMAP4: hwmod_data: add SHAM crypto accelerator
ARM: OMAP4: hwmod data: add des
ARM: OMAP4: hwmod data: add aes2
ARM: OMAP4: hwmod data: add aes1
ARM: OMAP2+: Remove unused legacy code for n8x0
ARM: OMAP2+: Remove unused legacy code for watchdog
ARM: OMAP2+: Remove unused legacy code for interconnects
ARM: OMAP2+: Remove unused legacy code for PRM
ARM: OMAP2+: Remove unused legacy code for io.c
ARM: OMAP2+: Remove unused legacy code for McBSP
ARM: OMAP2+: SmartReflex: Delete an error message for a failed memory allocation in two functions
ARM: OMAP2+: Use kcalloc() in sr_set_nvalues()
ARM: OMAP2+: Improve a size determination in sr_dev_init()
ARM: OMAP2+: Delete an error message for a failed memory allocation in two functions
ARM: OMAP2+: Remove unused legacy code for device init
ARM: OMAP2+: Remove unused legacy code for PMU
ARM: OMAP2+: Remove unused legacy code for opp
ARM: OMAP2+: hwmod: populate clkctrl clocks for hwmods if available
ARM: OMAP4: cminst: add support for clkdm_xlate_address
ARM: omap2+: clockdomain: add clkdm_xlate_address
...
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-omap2/mcbsp.c')
-rw-r--r-- | arch/arm/mach-omap2/mcbsp.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index fc04be74e064..4acc0dae27e0 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -53,73 +53,3 @@ void __init omap3_mcbsp_init_pdata_callback( | |||
53 | 53 | ||
54 | pdata->force_ick_on = omap3_mcbsp_force_ick_on; | 54 | pdata->force_ick_on = omap3_mcbsp_force_ick_on; |
55 | } | 55 | } |
56 | |||
57 | static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused) | ||
58 | { | ||
59 | int id, count = 1; | ||
60 | char *name = "omap-mcbsp"; | ||
61 | struct omap_hwmod *oh_device[2]; | ||
62 | struct omap_mcbsp_platform_data *pdata = NULL; | ||
63 | struct platform_device *pdev; | ||
64 | |||
65 | sscanf(oh->name, "mcbsp%d", &id); | ||
66 | |||
67 | pdata = kzalloc(sizeof(struct omap_mcbsp_platform_data), GFP_KERNEL); | ||
68 | if (!pdata) { | ||
69 | pr_err("%s: No memory for mcbsp\n", __func__); | ||
70 | return -ENOMEM; | ||
71 | } | ||
72 | |||
73 | pdata->reg_step = 4; | ||
74 | if (oh->class->rev < MCBSP_CONFIG_TYPE2) { | ||
75 | pdata->reg_size = 2; | ||
76 | } else { | ||
77 | pdata->reg_size = 4; | ||
78 | pdata->has_ccr = true; | ||
79 | } | ||
80 | |||
81 | if (oh->class->rev == MCBSP_CONFIG_TYPE2) { | ||
82 | /* The FIFO has 128 locations */ | ||
83 | pdata->buffer_size = 0x80; | ||
84 | } else if (oh->class->rev == MCBSP_CONFIG_TYPE3) { | ||
85 | if (id == 2) | ||
86 | /* The FIFO has 1024 + 256 locations */ | ||
87 | pdata->buffer_size = 0x500; | ||
88 | else | ||
89 | /* The FIFO has 128 locations */ | ||
90 | pdata->buffer_size = 0x80; | ||
91 | } else if (oh->class->rev == MCBSP_CONFIG_TYPE4) { | ||
92 | /* The FIFO has 128 locations for all instances */ | ||
93 | pdata->buffer_size = 0x80; | ||
94 | } | ||
95 | |||
96 | if (oh->class->rev >= MCBSP_CONFIG_TYPE3) | ||
97 | pdata->has_wakeup = true; | ||
98 | |||
99 | oh_device[0] = oh; | ||
100 | |||
101 | if (oh->dev_attr) { | ||
102 | oh_device[1] = omap_hwmod_lookup(( | ||
103 | (struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone); | ||
104 | pdata->force_ick_on = omap3_mcbsp_force_ick_on; | ||
105 | count++; | ||
106 | } | ||
107 | pdev = omap_device_build_ss(name, id, oh_device, count, pdata, | ||
108 | sizeof(*pdata)); | ||
109 | kfree(pdata); | ||
110 | if (IS_ERR(pdev)) { | ||
111 | pr_err("%s: Can't build omap_device for %s:%s.\n", __func__, | ||
112 | name, oh->name); | ||
113 | return PTR_ERR(pdev); | ||
114 | } | ||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | static int __init omap2_mcbsp_init(void) | ||
119 | { | ||
120 | if (!of_have_populated_dt()) | ||
121 | omap_hwmod_for_each_by_class("mcbsp", omap_init_mcbsp, NULL); | ||
122 | |||
123 | return 0; | ||
124 | } | ||
125 | omap_arch_initcall(omap2_mcbsp_init); | ||