Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166242
b: refs/heads/master
c: 58a587d
h: refs/heads/master
v: v3
  • Loading branch information
Marc Kleine-Budde authored and David S. Miller committed Sep 22, 2009
1 parent 6221124 commit c1d84d9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec4756238239f1a331d9fb95bad8b281dad56855
refs/heads/master: 58a587dc2abd436a6a8d0de729d9ed7e40ce0ac9
36 changes: 36 additions & 0 deletions trunk/arch/arm/mach-at91/at91sam9263_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,42 @@ void __init at91_add_device_ac97(struct atmel_ac97_data *data)
void __init at91_add_device_ac97(struct atmel_ac97_data *data) {}
#endif

/* --------------------------------------------------------------------
* CAN Controller
* -------------------------------------------------------------------- */

#if defined(CONFIG_CAN_AT91) || defined(CONFIG_CAN_AT91_MODULE)
static struct resource can_resources[] = {
[0] = {
.start = AT91SAM9263_BASE_CAN,
.end = AT91SAM9263_BASE_CAN + SZ_16K - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = AT91SAM9263_ID_CAN,
.end = AT91SAM9263_ID_CAN,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device at91sam9263_can_device = {
.name = "at91_can",
.id = -1,
.resource = can_resources,
.num_resources = ARRAY_SIZE(can_resources),
};

void __init at91_add_device_can(struct at91_can_data *data)
{
at91_set_A_periph(AT91_PIN_PA13, 0); /* CANTX */
at91_set_A_periph(AT91_PIN_PA14, 0); /* CANRX */
at91sam9263_can_device.dev.platform_data = data;

platform_device_register(&at91sam9263_can_device);
}
#else
void __init at91_add_device_can(struct at91_can_data *data) {}
#endif

/* --------------------------------------------------------------------
* LCD Controller
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/arm/mach-at91/include/mach/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ extern void __init at91_add_device_isi(void);
/* Touchscreen Controller */
extern void __init at91_add_device_tsadcc(void);

/* CAN */
struct at91_can_data {
void (*transceiver_switch)(int on);
};
extern void __init at91_add_device_can(struct at91_can_data *data);

/* LEDs */
extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
Expand Down

0 comments on commit c1d84d9

Please sign in to comment.