OSDN Git Service

Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
authorOlof Johansson <olof@lixom.net>
Tue, 21 May 2013 06:25:08 +0000 (23:25 -0700)
committerOlof Johansson <olof@lixom.net>
Tue, 21 May 2013 06:30:50 +0000 (23:30 -0700)
From Nicolas Ferre:
An important revert on at91rm9200 platform related
to timers that prevented the platform to boot properly.
Then one pinctrl adjustments for SPI CS and a couple of
trivial typos.

* tag 'at91-fixes' of git://github.com/at91linux/linux-at91:
  ARM: at91: rm9200 fix time support
  ARM: at91: dts: request only spi cs-gpios used on sama5d3x cpu module
  ARM: at91/trivial: typo in GEM compatible string
  ARM: at91/trivial: fix model name for SAM9X25-EK

Signed-off-by: Olof Johansson <olof@lixom.net>
Documentation/devicetree/bindings/net/macb.txt
arch/arm/boot/dts/at91sam9x25ek.dts
arch/arm/boot/dts/sama5d3.dtsi
arch/arm/boot/dts/sama5d3xcm.dtsi
arch/arm/mach-at91/at91rm9200_time.c

index 44afa0e..4ff6504 100644 (file)
@@ -4,7 +4,7 @@ Required properties:
 - compatible: Should be "cdns,[<chip>-]{macb|gem}"
   Use "cdns,at91sam9260-macb" Atmel at91sam9260 and at91sam9263 SoCs.
   Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
-  Use "cnds,pc302-gem" for Picochip picoXcell pc302 and later devices based on
+  Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
   the Cadence GEM, or the generic form: "cdns,gem".
 - reg: Address and length of the register set for the device
 - interrupts: Should contain macb interrupt
index 3b40d11..315250b 100644 (file)
@@ -11,7 +11,7 @@
 /include/ "at91sam9x5ek.dtsi"
 
 / {
-       model = "Atmel AT91SAM9G25-EK";
+       model = "Atmel AT91SAM9X25-EK";
        compatible = "atmel,at91sam9x25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
 
        ahb {
index 2e643ea..5000e0d 100644 (file)
                                compatible = "atmel,at91sam9x5-spi";
                                reg = <0xf0004000 0x100>;
                                interrupts = <24 4 3>;
-                               cs-gpios = <&pioD 13 0
-                                           &pioD 14 0 /* conflicts with SCK0 and CANRX0 */
-                                           &pioD 15 0 /* conflicts with CTS0 and CANTX0 */
-                                           &pioD 16 0 /* conflicts with RTS0 and PWMFI3 */
-                                          >;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi0>;
                                status = "disabled";
                        };
 
                        macb0: ethernet@f0028000 {
-                               compatible = "cnds,pc302-gem", "cdns,gem";
+                               compatible = "cdns,pc302-gem", "cdns,gem";
                                reg = <0xf0028000 0x100>;
                                interrupts = <34 4 3>;
                                pinctrl-names = "default";
                                compatible = "atmel,at91sam9x5-spi";
                                reg = <0xf8008000 0x100>;
                                interrupts = <25 4 3>;
-                               cs-gpios = <&pioC 25 0
-                                           &pioC 26 0 /* conflitcs with TWD1 and ISI_D11 */
-                                           &pioC 27 0 /* conflitcs with TWCK1 and ISI_D10 */
-                                           &pioC 28 0 /* conflitcs with PWMFI0 and ISI_D9 */
-                                          >;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi1>;
                                status = "disabled";
index 1f8ed40..b336e77 100644 (file)
 
        ahb {
                apb {
+                       spi0: spi@f0004000 {
+                               cs-gpios = <&pioD 13 0>, <0>, <0>, <0>;
+                       };
+
                        macb0: ethernet@f0028000 {
                                phy-mode = "rgmii";
                        };
index 2acdff4..180b302 100644 (file)
@@ -174,6 +174,7 @@ clkevt32k_next_event(unsigned long delta, struct clock_event_device *dev)
 static struct clock_event_device clkevt = {
        .name           = "at91_tick",
        .features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
+       .shift          = 32,
        .rating         = 150,
        .set_next_event = clkevt32k_next_event,
        .set_mode       = clkevt32k_mode,
@@ -264,9 +265,11 @@ void __init at91rm9200_timer_init(void)
        at91_st_write(AT91_ST_RTMR, 1);
 
        /* Setup timer clockevent, with minimum of two ticks (important!!) */
+       clkevt.mult = div_sc(AT91_SLOW_CLOCK, NSEC_PER_SEC, clkevt.shift);
+       clkevt.max_delta_ns = clockevent_delta2ns(AT91_ST_ALMV, &clkevt);
+       clkevt.min_delta_ns = clockevent_delta2ns(2, &clkevt) + 1;
        clkevt.cpumask = cpumask_of(0);
-       clockevents_config_and_register(&clkevt, AT91_SLOW_CLOCK,
-                                       2, AT91_ST_ALMV);
+       clockevents_register_device(&clkevt);
 
        /* register clocksource */
        clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK);