Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Dec 2012 19:51:23 +0000 (11:51 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Dec 2012 19:51:23 +0000 (11:51 -0800)
Pull sound updates from Takashi Iwai:
 "This update contains a fairly wide range of changes all over in sound
  subdirectory, mainly because of UAPI header moves by David and __dev*
  annotation removals by Bill.  Other highlights are:

   - Introduced the support for wallclock timestamps in ALSA PCM core

   - Add the poll loop implementation for HD-audio jack detection

   - Yet more VGA-switcheroo fixes for HD-audio

   - New VIA HD-audio codec support

   - More fixes on resource management in USB audio and MIDI drivers

   - More quirks for USB-audio ASUS Xonar U3, Reloop Play, Focusrite,
     Roland VG-99, etc

   - Add support for FastTrack C400 usb-audio

   - Clean ups in many drivers regarding firmware loading

   - Add PSC724 Ultiimate Edge support to ice1712

   - A few hdspm driver updates

   - New Stanton SCS.1d/1m FireWire driver

   - Standardisation of the logging in ASoC codes

   - DT and dmaengine support for ASoC Atmel

   - Support for Wolfson ADSP cores

   - New drivers for Freescale/iVeia P1022 and Maxim MAX98090

   - Lots of other ASoC driver fixes and developments"

Fix up trivial conflicts.  And go out on a limb and assume the dts file
'status' field of one of the conflicting things was supposed to be
"disabled", not "disable" like in pretty much all other cases.

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (341 commits)
  ALSA: hda - Move runtime PM check to runtime_idle callback
  ALSA: hda - Add stereo-dmic fixup for Acer Aspire One 522
  ALSA: hda - Avoid doubly suspend after vga switcheroo
  ALSA: usb-audio: Enable S/PDIF on the ASUS Xonar U3
  ALSA: hda - Check validity of CORB/RIRB WP reads
  ALSA: hda - use usleep_range in link reset and change timeout check
  ALSA: HDA: VIA: Add support for codec VT1808.
  ALSA: HDA: VIA Add support for codec VT1705CF.
  ASoC: codecs: remove __dev* attributes
  ASoC: utils: remove __dev* attributes
  ASoC: ux500: remove __dev* attributes
  ASoC: txx9: remove __dev* attributes
  ASoC: tegra: remove __dev* attributes
  ASoC: spear: remove __dev* attributes
  ASoC: sh: remove __dev* attributes
  ASoC: s6000: remove __dev* attributes
  ASoC: OMAP: remove __dev* attributes
  ASoC: nuc900: remove __dev* attributes
  ASoC: mxs: remove __dev* attributes
  ASoC: kirkwood: remove __dev* attributes
  ...

32 files changed:
1  2 
arch/arm/boot/dts/at91sam9260.dtsi
arch/arm/boot/dts/at91sam9263.dtsi
arch/arm/boot/dts/at91sam9g20ek_common.dtsi
arch/arm/boot/dts/at91sam9g45.dtsi
arch/arm/boot/dts/at91sam9x5.dtsi
arch/arm/mach-at91/at91rm9200.c
arch/arm/mach-at91/at91rm9200_devices.c
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9260_devices.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9261_devices.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9263_devices.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9g45_devices.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-at91/at91sam9rl_devices.c
arch/arm/mach-at91/at91sam9x5.c
arch/arm/mach-at91/board-sam9g20ek.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-exynos/mach-smdkv310.c
arch/arm/mach-s3c64xx/mach-crag6410.c
arch/arm/plat-samsung/devs.c
arch/arm/plat-samsung/include/plat/devs.h
drivers/mfd/arizona-core.c
drivers/mfd/wm8994-core.c
drivers/misc/atmel-ssc.c
sound/soc/fsl/imx-pcm-fiq.c
sound/soc/fsl/imx-ssi.c
sound/soc/omap/omap-pcm.c
sound/soc/tegra/tegra30_ahub.c
sound/soc/ux500/ux500_pcm.c

                serial2 = &usart1;
                serial3 = &usart2;
                serial4 = &usart3;
 -              serial5 = &usart4;
 -              serial6 = &usart5;
 +              serial5 = &uart0;
 +              serial6 = &uart1;
                gpio0 = &pioA;
                gpio1 = &pioB;
                gpio2 = &pioC;
                tcb0 = &tcb0;
                tcb1 = &tcb1;
                i2c0 = &i2c0;
+               ssc0 = &ssc0;
        };
        cpus {
                cpu@0 {
                                interrupts = <26 4 0 27 4 0 28 4 0>;
                        };
  
 -                      pioA: gpio@fffff400 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff400 0x100>;
 -                              interrupts = <2 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                      pinctrl@fffff400 {
 +                              #address-cells = <1>;
 +                              #size-cells = <1>;
 +                              compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
 +                              ranges = <0xfffff400 0xfffff400 0x600>;
 +
 +                              atmel,mux-mask = <
 +                                    /*    A         B     */
 +                                     0xffffffff 0xffc00c3b  /* pioA */
 +                                     0xffffffff 0x7fff3ccf  /* pioB */
 +                                     0xffffffff 0x007fffff  /* pioC */
 +                                    >;
 +
 +                              /* shared pinctrl settings */
 +                              dbgu {
 +                                      pinctrl_dbgu: dbgu-0 {
 +                                              atmel,pins =
 +                                                      <1 14 0x1 0x0   /* PB14 periph A */
 +                                                       1 15 0x1 0x1>; /* PB15 periph with pullup */
 +                                      };
 +                              };
  
 -                      pioB: gpio@fffff600 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff600 0x100>;
 -                              interrupts = <3 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                              usart0 {
 +                                      pinctrl_usart0: usart0-0 {
 +                                              atmel,pins =
 +                                                      <1 4 0x1 0x0    /* PB4 periph A */
 +                                                       1 5 0x1 0x0>;  /* PB5 periph A */
 +                                      };
 +
 +                                      pinctrl_usart0_rts: usart0_rts-0 {
 +                                              atmel,pins =
 +                                                      <1 26 0x1 0x0>; /* PB26 periph A */
 +                                      };
 +
 +                                      pinctrl_usart0_cts: usart0_cts-0 {
 +                                              atmel,pins =
 +                                                      <1 27 0x1 0x0>; /* PB27 periph A */
 +                                      };
 +
 +                                      pinctrl_usart0_dtr_dsr: usart0_dtr_dsr-0 {
 +                                              atmel,pins =
 +                                                      <1 24 0x1 0x0   /* PB24 periph A */
 +                                                       1 22 0x1 0x0>; /* PB22 periph A */
 +                                      };
 +
 +                                      pinctrl_usart0_dcd: usart0_dcd-0 {
 +                                              atmel,pins =
 +                                                      <1 23 0x1 0x0>; /* PB23 periph A */
 +                                      };
 +
 +                                      pinctrl_usart0_ri: usart0_ri-0 {
 +                                              atmel,pins =
 +                                                      <1 25 0x1 0x0>; /* PB25 periph A */
 +                                      };
 +                              };
  
 -                      pioC: gpio@fffff800 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff800 0x100>;
 -                              interrupts = <4 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 +                              usart1 {
 +                                      pinctrl_usart1: usart1-0 {
 +                                              atmel,pins =
 +                                                      <2 6 0x1 0x1    /* PB6 periph A with pullup */
 +                                                       2 7 0x1 0x0>;  /* PB7 periph A */
 +                                      };
 +
 +                                      pinctrl_usart1_rts: usart1_rts-0 {
 +                                              atmel,pins =
 +                                                      <1 28 0x1 0x0>; /* PB28 periph A */
 +                                      };
 +
 +                                      pinctrl_usart1_cts: usart1_cts-0 {
 +                                              atmel,pins =
 +                                                      <1 29 0x1 0x0>; /* PB29 periph A */
 +                                      };
 +                              };
 +
 +                              usart2 {
 +                                      pinctrl_usart2: usart2-0 {
 +                                              atmel,pins =
 +                                                      <1 8 0x1 0x1    /* PB8 periph A with pullup */
 +                                                       1 9 0x1 0x0>;  /* PB9 periph A */
 +                                      };
 +
 +                                      pinctrl_usart2_rts: usart2_rts-0 {
 +                                              atmel,pins =
 +                                                      <0 4 0x1 0x0>;  /* PA4 periph A */
 +                                      };
 +
 +                                      pinctrl_usart2_cts: usart2_cts-0 {
 +                                              atmel,pins =
 +                                                      <0 5 0x1 0x0>;  /* PA5 periph A */
 +                                      };
 +                              };
 +
 +                              usart3 {
 +                                      pinctrl_usart3: usart3-0 {
 +                                              atmel,pins =
 +                                                      <2 10 0x1 0x1   /* PB10 periph A with pullup */
 +                                                       2 11 0x1 0x0>; /* PB11 periph A */
 +                                      };
 +
 +                                      pinctrl_usart3_rts: usart3_rts-0 {
 +                                              atmel,pins =
 +                                                      <3 8 0x2 0x0>;  /* PB8 periph B */
 +                                      };
 +
 +                                      pinctrl_usart3_cts: usart3_cts-0 {
 +                                              atmel,pins =
 +                                                      <3 10 0x2 0x0>; /* PB10 periph B */
 +                                      };
 +                              };
 +
 +                              uart0 {
 +                                      pinctrl_uart0: uart0-0 {
 +                                              atmel,pins =
 +                                                      <0 31 0x2 0x1   /* PA31 periph B with pullup */
 +                                                       0 30 0x2 0x0>; /* PA30 periph B */
 +                                      };
 +                              };
 +
 +                              uart1 {
 +                                      pinctrl_uart1: uart1-0 {
 +                                              atmel,pins =
 +                                                      <2 12 0x1 0x1   /* PB12 periph A with pullup */
 +                                                       2 13 0x1 0x0>; /* PB13 periph A */
 +                                      };
 +                              };
 +
 +                              nand {
 +                                      pinctrl_nand: nand-0 {
 +                                              atmel,pins =
 +                                                      <2 13 0x0 0x1   /* PC13 gpio RDY pin pull_up */
 +                                                       2 14 0x0 0x1>; /* PC14 gpio enable pin pull_up */
 +                                      };
 +                              };
 +
 +                              macb {
 +                                      pinctrl_macb_rmii: macb_rmii-0 {
 +                                              atmel,pins =
 +                                                      <0 12 0x1 0x0   /* PA12 periph A */
 +                                                       0 13 0x1 0x0   /* PA13 periph A */
 +                                                       0 14 0x1 0x0   /* PA14 periph A */
 +                                                       0 15 0x1 0x0   /* PA15 periph A */
 +                                                       0 16 0x1 0x0   /* PA16 periph A */
 +                                                       0 17 0x1 0x0   /* PA17 periph A */
 +                                                       0 18 0x1 0x0   /* PA18 periph A */
 +                                                       0 19 0x1 0x0   /* PA19 periph A */
 +                                                       0 20 0x1 0x0   /* PA20 periph A */
 +                                                       0 21 0x1 0x0>; /* PA21 periph A */
 +                                      };
 +
 +                                      pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
 +                                              atmel,pins =
 +                                                      <0 22 0x2 0x0   /* PA22 periph B */
 +                                                       0 23 0x2 0x0   /* PA23 periph B */
 +                                                       0 24 0x2 0x0   /* PA24 periph B */
 +                                                       0 25 0x2 0x0   /* PA25 periph B */
 +                                                       0 26 0x2 0x0   /* PA26 periph B */
 +                                                       0 27 0x2 0x0   /* PA27 periph B */
 +                                                       0 28 0x2 0x0   /* PA28 periph B */
 +                                                       0 29 0x2 0x0>; /* PA29 periph B */
 +                                      };
 +
 +                                      pinctrl_macb_rmii_mii_alt: macb_rmii_mii-1 {
 +                                              atmel,pins =
 +                                                      <0 10 0x2 0x0   /* PA10 periph B */
 +                                                       0 11 0x2 0x0   /* PA11 periph B */
 +                                                       0 24 0x2 0x0   /* PA24 periph B */
 +                                                       0 25 0x2 0x0   /* PA25 periph B */
 +                                                       0 26 0x2 0x0   /* PA26 periph B */
 +                                                       0 27 0x2 0x0   /* PA27 periph B */
 +                                                       0 28 0x2 0x0   /* PA28 periph B */
 +                                                       0 29 0x2 0x0>; /* PA29 periph B */
 +                                      };
 +                              };
 +
 +                              mmc0 {
 +                                      pinctrl_mmc0_clk: mmc0_clk-0 {
 +                                              atmel,pins =
 +                                                      <0 8 0x1 0x0>;  /* PA8 periph A */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 7 0x1 0x1    /* PA7 periph A with pullup */
 +                                                       0 6 0x1 0x1>;  /* PA6 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 9 0x1 0x1    /* PA9 periph A with pullup */
 +                                                       0 10 0x1 0x1   /* PA10 periph A with pullup */
 +                                                       0 11 0x1 0x1>; /* PA11 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 1 0x2 0x1    /* PA1 periph B with pullup */
 +                                                       0 0 0x2 0x1>;  /* PA0 periph B with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 5 0x2 0x1    /* PA5 periph B with pullup */
 +                                                       0 4 0x2 0x1    /* PA4 periph B with pullup */
 +                                                       0 3 0x2 0x1>;  /* PA3 periph B with pullup */
 +                                      };
 +                              };
 +
 +                              pioA: gpio@fffff400 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff400 0x200>;
 +                                      interrupts = <2 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioB: gpio@fffff600 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff600 0x200>;
 +                                      interrupts = <3 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioC: gpio@fffff800 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff800 0x200>;
 +                                      interrupts = <4 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
                        };
  
                        dbgu: serial@fffff200 {
                                compatible = "atmel,at91sam9260-usart";
                                reg = <0xfffff200 0x200>;
                                interrupts = <1 4 7>;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_dbgu>;
                                status = "disabled";
                        };
  
                                interrupts = <6 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart0>;
                                status = "disabled";
                        };
  
                                interrupts = <7 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart1>;
                                status = "disabled";
                        };
  
                                interrupts = <8 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart2>;
                                status = "disabled";
                        };
  
                                interrupts = <23 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart3>;
                                status = "disabled";
                        };
  
 -                      usart4: serial@fffd4000 {
 +                      uart0: serial@fffd4000 {
                                compatible = "atmel,at91sam9260-usart";
                                reg = <0xfffd4000 0x200>;
                                interrupts = <24 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_uart0>;
                                status = "disabled";
                        };
  
 -                      usart5: serial@fffd8000 {
 +                      uart1: serial@fffd8000 {
                                compatible = "atmel,at91sam9260-usart";
                                reg = <0xfffd8000 0x200>;
                                interrupts = <25 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_uart1>;
                                status = "disabled";
                        };
  
                                compatible = "cdns,at32ap7000-macb", "cdns,macb";
                                reg = <0xfffc4000 0x100>;
                                interrupts = <21 4 3>;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_macb_rmii>;
                                status = "disabled";
                        };
  
                                status = "disabled";
                        };
  
 -                              status = "disable";
 +                      mmc0: mmc@fffa8000 {
 +                              compatible = "atmel,hsmci";
 +                              reg = <0xfffa8000 0x600>;
 +                              interrupts = <9 4 0>;
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              status = "disabled";
 +                      };
 +
