Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195267
b: refs/heads/master
c: 56e6943
h: refs/heads/master
i:
  195265: 7234e46
  195263: 212813a
v: v3
  • Loading branch information
Wolfgang Grandegger authored and David S. Miller committed May 18, 2010
1 parent 711e80e commit 9875d67
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d19d56ddc88e7895429ef118db9c83c7bbe3ce6a
refs/heads/master: 56e6943b902562e09d3e74126d8d8256b5ea17fb
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-mx2/pcm970-baseboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ static struct resource pcm970_sja1000_resources[] = {
};

struct sja1000_platform_data pcm970_sja1000_platform_data = {
.clock = 16000000 / 2,
.ocr = 0x40 | 0x18,
.cdr = 0x40,
.osc_freq = 16000000,
.ocr = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL,
.cdr = CDR_CBP,
};

static struct platform_device pcm970_sja1000 = {
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-mx3/mach-pcm037.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,9 @@ static struct resource pcm970_sja1000_resources[] = {
};

struct sja1000_platform_data pcm970_sja1000_platform_data = {
.clock = 16000000 / 2,
.ocr = 0x40 | 0x18,
.cdr = 0x40,
.osc_freq = 16000000,
.ocr = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL,
.cdr = CDR_CBP,
};

static struct platform_device pcm970_sja1000 = {
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/can/sja1000/sja1000_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ static int sp_probe(struct platform_device *pdev)
dev->irq = res_irq->start;
priv->irq_flags = res_irq->flags & (IRQF_TRIGGER_MASK | IRQF_SHARED);
priv->reg_base = addr;
priv->can.clock.freq = pdata->clock;
/* The CAN clock frequency is half the oscillator clock frequency */
priv->can.clock.freq = pdata->osc_freq / 2;
priv->ocr = pdata->ocr;
priv->cdr = pdata->cdr;

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/can/platform/sja1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define OCR_TX_SHIFT 2

struct sja1000_platform_data {
u32 clock; /* CAN bus oscillator frequency in Hz */
u32 osc_freq; /* CAN bus oscillator frequency in Hz */

u8 ocr; /* output control register */
u8 cdr; /* clock divider register */
Expand Down

0 comments on commit 9875d67

Please sign in to comment.