]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: omap_uwire: use arm_xor clock as functional clock
authorImre Deak <imre.deak@nokia.com>
Mon, 12 Jun 2006 17:20:27 +0000 (20:20 +0300)
committerJuha Yrjola <juha.yrjola@solidboot.com>
Mon, 12 Jun 2006 17:34:30 +0000 (20:34 +0300)
- the uwire module uses the arm_xor as functional clock, not the arm_per clock
- fix word size sanity check

Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
drivers/spi/omap_uwire.c

index cc26c0d8a7098f42e3a0cb440834f5ad999da97c..d47b3eeae0b445e8feefd7750420f7affcc04140 100644 (file)
@@ -335,9 +335,8 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
        if (!bits)
                bits = 8;
 
-       if (spi->bits_per_word > 16) {
-               pr_debug("%s: wordsize %d?\n", spi->dev.bus_id,
-                               spi->bits_per_word);
+       if (bits > 16) {
+               pr_debug("%s: wordsize %d?\n", spi->dev.bus_id, bits);
                status = -ENODEV;
                goto done;
        }
@@ -372,12 +371,12 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
                hz = t->speed_hz;
 
        if (!hz) {
-               pr_debug("%s: zero speed?\n", spi->dev.bus_id, hz);
+               pr_debug("%s: zero speed?\n", spi->dev.bus_id);
                status = -EINVAL;
                goto done;
        }
 
-       /* F_INT = mpu_per_clk / DIV1 */
+       /* F_INT = mpu_xor_clk / DIV1 */
        for (div1_idx = 0; div1_idx < 4; div1_idx++) {
                switch (div1_idx) {
                case 0:
@@ -434,7 +433,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
                break;
        }
        omap_uwire_configure_mode(spi->chip_select, flags);
-       pr_debug("%s: uwire flags %02x, armper %lu KHz, SCK %lu KHz\n",
+       pr_debug("%s: uwire flags %02x, armxor %lu KHz, SCK %lu KHz\n",
                        __FUNCTION__, flags,
                        clk_get_rate(uwire->ck) / 1000,
                        rate / 1000);
@@ -483,9 +482,9 @@ static int uwire_probe(struct platform_device *pdev)
        uwire = spi_master_get_devdata(master);
        dev_set_drvdata(&pdev->dev, uwire);
 
-       uwire->ck = clk_get(&pdev->dev, "armper_ck");
+       uwire->ck = clk_get(&pdev->dev, "armxor_ck");
        if (!uwire->ck || IS_ERR(uwire->ck)) {
-               dev_dbg(&pdev->dev, "no mpu_per_clk ?\n");
+               dev_dbg(&pdev->dev, "no mpu_xor_clk ?\n");
                spi_master_put(master);
                return -ENODEV;
        }