+                       ssc0: ssc@fffbc000 {
+                               compatible = "atmel,at91rm9200-ssc";
+                               reg = <0xfffbc000 0x4000>;
+                               interrupts = <14 4 5>;
++                              status = "disabled";
+                       };
                        adc0: adc@fffe0000 {
                                compatible = "atmel,at91sam9260-adc";
                                reg = <0xfffe0000 0x100>;
                                        trigger-external;
                                };
                        };
 +
 +                      watchdog@fffffd40 {
 +                              compatible = "atmel,at91sam9260-wdt";
 +                              reg = <0xfffffd40 0x10>;
 +                              status = "disabled";
 +                      };
                };
  
                nand0: nand@40000000 {
                              >;
                        atmel,nand-addr-offset = <21>;
                        atmel,nand-cmd-offset = <22>;
 +                      pinctrl-names = "default";
 +                      pinctrl-0 = <&pinctrl_nand>;
                        gpios = <&pioC 13 0
                                 &pioC 14 0
                                 0
@@@ -25,6 -25,8 +25,8 @@@
                gpio4 = &pioE;
                tcb0 = &tcb0;
                i2c0 = &i2c0;
+               ssc0 = &ssc0;
+               ssc1 = &ssc1;
        };
        cpus {
                cpu@0 {
                                reg = <0xfffffd10 0x10>;
                        };
  
 -                      pioA: gpio@fffff200 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff200 0x100>;
 -                              interrupts = <2 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                      pinctrl@fffff200 {
 +                              #address-cells = <1>;
 +                              #size-cells = <1>;
 +                              compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
 +                              ranges = <0xfffff200 0xfffff200 0xa00>;
  
 -                      pioB: gpio@fffff400 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff400 0x100>;
 -                              interrupts = <3 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                              atmel,mux-mask = <
 +                                    /*    A         B     */
 +                                     0xfffffffb 0xffffe07f  /* pioA */
 +                                     0x0007ffff 0x39072fff  /* pioB */
 +                                     0xffffffff 0x3ffffff8  /* pioC */
 +                                     0xfffffbff 0xffffffff  /* pioD */
 +                                     0xffe00fff 0xfbfcff00  /* pioE */
 +                                    >;
  
 -                      pioC: gpio@fffff600 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff600 0x100>;
 -                              interrupts = <4 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                              /* shared pinctrl settings */
 +                              dbgu {
 +                                      pinctrl_dbgu: dbgu-0 {
 +                                              atmel,pins =
 +                                                      <2 30 0x1 0x0   /* PC30 periph A */
 +                                                       2 31 0x1 0x1>; /* PC31 periph with pullup */
 +                                      };
 +                              };
  
 -                      pioD: gpio@fffff800 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff800 0x100>;
 -                              interrupts = <4 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                              usart0 {
 +                                      pinctrl_usart0: usart0-0 {
 +                                              atmel,pins =
 +                                                      <0 26 0x1 0x1   /* PA26 periph A with pullup */
 +                                                       0 27 0x1 0x0>; /* PA27 periph A */
 +                                      };
  
 -                      pioE: gpio@fffffa00 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffffa00 0x100>;
 -                              interrupts = <4 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 +                                      pinctrl_usart0_rts: usart0_rts-0 {
 +                                              atmel,pins =
 +                                                      <0 28 0x1 0x0>; /* PA28 periph A */
 +                                      };
 +
 +                                      pinctrl_usart0_cts: usart0_cts-0 {
 +                                              atmel,pins =
 +                                                      <0 29 0x1 0x0>; /* PA29 periph A */
 +                                      };
 +                              };
 +
 +                              usart1 {
 +                                      pinctrl_usart1: usart1-0 {
 +                                              atmel,pins =
 +                                                      <3 0 0x1 0x1    /* PD0 periph A with pullup */
 +                                                       3 1 0x1 0x0>;  /* PD1 periph A */
 +                                      };
 +
 +                                      pinctrl_usart1_rts: usart1_rts-0 {
 +                                              atmel,pins =
 +                                                      <3 7 0x2 0x0>;  /* PD7 periph B */
 +                                      };
 +
 +                                      pinctrl_usart1_cts: usart1_cts-0 {
 +                                              atmel,pins =
 +                                                      <3 8 0x2 0x0>;  /* PD8 periph B */
 +                                      };
 +                              };
 +
 +                              usart2 {
 +                                      pinctrl_usart2: usart2-0 {
 +                                              atmel,pins =
 +                                                      <3 2 0x1 0x1    /* PD2 periph A with pullup */
 +                                                       3 3 0x1 0x0>;  /* PD3 periph A */
 +                                      };
 +
 +                                      pinctrl_usart2_rts: usart2_rts-0 {
 +                                              atmel,pins =
 +                                                      <3 5 0x2 0x0>;  /* PD5 periph B */
 +                                      };
 +
 +                                      pinctrl_usart2_cts: usart2_cts-0 {
 +                                              atmel,pins =
 +                                                      <4 6 0x2 0x0>;  /* PD6 periph B */
 +                                      };
 +                              };
 +
 +                              nand {
 +                                      pinctrl_nand: nand-0 {
 +                                              atmel,pins =
 +                                                      <0 22 0x0 0x1   /* PA22 gpio RDY pin pull_up*/
 +                                                       3 15 0x0 0x1>; /* PD15 gpio enable pin pull_up */
 +                                      };
 +                              };
 +
 +                              macb {
 +                                      pinctrl_macb_rmii: macb_rmii-0 {
 +                                              atmel,pins =
 +                                                      <2 25 0x2 0x0   /* PC25 periph B */
 +                                                       4 21 0x1 0x0   /* PE21 periph A */
 +                                                       4 23 0x1 0x0   /* PE23 periph A */
 +                                                       4 24 0x1 0x0   /* PE24 periph A */
 +                                                       4 25 0x1 0x0   /* PE25 periph A */
 +                                                       4 26 0x1 0x0   /* PE26 periph A */
 +                                                       4 27 0x1 0x0   /* PE27 periph A */
 +                                                       4 28 0x1 0x0   /* PE28 periph A */
 +                                                       4 29 0x1 0x0   /* PE29 periph A */
 +                                                       4 30 0x1 0x0>; /* PE30 periph A */
 +                                      };
 +
 +                                      pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
 +                                              atmel,pins =
 +                                                      <2 20 0x2 0x0   /* PC20 periph B */
 +                                                       2 21 0x2 0x0   /* PC21 periph B */
 +                                                       2 22 0x2 0x0   /* PC22 periph B */
 +                                                       2 23 0x2 0x0   /* PC23 periph B */
 +                                                       2 24 0x2 0x0   /* PC24 periph B */
 +                                                       2 25 0x2 0x0   /* PC25 periph B */
 +                                                       2 27 0x2 0x0   /* PC27 periph B */
 +                                                       4 22 0x2 0x0>; /* PE22 periph B */
 +                                      };
 +                              };
 +
 +                              mmc0 {
 +                                      pinctrl_mmc0_clk: mmc0_clk-0 {
 +                                              atmel,pins =
 +                                                      <0 12 0x1 0x0>; /* PA12 periph A */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 1 0x1 0x1    /* PA1 periph A with pullup */
 +                                                       0 0 0x1 0x1>;  /* PA0 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 3 0x1 0x1    /* PA3 periph A with pullup */
 +                                                       0 4 0x1 0x1    /* PA4 periph A with pullup */
 +                                                       0 5 0x1 0x1>;  /* PA5 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 16 0x1 0x1   /* PA16 periph A with pullup */
 +                                                       0 17 0x1 0x1>; /* PA17 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 18 0x1 0x1   /* PA18 periph A with pullup */
 +                                                       0 19 0x1 0x1   /* PA19 periph A with pullup */
 +                                                       0 20 0x1 0x1>; /* PA20 periph A with pullup */
 +                                      };
 +                              };
 +
 +                              mmc1 {
 +                                      pinctrl_mmc1_clk: mmc1_clk-0 {
 +                                              atmel,pins =
 +                                                      <0 6 0x1 0x0>;  /* PA6 periph A */
 +                                      };
 +
 +                                      pinctrl_mmc1_slot0_cmd_dat0: mmc1_slot0_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 7 0x1 0x1    /* PA7 periph A with pullup */
 +                                                       0 8 0x1 0x1>;  /* PA8 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 9 0x1 0x1    /* PA9 periph A with pullup */
 +                                                       0 10 0x1 0x1   /* PA10 periph A with pullup */
 +                                                       0 11 0x1 0x1>; /* PA11 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc1_slot1_cmd_dat0: mmc1_slot1_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 21 0x1 0x1   /* PA21 periph A with pullup */
 +                                                       0 22 0x1 0x1>; /* PA22 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc1_slot1_dat1_3: mmc1_slot1_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 23 0x1 0x1   /* PA23 periph A with pullup */
 +                                                       0 24 0x1 0x1   /* PA24 periph A with pullup */
 +                                                       0 25 0x1 0x1>; /* PA25 periph A with pullup */
 +                                      };
 +                              };
 +
 +                              pioA: gpio@fffff200 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff200 0x200>;
 +                                      interrupts = <2 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioB: gpio@fffff400 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff400 0x200>;
 +                                      interrupts = <3 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioC: gpio@fffff600 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff600 0x200>;
 +                                      interrupts = <4 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioD: gpio@fffff800 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff800 0x200>;
 +                                      interrupts = <4 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioE: gpio@fffffa00 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffffa00 0x200>;
 +                                      interrupts = <4 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
                        };
  
                        dbgu: serial@ffffee00 {
                                compatible = "atmel,at91sam9260-usart";
                                reg = <0xffffee00 0x200>;
                                interrupts = <1 4 7>;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_dbgu>;
                                status = "disabled";
                        };
  
                                interrupts = <7 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart0>;
                                status = "disabled";
                        };
  
                                interrupts = <8 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart1>;
                                status = "disabled";
                        };
  
                                interrupts = <9 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart2>;
                                status = "disabled";
                        };
  
+                       ssc0: ssc@fff98000 {
+                               compatible = "atmel,at91rm9200-ssc";
+                               reg = <0xfff98000 0x4000>;
+                               interrupts = <16 4 5>;
+                               status = "disable";
+                       };
+                       ssc1: ssc@fff9c000 {
+                               compatible = "atmel,at91rm9200-ssc";
+                               reg = <0xfff9c000 0x4000>;
+                               interrupts = <17 4 5>;
+                               status = "disable";
+                       };
                        macb0: ethernet@fffbc000 {
                                compatible = "cdns,at32ap7000-macb", "cdns,macb";
                                reg = <0xfffbc000 0x100>;
                                interrupts = <21 4 3>;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_macb_rmii>;
                                status = "disabled";
                        };
  
                                #size-cells = <0>;
                                status = "disabled";
                        };
 +
 +                      mmc0: mmc@fff80000 {
 +                              compatible = "atmel,hsmci";
 +                              reg = <0xfff80000 0x600>;
 +                              interrupts = <10 4 0>;
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              status = "disabled";
 +                      };
 +
 +                      mmc1: mmc@fff84000 {
 +                              compatible = "atmel,hsmci";
 +                              reg = <0xfff84000 0x600>;
 +                              interrupts = <11 4 0>;
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              status = "disabled";
 +                      };
 +
 +                      watchdog@fffffd40 {
 +                              compatible = "atmel,at91sam9260-wdt";
 +                              reg = <0xfffffd40 0x10>;
 +                              status = "disabled";
 +                      };
                };
  
                nand0: nand@40000000 {
                              >;
                        atmel,nand-addr-offset = <21>;
                        atmel,nand-cmd-offset = <22>;
 +                      pinctrl-names = "default";
 +                      pinctrl-0 = <&pinctrl_nand>;
                        gpios = <&pioA 22 0
                                 &pioD 15 0
                                 0
  
        ahb {
                apb {
+                       pinctrl@fffff400 {
+                               board {
+                                       pinctrl_pck0_as_mck: pck0_as_mck {
+                                               atmel,pins =
+                                                       <2 1 0x2 0x0>;  /* PC1 periph B */
+                                       };
+                               };
+                       };
                        dbgu: serial@fffff200 {
                                status = "okay";
                        };
  
                        usart0: serial@fffb0000 {
 +                              pinctrl-0 =
 +                                      <&pinctrl_usart0
 +                                       &pinctrl_usart0_rts
 +                                       &pinctrl_usart0_cts
 +                                       &pinctrl_usart0_dtr_dsr
 +                                       &pinctrl_usart0_dcd
 +                                       &pinctrl_usart0_ri>;
                                status = "okay";
                        };
  
                                status = "okay";
                        };
  
 +                      mmc0: mmc@fffa8000 {
 +                              pinctrl-0 = <
 +                                      &pinctrl_board_mmc0_slot1
 +                                      &pinctrl_mmc0_clk
 +                                      &pinctrl_mmc0_slot1_cmd_dat0
 +                                      &pinctrl_mmc0_slot1_dat1_3>;
 +                              status = "okay";
 +                              slot@1 {
 +                                      reg = <1>;
 +                                      bus-width = <4>;
 +                                      cd-gpios = <&pioC 9 0>;
 +                              };
 +                      };
 +
 +                      pinctrl@fffff400 {
 +                              mmc0_slot1 {
 +                                      pinctrl_board_mmc0_slot1: mmc0_slot1-board {
 +                                              atmel,pins =
 +                                                      <2 9 0x0 0x5>;  /* PC9 gpio CD pin pull up and deglitch */
 +                                      };
 +                              };
 +                      };
++
+                       ssc0: ssc@fffbc000 {
+                               status = "okay";
+                               pinctrl-0 = <&pinctrl_ssc0_tx>;
+                       };
                };
  
                nand0: nand@40000000 {
                        reg = <0x50>;
                };
  
-               wm8731@1b {
+               wm8731: wm8731@1b {
                        compatible = "wm8731";
                        reg = <0x1b>;
                };
                        gpio-key,wakeup;
                };
        };
