bcm63xx: add 3.9 support
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.9 / 015-spi-bcm63xx-remove-unused-speed_hz-member-variable.patch
1 From 5ff6b05a18295fa7e03de0fdf32d681a90b69df5 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Sat, 30 Mar 2013 10:26:55 +0100
4 Subject: [PATCH] spi/bcm63xx: remove unused speed_hz member variable
5
6 speed_hz is a write only member, so we can safely remove it and its
7 generation. Also fixes the missing clk_put after getting the periph
8 clock.
9
10 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
11 ---
12 arch/mips/bcm63xx/dev-spi.c | 11 -----------
13 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h | 1 -
14 drivers/spi/spi-bcm63xx.c | 2 --
15 3 files changed, 14 deletions(-)
16
17 --- a/arch/mips/bcm63xx/dev-spi.c
18 +++ b/arch/mips/bcm63xx/dev-spi.c
19 @@ -85,20 +85,9 @@ static struct platform_device bcm63xx_sp
20
21 int __init bcm63xx_spi_register(void)
22 {
23 - struct clk *periph_clk;
24 -
25 if (BCMCPU_IS_6328() || BCMCPU_IS_6345())
26 return -ENODEV;
27
28 - periph_clk = clk_get(NULL, "periph");
29 - if (IS_ERR(periph_clk)) {
30 - pr_err("unable to get periph clock\n");
31 - return -ENODEV;
32 - }
33 -
34 - /* Set bus frequency */
35 - spi_pdata.speed_hz = clk_get_rate(periph_clk);
36 -
37 spi_resources[0].start = bcm63xx_regset_address(RSET_SPI);
38 spi_resources[0].end = spi_resources[0].start;
39 spi_resources[1].start = bcm63xx_get_irq_number(IRQ_SPI);
40 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h
41 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h
42 @@ -13,7 +13,6 @@ struct bcm63xx_spi_pdata {
43 unsigned int msg_ctl_width;
44 int bus_num;
45 int num_chipselect;
46 - u32 speed_hz;
47 };
48
49 enum bcm63xx_regs_spi {
50 --- a/drivers/spi/spi-bcm63xx.c
51 +++ b/drivers/spi/spi-bcm63xx.c
52 @@ -46,7 +46,6 @@ struct bcm63xx_spi {
53 int irq;
54
55 /* Platform data */
56 - u32 speed_hz;
57 unsigned fifo_size;
58 unsigned int msg_type_shift;
59 unsigned int msg_ctl_width;
60 @@ -436,7 +435,6 @@ static int bcm63xx_spi_probe(struct plat
61 master->unprepare_transfer_hardware = bcm63xx_spi_unprepare_transfer;
62 master->transfer_one_message = bcm63xx_spi_transfer_one;
63 master->mode_bits = MODEBITS;
64 - bs->speed_hz = pdata->speed_hz;
65 bs->msg_type_shift = pdata->msg_type_shift;
66 bs->msg_ctl_width = pdata->msg_ctl_width;
67 bs->tx_io = (u8 *)(bs->regs + bcm63xx_spireg(SPI_MSG_DATA));