]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/mips/bcm63xx/dev-spi.c
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[karo-tx-linux.git] / arch / mips / bcm63xx / dev-spi.c
index 2a43825f7f21a062b80beb4c16c0c29f376ef1f0..3065bb61820d5befea57f31580c91c15afcc666b 100644 (file)
@@ -37,7 +37,7 @@ static __init void bcm63xx_spi_regs_init(void)
 {
        if (BCMCPU_IS_6338() || BCMCPU_IS_6348())
                bcm63xx_regs_spi = bcm6348_regs_spi;
-       if (BCMCPU_IS_6358() || BCMCPU_IS_6368())
+       if (BCMCPU_IS_6358() || BCMCPU_IS_6362() || BCMCPU_IS_6368())
                bcm63xx_regs_spi = bcm6358_regs_spi;
 }
 #else
@@ -73,20 +73,9 @@ static struct platform_device bcm63xx_spi_device = {
 
 int __init bcm63xx_spi_register(void)
 {
-       struct clk *periph_clk;
-
        if (BCMCPU_IS_6328() || BCMCPU_IS_6345())
                return -ENODEV;
 
-       periph_clk = clk_get(NULL, "periph");
-       if (IS_ERR(periph_clk)) {
-               pr_err("unable to get periph clock\n");
-               return -ENODEV;
-       }
-
-       /* Set bus frequency */
-       spi_pdata.speed_hz = clk_get_rate(periph_clk);
-
        spi_resources[0].start = bcm63xx_regset_address(RSET_SPI);
        spi_resources[0].end = spi_resources[0].start;
        spi_resources[1].start = bcm63xx_get_irq_number(IRQ_SPI);
@@ -98,7 +87,7 @@ int __init bcm63xx_spi_register(void)
                spi_pdata.msg_ctl_width = SPI_6348_MSG_CTL_WIDTH;
        }
 
-       if (BCMCPU_IS_6358() || BCMCPU_IS_6368()) {
+       if (BCMCPU_IS_6358() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) {
                spi_resources[0].end += BCM_6358_RSET_SPI_SIZE - 1;
                spi_pdata.fifo_size = SPI_6358_MSG_DATA_SIZE;
                spi_pdata.msg_type_shift = SPI_6358_MSG_TYPE_SHIFT;