+       sound {
+               compatible = "atmel,at91sam9g20ek-wm8731-audio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_pck0_as_mck>;
+               atmel,model = "wm8731 @ AT91SAMG20EK";
+               atmel,audio-routing =
+                       "Ext Spk", "LHPOUT",
+                       "Int Mic", "MICIN";
+               atmel,ssc-controller = <&ssc0>;
+               atmel,audio-codec = <&wm8731>;
+       };
  };
@@@ -31,6 -31,8 +31,8 @@@
                tcb1 = &tcb1;
                i2c0 = &i2c0;
                i2c1 = &i2c1;
+               ssc0 = &ssc0;
+               ssc1 = &ssc1;
        };
        cpus {
                cpu@0 {
                                interrupts = <21 4 0>;
                        };
  
 -                      pioA: gpio@fffff200 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff200 0x100>;
 -                              interrupts = <2 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                      pinctrl@fffff200 {
 +                              #address-cells = <1>;
 +                              #size-cells = <1>;
 +                              compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
 +                              ranges = <0xfffff200 0xfffff200 0xa00>;
 +
 +                              atmel,mux-mask = <
 +                                    /*    A         B     */
 +                                     0xffffffff 0xffc003ff  /* pioA */
 +                                     0xffffffff 0x800f8f00  /* pioB */
 +                                     0xffffffff 0x00000e00  /* pioC */
 +                                     0xffffffff 0xff0c1381  /* pioD */
 +                                     0xffffffff 0x81ffff81  /* pioE */
 +                                    >;
 +
 +                              /* shared pinctrl settings */
 +                              dbgu {
 +                                      pinctrl_dbgu: dbgu-0 {
 +                                              atmel,pins =
 +                                                      <1 12 0x1 0x0   /* PB12 periph A */
 +                                                       1 13 0x1 0x0>; /* PB13 periph A */
 +                                      };
 +                              };
  
 -                      pioB: gpio@fffff400 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff400 0x100>;
 -                              interrupts = <3 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                              usart0 {
 +                                      pinctrl_usart0: usart0-0 {
 +                                              atmel,pins =
 +                                                      <1 19 0x1 0x1   /* PB19 periph A with pullup */
 +                                                       1 18 0x1 0x0>; /* PB18 periph A */
 +                                      };
 +
 +                                      pinctrl_usart0_rts: usart0_rts-0 {
 +                                              atmel,pins =
 +                                                      <1 17 0x2 0x0>; /* PB17 periph B */
 +                                      };
 +
 +                                      pinctrl_usart0_cts: usart0_cts-0 {
 +                                              atmel,pins =
 +                                                      <1 15 0x2 0x0>; /* PB15 periph B */
 +                                      };
 +                              };
  
 -                      pioC: gpio@fffff600 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff600 0x100>;
 -                              interrupts = <4 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                              uart1 {
 +                                      pinctrl_usart1: usart1-0 {
 +                                              atmel,pins =
 +                                                      <1 4 0x1 0x1    /* PB4 periph A with pullup */
 +                                                       1 5 0x1 0x0>;  /* PB5 periph A */
 +                                      };
 +
 +                                      pinctrl_usart1_rts: usart1_rts-0 {
 +                                              atmel,pins =
 +                                                      <3 16 0x1 0x0>; /* PD16 periph A */
 +                                      };
 +
 +                                      pinctrl_usart1_cts: usart1_cts-0 {
 +                                              atmel,pins =
 +                                                      <3 17 0x1 0x0>; /* PD17 periph A */
 +                                      };
 +                              };
  
 -                      pioD: gpio@fffff800 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff800 0x100>;
 -                              interrupts = <5 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                              usart2 {
 +                                      pinctrl_usart2: usart2-0 {
 +                                              atmel,pins =
 +                                                      <1 6 0x1 0x1    /* PB6 periph A with pullup */
 +                                                       1 7 0x1 0x0>;  /* PB7 periph A */
 +                                      };
 +
 +                                      pinctrl_usart2_rts: usart2_rts-0 {
 +                                              atmel,pins =
 +                                                      <2 9 0x2 0x0>;  /* PC9 periph B */
 +                                      };
 +
 +                                      pinctrl_usart2_cts: usart2_cts-0 {
 +                                              atmel,pins =
 +                                                      <2 11 0x2 0x0>; /* PC11 periph B */
 +                                      };
 +                              };
  
 -                      pioE: gpio@fffffa00 {
 -                              compatible = "atmel,at91rm9200-gpio";
 -                              reg = <0xfffffa00 0x100>;
 -                              interrupts = <5 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 +                              usart3 {
 +                                      pinctrl_usart3: usart3-0 {
 +                                              atmel,pins =
 +                                                      <1 8 0x1 0x1    /* PB9 periph A with pullup */
 +                                                       1 9 0x1 0x0>;  /* PB8 periph A */
 +                                      };
 +
 +                                      pinctrl_usart3_rts: usart3_rts-0 {
 +                                              atmel,pins =
 +                                                      <0 23 0x2 0x0>; /* PA23 periph B */
 +                                      };
 +
 +                                      pinctrl_usart3_cts: usart3_cts-0 {
 +                                              atmel,pins =
 +                                                      <0 24 0x2 0x0>; /* PA24 periph B */
 +                                      };
 +                              };
 +
 +                              nand {
 +                                      pinctrl_nand: nand-0 {
 +                                              atmel,pins =
 +                                                      <2 8 0x0 0x1    /* PC8 gpio RDY pin pull_up*/
 +                                                       2 14 0x0 0x1>; /* PC14 gpio enable pin pull_up */
 +                                      };
 +                              };
 +
 +                              macb {
 +                                      pinctrl_macb_rmii: macb_rmii-0 {
 +                                              atmel,pins =
 +                                                      <0 10 0x1 0x0   /* PA10 periph A */
 +                                                       0 11 0x1 0x0   /* PA11 periph A */
 +                                                       0 12 0x1 0x0   /* PA12 periph A */
 +                                                       0 13 0x1 0x0   /* PA13 periph A */
 +                                                       0 14 0x1 0x0   /* PA14 periph A */
 +                                                       0 15 0x1 0x0   /* PA15 periph A */
 +                                                       0 16 0x1 0x0   /* PA16 periph A */
 +                                                       0 17 0x1 0x0   /* PA17 periph A */
 +                                                       0 18 0x1 0x0   /* PA18 periph A */
 +                                                       0 19 0x1 0x0>; /* PA19 periph A */
 +                                      };
 +
 +                                      pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
 +                                              atmel,pins =
 +                                                      <0 6 0x2 0x0    /* PA6 periph B */
 +                                                       0 7 0x2 0x0    /* PA7 periph B */
 +                                                       0 8 0x2 0x0    /* PA8 periph B */
 +                                                       0 9 0x2 0x0    /* PA9 periph B */
 +                                                       0 27 0x2 0x0   /* PA27 periph B */
 +                                                       0 28 0x2 0x0   /* PA28 periph B */
 +                                                       0 29 0x2 0x0   /* PA29 periph B */
 +                                                       0 30 0x2 0x0>; /* PA30 periph B */
 +                                      };
 +                              };
 +
 +                              mmc0 {
 +                                      pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 0 0x1 0x0    /* PA0 periph A */
 +                                                       0 1 0x1 0x1    /* PA1 periph A with pullup */
 +                                                       0 2 0x1 0x1>;  /* PA2 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 3 0x1 0x1    /* PA3 periph A with pullup */
 +                                                       0 4 0x1 0x1    /* PA4 periph A with pullup */
 +                                                       0 5 0x1 0x1>;  /* PA5 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot0_dat4_7: mmc0_slot0_dat4_7-0 {
 +                                              atmel,pins =
 +                                                      <0 6 0x1 0x1    /* PA6 periph A with pullup */
 +                                                       0 7 0x1 0x1    /* PA7 periph A with pullup */
 +                                                       0 8 0x1 0x1    /* PA8 periph A with pullup */
 +                                                       0 9 0x1 0x1>;  /* PA9 periph A with pullup */
 +                                      };
 +                              };
 +
 +                              mmc1 {
 +                                      pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 31 0x1 0x0   /* PA31 periph A */
 +                                                       0 22 0x1 0x1   /* PA22 periph A with pullup */
 +                                                       0 23 0x1 0x1>; /* PA23 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 24 0x1 0x1   /* PA24 periph A with pullup */
 +                                                       0 25 0x1 0x1   /* PA25 periph A with pullup */
 +                                                       0 26 0x1 0x1>; /* PA26 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc1_slot0_dat4_7: mmc1_slot0_dat4_7-0 {
 +                                              atmel,pins =
 +                                                      <0 27 0x1 0x1   /* PA27 periph A with pullup */
 +                                                       0 28 0x1 0x1   /* PA28 periph A with pullup */
 +                                                       0 29 0x1 0x1   /* PA29 periph A with pullup */
 +                                                       0 20 0x1 0x1>; /* PA30 periph A with pullup */
 +                                      };
 +                              };
 +
 +                              pioA: gpio@fffff200 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff200 0x200>;
 +                                      interrupts = <2 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioB: gpio@fffff400 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff400 0x200>;
 +                                      interrupts = <3 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioC: gpio@fffff600 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff600 0x200>;
 +                                      interrupts = <4 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioD: gpio@fffff800 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff800 0x200>;
 +                                      interrupts = <5 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioE: gpio@fffffa00 {
 +                                      compatible = "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffffa00 0x200>;
 +                                      interrupts = <5 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
                        };
  
                        dbgu: serial@ffffee00 {
                                compatible = "atmel,at91sam9260-usart";
                                reg = <0xffffee00 0x200>;
                                interrupts = <1 4 7>;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_dbgu>;
                                status = "disabled";
                        };
  
                                interrupts = <7 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart0>;
                                status = "disabled";
                        };
  
                                interrupts = <8 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart1>;
                                status = "disabled";
                        };
  
                                interrupts = <9 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart2>;
                                status = "disabled";
                        };
  
                                interrupts = <10 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart3>;
                                status = "disabled";
                        };
  
                                compatible = "cdns,at32ap7000-macb", "cdns,macb";
                                reg = <0xfffbc000 0x100>;
                                interrupts = <25 4 3>;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_macb_rmii>;
                                status = "disabled";
                        };
  
                                status = "disabled";
                        };
  
