summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/spi-imx31.c')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/spi-imx31.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c b/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c
index 98604d1eef..f905057372 100644
--- a/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c
@@ -58,7 +58,7 @@ static struct spi_module_descriptor
58 { 58 {
59 .base = (struct cspi_map *)CSPI1_BASE_ADDR, 59 .base = (struct cspi_map *)CSPI1_BASE_ADDR,
60 .cg = CG_CSPI1, 60 .cg = CG_CSPI1,
61 .ints = CSPI1, 61 .ints = INT_CSPI1,
62 .handler = CSPI1_HANDLER, 62 .handler = CSPI1_HANDLER,
63 }, 63 },
64#endif 64#endif
@@ -66,7 +66,7 @@ static struct spi_module_descriptor
66 { 66 {
67 .base = (struct cspi_map *)CSPI2_BASE_ADDR, 67 .base = (struct cspi_map *)CSPI2_BASE_ADDR,
68 .cg = CG_CSPI2, 68 .cg = CG_CSPI2,
69 .ints = CSPI2, 69 .ints = INT_CSPI2,
70 .handler = CSPI2_HANDLER, 70 .handler = CSPI2_HANDLER,
71 }, 71 },
72#endif 72#endif
@@ -74,7 +74,7 @@ static struct spi_module_descriptor
74 { 74 {
75 .base = (struct cspi_map *)CSPI3_BASE_ADDR, 75 .base = (struct cspi_map *)CSPI3_BASE_ADDR,
76 .cg = CG_CSPI3, 76 .cg = CG_CSPI3,
77 .ints = CSPI3, 77 .ints = INT_CSPI3,
78 .handler = CSPI3_HANDLER, 78 .handler = CSPI3_HANDLER,
79 }, 79 },
80#endif 80#endif
@@ -267,12 +267,13 @@ void spi_enable_module(struct spi_node *node)
267 struct cspi_map * const base = desc->base; 267 struct cspi_map * const base = desc->base;
268 268
269 /* Enable clock-gating register */ 269 /* Enable clock-gating register */
270 imx31_clkctl_module_clock_gating(desc->cg, CGM_ON_ALL); 270 ccm_module_clock_gating(desc->cg, CGM_ON_RUN_WAIT);
271 /* Reset */ 271 /* Reset */
272 spi_reset(base); 272 spi_reset(base);
273 desc->last = NULL; 273 desc->last = NULL;
274 /* Enable interrupt at controller level */ 274 /* Enable interrupt at controller level */
275 avic_enable_int(desc->ints, IRQ, 6, desc->handler); 275 avic_enable_int(desc->ints, INT_TYPE_IRQ, INT_PRIO_DEFAULT,
276 desc->handler);
276 } 277 }
277 278
278 mutex_unlock(&desc->m); 279 mutex_unlock(&desc->m);
@@ -297,7 +298,7 @@ void spi_disable_module(struct spi_node *node)
297 base->conreg &= ~CSPI_CONREG_EN; 298 base->conreg &= ~CSPI_CONREG_EN;
298 299
299 /* Disable interface clock */ 300 /* Disable interface clock */
300 imx31_clkctl_module_clock_gating(desc->cg, CGM_OFF); 301 ccm_module_clock_gating(desc->cg, CGM_OFF);
301 } 302 }
302 303
303 mutex_unlock(&desc->m); 304 mutex_unlock(&desc->m);