diff options
-rw-r--r-- | arch/arm/mach-mx2/pcm970-baseboard.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-pcm037.c | 6 | ||||
-rw-r--r-- | drivers/net/can/sja1000/sja1000_platform.c | 3 | ||||
-rw-r--r-- | include/linux/can/platform/sja1000.h | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/mach-mx2/pcm970-baseboard.c b/arch/arm/mach-mx2/pcm970-baseboard.c index 4aafd5b8b85b..f490a406d57e 100644 --- a/arch/arm/mach-mx2/pcm970-baseboard.c +++ b/arch/arm/mach-mx2/pcm970-baseboard.c | |||
@@ -201,9 +201,9 @@ static struct resource pcm970_sja1000_resources[] = { | |||
201 | }; | 201 | }; |
202 | 202 | ||
203 | struct sja1000_platform_data pcm970_sja1000_platform_data = { | 203 | struct sja1000_platform_data pcm970_sja1000_platform_data = { |
204 | .clock = 16000000 / 2, | 204 | .osc_freq = 16000000, |
205 | .ocr = 0x40 | 0x18, | 205 | .ocr = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL, |
206 | .cdr = 0x40, | 206 | .cdr = CDR_CBP, |
207 | }; | 207 | }; |
208 | 208 | ||
209 | static struct platform_device pcm970_sja1000 = { | 209 | static struct platform_device pcm970_sja1000 = { |
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index 2df1ec55a97e..78ecd751549b 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -530,9 +530,9 @@ static struct resource pcm970_sja1000_resources[] = { | |||
530 | }; | 530 | }; |
531 | 531 | ||
532 | struct sja1000_platform_data pcm970_sja1000_platform_data = { | 532 | struct sja1000_platform_data pcm970_sja1000_platform_data = { |
533 | .clock = 16000000 / 2, | 533 | .osc_freq = 16000000, |
534 | .ocr = 0x40 | 0x18, | 534 | .ocr = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL, |
535 | .cdr = 0x40, | 535 | .cdr = CDR_CBP, |
536 | }; | 536 | }; |
537 | 537 | ||
538 | static struct platform_device pcm970_sja1000 = { | 538 | static struct platform_device pcm970_sja1000 = { |
diff --git a/drivers/net/can/sja1000/sja1000_platform.c b/drivers/net/can/sja1000/sja1000_platform.c index b65cabb361ab..d9fadc489b32 100644 --- a/drivers/net/can/sja1000/sja1000_platform.c +++ b/drivers/net/can/sja1000/sja1000_platform.c | |||
@@ -111,7 +111,8 @@ static int sp_probe(struct platform_device *pdev) | |||
111 | dev->irq = res_irq->start; | 111 | dev->irq = res_irq->start; |
112 | priv->irq_flags = res_irq->flags & (IRQF_TRIGGER_MASK | IRQF_SHARED); | 112 | priv->irq_flags = res_irq->flags & (IRQF_TRIGGER_MASK | IRQF_SHARED); |
113 | priv->reg_base = addr; | 113 | priv->reg_base = addr; |
114 | priv->can.clock.freq = pdata->clock; | 114 | /* The CAN clock frequency is half the oscillator clock frequency */ |
115 | priv->can.clock.freq = pdata->osc_freq / 2; | ||
115 | priv->ocr = pdata->ocr; | 116 | priv->ocr = pdata->ocr; |
116 | priv->cdr = pdata->cdr; | 117 | priv->cdr = pdata->cdr; |
117 | 118 | ||
diff --git a/include/linux/can/platform/sja1000.h b/include/linux/can/platform/sja1000.h index 01ee2aeb048d..96f8fcc78d78 100644 --- a/include/linux/can/platform/sja1000.h +++ b/include/linux/can/platform/sja1000.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #define OCR_TX_SHIFT 2 | 26 | #define OCR_TX_SHIFT 2 |
27 | 27 | ||
28 | struct sja1000_platform_data { | 28 | struct sja1000_platform_data { |
29 | u32 clock; /* CAN bus oscillator frequency in Hz */ | 29 | u32 osc_freq; /* CAN bus oscillator frequency in Hz */ |
30 | 30 | ||
31 | u8 ocr; /* output control register */ | 31 | u8 ocr; /* output control register */ |
32 | u8 cdr; /* clock divider register */ | 32 | u8 cdr; /* clock divider register */ |