+                       ssc0: ssc@fff9c000 {
+                               compatible = "atmel,at91sam9g45-ssc";
+                               reg = <0xfff9c000 0x4000>;
+                               interrupts = <16 4 5>;
+                               status = "disable";
+                       };
+                       ssc1: ssc@fffa0000 {
+                               compatible = "atmel,at91sam9g45-ssc";
+                               reg = <0xfffa0000 0x4000>;
+                               interrupts = <17 4 5>;
+                               status = "disable";
+                       };
                        adc0: adc@fffb0000 {
                                compatible = "atmel,at91sam9260-adc";
                                reg = <0xfffb0000 0x100>;
                                        trigger-value = <0x6>;
                                };
                        };
 +
 +                      mmc0: mmc@fff80000 {
 +                              compatible = "atmel,hsmci";
 +                              reg = <0xfff80000 0x600>;
 +                              interrupts = <11 4 0>;
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              status = "disabled";
 +                      };
 +
 +                      mmc1: mmc@fffd0000 {
 +                              compatible = "atmel,hsmci";
 +                              reg = <0xfffd0000 0x600>;
 +                              interrupts = <29 4 0>;
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              status = "disabled";
 +                      };
 +
 +                      watchdog@fffffd40 {
 +                              compatible = "atmel,at91sam9260-wdt";
 +                              reg = <0xfffffd40 0x10>;
 +                              status = "disabled";
 +                      };
                };
  
                nand0: nand@40000000 {
                              >;
                        atmel,nand-addr-offset = <21>;
                        atmel,nand-cmd-offset = <22>;
 +                      pinctrl-names = "default";
 +                      pinctrl-0 = <&pinctrl_nand>;
                        gpios = <&pioC 8 0
                                 &pioC 14 0
                                 0
@@@ -30,6 -30,7 +30,7 @@@
                i2c0 = &i2c0;
                i2c1 = &i2c1;
                i2c2 = &i2c2;
+               ssc0 = &ssc0;
        };
        cpus {
                cpu@0 {
                                interrupts = <1 4 7>;
                        };
  
+                       ssc0: ssc@f0010000 {
+                               compatible = "atmel,at91sam9g45-ssc";
+                               reg = <0xf0010000 0x4000>;
+                               interrupts = <28 4 5>;
+                               status = "disable";
+                       };
                        tcb0: timer@f8008000 {
                                compatible = "atmel,at91sam9x5-tcb";
                                reg = <0xf8008000 0x100>;
                                interrupts = <21 4 0>;
                        };
  
 -                      pioA: gpio@fffff400 {
 -                              compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff400 0x100>;
 -                              interrupts = <2 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 -                      };
 +                      pinctrl@fffff400 {
 +                              #address-cells = <1>;
 +                              #size-cells = <1>;
 +                              compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus";
 +                              ranges = <0xfffff400 0xfffff400 0x800>;
 +
 +                              /* shared pinctrl settings */
 +                              dbgu {
 +                                      pinctrl_dbgu: dbgu-0 {
 +                                              atmel,pins =
 +                                                      <0 9 0x1 0x0    /* PA9 periph A */
 +                                                       0 10 0x1 0x1>; /* PA10 periph A with pullup */
 +                                      };
 +                              };
  
 -                      pioB: gpio@fffff600 {
 -                              compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff600 0x100>;
 -                              interrupts = <2 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 +                              usart0 {
 +                                      pinctrl_usart0: usart0-0 {
 +                                              atmel,pins =
 +                                                      <0 0 0x1 0x1    /* PA0 periph A with pullup */
 +                                                       0 1 0x1 0x0>;  /* PA1 periph A */
 +                                      };
 +
 +                                      pinctrl_usart0_rts: usart0_rts-0 {
 +                                              atmel,pins =
 +                                                      <0 2 0x1 0x0>;  /* PA2 periph A */
 +                                      };
 +
 +                                      pinctrl_usart0_cts: usart0_cts-0 {
 +                                              atmel,pins =
 +                                                      <0 3 0x1 0x0>;  /* PA3 periph A */
 +                                      };
 +                              };
 +
 +                              usart1 {
 +                                      pinctrl_usart1: usart1-0 {
 +                                              atmel,pins =
 +                                                      <0 5 0x1 0x1    /* PA5 periph A with pullup */
 +                                                       0 6 0x1 0x0>;  /* PA6 periph A */
 +                                      };
 +
 +                                      pinctrl_usart1_rts: usart1_rts-0 {
 +                                              atmel,pins =
 +                                                      <3 27 0x3 0x0>; /* PC27 periph C */
 +                                      };
 +
 +                                      pinctrl_usart1_cts: usart1_cts-0 {
 +                                              atmel,pins =
 +                                                      <3 28 0x3 0x0>; /* PC28 periph C */
 +                                      };
 +                              };
 +
 +                              usart2 {
 +                                      pinctrl_usart2: usart2-0 {
 +                                              atmel,pins =
 +                                                      <0 7 0x1 0x1    /* PA7 periph A with pullup */
 +                                                       0 8 0x1 0x0>;  /* PA8 periph A */
 +                                      };
 +
 +                                      pinctrl_uart2_rts: uart2_rts-0 {
 +                                              atmel,pins =
 +                                                      <0 0 0x2 0x0>;  /* PB0 periph B */
 +                                      };
 +
 +                                      pinctrl_uart2_cts: uart2_cts-0 {
 +                                              atmel,pins =
 +                                                      <0 1 0x2 0x0>;  /* PB1 periph B */
 +                                      };
 +                              };
 +
 +                              usart3 {
 +                                      pinctrl_uart3: usart3-0 {
 +                                              atmel,pins =
 +                                                      <3 23 0x2 0x1   /* PC22 periph B with pullup */
 +                                                       3 23 0x2 0x0>; /* PC23 periph B */
 +                                      };
 +
 +                                      pinctrl_usart3_rts: usart3_rts-0 {
 +                                              atmel,pins =
 +                                                      <3 24 0x2 0x0>; /* PC24 periph B */
 +                                      };
 +
 +                                      pinctrl_usart3_cts: usart3_cts-0 {
 +                                              atmel,pins =
 +                                                      <3 25 0x2 0x0>; /* PC25 periph B */
 +                                      };
 +                              };
 +
 +                              uart0 {
 +                                      pinctrl_uart0: uart0-0 {
 +                                              atmel,pins =
 +                                                      <3 8 0x3 0x0    /* PC8 periph C */
 +                                                       3 9 0x3 0x1>;  /* PC9 periph C with pullup */
 +                                      };
 +                              };
 +
 +                              uart1 {
 +                                      pinctrl_uart1: uart1-0 {
 +                                              atmel,pins =
 +                                                      <3 16 0x3 0x0   /* PC16 periph C */
 +                                                       3 17 0x3 0x1>; /* PC17 periph C with pullup */
 +                                      };
 +                              };
 +
 +                              nand {
 +                                      pinctrl_nand: nand-0 {
 +                                              atmel,pins =
 +                                                      <3 4 0x0 0x1    /* PD5 gpio RDY pin pull_up */
 +                                                       3 5 0x0 0x1>;  /* PD4 gpio enable pin pull_up */
 +                                      };
 +                              };
 +
 +                              macb0 {
 +                                      pinctrl_macb0_rmii: macb0_rmii-0 {
 +                                              atmel,pins =
 +                                                      <1 0 0x1 0x0    /* PB0 periph A */
 +                                                       1 1 0x1 0x0    /* PB1 periph A */
 +                                                       1 2 0x1 0x0    /* PB2 periph A */
 +                                                       1 3 0x1 0x0    /* PB3 periph A */
 +                                                       1 4 0x1 0x0    /* PB4 periph A */
 +                                                       1 5 0x1 0x0    /* PB5 periph A */
 +                                                       1 6 0x1 0x0    /* PB6 periph A */
 +                                                       1 7 0x1 0x0    /* PB7 periph A */
 +                                                       1 9 0x1 0x0    /* PB9 periph A */
 +                                                       1 10 0x1 0x0>; /* PB10 periph A */
 +                                      };
 +
 +                                      pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 {
 +                                              atmel,pins =
 +                                                      <1 8 0x1 0x0    /* PA8 periph A */
 +                                                       1 11 0x1 0x0   /* PA11 periph A */
 +                                                       1 12 0x1 0x0   /* PA12 periph A */
 +                                                       1 13 0x1 0x0   /* PA13 periph A */
 +                                                       1 14 0x1 0x0   /* PA14 periph A */
 +                                                       1 15 0x1 0x0   /* PA15 periph A */
 +                                                       1 16 0x1 0x0   /* PA16 periph A */
 +                                                       1 17 0x1 0x0>; /* PA17 periph A */
 +                                      };
 +                              };
 +
 +                              mmc0 {
 +                                      pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 17 0x1 0x0   /* PA17 periph A */
 +                                                       0 16 0x1 0x1   /* PA16 periph A with pullup */
 +                                                       0 15 0x1 0x1>; /* PA15 periph A with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 18 0x1 0x1   /* PA18 periph A with pullup */
 +                                                       0 19 0x1 0x1   /* PA19 periph A with pullup */
 +                                                       0 20 0x1 0x1>; /* PA20 periph A with pullup */
 +                                      };
 +                              };
 +
 +                              mmc1 {
 +                                      pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 {
 +                                              atmel,pins =
 +                                                      <0 13 0x2 0x0   /* PA13 periph B */
 +                                                       0 12 0x2 0x1   /* PA12 periph B with pullup */
 +                                                       0 11 0x2 0x1>; /* PA11 periph B with pullup */
 +                                      };
 +
 +                                      pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 {
 +                                              atmel,pins =
 +                                                      <0 2 0x2 0x1    /* PA2 periph B with pullup */
 +                                                       0 3 0x2 0x1    /* PA3 periph B with pullup */
 +                                                       0 4 0x2 0x1>;  /* PA4 periph B with pullup */
 +                                      };
 +                              };
 +
 +                              pioA: gpio@fffff400 {
 +                                      compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff400 0x200>;
 +                                      interrupts = <2 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioB: gpio@fffff600 {
 +                                      compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff600 0x200>;
 +                                      interrupts = <2 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      #gpio-lines = <19>;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioC: gpio@fffff800 {
 +                                      compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffff800 0x200>;
 +                                      interrupts = <3 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
 +
 +                              pioD: gpio@fffffa00 {
 +                                      compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
 +                                      reg = <0xfffffa00 0x200>;
 +                                      interrupts = <3 4 1>;
 +                                      #gpio-cells = <2>;
 +                                      gpio-controller;
 +                                      #gpio-lines = <22>;
 +                                      interrupt-controller;
 +                                      #interrupt-cells = <2>;
 +                              };
                        };
  
 -                      pioC: gpio@fffff800 {
 -                              compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
 -                              reg = <0xfffff800 0x100>;
 -                              interrupts = <3 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 +                      mmc0: mmc@f0008000 {
 +                              compatible = "atmel,hsmci";
 +                              reg = <0xf0008000 0x600>;
 +                              interrupts = <12 4 0>;
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              status = "disabled";
                        };
  
 -                      pioD: gpio@fffffa00 {
 -                              compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
 -                              reg = <0xfffffa00 0x100>;
 -                              interrupts = <3 4 1>;
 -                              #gpio-cells = <2>;
 -                              gpio-controller;
 -                              interrupt-controller;
 -                              #interrupt-cells = <2>;
 +                      mmc1: mmc@f000c000 {
 +                              compatible = "atmel,hsmci";
 +                              reg = <0xf000c000 0x600>;
 +                              interrupts = <26 4 0>;
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              status = "disabled";
                        };
  
                        dbgu: serial@fffff200 {
                                compatible = "atmel,at91sam9260-usart";
                                reg = <0xfffff200 0x200>;
                                interrupts = <1 4 7>;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_dbgu>;
                                status = "disabled";
                        };
  
                                interrupts = <5 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart0>;
                                status = "disabled";
                        };
  
                                interrupts = <6 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart1>;
                                status = "disabled";
                        };
  
                                interrupts = <7 4 5>;
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_usart2>;
                                status = "disabled";
                        };
  
                                compatible = "cdns,at32ap7000-macb", "cdns,macb";
                                reg = <0xf802c000 0x100>;
                                interrupts = <24 4 3>;
 +                              pinctrl-names = "default";
 +                              pinctrl-0 = <&pinctrl_macb0_rmii>;
                                status = "disabled";
                        };
  
                              >;
                        atmel,nand-addr-offset = <21>;
                        atmel,nand-cmd-offset = <22>;
 +                      pinctrl-names = "default";
 +                      pinctrl-0 = <&pinctrl_nand>;
                        gpios = <&pioD 5 0
                                 &pioD 4 0
                                 0
  #include <asm/mach/map.h>
  #include <asm/system_misc.h>
  #include <mach/at91rm9200.h>
 -#include <mach/at91_aic.h>
  #include <mach/at91_pmc.h>
  #include <mach/at91_st.h>
  #include <mach/cpu.h>
  
 +#include "at91_aic.h"
  #include "soc.h"
  #include "generic.h"
  #include "clock.h"
@@@ -184,9 -184,12 +184,12 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
        CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
        CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.2", &ssc2_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffd0000.ssc", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffd4000.ssc", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffd8000.ssc", &ssc2_clk),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200.0", &twi_clk),
        /* fake hclk clock */
        CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
        CLKDEV_CON_ID("pioB", &pioB_clk),
        CLKDEV_CON_ID("pioC", &pioC_clk),
        CLKDEV_CON_ID("pioD", &pioD_clk),
 +      /* usart lookup table for DT entries */
 +      CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
 +      CLKDEV_CON_DEV_ID("usart", "fffc0000.serial", &usart0_clk),
 +      CLKDEV_CON_DEV_ID("usart", "fffc4000.serial", &usart1_clk),
 +      CLKDEV_CON_DEV_ID("usart", "fffc8000.serial", &usart2_clk),
 +      CLKDEV_CON_DEV_ID("usart", "fffcc000.serial", &usart3_clk),
 +      /* tc lookup table for DT entries */
 +      CLKDEV_CON_DEV_ID("t0_clk", "fffa0000.timer", &tc0_clk),
 +      CLKDEV_CON_DEV_ID("t1_clk", "fffa0000.timer", &tc1_clk),
 +      CLKDEV_CON_DEV_ID("t2_clk", "fffa0000.timer", &tc2_clk),
 +      CLKDEV_CON_DEV_ID("t0_clk", "fffa4000.timer", &tc3_clk),
 +      CLKDEV_CON_DEV_ID("t1_clk", "fffa4000.timer", &tc4_clk),
 +      CLKDEV_CON_DEV_ID("t2_clk", "fffa4000.timer", &tc5_clk),
 +      CLKDEV_CON_DEV_ID("hclk", "300000.ohci", &ohci_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioD_clk),
  };
  
  static struct clk_lookup usart_clocks_lookups[] = {
@@@ -379,10 -364,10 +382,10 @@@ static unsigned int at91rm9200_default_
        0       /* Advanced Interrupt Controller (IRQ6) */
  };
  
 -struct at91_init_soc __initdata at91rm9200_soc = {
 +AT91_SOC_START(rm9200)
        .map_io = at91rm9200_map_io,
        .default_irq_priority = at91rm9200_default_irq_priority,
        .ioremap_registers = at91rm9200_ioremap_registers,
        .register_clocks = at91rm9200_register_clocks,
        .init = at91rm9200_initialize,
 -};
 +AT91_SOC_END
  #include <linux/platform_device.h>
  #include <linux/i2c-gpio.h>
  
 -#include <mach/board.h>
  #include <mach/at91rm9200.h>
  #include <mach/at91rm9200_mc.h>
  #include <mach/at91_ramc.h>
  
 +#include "board.h"
  #include "generic.h"
  
  
@@@ -752,7 -752,7 +752,7 @@@ static struct resource ssc0_resources[
  };
  
  static struct platform_device at91rm9200_ssc0_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 0,
        .dev    = {
                .dma_mask               = &ssc0_dmamask,
@@@ -794,7 -794,7 +794,7 @@@ static struct resource ssc1_resources[
  };
  
  static struct platform_device at91rm9200_ssc1_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 1,
        .dev    = {
                .dma_mask               = &ssc1_dmamask,
@@@ -836,7 -836,7 +836,7 @@@ static struct resource ssc2_resources[
  };
  
  static struct platform_device at91rm9200_ssc2_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 2,
        .dev    = {
                .dma_mask               = &ssc2_dmamask,
  #include <mach/cpu.h>
  #include <mach/at91_dbgu.h>
  #include <mach/at91sam9260.h>
 -#include <mach/at91_aic.h>
  #include <mach/at91_pmc.h>
 -#include <mach/at91_rstc.h>
  
 +#include "at91_aic.h"
 +#include "at91_rstc.h"
  #include "soc.h"
  #include "generic.h"
  #include "clock.h"
@@@ -210,7 -210,8 +210,8 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
        CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
        CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffbc000.ssc", &ssc_clk),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi_clk),
        /* more usart lookup table for DT entries */
        CLKDEV_CON_DEV_ID("t1_clk", "fffdc000.timer", &tc4_clk),
        CLKDEV_CON_DEV_ID("t2_clk", "fffdc000.timer", &tc5_clk),
        CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &ohci_clk),
 +      CLKDEV_CON_DEV_ID("mci_clk", "fffa8000.mmc", &mmc_clk),
        /* fake hclk clock */
        CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
        CLKDEV_CON_ID("pioA", &pioA_clk),
        CLKDEV_CON_ID("pioB", &pioB_clk),
        CLKDEV_CON_ID("pioC", &pioC_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk),
  };
  
  static struct clk_lookup usart_clocks_lookups[] = {
@@@ -394,10 -391,10 +395,10 @@@ static unsigned int at91sam9260_default
        0,      /* Advanced Interrupt Controller */
  };
  
 -struct at91_init_soc __initdata at91sam9260_soc = {
 +AT91_SOC_START(sam9260)
        .map_io = at91sam9260_map_io,
        .default_irq_priority = at91sam9260_default_irq_priority,
        .ioremap_registers = at91sam9260_ioremap_registers,
        .register_clocks = at91sam9260_register_clocks,
        .init = at91sam9260_initialize,
 -};
 +AT91_SOC_END
@@@ -19,6 -19,7 +19,6 @@@
  
  #include <linux/platform_data/at91_adc.h>
  
 -#include <mach/board.h>
  #include <mach/cpu.h>
  #include <mach/at91sam9260.h>
  #include <mach/at91sam9260_matrix.h>
@@@ -26,7 -27,6 +26,7 @@@
  #include <mach/at91sam9_smc.h>
  #include <mach/at91_adc.h>
  
 +#include "board.h"
  #include "generic.h"
  
  
@@@ -742,7 -742,7 +742,7 @@@ static struct resource ssc_resources[] 
  };
  
  static struct platform_device at91sam9260_ssc_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 0,
        .dev    = {
                .dma_mask               = &ssc_dmamask,
  #include <asm/system_misc.h>
  #include <mach/cpu.h>
  #include <mach/at91sam9261.h>
 -#include <mach/at91_aic.h>
  #include <mach/at91_pmc.h>
 -#include <mach/at91_rstc.h>
  
 +#include "at91_aic.h"
 +#include "at91_rstc.h"
  #include "soc.h"
  #include "generic.h"
  #include "clock.h"
@@@ -174,9 -174,12 +174,12 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
        CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
        CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.2", &ssc2_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffbc000.ssc", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffc0000.ssc", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffc4000.ssc", &ssc2_clk),
        CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261.0", &twi_clk),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi_clk),
@@@ -334,10 -337,10 +337,10 @@@ static unsigned int at91sam9261_default
        0,      /* Advanced Interrupt Controller */
  };
  
 -struct at91_init_soc __initdata at91sam9261_soc = {
 +AT91_SOC_START(sam9261)
        .map_io = at91sam9261_map_io,
        .default_irq_priority = at91sam9261_default_irq_priority,
        .ioremap_registers = at91sam9261_ioremap_registers,
        .register_clocks = at91sam9261_register_clocks,
        .init = at91sam9261_initialize,
 -};
 +AT91_SOC_END
  #include <linux/fb.h>
  #include <video/atmel_lcdc.h>
  
 -#include <mach/board.h>
  #include <mach/at91sam9261.h>
  #include <mach/at91sam9261_matrix.h>
  #include <mach/at91_matrix.h>
  #include <mach/at91sam9_smc.h>
  
 +#include "board.h"
  #include "generic.h"
  
  
@@@ -706,7 -706,7 +706,7 @@@ static struct resource ssc0_resources[
  };
  
  static struct platform_device at91sam9261_ssc0_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 0,
        .dev    = {
                .dma_mask               = &ssc0_dmamask,
@@@ -748,7 -748,7 +748,7 @@@ static struct resource ssc1_resources[
  };
  
  static struct platform_device at91sam9261_ssc1_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 1,
        .dev    = {
                .dma_mask               = &ssc1_dmamask,
@@@ -790,7 -790,7 +790,7 @@@ static struct resource ssc2_resources[
  };
  
  static struct platform_device at91sam9261_ssc2_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 2,
        .dev    = {
                .dma_mask               = &ssc2_dmamask,
  #include <asm/mach/map.h>
  #include <asm/system_misc.h>
  #include <mach/at91sam9263.h>
 -#include <mach/at91_aic.h>
  #include <mach/at91_pmc.h>
 -#include <mach/at91_rstc.h>
  
 +#include "at91_aic.h"
 +#include "at91_rstc.h"
  #include "soc.h"
  #include "generic.h"
  #include "clock.h"
@@@ -186,8 -186,10 +186,10 @@@ static struct clk *periph_clocks[] __in
  static struct clk_lookup periph_clocks_lookups[] = {
        /* One additional fake clock for macb_hclk */
        CLKDEV_CON_ID("hclk", &macb_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fff98000.ssc", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fff9c000.ssc", &ssc1_clk),
        CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.0", &mmc0_clk),
        CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.1", &mmc1_clk),
        CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
        CLKDEV_CON_DEV_ID("hclk", "a00000.ohci", &ohci_clk),
        CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk),
        CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk),
 +      CLKDEV_CON_DEV_ID("mci_clk", "fff80000.mmc", &mmc0_clk),
 +      CLKDEV_CON_DEV_ID("mci_clk", "fff84000.mmc", &mmc1_clk),
        CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioCDE_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCDE_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCDE_clk),
  };
  
  static struct clk_lookup usart_clocks_lookups[] = {
@@@ -372,10 -367,10 +374,10 @@@ static unsigned int at91sam9263_default
        0,      /* Advanced Interrupt Controller (IRQ1) */
  };
  
 -struct at91_init_soc __initdata at91sam9263_soc = {
 +AT91_SOC_START(sam9263)
        .map_io = at91sam9263_map_io,
        .default_irq_priority = at91sam9263_default_irq_priority,
        .ioremap_registers = at91sam9263_ioremap_registers,
        .register_clocks = at91sam9263_register_clocks,
        .init = at91sam9263_initialize,
 -};
 +AT91_SOC_END
  #include <linux/fb.h>
  #include <video/atmel_lcdc.h>
  
 -#include <mach/board.h>
  #include <mach/at91sam9263.h>
  #include <mach/at91sam9263_matrix.h>
  #include <mach/at91_matrix.h>
  #include <mach/at91sam9_smc.h>
  
 +#include "board.h"
  #include "generic.h"
  
  
@@@ -1199,7 -1199,7 +1199,7 @@@ static struct resource ssc0_resources[
  };
  
  static struct platform_device at91sam9263_ssc0_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 0,
        .dev    = {
                .dma_mask               = &ssc0_dmamask,
@@@ -1241,7 -1241,7 +1241,7 @@@ static struct resource ssc1_resources[
  };
  
  static struct platform_device at91sam9263_ssc1_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 1,
        .dev    = {
                .dma_mask               = &ssc1_dmamask,
  #include <asm/mach/map.h>
  #include <asm/system_misc.h>
  #include <mach/at91sam9g45.h>
 -#include <mach/at91_aic.h>
  #include <mach/at91_pmc.h>
  #include <mach/cpu.h>
  
 +#include "at91_aic.h"
  #include "soc.h"
  #include "generic.h"
  #include "clock.h"
@@@ -239,8 -239,10 +239,10 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi0_clk),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.1", &twi1_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91sam9g45_ssc.0", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91sam9g45_ssc.1", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fff9c000.ssc", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffa0000.ssc", &ssc1_clk),
        CLKDEV_CON_DEV_ID(NULL, "atmel-trng", &trng_clk),
        CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk),
        CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk),
        CLKDEV_CON_DEV_ID("t0_clk", "fffd4000.timer", &tcb0_clk),
        CLKDEV_CON_DEV_ID("hclk", "700000.ohci", &uhphs_clk),
        CLKDEV_CON_DEV_ID("ehci_clk", "800000.ehci", &uhphs_clk),
 +      CLKDEV_CON_DEV_ID("mci_clk", "fff80000.mmc", &mmc0_clk),
 +      CLKDEV_CON_DEV_ID("mci_clk", "fffd0000.mmc", &mmc1_clk),
        CLKDEV_CON_DEV_ID(NULL, "fff84000.i2c", &twi0_clk),
        CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi1_clk),
        /* fake hclk clock */
        CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioC_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioDE_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioDE_clk),
 +
        CLKDEV_CON_ID("pioA", &pioA_clk),
        CLKDEV_CON_ID("pioB", &pioB_clk),
        CLKDEV_CON_ID("pioC", &pioC_clk),
@@@ -351,6 -345,7 +353,6 @@@ static struct at91_gpio_bank at91sam9g4
  static void __init at91sam9g45_map_io(void)
  {
        at91_init_sram(0, AT91SAM9G45_SRAM_BASE, AT91SAM9G45_SRAM_SIZE);
 -      init_consistent_dma_size(SZ_4M);
  }
  
  static void __init at91sam9g45_ioremap_registers(void)
@@@ -416,10 -411,10 +418,10 @@@ static unsigned int at91sam9g45_default
        0,      /* Advanced Interrupt Controller (IRQ0) */
  };
  
 -struct at91_init_soc __initdata at91sam9g45_soc = {
 +AT91_SOC_START(sam9g45)
        .map_io = at91sam9g45_map_io,
        .default_irq_priority = at91sam9g45_default_irq_priority,
        .ioremap_registers = at91sam9g45_ioremap_registers,
        .register_clocks = at91sam9g45_register_clocks,
        .init = at91sam9g45_initialize,
 -};
 +AT91_SOC_END
@@@ -26,6 -26,7 +26,6 @@@
  #include <video/atmel_lcdc.h>
  
  #include <mach/at91_adc.h>
 -#include <mach/board.h>
  #include <mach/at91sam9g45.h>
  #include <mach/at91sam9g45_matrix.h>
  #include <mach/at91_matrix.h>
@@@ -35,7 -36,6 +35,7 @@@
  
  #include <media/atmel-isi.h>
  
 +#include "board.h"
  #include "generic.h"
  #include "clock.h"
  
