diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-03-31 18:24:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:22 -0400 |
commit | 364fdbc00fbdd409ade63500710123fe323aa164 (patch) | |
tree | 0a2c4c85f5dd3b6e91ff5d68f419069178e5a9bb /arch/powerpc/sysdev/fsl_soc.h | |
parent | 34c8a20c6ee6af25ee35da9ca15ba81faacfc73d (diff) |
spi_mpc83xx: rework chip selects handling
The main purpose of this patch is to pass 'struct spi_device' to the chip
select handling routines. This is needed so that we could implement
full-fledged OpenFirmware support for this driver.
While at it, also:
- Replace two {de,activate}_cs routines by single cs_contol().
- Don't duplicate platform data callbacks in mpc83xx_spi struct.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.h')
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h index 9c744e4285a0..b5f3456780b8 100644 --- a/arch/powerpc/sysdev/fsl_soc.h +++ b/arch/powerpc/sysdev/fsl_soc.h | |||
@@ -4,6 +4,8 @@ | |||
4 | 4 | ||
5 | #include <asm/mmu.h> | 5 | #include <asm/mmu.h> |
6 | 6 | ||
7 | struct spi_device; | ||
8 | |||
7 | extern phys_addr_t get_immrbase(void); | 9 | extern phys_addr_t get_immrbase(void); |
8 | #if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx) | 10 | #if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx) |
9 | extern u32 get_brgfreq(void); | 11 | extern u32 get_brgfreq(void); |
@@ -19,8 +21,7 @@ struct device_node; | |||
19 | 21 | ||
20 | extern int fsl_spi_init(struct spi_board_info *board_infos, | 22 | extern int fsl_spi_init(struct spi_board_info *board_infos, |
21 | unsigned int num_board_infos, | 23 | unsigned int num_board_infos, |
22 | void (*activate_cs)(u8 cs, u8 polarity), | 24 | void (*cs_control)(struct spi_device *spi, bool on)); |
23 | void (*deactivate_cs)(u8 cs, u8 polarity)); | ||
24 | 25 | ||
25 | extern void fsl_rstcr_restart(char *cmd); | 26 | extern void fsl_rstcr_restart(char *cmd); |
26 | 27 | ||