-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 187374 b: refs/heads/master c: 398cccc h: refs/heads/master v: v3
- Loading branch information
Jassi Brar
authored and
Ben Dooks
committed
Jan 18, 2010
1 parent
1dcf02b
commit c9aca2b
Showing
3 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 87315a802a8aab9d986858fcf2230726c1b5c598 | ||
refs/heads/master: 398ccccb770e6ed3e138925404f0746cbe57c5a1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* linux/arch/arm/plat-s3c64xx/include/plat/spi-clocks.h | ||
* | ||
* Copyright (C) 2009 Samsung Electronics Ltd. | ||
* Jaswinder Singh <jassi.brar@samsung.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __S3C64XX_PLAT_SPI_CLKS_H | ||
#define __S3C64XX_PLAT_SPI_CLKS_H __FILE__ | ||
|
||
#define S3C64XX_SPI_SRCCLK_PCLK 0 | ||
#define S3C64XX_SPI_SRCCLK_SPIBUS 1 | ||
#define S3C64XX_SPI_SRCCLK_48M 2 | ||
|
||
#endif /* __S3C64XX_PLAT_SPI_CLKS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* linux/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | ||
* | ||
* Copyright (C) 2009 Samsung Electronics Ltd. | ||
* Jaswinder Singh <jassi.brar@samsung.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __S3C64XX_PLAT_SPI_H | ||
#define __S3C64XX_PLAT_SPI_H | ||
|
||
/** | ||
* struct s3c64xx_spi_csinfo - ChipSelect description | ||
* @fb_delay: Slave specific feedback delay. | ||
* Refer to FB_CLK_SEL register definition in SPI chapter. | ||
* @line: Custom 'identity' of the CS line. | ||
* @set_level: CS line control. | ||
* | ||
* This is per SPI-Slave Chipselect information. | ||
* Allocate and initialize one in machine init code and make the | ||
* spi_board_info.controller_data point to it. | ||
*/ | ||
struct s3c64xx_spi_csinfo { | ||
u8 fb_delay; | ||
unsigned line; | ||
void (*set_level)(unsigned line_id, int lvl); | ||
}; | ||
|
||
/** | ||
* struct s3c64xx_spi_info - SPI Controller defining structure | ||
* @src_clk_nr: Clock source index for the CLK_CFG[SPI_CLKSEL] field. | ||
* @src_clk_name: Platform name of the corresponding clock. | ||
* @num_cs: Number of CS this controller emulates. | ||
* @cfg_gpio: Configure pins for this SPI controller. | ||
* @fifo_lvl_mask: All tx fifo_lvl fields start at offset-6 | ||
* @rx_lvl_offset: Depends on tx fifo_lvl field and bus number | ||
* @high_speed: If the controller supports HIGH_SPEED_EN bit | ||
*/ | ||
struct s3c64xx_spi_info { | ||
int src_clk_nr; | ||
char *src_clk_name; | ||
|
||
int num_cs; | ||
|
||
int (*cfg_gpio)(struct platform_device *pdev); | ||
|
||
/* Following two fields are for future compatibility */ | ||
int fifo_lvl_mask; | ||
int rx_lvl_offset; | ||
int high_speed; | ||
}; | ||
|
||
/** | ||
* s3c64xx_spi_set_info - SPI Controller configure callback by the board | ||
* initialization code. | ||
* @cntrlr: SPI controller number the configuration is for. | ||
* @src_clk_nr: Clock the SPI controller is to use to generate SPI clocks. | ||
* @num_cs: Number of elements in the 'cs' array. | ||
* | ||
* Call this from machine init code for each SPI Controller that | ||
* has some chips attached to it. | ||
*/ | ||
extern void s3c64xx_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | ||
|
||
#endif /* __S3C64XX_PLAT_SPI_H */ |