@@@ -1459,7 -1459,7 +1459,7 @@@ static struct resource ssc0_resources[
  };
  
  static struct platform_device at91sam9g45_ssc0_device = {
-       .name   = "ssc",
+       .name   = "at91sam9g45_ssc",
        .id     = 0,
        .dev    = {
                .dma_mask               = &ssc0_dmamask,
@@@ -1501,7 -1501,7 +1501,7 @@@ static struct resource ssc1_resources[
  };
  
  static struct platform_device at91sam9g45_ssc1_device = {
-       .name   = "ssc",
+       .name   = "at91sam9g45_ssc",
        .id     = 1,
        .dev    = {
                .dma_mask               = &ssc1_dmamask,
  #include <mach/cpu.h>
  #include <mach/at91_dbgu.h>
  #include <mach/at91sam9rl.h>
 -#include <mach/at91_aic.h>
  #include <mach/at91_pmc.h>
 -#include <mach/at91_rstc.h>
  
 +#include "at91_aic.h"
 +#include "at91_rstc.h"
  #include "soc.h"
  #include "generic.h"
  #include "clock.h"
@@@ -184,8 -184,10 +184,10 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
        CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
        CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
-       CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffc0000.ssc", &ssc0_clk),
+       CLKDEV_CON_DEV_ID("pclk", "fffc4000.ssc", &ssc1_clk),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi0_clk),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.1", &twi1_clk),
        CLKDEV_CON_ID("pioA", &pioA_clk),
@@@ -338,10 -340,10 +340,10 @@@ static unsigned int at91sam9rl_default_
        0,      /* Advanced Interrupt Controller */
  };
  
 -struct at91_init_soc __initdata at91sam9rl_soc = {
 +AT91_SOC_START(sam9rl)
        .map_io = at91sam9rl_map_io,
        .default_irq_priority = at91sam9rl_default_irq_priority,
        .ioremap_registers = at91sam9rl_ioremap_registers,
        .register_clocks = at91sam9rl_register_clocks,
        .init = at91sam9rl_initialize,
 -};
 +AT91_SOC_END
  #include <linux/fb.h>
  #include <video/atmel_lcdc.h>
  
 -#include <mach/board.h>
  #include <mach/at91sam9rl.h>
  #include <mach/at91sam9rl_matrix.h>
  #include <mach/at91_matrix.h>
  #include <mach/at91sam9_smc.h>
  #include <linux/platform_data/dma-atmel.h>
  
 +#include "board.h"
  #include "generic.h"
  
  
@@@ -832,7 -832,7 +832,7 @@@ static struct resource ssc0_resources[
  };
  
  static struct platform_device at91sam9rl_ssc0_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 0,
        .dev    = {
                .dma_mask               = &ssc0_dmamask,
@@@ -874,7 -874,7 +874,7 @@@ static struct resource ssc1_resources[
  };
  
  static struct platform_device at91sam9rl_ssc1_device = {
-       .name   = "ssc",
+       .name   = "at91rm9200_ssc",
        .id     = 1,
        .dev    = {
                .dma_mask               = &ssc1_dmamask,
@@@ -15,8 -15,8 +15,8 @@@
  #include <mach/at91sam9x5.h>
  #include <mach/at91_pmc.h>
  #include <mach/cpu.h>
 -#include <mach/board.h>
  
 +#include "board.h"
  #include "soc.h"
  #include "generic.h"
  #include "clock.h"
@@@ -229,17 -229,16 +229,18 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk),
        CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb0_clk),
        CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk),
 +      CLKDEV_CON_DEV_ID("mci_clk", "f0008000.mmc", &mmc0_clk),
 +      CLKDEV_CON_DEV_ID("mci_clk", "f000c000.mmc", &mmc1_clk),
        CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk),
        CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk),
+       CLKDEV_CON_DEV_ID("pclk", "f0010000.ssc", &ssc_clk),
        CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk),
        CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk),
        CLKDEV_CON_DEV_ID(NULL, "f8018000.i2c", &twi2_clk),
 -      CLKDEV_CON_ID("pioA", &pioAB_clk),
 -      CLKDEV_CON_ID("pioB", &pioAB_clk),
 -      CLKDEV_CON_ID("pioC", &pioCD_clk),
 -      CLKDEV_CON_ID("pioD", &pioCD_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioAB_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioAB_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCD_clk),
 +      CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCD_clk),
        /* additional fake clock for macb_hclk */
        CLKDEV_CON_DEV_ID("hclk", "f802c000.ethernet", &macb0_clk),
        CLKDEV_CON_DEV_ID("hclk", "f8030000.ethernet", &macb1_clk),
@@@ -315,11 -314,18 +316,11 @@@ static void __init at91sam9x5_map_io(vo
        at91_init_sram(0, AT91SAM9X5_SRAM_BASE, AT91SAM9X5_SRAM_SIZE);
  }
  
 -void __init at91sam9x5_initialize(void)
 -{
 -      /* Register GPIO subsystem (using DT) */
 -      at91_gpio_init(NULL, 0);
 -}
 -
  /* --------------------------------------------------------------------
   *  Interrupt initialization
   * -------------------------------------------------------------------- */
  
 -struct at91_init_soc __initdata at91sam9x5_soc = {
 +AT91_SOC_START(sam9x5)
        .map_io = at91sam9x5_map_io,
        .register_clocks = at91sam9x5_register_clocks,
 -      .init = at91sam9x5_initialize,
 -};
 +AT91_SOC_END
  #include <asm/mach/map.h>
  #include <asm/mach/irq.h>
  
 -#include <mach/board.h>
 -#include <mach/at91_aic.h>
  #include <mach/at91sam9_smc.h>
  #include <mach/system_rev.h>
  
 +#include "at91_aic.h"
 +#include "board.h"
  #include "sam9_smc.h"
  #include "generic.h"
  
@@@ -353,6 -353,16 +353,16 @@@ static struct i2c_board_info __initdat
          },
  };
  
+ static struct platform_device sam9g20ek_audio_device = {
+       .name   = "at91sam9g20ek-audio",
+       .id     = -1,
+ };
+ static void __init ek_add_device_audio(void)
+ {
+       platform_device_register(&sam9g20ek_audio_device);
+ }
  
  static void __init ek_board_init(void)
  {
        at91_set_B_periph(AT91_PIN_PC1, 0);
        /* SSC (for WM8731) */
        at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
+       ek_add_device_audio();
  }
  
  MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK")
   * is licensed "as is" without any warranty of any kind, whether express
   * or implied.
   */
 -#include <linux/kernel.h>
 -#include <linux/init.h>
  #include <linux/console.h>
 +#include <linux/delay.h>
 +#include <linux/gpio.h>
 +#include <linux/gpio_keys.h>
 +#include <linux/init.h>
 +#include <linux/kernel.h>
  #include <linux/i2c.h>
  #include <linux/i2c/at24.h>
  #include <linux/i2c/pca953x.h>
  #include <linux/input.h>
 +#include <linux/input/tps6507x-ts.h>
  #include <linux/mfd/tps6507x.h>
 -#include <linux/gpio.h>
 -#include <linux/gpio_keys.h>
 -#include <linux/platform_device.h>
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/nand.h>
  #include <linux/mtd/partitions.h>
  #include <linux/mtd/physmap.h>
 +#include <linux/platform_device.h>
 +#include <linux/platform_data/mtd-davinci.h>
 +#include <linux/platform_data/mtd-davinci-aemif.h>
 +#include <linux/platform_data/spi-davinci.h>
 +#include <linux/platform_data/uio_pruss.h>
  #include <linux/regulator/machine.h>
  #include <linux/regulator/tps6507x.h>
 -#include <linux/input/tps6507x-ts.h>
  #include <linux/spi/spi.h>
  #include <linux/spi/flash.h>
 -#include <linux/delay.h>
  #include <linux/wl12xx.h>
  
 -#include <asm/mach-types.h>
 -#include <asm/mach/arch.h>
 -#include <asm/system_info.h>
 -
  #include <mach/cp_intc.h>
  #include <mach/da8xx.h>
 -#include <linux/platform_data/mtd-davinci.h>
  #include <mach/mux.h>
 -#include <linux/platform_data/mtd-davinci-aemif.h>
 -#include <linux/platform_data/spi-davinci.h>
 +
 +#include <asm/mach-types.h>
 +#include <asm/mach/arch.h>
 +#include <asm/system_info.h>
  
  #include <media/tvp514x.h>
  #include <media/adv7343.h>
@@@ -763,16 -762,19 +763,19 @@@ static u8 da850_iis_serializer_directio
  };
  
  static struct snd_platform_data da850_evm_snd_data = {
-       .tx_dma_offset  = 0x2000,
-       .rx_dma_offset  = 0x2000,
-       .op_mode        = DAVINCI_MCASP_IIS_MODE,
-       .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction),
-       .tdm_slots      = 2,
-       .serial_dir     = da850_iis_serializer_direction,
-       .asp_chan_q     = EVENTQ_0,
-       .version        = MCASP_VERSION_2,
-       .txnumevt       = 1,
-       .rxnumevt       = 1,
+       .tx_dma_offset          = 0x2000,
+       .rx_dma_offset          = 0x2000,
+       .op_mode                = DAVINCI_MCASP_IIS_MODE,
+       .num_serializer         = ARRAY_SIZE(da850_iis_serializer_direction),
+       .tdm_slots              = 2,
+       .serial_dir             = da850_iis_serializer_direction,
+       .asp_chan_q             = EVENTQ_0,
+       .ram_chan_q             = EVENTQ_1,
+       .version                = MCASP_VERSION_2,
+       .txnumevt               = 1,
+       .rxnumevt               = 1,
+       .sram_size_playback     = SZ_8K,
+       .sram_size_capture      = SZ_8K,
  };
  
  static const short da850_evm_mcasp_pins[] __initconst = {
@@@ -1510,6 -1512,7 +1513,7 @@@ static __init void da850_evm_init(void
                pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
                                ret);
  
+       da850_evm_snd_data.sram_pool = sram_get_gen_pool();
        da8xx_register_mcasp(0, &da850_evm_snd_data);
  
        ret = davinci_cfg_reg_list(da850_lcdcntl_pins);
                pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
                                ret);
  
 +      ret = da8xx_register_uio_pruss();
 +      if (ret)
 +              pr_warn("da850_evm_init: pruss initialization failed: %d\n",
 +                              ret);
 +
        /* Handle board specific muxing for LCD here */
        ret = davinci_cfg_reg_list(da850_evm_lcdc_pins);
        if (ret)
  #include <linux/input.h>
  #include <linux/pwm.h>
  #include <linux/pwm_backlight.h>
 +#include <linux/platform_data/i2c-s3c2410.h>
  #include <linux/platform_data/s3c-hsotg.h>
 +#include <linux/platform_data/usb-ehci-s5p.h>
 +#include <linux/platform_data/usb-exynos.h>
  
  #include <asm/mach/arch.h>
  #include <asm/hardware/gic.h>
  #include <plat/fb.h>
  #include <plat/keypad.h>
  #include <plat/sdhci.h>
 -#include <linux/platform_data/i2c-s3c2410.h>
  #include <plat/gpio-cfg.h>
  #include <plat/backlight.h>
  #include <plat/mfc.h>
 -#include <linux/platform_data/usb-ehci-s5p.h>
  #include <plat/clock.h>
  #include <plat/hdmi.h>
  
  #include <mach/map.h>
 -#include <linux/platform_data/usb-exynos.h>
  
  #include <drm/exynos_drm.h>
  #include "common.h"
@@@ -300,6 -300,9 +300,6 @@@ static struct platform_device *smdkv310
        &s5p_device_fimc_md,
        &s5p_device_g2d,
        &s5p_device_jpeg,
 -#ifdef CONFIG_DRM_EXYNOS
 -      &exynos_device_drm,
 -#endif
        &exynos4_device_ac97,
        &exynos4_device_i2s0,
        &exynos4_device_ohci,
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
        &exynos4_device_spdif,
-       &samsung_asoc_dma,
        &samsung_asoc_idma,
        &s5p_device_fimd0,
        &smdkv310_device_audio,
