diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-23 12:22:16 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-24 13:27:32 -0500 |
commit | 8a327f23e23fa509e6e3c2263ae1cc0a67dec387 (patch) | |
tree | 119abf09e1ec9babaf78e6889187f9d54864b118 /arch/mips/ath79/dev-spi.c | |
parent | 5a9a8d1a99c617df82339456fbdd30d6ed3a856b (diff) | |
parent | d315777b32a4696feb86f2a0c9e9f39c94683649 (diff) |
Merge remote branch 'linus/master' into drm-intel-fixes
Merge with Linus to resolve conflicting fixes for the reusing the stale
HEAD value during intel_ring_wait().
Conflicts:
drivers/gpu/drm/i915/intel_ringbuffer.c
Diffstat (limited to 'arch/mips/ath79/dev-spi.c')
-rw-r--r-- | arch/mips/ath79/dev-spi.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/mips/ath79/dev-spi.c b/arch/mips/ath79/dev-spi.c new file mode 100644 index 000000000000..aa30163efbfd --- /dev/null +++ b/arch/mips/ath79/dev-spi.c | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X SPI controller device | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/platform_device.h> | ||
13 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
14 | #include "dev-spi.h" | ||
15 | |||
16 | static struct resource ath79_spi_resources[] = { | ||
17 | { | ||
18 | .start = AR71XX_SPI_BASE, | ||
19 | .end = AR71XX_SPI_BASE + AR71XX_SPI_SIZE - 1, | ||
20 | .flags = IORESOURCE_MEM, | ||
21 | }, | ||
22 | }; | ||
23 | |||
24 | static struct platform_device ath79_spi_device = { | ||
25 | .name = "ath79-spi", | ||
26 | .id = -1, | ||
27 | .resource = ath79_spi_resources, | ||
28 | .num_resources = ARRAY_SIZE(ath79_spi_resources), | ||
29 | }; | ||
30 | |||
31 | void __init ath79_register_spi(struct ath79_spi_platform_data *pdata, | ||
32 | struct spi_board_info const *info, | ||
33 | unsigned n) | ||
34 | { | ||
35 | spi_register_board_info(info, n); | ||
36 | ath79_spi_device.dev.platform_data = pdata; | ||
37 | platform_device_register(&ath79_spi_device); | ||
38 | } | ||