Skip to content

Commit

Permalink
spi: davinci: remove non-useful "clk_internal" platform data
Browse files Browse the repository at this point in the history
The "clk_internal" platform data member which contols the
CLKMOD bit in Global Control Register 1 is not useful
since CLKMOD needs be set to 1 *always* to ensure master
mode operation.

Remove this platform data.

Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com>
Tested-By: Michael Williamson <michael.williamson@criticallink.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
  • Loading branch information
Brian Niebuhr authored and Sekhar Nori committed Nov 18, 2010
1 parent 87467bd commit 3409e40
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
1 change: 0 additions & 1 deletion arch/arm/mach-davinci/dm355.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ static struct resource dm355_spi0_resources[] = {
static struct davinci_spi_platform_data dm355_spi0_pdata = {
.version = SPI_VERSION_1,
.num_chipselect = 2,
.clk_internal = 1,
.cshold_bug = true,
};
static struct platform_device dm355_spi0_device = {
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-davinci/dm365.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@ static u64 dm365_spi0_dma_mask = DMA_BIT_MASK(32);
static struct davinci_spi_platform_data dm365_spi0_pdata = {
.version = SPI_VERSION_1,
.num_chipselect = 2,
.clk_internal = 1,
};

static struct resource dm365_spi0_resources[] = {
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-davinci/include/mach/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ enum {
struct davinci_spi_platform_data {
u8 version;
u8 num_chipselect;
u8 clk_internal;
u8 intr_line;
u8 *chip_sel;
bool cshold_bug;
Expand Down
9 changes: 1 addition & 8 deletions drivers/spi/davinci_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,14 +927,6 @@ static int davinci_spi_probe(struct platform_device *pdev)
}
}

/* Clock internal */
if (davinci_spi->pdata->clk_internal)
set_io_bits(davinci_spi->base + SPIGCR1,
SPIGCR1_CLKMOD_MASK);
else
clear_io_bits(davinci_spi->base + SPIGCR1,
SPIGCR1_CLKMOD_MASK);

if (pdata->intr_line)
iowrite32(SPI_INTLVL_1, davinci_spi->base + SPILVL);
else
Expand All @@ -943,6 +935,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
iowrite32(CS_DEFAULT, davinci_spi->base + SPIDEF);

/* master mode default */
set_io_bits(davinci_spi->base + SPIGCR1, SPIGCR1_CLKMOD_MASK);
set_io_bits(davinci_spi->base + SPIGCR1, SPIGCR1_MASTER_MASK);

ret = spi_bitbang_start(&davinci_spi->bitbang);
Expand Down

0 comments on commit 3409e40

Please sign in to comment.