@@@ -287,21 -287,16 +287,21 @@@ static struct platform_device littlemil
        .id             = -1,
  };
  
 -static struct platform_device bells_wm5102_device = {
 +static struct platform_device bells_wm2200_device = {
        .name           = "bells",
        .id             = 0,
  };
  
 -static struct platform_device bells_wm5110_device = {
 +static struct platform_device bells_wm5102_device = {
        .name           = "bells",
        .id             = 1,
  };
  
 +static struct platform_device bells_wm5110_device = {
 +      .name           = "bells",
 +      .id             = 2,
 +};
 +
  static struct regulator_consumer_supply wallvdd_consumers[] = {
        REGULATOR_SUPPLY("SPKVDD", "1-001a"),
        REGULATOR_SUPPLY("SPKVDD1", "1-001a"),
        REGULATOR_SUPPLY("SPKVDDL", "1-001a"),
        REGULATOR_SUPPLY("SPKVDDR", "1-001a"),
  
 +      REGULATOR_SUPPLY("SPKVDDL", "spi0.1"),
 +      REGULATOR_SUPPLY("SPKVDDR", "spi0.1"),
 +      REGULATOR_SUPPLY("SPKVDDL", "wm5102-codec"),
 +      REGULATOR_SUPPLY("SPKVDDR", "wm5102-codec"),
 +      REGULATOR_SUPPLY("SPKVDDL", "wm5110-codec"),
 +      REGULATOR_SUPPLY("SPKVDDR", "wm5110-codec"),
 +
        REGULATOR_SUPPLY("DC1VDD", "0-0034"),
        REGULATOR_SUPPLY("DC2VDD", "0-0034"),
        REGULATOR_SUPPLY("DC3VDD", "0-0034"),
        REGULATOR_SUPPLY("DC1VDD", "1-0034"),
        REGULATOR_SUPPLY("DC2VDD", "1-0034"),
        REGULATOR_SUPPLY("DC3VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO1VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO2VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO4VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO5VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO6VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO7VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO8VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO9VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO10VDD", "1-0034"),
 +      REGULATOR_SUPPLY("LDO11VDD", "1-0034"),
  };
  
  static struct regulator_init_data wallvdd_data = {
@@@ -379,7 -357,6 +379,6 @@@ static struct platform_device *crag6410
        &s3c_device_timer[0],
        &s3c64xx_device_iis0,
        &s3c64xx_device_iis1,
-       &samsung_asoc_dma,
        &samsung_device_keypad,
        &crag6410_gpio_keydev,
        &crag6410_dm9k_device,
        &tobermory_device,
        &littlemill_device,
        &lowland_device,
 +      &bells_wm2200_device,
        &bells_wm5102_device,
        &bells_wm5110_device,
        &wallvdd_device,
@@@ -620,7 -596,6 +619,7 @@@ static struct s3c2410_platform_i2c i2c0
  static struct regulator_consumer_supply pvdd_1v2_consumers[] __devinitdata = {
        REGULATOR_SUPPLY("DCVDD", "spi0.0"),
        REGULATOR_SUPPLY("AVDD", "spi0.0"),
 +      REGULATOR_SUPPLY("AVDD", "spi0.1"),
  };
  
  static struct regulator_init_data pvdd_1v2 __devinitdata = {
@@@ -645,24 -620,6 +644,24 @@@ static struct regulator_consumer_suppl
        REGULATOR_SUPPLY("DCVDD", "1-001a"),
        REGULATOR_SUPPLY("AVDD", "1-001a"),
        REGULATOR_SUPPLY("DBVDD", "spi0.0"),
 +
 +      REGULATOR_SUPPLY("DBVDD", "1-003a"),
 +      REGULATOR_SUPPLY("LDOVDD", "1-003a"),
 +      REGULATOR_SUPPLY("CPVDD", "1-003a"),
 +      REGULATOR_SUPPLY("AVDD", "1-003a"),
 +      REGULATOR_SUPPLY("DBVDD1", "spi0.1"),
 +      REGULATOR_SUPPLY("DBVDD2", "spi0.1"),
 +      REGULATOR_SUPPLY("DBVDD3", "spi0.1"),
 +      REGULATOR_SUPPLY("LDOVDD", "spi0.1"),
 +      REGULATOR_SUPPLY("CPVDD", "spi0.1"),
 +
 +      REGULATOR_SUPPLY("DBVDD2", "wm5102-codec"),
 +      REGULATOR_SUPPLY("DBVDD3", "wm5102-codec"),
 +      REGULATOR_SUPPLY("CPVDD", "wm5102-codec"),
 +
 +      REGULATOR_SUPPLY("DBVDD2", "wm5110-codec"),
 +      REGULATOR_SUPPLY("DBVDD3", "wm5110-codec"),
 +      REGULATOR_SUPPLY("CPVDD", "wm5110-codec"),
  };
  
  static struct regulator_init_data pvdd_1v8 __devinitdata = {
@@@ -727,7 -684,6 +726,7 @@@ static struct i2c_board_info i2c_devs1[
          .irq = S3C_EINT(0),
          .platform_data = &glenfarclas_pmic_pdata },
  
 +      { I2C_BOARD_INFO("wlf-gf-module", 0x20) },
        { I2C_BOARD_INFO("wlf-gf-module", 0x22) },
        { I2C_BOARD_INFO("wlf-gf-module", 0x24) },
        { I2C_BOARD_INFO("wlf-gf-module", 0x25) },
@@@ -853,7 -809,7 +852,7 @@@ static void __init crag6410_machine_ini
        i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
  
        samsung_keypad_set_platdata(&crag6410_keypad_data);
 -      s3c64xx_spi0_set_platdata(NULL, 0, 1);
 +      s3c64xx_spi0_set_platdata(NULL, 0, 2);
  
        platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));
  
@@@ -146,15 -146,6 +146,6 @@@ struct platform_device s3c_device_cami
  
  /* ASOC DMA */
  
- struct platform_device samsung_asoc_dma = {
-       .name           = "samsung-audio",
-       .id             = -1,
-       .dev            = {
-               .dma_mask               = &samsung_device_dma_mask,
-               .coherent_dma_mask      = DMA_BIT_MASK(32),
-       }
- };
  struct platform_device samsung_asoc_idma = {
        .name           = "samsung-idma",
        .id             = -1,
@@@ -486,7 -477,11 +477,7 @@@ static struct resource s3c_i2c0_resourc
  
  struct platform_device s3c_device_i2c0 = {
        .name           = "s3c2410-i2c",
 -#ifdef CONFIG_S3C_DEV_I2C1
        .id             = 0,
 -#else
 -      .id             = -1,
 -#endif
        .num_resources  = ARRAY_SIZE(s3c_i2c0_resource),
        .resource       = s3c_i2c0_resource,
  };
@@@ -929,7 -924,6 +920,7 @@@ struct platform_device s5p_device_mfc_
                .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
  };
 +
  #endif /* CONFIG_S5P_DEV_MFC */
  
  /* MIPI CSIS */
@@@ -123,6 -123,7 +123,6 @@@ extern struct platform_device s5pv210_d
  
  extern struct platform_device exynos4_device_ac97;
  extern struct platform_device exynos4_device_ahci;
 -extern struct platform_device exynos4_device_dwmci;
  extern struct platform_device exynos4_device_i2s0;
  extern struct platform_device exynos4_device_i2s1;
  extern struct platform_device exynos4_device_i2s2;
@@@ -132,7 -133,8 +132,6 @@@ extern struct platform_device exynos4_d
  extern struct platform_device exynos4_device_pcm2;
  extern struct platform_device exynos4_device_spdif;
  
- extern struct platform_device samsung_asoc_dma;
 -extern struct platform_device exynos_device_drm;
 -
  extern struct platform_device samsung_asoc_idma;
  extern struct platform_device samsung_device_keypad;
  
@@@ -98,9 -98,9 +98,9 @@@ static irqreturn_t arizona_underclocked
  
        if (val & ARIZONA_AIF3_UNDERCLOCKED_STS)
                dev_err(arizona->dev, "AIF3 underclocked\n");
 -      if (val & ARIZONA_AIF3_UNDERCLOCKED_STS)
 -              dev_err(arizona->dev, "AIF3 underclocked\n");
        if (val & ARIZONA_AIF2_UNDERCLOCKED_STS)
 +              dev_err(arizona->dev, "AIF2 underclocked\n");
 +      if (val & ARIZONA_AIF1_UNDERCLOCKED_STS)
                dev_err(arizona->dev, "AIF1 underclocked\n");
        if (val & ARIZONA_ISRC2_UNDERCLOCKED_STS)
                dev_err(arizona->dev, "ISRC2 underclocked\n");
@@@ -272,6 -272,7 +272,7 @@@ static struct mfd_cell early_devs[] = 
  static struct mfd_cell wm5102_devs[] = {
        { .name = "arizona-extcon" },
        { .name = "arizona-gpio" },
+       { .name = "arizona-haptics" },
        { .name = "arizona-micsupp" },
        { .name = "arizona-pwm" },
        { .name = "wm5102-codec" },
  static struct mfd_cell wm5110_devs[] = {
        { .name = "arizona-extcon" },
        { .name = "arizona-gpio" },
+       { .name = "arizona-haptics" },
        { .name = "arizona-micsupp" },
        { .name = "arizona-pwm" },
        { .name = "wm5110-codec" },
  };
  
 -int __devinit arizona_dev_init(struct arizona *arizona)
 +int arizona_dev_init(struct arizona *arizona)
  {
        struct device *dev = arizona->dev;
        const char *type_name;
  
        /* If we have a /RESET GPIO we'll already be reset */
        if (!arizona->pdata.reset) {
 +              regcache_mark_dirty(arizona->regmap);
 +
                ret = regmap_write(arizona->regmap, ARIZONA_SOFTWARE_RESET, 0);
                if (ret != 0) {
                        dev_err(dev, "Failed to reset device: %d\n", ret);
                        goto err_reset;
                }
 +
 +              ret = regcache_sync(arizona->regmap);
 +              if (ret != 0) {
 +                      dev_err(dev, "Failed to sync device: %d\n", ret);
 +                      goto err_reset;
 +              }
        }
  
        ret = arizona_wait_for_boot(arizona);
                break;
        case WM5110:
                ret = mfd_add_devices(arizona->dev, -1, wm5110_devs,
 -                                    ARRAY_SIZE(wm5102_devs), NULL, 0, NULL);
 +                                    ARRAY_SIZE(wm5110_devs), NULL, 0, NULL);
                break;
        }
  
@@@ -561,7 -555,7 +563,7 @@@ err_early
  }
  EXPORT_SYMBOL_GPL(arizona_dev_init);
  
 -int __devexit arizona_dev_exit(struct arizona *arizona)
 +int arizona_dev_exit(struct arizona *arizona)
  {
        mfd_remove_devices(arizona->dev);
        arizona_free_irq(arizona, ARIZONA_IRQ_UNDERCLOCKED, arizona);
@@@ -374,21 -374,21 +374,21 @@@ static int wm8994_ldo_in_use(struct wm8
  }
  #endif
  
 -static const __devinitconst struct reg_default wm8994_revc_patch[] = {
 +static const struct reg_default wm8994_revc_patch[] = {
        { 0x102, 0x3 },
        { 0x56, 0x3 },
        { 0x817, 0x0 },
        { 0x102, 0x0 },
  };
  
 -static const __devinitconst struct reg_default wm8958_reva_patch[] = {
 +static const struct reg_default wm8958_reva_patch[] = {
        { 0x102, 0x3 },
        { 0xcb, 0x81 },
        { 0x817, 0x0 },
        { 0x102, 0x0 },
  };
  
 -static const __devinitconst struct reg_default wm1811_reva_patch[] = {
 +static const struct reg_default wm1811_reva_patch[] = {
        { 0x102, 0x3 },
        { 0x56, 0xc07 },
        { 0x5d, 0x7e },
  /*
   * Instantiate the generic non-control parts of the device.
   */
 -static __devinit int wm8994_device_init(struct wm8994 *wm8994, int irq)
 +static int wm8994_device_init(struct wm8994 *wm8994, int irq)
  {
-       struct wm8994_pdata *pdata = wm8994->dev->platform_data;
+       struct wm8994_pdata *pdata;
        struct regmap_config *regmap_config;
        const struct reg_default *regmap_patch = NULL;
        const char *devname;
        int ret, i, patch_regs;
        int pulls = 0;
  
+       if (dev_get_platdata(wm8994->dev)) {
+               pdata = dev_get_platdata(wm8994->dev);
+               wm8994->pdata = *pdata;
+       }
+       pdata = &wm8994->pdata;
        dev_set_drvdata(wm8994->dev, wm8994);
  
        /* Add the on-chip regulators first for bootstrapping */
                }
        }
  
-       if (pdata) {
-               wm8994->irq_base = pdata->irq_base;
-               wm8994->gpio_base = pdata->gpio_base;
-               /* GPIO configuration is only applied if it's non-zero */
-               for (i = 0; i < ARRAY_SIZE(pdata->gpio_defaults); i++) {
-                       if (pdata->gpio_defaults[i]) {
-                               wm8994_set_bits(wm8994, WM8994_GPIO_1 + i,
-                                               0xffff,
-                                               pdata->gpio_defaults[i]);
-                       }
+       wm8994->irq_base = pdata->irq_base;
+       wm8994->gpio_base = pdata->gpio_base;
+       /* GPIO configuration is only applied if it's non-zero */
+       for (i = 0; i < ARRAY_SIZE(pdata->gpio_defaults); i++) {
+               if (pdata->gpio_defaults[i]) {
+                       wm8994_set_bits(wm8994, WM8994_GPIO_1 + i,
+                                       0xffff, pdata->gpio_defaults[i]);
                }
+       }
  
-               wm8994->ldo_ena_always_driven = pdata->ldo_ena_always_driven;
+       wm8994->ldo_ena_always_driven = pdata->ldo_ena_always_driven;
  
-               if (pdata->spkmode_pu)
-                       pulls |= WM8994_SPKMODE_PU;
-       }
+       if (pdata->spkmode_pu)
+               pulls |= WM8994_SPKMODE_PU;
  
        /* Disable unneeded pulls */
        wm8994_set_bits(wm8994, WM8994_PULL_CONTROL_2,
@@@ -671,7 -674,7 +674,7 @@@ err
        return ret;
  }
  
 -static __devexit void wm8994_device_exit(struct wm8994 *wm8994)
 +static void wm8994_device_exit(struct wm8994 *wm8994)
  {
        pm_runtime_disable(wm8994->dev);
        mfd_remove_devices(wm8994->dev);
@@@ -689,7 -692,7 +692,7 @@@ static const struct of_device_id wm8994
  };
  MODULE_DEVICE_TABLE(of, wm8994_of_match);
  
 -static __devinit int wm8994_i2c_probe(struct i2c_client *i2c,
 +static int wm8994_i2c_probe(struct i2c_client *i2c,
                                      const struct i2c_device_id *id)
  {
        struct wm8994 *wm8994;
        return wm8994_device_init(wm8994, i2c->irq);
  }
  
 -static __devexit int wm8994_i2c_remove(struct i2c_client *i2c)
 +static int wm8994_i2c_remove(struct i2c_client *i2c)
  {
        struct wm8994 *wm8994 = i2c_get_clientdata(i2c);
  
@@@ -744,7 -747,7 +747,7 @@@ static struct i2c_driver wm8994_i2c_dri
                .of_match_table = wm8994_of_match,
        },
        .probe = wm8994_i2c_probe,
 -      .remove = __devexit_p(wm8994_i2c_remove),
 +      .remove = wm8994_i2c_remove,
        .id_table = wm8994_i2c_id,
  };
  
diff --combined drivers/misc/atmel-ssc.c
@@@ -18,6 -18,8 +18,8 @@@
  #include <linux/slab.h>
  #include <linux/module.h>
  
+ #include <linux/of.h>
  /* Serialize access to ssc_list and user count */
  static DEFINE_SPINLOCK(user_lock);
  static LIST_HEAD(ssc_list);
@@@ -29,7 -31,13 +31,13 @@@ struct ssc_device *ssc_request(unsigne
  
        spin_lock(&user_lock);
        list_for_each_entry(ssc, &ssc_list, list) {
-               if (ssc->pdev->id == ssc_num) {
+               if (ssc->pdev->dev.of_node) {
+                       if (of_alias_get_id(ssc->pdev->dev.of_node, "ssc")
+                               == ssc_num) {
+                               ssc_valid = 1;
+                               break;
+                       }
+               } else if (ssc->pdev->id == ssc_num) {
                        ssc_valid = 1;
                        break;
                }
@@@ -68,39 -76,93 +76,93 @@@ void ssc_free(struct ssc_device *ssc
  }
  EXPORT_SYMBOL(ssc_free);
  
- static int __init ssc_probe(struct platform_device *pdev)
+ static struct atmel_ssc_platform_data at91rm9200_config = {
+       .use_dma = 0,
+ };
+ static struct atmel_ssc_platform_data at91sam9g45_config = {
+       .use_dma = 1,
+ };
+ static const struct platform_device_id atmel_ssc_devtypes[] = {
+       {
+               .name = "at91rm9200_ssc",
+               .driver_data = (unsigned long) &at91rm9200_config,
+       }, {
+               .name = "at91sam9g45_ssc",
+               .driver_data = (unsigned long) &at91sam9g45_config,
+       }, {
+               /* sentinel */
+       }
+ };
+ #ifdef CONFIG_OF
+ static const struct of_device_id atmel_ssc_dt_ids[] = {
+       {
+               .compatible = "atmel,at91rm9200-ssc",
+               .data = &at91rm9200_config,
+       }, {
+               .compatible = "atmel,at91sam9g45-ssc",
+               .data = &at91sam9g45_config,
+       }, {
+               /* sentinel */
+       }
+ };
+ MODULE_DEVICE_TABLE(of, atmel_ssc_dt_ids);
+ #endif
+ static inline const struct atmel_ssc_platform_data * __init
+       atmel_ssc_get_driver_data(struct platform_device *pdev)
+ {
+       if (pdev->dev.of_node) {
+               const struct of_device_id *match;
+               match = of_match_node(atmel_ssc_dt_ids, pdev->dev.of_node);
+               if (match == NULL)
+                       return NULL;
+               return match->data;
+       }
+       return (struct atmel_ssc_platform_data *)
+               platform_get_device_id(pdev)->driver_data;
+ }
+ static int ssc_probe(struct platform_device *pdev)
  {
-       int retval = 0;
        struct resource *regs;
        struct ssc_device *ssc;
+       const struct atmel_ssc_platform_data *plat_dat;
  
-       ssc = kzalloc(sizeof(struct ssc_device), GFP_KERNEL);
+       ssc = devm_kzalloc(&pdev->dev, sizeof(struct ssc_device), GFP_KERNEL);
        if (!ssc) {
                dev_dbg(&pdev->dev, "out of memory\n");
-               retval = -ENOMEM;
-               goto out;
+               return -ENOMEM;
        }
  
+       ssc->pdev = pdev;
+       plat_dat = atmel_ssc_get_driver_data(pdev);
+       if (!plat_dat)
+               return -ENODEV;
+       ssc->pdata = (struct atmel_ssc_platform_data *)plat_dat;
        regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!regs) {
                dev_dbg(&pdev->dev, "no mmio resource defined\n");
-               retval = -ENXIO;
-               goto out_free;
+               return -ENXIO;
        }
  
-       ssc->clk = clk_get(&pdev->dev, "pclk");
-       if (IS_ERR(ssc->clk)) {
-               dev_dbg(&pdev->dev, "no pclk clock defined\n");
-               retval = -ENXIO;
-               goto out_free;
-       }
-       ssc->pdev = pdev;
-       ssc->regs = ioremap(regs->start, resource_size(regs));
+       ssc->regs = devm_request_and_ioremap(&pdev->dev, regs);
        if (!ssc->regs) {
                dev_dbg(&pdev->dev, "ioremap failed\n");
-               retval = -EINVAL;
-               goto out_clk;
+               return -EINVAL;
+       }
+       ssc->phybase = regs->start;
+       ssc->clk = devm_clk_get(&pdev->dev, "pclk");
+       if (IS_ERR(ssc->clk)) {
+               dev_dbg(&pdev->dev, "no pclk clock defined\n");
+               return -ENXIO;
        }
  
        /* disable all interrupts */
        ssc->irq = platform_get_irq(pdev, 0);
        if (!ssc->irq) {
                dev_dbg(&pdev->dev, "could not get irq\n");
-               retval = -ENXIO;
-               goto out_unmap;
+               return -ENXIO;
        }
  
        spin_lock(&user_lock);
        dev_info(&pdev->dev, "Atmel SSC device at 0x%p (irq %d)\n",
                        ssc->regs, ssc->irq);
  
-       goto out;
- out_unmap:
-       iounmap(ssc->regs);
- out_clk:
-       clk_put(ssc->clk);
- out_free:
-       kfree(ssc);
- out:
-       return retval;
+       return 0;
  }
  
 -static int __devexit ssc_remove(struct platform_device *pdev)
 +static int ssc_remove(struct platform_device *pdev)
  {
        struct ssc_device *ssc = platform_get_drvdata(pdev);
  
        spin_lock(&user_lock);
-       iounmap(ssc->regs);
-       clk_put(ssc->clk);
        list_del(&ssc->list);
-       kfree(ssc);
        spin_unlock(&user_lock);
  
        return 0;
  }
  
  static struct platform_driver ssc_driver = {
-       .remove         = ssc_remove,
        .driver         = {
                .name           = "ssc",
                .owner          = THIS_MODULE,
+               .of_match_table = of_match_ptr(atmel_ssc_dt_ids),
        },
 -      .remove         = __devexit_p(ssc_remove),
+       .id_table       = atmel_ssc_devtypes,
+       .probe          = ssc_probe,
++      .remove         = ssc_remove,
  };
- static int __init ssc_init(void)
- {
-       return platform_driver_probe(&ssc_driver, ssc_probe);
- }
- module_init(ssc_init);
- static void __exit ssc_exit(void)
- {
-       platform_driver_unregister(&ssc_driver);
- }
- module_exit(ssc_exit);
+ module_platform_driver(ssc_driver);
  
  MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>");
  MODULE_DESCRIPTION("SSC driver for Atmel AVR32 and AT91");
@@@ -29,6 -29,7 +29,6 @@@
  
  #include <asm/fiq.h>
  
 -#include <mach/irqs.h>
  #include <linux/platform_data/asoc-imx-ssi.h>
  
  #include "imx-ssi.h"
@@@ -281,7 -282,7 +281,7 @@@ static struct snd_soc_platform_driver i
        .pcm_free       = imx_pcm_fiq_free,
  };
  
- static int __devinit imx_soc_platform_probe(struct platform_device *pdev)
+ static int imx_soc_platform_probe(struct platform_device *pdev)
  {
        struct imx_ssi *ssi = platform_get_drvdata(pdev);
        int ret;
@@@ -315,7 -316,7 +315,7 @@@ failed_register
        return ret;
  }
  
- static int __devexit imx_soc_platform_remove(struct platform_device *pdev)
+ static int imx_soc_platform_remove(struct platform_device *pdev)
  {
        snd_soc_unregister_platform(&pdev->dev);
        return 0;
@@@ -328,7 -329,7 +328,7 @@@ static struct platform_driver imx_pcm_d
        },
  
        .probe = imx_soc_platform_probe,
-       .remove = __devexit_p(imx_soc_platform_remove),
+       .remove = imx_soc_platform_remove,
  };
  
  module_platform_driver(imx_pcm_driver);
diff --combined sound/soc/fsl/imx-ssi.c
@@@ -48,6 -48,7 +48,6 @@@
  #include <sound/soc.h>
  
  #include <linux/platform_data/asoc-imx-ssi.h>
 -#include <mach/hardware.h>
  
  #include "imx-ssi.h"
  
@@@ -638,7 -639,7 +638,7 @@@ failed_clk
        return ret;
  }
  
- static int __devexit imx_ssi_remove(struct platform_device *pdev)
+ static int imx_ssi_remove(struct platform_device *pdev)
  {
        struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        struct imx_ssi *ssi = platform_get_drvdata(pdev);
  
  static struct platform_driver imx_ssi_driver = {
        .probe = imx_ssi_probe,
-       .remove = __devexit_p(imx_ssi_remove),
+       .remove = imx_ssi_remove,
  
        .driver = {
                .name = "imx-ssi",
  #include <sound/dmaengine_pcm.h>
  #include <sound/soc.h>
  
 -#include <plat/cpu.h>
  #include "omap-pcm.h"
  
 +#ifdef CONFIG_ARCH_OMAP1
 +#define pcm_omap1510()        cpu_is_omap1510()
 +#else
 +#define pcm_omap1510()        0
 +#endif
 +
  static const struct snd_pcm_hardware omap_pcm_hardware = {
        .info                   = SNDRV_PCM_INFO_MMAP |
                                  SNDRV_PCM_INFO_MMAP_VALID |
@@@ -164,7 -159,7 +164,7 @@@ static snd_pcm_uframes_t omap_pcm_point
  {
        snd_pcm_uframes_t offset;
  
 -      if (cpu_is_omap1510())
 +      if (pcm_omap1510())
                offset = snd_dmaengine_pcm_pointer_no_residue(substream);
        else
                offset = snd_dmaengine_pcm_pointer(substream);
@@@ -302,13 -297,13 +302,13 @@@ static struct snd_soc_platform_driver o
        .pcm_free       = omap_pcm_free_dma_buffers,
  };
  
- static __devinit int omap_pcm_probe(struct platform_device *pdev)
+ static int omap_pcm_probe(struct platform_device *pdev)
  {
        return snd_soc_register_platform(&pdev->dev,
                        &omap_soc_platform);
  }
  
- static int __devexit omap_pcm_remove(struct platform_device *pdev)
+ static int omap_pcm_remove(struct platform_device *pdev)
  {
        snd_soc_unregister_platform(&pdev->dev);
        return 0;
@@@ -321,7 -316,7 +321,7 @@@ static struct platform_driver omap_pcm_
        },
  
        .probe = omap_pcm_probe,
-       .remove = __devexit_p(omap_pcm_remove),
+       .remove = omap_pcm_remove,
  };
  
  module_platform_driver(omap_pcm_driver);
@@@ -26,6 -26,7 +26,6 @@@
  #include <linux/regmap.h>
  #include <linux/slab.h>
  #include <mach/clk.h>
 -#include <mach/dma.h>
  #include <sound/soc.h>
  #include "tegra30_ahub.h"
  
@@@ -287,7 -288,7 +287,7 @@@ int tegra30_ahub_unset_rx_cif_source(en
  }
  EXPORT_SYMBOL_GPL(tegra30_ahub_unset_rx_cif_source);
  
- static const char * const configlink_clocks[] __devinitconst = {
+ static const char * const configlink_clocks[] = {
        "i2s0",
        "i2s1",
        "i2s2",
        "spdif_in",
  };
  
- struct of_dev_auxdata ahub_auxdata[] __devinitdata = {
+ struct of_dev_auxdata ahub_auxdata[] = {
        OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080300, "tegra30-i2s.0", NULL),
        OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080400, "tegra30-i2s.1", NULL),
        OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080500, "tegra30-i2s.2", NULL),
@@@ -433,7 -434,7 +433,7 @@@ static const struct regmap_config tegra
        .cache_type = REGCACHE_RBTREE,
  };
  
- static int __devinit tegra30_ahub_probe(struct platform_device *pdev)
+ static int tegra30_ahub_probe(struct platform_device *pdev)
  {
        struct clk *clk;
        int i;
@@@ -585,7 -586,7 +585,7 @@@ err
        return ret;
  }
  
- static int __devexit tegra30_ahub_remove(struct platform_device *pdev)
+ static int tegra30_ahub_remove(struct platform_device *pdev)
  {
        if (!ahub)
                return -ENODEV;
        return 0;
  }
  
- static const struct of_device_id tegra30_ahub_of_match[] __devinitconst = {
+ static const struct of_device_id tegra30_ahub_of_match[] = {
        { .compatible = "nvidia,tegra30-ahub", },
        {},
  };
  
- static const struct dev_pm_ops tegra30_ahub_pm_ops __devinitconst = {
+ static const struct dev_pm_ops tegra30_ahub_pm_ops = {
        SET_RUNTIME_PM_OPS(tegra30_ahub_runtime_suspend,
                           tegra30_ahub_runtime_resume, NULL)
  };
  
  static struct platform_driver tegra30_ahub_driver = {
        .probe = tegra30_ahub_probe,
-       .remove = __devexit_p(tegra30_ahub_remove),
+       .remove = tegra30_ahub_remove,
        .driver = {
                .name = DRV_NAME,
                .owner = THIS_MODULE,
@@@ -18,7 -18,8 +18,7 @@@
  #include <linux/dma-mapping.h>
  #include <linux/dmaengine.h>
  #include <linux/slab.h>
 -
 -#include <plat/ste_dma40.h>
 +#include <linux/platform_data/dma-ste-dma40.h>
  
  #include <sound/pcm.h>
  #include <sound/pcm_params.h>
@@@ -281,7 -282,7 +281,7 @@@ static struct snd_soc_platform_driver u
        .pcm_new        = ux500_pcm_new,
  };
  
static int __devexit ux500_pcm_drv_probe(struct platform_device *pdev)
int ux500_pcm_register_platform(struct platform_device *pdev)
  {
        int ret;
  
  
        return 0;
  }
+ EXPORT_SYMBOL_GPL(ux500_pcm_register_platform);
  
static int __devinit ux500_pcm_drv_remove(struct platform_device *pdev)
int ux500_pcm_unregister_platform(struct platform_device *pdev)
  {
        snd_soc_unregister_platform(&pdev->dev);
  
        return 0;
  }
- static struct platform_driver ux500_pcm_driver = {
-       .driver = {
-               .name = "ux500-pcm",
-               .owner = THIS_MODULE,
-       },
-       .probe = ux500_pcm_drv_probe,
-       .remove = __devexit_p(ux500_pcm_drv_remove),
- };
- module_platform_driver(ux500_pcm_driver);
- MODULE_LICENSE("GPL v2");
+ EXPORT_SYMBOL_GPL(ux500_pcm_unregister_platform);